Documentation ¶ Index ¶ func Gofmt(src []byte) ([]byte, error) func Goimports(src []byte) ([]byte, error) type File func Generate(text string, data interface{}, opts Options) (*File, error) func (f *File) MoveTo(dir string) func (f *File) Write() error type Formatter type Options type PkgInfo Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Gofmt ¶ func Gofmt(src []byte) ([]byte, error) func Goimports ¶ func Goimports(src []byte) ([]byte, error) Types ¶ type File ¶ type File struct { Name string Content []byte } func Generate ¶ func Generate(text string, data interface{}, opts Options) (*File, error) func (*File) MoveTo ¶ func (f *File) MoveTo(dir string) func (*File) Write ¶ func (f *File) Write() error type Formatter ¶ type Formatter func(src []byte) ([]byte, error) type Options ¶ type Options struct { Name string Funcs template.FuncMap Formatted bool TargetFileName string } type PkgInfo ¶ type PkgInfo struct { CurrentPkgName string EndpointPkgPrefix string EndpointPkgPath string } Source Files ¶ View all Source files formatter.go generator.go Click to show internal directories. Click to hide internal directories.