Documentation ¶
Index ¶
Constants ¶
View Source
const FileNamePrefix = "zz_"
View Source
const FileNameSuffix = ".go"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeWriter ¶
FakeWriter is a writer that is useful during tests
func NewFakeWriter ¶
func NewFakeWriter() *FakeWriter
func (*FakeWriter) Clean ¶
func (w *FakeWriter) Clean() error
type Writer ¶
type Writer interface { // WriteFile writes a named file, adding a prefix and suffix to the name. WriteFile(name string, contents []byte) error // Clean removes any generated files from previous executions that WriteFile has not touched. Clean() error }
Writer is a mechanism to persist generated Go files
func NewDirWriter ¶
NewDirWriter returns a Writer that writes to the specified directory.
func NewStreamWriter ¶
NewStreamWriter returns a new Writer that writes to the passed io.Writer. Files written will be prefixed with a comment containing the file name. nil can be passed to discard all writes.
Click to show internal directories.
Click to hide internal directories.