utils

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ShortVersion = "v1.2.3"
View Source
const Version = "v1.2.3 Victory Knight"

Variables

This section is empty.

Functions

func AddPackageToMainGo added in v1.2.2

func AddPackageToMainGo(projectName, mainPath, packageName string)

func AssertNotEmpty

func AssertNotEmpty(name string, value any)

func CheckModified added in v1.2.2

func CheckModified() bool

func ExecBuild added in v1.2.2

func ExecBuild(config *Config) (*exec.Cmd, error)

func ExecRun added in v1.2.2

func ExecRun(config *Config) *exec.Cmd

func GetApplicationYml

func GetApplicationYml(customConfig bool) string

func GetBanner

func GetBanner() string

func GetCreateDoneMessage added in v1.2.2

func GetCreateDoneMessage(projectName string) string

func GetDemoControllerGo

func GetDemoControllerGo(projectName string, packageName string) string

func GetDemoInitGo added in v1.2.2

func GetDemoInitGo(projectName string, packageName string) string

func GetDemoModelGo

func GetDemoModelGo(projectName string, packageName string) string

func GetGSJson added in v1.2.2

func GetGSJson(projectName string, customConfig bool) string

func GetGitIgnore

func GetGitIgnore() string

func GetGoMod

func GetGoMod(projectName string) string

func GetMainGo

func GetMainGo(projectName string, customConfig bool) string

func GetPath

func GetPath(paths ...string) string

func GetUtilsConfigGo

func GetUtilsConfigGo(projectName string) string

func Input

func Input(hint string) string

func IsWindows

func IsWindows() bool

func Mkdir

func Mkdir(path string)

func PrintE added in v1.2.2

func PrintE(err error)

func Read added in v1.2.2

func Read(path string) string

func Save

func Save(path string, data string)

func ThrowE

func ThrowE(err error)

func ThrowS

func ThrowS(msg string, args ...any)

func WaitExecBuild added in v1.2.2

func WaitExecBuild(config *Config) error

func WaitExecRun added in v1.2.2

func WaitExecRun(config *Config)

func WaitKillProcess added in v1.2.2

func WaitKillProcess(command *exec.Cmd)

Types

type AppConfig added in v1.2.2

type AppConfig struct {
	Name         string `json:"name"`
	Version      string `json:"version"`
	CustomConfig bool   `json:"custom-config"`
	Main         string `json:"main"`
	Target       string `json:"target"`
}

type Config added in v1.2.2

type Config struct {
	GsVersion string    `json:"gs-version"`
	App       AppConfig `json:"app"`
}

func ReadConfig added in v1.2.2

func ReadConfig(path string) Config

Jump to

Keyboard shortcuts

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