diff options
author | Alan Pearce | 2024-06-08 20:31:47 +0200 |
---|---|---|
committer | Alan Pearce | 2024-06-08 20:42:48 +0200 |
commit | d40c0e188a7fe1b36887f59c4a9958faa81b3d44 (patch) | |
tree | b6c168adcc3336dd0f6de4b1cbb7bf671f212f53 /internal/config/importer-type.go | |
parent | ef6c98da84c2327e0a0003fb3b1b64a5d1e2d550 (diff) | |
download | searchix-d40c0e188a7fe1b36887f59c4a9958faa81b3d44.tar.lz searchix-d40c0e188a7fe1b36887f59c4a9958faa81b3d44.tar.zst searchix-d40c0e188a7fe1b36887f59c4a9958faa81b3d44.zip |
feat: add detail pages for packages/options
Diffstat (limited to 'internal/config/importer-type.go')
-rw-r--r-- | internal/config/importer-type.go | 11 |
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": |