2024-07-11 16:37:26 +08:00
|
|
|
# nfctl init script
|
|
|
|
# https://github.com/loveuer/nf/nft/nfctl
|
2024-07-12 11:50:25 +08:00
|
|
|
or
|
|
|
|
# https://gitcode.com/loveuer/nf/nft/nfctl
|
2024-07-11 16:37:26 +08:00
|
|
|
|
|
|
|
# 替换 import
|
|
|
|
!replace content
|
2024-07-12 11:50:25 +08:00
|
|
|
suffix .go
|
2024-07-11 16:37:26 +08:00
|
|
|
ultone => {{.PROJECT_NAME}}
|
|
|
|
EOF
|
|
|
|
|
|
|
|
# 替换 go module name
|
|
|
|
!replace content
|
|
|
|
exact go.mod
|
2024-09-23 11:43:48 +08:00
|
|
|
module ultone => module {{ .MODULE_NAME }}
|
2024-07-11 16:37:26 +08:00
|
|
|
EOF
|
|
|
|
|
2024-07-12 14:08:11 +08:00
|
|
|
# 替换 config name
|
|
|
|
!replace content
|
|
|
|
exact etc/config.json
|
|
|
|
"name": "ult" => "name": "{{.PROJECT_NAME}}"
|
|
|
|
EOF
|
|
|
|
|
2024-07-11 16:37:26 +08:00
|
|
|
# 生成 readme
|
|
|
|
!generate
|
|
|
|
readme.md
|
|
|
|
# {{.PROJECT_NAME}}
|
|
|
|
|
|
|
|
### Run
|
|
|
|
- `go run . --help`
|
|
|
|
- `go run .`
|
|
|
|
|
|
|
|
### Build
|
|
|
|
- `docker build -t {repo:tag} -f Dockerfile .`
|
|
|
|
EOF
|