about summary refs log tree commit diff stats
path: root/internal/nix/importable.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/nix/importable.go')
-rw-r--r--internal/nix/importable.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/internal/nix/importable.go b/internal/nix/importable.go
index 37532cd..67ba96d 100644
--- a/internal/nix/importable.go
+++ b/internal/nix/importable.go
@@ -1,6 +1,9 @@
 package nix
 
-import "encoding/gob"
+import (
+	"encoding/gob"
+	"searchix/internal/config"
+)
 
 type Importable interface {
 	BleveType() string
@@ -12,6 +15,10 @@ func GetKey(i Importable) string {
 	return i.BleveType() + "/" + i.GetSource() + "/" + i.GetName()
 }
 
+func MakeKey(source *config.Source, id string) string {
+	return source.Importer.Singular() + "/" + source.Key + "/" + id
+}
+
 func init() {
 	gob.Register(Option{})
 	gob.Register(Package{})