aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorViktor TrĂ³n <viktor.tron@gmail.com>2018-09-29 02:01:43 +0800
committerGitHub <noreply@github.com>2018-09-29 02:01:43 +0800
commit7910dd5179fc70a8bd577f70d573051afcc23aec (patch)
treef665cc9e9c7faae4563d8e85d3f5d9efc3a3bf89 /cmd
parentdcaabfe7f6f38577c11a475b81ab9584ef61a4a5 (diff)
parent0ee44e796a549c7864b0c78a9cec81ac27cb30eb (diff)
downloadgo-tangerine-7910dd5179fc70a8bd577f70d573051afcc23aec.tar
go-tangerine-7910dd5179fc70a8bd577f70d573051afcc23aec.tar.gz
go-tangerine-7910dd5179fc70a8bd577f70d573051afcc23aec.tar.bz2
go-tangerine-7910dd5179fc70a8bd577f70d573051afcc23aec.tar.lz
go-tangerine-7910dd5179fc70a8bd577f70d573051afcc23aec.tar.xz
go-tangerine-7910dd5179fc70a8bd577f70d573051afcc23aec.tar.zst
go-tangerine-7910dd5179fc70a8bd577f70d573051afcc23aec.zip
Merge pull request #17781 from ethersphere/trim_newline
cmd/swarm: trim new lines from files
Diffstat (limited to 'cmd')
-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 {