config: validate log levels (#4367)

* config: validate log levels

* fix SetLevel

* document unset, merge warn/warning
This commit is contained in:
Caleb Doxsey 2023-07-17 16:41:48 -06:00 committed by GitHub
parent a1388592d8
commit 78e7a3e7d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 152 additions and 30 deletions

View file

@ -8,7 +8,7 @@ import (
envoy_config_core_v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
)
func firstNonEmpty(args ...string) string {
func firstNonEmpty[T interface{ ~string }](args ...T) T {
for _, a := range args {
if a != "" {
return a