mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2025-07-14 22:10:29 +02:00
Unified handling of printing versions of programs (--version). Setting version to 0.5
This commit is contained in:
@ -28,6 +28,7 @@ func main() {
|
||||
transparent bool
|
||||
cpuProfile string
|
||||
transparentDim float64
|
||||
version bool
|
||||
)
|
||||
|
||||
flag.IntVar(&port, "port", 6379, "port to of mtredisalize server")
|
||||
@ -51,9 +52,14 @@ func main() {
|
||||
&transparentDim, "transparent-dim", common.DefaultTransparentDim*100,
|
||||
"Extra dimming of transparent nodes every depth meter in percent (0-100).")
|
||||
flag.StringVar(&cpuProfile, "cpuprofile", "", "write cpu profile to file")
|
||||
flag.BoolVar(&version, "version", false, "Print version and exit.")
|
||||
|
||||
flag.Parse()
|
||||
|
||||
if version {
|
||||
common.PrintVersionAndExit()
|
||||
}
|
||||
|
||||
if cpuProfile != "" {
|
||||
f, err := os.Create(cpuProfile)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user