Go run: cannot run non-main package

đây là ứng dụng đơn giản. Tôi nhận được lỗi “go run: cannot run non-main package” error

package zsdfsdf

import (
    "fmt"
)

func Main() {
    fmt.Println("sddddddd")
}

You need to specify in your app.yaml file what your app access point is. Take a look here. You need to specify:

application: zsdfsdf

Also see from that above link:

“Note: When writing a stand-alone Go program we would place this code in package main. The Go App Engine Runtime provides a special main package, so you should put HTTP handler code in a package of your choice (in this case, hello).”

You are correct that all Go programs need the Main method. But it is provided by Google App Engine. That is why your provided example works. Your example would not work locally (not on GAE).