flag 처리

This commit is contained in:
2023-06-21 10:03:22 +09:00
parent 75c65f2f75
commit ed905a3722
6 changed files with 74 additions and 41 deletions

15
core/flag/commandline.go Normal file
View File

@ -0,0 +1,15 @@
package flag
import (
"flag"
"io"
"os"
)
var commandLine = flag.NewFlagSet("maingate", flag.ContinueOnError)
var Devflag = commandLine.Bool("dev", false, "")
func init() {
commandLine.SetOutput(io.Discard)
commandLine.Parse(os.Args[1:])
}