Merge pull request #464 from mslacken/bool-fmt

add brackets for PrintB if its default
This commit is contained in:
Christian Goll
2022-06-24 09:48:27 +02:00
committed by GitHub

View File

@@ -264,7 +264,10 @@ func (ent *Entry) PrintComb() string {
same as GetB()
*/
func (ent *Entry) PrintB() string {
return fmt.Sprintf("%t", ent.GetB())
if len(ent.value) != 0 || len(ent.altvalue) != 0 {
return fmt.Sprintf("%t", ent.GetB())
}
return fmt.Sprintf("(%t)", ent.GetB())
}
/*