7 // SourceDirSubdir takes a source and returns a tuple of the URL without
8 // the subdir and the URL with the subdir.
9 func SourceDirSubdir(src string) (string, string) {
10 // Calcaulate an offset to avoid accidentally marking the scheme
13 if idx := strings.Index(src, "://"); idx > -1 {
17 // First see if we even have an explicit subdir
18 idx := strings.Index(src[offset:], "//")
27 // Next, check if we have query parameters and push them onto the
29 if idx = strings.Index(subdir, "?"); idx > -1 {