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/config/importer-type.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'internal/config/importer-type.go') 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": -- cgit 1.4.1