Fix error message for invalid use of default tag
diff --git a/group.go b/group.go
index 27d2d72..6472420 100644
--- a/group.go
+++ b/group.go
@@ -278,7 +278,7 @@
if option.isBool() && option.Default != nil {
return newErrorf(ErrInvalidTag,
- "boolean flag `%s' may not have default values, they always default to `false' and can only be turned off",
+ "boolean flag `%s' may not have default values, they always default to `false' and can only be turned on",
option.shortAndLongName())
}
diff --git a/parser_test.go b/parser_test.go
index a81983f..32afc69 100644
--- a/parser_test.go
+++ b/parser_test.go
@@ -139,9 +139,9 @@
}
if runtime.GOOS == "windows" {
- assertParseFail(t, ErrInvalidTag, "boolean flag `/d' may not have default values, they always default to `false' and can only be turned off", &opts)
+ assertParseFail(t, ErrInvalidTag, "boolean flag `/d' may not have default values, they always default to `false' and can only be turned on", &opts)
} else {
- assertParseFail(t, ErrInvalidTag, "boolean flag `-d' may not have default values, they always default to `false' and can only be turned off", &opts)
+ assertParseFail(t, ErrInvalidTag, "boolean flag `-d' may not have default values, they always default to `false' and can only be turned on", &opts)
}
}