4 ms·
Okay, let me try that: $ echo -e 'package main\n\nimport _ "golang.org/x/image/draw"' > main.go $ go run main.go main.go:3:8: no required module pr
by TheDong 3y ago
Okay, let me try that:
$ echo -e 'package main\n\nimport _ "golang.org/x/image/draw"' > main.go
$ go run main.go
main.go:3:8: no required module provides package golang.org/x/image/draw: go.mod file not found in current directory or any parent directory; see 'go help modules'
$ go build main.go
<same error>
go.mod seems pretty required.
With rust, you can also technically just call 'rustc' and never use 'cargo', but just like it's a pain to do that in go, it's a pain to do that in rust.
- silisili 3y agoWith Go at least, just prepend GO111MODULE=off and it works. A bit esoteric, but I like that option, especially when working on an application and its dependencies in parallel at times.