Problem
mustParseLogLevel checks verbose before silent, so -v silently wins when both are given. No warning is emitted.
Reproduction
$ http-assert -v -s --assert-ok http://127.0.0.1:8791/ok
[.] HTTP/1.1 GET http://127.0.0.1:8791/ok
[:] HTTP/1.1 200 OK
[+] PASSED
The -s is silently ignored. This matters most when one of the two arrives from an environment variable (HTTP_ASSERT_SILENT) and the other from the command line — the user has no idea which won.
Suggested fix
Treat mutually exclusive verbosity flags as a usage error, or at minimum log a warning naming the winner. Cobra's MarkFlagsMutuallyExclusive covers the CLI half.
Problem
mustParseLogLevelchecksverbosebeforesilent, so-vsilently wins when both are given. No warning is emitted.Reproduction
The
-sis silently ignored. This matters most when one of the two arrives from an environment variable (HTTP_ASSERT_SILENT) and the other from the command line — the user has no idea which won.Suggested fix
Treat mutually exclusive verbosity flags as a usage error, or at minimum log a warning naming the winner. Cobra's
MarkFlagsMutuallyExclusivecovers the CLI half.