From 8696b42178f2d532daec29ddbc1c10776218e403 Mon Sep 17 00:00:00 2001 From: Casey Lee Date: Tue, 25 Feb 2020 16:58:26 -0800 Subject: [PATCH] gofmt --- CODEOWNERS | 1 + pkg/common/cartesian_test.go | 6 +++--- pkg/runner/expression_test.go | 10 +++++----- 3 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 CODEOWNERS diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 00000000..fc4de1d2 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @cplee diff --git a/pkg/common/cartesian_test.go b/pkg/common/cartesian_test.go index 07450f50..a2add69b 100644 --- a/pkg/common/cartesian_test.go +++ b/pkg/common/cartesian_test.go @@ -9,9 +9,9 @@ import ( func TestCartisianProduct(t *testing.T) { assert := assert.New(t) input := map[string][]interface{}{ - "foo": []interface{}{1, 2, 3, 4}, - "bar": []interface{}{"a", "b", "c"}, - "baz": []interface{}{false, true}, + "foo": {1, 2, 3, 4}, + "bar": {"a", "b", "c"}, + "baz": {false, true}, } output := CartesianProduct(input) diff --git a/pkg/runner/expression_test.go b/pkg/runner/expression_test.go index ec47907a..70f608f6 100644 --- a/pkg/runner/expression_test.go +++ b/pkg/runner/expression_test.go @@ -18,11 +18,11 @@ func TestEvaluate(t *testing.T) { Workflow: &model.Workflow{ Name: "test-workflow", Jobs: map[string]*model.Job{ - "job1": &model.Job{ + "job1": { Strategy: &model.Strategy{ Matrix: map[string][]interface{}{ - "os": []interface{}{"Linux", "Windows"}, - "foo": []interface{}{"bar", "baz"}, + "os": {"Linux", "Windows"}, + "foo": {"bar", "baz"}, }, }, }, @@ -34,7 +34,7 @@ func TestEvaluate(t *testing.T) { "foo": "bar", }, StepResults: map[string]*stepResult{ - "id1": &stepResult{ + "id1": { Outputs: map[string]string{ "foo": "bar", }, @@ -106,7 +106,7 @@ func TestInterpolate(t *testing.T) { Workflow: &model.Workflow{ Name: "test-workflow", Jobs: map[string]*model.Job{ - "job1": &model.Job{}, + "job1": {}, }, }, },