.\main.go:3:6: missing function body
.\main.go:4:1: syntax error: unexpected semicolon or newline before {
package main
import "fmt"
func main()
{
fmt.Println("Hello world!")
}
正确写法:
package main
import "fmt"
func main(){
fmt.Println("Hello world!")
}