Skip to content

Instantly share code, notes, and snippets.

@ef2k
Created January 20, 2019 02:44
Show Gist options
  • Save ef2k/a9091900636172f30564b971b109bfdc to your computer and use it in GitHub Desktop.
Save ef2k/a9091900636172f30564b971b109bfdc to your computer and use it in GitHub Desktop.
Local dist module outside of $GOPATH
In project using module:
`go module init <project name>`
```
// go.mod
module main
require (
github.com/ef2k/paco v0.0.0 // Path used in import path
)
replace github.com/ef2k/paco => ./paco // Replace import path with path to local module.
```
Inside of the module:
`go module init <module name>`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment