mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
refactor: updated cache editor implementation
This commit is contained in:
parent
3bae20832f
commit
e85fd21922
6 changed files with 78 additions and 28 deletions
15
pkg/list.go
15
pkg/list.go
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue