Documentation
¶
Overview ¶
Package replacer is a library of replacement file content, supports replacement of files in local directories and embedded directory files via embed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field struct {
Old string // old field
New string // new field
IsCaseSensitive bool // whether the first letter is case-sensitive
}
Field replace field information
type Replacer ¶
type Replacer interface {
SetReplacementFields(fields []Field)
SetSubDirsAndFiles(subDirs []string, subFiles ...string)
SetIgnoreSubDirs(dirs ...string)
SetIgnoreSubFiles(filenames ...string)
SetOutputDir(absDir string, name ...string) error
GetOutputDir() string
GetSourcePath() string
SaveFiles() error
ReadFile(filename string) ([]byte, error)
GetFiles() []string
SaveTemplateFiles(m map[string]interface{}, parentDir ...string) error
}
Replacer interface
Click to show internal directories.
Click to hide internal directories.