refc: 重构了 nfctl
This commit is contained in:
20
nft/nfctl/internal/opt/opt.go
Normal file
20
nft/nfctl/internal/opt/opt.go
Normal 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 .`"
|
7
nft/nfctl/internal/opt/version.go
Normal file
7
nft/nfctl/internal/opt/version.go
Normal 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"
|
Reference in New Issue
Block a user