flag를 내재화함
This commit is contained in:
18
flag/commandline.go
Normal file
18
flag/commandline.go
Normal file
@ -0,0 +1,18 @@
|
||||
package flag
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"os"
|
||||
)
|
||||
|
||||
var commandLine = flag.NewFlagSet("maingate", flag.ExitOnError)
|
||||
var Devflag = commandLine.Bool("dev", false, "")
|
||||
var Noauth = commandLine.Bool("noauth", false, "")
|
||||
|
||||
func Parsed() bool {
|
||||
return commandLine.Parsed()
|
||||
}
|
||||
|
||||
func Parse() error {
|
||||
return commandLine.Parse(os.Args[1:])
|
||||
}
|
||||
Reference in New Issue
Block a user