refc: 重构了 nfctl

This commit is contained in:
loveuer
2024-12-26 19:40:39 +08:00
parent d8d771aec6
commit ad6b4fe7b6
27 changed files with 504 additions and 831 deletions

View File

@ -0,0 +1,20 @@
package opt
type _new struct {
Template string
DisableInitScript bool
}
type config struct {
Debug bool
DisableUpdate bool
New _new
}
var Cfg = &config{}
var TemplateMap = map[string]string{
"ultone": "https://gitea.loveuer.com/loveuer/ultone.git",
}
const README = "# {{ .project_name }}\n\n### 启动\n- `go run . --help`\n- `go run .`\n\n### 构建\n- `go build -ldflags '-s -w' -o dist/{{ .project_name}}_app .`\n- `docker build -t <image> -f Dockerfile .`"

View File

@ -0,0 +1,7 @@
package opt
const Version = "v24.12.27-r01"
// const VersionURL = "https://github.com/loveuer/nf/nft/nfctl/internal/opt/version.go"
const VersionURL = "https://raw.githubusercontent.com/loveuer/nf/refs/heads/master/nft/nfctl/internal/opt/version.go"