Documentation ¶
Overview ¶
Package gencode generates code for toolskel. It's where everything happens.
Index ¶
Constants ¶
View Source
const DefaultTType = "simple"
DefaultTType is the default template to use.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Data ¶
type Data struct { /* Strings which go right into code. */ Name string /* Package name. */ Description string /* Short description. */ Author string /* Author's name. */ Today string /* Curent date. */ SummaryCount bool /* Print count with summary. */ TagLog bool /* Tag logs with argv[0]. */ PkgType string /* Package or Program (default) */ Verbose bool /* -verbose */ Imports map[string]struct{} /* Imported packages. */ }
Data is used to pass data to the template being executed.
func (Data) ImportsBlock ¶
ImportsBlock returns a block of text suitable for use in an imports() block. Empty strings will be silently ignored.
func (*Data) SetDefaults ¶
func (d *Data) SetDefaults()
SetDefaults makes sure every field of Data has a default value.
func (Data) WithImports ¶
WithImports returns a copy of d with added imports.
Click to show internal directories.
Click to hide internal directories.