Go语言的“main package”

以下摘自The Go Programming Language

Package main is special. It defines a standalone executable program, not a library. Within package main the function main is also special—it’s where execution of the program begins. Whatever main does is what the program does.

main package不同于其它library package,它定义了一个可执行程序。其中的main函数即是可执行文件的入口函数。

 

发表评论

邮箱地址不会被公开。 必填项已用*标注

This site uses Akismet to reduce spam. Learn how your comment data is processed.