go run: cannot run non-main package
The entry point of each go program is main.main
, i.e. a function called main in a package called main. You have to provide such a main package.
GAE is an exception though. They add a main
package, containing the main
function automatically to your project. Therefore, you are not allowed to write your own.
You need to use the main package, a common error starting with go is to type
package Main
instead of
package main