Documentation ¶
Overview ¶
Package prnt provides common functionality for code generators.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator provides convenience methods for code generators. In particular it provides fmt-like methods which print to an internal buffer. It also allows any errors to be stored so they can be checked at the end, rather than having error checks obscuring the code generation.
func (*Generator) AddError ¶
AddError records an error in code generation. The first non-nil error will prevent printing operations from writing anything else, and the error will be returned from Result().
Click to show internal directories.
Click to hide internal directories.