@@ -64,29 +64,29 @@ func showTextResultsHuman(preflightName string, analyzeResults []*analyzerunner.
6464 return results , nil
6565}
6666
67- type textResultOutput struct {
67+ type TextResultOutput struct {
6868 Title string `json:"title" yaml:"title"`
6969 Message string `json:"message" yaml:"message"`
7070 URI string `json:"uri,omitempty" yaml:"uri,omitempty"`
7171 Strict bool `json:"strict,omitempty" yaml:"strict,omitempty"`
7272}
7373
74- type textOutput struct {
75- Pass []textResultOutput `json:"pass,omitempty" yaml:"pass,omitempty"`
76- Warn []textResultOutput `json:"warn,omitempty" yaml:"warn,omitempty"`
77- Fail []textResultOutput `json:"fail,omitempty" yaml:"fail,omitempty"`
74+ type TextOutput struct {
75+ Pass []TextResultOutput `json:"pass,omitempty" yaml:"pass,omitempty"`
76+ Warn []TextResultOutput `json:"warn,omitempty" yaml:"warn,omitempty"`
77+ Fail []TextResultOutput `json:"fail,omitempty" yaml:"fail,omitempty"`
7878}
7979
8080// Used by both JSON and YAML outputs
81- func showTextResultsStructured (preflightName string , analyzeResults []* analyzerunner.AnalyzeResult ) * textOutput {
82- output := textOutput {
83- Pass : []textResultOutput {},
84- Warn : []textResultOutput {},
85- Fail : []textResultOutput {},
81+ func ShowTextResultsStructured (preflightName string , analyzeResults []* analyzerunner.AnalyzeResult ) * TextOutput {
82+ output := TextOutput {
83+ Pass : []TextResultOutput {},
84+ Warn : []TextResultOutput {},
85+ Fail : []TextResultOutput {},
8686 }
8787
8888 for _ , analyzeResult := range analyzeResults {
89- resultOutput := textResultOutput {
89+ resultOutput := TextResultOutput {
9090 Title : analyzeResult .Title ,
9191 Message : analyzeResult .Message ,
9292 URI : analyzeResult .URI ,
@@ -109,7 +109,7 @@ func showTextResultsStructured(preflightName string, analyzeResults []*analyzeru
109109}
110110
111111func showTextResultsJSON (preflightName string , analyzeResults []* analyzerunner.AnalyzeResult ) (string , error ) {
112- output := showTextResultsStructured (preflightName , analyzeResults )
112+ output := ShowTextResultsStructured (preflightName , analyzeResults )
113113
114114 b , err := json .MarshalIndent (* output , "" , " " )
115115 if err != nil {
@@ -120,7 +120,7 @@ func showTextResultsJSON(preflightName string, analyzeResults []*analyzerunner.A
120120}
121121
122122func showTextResultsYAML (preflightName string , analyzeResults []* analyzerunner.AnalyzeResult ) (string , error ) {
123- output := showTextResultsStructured (preflightName , analyzeResults )
123+ output := ShowTextResultsStructured (preflightName , analyzeResults )
124124
125125 b , err := yaml .Marshal (* output )
126126 if err != nil {
0 commit comments