mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-02-14 18:29:53 +00:00
convert output bytearray to string before printing
This commit is contained in:
@@ -275,7 +275,7 @@ type analysisOutput struct {
|
||||
ArchivePath string
|
||||
}
|
||||
|
||||
func (a *analysisOutput) FormattedAnalysisOutput() (outputJson []byte, err error) {
|
||||
func (a *analysisOutput) FormattedAnalysisOutput() (outputJson string, err error) {
|
||||
type convertedOutput struct {
|
||||
ConvertedAnalysis []*convert.Result
|
||||
ArchivePath string
|
||||
@@ -290,7 +290,7 @@ func (a *analysisOutput) FormattedAnalysisOutput() (outputJson []byte, err error
|
||||
|
||||
formatted, err := json.MarshalIndent(o, "", " ")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("\r * Failed to format analysis: %v\n", err)
|
||||
return "", fmt.Errorf("\r * Failed to format analysis: %v\n", err)
|
||||
}
|
||||
return formatted, nil
|
||||
return string(formatted), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user