Specs refactor and tweaks
- Make ParseOptions func to take an arg and return struct so we can test it - Refactor and add more tests for options parsing - Run test suite on postgres 10.x branch - Change format for connection idle timer from float64 to in
This commit is contained in:
@@ -94,7 +94,7 @@ func initClient() {
|
||||
}
|
||||
|
||||
func initOptions() {
|
||||
err := command.ParseOptions()
|
||||
opts, err := command.ParseOptions(os.Args)
|
||||
if err != nil {
|
||||
switch err.(type) {
|
||||
case *flags.Error:
|
||||
@@ -104,8 +104,8 @@ func initOptions() {
|
||||
}
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
options = command.Opts
|
||||
command.Opts = opts
|
||||
options = opts
|
||||
|
||||
if options.Version {
|
||||
printVersion()
|
||||
|
||||
Reference in New Issue
Block a user