Browse Source

chore: Addressing some lint errors

Matthias Ladkau 3 years ago
parent
commit
3042fff863
5 changed files with 9 additions and 9 deletions
  1. 1 1
      api/v1/cluster_test.go
  2. 1 1
      cluster/debug.go
  3. 1 1
      console/cmd_base.go
  4. 4 4
      console/console.go
  5. 2 2
      graph/graphmanager_cluster_test.go

+ 1 - 1
api/v1/cluster_test.go

@@ -80,7 +80,7 @@ func TestClusterStorage(t *testing.T) {
 
 	// Insert some data
 
-	st, _, res = sendTestRequest(graphURL+"i41health/n", "POST", []byte(`
+	sendTestRequest(graphURL+"i41health/n", "POST", []byte(`
 [{
 	"key":"3",
 	"kind":"Upload",

+ 1 - 1
cluster/debug.go

@@ -12,7 +12,7 @@ msmap is a map of all know  memory-only memberStorages.
 var msmap = make(map[*DistributedStorage]*memberStorage)
 
 /*
-Clear the current map of known memory-only memberStorages.
+ClearMSMap clears the current map of known memory-only memberStorages.
 */
 func ClearMSMap() {
 	msmap = make(map[*DistributedStorage]*memberStorage)

+ 1 - 1
console/cmd_base.go

@@ -59,7 +59,7 @@ Run executes the command.
 */
 func (c *CmdVer) Run(args []string, capi CommandConsoleAPI) error {
 
-	fmt.Fprintln(capi.Out(), fmt.Sprintf("Connected to: %v", capi.Url()))
+	fmt.Fprintln(capi.Out(), fmt.Sprintf("Connected to: %v", capi.URL()))
 
 	res, err := capi.Req(api.EndpointAbout, "GET", nil)
 

+ 4 - 4
console/console.go

@@ -109,9 +109,9 @@ type CommandConsoleAPI interface {
 	Authenticate(force bool)
 
 	/*
-	   Url returns the current connection URL.
+	   URL returns the current connection URL.
 	*/
-	Url() string
+	URL() string
 
 	/*
 	   Partition returns the current partition.
@@ -217,9 +217,9 @@ type EliasDBConsole struct {
 }
 
 /*
-Url returns the current connected server URL.
+URL returns the current connected server URL.
 */
-func (c *EliasDBConsole) Url() string {
+func (c *EliasDBConsole) URL() string {
 	return c.url
 }
 

+ 2 - 2
graph/graphmanager_cluster_test.go

@@ -133,7 +133,7 @@ func TestClusterWithPhysicalStorage(t *testing.T) {
 		return
 	}
 
-	htree2, err := hash.LoadHTree(sm2, 1)
+	htree2, _ := hash.LoadHTree(sm2, 1)
 	if val, err := htree2.Get([]byte("123")); err != nil || val != "Test2" {
 		t.Error("Unexpected result:", val, err)
 		return
@@ -257,7 +257,7 @@ func TestClusterStorage(t *testing.T) {
 		return
 	}
 
-	htree2, err := hash.LoadHTree(sm2, 1)
+	htree2, _ := hash.LoadHTree(sm2, 1)
 	if val, err := htree2.Get([]byte("123")); err != nil || val != "Test2" {
 		t.Error("Unexpected result:", val, err)
 		return