-
Notifications
You must be signed in to change notification settings - Fork 0
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
Build tags for smaller binaries that don't need net/http or encoding/json #63
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #63 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 6 +2
Lines 550 612 +62
=========================================
+ Hits 550 612 +62 ☔ View full report in Codecov by Sentry. |
Didn't readily figure out how to get codecov read the coverage*.out but gave up for now - also fortio/workflows#2 (comment) might have to bite the bullet on the token thing as the coverage action keeps silently failing But this is good to go now (I think) and will propagate in fortio/cli (main objective for small binaries) and fortio/scli |
Co-authored-by: ccoVeille <[email protected]>
…o print 1 character as one would most likely expect
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 👍
Co-authored-by: ccoVeille <[email protected]>
… makefile specific/local (GO_BIN) - tweaked the make all target
Discovered through the excellent https://github.com/Zxilly/go-size-analyzer that
even without any logging of http, binaries included vendor/golang.org/x/net/http/httpproxy
it's because of net/http's init and the linker not being smart enough to elide that:
httpproxy.FromEnvironment().ProxyFunc() is called by envProxyFunc
envProxyFunc is called by http.ProxyFromEnvironment (already an exported function)
http.ProxyFromEnvironment is called while setting up http.DefaultTransport, which is an exported package variable
(credit @CarsonHoffman for the analysis)
Also for the records,
lets you see dependencies (which
go mod why
doesn't)