diff --git a/cmd/config.go b/cmd/config.go index 2cc5efc..bdf223c 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -15,7 +15,7 @@ import ( ) const ( - Version = `v0.0.3` + Version = `v0.0.4` SLEEP = 5 Usage = `io-exporter [options] Options: diff --git a/cmd/root.go b/cmd/root.go index 17a05e3..7bfbefb 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -18,6 +18,11 @@ func Run() { log.Fatal(err) } + if conf.Showversion { + fmt.Printf("This is io-exporter version %s\n", Version) + os.Exit(0) + } + metrics := NewMetrics(conf) alloc := NewAlloc()