code: func IsDir(dir string) bool {
  	f, e := os.Stat(dir)
  	if e != nil {
  		return false
  	}
  	return f.IsDir()
  }
docs: // IsDir returns true if given path is a directory,
  // or returns false when it's a file or does not exist.