14 ms·
1) Yes, that is messed up, but that's just cause that package isn't following standard idiom 2) Build flags are very useful, on the verge of required, for some
by Vendan 11y ago
1) Yes, that is messed up, but that's just cause that package isn't following standard idiom
2) Build flags are very useful, on the verge of required, for some situations. For instance, code that needs seperate implementations for each os.
3) This is very useful for packages that may be on github, but served through an alternate path. If they import the github version, you are now stuck with github. If you move to self hosted git or something, their existing codebase won't know how to do an update, and will require a rewrite to use the new version.
4) I'll be the first to admit it isn't the greatest, but, it's rendered mostly moot by the fact that you build single binaries. Deal with a slightly annoying import system in exchange for effortless deployments and not having to worry about libraries and such on the servers? Heck yeah!
5) I agree on this one, it should be something more like doing pprof.Register(*ServeMux) in an init in your program.