code: func exist(file string) (bool, error) {
  	_, err := os.Stat(file)
  	if err != nil {
  		if err == os.ErrNotExist {
  			return false, nil
  		}
  		return false, err
  	}
  	return true, nil
  }
docs: // exist checks if the file exists.