Documentation ¶
Index ¶
Constants ¶
View Source
const (
// DoNotEditHead added to the beginning of a file to prompt the user not to edit
DoNotEditHead = "// Code generated by xmd. DO NOT EDIT!"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DefaultTemplate ¶
type DefaultTemplate struct {
// contains filtered or unexported fields
}
DefaultTemplate is a tool to provides the text/template operations
func (*DefaultTemplate) Execute ¶
func (t *DefaultTemplate) Execute(data interface{}) (*bytes.Buffer, error)
Execute returns the codes after the template executed
func (*DefaultTemplate) GoFmt ¶
func (t *DefaultTemplate) GoFmt(format bool) *DefaultTemplate
GoFmt sets the value to goFmt and marks the generated codes will be formatted or not
func (*DefaultTemplate) Parse ¶
func (t *DefaultTemplate) Parse(text string) *DefaultTemplate
Parse accepts a source template and returns DefaultTemplate
Click to show internal directories.
Click to hide internal directories.