inkel

Replace Go module with local version

1min.

I was going to write about this, but Pam Selle already did it: Use a Local Version of a Library in Go.

Long story short: just run go mod edit -replace path/to/module=/absolute/local/path and you’re good to go! Now when you compile your Go project it will be using the changes in your local environment and not those published in Go module registry.