Documentation ¶
Index ¶
- func CreateFileWithData(filePath, data string)
- func GetAppName(moduleName string) string
- func GetArgs(prefix string, args []string) []string
- func ListContains(value string, list []string) bool
- func ReadAndCreateFile(source, appName, moduleName string)
- func ReadArgs(prefix string, args []string) string
- func RenderMain(tmpl, fileName, packageName, module_name string)
- func RenderWriteToFile(tmpl string, func_name string, file_name string)
- func RenderWriteToFileModule(tmpl, fileName, resName, module_name, packageName string)
- func UserPrompt(message string) string
- type ArgsResult
- type ArgsStruct
- type TemplateArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFileWithData ¶ added in v0.1.5
func CreateFileWithData(filePath, data string)
CreateFileWithData creates file at given directory with passed data
func GetArgs ¶ added in v0.1.5
GetArgs reads arg from passed args as per the specified name for example `ReadArgs("-c=",[]string{"up","-c='go run main.go'","seed"})“ will return []string{"go", "run", "main.go"}
func ListContains ¶ added in v0.0.5
ListContains check list has given value or not
func ReadAndCreateFile ¶
func ReadAndCreateFile(source, appName, moduleName string)
Will be used in the future
func ReadArgs ¶ added in v0.1.5
ReadArgs reads arg from passed args as per the specified name for example `ReadArgs("-p=",[]string{"up","-p='db/migrations'","seed"})“ will return `db/migrations`
func RenderMain ¶
func RenderMain(tmpl, fileName, packageName, module_name string)
RenderMain creates main.go
func RenderWriteToFile ¶
RenderWriteToFile creates src files
func RenderWriteToFileModule ¶
func RenderWriteToFileModule(tmpl, fileName, resName, module_name, packageName string)
RenderWriteToFileModule creates src module files
func UserPrompt ¶ added in v0.1.5
UserPrompt accepts user input from the cli
Types ¶
type ArgsResult ¶ added in v0.1.5
type ArgsStruct ¶ added in v0.1.5
type ArgsStruct struct { Prefix string Args []string Result ArgsResult }
ArgsResult holds niom start data
func (*ArgsStruct) AppAndArgs ¶ added in v0.1.5
func (a *ArgsStruct) AppAndArgs()
AppAndArgs sets ArgsResult for example `ArgsStruct{Prefix: "-c=",Args : []string{"up","-c='go run main.go'",}“ will set ArgsResult{App: 'go' Args: []string{ "run", "main.go"}}