I modified the net package and I want to use the modified version in my application but it keeps using the old code.
This works:
$ go install -a net
It wasn't rebuilding for me either, but the -a forces a rebuild even if the toolchain thinks the specified package is up to date.
In case someone is using Docker:
My changes wasn't having effect because I was editing the package outside the container. Only the code of our project is mapped by a volume inside the container, but not the third party packages.
Once I edited the package code inside the container, I do not even had to run a go install -a ...
like proposed by @elimisteve. It worked just by recompiling the project.