Closed vwbusguy closed 1 year ago
go.mod file not found in current directory or any parent directory; see 'go help modules'
Try running the command from a directory that contains a go.mod
Yeah, that's how I eventually got it to work, after longer than I want to admit it took me to get that far. While I can't expect the NetBox docs to explain the differences between go packaging in 1.19 vs previous versions, it would be nice to at least update the install instructions with the right command and mention the go.mod dependency as go get
is now deprecated.
The readme has been update to clarify the way the library should be installed and used.
In Go 1.19,
go get
has been deprecated forgo install
(Ref. https://go.dev/doc/go-get-install-deprecation), however this module doesn't seem to be compatible with the new go dependency fetcher method.go doesn't fetch
github.com/netbox-community/go-netbox/netbox/client
from theimport (
section given in examples with an error like:And replacing the
go get
withgo install @latest
gives an error that the package does not match:Trying to install a specific part almost works, but then complains that it's not part of a main package:
It's not clear how to install and use this with Go 1.19.