Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Magic Numbers => HTTP Status Codes #1802

Merged
merged 6 commits into from
Oct 17, 2019

Conversation

laynemcnish
Copy link
Contributor

Hello!

Long time listener, first time caller.

I noticed when generating a new Buffalo project that it was using magic numbers (200, 422, 500, etc) instead of using the default status codes from "net/http". I went ahead and replaced all of the magic numbers with their corresponding status codes and all the tests are passing.

I also snuck in a typo fix for your README. I can see the irony of fixing that particular sentence while also ignoring its advice and not opening an issue first.

Let me know if you'd like any other information or have any changes you'd like to see and I'd be happy to respond.

Thanks!

@laynemcnish laynemcnish requested a review from a team as a code owner October 10, 2019 17:21
Copy link
Member

@stanislas-m stanislas-m left a comment

Choose a reason for hiding this comment

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

Hi @laynemcnish, thanks for this PR!

It seems the tests are failing because you changed some templates without running packr2, so the tests still use the old version. Can you install packr2 (https://github.com/gobuffalo/packr/tree/master/v2) if you haven't already, run it, then push the updated packr2 boxes?

Thanks!

@laynemcnish
Copy link
Contributor Author

@stanislas-m I ran packr2, committed the changes and go test ./... is successful for me locally.

@markbates markbates added this to the v0.15.0 milestone Oct 17, 2019
@markbates markbates merged commit 0855886 into gobuffalo:development Oct 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants