diff options
author | Alan Pearce | 2024-05-12 21:28:26 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-12 21:34:57 +0200 |
commit | df77930bef039e4aef024574c60fb64d75287eee (patch) | |
tree | c64d32b72a69931c191e1d7878480638b9a4c829 /internal/importer | |
parent | fb25a97b6c55c6d51e59d983fdb74b4917c97bf0 (diff) | |
download | searchix-df77930bef039e4aef024574c60fb64d75287eee.tar.lz searchix-df77930bef039e4aef024574c60fb64d75287eee.tar.zst searchix-df77930bef039e4aef024574c60fb64d75287eee.zip |
fix: linking to wrong declaration URLs
Diffstat (limited to 'internal/importer')
-rw-r--r-- | internal/importer/ingest.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/importer/ingest.go b/internal/importer/ingest.go index 08d0366..7706807 100644 --- a/internal/importer/ingest.go +++ b/internal/importer/ingest.go @@ -57,6 +57,9 @@ func ValueTypeToString(valueType jstream.ValueType) string { } func makeGitHubFileURL(userRepo string, ref string, subPath string) string { + if ref == "" { + ref = "master" + } url, _ := url.JoinPath("https://github.com/", userRepo, "blob", ref, subPath) return url |