refactor: updated cache editor implementation

This commit is contained in:
David Allen 2025-06-16 16:19:43 -06:00
parent b8431a84af
commit f1f8e4f3fb
Signed by: towk
GPG key ID: 0430CDBE22619155
4 changed files with 25 additions and 63 deletions

View file

@ -27,21 +27,6 @@ func PrintRemoteAssets(data []RemoteAsset, format string) {
}
}
func PrintMapWithFormat(data map[string]any, format string) {
switch strings.ToLower(format) {
case "json":
util.PrintJSON(data)
case "yaml":
util.PrintYAML(data)
case "list":
for k, v := range data {
fmt.Printf("%s: %v\n", k, v)
}
default:
log.Error().Msg("PrintMapWithFormat: unrecognized format")
}
}
func ListDrives(cc *crawler.CrawlerConfig) ([]*redfish.Drive, error) {
user, err := cc.GetUserPass()
if err != nil {