Skip to content

Commit

Permalink
Reduce staticcheck warnings (S1039)
Browse files Browse the repository at this point in the history
As part of issue hyperledger-labs#50, removed warnings related to:
* S1039: removed unnecessary formatting

Signed-off-by: Alexandros Filios <alexandros.filios@ibm.com>
  • Loading branch information
alexandrosfilios committed Aug 2, 2022
1 parent f7131b6 commit d3b2ee2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 10 deletions.
6 changes: 2 additions & 4 deletions integration/nwo/fsc/fsc.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,7 @@ func (p *Platform) GenerateCoreConfig(peer *node2.Peer) {
Expect(err).NotTo(HaveOccurred())
extensions = append(extensions, string(bs))
} else {
for _, s := range extensionsByPeerID {
extensions = append(extensions, s)
}
extensions = append(extensions, extensionsByPeerID...)
}
}

Expand Down Expand Up @@ -481,7 +479,7 @@ func (p *Platform) FSCNodeRunner(node *node2.Peer, env ...string) *runner2.Runne
commands.NodeStart{NodeID: node.ID()},
"",
fmt.Sprintf("FSCNODE_CFG_PATH=%s", p.NodeDir(node)),
fmt.Sprintf("FSCNODE_PROFILER=true"),
"FSCNODE_PROFILER=true",
)
cmd.Env = append(cmd.Env, env...)

Expand Down
3 changes: 1 addition & 2 deletions integration/nwo/weaver/interopcc.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ SPDX-License-Identifier: Apache-2.0
package weaver

import (
"fmt"
"path/filepath"
"sync"

Expand All @@ -28,7 +27,7 @@ func (p *Platform) InteropChaincodeFile() string {
}

func (p *Platform) interopccSetup(relay *RelayServer, cc *topology.ChannelChaincode) (*topology.ChannelChaincode, error) {
cc.Chaincode.Ctor = fmt.Sprintf(`{"Args":["initLedger","applicationCCID"]}`)
cc.Chaincode.Ctor = `{"Args":["initLedger","applicationCCID"]}`

packageLock.Lock()
defer packageLock.Unlock()
Expand Down
2 changes: 1 addition & 1 deletion platform/fabric/core/generic/msp/x509/deserializer.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ func (i *Deserializer) Info(raw []byte, auditInfo []byte) (string, error) {
}

func (i *Deserializer) String() string {
return fmt.Sprintf("Generic X509 Verifier Deserializer")
return "Generic X509 Verifier Deserializer"
}
3 changes: 1 addition & 2 deletions platform/fabric/core/generic/ordering/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ package ordering
import (
"context"
"crypto/tls"
"fmt"
"io"
"strings"

Expand Down Expand Up @@ -170,7 +169,7 @@ func toError(errs []error) error {
return errs[0]
}

errmsgs := []string{fmt.Sprint("Multiple errors occurred in order broadcast stream: ")}
errmsgs := []string{"Multiple errors occurred in order broadcast stream: "}
for _, err := range errs {
errmsgs = append(errmsgs, err.Error())
}
Expand Down
2 changes: 1 addition & 1 deletion platform/fabric/services/endorser/endorsement.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func (c *collectEndorsementsView) Call(context view.Context) (interface{}, error

tracker.Report(fmt.Sprintf("collectEndorsementsView: collected signature from %s", party))
}
tracker.Report(fmt.Sprintf("collectEndorsementsView done."))
tracker.Report("collectEndorsementsView done.")
return c.tx, nil
}

Expand Down

0 comments on commit d3b2ee2

Please sign in to comment.