Documentation
¶
Index ¶
- func Comment(str string) string
- func ModRootDir() (string, error)
- func Public(str string) string
- func SlashToCamelCase(str string) string
- func SortedKeys(m interface{}) []string
- type GoGenFile
- func (w *GoGenFile) FormatString() string
- func (w *GoGenFile) HasImport(importPath string) bool
- func (w *GoGenFile) HasImportAlias(importPath string) bool
- func (w *GoGenFile) Import(importPath string) string
- func (w *GoGenFile) ImportName(importPath string, name string) string
- func (w *GoGenFile) Indent(i int)
- func (w *GoGenFile) Printf(str string, args ...interface{})
- func (w *GoGenFile) ShiftLeft()
- func (w *GoGenFile) ShiftRight()
- func (w *GoGenFile) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Comment ¶
Comment assembles a string with correct newlines and // at the beginning of each line
func ModRootDir ¶
ModRootDir returns the root directory of current module. If the current working directory is not a module returns an error.
func SlashToCamelCase ¶
SlashToCamelCase makes from /my/path a string like MyPath
func SortedKeys ¶
func SortedKeys(m interface{}) []string
SortedKeys is missing generics very badly, m is actually map[string]<T>
Types ¶
type GoGenFile ¶
type GoGenFile struct {
// contains filtered or unexported fields
}
func NewGoGenFile ¶
func (*GoGenFile) FormatString ¶
func (*GoGenFile) HasImportAlias ¶
func (*GoGenFile) ImportName ¶
func (*GoGenFile) ShiftRight ¶
func (w *GoGenFile) ShiftRight()
Click to show internal directories.
Click to hide internal directories.