Skip to content

genfs is a feature-rich code generator that behaves like a filesystem.

License

Notifications You must be signed in to change notification settings

matthewmueller/genfs

Repository files navigation

genfs

Go Reference

genfs is a feature-rich generator system that behaves like a filesystem. This package formed the foundation for bud.

Install

go get github.com/matthewmueller/genfs

Usage

fsys := genfs.New()
fsys.GenerateFile("a.txt", func(fsys genfs.FS, file *genfs.File) error {
  file.WriteString("a")
  return nil
})
code, _ := fs.ReadFile(fsys, "a.txt")
fmt.Println(string(code))
// Output: a

Contributors

License

MIT

About

genfs is a feature-rich code generator that behaves like a filesystem.

Resources

License

Stars

Watchers

Forks

Packages

No packages published