flag 에러 메시지 무시

This commit is contained in:
2023-06-20 17:32:27 +09:00
parent a034ea5ceb
commit 04c8f0094b

View File

@ -2,6 +2,7 @@ package flag
import ( import (
"flag" "flag"
"io"
"os" "os"
) )
@ -10,5 +11,6 @@ var Devflag = commandLine.Bool("dev", false, "")
var Noauth = commandLine.Bool("noauth", false, "") var Noauth = commandLine.Bool("noauth", false, "")
func init() { func init() {
commandLine.SetOutput(io.Discard)
commandLine.Parse(os.Args[1:]) commandLine.Parse(os.Args[1:])
} }