package main

import (

"flag"

"fmt"

)

func main() {

var confPath string

var logLevel int

flag.StringVar(&confPath, "c", "", "please input confPath")

flag.IntVar(&logLevel, "d", 10, "please input log level")

flag.Parse()

fmt.Println("path:", confPath)

fmt.Println("logLevel:", logLevel)

}

发表评论

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