Documentation ¶
Index ¶
- Constants
- func Clean(output string, err error) (string, error)
- func DeleteModuleBoilerplate(ctx *Context, module string) error
- func GenerateModuleBoilerplate(ctx *Context, module string) error
- func GenerateProjectBoilerplate(ctx *Context) error
- func GetAppNameFromPkgName(s string) string
- func GetPackageName(args []string) string
- func GitRepoName() (string, error)
- func OpenDirectory(workDir string) error
- func RandomName() string
- type Context
- type TemplateConfig
Constants ¶
View Source
const ( DEFAULT_WORKDIR = "./" CONFIG_FILENAME = ".stk.yaml" )
View Source
const DEFAULT_MODULE = "ping"
View Source
const MODULE_PLACEHOLDER = "ping"
View Source
const MODULE_PLACEHOLDER_UPPER = "Ping"
Variables ¶
This section is empty.
Functions ¶
func DeleteModuleBoilerplate ¶ added in v1.0.1
func GenerateModuleBoilerplate ¶ added in v1.0.1
func GenerateProjectBoilerplate ¶ added in v1.0.1
func GetAppNameFromPkgName ¶ added in v1.0.1
getAppNameFromPkgName transforms package name into an app name in lowerCamelCase.
func GetPackageName ¶ added in v1.0.1
GetPackageName determines the package name by checking various sources in order of priority.
func GitRepoName ¶ added in v1.0.1
func OpenDirectory ¶ added in v1.0.1
func RandomName ¶
func RandomName() string
Types ¶
type Context ¶ added in v1.0.1
type Context struct { IsGitRepo bool IsGoModule bool PackageName string AppName string WorkDir string GitCmd commands.GitCmd GoCmd commands.GoCmd }
func NewContext ¶ added in v1.0.1
func (*Context) WriteDefaultConfig ¶ added in v1.0.1
type TemplateConfig ¶ added in v1.0.1
func GetTemplateConfig ¶ added in v1.0.1
func GetTemplateConfig(ctx *Context, module string) *TemplateConfig
Click to show internal directories.
Click to hide internal directories.