1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-28 02:37:11 +00:00

Merge pull request #542 from marquiz/devel/dump

utils/dump: do not print empty header line
This commit is contained in:
Kubernetes Prow Robot 2021-06-11 04:50:59 -07:00 committed by GitHub
commit e5fedf9b99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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