From 5b199cdb24a14b2819d24f2b85bdba6e2d22bd83 Mon Sep 17 00:00:00 2001 From: Mark Yen Date: Wed, 27 May 2020 14:39:11 -0700 Subject: [PATCH] Fix documentation for V(level) The documentation for V(level) was incorrect; it erroneously claimed that higher V() levels will get logged, whereas in reality lower levels will get logged. No functional change. --- klog.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/klog.go b/klog.go index 63426f58..5f8e67ce 100644 --- a/klog.go +++ b/klog.go @@ -1236,9 +1236,10 @@ func newVerbose(level Level, b bool) Verbose { // not evaluate its arguments. // // Whether an individual call to V generates a log record depends on the setting of -// the -v and --vmodule flags; both are off by default. If the level in the call to -// V is at least the value of -v, or of -vmodule for the source file containing the -// call, the V call will log. +// the -v and -vmodule flags; both are off by default. The V call will log if its level +// is less than or equal to the value of the -v flag, or alternatively if its level is +// less than or equal to the value of the -vmodule pattern matching the source file +// containing the call. func V(level Level) Verbose { // This function tries hard to be cheap unless there's work to do. // The fast path is two atomic loads and compares.