func sniffByName(filename string) Format {
	if idx := strings.LastIndex(filename, "."); idx >= 0 {
		ext := strings.ToLower(filename[idx:])
		for _, f := range formats {
			for _, extensions := range f.Extensions {
				if ext == extensions {
					return f
				}
			}
		}
	}
	return Format{}
}
// Sniff determines the format by filename extension.
Sniff determines the format by filename extension.
// Sniff determines the format by filename extension .
func sniffByName(filename string) Format {
	if idx := strings.LastIndex(filename, "."); idx >= 0 {
		ext := strings.ToLower(filename[idx:])
		for _, f := range formats {
			for _, extensions := range f.Extensions {
				if ext == extensions {
					return f
				}
			}
		}
	}
	return Format{}
}
func sniffByName ( filename string ) Format { if idx := strings . LastIndex ( filename , " " ) ; idx >= 0 { ext := strings . ToLower ( filename [ idx : ] ) for _ , f := range formats { for _ , extensions := range f . Extensions { if ext == extensions { return f } } } } return Format { } }
Sniff determines the format by filename extension.
Sniff determines the format by filename extension .