1 parent 70fc7e4 commit f56f194Copy full SHA for f56f194
1 file changed
urls.go
@@ -6,12 +6,16 @@ import (
6
)
7
8
func (s URLSet) First() *url.URL {
9
- if len(s) == 0 {
+ if s.Empty() {
10
return nil
11
}
12
return s[0]
13
14
15
+func (s URLSet) Empty() bool {
16
+ return len(s) == 0
17
+}
18
+
19
func appendURL(target *URLSet, value string) error {
20
u, err := url.Parse(value)
21
if err != nil || u.Scheme == "" || u.Host == "" {
0 commit comments