diff --git a/internal/cmd/server/describe.go b/internal/cmd/server/describe.go index ec385bad..8420276c 100644 --- a/internal/cmd/server/describe.go +++ b/internal/cmd/server/describe.go @@ -112,7 +112,7 @@ var DescribeCmd = base.DescribeCmd{ } cmd.Printf(" - ID:\t\t%d\n", volume.ID) cmd.Printf(" Name:\t%s\n", volume.Name) - cmd.Printf(" Size:\t%s\n", humanize.Bytes(uint64(volume.Size*humanize.GByte))) + cmd.Printf(" Size:\t%s\n", humanize.Bytes(uint64(volume.Size)*humanize.GByte)) } } else { cmd.Printf(" No Volumes\n") diff --git a/internal/cmd/volume/describe.go b/internal/cmd/volume/describe.go index 44c292d2..55c9b466 100644 --- a/internal/cmd/volume/describe.go +++ b/internal/cmd/volume/describe.go @@ -30,7 +30,7 @@ var DescribeCmd = base.DescribeCmd{ cmd.Printf("ID:\t\t%d\n", volume.ID) cmd.Printf("Name:\t\t%s\n", volume.Name) cmd.Printf("Created:\t%s (%s)\n", util.Datetime(volume.Created), humanize.Time(volume.Created)) - cmd.Printf("Size:\t\t%s\n", humanize.Bytes(uint64(volume.Size*humanize.GByte))) + cmd.Printf("Size:\t\t%s\n", humanize.Bytes(uint64(volume.Size)*humanize.GByte)) cmd.Printf("Linux Device:\t%s\n", volume.LinuxDevice) cmd.Printf("Location:\n") cmd.Printf(" Name:\t\t%s\n", volume.Location.Name) diff --git a/internal/cmd/volume/list.go b/internal/cmd/volume/list.go index ab5885e7..713e14d5 100644 --- a/internal/cmd/volume/list.go +++ b/internal/cmd/volume/list.go @@ -48,7 +48,7 @@ var ListCmd = base.ListCmd{ })). AddFieldFn("size", output.FieldFn(func(obj interface{}) string { volume := obj.(*hcloud.Volume) - return humanize.Bytes(uint64(volume.Size * humanize.GByte)) + return humanize.Bytes(uint64(volume.Size) * humanize.GByte) })). AddFieldFn("location", output.FieldFn(func(obj interface{}) string { volume := obj.(*hcloud.Volume)