about summary refs log tree commit diff stats
path: root/internal/config
diff options
context:
space:
mode:
authorAlan Pearce2024-06-08 20:31:47 +0200
committerAlan Pearce2024-06-08 20:42:48 +0200
commitd40c0e188a7fe1b36887f59c4a9958faa81b3d44 (patch)
treeb6c168adcc3336dd0f6de4b1cbb7bf671f212f53 /internal/config
parentef6c98da84c2327e0a0003fb3b1b64a5d1e2d550 (diff)
downloadsearchix-d40c0e188a7fe1b36887f59c4a9958faa81b3d44.tar.lz
searchix-d40c0e188a7fe1b36887f59c4a9958faa81b3d44.tar.zst
searchix-d40c0e188a7fe1b36887f59c4a9958faa81b3d44.zip
feat: add detail pages for packages/options
Diffstat (limited to 'internal/config')
-rw-r--r--internal/config/importer-type.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/internal/config/importer-type.go b/internal/config/importer-type.go
index 8f64d58..9bd50b6 100644
--- a/internal/config/importer-type.go
+++ b/internal/config/importer-type.go
@@ -25,6 +25,17 @@ func (i ImporterType) String() string {
 	return fmt.Sprintf("Type(%d)", i)
 }
 
+func (i ImporterType) Singular() string {
+	switch i {
+	case Packages:
+		return "package"
+	case Options:
+		return "option"
+	}
+
+	return fmt.Sprintf("Type(%d)", i)
+}
+
 func ParseImporterType(name string) (ImporterType, error) {
 	switch strcase.KebabCase(name) {
 	case "packages":