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

Cleaning up extra return in federation generated code #1713

Merged
merged 1 commit into from
Nov 13, 2021

Conversation

MiguelCastillo
Copy link
Collaborator

In PR 1709, I introduced GetMany semantics for resolving federated entities. But I left a couple of extra return statements in the generated code that are not necessary. So Im just cleaning those up here.

Also added go:generate in federation entity resolver tests to make it simpler to test.

To test:

go generate ./... && cd example/ && go generate ./... && cd ..
go test -race ./... && cd example && go test -race ./... && cd ..

Describe your PR and link to any relevant issues.

I have:

  • Added tests covering the bug / feature (see testing)
  • Updated any relevant documentation (see docs)

In PR 1709, I introduced GetMany semantics for resolving federated entities.  But I left a couple of extra return statements in the generated code that are not necessary. So Im just cleaning those up here.

Also added `go:generate` in federation entity resolver tests to make it simpler to test.

To test:
```
go generate ./... && cd example/ && go generate ./... && cd ..
go test -race ./... && cd example && go test -race ./... && cd ..
```
@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 67.398% when pulling afc01cc on Khan:cleanup-federation-generated into 237a7e6 on 99designs:master.

{{ end }}
{{- end }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forget what this does again?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For removing new lines. Formatting of the generated code.

Copy link
Collaborator

@StevenACoffman StevenACoffman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@StevenACoffman StevenACoffman merged commit af33b7c into 99designs:master Nov 13, 2021
@StevenACoffman StevenACoffman deleted the cleanup-federation-generated branch November 13, 2021 18:19
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.

None yet

3 participants