Hi, I never used GO before and I want to run a script I found on github.
the imports are
“github[DOT]com/golang/leveldb/db”
“github[DOT]com/golang/leveldb/table”
so I
go get github[DOT]com/golang/leveldb/db
which looks fine, but
go run script.go
script.go:11:2: no required module provides package github.com/golang/leveldb/db: go.mod file not found in current directory or any parent directory; see ‘go help modules’
script.go:12:2: no required module provides package github.com/golang/leveldb/table: go.mod file not found in current directory or any parent directory; see ‘go help modules’
and
go list github[DOT]com/golang/leveldb
no required module provides package github[DOT]com/golang/leveldb: go.mod file not found in current directory or any parent directory; see ‘go help modules’
There must be some basic missunderstanding on my side, having wasted about two hours already trying to search this on the web without being able to fix it or understand what I do wrong. So help me please.
PS: I needed to write the [DOT] substitution, because this board cleverly recognizes the imports as being URLs which I as a new user am only allowed to post two of.