[ARVADOS] updated: 1.3.0-3229-gac82dcc51

Git user git at public.arvados.org
Mon Sep 28 02:17:07 UTC 2020


Summary of changes:
 lib/crunchrun/logging.go        |  3 +--
 sdk/go/arvados/fs_base.go       |  3 +--
 sdk/go/arvados/fs_collection.go | 20 +++++++++-----------
 sdk/go/health/handler_test.go   |  3 +--
 sdk/go/httpserver/logger.go     |  3 +--
 5 files changed, 13 insertions(+), 19 deletions(-)

       via  ac82dcc51a03f0ac1e3b6fc8e9e65ab86872ac26 (commit)
      from  72f669602572eeccb7d251df669bcfbe63b137d2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit ac82dcc51a03f0ac1e3b6fc8e9e65ab86872ac26
Author: Ward Vandewege <ward at curii.com>
Date:   Sun Sep 27 22:16:48 2020 -0400

    Fix more golint warnings.
    
    No issue #
    
    Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at curii.com>

diff --git a/lib/crunchrun/logging.go b/lib/crunchrun/logging.go
index d5de184e5..febfb1404 100644
--- a/lib/crunchrun/logging.go
+++ b/lib/crunchrun/logging.go
@@ -368,9 +368,8 @@ func (arvlog *ArvLogWriter) rateLimit(line []byte, now time.Time) (bool, []byte)
 		// instead of the log message that exceeded the limit.
 		message += " A complete log is still being written to Keep, and will be available when the job finishes."
 		return true, []byte(message)
-	} else {
-		return arvlog.logThrottleIsOpen, line
 	}
+	return arvlog.logThrottleIsOpen, line
 }
 
 // load the rate limit discovery config parameters
diff --git a/sdk/go/arvados/fs_base.go b/sdk/go/arvados/fs_base.go
index 5e57fed3b..aa75fee7c 100644
--- a/sdk/go/arvados/fs_base.go
+++ b/sdk/go/arvados/fs_base.go
@@ -598,9 +598,8 @@ func (fs *fileSystem) remove(name string, recursive bool) error {
 func (fs *fileSystem) Sync() error {
 	if syncer, ok := fs.root.(syncer); ok {
 		return syncer.Sync()
-	} else {
-		return ErrInvalidOperation
 	}
+	return ErrInvalidOperation
 }
 
 func (fs *fileSystem) Flush(string, bool) error {
diff --git a/sdk/go/arvados/fs_collection.go b/sdk/go/arvados/fs_collection.go
index 060b57b49..d4429f5d7 100644
--- a/sdk/go/arvados/fs_collection.go
+++ b/sdk/go/arvados/fs_collection.go
@@ -109,16 +109,15 @@ func (fs *collectionFileSystem) newNode(name string, perm os.FileMode, modTime t
 				inodes: make(map[string]inode),
 			},
 		}, nil
-	} else {
-		return &filenode{
-			fs: fs,
-			fileinfo: fileinfo{
-				name:    name,
-				mode:    perm & ^os.ModeDir,
-				modTime: modTime,
-			},
-		}, nil
 	}
+	return &filenode{
+		fs: fs,
+		fileinfo: fileinfo{
+			name:    name,
+			mode:    perm & ^os.ModeDir,
+			modTime: modTime,
+		},
+	}, nil
 }
 
 func (fs *collectionFileSystem) Child(name string, replace func(inode) (inode, error)) (inode, error) {
@@ -802,9 +801,8 @@ func (dn *dirnode) commitBlock(ctx context.Context, refs []fnSegmentRef, bufsize
 	}()
 	if sync {
 		return <-errs
-	} else {
-		return nil
 	}
+	return nil
 }
 
 type flushOpts struct {
diff --git a/sdk/go/health/handler_test.go b/sdk/go/health/handler_test.go
index c9f6a0b67..097e292d3 100644
--- a/sdk/go/health/handler_test.go
+++ b/sdk/go/health/handler_test.go
@@ -81,9 +81,8 @@ func (s *Suite) TestPingOverride(c *check.C) {
 				ok = !ok
 				if ok {
 					return nil
-				} else {
-					return errors.New("good error")
 				}
+				return errors.New("good error")
 			},
 		},
 	}
diff --git a/sdk/go/httpserver/logger.go b/sdk/go/httpserver/logger.go
index 59981e3e5..5336488df 100644
--- a/sdk/go/httpserver/logger.go
+++ b/sdk/go/httpserver/logger.go
@@ -64,9 +64,8 @@ func rewrapResponseWriter(w http.ResponseWriter, wrapped http.ResponseWriter) ht
 			http.ResponseWriter
 			http.Hijacker
 		}{w, hijacker}
-	} else {
-		return w
 	}
+	return w
 }
 
 func Logger(req *http.Request) logrus.FieldLogger {

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list