~rogpeppe/juju-core/azure

« back to all changes in this revision

Viewing changes to juju/ec2/config.go

  • Committer: Roger Peppe
  • Date: 2011-12-16 15:00:59 UTC
  • mfrom: (19.5.10 go-juju-ec2-operations)
  • Revision ID: roger.peppe@canonical.com-20111216150059-tub7ijgbfhw54h2o
mergeĀ go-juju-ec2-operations

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
// providerConfig is a placeholder for any config information
10
10
// that we will have in a configuration file.
11
11
type providerConfig struct {
12
 
        region aws.Region
 
12
        region string
13
13
        auth   aws.Auth
14
14
}
15
15
 
62
62
                        }
63
63
 
64
64
                        regionName := maybeString(m["region"], "us-east-1")
65
 
                        if r, ok := Regions[regionName]; ok {
66
 
                                c.region = r
67
 
                        } else {
 
65
                        if _, ok := Regions[regionName]; !ok {
68
66
                                return nil, fmt.Errorf("invalid region name %q", regionName)
69
67
                        }
 
68
                        c.region = regionName
70
69
                        return &c, nil
71
70
                }),
72
71
        )