diff options
author | Alan Pearce | 2024-05-17 12:22:14 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-17 12:22:14 +0200 |
commit | af2068f882b390778023617e6c69c9274b346cde (patch) | |
tree | 2e8be452f0a95244645445d97da5f376beb95fd0 /internal/config/importer-type.go | |
parent | 8eb869f10a08e93f67a7feb50dc73600bc5304fb (diff) | |
download | searchix-af2068f882b390778023617e6c69c9274b346cde.tar.lz searchix-af2068f882b390778023617e6c69c9274b346cde.tar.zst searchix-af2068f882b390778023617e6c69c9274b346cde.zip |
refactor: export functions for parsing enum types
Diffstat (limited to 'internal/config/importer-type.go')
-rw-r--r-- | internal/config/importer-type.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/config/importer-type.go b/internal/config/importer-type.go index b3b3e88..0d0263c 100644 --- a/internal/config/importer-type.go +++ b/internal/config/importer-type.go @@ -25,7 +25,7 @@ func (i ImporterType) String() string { return fmt.Sprintf("Type(%d)", i) } -func parseType(name string) (ImporterType, error) { +func ParseImporterType(name string) (ImporterType, error) { switch strcase.KebabCase(name) { case "packages": return Packages, nil @@ -38,7 +38,7 @@ func parseType(name string) (ImporterType, error) { func (i *ImporterType) UnmarshalText(text []byte) error { var err error - *i, err = parseType(string(text)) + *i, err = ParseImporterType(string(text)) return err } |