flag 에러 메시지 무시
This commit is contained in:
2
flags.go
2
flags.go
@ -2,6 +2,7 @@ package gocommon
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
|
"io"
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -16,5 +17,6 @@ var NeedPrefetch = commandLine.Bool("prefetch", false, "")
|
|||||||
var Linkupdate = commandLine.String("updatelink", "", "")
|
var Linkupdate = commandLine.String("updatelink", "", "")
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
commandLine.SetOutput(io.Discard)
|
||||||
commandLine.Parse(os.Args[1:])
|
commandLine.Parse(os.Args[1:])
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user