hic003cih / Golang

0 stars 0 forks source link

在同一個package下,卻顯示undefined #52

Open hic003cih opened 3 years ago

hic003cih commented 3 years ago

.\app.go:45:11: undefined: newModel .\app.go:56:33: undefined: newController

因為你執行 go run app.go ,他只會執行那個檔案,其他檔案不會執行

要執行 go run . 去執行全部

image

網站