Skip to content

Commit

Permalink
[cgogen] refs simelo#17 Rename var in getCallbackCode()
Browse files Browse the repository at this point in the history
  • Loading branch information
Maykel Arias Torres committed Jan 25, 2020
1 parent 74ea473 commit 15959c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cmd/cgogen.go
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,7 @@ var packageSeparator = "__"

func getCallbackCode() []jen.Code {

varfunction := jen.Func().Params(
varFunction := jen.Func().Params(
jen.Id("pTx").Id("*coin.Transaction"),
).Uint64().Error().Block(
jen.Var().Id("fee").Id("C.GoUint64_"),
Expand All @@ -1326,7 +1326,7 @@ func getCallbackCode() []jen.Code {
),
)

varname := jen.Id("feeCalc").Op(":=").Add(varfunction)
varName := jen.Id("feeCalc").Op(":=").Add(varFunction)

//feeCalc := func(pTx *coin.Transaction) (uint64, error) {
// var fee C.GoUint64_
Expand All @@ -1339,5 +1339,5 @@ func getCallbackCode() []jen.Code {
// return 0, errors.New("Error calculating fee")
// }
//}
return jenCodeToArray(varname)
return jenCodeToArray(varName)
}

0 comments on commit 15959c2

Please sign in to comment.