project

package
v1.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

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 Clean added in v1.0.1

func Clean(output string, err error) (string, error)

func DeleteModuleBoilerplate added in v1.0.1

func DeleteModuleBoilerplate(ctx *Context, module string) error

func GenerateModuleBoilerplate added in v1.0.1

func GenerateModuleBoilerplate(ctx *Context, module string) error

func GenerateProjectBoilerplate added in v1.0.1

func GenerateProjectBoilerplate(ctx *Context) error

func GetAppNameFromPkgName added in v1.0.1

func GetAppNameFromPkgName(s string) string

getAppNameFromPkgName transforms package name into an app name in lowerCamelCase.

func GetPackageName added in v1.0.1

func GetPackageName(args []string) string

GetPackageName determines the package name by checking various sources in order of priority.

func GitRepoName added in v1.0.1

func GitRepoName() (string, error)

func OpenDirectory added in v1.0.1

func OpenDirectory(workDir string) error

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 NewContext(args []string) *Context

func (*Context) WriteDefaultConfig added in v1.0.1

func (ctx *Context) WriteDefaultConfig() error

type TemplateConfig added in v1.0.1

type TemplateConfig struct {
	PkgName      string
	AppName      string
	ModName      string
	ExportedName string
}

func GetTemplateConfig added in v1.0.1

func GetTemplateConfig(ctx *Context, module string) *TemplateConfig

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL