Go : Why 'main' function and why 'main' package

 In Go, the entry point for any application is the main function in the main package.

Program execution begins by initializing the main package and then invoking the function main.

Your application must have a package named main and declare a function main that takes no arguments and returns no value. 

package main 
func main() { … }

 

Comments

Popular posts from this blog

INSTALL GIT IN CENTOS 7

Find go version?