Browse Source

Fix CLI flags declaration

Brendan Abolivier 6 years ago
parent
commit
8f4a37edb6
Signed by: Brendan Abolivier <contact@brendanabolivier.com> GPG key ID: 8EF1500759F70623
2 changed files with 2 additions and 8 deletions
  1. 1
    4
      src/puller/main.go
  2. 1
    4
      src/pusher/main.go

+ 1
- 4
src/puller/main.go View File

7
 	"grafana"
7
 	"grafana"
8
 )
8
 )
9
 
9
 
10
-var (
11
-	configFile = flag.String("config", "config.yaml", "Path to the configuration file")
12
-)
13
-
14
 func main() {
10
 func main() {
11
+	configFile := flag.String("config", "config.yaml", "Path to the configuration file")
15
 	flag.Parse()
12
 	flag.Parse()
16
 
13
 
17
 	cfg, err := config.Load(*configFile)
14
 	cfg, err := config.Load(*configFile)

+ 1
- 4
src/pusher/main.go View File

15
 	cfg           *config.Config
15
 	cfg           *config.Config
16
 )
16
 )
17
 
17
 
18
-var (
19
-	configFile = flag.String("config", "config.yaml", "Path to the configuration file")
20
-)
21
-
22
 func main() {
18
 func main() {
23
 	var err error
19
 	var err error
24
 
20
 
21
+	configFile := flag.String("config", "config.yaml", "Path to the configuration file")
25
 	flag.Parse()
22
 	flag.Parse()
26
 
23
 
27
 	cfg, err = config.Load(*configFile)
24
 	cfg, err = config.Load(*configFile)