filegen

package
v1.0.0-beta.8 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntryFilter

type EntryFilter func(ctx context.Context, entry os.DirEntry) bool

EntryFilter 模板文件过滤 返回true表示需要生成,false表示不需要生成

type FileGen

type FileGen struct {
	BaseTmplDir string
	OutDir      string
	EmbedFS     *embed.FS
	IsEmbed     bool
	Attr        map[string]any
	FuncMap     template.FuncMap
	EntryFilter EntryFilter
	// contains filtered or unexported fields
}

func (*FileGen) Gen

func (g *FileGen) Gen()

func (*FileGen) With

func (g *FileGen) With(ctx context.Context, key any, value any) *FileGen

Jump to

Keyboard shortcuts

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