From 3ced0e2836d6853b75fdf27c3cea4fe36bb55466 Mon Sep 17 00:00:00 2001 From: Christian Goll Date: Thu, 23 Jun 2022 12:35:19 +0200 Subject: [PATCH] add brackets for PrintB if its default --- internal/pkg/node/methods.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/pkg/node/methods.go b/internal/pkg/node/methods.go index ab65b487..1ec5d6ad 100644 --- a/internal/pkg/node/methods.go +++ b/internal/pkg/node/methods.go @@ -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()) } /*