Documentation ¶
Index ¶
Constants ¶
View Source
const StarterCodeTemplate = `` /* 1314-byte string literal not displayed */
View Source
const StarterConfigCodeTemplate = `package {{ .PackageName }}
type Config struct {
}
func DefaultConfig() *Config {
return &Config{
}
}
`
View Source
const StarterReadmeCodeTemplate = `` /* 158-byte string literal not displayed */
View Source
const StarterTestingCodeTemplate = `` /* 506-byte string literal not displayed */
View Source
const StarterXCodeTemplate = `package {{ .PackageName }}
// 可供外部调用的运行实例
func X() {
return
}
`
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FormatterStarter ¶
type FormatterStarter struct {
FormatterStruct
}
func NewFormatterStarter ¶
func NewFormatterStarter() *FormatterStarter
func (*FormatterStarter) Format ¶
func (f *FormatterStarter) Format(cmdParams *CmdParams) IFormatter
type FormatterStarterConfig ¶
type FormatterStarterConfig struct {
FormatterStruct
}
func NewFormatterStarterConfig ¶
func NewFormatterStarterConfig() *FormatterStarterConfig
func (*FormatterStarterConfig) Format ¶
func (f *FormatterStarterConfig) Format(cmdParams *CmdParams) IFormatter
type FormatterStarterReadme ¶
type FormatterStarterReadme struct {
FormatterStruct
}
func NewFormatterStarterReadme ¶
func NewFormatterStarterReadme() *FormatterStarterReadme
func (*FormatterStarterReadme) Format ¶
func (f *FormatterStarterReadme) Format(cmdParams *CmdParams) IFormatter
type FormatterStarterTesting ¶
type FormatterStarterTesting struct {
FormatterStruct
}
func NewFormatterStarterTesting ¶
func NewFormatterStarterTesting() *FormatterStarterTesting
func (*FormatterStarterTesting) Format ¶
func (f *FormatterStarterTesting) Format(cmdParams *CmdParams) IFormatter
type FormatterStarterX ¶
type FormatterStarterX struct {
FormatterStruct
}
func NewFormatterStarterX ¶
func NewFormatterStarterX() *FormatterStarterX
func (*FormatterStarterX) Format ¶
func (f *FormatterStarterX) Format(cmdParams *CmdParams) IFormatter
type FormatterStruct ¶
type FormatterStruct struct { PackageName string ImportList map[string]ImportItem Name string StructName string TypeName string }
格式化信息结构体
type IFormatter ¶
type IFormatter interface { Format(cmdParams *CmdParams) IFormatter WriteOut(writer io.Writer) error }
type ImportItem ¶
Click to show internal directories.
Click to hide internal directories.