Browse code

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>

Sebastiaan van Stijn authored on 2019/09/19 16:50:42
Showing 1 changed files
... ...
@@ -9,32 +9,38 @@ import (
9 9
 	"gotest.tools/assert/cmp"
10 10
 )
11 11
 
12
+// Compare defines the interface to compare values
12 13
 type Compare func(x interface{}) assert.BoolOrComparison
13 14
 
15
+// False checks if the value is false
14 16
 func False() Compare {
15 17
 	return func(x interface{}) assert.BoolOrComparison {
16 18
 		return !x.(bool)
17 19
 	}
18 20
 }
19 21
 
22
+// True checks if the value is true
20 23
 func True() Compare {
21 24
 	return func(x interface{}) assert.BoolOrComparison {
22 25
 		return x
23 26
 	}
24 27
 }
25 28
 
29
+// Equals checks if the value is equal to the given value
26 30
 func Equals(y interface{}) Compare {
27 31
 	return func(x interface{}) assert.BoolOrComparison {
28 32
 		return cmp.Equal(x, y)
29 33
 	}
30 34
 }
31 35
 
36
+// Contains checks if the value contains the given value
32 37
 func Contains(y interface{}) Compare {
33 38
 	return func(x interface{}) assert.BoolOrComparison {
34 39
 		return cmp.Contains(x, y)
35 40
 	}
36 41
 }
37 42
 
43
+// Not checks if two values are not
38 44
 func Not(c Compare) Compare {
39 45
 	return func(x interface{}) assert.BoolOrComparison {
40 46
 		r := c(x)
... ...
@@ -49,30 +55,30 @@ func Not(c Compare) Compare {
49 49
 	}
50 50
 }
51 51
 
52
+// DeepEquals checks if two values are equal
52 53
 func DeepEquals(y interface{}) Compare {
53 54
 	return func(x interface{}) assert.BoolOrComparison {
54 55
 		return cmp.DeepEqual(x, y)
55 56
 	}
56 57
 }
57 58
 
59
+// DeepEquals compares if two values are deepequal
58 60
 func HasLen(y int) Compare {
59 61
 	return func(x interface{}) assert.BoolOrComparison {
60 62
 		return cmp.Len(x, y)
61 63
 	}
62 64
 }
63 65
 
66
+// DeepEquals checks if the given value is nil
64 67
 func IsNil() Compare {
65 68
 	return func(x interface{}) assert.BoolOrComparison {
66 69
 		return cmp.Nil(x)
67 70
 	}
68 71
 }
69 72
 
73
+// GreaterThan checks if the value is greater than the given value
70 74
 func GreaterThan(y int) Compare {
71 75
 	return func(x interface{}) assert.BoolOrComparison {
72 76
 		return x.(int) > y
73 77
 	}
74 78
 }
75
-
76
-func NotNil() Compare {
77
-	return Not(IsNil())
78
-}