aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/swarm
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/swarm')
-rw-r--r--cmd/swarm/access.go4
-rw-r--r--cmd/swarm/access_test.go4
-rw-r--r--cmd/swarm/fs.go2
-rw-r--r--cmd/swarm/swarm-smoke/sliding_window.go2
4 files changed, 6 insertions, 6 deletions
diff --git a/cmd/swarm/access.go b/cmd/swarm/access.go
index 072541b65..cc0cc8201 100644
--- a/cmd/swarm/access.go
+++ b/cmd/swarm/access.go
@@ -178,8 +178,8 @@ func accessNewACT(ctx *cli.Context) {
accessKey []byte
err error
ref = args[0]
- pkGrantees = []string{}
- passGrantees = []string{}
+ pkGrantees []string
+ passGrantees []string
pkGranteesFilename = ctx.String(SwarmAccessGrantKeysFlag.Name)
passGranteesFilename = ctx.String(utils.PasswordFileFlag.Name)
privateKey = getPrivKey(ctx)
diff --git a/cmd/swarm/access_test.go b/cmd/swarm/access_test.go
index 967ef2742..0898d33bc 100644
--- a/cmd/swarm/access_test.go
+++ b/cmd/swarm/access_test.go
@@ -397,7 +397,7 @@ func testACT(t *testing.T, bogusEntries int) {
}
ref := matches[0]
- grantees := []string{}
+ var grantees []string
for i, v := range cluster.Nodes {
if i == nodeToSkip {
continue
@@ -408,7 +408,7 @@ func testACT(t *testing.T, bogusEntries int) {
}
if bogusEntries > 0 {
- bogusGrantees := []string{}
+ var bogusGrantees []string
for i := 0; i < bogusEntries; i++ {
prv, err := ecies.GenerateKey(rand.Reader, DefaultCurve, nil)
diff --git a/cmd/swarm/fs.go b/cmd/swarm/fs.go
index edeeddff8..7f156523b 100644
--- a/cmd/swarm/fs.go
+++ b/cmd/swarm/fs.go
@@ -123,7 +123,7 @@ func listMounts(cliContext *cli.Context) {
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
- mf := []fuse.MountInfo{}
+ var mf []fuse.MountInfo
err = client.CallContext(ctx, &mf, "swarmfs_listmounts")
if err != nil {
utils.Fatalf("encountered an error calling the RPC endpoint while listing mounts: %v", err)
diff --git a/cmd/swarm/swarm-smoke/sliding_window.go b/cmd/swarm/swarm-smoke/sliding_window.go
index d313bbc37..750d96939 100644
--- a/cmd/swarm/swarm-smoke/sliding_window.go
+++ b/cmd/swarm/swarm-smoke/sliding_window.go
@@ -56,7 +56,7 @@ func slidingWindowCmd(ctx *cli.Context, tuid string) error {
}
func slidingWindow(ctx *cli.Context, tuid string) error {
- hashes := []uploadResult{} //swarm hashes of the uploads
+ var hashes []uploadResult //swarm hashes of the uploads
nodes := len(hosts)
const iterationTimeout = 30 * time.Second
log.Info("sliding window test started", "tuid", tuid, "nodes", nodes, "filesize(kb)", filesize, "timeout", timeout)