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

Use Go 1.22 HTTP router in fake API #173

Merged
merged 7 commits into from
Apr 8, 2024

Conversation

okokes-akamai
Copy link
Contributor

@okokes-akamai okokes-akamai commented Feb 8, 2024

General:

The Fake API has long been a pain to manage - the routing mechanism within it is bunch of switch statements nested in yet another layer of switch statements, string.Splits, regexps etc.

I have not refactored the endpoints' implementations, just moved them to the new muxer.


  • Have you removed all sensitive information, including but not limited to access keys and passwords?
  • Have you checked to ensure there aren't other open or closed Pull Requests for the same bug/feature/question?

Pull Request Guidelines:

  1. Does your submission pass tests?
  2. Have you added tests?
  3. Are you addressing a single feature in this PR?
  4. Are your commits atomic, addressing one change per commit?
  5. Are you following the conventions of the language?
  6. Have you saved your large formatting changes for a different PR, so we can focus on your work?
  7. Have you explained your rationale for why this feature is needed?
  8. Have you linked your PR to an open issue

@okokes-akamai okokes-akamai marked this pull request as ready for review April 8, 2024 12:29
Copy link
Contributor

@avestuk avestuk left a comment

Choose a reason for hiding this comment

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

Excellent improvement

cloud/linode/fake_linode_test.go Outdated Show resolved Hide resolved
cloud/linode/fake_linode_test.go Outdated Show resolved Hide resolved
cloud/linode/fake_linode_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@tchinmai7 tchinmai7 left a comment

Choose a reason for hiding this comment

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

Amazing QOL improvement!

@okokes-akamai okokes-akamai merged commit b7ecd57 into linode:main Apr 8, 2024
3 checks passed
@okokes-akamai okokes-akamai deleted the router_122 branch April 8, 2024 16:34
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