aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/swarm/access.go
diff options
context:
space:
mode:
authorAnton Evangelatov <anton.evangelatov@gmail.com>2018-09-28 20:38:05 +0800
committerAnton Evangelatov <anton.evangelatov@gmail.com>2018-09-28 20:38:05 +0800
commitd5837e84ff963f3bde1a64570eedb959b7ec434b (patch)
tree1b9a5fa6edac35dded0beb996320ffa767e2b8f7 /cmd/swarm/access.go
parent2c110c81ee92290d3e5ce6134a065c8d2abfbb60 (diff)
downloadgo-tangerine-d5837e84ff963f3bde1a64570eedb959b7ec434b.tar
go-tangerine-d5837e84ff963f3bde1a64570eedb959b7ec434b.tar.gz
go-tangerine-d5837e84ff963f3bde1a64570eedb959b7ec434b.tar.bz2
go-tangerine-d5837e84ff963f3bde1a64570eedb959b7ec434b.tar.lz
go-tangerine-d5837e84ff963f3bde1a64570eedb959b7ec434b.tar.xz
go-tangerine-d5837e84ff963f3bde1a64570eedb959b7ec434b.tar.zst
go-tangerine-d5837e84ff963f3bde1a64570eedb959b7ec434b.zip
cmd/swarm: trim new lines from files
Diffstat (limited to 'cmd/swarm/access.go')
-rw-r--r--cmd/swarm/access.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/swarm/access.go b/cmd/swarm/access.go
index 67e852dde..dd2d513c2 100644
--- a/cmd/swarm/access.go
+++ b/cmd/swarm/access.go
@@ -130,7 +130,7 @@ func accessNewACT(ctx *cli.Context) {
if err != nil {
utils.Fatalf("had an error reading the grantee public key list")
}
- pkGrantees = strings.Split(string(bytes), "\n")
+ pkGrantees = strings.Split(strings.Trim(string(bytes), "\n"), "\n")
}
if passGranteesFilename != "" {
@@ -138,7 +138,7 @@ func accessNewACT(ctx *cli.Context) {
if err != nil {
utils.Fatalf("could not read password filename: %v", err)
}
- passGrantees = strings.Split(string(bytes), "\n")
+ passGrantees = strings.Split(strings.Trim(string(bytes), "\n"), "\n")
}
accessKey, ae, actManifest, err = api.DoACT(ctx, privateKey, salt, pkGrantees, passGrantees)
if err != nil {