Skip to content

Commit

Permalink
Merge pull request #23 from ccxt/small-go-optimization
Browse files Browse the repository at this point in the history
fix(go): avoid unnecessary return
  • Loading branch information
carlosmiei authored Jan 10, 2025
2 parents 0e8c006 + b8ae0fe commit a84f02e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/goTranspiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1052,12 +1052,14 @@ ${this.getIden(identation)}PanicOnError(${returnRandName})`;
${this.getIden(identation)}${returnRandName} := ${rightPart}
${this.getIden(identation)}PanicOnError(${returnRandName})
${this.getIden(identation)}${leadingComment}ch <- ${returnRandName}${trailingComment}
${this.getIden(identation)}return ${returnRandName}`;
${this.getIden(identation)}return nil`;
// ${this.getIden(identation)}return ${returnRandName}`;
}

return `
${this.getIden(identation)}${leadingComment}ch <- ${rightPart}${trailingComment}
${this.getIden(identation)}return ${rightPart}`;
// ${this.getIden(identation)}return ${rightPart}`;
}


Expand Down

0 comments on commit a84f02e

Please sign in to comment.