diff --git a/cmd/config.go b/cmd/config.go index 3b20551..24e95b5 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -1,4 +1,4 @@ -package main +package cmd import ( "io/ioutil" diff --git a/cmd/handler.go b/cmd/handler.go index 1740f23..3b444da 100644 --- a/cmd/handler.go +++ b/cmd/handler.go @@ -1,4 +1,4 @@ -package main +package cmd import ( "log" diff --git a/cmd/main.go b/cmd/main.go index 8edad66..2b0b85d 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -1,4 +1,4 @@ -package main +package cmd import ( "context" @@ -12,7 +12,7 @@ import ( "github.com/vadv/prometheus-exporter-merger/merger" ) -func main() { +func Execute() { var ( configPath = flag.String("config", "config.yaml", "Path to config") diff --git a/main.go b/main.go new file mode 100644 index 0000000..96f16cf --- /dev/null +++ b/main.go @@ -0,0 +1,7 @@ +package main + +import "github.com/vadv/prometheus-exporter-merger/cmd" + +func main() { + cmd.Execute() +}