-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(Go): update SlangroomExec to accept a struct as input #10
Conversation
bindings/go/README.md
Outdated
|
||
// Execute Slangroom | ||
result, err := slangroom.SlangroomExec("", contract, "", "", "", "") | ||
result, err := slangroom.SlangroomExec() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should you pass input to the function like SlangroomExec(input)
?
bindings/go/slangroom.go
Outdated
@@ -15,7 +15,16 @@ type SlangResult struct { | |||
Logs string | |||
} | |||
|
|||
func SlangroomExec(conf string, contract string, data string, keys string, extra string, context string) (SlangResult, error) { | |||
type SlangInput struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do prefer to avoid abbreviations, prefer something like SlangroomInput?
bindings/go/slangroom.go
Outdated
Context string | ||
} | ||
|
||
func SlangroomExec(input SlangInput) (SlangResult, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also prefer to refactor this to Exec
... so we can call it as
slangroom.Exec
# [1.2.0](v1.1.2...v1.2.0) (2024-10-17) ### Features * **go:** format struct as input and refactor the Exec function ([#10](#10)) ([4cf243b](4cf243b))
🎉 This PR is included in version 1.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
No description provided.