Skip to content

Commit 2bccf2e

Browse files
committed
[FAB-14491] stop using Sprintf in Errorf
fmt.Errorf formats a message with args; no need to use fmt.Sprintf inside of that. Change-Id: I6d787607c14432c710fd197acca2c141e02bc2bb Signed-off-by: Matthew Sykes <sykesmat@us.ibm.com>
1 parent fcdc41f commit 2bccf2e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/container/inproccontroller/inproccontroller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,19 +198,19 @@ func (ipc *inprocContainer) launchInProc(id string, args []string, env []string)
198198
func (vm *InprocVM) Start(ccid ccintf.CCID, args []string, env []string, filesToUpload map[string][]byte, builder container.Builder) error {
199199
ipctemplate := vm.registry.getType(ccid)
200200
if ipctemplate == nil {
201-
return fmt.Errorf(fmt.Sprintf("%s not registered", ccid))
201+
return fmt.Errorf("%s not registered", ccid)
202202
}
203203

204204
instName := vm.GetVMName(ccid)
205205

206206
ipc, err := vm.getInstance(ipctemplate, instName, args, env)
207207

208208
if err != nil {
209-
return fmt.Errorf(fmt.Sprintf("could not create instance for %s", instName))
209+
return fmt.Errorf("could not create instance for %s", instName)
210210
}
211211

212212
if ipc.running {
213-
return fmt.Errorf(fmt.Sprintf("chaincode running %s", ccid))
213+
return fmt.Errorf("chaincode running %s", ccid)
214214
}
215215

216216
ipc.running = true

0 commit comments

Comments
 (0)