summaryrefslogtreecommitdiff
path: root/add.go
diff options
context:
space:
mode:
Diffstat (limited to 'add.go')
-rw-r--r--add.go33
1 files changed, 1 insertions, 32 deletions
diff --git a/add.go b/add.go
index 6813aa8..d4bd08a 100644
--- a/add.go
+++ b/add.go
@@ -22,11 +22,6 @@ func (x *Hypervisor) SetMemoryGB(gb int) {
x.Memory = int64(gb * 1024 * 1024 * 1024)
}
-func (x *Hypervisor) GetMemoryPrintable() string {
- i := x.Memory / (1024 * 1024 * 1024)
- return fmt.Sprintf("%d GB", i)
-}
-
func (all *Droplets) oldFindDroplet(name string) *Droplet {
for _, d := range all.Droplets {
if d.Hostname == name {
@@ -111,7 +106,7 @@ func (c *NewCluster) AddDropletLocal(name string, hypername string) *Droplet {
d := &Droplet{
Hostname: name,
}
- d.LocalOnly = hypername
+ d.LocalOnly = "yes on: " + hypername
d.Current = new(Current)
d.Current.Hypervisor = hypername
d.StartState = DropletState_OFF
@@ -121,32 +116,6 @@ func (c *NewCluster) AddDropletLocal(name string, hypername string) *Droplet {
return d
}
-// 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)
- }
-
- kb := int(b / 1024)
- if kb < 2000 {
- return fmt.Sprintf("%d KB", kb)
- }
-
- mb := int(b / (1024 * 1024))
- if mb < 2000 {
- return fmt.Sprintf("%d MB", mb)
- }
-
- gb := int(b / (1024 * 1024 * 1024))
- if gb < 2000 {
- return fmt.Sprintf("%d GB", gb)
- }
-
- tb := int(b / (1024 * 1024 * 1024 * 1024))
- return fmt.Sprintf("%d TB", tb)
-}
-
func (c *NewCluster) BlankFields() {
loop := c.DropletsAll() // get the list of droplets
for loop.Scan() {