tmpl

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PHCustomImports = "/* CUSTOM IMPORTS */"
	PHCode          = "/* CODE */"
	PHFormalPara    = "/* FORMAL PARAMETERS */"
	PHActualPara    = "/* ACTUAL PARAMETERS */"
	PHPlugInfo      = "/* PLUGIN_INFO */"
	PHFunName       = "/* FUN_NAME */"
	PHMinorFunName  = "/* MINOR_FUN_NAME */"
	PHModuleName    = "/* MODULE_NAME */"
)

Variables

This section is empty.

Functions

func GetTemplate

func GetTemplate(os, pType string) (string, error)

func Replace

func Replace(src string, placeHolder string, to string) string

func ReplaceBytes added in v0.1.0

func ReplaceBytes(src []byte, placeHolder string, to string) []byte

Types

type FileTmpl

type FileTmpl struct {
	Name    string
	Content []byte
}

func GetTemplatesDir

func GetTemplatesDir(dir string) []FileTmpl

GetTemplatesDir 枚举某个子目录下所有模板文件(非递归)

Jump to

Keyboard shortcuts

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