1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-05 08:17:04 +00:00

utils/dump: do not print empty header line

Makes log output cleaner.
This commit is contained in:
Markus Lehtonen 2021-05-24 21:44:18 +03:00
parent aa2cbad3a9
commit 99d223b029

View file

@ -26,7 +26,9 @@ import (
func KlogDump(v klog.Level, heading, prefix string, obj interface{}) {
if klog.V(v).Enabled() {
klog.InfoDepth(1, heading)
if heading != "" {
klog.InfoDepth(1, heading)
}
d := strings.Split(Dump(obj), "\n")
// Print all but the last empty line