lazyfstools

package module
v0.0.0-...-87ee7d1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 8 Imported by: 0

README

A collection of sugary, opinionated, afero tools

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderTemplates

func RenderTemplates(afs afero.Fs, path string, target string, data any, _ ...TemplateOption) error

func Walk

func Walk(afs afero.Fs, abs string, fileProcessor ProcessFunc, dirProcessor ProcessFunc) error

Walk a directory tree and execute the appropriate function.

func WriteFile

func WriteFile(afs afero.Fs, path string, writers ...func(f afero.File) error) error

WriteFile is a quick and dirty way to write/sync/close a file.

Types

type ProcessFunc

type ProcessFunc = func(afs afero.Fs, path string, info fs.FileInfo) error

func SkipDirs

func SkipDirs(dirs ...string) ProcessFunc

type TemplateOption

type TemplateOption interface{}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL