code: func (p *parser) Parse(x *Exif) error {
  	if len(x.Tiff.Dirs) == 0 {
  		return errors.New("Invalid exif data")
  	}
  	x.LoadTags(x.Tiff.Dirs[0], exifFields, false)
  
  	// thumbnails
  	if len(x.Tiff.Dirs) >= 2 {
  		x.LoadTags(x.Tiff.Dirs[1], thumbnailFields, false)
  	}
  
  	te := make(tiffErrors)
  
  	// recurse into exif, gps, and interop sub-IFDs
  	if err := loadSubDir(x, ExifIFDPointer, exifFields); err != nil {
  		te[loadExif] = err.Error()
  	}
  	if err := loadSubDir(x, GPSInfoIFDPointer, gpsFields); err != nil {
  		te[loadGPS] = err.Error()
  	}
  
  	if err := loadSubDir(x, InteroperabilityIFDPointer, interopFields); err != nil {
  		te[loadInteroperability] = err.Error()
  	}
  	if len(te) > 0 {
  		return te
  	}
  	return nil
  }
docs: // Parse reads data from the tiff data in x and populates the tags
  // in x. If parsing a sub-IFD fails, the error is recorded and
  // parsing continues with the remaining sub-IFDs.