From be9d564c29fc1594d62719fd45ebc021fc4359a1 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Sat, 12 Feb 2022 16:21:41 -0800 Subject: [PATCH] envknob: remove some stutter from error messages The strconv errors already stringified with the same. Change-Id: I6938c5653e9aafa6d9028d45fc26e39eb9ccbaea Signed-off-by: Brad Fitzpatrick --- envknob/envknob.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/envknob/envknob.go b/envknob/envknob.go index 048424a5f..a2eae6ca1 100644 --- a/envknob/envknob.go +++ b/envknob/envknob.go @@ -53,7 +53,7 @@ func boolOr(envVar string, implicitValue bool) bool { if err == nil { return b } - log.Fatalf("invalid environment variable %s value %q: %v", envVar, val, err) + log.Fatalf("invalid boolean environment variable %s value %q", envVar, val) panic("unreachable") } @@ -69,7 +69,7 @@ func LookupBool(envVar string) (v bool, ok bool) { if err == nil { return b, true } - log.Fatalf("invalid environment variable %s value %q: %v", envVar, val, err) + log.Fatalf("invalid boolean environment variable %s value %q", envVar, val) panic("unreachable") } @@ -97,7 +97,7 @@ func LookupInt(envVar string) (v int, ok bool) { if err == nil { return v, true } - log.Fatalf("invalid environment variable %s value %q: %v", envVar, val, err) + log.Fatalf("invalid integer environment variable %s: %v", envVar, val) panic("unreachable") }