code: func extractFile(f *tar.Header, tr *tar.Reader, destPath string) error {
  	filePath := path.Join(destPath, f.Name)
  	os.MkdirAll(path.Dir(filePath), os.ModePerm)
  
  	fw, err := os.Create(filePath)
  	if err != nil {
  		return err
  	}
  	defer fw.Close()
  
  	if _, err = io.Copy(fw, tr); err != nil {
  		return err
  	}
  
  	// Skip symbolic links.
  	if f.FileInfo().Mode()&os.ModeSymlink != 0 {
  		return nil
  	}
  	// Set back file information.
  	if err = os.Chtimes(filePath, f.FileInfo().ModTime(), f.FileInfo().ModTime()); err != nil {
  		return err
  	}
  	return os.Chmod(filePath, f.FileInfo().Mode())
  }
docs: // extractFile extracts zip.File to file system.