goLand 運行報錯 # command-line-arguments .\StudentGuanLi.go:8:28: undefined: student

goLand 運行報錯 command-line-arguments .\StudentGuanLi.go:8:28: undefined: student 編譯器沒有報錯,但是運行時就找不到同包裏定義的結構體 main方法運行go文件時默認只執行當前文件,如果本文件中調用了其他文件中的方法,需要在go run 時添加其他類。 goLand添加方法如下 文件就會被添加到這裏 然後再執行就不會報找不
相關文章
相關標籤/搜索