Support bundles: small UX improvements (#63277)

support bundle ux improvements
This commit is contained in:
Ieva
2023-02-11 08:31:03 +00:00
committed by GitHub
parent d4cfbd9fd3
commit 229f8b6e6d
2 changed files with 20 additions and 17 deletions

View File

@@ -51,7 +51,7 @@ func basicCollector(cfg *setting.Cfg) supportbundles.Collector {
loc, _ := time.LoadLocation("UTC")
now := collectionDate.In(loc)
data, err := json.Marshal(basicInfo{
info := basicInfo{
Version: cfg.BuildVersion,
Commit: cfg.BuildCommit,
CollectionDate: now,
@@ -69,7 +69,8 @@ func basicCollector(cfg *setting.Cfg) supportbundles.Collector {
GoOS: runtime.GOOS,
GoArch: runtime.GOARCH,
GoCompiler: runtime.Compiler,
})
}
data, err := json.MarshalIndent(info, "", " ")
if err != nil {
return nil, err
}
@@ -91,7 +92,7 @@ func settingsCollector(settings setting.Provider) supportbundles.Collector {
Default: true,
Fn: func(ctx context.Context) (*supportbundles.SupportItem, error) {
current := settings.Current()
data, err := json.Marshal(current)
data, err := json.MarshalIndent(current, "", " ")
if err != nil {
return nil, err
}