通常情况下 package main 中只有一个文件 main.go,如果有其他文件存在,那么执行 go run main.go 会报错显示 undefined <functionName>/<variableName>
go run main.go
undefined <functionName>/<variableName>
两种解决方案:
go run *.go