> Given that I have a local pkg, mylib, whose module name is
github.com/me/mylib, how can I create a local Go application that uses
mylib from the local folder it is in rather than actually downloading it
from github
FYI, what I've just shown doesn't download anything from github. It works
ev
> tester.go:8:2: package github/me/mylib is not in GOROOT
That looks like a typo: "github" instead of "github.com"
You definitely don't need a second go.mod, nor do you need any "replace"
statements. The following works (literally "github.com/me/mylib" is fine
too)
-- mylib/go.mod --
module g
In mylib/tester/tester.go:
import (
"fmt
"github.com/me/mylib"
)
On Wednesday, 2 November 2022 at 08:41:24 UTC Mark wrote:
> I have this layout:
> ```
> mylib/
> mylib/go.mod # module github.com/me/mylib
> mylib/mylib.go
> mylib/mylib_test.go
> ```
> All this works fine, with both .go fi