diff --git a/gold.go b/gold.go index 450d8ac..c17bf6c 100644 --- a/gold.go +++ b/gold.go @@ -163,7 +163,7 @@ func resolveRelativeURL(baseURL string, rel string) string { if u.IsAbs() { return rel } - if u.Path[0] == '/' { + if len(u.Path) > 0 && u.Path[0] == '/' { u.Path = u.Path[1:] }