Remove default storage constant
This commit is contained in:
parent
cf0b2df844
commit
6e7ee680b3
11
config.go
11
config.go
|
@ -4,11 +4,6 @@ import (
|
|||
"flag"
|
||||
)
|
||||
|
||||
const (
|
||||
// With compression: burlesque.kch#opts=c#zcomp=gz#msiz=524288000
|
||||
DefaultProductionStorage = "burlesque.kch#dfunit=8#msiz=512M"
|
||||
)
|
||||
|
||||
var (
|
||||
Config struct {
|
||||
Storage string
|
||||
|
@ -18,12 +13,8 @@ var (
|
|||
)
|
||||
|
||||
func SetupConfig() {
|
||||
flag.StringVar(&Config.Storage, "storage", "-", "Kyoto Cabinet storage path (e.g. "+DefaultProductionStorage+")")
|
||||
flag.StringVar(&Config.Storage, "storage", "-", "Kyoto Cabinet storage path (e.g. burlesque.kch#dfunit=8#msiz=512M)")
|
||||
flag.StringVar(&Config.Env, "environment", "production", "Process environment: production or development")
|
||||
flag.IntVar(&Config.Port, "port", 4401, "Server HTTP port")
|
||||
flag.Parse()
|
||||
|
||||
if Config.Env == "production" && Config.Storage == "-" {
|
||||
Config.Storage = DefaultProductionStorage
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue