10234: Use YAML for example config file.
[arvados.git] / services / arv-git-httpd / usage.go
index dd0ae922b55ce4da7b5c8d924506e99ce310f00c..e35593688fff8b705a3b3477eccedf42f205d69d 100644 (file)
@@ -1,16 +1,17 @@
 package main
 
 import (
-       "encoding/json"
        "flag"
        "fmt"
        "os"
+
+       "github.com/ghodss/yaml"
 )
 
 func usage() {
        c := defaultConfig()
        c.Client.APIHost = "zzzzz.arvadosapi.com:443"
-       exampleConfigFile, err := json.MarshalIndent(c, "    ", "  ")
+       exampleConfigFile, err := yaml.Marshal(c)
        if err != nil {
                panic(err)
        }
@@ -28,7 +29,8 @@ Options:
        flag.PrintDefaults()
        fmt.Fprintf(os.Stderr, `
 Example config file:
-    %s
+
+%s
 
 Client.APIHost:
 
@@ -43,18 +45,18 @@ Client.Insecure:
     True if your Arvados API endpoint uses an unverifiable SSL/TLS
     certificate.
 
-Listen:
-
-    Local port to listen on. Can be "address:port" or ":port", where
-    "address" is a host IP address or name and "port" is a port number
-    or name.
-
 GitCommand:
 
     Path to git or gitolite-shell executable. Each authenticated
     request will execute this program with the single argument
     "http-backend".
 
+Listen:
+
+    Local port to listen on. Can be "address:port" or ":port", where
+    "address" is a host IP address or name and "port" is a port number
+    or name.
+
 RepoRoot:
 
     Path to git repositories.