Move flags defenition out of config.Configure

This commit is contained in:
DarthSim
2021-05-17 19:40:01 +06:00
parent 29e4188cd3
commit 77642c869c
+6 -3
View File
@@ -132,6 +132,12 @@ var (
BufferPoolCalibrationThreshold int
)
var (
keyPath = flag.String("keypath", "", "path of the file with hex-encoded key")
saltPath = flag.String("saltpath", "", "path of the file with hex-encoded salt")
presetsPath = flag.String("presets", "", "path of the file with presets")
)
func init() {
Reset()
}
@@ -255,9 +261,6 @@ func Reset() {
}
func Configure() error {
keyPath := flag.String("keypath", "", "path of the file with hex-encoded key")
saltPath := flag.String("saltpath", "", "path of the file with hex-encoded salt")
presetsPath := flag.String("presets", "", "path of the file with presets")
flag.Parse()
if port := os.Getenv("PORT"); len(port) > 0 {