Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit ff7a08b

Browse files
committed
integration-cli: fix golint issues
``` docker/integration-cli/checker/checker.go Line 12: warning: exported type Compare should have comment or be unexported (golint) Line 14: warning: exported function False should have comment or be unexported (golint) Line 20: warning: exported function True should have comment or be unexported (golint) Line 26: warning: exported function Equals should have comment or be unexported (golint) Line 32: warning: exported function Contains should have comment or be unexported (golint) Line 38: warning: exported function Not should have comment or be unexported (golint) Line 52: warning: exported function DeepEquals should have comment or be unexported (golint) Line 58: warning: exported function HasLen should have comment or be unexported (golint) Line 64: warning: exported function IsNil should have comment or be unexported (golint) Line 70: warning: exported function GreaterThan should have comment or be unexported (golint) Line 76: warning: exported function NotNil should have comment or be unexported (golint) ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 6397dd4d3123e0a1b89298d0a2cfe5388410a74f) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 06f11abf43216c24b21a0a6df5cc8dcea0f3c6a3 Component: engine
1 parent d66b815 commit ff7a08b

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

  • components/engine/integration-cli/checker

components/engine/integration-cli/checker/checker.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,38 @@ import (
99
"gotest.tools/assert/cmp"
1010
)
1111

12+
// Compare defines the interface to compare values
1213
type Compare func(x interface{}) assert.BoolOrComparison
1314

15+
// False checks if the value is false
1416
func False() Compare {
1517
return func(x interface{}) assert.BoolOrComparison {
1618
return !x.(bool)
1719
}
1820
}
1921

22+
// True checks if the value is true
2023
func True() Compare {
2124
return func(x interface{}) assert.BoolOrComparison {
2225
return x
2326
}
2427
}
2528

29+
// Equals checks if the value is equal to the given value
2630
func Equals(y interface{}) Compare {
2731
return func(x interface{}) assert.BoolOrComparison {
2832
return cmp.Equal(x, y)
2933
}
3034
}
3135

36+
// Contains checks if the value contains the given value
3237
func Contains(y interface{}) Compare {
3338
return func(x interface{}) assert.BoolOrComparison {
3439
return cmp.Contains(x, y)
3540
}
3641
}
3742

43+
// Not checks if two values are not
3844
func Not(c Compare) Compare {
3945
return func(x interface{}) assert.BoolOrComparison {
4046
r := c(x)
@@ -49,30 +55,30 @@ func Not(c Compare) Compare {
4955
}
5056
}
5157

58+
// DeepEquals checks if two values are equal
5259
func DeepEquals(y interface{}) Compare {
5360
return func(x interface{}) assert.BoolOrComparison {
5461
return cmp.DeepEqual(x, y)
5562
}
5663
}
5764

65+
// DeepEquals compares if two values are deepequal
5866
func HasLen(y int) Compare {
5967
return func(x interface{}) assert.BoolOrComparison {
6068
return cmp.Len(x, y)
6169
}
6270
}
6371

72+
// DeepEquals checks if the given value is nil
6473
func IsNil() Compare {
6574
return func(x interface{}) assert.BoolOrComparison {
6675
return cmp.Nil(x)
6776
}
6877
}
6978

79+
// GreaterThan checks if the value is greater than the given value
7080
func GreaterThan(y int) Compare {
7181
return func(x interface{}) assert.BoolOrComparison {
7282
return x.(int) > y
7383
}
7484
}
75-
76-
func NotNil() Compare {
77-
return Not(IsNil())
78-
}

0 commit comments

Comments
 (0)