[ARVADOS] updated: 1.3.0-3188-g5b50385a8

Git user git at public.arvados.org
Mon Sep 21 02:17:03 UTC 2020


Summary of changes:
 sdk/go/auth/salt.go                | 3 +--
 services/keepstore/pull_worker.go  | 7 +++----
 services/keepstore/s3aws_volume.go | 7 +++----
 3 files changed, 7 insertions(+), 10 deletions(-)

       via  5b50385a801d8ff94136a3ad4bd8ab5c56175046 (commit)
      from  02f779feef0138420f8d7dc908eba040bc2dd904 (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 5b50385a801d8ff94136a3ad4bd8ab5c56175046
Author: Ward Vandewege <ward at curii.com>
Date:   Sun Sep 20 22:16:52 2020 -0400

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

diff --git a/sdk/go/auth/salt.go b/sdk/go/auth/salt.go
index 667a30f5e..214021598 100644
--- a/sdk/go/auth/salt.go
+++ b/sdk/go/auth/salt.go
@@ -26,9 +26,8 @@ func SaltToken(token, remote string) (string, error) {
 	if len(parts) < 3 || parts[0] != "v2" {
 		if reObsoleteToken.MatchString(token) {
 			return "", ErrObsoleteToken
-		} else {
-			return "", ErrTokenFormat
 		}
+		return "", ErrTokenFormat
 	}
 	uuid := parts[1]
 	secret := parts[2]
diff --git a/services/keepstore/pull_worker.go b/services/keepstore/pull_worker.go
index b4ccd9828..670fa1a41 100644
--- a/services/keepstore/pull_worker.go
+++ b/services/keepstore/pull_worker.go
@@ -80,7 +80,7 @@ func (h *handler) pullItemAndProcess(pullRequest PullRequest) error {
 	return writePulledBlock(h.volmgr, vol, readContent, pullRequest.Locator)
 }
 
-// Fetch the content for the given locator using keepclient.
+// GetContent fetches the content for the given locator using keepclient.
 var GetContent = func(signedLocator string, keepClient *keepclient.KeepClient) (io.ReadCloser, int64, string, error) {
 	return keepClient.Get(signedLocator)
 }
@@ -88,8 +88,7 @@ var GetContent = func(signedLocator string, keepClient *keepclient.KeepClient) (
 var writePulledBlock = func(volmgr *RRVolumeManager, volume Volume, data []byte, locator string) error {
 	if volume != nil {
 		return volume.Put(context.Background(), locator, data)
-	} else {
-		_, err := PutBlock(context.Background(), volmgr, data, locator)
-		return err
 	}
+	_, err := PutBlock(context.Background(), volmgr, data, locator)
+	return err
 }
diff --git a/services/keepstore/s3aws_volume.go b/services/keepstore/s3aws_volume.go
index d07d23c3c..8d999e747 100644
--- a/services/keepstore/s3aws_volume.go
+++ b/services/keepstore/s3aws_volume.go
@@ -33,7 +33,7 @@ import (
 	"github.com/sirupsen/logrus"
 )
 
-// S3Volume implements Volume using an S3 bucket.
+// S3AWSVolume implements Volume using an S3 bucket.
 type S3AWSVolume struct {
 	arvados.S3VolumeDriverParameters
 	AuthToken      string    // populated automatically when IAMRole is used
@@ -69,10 +69,9 @@ func chooseS3VolumeDriver(cluster *arvados.Cluster, volume arvados.Volume, logge
 	if v.UseAWSS3v2Driver {
 		logger.Debugln("Using AWS S3 v2 driver")
 		return newS3AWSVolume(cluster, volume, logger, metrics)
-	} else {
-		logger.Debugln("Using goamz S3 driver")
-		return newS3Volume(cluster, volume, logger, metrics)
 	}
+	logger.Debugln("Using goamz S3 driver")
+	return newS3Volume(cluster, volume, logger, metrics)
 }
 
 const (

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list