Skip to content
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

Merged
merged 4 commits into from
Oct 17, 2024

Conversation

FilippoTrotter
Copy link
Collaborator

No description provided.

@FilippoTrotter FilippoTrotter linked an issue Oct 16, 2024 that may be closed by this pull request

// Execute Slangroom
result, err := slangroom.SlangroomExec("", contract, "", "", "", "")
result, err := slangroom.SlangroomExec()
Copy link
Member

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) ?

@@ -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 {
Copy link
Member

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?

Context string
}

func SlangroomExec(input SlangInput) (SlangResult, error) {
Copy link
Member

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

@puria puria merged commit 4cf243b into main Oct 17, 2024
5 checks passed
@puria puria deleted the slangroom-structure branch October 17, 2024 08:55
github-actions bot pushed a commit that referenced this pull request Oct 17, 2024
# [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))
Copy link

🎉 This PR is included in version 1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor SlangroomExec function of go bindings to accept a struct
2 participants