On Wednesday, 23 November 2022 at 23:25:51 UTC pat2...@gmail.com wrote: > I've separated my code into separate subdirectories, added a go.mod > ran go mod tidy on each. > > I'm mostly back where I started, which a better source file tree > > I'm trying to test the "treesort" package from the "Donovan and Kernigan" > The Go programing language book. > > When I connect into the treesort subdirectory, you can see the files, but > I get a bad GOROOT error trying to do a "go test ." > > treesort$ ls > go.mod treesort.go treesort_test.go > > > pfarrell@Alien15:~/whome/sandbox/gows/treesort$ cat go.mod > module github.com/pfarrell51/gows/treesort > > go 1.19 > > pfarrell@Alien15:~/whome/sandbox/gows/treesort$ go test . > # github.com/pfarrell51/gows/treesort > > treesort_test.go:11:2: package treesort is not in GOROOT (C:\Program > Files\Go\src\treesort) > FAIL github.com/pfarrell51/gows/treesort [setup failed] > FAIL > > How can I get past this? >
Can you show the first 10 lines of your "treesort.go" and "treesort_test.go" files please? I'm looking for the package lines and the import lines in particular. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/47000957-873d-4124-a09e-1521dc8ae6dfn%40googlegroups.com.