Skip to content
This repository was archived by the owner on Aug 2, 2021. It is now read-only.

Commit 1db1241

Browse files
committed
cmd/swarm,pss,swap: fixed linter errors S1038/S1039
1 parent 0e36987 commit 1db1241

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

cmd/swarm/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ var tomlSettings = toml.Config{
104104
MissingField: func(rt reflect.Type, field string) error {
105105
link := ""
106106
if unicode.IsUpper(rune(rt.Name()[0])) && rt.PkgPath() != "main" {
107-
link = fmt.Sprintf(", check github.com/ethersphere/swarm/api/config.go for available fields")
107+
link = ", check github.com/ethersphere/swarm/api/config.go for available fields"
108108
}
109109
return fmt.Errorf("field '%s' is not defined in %s%s", field, rt.String(), link)
110110
},

cmd/swarm/download.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func download(ctx *cli.Context) {
4646
case 0:
4747
utils.Fatalf("Usage: swarm down [options] <bzz locator> [<destination path>]")
4848
case 1:
49-
log.Trace(fmt.Sprintf("swarm down: no destination path - assuming working dir"))
49+
log.Trace("swarm down: no destination path - assuming working dir")
5050
default:
5151
log.Trace(fmt.Sprintf("destination path arg: %s", args[1]))
5252
if absDest, err := filepath.Abs(args[1]); err == nil {

cmd/swarm/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@ func keys(ctx *cli.Context) error {
283283
bzzkey := crypto.Keccak256Hash(pubkey).Hex()
284284

285285
if !ctx.Bool(SwarmCompressedFlag.Name) {
286-
fmt.Println(fmt.Sprintf("bzzkey=%s", bzzkey[2:]))
287-
fmt.Println(fmt.Sprintf("publicKey=%s", pubkeyhex))
286+
fmt.Print(fmt.Sprintf("bzzkey=%s", bzzkey[2:]), "\n")
287+
fmt.Print(fmt.Sprintf("publicKey=%s", pubkeyhex), "\n")
288288
}
289289
fmt.Println(fmt.Sprintf("publicKeyCompressed=%s", pubCompressed))
290290

cmd/swarm/upload_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func testDefault(t *testing.T, cluster *testCluster, toEncrypt bool) {
100100
tmpFileName}
101101
}
102102
// upload the file with 'swarm up' and expect a hash
103-
log.Info(fmt.Sprintf("uploading file with 'swarm up'"))
103+
log.Info("uploading file with 'swarm up'")
104104
up := runSwarm(t, flags...)
105105
_, matches := up.ExpectRegexp(hashRegexp)
106106
up.ExpectExit()

pss/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func (pssapi *API) Receive(ctx context.Context, topic message.Topic, raw bool, p
8484
case err := <-psssub.Err():
8585
log.Warn(fmt.Sprintf("caught subscription error in pss sub topic %x: %v", topic, err))
8686
case <-notifier.Closed():
87-
log.Warn(fmt.Sprintf("rpc sub notifier closed"))
87+
log.Warn("rpc sub notifier closed")
8888
}
8989
}()
9090

swap/swap.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ func (s *Swap) promptDepositAmount() (*big.Int, error) {
614614
}
615615
// log available balance and ERC20 balance
616616
s.logger.Info(InitAction, "Balance information", "chequebook available balance", availableBalance, "ERC20 balance", balance)
617-
promptMessage := fmt.Sprintf("Please provide the amount in HONEY which will deposited to your chequebook (0 for skipping deposit): ")
617+
promptMessage := "Please provide the amount in HONEY which will deposited to your chequebook (0 for skipping deposit): "
618618
// need to prompt user for deposit amount
619619
prompter := console.Stdin
620620
// ask user for input

0 commit comments

Comments
 (0)