Apply a few gofmt -s fixes.
authorWard Vandewege <wvandewege@veritasgenetics.com>
Wed, 6 Sep 2017 14:49:51 +0000 (10:49 -0400)
committerWard Vandewege <wvandewege@veritasgenetics.com>
Wed, 6 Sep 2017 14:49:51 +0000 (10:49 -0400)
No issue #

Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <wvandewege@veritasgenetics.com>

sdk/go/manifest/manifest.go
services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go
services/crunch-run/crunchrun.go
services/crunchstat/crunchstat.go
services/ws/event_source.go

index 468dbe5eea16486b704b809107aff3fde945499f..a517c064fb475e2102943a9b4b1b0356b6447d92 100644 (file)
@@ -352,7 +352,7 @@ func (m *Manifest) segment() (*segmentedManifest, error) {
 
 func (stream segmentedStream) normalizedText(name string) string {
        var sortedfiles []string
-       for k, _ := range stream {
+       for k := range stream {
                sortedfiles = append(sortedfiles, k)
        }
        sort.Strings(sortedfiles)
@@ -446,7 +446,7 @@ func (m segmentedManifest) manifestTextForPath(srcpath, relocate string) string
        }
 
        var sortedstreams []string
-       for k, _ := range m {
+       for k := range m {
                sortedstreams = append(sortedstreams, k)
        }
        sort.Strings(sortedstreams)
index 5ab0e4fcb3092aa74743f58bdec05bc104359eb1..5879f84d8385ece8176f3e0b14c1a68a159c0c87 100644 (file)
@@ -159,8 +159,8 @@ func (s *TestSuite) TestSbatchFail(c *C) {
 
        var ll arvados.LogList
        err = arv.List("logs", arvadosclient.Dict{"filters": [][]string{
-               []string{"object_uuid", "=", container.UUID},
-               []string{"event_type", "=", "dispatch"},
+               {"object_uuid", "=", container.UUID},
+               {"event_type", "=", "dispatch"},
        }}, &ll)
        c.Assert(len(ll.Items), Equals, 1)
 }
index 810955c0da8b2119dd1cec42fda365a782a37896..6ee861b788fed4e5ef2b2969024543fb30b7c0a5 100644 (file)
@@ -345,7 +345,7 @@ func (runner *ContainerRunner) SetupMounts() (err error) {
        needCertMount := true
 
        var binds []string
-       for bind, _ := range runner.Container.Mounts {
+       for bind := range runner.Container.Mounts {
                binds = append(binds, bind)
        }
        sort.Strings(binds)
@@ -592,23 +592,23 @@ func (runner *ContainerRunner) LogNodeInfo() (err error) {
        logger := log.New(w, "node-info", 0)
 
        commands := []infoCommand{
-               infoCommand{
+               {
                        label: "Host Information",
                        cmd:   []string{"uname", "-a"},
                },
-               infoCommand{
+               {
                        label: "CPU Information",
                        cmd:   []string{"cat", "/proc/cpuinfo"},
                },
-               infoCommand{
+               {
                        label: "Memory Information",
                        cmd:   []string{"cat", "/proc/meminfo"},
                },
-               infoCommand{
+               {
                        label: "Disk Space",
                        cmd:   []string{"df", "-m", "/", os.TempDir()},
                },
-               infoCommand{
+               {
                        label: "Disk INodes",
                        cmd:   []string{"df", "-i", "/", os.TempDir()},
                },
index 972b6a7180af21f850d8f1dedb5ccbdf72e87a2b..cd84770e54e637bd9b195362d7dba7f14ff49601 100644 (file)
@@ -117,7 +117,7 @@ func runCommand(argv []string, logger *log.Logger) error {
 
 func sendSignalOnDeadPPID(intvl time.Duration, signum, ppidOrig int, cmd *exec.Cmd, logger *log.Logger) {
        ticker := time.NewTicker(intvl)
-       for _ = range ticker.C {
+       for range ticker.C {
                ppid := os.Getppid()
                if ppid == ppidOrig {
                        continue
index cfb828b2a5d84c6d16407866374e1f4900185f84..9acfca50e4db639c04dda22a7040d2e91a1c1c4c 100644 (file)
@@ -288,7 +288,7 @@ func (sink *pgEventSink) Stop() {
                // Ensure this sink cannot fill up and block the
                // server-side queue (which otherwise could in turn
                // block our mtx.Lock() here)
-               for _ = range sink.channel {
+               for range sink.channel {
                }
        }()
        sink.source.mtx.Lock()