I have the problem running file main.go in Intellij.

Main.go and Common.go same package main. I run Main.go in Intellij then consle log display message error: ".\Main.go:9: undefined: showMsg". showMsg is a function of Common.go
This video should show you how to solve the problem. You basically need to use a Run Configuration of type Go Application and use a Package kind not File kind.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With