pkg/urlutil: don't compare to bool
@@ -29,13 +29,13 @@ var (
func TestValidGitTransport(t *testing.T) {
for _, url := range gitUrls {
- if IsGitTransport(url) == false {
+ if !IsGitTransport(url) {
t.Fatalf("%q should be detected as valid Git prefix", url)
}
}
for _, url := range incompleteGitUrls {
- if IsGitTransport(url) == true {
+ if IsGitTransport(url) {
t.Fatalf("%q should not be detected as valid Git prefix", url)
}
}
@@ -43,19 +43,19 @@ func TestValidGitTransport(t *testing.T) {
func TestIsGIT(t *testing.T) {
for _, url := range gitUrls {
- if IsGitURL(url) == false {
+ if !IsGitURL(url) {
t.Fatalf("%q should be detected as valid Git url", url)
}
}
for _, url := range incompleteGitUrls {
- if IsGitURL(url) == false {
+ if !IsGitURL(url) {
t.Fatalf("%q should be detected as valid Git url", url)
}
}
for _, url := range invalidGitUrls {
- if IsGitURL(url) == true {
+ if IsGitURL(url) {
t.Fatalf("%q should not be detected as valid Git prefix", url)
}
}
@@ -63,7 +63,7 @@ func TestIsGIT(t *testing.T) {
func TestIsTransport(t *testing.T) {
for _, url := range transportUrls {
- if IsTransportURL(url) == false {
+ if !IsTransportURL(url) {
t.Fatalf("%q should be detected as valid Transport url", url)
}
}
