Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wouldn't declaring the "replace" directive in go.mod once take effect for all the dependencies?


Oh that's an interesting question, I've never tried to build a binary with "replace"-ing one of the builtin packages.

Maybe that works? But many of the standard library packages use linker shenanigans, if I recall, like //go:linkname pragmas. Maybe that's an issue, maybe not?

It would be interesting if the fork was unnecessary and it was possible to implement FIPS via package replacements! That would be a lot simpler.


"replace" is an operation on modules. Networking is part of the standard library, which is a single (very special) module. Even if you could "replace" std, it would not really be less than creating a fork.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: