func sniffByMagic(r reader) Format {
	for _, f := range formats {
		for _, magic := range f.Magics {
			b, err := r.Peek(len(magic))
			if err == nil && match(magic, b) {
				return f
			}
		}
	}
	return Format{}
}
// Sniff determines the format of r's data.
Sniff determines the format of r's data.
// Sniff determines the format of r ' s data .
func sniffByMagic(r reader) Format {
	for _, f := range formats {
		for _, magic := range f.Magics {
			b, err := r.Peek(len(magic))
			if err == nil && match(magic, b) {
				return f
			}
		}
	}
	return Format{}
}
func sniffByMagic ( r reader ) Format { for _ , f := range formats { for _ , magic := range f . Magics { b , err := r . Peek ( len ( magic ) ) if err == nil && match ( magic , b ) { return f } } } return Format { } }
Sniff determines the format of r's data.
Sniff determines the format of r ' s data .