Documentation
¶
Index ¶
- Constants
- func CheckExtension(path string, extensions []string) bool
- func EscapeHTML(html string, buffer *bytes.Buffer)
- func FormatBool(b bool, buffer *bytes.Buffer)
- func FormatFloat(f float64, buffer *bytes.Buffer)
- func FormatInt(i int64, buffer *bytes.Buffer)
- func FormatUint(u uint64, buffer *bytes.Buffer)
- func Generate(source, dest, pkgName string, extensions []string)
- func GetBuffer() *bytes.Buffer
- func PutBuffer(buffer *bytes.Buffer)
Constants ¶
View Source
const ( TypeBytesBuffer = "bytes.Buffer" TypeIOWriter = "io.Writer" )
View Source
const ( TypeImport = iota TypeDefinition TypeExtend TypeInclude TypeBlock TypeCode TypeEscapedValue TypeRawValue TypeNote TypeHTML TypeRoot )
View Source
const ( Bool = "b" Int = "i" Uint = "u" Float = "f" String = "s" Bytes = "bs" Interface = "v" )
View Source
const ( OpenBrace = '{' CloseBrace = '}' LT = '<' GT = '>' Percent = '%' Exclamation = '!' Colon = ':' Tilde = '~' Plus = '+' Equal = '=' At = '@' Pound = '#' Space = ' ' BreakLine = '\n' )
Variables ¶
This section is empty.
Functions ¶
func EscapeHTML ¶
EscapeHTML escapes the html and then put it to the buffer.
func FormatBool ¶
FormatBool format bool to string and then put the result to the buffer.
func FormatFloat ¶
FormatFloat format float64 to string and then put the result to the buffer.
func FormatInt ¶
FormatInt format int to string and then put the result to the buffer.
func FormatUint ¶
FormatUint formats uint to string and put it to the buffer. It's part of go source: https://github.com/golang/go/blob/master/src/strconv/itoa.go#L60
func Generate ¶
Generate generates Go code from source to test. pkgName represents the package name of the generated code.
Types ¶
This section is empty.
Source Files
¶
- bufferpool.go
- doc.go
- generator.go
- parser.go
- sort.go
- util.go
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
app
command
|
|
|
app/template
Code generated by hero.
|
Code generated by hero. |
Click to show internal directories.
Click to hide internal directories.