0
package main
import "fmt"

    func main() {
    fmt.Println("hello world")
}

Its my first code, but ended up with this error, I tried many times to resolve issues like this in VSCode.

Build Error:

warning: GOPATH set to GOROOT (C:\Users\Admin\go) has no effect go: cannot find main module, but found .git/config in d:\GO\practise to create a module there, run: go mod init (exit status 1)

James Z
  • 12,209
  • 10
  • 24
  • 44
job
  • 11
  • 1

0 Answers0