This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
Could not import "..." with go modules #1953
Closed
Description
I created a go module and installed some deps with:
go mod init github.com/affanshahid/hello-world
go get "github.com/fatih/color"
Wrote the following in main.go
:
package main
import "github.com/fatih/color"
func main() {
color.Cyan("Hello world")
}
When I run go build && ./hello-world
, it runs fine. However when I go into vscode, I get the following:
I'm not sure what I'm doing wrong
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment