aboutsummaryrefslogtreecommitdiffstats
path: root/modules/indexer/code/indexer.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/indexer/code/indexer.go')
-rw-r--r--modules/indexer/code/indexer.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/indexer/code/indexer.go b/modules/indexer/code/indexer.go
index 5456373398..35c298a548 100644
--- a/modules/indexer/code/indexer.go
+++ b/modules/indexer/code/indexer.go
@@ -51,12 +51,16 @@ func filenameIndexerID(repoID int64, filename string) string {
return indexerID(repoID) + "_" + filename
}
+func indexerID(id int64) string {
+ return strconv.FormatInt(id, 36)
+}
+
func parseIndexerID(indexerID string) (int64, string) {
index := strings.IndexByte(indexerID, '_')
if index == -1 {
log.Error("Unexpected ID in repo indexer: %s", indexerID)
}
- repoID, _ := strconv.ParseInt(indexerID[:index], 10, 64)
+ repoID, _ := strconv.ParseInt(indexerID[:index], 36, 64)
return repoID, indexerID[index+1:]
}