When I try and import “go-sdl2/ttf” I get this error.
Could not import github.com/veandco/go-sdl2/ttf (no required module provides package “github.com/vaendco/go-sdl2/ttf”.
I have already tried go get and go get package.
When I try and import “go-sdl2/ttf” I get this error.
Could not import github.com/veandco/go-sdl2/ttf (no required module provides package “github.com/vaendco/go-sdl2/ttf”.
I have already tried go get and go get package.
Did you go mod init
already? I created a main.go that imports that module, and I was able to find it just fine:
$ go mod tidy
go: finding module for package github.com/veandco/go-sdl2/ttf
go: downloading github.com/veandco/go-sdl2 v0.4.40
go: found github.com/veandco/go-sdl2/ttf in github.com/veandco/go-sdl2 v0.4.40
Thanks for the quick response,
I have already ran go mod init, in this case ‘go mod myradar’
What happens when you go mod tidy
?
What confuses me more is that it works perfectly fine in one of my go files (renderer.go)
but not in other imports
strong text
It looks like the error is with your custom_map module. So it’s not getting to ttf.