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.
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:
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.