code: func GetFileModeOfFile(pth string) (os.FileMode, error) {
  	finfo, err := os.Lstat(pth)
  	if err != nil {
  		return 0, err
  	}
  	return finfo.Mode(), nil
  }
docs: // GetFileModeOfFile ...
  //  this is the "permissions" info, which can be passed directly to
  //  functions like WriteBytesToFileWithPermission or os.OpenFile