Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1651)

Delta Between Two Patch Sets: juju/ec2/util.go

Issue 5449065: juju/ec2: add code to accept an ec2 region in the configuration file.
Left Patch Set: - Created 12 years, 3 months ago
Right Patch Set: - Created 12 years, 3 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « juju/ec2/suite_test.go ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 package ec2 1 package ec2
2 2
3 import ( 3 import (
4 "launchpad.net/juju/go/schema" 4 "launchpad.net/juju/go/schema"
5 ) 5 )
6 6
7 // this stuff could/should be in the schema package. 7 // this stuff could/should be in the schema package.
8 8
9 // checkerFunc defines a schema.Checker using a function that 9 // checkerFunc defines a schema.Checker using a function that
10 // implemenets scheme.Checker.Coerce. 10 // implemenets scheme.Checker.Coerce.
(...skipping 23 matching lines...) Expand all
34 34
35 // oneOf(a, b, c) is equivalent to (but less verbose than): 35 // oneOf(a, b, c) is equivalent to (but less verbose than):
36 // schema.OneOf(schema.Const(a), schema.Const(b), schema.Const(c)) 36 // schema.OneOf(schema.Const(a), schema.Const(b), schema.Const(c))
37 func oneOf(values ...interface{}) schema.Checker { 37 func oneOf(values ...interface{}) schema.Checker {
38 c := make([]schema.Checker, len(values)) 38 c := make([]schema.Checker, len(values))
39 for i, v := range values { 39 for i, v := range values {
40 c[i] = schema.Const(v) 40 c[i] = schema.Const(v)
41 } 41 }
42 return schema.OneOf(c...) 42 return schema.OneOf(c...)
43 } 43 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b