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

Add sortable ServiceMethods for template use with requisite unit tests #534

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ericlugo
Copy link

@ericlugo ericlugo commented May 9, 2024

What is Changing?

Functionally nothing changes to existing setups. The changes I've implemented are meant to be entirely optional and access is provided through a function that can be called within the .tmpl files. Currently the Order Guarantee provides alphabetical access for a majority of the information available in a proto file but Service Methods can only be accessed in file-order. Service Methods can now optionally be fed through the SortServiceMethods function to get back an alphabetical listing.

How is it Changing?

No unorthodox implementation details were had to my knowledge. I wanted to provide the usage without modifying the default implementation so it was added as a function call. Beyond that, the needed parts are modeled after what is already there for Messages, Enums, etc...

What Could Go Wrong?

This is being tested through use in a personal project as well the added unit test in template_test.go In my opinion, there is no available risk in adding this as the default usage remains untouched and this simply adds some extra functionality which mirrors existing items.

@ericlugo
Copy link
Author

ping for potential PR
@estan @masterzen @glasser @sunfmin

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.

1 participant