[ARVADOS] updated: 2.1.0-468-g43af5f57d
Git user
git at public.arvados.org
Sun Feb 28 22:13:20 UTC 2021
Summary of changes:
lib/boot/cert.go | 8 ++++----
lib/crunchrun/container_gateway.go | 6 ++----
sdk/go/arvados/client.go | 3 +--
3 files changed, 7 insertions(+), 10 deletions(-)
via 43af5f57d2de2cb5657e252c2f327e1213057f67 (commit)
from affd80401d1ce578de5216a5328949d759ab495c (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 43af5f57d2de2cb5657e252c2f327e1213057f67
Author: Ward Vandewege <ward at curii.com>
Date: Sun Feb 28 17:13:03 2021 -0500
Fix a few more golint warnings.
No issue #
Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at curii.com>
diff --git a/lib/boot/cert.go b/lib/boot/cert.go
index b2b8c896c..2b38dab05 100644
--- a/lib/boot/cert.go
+++ b/lib/boot/cert.go
@@ -32,14 +32,14 @@ func (createCertificates) Run(ctx context.Context, fail func(error), super *Supe
} else {
san += fmt.Sprintf(",DNS:%s", super.ListenHost)
}
- if hostname, err := os.Hostname(); err != nil {
+ hostname, err := os.Hostname()
+ if err != nil {
return fmt.Errorf("hostname: %w", err)
- } else {
- san += ",DNS:" + hostname
}
+ san += ",DNS:" + hostname
// Generate root key
- err := super.RunProgram(ctx, super.tempdir, runOptions{}, "openssl", "genrsa", "-out", "rootCA.key", "4096")
+ err = super.RunProgram(ctx, super.tempdir, runOptions{}, "openssl", "genrsa", "-out", "rootCA.key", "4096")
if err != nil {
return err
}
diff --git a/lib/crunchrun/container_gateway.go b/lib/crunchrun/container_gateway.go
index 1116c4bb1..19feac169 100644
--- a/lib/crunchrun/container_gateway.go
+++ b/lib/crunchrun/container_gateway.go
@@ -49,9 +49,8 @@ func (gw *Gateway) Start() error {
PasswordCallback: func(c ssh.ConnMetadata, pass []byte) (*ssh.Permissions, error) {
if c.User() == "_" {
return nil, nil
- } else {
- return nil, fmt.Errorf("cannot specify user %q via ssh client", c.User())
}
+ return nil, fmt.Errorf("cannot specify user %q via ssh client", c.User())
},
PublicKeyCallback: func(c ssh.ConnMetadata, pubKey ssh.PublicKey) (*ssh.Permissions, error) {
if c.User() == "_" {
@@ -60,9 +59,8 @@ func (gw *Gateway) Start() error {
"pubkey-fp": ssh.FingerprintSHA256(pubKey),
},
}, nil
- } else {
- return nil, fmt.Errorf("cannot specify user %q via ssh client", c.User())
}
+ return nil, fmt.Errorf("cannot specify user %q via ssh client", c.User())
},
}
pvt, err := rsa.GenerateKey(rand.Reader, 2048)
diff --git a/sdk/go/arvados/client.go b/sdk/go/arvados/client.go
index ea3cb6899..13bb3bf80 100644
--- a/sdk/go/arvados/client.go
+++ b/sdk/go/arvados/client.go
@@ -321,9 +321,8 @@ func (c *Client) RequestAndDecodeContext(ctx context.Context, dst interface{}, m
if c.APIHost == "" {
if c.loadedFromEnv {
return errors.New("ARVADOS_API_HOST and/or ARVADOS_API_TOKEN environment variables are not set")
- } else {
- return errors.New("arvados.Client cannot perform request: APIHost is not set")
}
+ return errors.New("arvados.Client cannot perform request: APIHost is not set")
}
urlString := c.apiURL(path)
urlValues, err := anythingToValues(params)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list