The command
env GOPATH=$(pwd) GO111MODULE=on go get -v github.com/oklog/ulid/v2/cmd/ulid
returns the error
go: go.mod file not found in current directory or any parent directory. 'go get' is no longer supported outside a module. To build and install a command, use 'go install' with a version, like 'go install example.com/cmd@latest' For more information, see https://golang.org/doc/go-get-install-deprecation or run 'go help get' or 'go help install'.
With go version go1.18.4 linux/amd64 Ubuntu 20.04.4 LTS using the command go install -v github.com/oklog/ulid/v2/cmd/ulid@latest successfully installs ulid
The command
env GOPATH=$(pwd) GO111MODULE=on go get -v github.com/oklog/ulid/v2/cmd/ulid
returns the errorgo: go.mod file not found in current directory or any parent directory. 'go get' is no longer supported outside a module. To build and install a command, use 'go install' with a version, like 'go install example.com/cmd@latest' For more information, see https://golang.org/doc/go-get-install-deprecation or run 'go help get' or 'go help install'.
With
go version go1.18.4 linux/amd64 Ubuntu 20.04.4 LTS
using the commandgo install -v github.com/oklog/ulid/v2/cmd/ulid@latest
successfully installsulid