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

Commit

Permalink
cmd/swarm,pss,swap: fixed linter errors S1038/S1039
Browse files Browse the repository at this point in the history
  • Loading branch information
santicomp2014 committed Mar 12, 2020
1 parent 0e36987 commit 1db1241
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/swarm/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ var tomlSettings = toml.Config{
MissingField: func(rt reflect.Type, field string) error {
link := ""
if unicode.IsUpper(rune(rt.Name()[0])) && rt.PkgPath() != "main" {
link = fmt.Sprintf(", check github.com/ethersphere/swarm/api/config.go for available fields")
link = ", check github.com/ethersphere/swarm/api/config.go for available fields"
}
return fmt.Errorf("field '%s' is not defined in %s%s", field, rt.String(), link)
},
Expand Down
2 changes: 1 addition & 1 deletion cmd/swarm/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func download(ctx *cli.Context) {
case 0:
utils.Fatalf("Usage: swarm down [options] <bzz locator> [<destination path>]")
case 1:
log.Trace(fmt.Sprintf("swarm down: no destination path - assuming working dir"))
log.Trace("swarm down: no destination path - assuming working dir")
default:
log.Trace(fmt.Sprintf("destination path arg: %s", args[1]))
if absDest, err := filepath.Abs(args[1]); err == nil {
Expand Down
4 changes: 2 additions & 2 deletions cmd/swarm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@ func keys(ctx *cli.Context) error {
bzzkey := crypto.Keccak256Hash(pubkey).Hex()

if !ctx.Bool(SwarmCompressedFlag.Name) {
fmt.Println(fmt.Sprintf("bzzkey=%s", bzzkey[2:]))
fmt.Println(fmt.Sprintf("publicKey=%s", pubkeyhex))
fmt.Print(fmt.Sprintf("bzzkey=%s", bzzkey[2:]), "\n")
fmt.Print(fmt.Sprintf("publicKey=%s", pubkeyhex), "\n")
}
fmt.Println(fmt.Sprintf("publicKeyCompressed=%s", pubCompressed))

Expand Down
2 changes: 1 addition & 1 deletion cmd/swarm/upload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func testDefault(t *testing.T, cluster *testCluster, toEncrypt bool) {
tmpFileName}
}
// upload the file with 'swarm up' and expect a hash
log.Info(fmt.Sprintf("uploading file with 'swarm up'"))
log.Info("uploading file with 'swarm up'")
up := runSwarm(t, flags...)
_, matches := up.ExpectRegexp(hashRegexp)
up.ExpectExit()
Expand Down
2 changes: 1 addition & 1 deletion pss/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (pssapi *API) Receive(ctx context.Context, topic message.Topic, raw bool, p
case err := <-psssub.Err():
log.Warn(fmt.Sprintf("caught subscription error in pss sub topic %x: %v", topic, err))
case <-notifier.Closed():
log.Warn(fmt.Sprintf("rpc sub notifier closed"))
log.Warn("rpc sub notifier closed")
}
}()

Expand Down
2 changes: 1 addition & 1 deletion swap/swap.go
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ func (s *Swap) promptDepositAmount() (*big.Int, error) {
}
// log available balance and ERC20 balance
s.logger.Info(InitAction, "Balance information", "chequebook available balance", availableBalance, "ERC20 balance", balance)
promptMessage := fmt.Sprintf("Please provide the amount in HONEY which will deposited to your chequebook (0 for skipping deposit): ")
promptMessage := "Please provide the amount in HONEY which will deposited to your chequebook (0 for skipping deposit): "
// need to prompt user for deposit amount
prompter := console.Stdin
// ask user for input
Expand Down

0 comments on commit 1db1241

Please sign in to comment.