Do not add comments after migration (#8530)

Also filter out empty comments from being
printed.
This commit is contained in:
Harshavardhana
2019-11-16 14:57:36 -08:00
committed by GitHub
parent a8e156d6a5
commit 13a3d17321
12 changed files with 29 additions and 44 deletions

View File

@@ -46,6 +46,9 @@ func (kvs KVS) String() string {
if k == stateKey && v == stateOn {
continue
}
if k == commentKey && v == "" {
continue
}
s.WriteString(k)
s.WriteString(KvSeparator)
spc := hasSpace(v)
@@ -96,7 +99,6 @@ func (t Targets) String() string {
s.WriteString(kv.String())
if (len(t) > 1 || len(targetKV) > 1) && count > 0 {
s.WriteString(KvNewline)
s.WriteString(KvNewline)
}
}
}