From 23eabfd14099429d0f181986ef1dd9415c56444e Mon Sep 17 00:00:00 2001 From: RincewindsHat Date: Fri, 14 Jan 2022 13:40:03 +0100 Subject: [PATCH 01/10] First implementation of subcheck concept --- result/overall.go | 46 +++++++++++++++++++++++++++++++++++++++++- result/overall_test.go | 24 +++++++++++++++++++++- 2 files changed, 68 insertions(+), 2 deletions(-) diff --git a/result/overall.go b/result/overall.go index febcd25..e75ca43 100644 --- a/result/overall.go +++ b/result/overall.go @@ -4,6 +4,7 @@ package result import ( "fmt" "github.com/NETWAYS/go-check" + "github.com/NETWAYS/go-check/perfdata" "strings" ) @@ -13,21 +14,37 @@ type Overall struct { Criticals int Unknowns int Summary string - Outputs []string + Outputs []string // Deprecate this in a future version + subchecks []Subcheck } +type Subcheck struct { + State int + Output string + Perfdata perfdata.PerfdataList + subchecks []Subcheck +} + +func (s *Subcheck) String() string { + return fmt.Sprintf("[%s] %s|%s", check.StatusText(s.State), s.Output, s.Perfdata.String()) +} + +// Deprecate this in a future version func (o *Overall) AddOK(output string) { o.Add(check.OK, output) } +// Deprecate this in a future version func (o *Overall) AddWarning(output string) { o.Add(check.Warning, output) } +// Deprecate this in a future version func (o *Overall) AddCritical(output string) { o.Add(check.Critical, output) } +// Deprecate this in a future version func (o *Overall) AddUnknown(output string) { o.Add(check.Unknown, output) } @@ -47,6 +64,14 @@ func (o *Overall) Add(state int, output string) { o.Outputs = append(o.Outputs, fmt.Sprintf("[%s] %s", check.StatusText(state), output)) } +func (o* Overall) AddSubcheck(subcheck Subcheck) { + o.subchecks = append(o.subchecks, subcheck) +} + +func (o* Subcheck) AddSubcheck(subcheck Subcheck) { + o.subchecks = append(o.subchecks, subcheck) +} + func (o *Overall) GetStatus() int { if o.Criticals > 0 { return check.Critical @@ -96,6 +121,25 @@ func (o *Overall) GetOutput() string { output += extra + "\n" } + if o.subchecks != nil { + for _, s := range o.subchecks { + output += s.getOutput(0) + } + } + return output } +func (s *Subcheck) getOutput(indent_level int) string { + var output string + prefix := strings.Repeat(" ", indent_level) + output += prefix + "|- " + s.String() + "\n" + + if s.subchecks != nil { + for _, ss := range s.subchecks { + output += ss.getOutput(indent_level + 1) + } + } + + return output +} diff --git a/result/overall_test.go b/result/overall_test.go index dbde9c6..7e13a5c 100644 --- a/result/overall_test.go +++ b/result/overall_test.go @@ -3,6 +3,7 @@ package result import ( "fmt" "github.com/NETWAYS/go-check" + "github.com/NETWAYS/go-check/perfdata" "github.com/stretchr/testify/assert" "testing" ) @@ -90,7 +91,7 @@ func ExampleOverall_Add() { overall.Add(check.Critical, "The other is critical") fmt.Println(overall) - // Output: {1 0 1 0 [[OK] One element is good [CRITICAL] The other is critical]} + // Output: {1 0 1 0 [[OK] One element is good [CRITICAL] The other is critical] []} } func ExampleOverall_GetOutput() { @@ -113,3 +114,24 @@ func ExampleOverall_GetStatus() { fmt.Println(overall.GetStatus()) // Output: 2 } + +func TestOverall_withSubchecks(t *testing.T) { + var overall Overall + + example_perfdata := perfdata.Perfdata{Label: "pd_test", Value: 5, Uom: "s"} + pd_list := perfdata.PerfdataList{} + pd_list.Add(&example_perfdata) + subcheck := Subcheck{ + State: check.OK, + Output: "Subcheck1 Test", + Perfdata: pd_list, + } + + overall.AddSubcheck(subcheck) + overall.AddOK("bla") + + fmt.Println(overall.GetOutput()) + + // Output: [OK] bla + // |- [OK] Subcheck1 Test|pd_test=5s;;;; +} From 0a09788b978d4355d63f22c60baeedc171d9c965 Mon Sep 17 00:00:00 2001 From: RincewindsHat Date: Mon, 21 Feb 2022 15:36:14 +0100 Subject: [PATCH 02/10] Allow semicolon in perfdata label --- perfdata/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perfdata/util.go b/perfdata/util.go index a070139..843c6d4 100644 --- a/perfdata/util.go +++ b/perfdata/util.go @@ -8,7 +8,7 @@ import ( ) // Lists all allowed characters inside a label, so we can replace any non-matching -var validInLabelRe = regexp.MustCompile(`[^a-zA-Z0-9 _\-+:/.]+`) +var validInLabelRe = regexp.MustCompile(`[^a-zA-Z0-9 _\-+:/.;]+`) // FormatNumeric returns a string representation of various possible numerics // From 394b81a37a36364aeee5c2050840b69afdcd648f Mon Sep 17 00:00:00 2001 From: RincewindsHat Date: Mon, 21 Feb 2022 15:37:03 +0100 Subject: [PATCH 03/10] Make overall work with subchecks and test it some more --- result/overall.go | 30 +++++++++++++++++++++++- result/overall_test.go | 52 ++++++++++++++++++++++++++++++++++++++---- 2 files changed, 77 insertions(+), 5 deletions(-) diff --git a/result/overall.go b/result/overall.go index e75ca43..7f73912 100644 --- a/result/overall.go +++ b/result/overall.go @@ -104,9 +104,37 @@ func (o *Overall) GetSummary() string { o.Summary += fmt.Sprintf("ok=%d ", o.OKs) } - if o.Summary == "" { + if o.Summary == "" && len(o.subchecks) == 0 { o.Summary = "No status information" } else { + criticals := 0 + warnings := 0 + oks := 0 + unknowns := 0 + for _, sc := range o.subchecks { + if sc.State == check.Critical { + criticals ++ + } else if sc.State == check.Warning { + warnings ++ + } else if sc.State == check.Unknown { + unknowns ++ + } else if sc.State == check.OK { + oks ++ + } + } + + if criticals > 0 { + o.Summary += fmt.Sprintf("critical=%d ", criticals) + } + if unknowns > 0 { + o.Summary += fmt.Sprintf("unknowns=%d ", unknowns) + } + if warnings > 0 { + o.Summary += fmt.Sprintf("warning=%d ", warnings) + } + if oks > 0 { + o.Summary += fmt.Sprintf("ok=%d ", oks) + } o.Summary = "states: " + strings.TrimSpace(o.Summary) } } diff --git a/result/overall_test.go b/result/overall_test.go index 7e13a5c..739a52f 100644 --- a/result/overall_test.go +++ b/result/overall_test.go @@ -122,8 +122,8 @@ func TestOverall_withSubchecks(t *testing.T) { pd_list := perfdata.PerfdataList{} pd_list.Add(&example_perfdata) subcheck := Subcheck{ - State: check.OK, - Output: "Subcheck1 Test", + State: check.OK, + Output: "Subcheck1 Test", Perfdata: pd_list, } @@ -131,7 +131,51 @@ func TestOverall_withSubchecks(t *testing.T) { overall.AddOK("bla") fmt.Println(overall.GetOutput()) - + // Output: [OK] bla - // |- [OK] Subcheck1 Test|pd_test=5s;;;; + // |- [OK] Subcheck1 Test|pd_test=5s;;;; +} + +func TestOverall_withSubchecks2(t *testing.T) { + var overall Overall + + example_perfdata := perfdata.Perfdata{Label: "pd_test", Value: 5, Uom: "s"} + example_perfdata2 := perfdata.Perfdata{ + Label: "pd_test2", + Value: 1099511627776, + Uom: "kB", + Warn: &check.Threshold{Inside: true, Lower: 3.14, Upper: 0x66666666666}, + Crit: &check.Threshold{Inside: false, Lower: 07777777777777, Upper: 0xFFFFFFFFFFFFFFFFFFFF}, + Max: uint64(18446744073709551615), + } + example_perfdata3 := perfdata.Perfdata{Label: "kl;jr2if;l2rkjasdf", Value: 5, Uom: "m"} + example_perfdata4 := perfdata.Perfdata{Label: "asdf", Value: uint64(18446744073709551615), Uom: "B"} + + pd_list := perfdata.PerfdataList{} + pd_list.Add(&example_perfdata) + pd_list.Add(&example_perfdata2) + + pd_list2 := perfdata.PerfdataList{} + pd_list2.Add(&example_perfdata3) + pd_list2.Add(&example_perfdata4) + + subcheck := Subcheck{ + State: check.OK, + Output: "Subcheck1 Test", + Perfdata: pd_list, + } + subcheck2 := Subcheck{ + State: check.Warning, + Output: "Subcheck2 Test", + Perfdata: pd_list2, + } + + overall.AddSubcheck(subcheck) + overall.AddSubcheck(subcheck2) + + fmt.Println(overall.GetOutput()) + + // states: warning=1 ok=1 + // |- [OK] Subcheck1 Test|pd_test=5s pd_test2=1099511627776kB;@3.14:7036874417766;549755813887:1208925819614629174706176;;18446744073709551615 + // |- [WARNING] Subcheck2 Test|kl;jr2if;l2rkjasdf=5m asdf=18446744073709551615B } From 029fb9650309323d18375dc1720d0fd79afd53d7 Mon Sep 17 00:00:00 2001 From: RincewindsHat Date: Mon, 21 Feb 2022 16:35:31 +0100 Subject: [PATCH 04/10] Change indentation a little bit, add some commentary and add more tests --- result/overall.go | 9 ++++++++- result/overall_test.go | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/result/overall.go b/result/overall.go index 7f73912..077f118 100644 --- a/result/overall.go +++ b/result/overall.go @@ -8,6 +8,13 @@ import ( "strings" ) +// So, this is the idea: +// A check plugin has a single Overall (singleton) +// Each partial thing which is tested, gets it's own subcheck +// The results of these may be relevant to the overall status in the end +// or not, e.g. if a plugin trieds two different methods for something and +// one suffices, but one fails, the whole check might be OK and only the subcheck +// Warning or Critical. type Overall struct { OKs int Warnings int @@ -165,7 +172,7 @@ func (s *Subcheck) getOutput(indent_level int) string { if s.subchecks != nil { for _, ss := range s.subchecks { - output += ss.getOutput(indent_level + 1) + output += ss.getOutput(indent_level + 2) } } diff --git a/result/overall_test.go b/result/overall_test.go index 739a52f..690b238 100644 --- a/result/overall_test.go +++ b/result/overall_test.go @@ -179,3 +179,24 @@ func TestOverall_withSubchecks2(t *testing.T) { // |- [OK] Subcheck1 Test|pd_test=5s pd_test2=1099511627776kB;@3.14:7036874417766;549755813887:1208925819614629174706176;;18446744073709551615 // |- [WARNING] Subcheck2 Test|kl;jr2if;l2rkjasdf=5m asdf=18446744073709551615B } + +func TestOverall_withSubchecks3(t *testing.T) { + var overall Overall + subcheck2 := Subcheck{ + State: check.OK, + Output: "SubSubcheck", + } + subcheck := Subcheck{ + State: check.OK, + Output: "Subcheck", + } + subcheck.subchecks = append(subcheck.subchecks, subcheck2) + + overall.AddSubcheck(subcheck) + + fmt.Println(overall.GetOutput()) + + // states: ok=1 + // |- [OK] Subcheck| + // |- [OK] SubSubcheck| +} From fb010ccedfdaf310984dc6a0494475363338b754 Mon Sep 17 00:00:00 2001 From: RincewindsHat Date: Mon, 21 Feb 2022 16:40:46 +0100 Subject: [PATCH 05/10] Gofmt changes --- result/overall.go | 18 +++++++++--------- result/overall_test.go | 12 ++++++------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/result/overall.go b/result/overall.go index 077f118..d7d6e45 100644 --- a/result/overall.go +++ b/result/overall.go @@ -26,9 +26,9 @@ type Overall struct { } type Subcheck struct { - State int - Output string - Perfdata perfdata.PerfdataList + State int + Output string + Perfdata perfdata.PerfdataList subchecks []Subcheck } @@ -71,11 +71,11 @@ func (o *Overall) Add(state int, output string) { o.Outputs = append(o.Outputs, fmt.Sprintf("[%s] %s", check.StatusText(state), output)) } -func (o* Overall) AddSubcheck(subcheck Subcheck) { +func (o *Overall) AddSubcheck(subcheck Subcheck) { o.subchecks = append(o.subchecks, subcheck) } -func (o* Subcheck) AddSubcheck(subcheck Subcheck) { +func (o *Subcheck) AddSubcheck(subcheck Subcheck) { o.subchecks = append(o.subchecks, subcheck) } @@ -120,13 +120,13 @@ func (o *Overall) GetSummary() string { unknowns := 0 for _, sc := range o.subchecks { if sc.State == check.Critical { - criticals ++ + criticals++ } else if sc.State == check.Warning { - warnings ++ + warnings++ } else if sc.State == check.Unknown { - unknowns ++ + unknowns++ } else if sc.State == check.OK { - oks ++ + oks++ } } diff --git a/result/overall_test.go b/result/overall_test.go index 690b238..a45286e 100644 --- a/result/overall_test.go +++ b/result/overall_test.go @@ -183,12 +183,12 @@ func TestOverall_withSubchecks2(t *testing.T) { func TestOverall_withSubchecks3(t *testing.T) { var overall Overall subcheck2 := Subcheck{ - State: check.OK, - Output: "SubSubcheck", + State: check.OK, + Output: "SubSubcheck", } subcheck := Subcheck{ - State: check.OK, - Output: "Subcheck", + State: check.OK, + Output: "Subcheck", } subcheck.subchecks = append(subcheck.subchecks, subcheck2) @@ -197,6 +197,6 @@ func TestOverall_withSubchecks3(t *testing.T) { fmt.Println(overall.GetOutput()) // states: ok=1 - // |- [OK] Subcheck| - // |- [OK] SubSubcheck| + // |- [OK] Subcheck| + // |- [OK] SubSubcheck| } From f0094e8b2b32b1df34816e795854fe1a4496e9a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20K=C3=A4stle?= Date: Thu, 24 Feb 2022 09:55:06 +0100 Subject: [PATCH 06/10] Uncuddle variables --- result/overall.go | 1 + 1 file changed, 1 insertion(+) diff --git a/result/overall.go b/result/overall.go index d7d6e45..2346deb 100644 --- a/result/overall.go +++ b/result/overall.go @@ -167,6 +167,7 @@ func (o *Overall) GetOutput() string { func (s *Subcheck) getOutput(indent_level int) string { var output string + prefix := strings.Repeat(" ", indent_level) output += prefix + "|- " + s.String() + "\n" From c63901ad7d55274aebe51363fc2c1bd911ed5fcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20K=C3=A4stle?= Date: Thu, 24 Feb 2022 11:15:14 +0100 Subject: [PATCH 07/10] Fix tests --- result/overall_test.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/result/overall_test.go b/result/overall_test.go index a45286e..d0211fd 100644 --- a/result/overall_test.go +++ b/result/overall_test.go @@ -115,7 +115,7 @@ func ExampleOverall_GetStatus() { // Output: 2 } -func TestOverall_withSubchecks(t *testing.T) { +func ExampleOverall_withSubchecks() { var overall Overall example_perfdata := perfdata.Perfdata{Label: "pd_test", Value: 5, Uom: "s"} @@ -131,12 +131,13 @@ func TestOverall_withSubchecks(t *testing.T) { overall.AddOK("bla") fmt.Println(overall.GetOutput()) - - // Output: [OK] bla - // |- [OK] Subcheck1 Test|pd_test=5s;;;; + // Output: + // states: ok=1 ok=1 + // [OK] bla + // |- [OK] Subcheck1 Test|pd_test=5s } -func TestOverall_withSubchecks2(t *testing.T) { +func ExampleOverall_withSubchecks2() { var overall Overall example_perfdata := perfdata.Perfdata{Label: "pd_test", Value: 5, Uom: "s"} @@ -180,7 +181,7 @@ func TestOverall_withSubchecks2(t *testing.T) { // |- [WARNING] Subcheck2 Test|kl;jr2if;l2rkjasdf=5m asdf=18446744073709551615B } -func TestOverall_withSubchecks3(t *testing.T) { +func ExampleOverall_withSubchecks3() { var overall Overall subcheck2 := Subcheck{ State: check.OK, From a114c11b12d6fad8c14cf5cfd4c8a3af8aa412b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20K=C3=A4stle?= Date: Thu, 24 Feb 2022 11:26:28 +0100 Subject: [PATCH 08/10] Linter stuff --- result/overall_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/result/overall_test.go b/result/overall_test.go index d0211fd..23edf4e 100644 --- a/result/overall_test.go +++ b/result/overall_test.go @@ -121,6 +121,7 @@ func ExampleOverall_withSubchecks() { example_perfdata := perfdata.Perfdata{Label: "pd_test", Value: 5, Uom: "s"} pd_list := perfdata.PerfdataList{} pd_list.Add(&example_perfdata) + subcheck := Subcheck{ State: check.OK, Output: "Subcheck1 Test", @@ -137,6 +138,7 @@ func ExampleOverall_withSubchecks() { // |- [OK] Subcheck1 Test|pd_test=5s } +//nolint func ExampleOverall_withSubchecks2() { var overall Overall @@ -183,6 +185,7 @@ func ExampleOverall_withSubchecks2() { func ExampleOverall_withSubchecks3() { var overall Overall + subcheck2 := Subcheck{ State: check.OK, Output: "SubSubcheck", From 0308e1e95913a502f91e499ca65add7662af2cd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20K=C3=A4stle?= Date: Mon, 7 Mar 2022 09:53:24 +0100 Subject: [PATCH 09/10] Rename subchecks to partialResults --- result/overall.go | 30 +++++++++++++++--------------- result/overall_test.go | 16 ++++++++-------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/result/overall.go b/result/overall.go index 2346deb..30e1ff8 100644 --- a/result/overall.go +++ b/result/overall.go @@ -22,17 +22,17 @@ type Overall struct { Unknowns int Summary string Outputs []string // Deprecate this in a future version - subchecks []Subcheck + partialResults []PartialResult } -type Subcheck struct { +type PartialResult struct { State int Output string Perfdata perfdata.PerfdataList - subchecks []Subcheck + partialResults []PartialResult } -func (s *Subcheck) String() string { +func (s *PartialResult) String() string { return fmt.Sprintf("[%s] %s|%s", check.StatusText(s.State), s.Output, s.Perfdata.String()) } @@ -71,12 +71,12 @@ func (o *Overall) Add(state int, output string) { o.Outputs = append(o.Outputs, fmt.Sprintf("[%s] %s", check.StatusText(state), output)) } -func (o *Overall) AddSubcheck(subcheck Subcheck) { - o.subchecks = append(o.subchecks, subcheck) +func (o *Overall) AddSubcheck(subcheck PartialResult) { + o.partialResults = append(o.partialResults, subcheck) } -func (o *Subcheck) AddSubcheck(subcheck Subcheck) { - o.subchecks = append(o.subchecks, subcheck) +func (o *PartialResult) AddSubcheck(subcheck PartialResult) { + o.partialResults = append(o.partialResults, subcheck) } func (o *Overall) GetStatus() int { @@ -111,14 +111,14 @@ func (o *Overall) GetSummary() string { o.Summary += fmt.Sprintf("ok=%d ", o.OKs) } - if o.Summary == "" && len(o.subchecks) == 0 { + if o.Summary == "" && len(o.partialResults) == 0 { o.Summary = "No status information" } else { criticals := 0 warnings := 0 oks := 0 unknowns := 0 - for _, sc := range o.subchecks { + for _, sc := range o.partialResults { if sc.State == check.Critical { criticals++ } else if sc.State == check.Warning { @@ -156,8 +156,8 @@ func (o *Overall) GetOutput() string { output += extra + "\n" } - if o.subchecks != nil { - for _, s := range o.subchecks { + if o.partialResults != nil { + for _, s := range o.partialResults { output += s.getOutput(0) } } @@ -165,14 +165,14 @@ func (o *Overall) GetOutput() string { return output } -func (s *Subcheck) getOutput(indent_level int) string { +func (s *PartialResult) getOutput(indent_level int) string { var output string prefix := strings.Repeat(" ", indent_level) output += prefix + "|- " + s.String() + "\n" - if s.subchecks != nil { - for _, ss := range s.subchecks { + if s.partialResults != nil { + for _, ss := range s.partialResults { output += ss.getOutput(indent_level + 2) } } diff --git a/result/overall_test.go b/result/overall_test.go index 23edf4e..bae93a8 100644 --- a/result/overall_test.go +++ b/result/overall_test.go @@ -122,7 +122,7 @@ func ExampleOverall_withSubchecks() { pd_list := perfdata.PerfdataList{} pd_list.Add(&example_perfdata) - subcheck := Subcheck{ + subcheck := PartialResult{ State: check.OK, Output: "Subcheck1 Test", Perfdata: pd_list, @@ -162,12 +162,12 @@ func ExampleOverall_withSubchecks2() { pd_list2.Add(&example_perfdata3) pd_list2.Add(&example_perfdata4) - subcheck := Subcheck{ + subcheck := PartialResult{ State: check.OK, Output: "Subcheck1 Test", Perfdata: pd_list, } - subcheck2 := Subcheck{ + subcheck2 := PartialResult{ State: check.Warning, Output: "Subcheck2 Test", Perfdata: pd_list2, @@ -186,21 +186,21 @@ func ExampleOverall_withSubchecks2() { func ExampleOverall_withSubchecks3() { var overall Overall - subcheck2 := Subcheck{ + subcheck2 := PartialResult{ State: check.OK, Output: "SubSubcheck", } - subcheck := Subcheck{ + subcheck := PartialResult{ State: check.OK, - Output: "Subcheck", + Output: "PartialResult", } - subcheck.subchecks = append(subcheck.subchecks, subcheck2) + subcheck.partialResults = append(subcheck.partialResults, subcheck2) overall.AddSubcheck(subcheck) fmt.Println(overall.GetOutput()) // states: ok=1 - // |- [OK] Subcheck| + // |- [OK] PartialResult| // |- [OK] SubSubcheck| } From 8d6c7299e049485d0dc611d8988cf6c18dc078e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20K=C3=A4stle?= Date: Mon, 7 Mar 2022 10:26:49 +0100 Subject: [PATCH 10/10] Do NOT use | as typographic decoration, it is reserved for perfdata --- result/overall.go | 2 +- result/overall_test.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/result/overall.go b/result/overall.go index 30e1ff8..86bd8e7 100644 --- a/result/overall.go +++ b/result/overall.go @@ -169,7 +169,7 @@ func (s *PartialResult) getOutput(indent_level int) string { var output string prefix := strings.Repeat(" ", indent_level) - output += prefix + "|- " + s.String() + "\n" + output += prefix + "\\_ " + s.String() + "\n" if s.partialResults != nil { for _, ss := range s.partialResults { diff --git a/result/overall_test.go b/result/overall_test.go index bae93a8..36f43a4 100644 --- a/result/overall_test.go +++ b/result/overall_test.go @@ -135,7 +135,7 @@ func ExampleOverall_withSubchecks() { // Output: // states: ok=1 ok=1 // [OK] bla - // |- [OK] Subcheck1 Test|pd_test=5s + // \_ [OK] Subcheck1 Test|pd_test=5s } //nolint @@ -179,8 +179,8 @@ func ExampleOverall_withSubchecks2() { fmt.Println(overall.GetOutput()) // states: warning=1 ok=1 - // |- [OK] Subcheck1 Test|pd_test=5s pd_test2=1099511627776kB;@3.14:7036874417766;549755813887:1208925819614629174706176;;18446744073709551615 - // |- [WARNING] Subcheck2 Test|kl;jr2if;l2rkjasdf=5m asdf=18446744073709551615B + // \_ [OK] Subcheck1 Test|pd_test=5s pd_test2=1099511627776kB;@3.14:7036874417766;549755813887:1208925819614629174706176;;18446744073709551615 + // \_ [WARNING] Subcheck2 Test|kl;jr2if;l2rkjasdf=5m asdf=18446744073709551615B } func ExampleOverall_withSubchecks3() { @@ -201,6 +201,6 @@ func ExampleOverall_withSubchecks3() { fmt.Println(overall.GetOutput()) // states: ok=1 - // |- [OK] PartialResult| - // |- [OK] SubSubcheck| + // \_ [OK] PartialResult| + // \_ [OK] SubSubcheck| }