pdion891 commented on issue #94:
URL:
https://github.com/apache/cloudstack-cloudmonkey/issues/94#issuecomment-910436978
The #95 make reading better than before but I think it would be cleaner if
we could get a more human interpreted version.
is such code could help ?
```
func convert(i int64) string {
v := []string{"B", "KB", "MB", "GB", "TB", "PB", "EB"}
l := 0
for ; i > 1024; i = i / 1024 {
l++
}
return fmt.Sprintf("%d %s", i, v[l])
}
```
This could work for any field that are `size` or `memory`, but cannot be
use for all integer type because that would not make sense for cpu count as
example.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]