@@ -123,7 +123,7 @@ func getItemString(item *golang.OptimizationItem) string {
123
123
totalSaving += dev .CurrentCost - dev .RightSizedCost
124
124
}
125
125
}
126
- row = append (row , item .Id , item .ResourceType , item .Region , item .Platform , fmt .Sprintf ("$ %s" , utils .FormatFloat (totalSaving )))
126
+ row = append (row , item .Id , item .ResourceType , item .Region , item .Platform , fmt .Sprintf ("%s" , utils .FormatPriceFloat (totalSaving )))
127
127
t .AppendRow (row )
128
128
itemString += t .Render ()
129
129
itemString += "\n " + bold .Sprint ("Devices" ) + ":"
@@ -197,7 +197,7 @@ func getDeviceString(dev *golang.Device) string {
197
197
t .AppendHeader (headers )
198
198
var row table.Row
199
199
var itemString string
200
- row = append (row , "└─ " + dev .DeviceId , dev .ResourceType , dev .Runtime , dev .CurrentCost , dev .RightSizedCost , fmt .Sprintf ("$ %s" , utils .FormatFloat (dev .CurrentCost - dev .RightSizedCost )))
200
+ row = append (row , "└─ " + dev .DeviceId , dev .ResourceType , dev .Runtime , dev .CurrentCost , dev .RightSizedCost , fmt .Sprintf ("%s" , utils .FormatPriceFloat (dev .CurrentCost - dev .RightSizedCost )))
201
201
t .AppendRow (row )
202
202
itemString += t .Render ()
203
203
itemString += "\n " + bold .Sprint ("Properties" ) + ":\n " + getPropertiesString (dev .Properties )
@@ -425,8 +425,8 @@ func exportCsv(items []*golang.OptimizationItem) ([]string, [][]string) {
425
425
for _ , d := range i .Devices {
426
426
for _ , p := range d .Properties {
427
427
rows = append (rows , []string {
428
- i .Id , i .ResourceType , i .Region , i .Platform , fmt .Sprintf ("$ %s" , utils .FormatFloat (totalSaving )),
429
- d .DeviceId , d .ResourceType , d .Runtime , fmt .Sprintf ("$ %s" , utils .FormatFloat (d .CurrentCost )), fmt .Sprintf ("$ %s" , utils .FormatFloat (d .RightSizedCost )), fmt .Sprintf ("$ %s" , utils .FormatFloat (d .CurrentCost - d .RightSizedCost )),
428
+ i .Id , i .ResourceType , i .Region , i .Platform , fmt .Sprintf ("%s" , utils .FormatPriceFloat (totalSaving )),
429
+ d .DeviceId , d .ResourceType , d .Runtime , fmt .Sprintf ("%s" , utils .FormatPriceFloat (d .CurrentCost )), fmt .Sprintf ("%s" , utils .FormatPriceFloat (d .RightSizedCost )), fmt .Sprintf ("%s" , utils .FormatPriceFloat (d .CurrentCost - d .RightSizedCost )),
430
430
p .Key , p .Current , p .Average , p .Max , p .Recommended ,
431
431
})
432
432
}
0 commit comments