From b01f381b2469b8a01aed81d6c3a720646024220d Mon Sep 17 00:00:00 2001 From: stormcat24 Date: Mon, 14 Dec 2015 21:34:30 +0900 Subject: [PATCH 1/5] Support for passing parameter #37 --- Godeps/Godeps.json | 48 ++++++++++++------------ README.md | 22 ++++++++++- bluegreen/bluegreen.go | 30 ++++++++++----- operation/bluegreen.go | 13 ++++--- operation/commands.go | 9 ++++- operation/service.go | 20 ++++++---- operation/task.go | 18 +++++---- operation/version.go | 2 +- service/schema.go | 10 +++-- service/service.go | 16 ++++++-- task/schema.go | 39 +++++++++++--------- task/task.go | 15 ++++++-- util/util.go | 46 ++++++++++++++++++++--- util/util_test.go | 84 +++++++++++++++++++++++++++++++++++++++++- 14 files changed, 282 insertions(+), 90 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 9378354..c9c43d0 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -12,63 +12,63 @@ }, { "ImportPath": "github.com/aws/aws-sdk-go/aws", - "Comment": "v0.10.1-2-g2a76bd5", - "Rev": "2a76bd5c7daceae9b072d5070d555bde8c6f17d7" + "Comment": "v1.0.4", + "Rev": "999b1591218c36d5050d1ba7266eba956e65965f" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/endpoints", - "Comment": "v0.10.1-2-g2a76bd5", - "Rev": "2a76bd5c7daceae9b072d5070d555bde8c6f17d7" + "Comment": "v1.0.4", + "Rev": "999b1591218c36d5050d1ba7266eba956e65965f" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "Comment": "v0.10.1-2-g2a76bd5", - "Rev": "2a76bd5c7daceae9b072d5070d555bde8c6f17d7" + "Comment": "v1.0.4", + "Rev": "999b1591218c36d5050d1ba7266eba956e65965f" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "Comment": "v0.10.1-2-g2a76bd5", - "Rev": "2a76bd5c7daceae9b072d5070d555bde8c6f17d7" + "Comment": "v1.0.4", + "Rev": "999b1591218c36d5050d1ba7266eba956e65965f" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/query", - "Comment": "v0.10.1-2-g2a76bd5", - "Rev": "2a76bd5c7daceae9b072d5070d555bde8c6f17d7" + "Comment": "v1.0.4", + "Rev": "999b1591218c36d5050d1ba7266eba956e65965f" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/rest", - "Comment": "v0.10.1-2-g2a76bd5", - "Rev": "2a76bd5c7daceae9b072d5070d555bde8c6f17d7" + "Comment": "v1.0.4", + "Rev": "999b1591218c36d5050d1ba7266eba956e65965f" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "Comment": "v0.10.1-2-g2a76bd5", - "Rev": "2a76bd5c7daceae9b072d5070d555bde8c6f17d7" + "Comment": "v1.0.4", + "Rev": "999b1591218c36d5050d1ba7266eba956e65965f" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/signer/v4", - "Comment": "v0.10.1-2-g2a76bd5", - "Rev": "2a76bd5c7daceae9b072d5070d555bde8c6f17d7" + "Comment": "v1.0.4", + "Rev": "999b1591218c36d5050d1ba7266eba956e65965f" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/autoscaling", - "Comment": "v0.10.1-2-g2a76bd5", - "Rev": "2a76bd5c7daceae9b072d5070d555bde8c6f17d7" + "Comment": "v1.0.4", + "Rev": "999b1591218c36d5050d1ba7266eba956e65965f" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/ecs", - "Comment": "v0.10.1-2-g2a76bd5", - "Rev": "2a76bd5c7daceae9b072d5070d555bde8c6f17d7" + "Comment": "v1.0.4", + "Rev": "999b1591218c36d5050d1ba7266eba956e65965f" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/elb", - "Comment": "v0.10.1-2-g2a76bd5", - "Rev": "2a76bd5c7daceae9b072d5070d555bde8c6f17d7" + "Comment": "v1.0.4", + "Rev": "999b1591218c36d5050d1ba7266eba956e65965f" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/sns", - "Comment": "v0.10.1-2-g2a76bd5", - "Rev": "2a76bd5c7daceae9b072d5070d555bde8c6f17d7" + "Comment": "v1.0.4", + "Rev": "999b1591218c36d5050d1ba7266eba956e65965f" }, { "ImportPath": "github.com/codegangsta/cli", diff --git a/README.md b/README.md index 6abfc5a..3a86ffd 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ test-service: #### Keep desired_count at updating service If you modify value of `desired_count` by AWS Management Console or aws-cli, you'll fear override value of `desired_count` by ecs-formation. This value should be flexibly changed in the operation. - + If `keep_desired_count` is `true`, keep current `desired_count` at updating service. ```bash @@ -121,7 +121,7 @@ test-service: desired_count: 1 keep_desired_count: true ``` - + #### Manage Task Definitions @@ -216,6 +216,24 @@ chain_elb: standby_elb: test-internal-elb-standby ``` +### Others +#### Passing custom parameters + +You can use custom parameters. Define parameters in yaml file(task, service, bluegreen) as follows. + +```Ruby +nginx: + image: stormcat24/nginx:${NGINX_VERSION} + ports: + - 80:${NGINX_PORT} +``` + +You can set value for these parameters by using `-p` option. + +```bash +ecs-formation task -p NGINX_VERSION=1.0 -p NGINX_PORT=80 plan your-web-task +``` + License === See [LICENSE](LICENSE). diff --git a/bluegreen/bluegreen.go b/bluegreen/bluegreen.go index d8a56a0..43b028b 100644 --- a/bluegreen/bluegreen.go +++ b/bluegreen/bluegreen.go @@ -6,6 +6,7 @@ import ( "github.com/stormcat24/ecs-formation/aws" "github.com/stormcat24/ecs-formation/logger" "github.com/stormcat24/ecs-formation/service" + "github.com/stormcat24/ecs-formation/util" "github.com/str1ngs/ansi/color" "gopkg.in/yaml.v2" "io/ioutil" @@ -19,20 +20,21 @@ type BlueGreenController struct { ClusterController *service.ServiceController blueGreenMap map[string]*BlueGreen TargetResource string + params map[string]string } -func NewBlueGreenController(manager *aws.AwsManager, projectDir string, targetResource string) (*BlueGreenController, error) { +func NewBlueGreenController(manager *aws.AwsManager, projectDir string, targetResource string, params map[string]string) (*BlueGreenController, error) { - ccon, errcc := service.NewServiceController(manager, projectDir, "") - - if errcc != nil { - return nil, errcc + ccon, err := service.NewServiceController(manager, projectDir, "", params) + if err != nil { + return nil, err } con := &BlueGreenController{ manager: manager, ClusterController: ccon, TargetResource: targetResource, + params: params, } defs, errs := con.searchBlueGreen(projectDir) @@ -59,11 +61,16 @@ func (self *BlueGreenController) searchBlueGreen(projectDir string) (map[string] for _, file := range files { if !file.IsDir() && strings.HasSuffix(file.Name(), ".yml") { - content, _ := ioutil.ReadFile(clusterDir + "/" + file.Name()) + content, err := ioutil.ReadFile(clusterDir + "/" + file.Name()) + if err != nil { + return nil, err + } + + mergedYaml := util.MergeYamlWithParameters(content, self.params) tokens := filePattern.FindStringSubmatch(file.Name()) name := tokens[1] - bg, err := CreateBlueGreen(content) + bg, err := CreateBlueGreen(mergedYaml) if err != nil { return merged, err } @@ -74,11 +81,14 @@ func (self *BlueGreenController) searchBlueGreen(projectDir string) (map[string] return merged, nil } -func CreateBlueGreen(data []byte) (*BlueGreen, error) { +func CreateBlueGreen(data string) (*BlueGreen, error) { bg := &BlueGreen{} - err := yaml.Unmarshal(data, bg) - return bg, err + if err := yaml.Unmarshal([]byte(data), bg); err != nil { + return nil, errors.New(fmt.Sprintf("%v\n\n%v", err.Error(), data)) + } + + return bg, nil } func (self *BlueGreenController) GetBlueGreenMap() map[string]*BlueGreen { diff --git a/operation/bluegreen.go b/operation/bluegreen.go index f9da472..bae3b5b 100644 --- a/operation/bluegreen.go +++ b/operation/bluegreen.go @@ -45,6 +45,10 @@ var commandBluegreen = cli.Command{ Name: "json-output, jo", Usage: "Output json", }, + cli.StringSliceFlag{ + Name: "params, p", + Usage: "parameters", + }, }, Action: doBluegreen, } @@ -58,7 +62,7 @@ func doBluegreen(c *cli.Context) { os.Exit(1) } - operation, errSubCommand := createOperation(c.Args()) + operation, errSubCommand := createOperation(c) if errSubCommand != nil { logger.Main.Error(color.Red(errSubCommand.Error())) @@ -71,15 +75,14 @@ func doBluegreen(c *cli.Context) { os.Exit(1) } - bgController, errbgc := bluegreen.NewBlueGreenController(awsManager, projectDir, operation.TargetResource) - if errbgc != nil { - logger.Main.Error(color.Red(errbgc.Error())) + bgController, err := bluegreen.NewBlueGreenController(awsManager, projectDir, operation.TargetResource, operation.Params) + if err != nil { + logger.Main.Error(color.Red(err.Error())) os.Exit(1) } jsonOutput := c.Bool("json-output") bgPlans, err := createBlueGreenPlans(bgController, jsonOutput) - if err != nil { logger.Main.Error(color.Red(err.Error())) os.Exit(1) diff --git a/operation/commands.go b/operation/commands.go index 1ae5a9c..6625ea0 100644 --- a/operation/commands.go +++ b/operation/commands.go @@ -5,6 +5,7 @@ import ( "github.com/codegangsta/cli" "github.com/stormcat24/ecs-formation/aws" + "github.com/stormcat24/ecs-formation/util" "log" "os" "strings" @@ -13,6 +14,7 @@ import ( type Operation struct { SubCommand string TargetResource string + Params map[string]string } var Commands = []cli.Command{ @@ -40,7 +42,9 @@ func buildAwsManager() (*aws.AwsManager, error) { return aws.NewAwsManager(region), nil } -func createOperation(args cli.Args) (Operation, error) { +func createOperation(c *cli.Context) (Operation, error) { + + args := c.Args() if len(args) == 0 { return Operation{}, fmt.Errorf("subcommand is not specified.") @@ -54,9 +58,12 @@ func createOperation(args cli.Args) (Operation, error) { targetResource = args[1] } + params := c.StringSlice("params") + return Operation{ SubCommand: sub, TargetResource: targetResource, + Params: util.ParseKeyValues(params), }, nil } else { return Operation{}, fmt.Errorf("'%s' is invalid subcommand.", sub) diff --git a/operation/service.go b/operation/service.go index d9e1696..776cda0 100644 --- a/operation/service.go +++ b/operation/service.go @@ -12,16 +12,18 @@ import ( ) var commandService = cli.Command{ - Name: "service", - Usage: "Manage ECS services on cluster", - Description: ` - Manage services on ECS cluster. -`, + Name: "service", + Usage: "Manage ECS services on cluster", + Description: "Manage services on ECS cluster.", Flags: []cli.Flag{ cli.BoolFlag{ Name: "json-output, jo", Usage: "Output json", }, + cli.StringSliceFlag{ + Name: "params, p", + Usage: "parameters", + }, }, Action: doService, } @@ -35,7 +37,7 @@ func doService(c *cli.Context) { os.Exit(1) } - operation, errSubCommand := createOperation(c.Args()) + operation, errSubCommand := createOperation(c) if errSubCommand != nil { logger.Main.Error(color.Red(errSubCommand.Error())) @@ -49,7 +51,11 @@ func doService(c *cli.Context) { } jsonOutput := c.Bool("json-output") - clusterController, err := service.NewServiceController(awsManager, projectDir, operation.TargetResource) + clusterController, err := service.NewServiceController(awsManager, projectDir, operation.TargetResource, operation.Params) + if err != nil { + logger.Main.Error(color.Red(err.Error())) + os.Exit(1) + } plans, err := createClusterPlans(clusterController, projectDir, jsonOutput) diff --git a/operation/task.go b/operation/task.go index d548091..1c7da61 100644 --- a/operation/task.go +++ b/operation/task.go @@ -11,11 +11,15 @@ import ( ) var commandTask = cli.Command{ - Name: "task", - Usage: "Manage ECS Task Definitions", - Description: ` - Manage ECS Task Definitions. -`, + Name: "task", + Usage: "Manage ECS Task Definitions", + Description: "Manage ECS Task Definitions.", + Flags: []cli.Flag{ + cli.StringSliceFlag{ + Name: "params, p", + Usage: "parameters", + }, + }, Action: doTask, } @@ -28,7 +32,7 @@ func doTask(c *cli.Context) { os.Exit(1) } - operation, errSubCommand := createOperation(c.Args()) + operation, errSubCommand := createOperation(c) if errSubCommand != nil { logger.Main.Error(color.Red(errSubCommand.Error())) @@ -41,7 +45,7 @@ func doTask(c *cli.Context) { os.Exit(1) } - taskController, err := task.NewTaskDefinitionController(awsManager, projectDir, operation.TargetResource) + taskController, err := task.NewTaskDefinitionController(awsManager, projectDir, operation.TargetResource, operation.Params) if err != nil { logger.Main.Error(color.Red(err.Error())) os.Exit(1) diff --git a/operation/version.go b/operation/version.go index a3f6bca..2639d04 100644 --- a/operation/version.go +++ b/operation/version.go @@ -1,3 +1,3 @@ package operation -const Version string = "0.1.11" +const Version string = "0.1.12" diff --git a/service/schema.go b/service/schema.go index 3ff4f17..074d6f7 100644 --- a/service/schema.go +++ b/service/schema.go @@ -1,6 +1,8 @@ package service import ( + "errors" + "fmt" "gopkg.in/yaml.v2" ) @@ -46,15 +48,17 @@ type LoadBalancer struct { ContainerPort int64 `yaml:"container_port"` } -func CreateServiceMap(data []byte) (map[string]Service, error) { +func CreateServiceMap(data string) (map[string]Service, error) { servicesMap := map[string]Service{} - err := yaml.Unmarshal(data, &servicesMap) + if err := yaml.Unmarshal([]byte(data), &servicesMap); err != nil { + return nil, errors.New(fmt.Sprintf("%v\n\n%v", err.Error(), data)) + } for name, service := range servicesMap { service.Name = name servicesMap[name] = service } - return servicesMap, err + return servicesMap, nil } diff --git a/service/service.go b/service/service.go index e576cb3..e2dca16 100644 --- a/service/service.go +++ b/service/service.go @@ -27,12 +27,14 @@ type ServiceController struct { manager *aws.AwsManager TargetResource string clusters []Cluster + params map[string]string } -func NewServiceController(manager *aws.AwsManager, projectDir string, targetResource string) (*ServiceController, error) { +func NewServiceController(manager *aws.AwsManager, projectDir string, targetResource string, params map[string]string) (*ServiceController, error) { con := &ServiceController{ manager: manager, + params: params, } clusters, err := con.searchServices(projectDir) @@ -64,12 +66,20 @@ func (self *ServiceController) searchServices(projectDir string) ([]Cluster, err for _, file := range files { if !file.IsDir() && strings.HasSuffix(file.Name(), ".yml") { - content, _ := ioutil.ReadFile(clusterDir + "/" + file.Name()) + content, err := ioutil.ReadFile(clusterDir + "/" + file.Name()) + if err != nil { + return []Cluster{}, err + } + + merged := util.MergeYamlWithParameters(content, self.params) tokens := filePattern.FindStringSubmatch(file.Name()) clusterName := tokens[1] - serviceMap, _ := CreateServiceMap(content) + serviceMap, err := CreateServiceMap(merged) + if err != nil { + return []Cluster{}, err + } cluster := Cluster{ Name: clusterName, Services: serviceMap, diff --git a/task/schema.go b/task/schema.go index 093828d..c1f1d68 100644 --- a/task/schema.go +++ b/task/schema.go @@ -1,34 +1,37 @@ package task import ( + "errors" + "fmt" "gopkg.in/yaml.v2" ) type TaskDefinition struct { - - Name string + Name string ContainerDefinitions map[string]*ContainerDefinition } type ContainerDefinition struct { - Name string - Image string `yaml:"image"` - Ports []string `yaml:"ports"` - Environment map[string]string `yaml:"environment"` - Links []string `yaml:"links"` - Volumes []string `yaml:"volumes"` - VolumesFrom []string `yaml:"volumes_from"` - Memory int64 `yaml:"memory"` - CpuUnits int64 `yaml:"cpu_units"` - Essential bool `yaml:"essential"` - EntryPoint string `yaml:"entry_point"` - Command string `yaml:"command"` + Name string + Image string `yaml:"image"` + Ports []string `yaml:"ports"` + Environment map[string]string `yaml:"environment"` + Links []string `yaml:"links"` + Volumes []string `yaml:"volumes"` + VolumesFrom []string `yaml:"volumes_from"` + Memory int64 `yaml:"memory"` + CpuUnits int64 `yaml:"cpu_units"` + Essential bool `yaml:"essential"` + EntryPoint string `yaml:"entry_point"` + Command string `yaml:"command"` } -func CreateTaskDefinition(taskDefName string, data []byte) (*TaskDefinition, error) { +func CreateTaskDefinition(taskDefName string, data string) (*TaskDefinition, error) { containerMap := map[string]ContainerDefinition{} - err := yaml.Unmarshal(data, &containerMap) + if err := yaml.Unmarshal([]byte(data), &containerMap); err != nil { + return nil, errors.New(fmt.Sprintf("%v\n\n%v", err.Error(), data)) + } containers := map[string]*ContainerDefinition{} for name, container := range containerMap { @@ -38,9 +41,9 @@ func CreateTaskDefinition(taskDefName string, data []byte) (*TaskDefinition, err } taskDef := TaskDefinition{ - Name: taskDefName, + Name: taskDefName, ContainerDefinitions: containers, } - return &taskDef, err + return &taskDef, nil } diff --git a/task/task.go b/task/task.go index cd7cf4c..adea163 100644 --- a/task/task.go +++ b/task/task.go @@ -18,12 +18,14 @@ type TaskDefinitionController struct { manager *efaws.AwsManager TargetResource string defmap map[string]*TaskDefinition + params map[string]string } -func NewTaskDefinitionController(manager *efaws.AwsManager, projectDir string, targetResource string) (*TaskDefinitionController, error) { +func NewTaskDefinitionController(manager *efaws.AwsManager, projectDir string, targetResource string, params map[string]string) (*TaskDefinitionController, error) { con := &TaskDefinitionController{ manager: manager, + params: params, } defmap, err := con.searchTaskDefinitions(projectDir) @@ -58,12 +60,19 @@ func (self *TaskDefinitionController) searchTaskDefinitions(projectDir string) ( for _, file := range files { if !file.IsDir() && strings.HasSuffix(file.Name(), ".yml") { - content, _ := ioutil.ReadFile(taskDir + "/" + file.Name()) + content, err := ioutil.ReadFile(taskDir + "/" + file.Name()) + if err != nil { + return nil, err + } + merged := util.MergeYamlWithParameters(content, self.params) tokens := filePattern.FindStringSubmatch(file.Name()) taskDefName := tokens[1] - taskDefinition, _ := CreateTaskDefinition(taskDefName, content) + taskDefinition, err := CreateTaskDefinition(taskDefName, merged) + if err != nil { + return nil, err + } taskDefMap[taskDefName] = taskDefinition } diff --git a/util/util.go b/util/util.go index a281e5e..9a66ea5 100644 --- a/util/util.go +++ b/util/util.go @@ -1,14 +1,19 @@ package util import ( - "github.com/aws/aws-sdk-go/aws/awsutil" - "strings" "bufio" - "io" "bytes" "fmt" + "github.com/aws/aws-sdk-go/aws/awsutil" + "io" + "regexp" + "strings" ) +var ( + keyValuePattern = regexp.MustCompile(`^\s*(.+)\s*=\s*(.+)\s*$`) + variablePattern = regexp.MustCompile(`\$\{([\w_-]+)\}`) +) func ConvertPointerString(values []string) []*string { @@ -45,7 +50,6 @@ func StringValueWithIndent(value interface{}, indent int) string { return buffer.String() } - func ToUpperCamel(s string) string { if len(s) == 0 { @@ -55,4 +59,36 @@ func ToUpperCamel(s string) string { prefix := s[0:1] suffix := s[1:len(s)] return fmt.Sprintf("%s%s", strings.ToUpper(prefix), suffix) -} \ No newline at end of file +} + +func ParseKeyValues(slice []string) map[string]string { + + params := slice + values := map[string]string{} + for _, p := range params { + tokens := keyValuePattern.FindStringSubmatch(p) + if len(tokens) == 3 { + key := strings.Trim(tokens[1], " ") + values[key] = strings.Trim(tokens[2], " ") + } + } + + return values +} + +func MergeYamlWithParameters(content []byte, params map[string]string) string { + + s := string(content) + matched := variablePattern.FindAllStringSubmatch(s, -1) + + for _, tokens := range matched { + key := tokens[1] + + if value, ok := params[key]; ok { + s = strings.Replace(s, fmt.Sprintf("${%v}", key), value, -1) + } else { + s = strings.Replace(s, tokens[0], "", -1) + } + } + return s +} diff --git a/util/util_test.go b/util/util_test.go index 50c791e..24b375e 100644 --- a/util/util_test.go +++ b/util/util_test.go @@ -14,7 +14,7 @@ func TestConvertPointerString(t *testing.T) { actual := ConvertPointerString(input) if len(input) != len(actual) { - t.Errorf("expect length = %d, but actual length = %d", len(input), len(actual)) + t.Fatalf("expect length = %d, but actual length = %d", len(input), len(actual)) } if &input[0] != actual[0] { @@ -26,3 +26,85 @@ func TestConvertPointerString(t *testing.T) { } } + +func TestParseKeyValues(t *testing.T) { + + input := []string{ + "key1=value1", + "key2= value2 ", + "key3 = value3", + " key4 = value4", + } + + actual := ParseKeyValues(input) + + if len(input) != len(actual) { + t.Fatalf("expect length = %d, but actual length = %d", len(input), len(actual)) + } + + if value, ok := actual["key1"]; ok { + if value != "value1" { + t.Errorf("expect[%v] is '%v', but actual is '%v'", "key1", "value1", value) + } + } else { + t.Errorf("actual do not include '%v'.", "key1") + } + + if value, ok := actual["key2"]; ok { + if value != "value2" { + t.Errorf("expect[%v] is '%v', but actual is '%v'", "key2", "value2", value) + } + } else { + t.Errorf("actual do not include '%v'.", "key2") + } + + if value, ok := actual["key3"]; ok { + if value != "value3" { + t.Errorf("expect[%v] is '%v', but actual is '%v'", "key3", "value3", value) + } + } else { + t.Errorf("actual do not include '%v'.", "key3") + } + + if value, ok := actual["key4"]; ok { + if value != "value4" { + t.Errorf("expect[%v] is '%v', but actual is '%v'", "key4", "value4", value) + } + } else { + t.Errorf("actual do not include '%v'.", "key4") + } + +} + +func TestMergeYamlWithParameters(t *testing.T) { + + yaml := ` + nginx: + image: stormcat24/nginx:${NGINX_VERSION} + ports: + - 80:${NGINX_PORT} + environment: + PARAM: "${PARAM}" + ` + + expect := ` + nginx: + image: stormcat24/nginx:latest + ports: + - 80:80 + environment: + PARAM: "" + ` + + params := map[string]string{ + "NGINX_VERSION": "latest", + "NGINX_PORT": "80", + } + + actual := MergeYamlWithParameters([]byte(yaml), params) + + if expect != actual { + t.Errorf("actula merged string is %v", actual) + } + +} From 102d9e8d128b375c0dd26616c9169033bd3abf51 Mon Sep 17 00:00:00 2001 From: stormcat24 Date: Mon, 14 Dec 2015 21:39:01 +0900 Subject: [PATCH 2/5] update Godep --- Godeps/Godeps.json | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index c9c43d0..4b10e58 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,6 +1,6 @@ { "ImportPath": "github.com/stormcat24/ecs-formation", - "GoVersion": "go1.5.1", + "GoVersion": "go1.5.2", "Packages": [ "github.com/stormcat24/ecs-formation/..." ], @@ -50,6 +50,11 @@ "Comment": "v1.0.4", "Rev": "999b1591218c36d5050d1ba7266eba956e65965f" }, + { + "ImportPath": "github.com/aws/aws-sdk-go/private/waiter", + "Comment": "v1.0.4", + "Rev": "999b1591218c36d5050d1ba7266eba956e65965f" + }, { "ImportPath": "github.com/aws/aws-sdk-go/service/autoscaling", "Comment": "v1.0.4", @@ -75,6 +80,20 @@ "Comment": "1.2.0-74-g50c77ec", "Rev": "50c77ecec0068c9aef9d90ae0fd0fdf410041da3" }, + { + "ImportPath": "github.com/go-ini/ini", + "Comment": "v0-48-g060d7da", + "Rev": "060d7da055ba6ec5ea7a31f116332fe5efa04ce0" + }, + { + "ImportPath": "github.com/jmespath/go-jmespath", + "Comment": "0.2.1", + "Rev": "53d419364047eb08a64c29471db23c60ea585b85" + }, + { + "ImportPath": "github.com/mattn/go-shellwords", + "Rev": "f4e566c536cf69158e808ec28ef4182a37fdc981" + }, { "ImportPath": "github.com/naoina/go-stringutil", "Rev": "360db0db4b01d34e12a2ec042c09e7d37fece761" @@ -83,10 +102,6 @@ "ImportPath": "github.com/str1ngs/ansi/color", "Rev": "5dc1bc5ac1f5bcbf5bd4818dd27ef912beb4bb7c" }, - { - "ImportPath": "github.com/vaughan0/go-ini", - "Rev": "a98ad7ee00ec53921f08832bc06ecf7fd600e6a1" - }, { "ImportPath": "gopkg.in/yaml.v2", "Rev": "7ad95dd0798a40da1ccdff6dff35fd177b5edf40" From 7786bd3f8941f73006cbe438f17c2ca8845c69fd Mon Sep 17 00:00:00 2001 From: stormcat24 Date: Mon, 14 Dec 2015 21:42:32 +0900 Subject: [PATCH 3/5] go1.5.2 --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index e788308..ce17137 100644 --- a/circle.yml +++ b/circle.yml @@ -1,6 +1,6 @@ machine: environment: - GO_VERSION: 1.5.1 + GO_VERSION: 1.5.2 dependencies: pre: From fa2905a5b29a778864f36810874c37c03989ea26 Mon Sep 17 00:00:00 2001 From: stormcat24 Date: Mon, 14 Dec 2015 21:49:25 +0900 Subject: [PATCH 4/5] updated logrus --- Godeps/Godeps.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 4b10e58..cfdf370 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -7,8 +7,8 @@ "Deps": [ { "ImportPath": "github.com/Sirupsen/logrus", - "Comment": "v0.8.3-3-g07d998d", - "Rev": "07d998d174c4e2dc90e2f1989a20724220bca1ff" + "Comment": "v0.8.7-53-g446d1c1", + "Rev": "446d1c146faa8ed3f4218f056fcd165f6bcfda81" }, { "ImportPath": "github.com/aws/aws-sdk-go/aws", From 838a37aeae1e79e47896af20dcec7643f9c94b4e Mon Sep 17 00:00:00 2001 From: stormcat24 Date: Mon, 14 Dec 2015 21:54:03 +0900 Subject: [PATCH 5/5] add deps --- Godeps/Godeps.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index cfdf370..260694d 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -10,6 +10,10 @@ "Comment": "v0.8.7-53-g446d1c1", "Rev": "446d1c146faa8ed3f4218f056fcd165f6bcfda81" }, + { + "ImportPath": "golang.org/x/sys/unix", + "Rev": "833a04a10549a95dc34458c195cbad61bbb6cb4d" + }, { "ImportPath": "github.com/aws/aws-sdk-go/aws", "Comment": "v1.0.4",