OSDN Git Service

optimise
authoroysheng <oysheng@bytom.io>
Wed, 23 May 2018 09:23:30 +0000 (17:23 +0800)
committeroysheng <oysheng@bytom.io>
Wed, 23 May 2018 09:23:30 +0000 (17:23 +0800)
api/program.go

index c53ae84..624503a 100644 (file)
@@ -40,7 +40,7 @@ func (a *API) decodeProgram(ctx context.Context, ins struct {
 
        var result string
        for _, inst := range insts {
-               result = result + fmt.Sprintf("%s %s\n", inst.Op, hex.EncodeToString(inst.Data))
+               result += fmt.Sprintf("%s %s\n", inst.Op, hex.EncodeToString(inst.Data))
        }
        return NewSuccessResponse(DecodeProgResp{Instructions: result})
 }