Преглед изворни кода

Move flags defenition out of config.Configure

DarthSim пре 4 година
родитељ
комит
77642c869c
1 измењених фајлова са 6 додато и 3 уклоњено
  1. 6 3
      config/config.go

+ 6 - 3
config/config.go

@@ -132,6 +132,12 @@ var (
 	BufferPoolCalibrationThreshold int
 	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() {
 func init() {
 	Reset()
 	Reset()
 }
 }
@@ -255,9 +261,6 @@ func Reset() {
 }
 }
 
 
 func Configure() error {
 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()
 	flag.Parse()
 
 
 	if port := os.Getenv("PORT"); len(port) > 0 {
 	if port := os.Getenv("PORT"); len(port) > 0 {