Run go fmt on VMWare vCloud Director provider

This commit is contained in:
clint shryock 2015-12-07 15:24:34 -06:00
parent c95667ce99
commit d69abbaeda
3 changed files with 17 additions and 17 deletions

View File

@ -8,11 +8,11 @@ import (
) )
type Config struct { type Config struct {
User string User string
Password string Password string
Org string Org string
Href string Href string
VDC string VDC string
MaxRetryTimeout int MaxRetryTimeout int
} }
@ -28,8 +28,8 @@ func (c *Config) Client() (*VCDClient, error) {
} }
vcdclient := &VCDClient{ vcdclient := &VCDClient{
govcd.NewVCDClient(*u), govcd.NewVCDClient(*u),
c.MaxRetryTimeout} c.MaxRetryTimeout}
org, vcd, err := vcdclient.Authenticate(c.User, c.Password, c.Org, c.VDC) org, vcd, err := vcdclient.Authenticate(c.User, c.Password, c.Org, c.VDC)
if err != nil { if err != nil {
return nil, fmt.Errorf("Something went wrong: %s", err) return nil, fmt.Errorf("Something went wrong: %s", err)

View File

@ -66,11 +66,11 @@ func Provider() terraform.ResourceProvider {
func providerConfigure(d *schema.ResourceData) (interface{}, error) { func providerConfigure(d *schema.ResourceData) (interface{}, error) {
config := Config{ config := Config{
User: d.Get("user").(string), User: d.Get("user").(string),
Password: d.Get("password").(string), Password: d.Get("password").(string),
Org: d.Get("org").(string), Org: d.Get("org").(string),
Href: d.Get("url").(string), Href: d.Get("url").(string),
VDC: d.Get("vdc").(string), VDC: d.Get("vdc").(string),
MaxRetryTimeout: d.Get("maxRetryTimeout").(int), MaxRetryTimeout: d.Get("maxRetryTimeout").(int),
} }

View File

@ -72,11 +72,11 @@ func testAccCheckVcdFirewallRulesAttributes(newRules, existingRules *govcd.EdgeG
func createFirewallRulesConfigs(existingRules *govcd.EdgeGateway) string { func createFirewallRulesConfigs(existingRules *govcd.EdgeGateway) string {
config := Config{ config := Config{
User: os.Getenv("VCD_USER"), User: os.Getenv("VCD_USER"),
Password: os.Getenv("VCD_PASSWORD"), Password: os.Getenv("VCD_PASSWORD"),
Org: os.Getenv("VCD_ORG"), Org: os.Getenv("VCD_ORG"),
Href: os.Getenv("VCD_URL"), Href: os.Getenv("VCD_URL"),
VDC: os.Getenv("VCD_VDC"), VDC: os.Getenv("VCD_VDC"),
MaxRetryTimeout: 240, MaxRetryTimeout: 240,
} }
conn, err := config.Client() conn, err := config.Client()