notnil / chess

chess package for go
MIT License
509 stars 127 forks source link

Is go get the recommended way to import the packge? #87

Closed bngsudheer closed 2 years ago

bngsudheer commented 2 years ago

I did this first to go get the package:

go get -u github.com/notnil/chess

Then I run my start.go script and get this error:

go run -v start.go 

start.go:6:2: no required module provides package github.com/notnil/chess: go.mod file not found in current directory or any parent directory; see 'go help modules'
go version
go version go1.16.2 linux/amd64
notnil commented 2 years ago

Go now uses modules for package dependencies. The typical workflow is:

go mod init github.com/notnil/my-package
go get -u github.com/notnil/chess
touch main.go
// write code with import "github.com/notnil/chess"
go run main.go

https://go.dev/blog/using-go-modules