Skip to content

Commit 41d81ff

Browse files
committed
move
1 parent 2fc5728 commit 41d81ff

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tools/resourcedocsgen/cmd/docs/registry.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@ import (
4040
concpool "github.com/sourcegraph/conc/pool"
4141
)
4242

43+
func getRepoSlug(repoURL string) (string, error) {
44+
u, err := url.Parse(repoURL)
45+
if err != nil {
46+
return "", errors.Wrapf(err, "parsing repo url %s", repoURL)
47+
}
48+
49+
return u.Path, nil
50+
}
51+
4352
func genResourceDocsForPackageFromRegistryMetadata(
4453
metadata pkg.PackageMeta, docsOutDir, packageTreeJSONOutDir string,
4554
) error {
@@ -124,15 +133,6 @@ func getSchemaFileURL(metadata pkg.PackageMeta) (string, error) {
124133
return fmt.Sprintf("https://raw.githubusercontent.com/%s/%s/%s", repoSlug, metadata.Version, schemaFilePath), nil
125134
}
126135

127-
func getRepoSlug(repoURL string) (string, error) {
128-
u, err := url.Parse(repoURL)
129-
if err != nil {
130-
return "", errors.Wrapf(err, "parsing repo url %s", repoURL)
131-
}
132-
133-
return u.Path, nil
134-
}
135-
136136
func genResourceDocsForAllRegistryPackages(
137137
provider svc.PackageMetadataProvider,
138138
baseDocsOutDir, basePackageTreeJSONOutDir string,

0 commit comments

Comments
 (0)