Skip to content

Commit

Permalink
volume: remove method name from error context
Browse files Browse the repository at this point in the history
  • Loading branch information
achu-1612 committed Aug 30, 2024
1 parent d284c45 commit d6269c1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/resources/resource_volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,23 +372,23 @@ func resourceMetalVolumeRead(d *schema.ResourceData, meta interface{}) (err erro
}

if err = d.Set(vSizeInUse, math.Round(float64(volume.CapacityUsed)/KiBToGBConversion)); err != nil {
return fmt.Errorf("resourceMetalVolumeRead: set %s : %v", vSizeInUse, err)
return fmt.Errorf("set %s : %v", vSizeInUse, err)
}

if err := d.Set(vActiveSite, volume.ActiveSite); err != nil {
return fmt.Errorf("resourceMetalVolumeRead: set %s : %v", vActiveSite, err)
return fmt.Errorf("set %s : %v", vActiveSite, err)
}

if err := d.Set(vCreatedSite, volume.CreatedSite); err != nil {
return fmt.Errorf("resourceMetalVolumeRead: set %s : %v", vCreatedSite, err)
return fmt.Errorf("set %s : %v", vCreatedSite, err)
}

if err := d.Set(vUnManaged, volume.UnmanagedVolume); err != nil {
return fmt.Errorf("resourceMetalVolumeRead: set %s : %v", vUnManaged, err)
return fmt.Errorf("set %s : %v", vUnManaged, err)
}

if err := d.Set(vReplicationEnabled, volume.ReplicationEnabled); err != nil {
return fmt.Errorf("resourceMetalVolumeRead: set %s : %v", vReplicationEnabled, err)
return fmt.Errorf("set %s : %v", vReplicationEnabled, err)
}

d.Set(vName, volume.Name)
Expand Down

0 comments on commit d6269c1

Please sign in to comment.