Go解析命令行参数(简单版本)

// Check Args
if len(os.Args) != 2 {
    fmt.Println("Usage xxx <arg1> <arg2>")
    return
}
 
arg1 := os.Args[1]
arg1 := os.Args[2]

 

Leave a Reply

Your email address will not be published. Required fields are marked *