10666: Formatting fixes.
authorLucas Di Pentima <ldipentima@veritasgenetics.com>
Fri, 1 Dec 2017 16:18:52 +0000 (13:18 -0300)
committerLucas Di Pentima <ldipentima@veritasgenetics.com>
Fri, 1 Dec 2017 16:18:52 +0000 (13:18 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>

services/arv-git-httpd/main.go
services/crunch-dispatch-local/crunch-dispatch-local.go
services/crunch-dispatch-slurm/crunch-dispatch-slurm.go
services/crunch-run/crunchrun.go
services/crunchstat/crunchstat.go
services/health/main.go
services/keep-balance/main.go
services/keep-web/main.go
services/keepproxy/keepproxy.go
services/keepstore/keepstore.go
services/ws/main.go

index 76aacc4e9d5d4c9b7515705720c8d5dc7469f7c3..74ac7ae55eea05aa396f9ff337a8dbed74505079 100644 (file)
@@ -63,8 +63,8 @@ func main() {
 
        // Print version information if requested
        if *getVersion {
-               fmt.Printf("Version: %s\n", version)
-               os.Exit(0)
+               fmt.Printf("arv-git-httpd %s\n", version)
+               return
        }
 
        err := config.LoadFile(theConfig, *cfgPath)
@@ -94,7 +94,7 @@ func main() {
        if _, err := daemon.SdNotify(false, "READY=1"); err != nil {
                log.Printf("Error notifying init daemon: %v", err)
        }
-       log.Printf("arv-git-httpd %q started", version)
+       log.Printf("arv-git-httpd %s started", version)
        log.Println("Listening at", srv.Addr)
        log.Println("Repository root", theConfig.RepoRoot)
        if err := srv.Wait(); err != nil {
index 1529c4fbab20b98b08ac738b61f889a33ddf26fd..279327ba18811ba8ad6339600cc124460f2fc35c 100644 (file)
@@ -62,11 +62,11 @@ func doMain() error {
 
        // Print version information if requested
        if *getVersion {
-               fmt.Printf("Version: %s\n", version)
-               os.Exit(0)
+               fmt.Printf("crunch-dispatch-local %s\n", version)
+               return nil
        }
 
-       log.Printf("crunch-dispatch-local %q started", version)
+       log.Printf("crunch-dispatch-local %s started", version)
 
        runningCmds = make(map[string]*exec.Cmd)
 
index 5eeb32e62fd071326661da8b0c365d85799dccbd..d322b0f3f6dcf53735df8e920f07d0329397bbbf 100644 (file)
@@ -80,11 +80,11 @@ func doMain() error {
 
        // Print version information if requested
        if *getVersion {
-               fmt.Printf("Version: %s\n", version)
-               os.Exit(0)
+               fmt.Printf("crunch-dispatch-slurm %s\n", version)
+               return nil
        }
 
-       log.Printf("crunch-dispatch-slurm %q started", version)
+       log.Printf("crunch-dispatch-slurm %s started", version)
 
        err := readConfig(&theConfig, *configPath)
        if err != nil {
index a957874f91504215b875a3e352e5c57d5d5c56b1..02ac872a6f958e45e68284c567f4b9094e32961b 100644 (file)
@@ -1601,11 +1601,11 @@ func main() {
 
        // Print version information if requested
        if *getVersion {
-               fmt.Printf("Version: %s\n", version)
-               os.Exit(0)
+               fmt.Printf("crunch-run %s\n", version)
+               return
        }
 
-       log.Printf("crunch-run %q started", version)
+       log.Printf("crunch-run %s started", version)
 
        containerId := flag.Arg(0)
 
index 248ec6259db11a94c68b4c602169f107ab531c27..ad433bb3b532fea36610e975a14b6ca750f5b353 100644 (file)
@@ -44,11 +44,11 @@ func main() {
 
        // Print version information if requested
        if *getVersion {
-               fmt.Printf("Version: %s\n", version)
-               os.Exit(0)
+               fmt.Printf("crunchstat %s\n", version)
+               return
        }
 
-       reporter.Logger.Printf("crunchstat %q started", version)
+       reporter.Logger.Printf("crunchstat %s started", version)
 
        if reporter.CgroupRoot == "" {
                reporter.Logger.Fatal("error: must provide -cgroup-root")
index 4b553659ed4c467b9f87c7713237789e6fb3046c..496fb884d433a5eea350d27818d5e72629e9242f 100644 (file)
@@ -4,7 +4,6 @@ import (
        "flag"
        "fmt"
        "net/http"
-       "os"
 
        "git.curoverse.com/arvados.git/sdk/go/arvados"
        "git.curoverse.com/arvados.git/sdk/go/health"
@@ -21,14 +20,14 @@ func main() {
 
        // Print version information if requested
        if *getVersion {
-               fmt.Printf("Version: %s\n", version)
-               os.Exit(0)
+               fmt.Printf("arvados-health %s\n", version)
+               return
        }
 
        log.SetFormatter(&log.JSONFormatter{
                TimestampFormat: "2006-01-02T15:04:05.000000000Z07:00",
        })
-       log.Printf("arvados health %q started", version)
+       log.Printf("arvados-health %s started", version)
 
        cfg, err := arvados.GetConfig(*configFile)
        if err != nil {
index ecc3f2696f6ab2ef29b4ece9d3071dd75c91389b..947033564df01e479d05682617fc041417e5d54f 100644 (file)
@@ -94,8 +94,8 @@ func main() {
 
        // Print version information if requested
        if *getVersion {
-               fmt.Printf("Version: %s\n", version)
-               os.Exit(0)
+               fmt.Printf("keep-balance %s\n", version)
+               return
        }
 
        mustReadConfig(&cfg, *configPath)
@@ -107,7 +107,7 @@ func main() {
                log.Fatal(config.DumpAndExit(cfg))
        }
 
-       log.Printf("keep-balance %q started", version)
+       log.Printf("keep-balance %s started", version)
 
        if *debugFlag {
                debugf = log.Printf
index 938377b5256e4b5dfad6ba6f333e527b5dd10873..724af27c7e0e746b44218f5269d23b71228e6655 100644 (file)
@@ -94,8 +94,8 @@ func main() {
 
        // Print version information if requested
        if *getVersion {
-               fmt.Printf("Version: %s\n", version)
-               os.Exit(0)
+               fmt.Printf("keep-web %s\n", version)
+               return
        }
 
        if err := config.LoadFile(cfg, configPath); err != nil {
@@ -115,7 +115,7 @@ func main() {
                log.Fatal(config.DumpAndExit(cfg))
        }
 
-       log.Printf("keep-web %q started", version)
+       log.Printf("keep-web %s started", version)
 
        os.Setenv("ARVADOS_API_HOST", cfg.Client.APIHost)
        srv := &server{Config: cfg}
index 59eec0bb04a3e67842334cbd429a006ba178f80d..23a22a86a328847d772daea8e44af90ef316f375 100644 (file)
@@ -81,8 +81,8 @@ func main() {
 
        // Print version information if requested
        if *getVersion {
-               fmt.Printf("Version: %s\n", version)
-               os.Exit(0)
+               fmt.Printf("keepproxy %s\n", version)
+               return
        }
 
        err := config.LoadFile(cfg, cfgPath)
@@ -108,7 +108,7 @@ func main() {
                log.Fatal(config.DumpAndExit(cfg))
        }
 
-       log.Printf("keepproxy %q started", version)
+       log.Printf("keepproxy %s started", version)
 
        arv, err := arvadosclient.New(&cfg.Client)
        if err != nil {
index 06a26984d002ad3cbe9372cdaaad2a651b998990..f3d30d9831a10c5aaf2f4c5d997e66c3577bb39f 100644 (file)
@@ -105,8 +105,8 @@ func main() {
 
        // Print version information if requested
        if *getVersion {
-               fmt.Printf("Version: %s\n", version)
-               os.Exit(0)
+               fmt.Printf("keepstore %s\n", version)
+               return
        }
 
        deprecated.afterFlagParse(theConfig)
@@ -120,7 +120,7 @@ func main() {
                log.Fatal(config.DumpAndExit(theConfig))
        }
 
-       log.Printf("keepstore %q started", version)
+       log.Printf("keepstore %s started", version)
 
        err = theConfig.Start()
        if err != nil {
index df462eafc2859e6d8aa071dbe851737cf3be2037..a0006a4f8a8e0e70e7488f6ce4dee4ac4359984c 100644 (file)
@@ -7,7 +7,6 @@ package main
 import (
        "flag"
        "fmt"
-       "os"
 
        "git.curoverse.com/arvados.git/sdk/go/config"
        "git.curoverse.com/arvados.git/sdk/go/ctxlog"
@@ -27,8 +26,8 @@ func main() {
 
        // Print version information if requested
        if *getVersion {
-               fmt.Printf("Version: %s\n", version)
-               os.Exit(0)
+               fmt.Printf("arvados-ws %s\n", version)
+               return
        }
 
        err := config.LoadFile(&cfg, *configPath)
@@ -48,9 +47,7 @@ func main() {
                return
        }
 
-       log.Printf("arvados-ws %q started", version)
-
-       log.Info("started")
+       log.Printf("arvados-ws %s started", version)
        srv := &server{wsConfig: &cfg}
        log.Fatal(srv.Run())
 }