Skip to content

Commit

Permalink
FAB-3180 fix staticcheck errors in peer
Browse files Browse the repository at this point in the history
peer/chaincode/install.go:46:26: printf-style function with
 dynamic first argument and no further arguments should use
 print-style function instead (SA1006)
peer/chaincode/install.go:47:26: printf-style function with
 dynamic first argument and no further arguments should use
 print-style function instead (SA1006)
peer/chaincode/instantiate.go:39:26: printf-style function with
 dynamic first argument and no further arguments should use
 print-style function instead (SA1006)
peer/chaincode/instantiate.go:40:26: printf-style function with
 dynamic first argument and no further arguments should use
print-style function instead (SA1006)
peer/channel/join.go:71:2: this value of spec is never used (SA4006)

Change-Id: I98d1871a554061c4ee4f72609bf5869ab6227d51
Signed-off-by: Christopher Ferris <chrisfer@us.ibm.com>
  • Loading branch information
christo4ferris committed Apr 16, 2017
1 parent 56b6d12 commit 0a3c217
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions peer/chaincode/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ const install_desc = "Package the specified chaincode into a deployment spec and
func installCmd(cf *ChaincodeCmdFactory) *cobra.Command {
chaincodeInstallCmd = &cobra.Command{
Use: "install",
Short: fmt.Sprintf(install_desc),
Long: fmt.Sprintf(install_desc),
Short: fmt.Sprint(install_desc),
Long: fmt.Sprint(install_desc),
ValidArgs: []string{"1"},
RunE: func(cmd *cobra.Command, args []string) error {
var ccpackfile string
Expand Down
4 changes: 2 additions & 2 deletions peer/chaincode/instantiate.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ const instantiate_desc = "Deploy the specified chaincode to the network."
func instantiateCmd(cf *ChaincodeCmdFactory) *cobra.Command {
chaincodeInstantiateCmd = &cobra.Command{
Use: instantiate_cmdname,
Short: fmt.Sprintf(instantiate_desc),
Long: fmt.Sprintf(instantiate_desc),
Short: fmt.Sprint(instantiate_desc),
Long: fmt.Sprint(instantiate_desc),
ValidArgs: []string{"1"},
RunE: func(cmd *cobra.Command, args []string) error {
return chaincodeDeploy(cmd, args, cf)
Expand Down
4 changes: 1 addition & 3 deletions peer/channel/join.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,10 @@ func getJoinCCSpec() (*pb.ChaincodeSpec, error) {
return nil, GBFileNotFoundErr(err.Error())
}

spec := &pb.ChaincodeSpec{}

// Build the spec
input := &pb.ChaincodeInput{Args: [][]byte{[]byte(cscc.JoinChain), gb}}

spec = &pb.ChaincodeSpec{
spec := &pb.ChaincodeSpec{
Type: pb.ChaincodeSpec_Type(pb.ChaincodeSpec_Type_value["GOLANG"]),
ChaincodeId: &pb.ChaincodeID{Name: "cscc"},
Input: input,
Expand Down

0 comments on commit 0a3c217

Please sign in to comment.