feat: add production build and health tooling
This commit is contained in:
@@ -16,7 +16,10 @@ import (
|
||||
"chfs-ng/internal/storage"
|
||||
)
|
||||
|
||||
var version = "dev"
|
||||
|
||||
func main() {
|
||||
showVersion := flag.Bool("version", false, "print version and exit")
|
||||
file := flag.String("file", "", "configuration file")
|
||||
pathFlag := flag.String("path", "/data", "shared path")
|
||||
port := flag.Int("port", 80, "listen port")
|
||||
@@ -24,6 +27,11 @@ func main() {
|
||||
var rules multiFlag
|
||||
flag.Var(&rules, "rule", "access rule (repeatable)")
|
||||
flag.Parse()
|
||||
if *showVersion {
|
||||
println(version)
|
||||
return
|
||||
}
|
||||
api.Version = version
|
||||
|
||||
cfg := config.Default()
|
||||
if *file != "" {
|
||||
|
||||
Reference in New Issue
Block a user