diff --git a/Software/Development/Language/Go/Package/Go_语言_flag_包基本使用.md b/Software/Development/Language/Go/Package/Go_语言_flag_包基本使用.md index bb6c29b..b061360 100644 --- a/Software/Development/Language/Go/Package/Go_语言_flag_包基本使用.md +++ b/Software/Development/Language/Go/Package/Go_语言_flag_包基本使用.md @@ -99,17 +99,15 @@ import ( "fmt" ) -func init(){ - flag.Usage = usage - flag.Parse() -} - func usage(){ - fmt.Print("nginx version v1.12") + fmt.Println("nginx version v1.12") flag.PrintDefaults() } -func main(){} +func main(){ + flag.Usage = usage + flag.Parse() +} ``` ### 3.5.flag 其他函数