Fix flag parsing on database plugins, exit on parse error (#3305)

* Change FlagSet error handling to flag.ExitOnError

* Ignore os.Args[0] (the command itself) when parsing flags

* Revert to using flag.ContinueOnError
This commit is contained in:
Calvin Leung Huang
2017-09-07 16:30:00 -04:00
committed by GitHub
parent cc536c2cf4
commit ced217e699
7 changed files with 7 additions and 7 deletions

View File

@@ -11,7 +11,7 @@ import (
func main() {
apiClientMeta := &pluginutil.APIClientMeta{}
flags := apiClientMeta.FlagSet()
flags.Parse(os.Args)
flags.Parse(os.Args[1:])
err := mssql.Run(apiClientMeta.GetTLSConfig())
if err != nil {