Easee: panic logger with debug message (#3826)

This commit is contained in:
andig 2022-07-13 11:27:59 +02:00 • committed by GitHub
parent 1ae1fb34d9
commit b4fd6264af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,6 +34,10 @@ func (l *logger) Log(keyVals ...interface{}) error {
}
if i%2 == 0 {
if _, ok := v.(string); !ok {
panic(fmt.Sprintf("expected string, got %T from %+v", v, v))
}
if slices.Contains(skipped, v.(string)) {
skip = true
continue