Skip to content

Commit

Permalink
updated cost calculation for digitalocean volumes
Browse files Browse the repository at this point in the history
Signed-off-by: bishal7679 <bishalhnj127@gmail.com>
  • Loading branch information
bishal7679 committed Nov 13, 2023
1 parent 1714ad4 commit 674789e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions providers/digitalocean/storage/volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
const createdLayout = "2006-01-02T15:04:05Z"

func Volumes(ctx context.Context, client providers.ProviderClient) ([]models.Resource, error) {
var hourlyPrice float64
resources := make([]models.Resource, 0)
volumes, _, err := client.DigitalOceanClient.Storage.ListVolumes(ctx, &godo.ListVolumeParams{})
if err != nil {
Expand All @@ -39,7 +38,8 @@ func Volumes(ctx context.Context, client providers.ProviderClient) ([]models.Res
})
}
}


var hourlyPrice float64
sizeInGB := volume.SizeGigaBytes
if sizeInGB <= 100 {
hourlyPrice = 0.015

Check failure on line 45 in providers/digitalocean/storage/volumes.go

View workflow job for this annotation

GitHub Actions / golangci-lint

ineffectual assignment to hourlyPrice (ineffassign)
Expand Down

0 comments on commit 674789e

Please sign in to comment.