virtigo can now replace libvirt xml files

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-10-23 16:06:02 -05:00
parent f3f3ca4f11
commit 0a9392be61
1 changed files with 3 additions and 1 deletions

View File

@ -116,7 +116,9 @@ func (c *Cluster) AddDroplet(uuid string, hostname string, cpus int, mem int) *D
return d
}
func FormatBytes(b int64) string {
// This isn't for the marketing department
// so this isn't going to use 'MiB' and 'GiB'
func HumanFormatBytes(b int64) string {
if b < 2000 {
return fmt.Sprintf("%d B", b)
}