From c51ca7c62e08f43ef9974af35886d30ce54a1f22 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 16 May 2024 20:22:42 +0200 Subject: refactor: use interface to unify Options and Packages --- internal/nix/importable.go | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 internal/nix/importable.go (limited to 'internal/nix/importable.go') diff --git a/internal/nix/importable.go b/internal/nix/importable.go new file mode 100644 index 0000000..309ec5f --- /dev/null +++ b/internal/nix/importable.go @@ -0,0 +1,11 @@ +package nix + +type Importable interface { + BleveType() string + GetName() string + GetSource() string +} + +func GetKey(i Importable) string { + return i.BleveType() + "/" + i.GetSource() + "/" + i.GetName() +} -- cgit 1.4.1