Passed
Pull Request — master (#52)
by Stefano
02:05
created

pkg/common/test/util.go   A

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 9
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A test.MustParseUrl 0 7 2
1
package test
2
3
import (
4
	"net/url"
5
	"testing"
6
)
7
8
func MustParseUrl(t *testing.T, rawurl string) *url.URL {
0 ignored issues
show
introduced by
exported function MustParseUrl should have comment or be unexported
Loading history...
introduced by
func MustParseUrl should be MustParseURL
Loading history...
9
	u, err := url.Parse(rawurl)
10
	if err != nil {
11
		t.Fatalf("failed to parse url: %s", rawurl)
12
	}
13
14
	return u
15
}
16