Skip to content

Instantly share code, notes, and snippets.

@JohnStarich
Created February 16, 2022 06:06
Show Gist options
  • Save JohnStarich/1d7ed94243a92f4f8138f44c52937e65 to your computer and use it in GitHub Desktop.
Save JohnStarich/1d7ed94243a92f4f8138f44c52937e65 to your computer and use it in GitHub Desktop.
HackpadFS article – Base Go helpers
func Glob(fs FS, pattern string) (matches []string, err error)
func ReadDir(fs FS, name string) ([]DirEntry, error)
func ReadFile(fs FS, name string) ([]byte, error)
func Stat(fs FS, name string) (FileInfo, error)
func Sub(fs FS, dir string) (FS, error)
func WalkDir(fs FS, root string, fn WalkDirFunc) error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment