GoLand创建go文件,运行时产生CreateProcess failed with error 216:错误

刚刚安装了GoLand,尝试着写第一个go程序,但是默认包报错。如下:

GoLand创建go文件,运行时产生CreateProcess failed with error 216:错误 

 

经过探索,发现,go的默认的包名需要为main,修改为main即可。

package main

import "fmt"

func main()  {
	fmt.Println("Hello word")
}

GoLand创建go文件,运行时产生CreateProcess failed with error 216:错误