Closed jacobbednarz closed 6 years ago
Almost there! Thanks for dealing with all the feedback. 👍
PR looks good. Can you rebase/squash into a single commit?
can do!
Should be ready for you now @cactus! Thanks for persisting this one through.
From https://github.com/golang/go/wiki/CompilerOptimizations#function-inlining
Only short and simple functions are inlined. To be inlined a function must contain less than ~40 expressions and does not contain complex things like function calls, loops, labels, closures,
panic
's,recover
's,select
's,switch
'es, etc.
So I don't think the compiler would have inlined that one. Just personal taste I guess 🤷♂️
I manually merged this, along with a few tweaks. Let me know if the tweaks are acceptable (I simplified the server version / sha behavior a bit). Open a new issue for that I guess.
(github seems to be having a few issues today, so maybe that is why this PR wasn't automatically closed when I merged it via git directly?)
Also... Thanks again for the PR! 🎉
awesome, thanks! will you be cutting a release for these changes?
Yeah, I'll cut a release sometime tomorrow (most likely). I'll also likely bump the major version to reflect the slightly breaking changes in the api endpoints.
sounds good! ⭐️
This introduces a couple of changes related to the server name.
The first is that it allows you to override the server name of
go-camo
using a start up flag of--server-name
. The second is that it will now append the git sha of the latest build to the server name if it is defined and this has been great for us to perform some debugging/comparison between versions and be certain we are getting the correct outcomes.Finally, this also updates the root route to return a 404 instead of a 200 with the server name. The thinking here is that as an image proxy, it should 404 unless it finds a resource to proxy (unless explicitly intended).