From d40c0e188a7fe1b36887f59c4a9958faa81b3d44 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 8 Jun 2024 20:31:47 +0200 Subject: feat: add detail pages for packages/options --- internal/nix/importable.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'internal/nix/importable.go') 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{}) -- cgit 1.4.1