gofmt files

This commit is contained in:
Jake Champlin 2017-04-03 23:48:35 -04:00
parent 5576b35f48
commit 9e823d2bc7
No known key found for this signature in database
GPG Key ID: DC31F41958EF4AC2
4 changed files with 7 additions and 7 deletions

View File

@ -15,13 +15,13 @@ type Config struct {
}
type storageAttachment struct {
index int
index int
instanceName *compute.InstanceName
}
type OPCClient struct {
*compute.AuthenticatedClient
MaxRetryTimeout int
MaxRetryTimeout int
storageAttachmentsByVolumeCache map[string][]storageAttachment
}
@ -38,8 +38,8 @@ func (c *Config) Client() (*OPCClient, error) {
}
opcClient := &OPCClient{
AuthenticatedClient: authenticatedClient,
MaxRetryTimeout: c.MaxRetryTimeout,
AuthenticatedClient: authenticatedClient,
MaxRetryTimeout: c.MaxRetryTimeout,
storageAttachmentsByVolumeCache: make(map[string][]storageAttachment),
}

View File

@ -212,7 +212,7 @@ func getStorageAttachments(d *schema.ResourceData) []compute.LaunchPlanStorageAt
for _, i := range storage.List() {
attrs := i.(map[string]interface{})
storageAttachments = append(storageAttachments, compute.LaunchPlanStorageAttachmentSpec{
Index: attrs["index"].(int),
Index: attrs["index"].(int),
Volume: attrs["volume"].(string),
})
}

View File

@ -38,7 +38,7 @@ func resourceIPReservation() *schema.Resource {
ForceNew: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
"ip": &schema.Schema{
Type: schema.TypeString,
Optional: false,

View File

@ -278,7 +278,7 @@ func resourceStorageVolumeDelete(d *schema.ResourceData, meta interface{}) error
sva.DeleteStorageAttachment(attachment.Name)
sva.WaitForStorageAttachmentDeleted(attachment.Name, meta.(*OPCClient).MaxRetryTimeout)
attachmentsToCache[index] = storageAttachment{
index: attachment.Index,
index: attachment.Index,
instanceName: compute.InstanceNameFromString(attachment.InstanceName),
}
}