use marshalindent instead of marshal

Signed-off-by: Xu Yang <xyang@ciq.com>
This commit is contained in:
Xu Yang
2024-03-19 03:04:20 -06:00
parent 16183e603c
commit 5956f2e9a1
2 changed files with 2 additions and 2 deletions

View File

@@ -55,7 +55,7 @@ func ProfileList(ShowOpt *wwapiv1.GetProfileList) (profileList wwapiv1.ProfileLi
profileMap[profile.Id.Get()] = profile
}
buf, _ := json.Marshal(profileMap)
buf, _ := json.MarshalIndent(profileMap, "", " ")
profileList.Output = append(profileList.Output, string(buf))
} else {
profileList.Output = append(profileList.Output,