Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: guiyong.ou <guiyong.ou@daocloud.io>

Kubernetes-commit: aa6d0f5bb0b5cf9aae239b6a439302fc11c4a89e
  • Loading branch information
HeavenTonight authored and k8s-publishing-bot committed Jul 24, 2022
1 parent 8fccf3d commit 3e07d25
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/util/errors/errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func TestAggregateWithNil(t *testing.T) {
}

func TestSingularAggregate(t *testing.T) {
var slice []error = []error{fmt.Errorf("err")}
var slice = []error{fmt.Errorf("err")}
var agg Aggregate
var err error

Expand Down Expand Up @@ -121,7 +121,7 @@ func TestSingularAggregate(t *testing.T) {
}

func TestPluralAggregate(t *testing.T) {
var slice []error = []error{fmt.Errorf("abc"), fmt.Errorf("123")}
var slice = []error{fmt.Errorf("abc"), fmt.Errorf("123")}
var agg Aggregate
var err error

Expand Down Expand Up @@ -149,7 +149,7 @@ func TestPluralAggregate(t *testing.T) {
}

func TestDedupeAggregate(t *testing.T) {
var slice []error = []error{fmt.Errorf("abc"), fmt.Errorf("abc")}
var slice = []error{fmt.Errorf("abc"), fmt.Errorf("abc")}
var agg Aggregate

agg = NewAggregate(slice)
Expand All @@ -165,7 +165,7 @@ func TestDedupeAggregate(t *testing.T) {
}

func TestDedupePluralAggregate(t *testing.T) {
var slice []error = []error{fmt.Errorf("abc"), fmt.Errorf("abc"), fmt.Errorf("123")}
var slice = []error{fmt.Errorf("abc"), fmt.Errorf("abc"), fmt.Errorf("123")}
var agg Aggregate

agg = NewAggregate(slice)
Expand All @@ -181,7 +181,7 @@ func TestDedupePluralAggregate(t *testing.T) {
}

func TestFlattenAndDedupeAggregate(t *testing.T) {
var slice []error = []error{fmt.Errorf("abc"), fmt.Errorf("abc"), NewAggregate([]error{fmt.Errorf("abc")})}
var slice = []error{fmt.Errorf("abc"), fmt.Errorf("abc"), NewAggregate([]error{fmt.Errorf("abc")})}
var agg Aggregate

agg = NewAggregate(slice)
Expand All @@ -197,7 +197,7 @@ func TestFlattenAndDedupeAggregate(t *testing.T) {
}

func TestFlattenAggregate(t *testing.T) {
var slice []error = []error{fmt.Errorf("abc"), fmt.Errorf("abc"), NewAggregate([]error{fmt.Errorf("abc"), fmt.Errorf("def"), NewAggregate([]error{fmt.Errorf("def"), fmt.Errorf("ghi")})})}
var slice = []error{fmt.Errorf("abc"), fmt.Errorf("abc"), NewAggregate([]error{fmt.Errorf("abc"), fmt.Errorf("def"), NewAggregate([]error{fmt.Errorf("def"), fmt.Errorf("ghi")})})}
var agg Aggregate

agg = NewAggregate(slice)
Expand Down

0 comments on commit 3e07d25

Please sign in to comment.