[ARVADOS] updated: 2.1.0-93-g87ee4948c

Git user git at public.arvados.org
Fri Nov 13 01:03:06 UTC 2020


Summary of changes:
 sdk/go/keepclient/keepclient.go       | 14 +++++++-------
 sdk/go/keepclient/root_sorter_test.go | 14 +++++++-------
 2 files changed, 14 insertions(+), 14 deletions(-)

       via  87ee4948cf07f2e36bffd948caa74c885b9927b1 (commit)
      from  8e60faf420f02d750bbaf7792343a95d2c2674ae (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 87ee4948cf07f2e36bffd948caa74c885b9927b1
Author: Ward Vandewege <ward at curii.com>
Date:   Thu Nov 12 20:02:56 2020 -0500

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

diff --git a/sdk/go/keepclient/keepclient.go b/sdk/go/keepclient/keepclient.go
index d600322e6..ec56e902c 100644
--- a/sdk/go/keepclient/keepclient.go
+++ b/sdk/go/keepclient/keepclient.go
@@ -90,7 +90,7 @@ type HTTPClient interface {
 	Do(*http.Request) (*http.Response, error)
 }
 
-// Information about Arvados and Keep servers.
+// KeepClient holds information about Arvados and Keep servers.
 type KeepClient struct {
 	Arvados            *arvadosclient.ArvadosClient
 	Want_replicas      int
@@ -333,7 +333,7 @@ func (kc *KeepClient) LocalLocator(locator string) (string, error) {
 	return loc, nil
 }
 
-// Get() retrieves a block, given a locator. Returns a reader, the
+// Get retrieves a block, given a locator. Returns a reader, the
 // expected data length, the URL the block is being fetched from, and
 // an error.
 //
@@ -345,13 +345,13 @@ func (kc *KeepClient) Get(locator string) (io.ReadCloser, int64, string, error)
 	return rdr, size, url, err
 }
 
-// ReadAt() retrieves a portion of block from the cache if it's
+// ReadAt retrieves a portion of block from the cache if it's
 // present, otherwise from the network.
 func (kc *KeepClient) ReadAt(locator string, p []byte, off int) (int, error) {
 	return kc.cache().ReadAt(kc, locator, p, off)
 }
 
-// Ask() verifies that a block with the given hash is available and
+// Ask verifies that a block with the given hash is available and
 // readable, according to at least one Keep service. Unlike Get, it
 // does not retrieve the data or verify that the data content matches
 // the hash specified by the locator.
@@ -416,7 +416,7 @@ func (kc *KeepClient) GetIndex(keepServiceUUID, prefix string) (io.Reader, error
 	return bytes.NewReader(respBody[0 : len(respBody)-1]), nil
 }
 
-// LocalRoots() returns the map of local (i.e., disk and proxy) Keep
+// LocalRoots returns the map of local (i.e., disk and proxy) Keep
 // services: uuid -> baseURI.
 func (kc *KeepClient) LocalRoots() map[string]string {
 	kc.discoverServices()
@@ -425,7 +425,7 @@ func (kc *KeepClient) LocalRoots() map[string]string {
 	return kc.localRoots
 }
 
-// GatewayRoots() returns the map of Keep remote gateway services:
+// GatewayRoots returns the map of Keep remote gateway services:
 // uuid -> baseURI.
 func (kc *KeepClient) GatewayRoots() map[string]string {
 	kc.discoverServices()
@@ -434,7 +434,7 @@ func (kc *KeepClient) GatewayRoots() map[string]string {
 	return kc.gatewayRoots
 }
 
-// WritableLocalRoots() returns the map of writable local Keep services:
+// WritableLocalRoots returns the map of writable local Keep services:
 // uuid -> baseURI.
 func (kc *KeepClient) WritableLocalRoots() map[string]string {
 	kc.discoverServices()
diff --git a/sdk/go/keepclient/root_sorter_test.go b/sdk/go/keepclient/root_sorter_test.go
index bd3bb0ba8..a6fbaeded 100644
--- a/sdk/go/keepclient/root_sorter_test.go
+++ b/sdk/go/keepclient/root_sorter_test.go
@@ -19,14 +19,14 @@ func FakeSvcRoot(i uint64) string {
 	return fmt.Sprintf("https://%x.svc/", i)
 }
 
-func FakeSvcUuid(i uint64) string {
+func FakeSvcUUID(i uint64) string {
 	return fmt.Sprintf("zzzzz-bi6l4-%015x", i)
 }
 
 func FakeServiceRoots(n uint64) map[string]string {
 	sr := map[string]string{}
 	for i := uint64(0); i < n; i++ {
-		sr[FakeSvcUuid(i)] = FakeSvcRoot(i)
+		sr[FakeSvcUUID(i)] = FakeSvcRoot(i)
 	}
 	return sr
 }
@@ -45,19 +45,19 @@ func (*RootSorterSuite) ReferenceSet(c *C) {
 	fakeroots := FakeServiceRoots(16)
 	// These reference probe orders are explained further in
 	// ../../python/tests/test_keep_client.py:
-	expected_orders := []string{
+	expectedOrders := []string{
 		"3eab2d5fc9681074",
 		"097dba52e648f1c3",
 		"c5b4e023f8a7d691",
 		"9d81c02e76a3bf54",
 	}
-	for h, expected_order := range expected_orders {
+	for h, expectedOrder := range expectedOrders {
 		hash := Md5String(fmt.Sprintf("%064x", h))
 		roots := NewRootSorter(fakeroots, hash).GetSortedRoots()
-		for i, svc_id_s := range strings.Split(expected_order, "") {
-			svc_id, err := strconv.ParseUint(svc_id_s, 16, 64)
+		for i, svcIDs := range strings.Split(expectedOrder, "") {
+			svcID, err := strconv.ParseUint(svcIDs, 16, 64)
 			c.Assert(err, Equals, nil)
-			c.Check(roots[i], Equals, FakeSvcRoot(svc_id))
+			c.Check(roots[i], Equals, FakeSvcRoot(svcID))
 		}
 	}
 }

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list