Browse code

pkg/urlutil: don't compare to bool

Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>

unclejack authored on 2017/03/30 18:16:48
Showing 1 changed files
... ...
@@ -29,13 +29,13 @@ var (
29 29
 
30 30
 func TestValidGitTransport(t *testing.T) {
31 31
 	for _, url := range gitUrls {
32
-		if IsGitTransport(url) == false {
32
+		if !IsGitTransport(url) {
33 33
 			t.Fatalf("%q should be detected as valid Git prefix", url)
34 34
 		}
35 35
 	}
36 36
 
37 37
 	for _, url := range incompleteGitUrls {
38
-		if IsGitTransport(url) == true {
38
+		if IsGitTransport(url) {
39 39
 			t.Fatalf("%q should not be detected as valid Git prefix", url)
40 40
 		}
41 41
 	}
... ...
@@ -43,19 +43,19 @@ func TestValidGitTransport(t *testing.T) {
43 43
 
44 44
 func TestIsGIT(t *testing.T) {
45 45
 	for _, url := range gitUrls {
46
-		if IsGitURL(url) == false {
46
+		if !IsGitURL(url) {
47 47
 			t.Fatalf("%q should be detected as valid Git url", url)
48 48
 		}
49 49
 	}
50 50
 
51 51
 	for _, url := range incompleteGitUrls {
52
-		if IsGitURL(url) == false {
52
+		if !IsGitURL(url) {
53 53
 			t.Fatalf("%q should be detected as valid Git url", url)
54 54
 		}
55 55
 	}
56 56
 
57 57
 	for _, url := range invalidGitUrls {
58
-		if IsGitURL(url) == true {
58
+		if IsGitURL(url) {
59 59
 			t.Fatalf("%q should not be detected as valid Git prefix", url)
60 60
 		}
61 61
 	}
... ...
@@ -63,7 +63,7 @@ func TestIsGIT(t *testing.T) {
63 63
 
64 64
 func TestIsTransport(t *testing.T) {
65 65
 	for _, url := range transportUrls {
66
-		if IsTransportURL(url) == false {
66
+		if !IsTransportURL(url) {
67 67
 			t.Fatalf("%q should be detected as valid Transport url", url)
68 68
 		}
69 69
 	}