-
Notifications
You must be signed in to change notification settings - Fork 29
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
fix staticcheck errors and run gofmt #69
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly fine with these changes, thanks, just a couple small things, mostly deleting commented-out debugging.
_runtime/pushup_support.go
Outdated
@@ -94,7 +94,7 @@ func Respond(w http.ResponseWriter, r *http.Request) error { | |||
case routeNotFound: | |||
return NotFound |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm OK with renaming this ErrNotFound
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm almost certain that build.NotFound
referred to this variable, but I wanted to make sure that I was correct that this usage:
_runtime/cmd/main.go
114: if errors.Is(err, build.ErrNotFound) {
was in fact correct to change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that is correct.
Running staticcheck on _runtime is a bit weird because it's sort of an incomplete templatized package. We should do it, and try to address issues that are not related to integrating it with generated Pushup code, but not block CI on it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
_runtime/pushup_support.go
Outdated
@@ -94,7 +94,7 @@ func Respond(w http.ResponseWriter, r *http.Request) error { | |||
case routeNotFound: | |||
return NotFound |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that is correct.
os.MkTempDirs
instead of the deprecatedioutil.TempDir
301
->http.StatusMovedPermanently
Before:
After:
NotFound
without putting it in front of you firstmain.go
around for future use