template

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileOption

type FileOption struct {
	PkgName     string
	ImportPaths []string
	Content     string
}

FileOption 文件选项

type Template

type Template struct {
}

Template 模板,用于生成和格式化文件

func (*Template) Execute

func (temp *Template) Execute(wr io.Writer, name, text string, data interface{}) error

Execute 执行

func (*Template) SpliceFile

func (temp *Template) SpliceFile(opt FileOption) string

SpliceFile 拼接文件

func (*Template) WriteFile

func (temp *Template) WriteFile(filename string, content []byte) error

WriteFile 写文件

Jump to

Keyboard shortcuts

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