Go语言必须以main函数作为入口
main函数不支持传入参数,main函数不支持返回值
package main
import (
"fmt"
"os"
)
func main() {
fmt.Println(os.Args)
if len(os.Args) > 1{
fmt.Println("Hello wolrd",os.Args[1])
}
fmt.Println("Hello Wolrd")
os.Exit(1)
}
The master has failed more times than the beginner has tried.