From 1ab785bb9f1a2c24ad644a393819e13716ad7cd8 Mon Sep 17 00:00:00 2001 From: Eric Greer Date: Sat, 18 Jan 2020 12:31:35 -0800 Subject: [PATCH] fixed error with parsing test. flags --- parser.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parser.go b/parser.go index 6c9f090..e256120 100644 --- a/parser.go +++ b/parser.go @@ -105,11 +105,11 @@ func findArgsNotInParsedValues(args []string, parsedValues []parsedValue) []stri // skip args that start with 'test.' because they are injected with go test debugPrint("flagsNotParsed: checking arg for test prefix:", arg) - if strings.HasPrefix(a, "test.") { + if strings.HasPrefix(arg, "test.") { debugPrint("skipping test. prefixed arg has test prefix:", arg) continue } - debugPrint("flagsNotParsed: flag is not a .test flag:", arg) + debugPrint("flagsNotParsed: flag is not a test. flag:", arg) // indicates that we found this arg used in one of the parsed values. Used // to indicate which values should be added to argsNotUsed.