Skip to content

Comment on Porting dl.google.com from C++ to Goparent

Comments

Packages in the Go standard library are no different from user packages – they're just included in the Go distribution. If you find the need to modify anything in net/http (to fix a bug, add low-level hooks, etc), just copy it into a subfolder in your project, like so:

cp -R $GOROOT/src/pkg/net/http ./net/http

Then simply change all "net/http" imports to "./net/http". Now you're free to carry out any changes you'd like.

P.S: Just because you can do this doesn't mean you should.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.