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

[Go] Fix tokens passed to generateComposite (#849) #850

Merged
merged 2 commits into from
May 14, 2021

Conversation

neomantra
Copy link
Contributor

Too many tokens were passed to generateComposite causing weird
errors like(#844 and #849).

Also adds a gofmt fix.

neomantra added 2 commits May 13, 2021 12:02
Too many tokens were passed to `generateComposite` causing weird
errors like(real-logic#844 and real-logic#849).
The `Decode` generator for groups would produce the following code:

```
for i, _ := range o.GroupName {
```

The `gofmt` tools suggest [simplify range expression](https://github.com/golang/tools/blob/master/internal/lsp/analysis/simplifyrange/simplifyrange.go#L23):

```
A range of the form:
    for x, _ = range v {...}
will be simplified to:
    for x = range v {...}
```

This patch fixes that.
@billsegall
Copy link
Contributor

That check failure looks transient?

This looks like a good fix to a clear bug in handling.

And it's always great to get a regression test case with the PR.

@neomantra
Copy link
Contributor Author

Yes, it looks like that one CI job failed with “502 bad gateway”, some network hiccup during setup.

@mjpt777 mjpt777 merged commit 1525313 into real-logic:master May 14, 2021
@neomantra neomantra deleted the nm-849 branch May 16, 2021 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants