about summary refs log tree commit diff stats
path: root/internal/config/fetcher.go
diff options
context:
space:
mode:
authorAlan Pearce2024-05-17 12:22:14 +0200
committerAlan Pearce2024-05-17 12:22:14 +0200
commitaf2068f882b390778023617e6c69c9274b346cde (patch)
tree2e8be452f0a95244645445d97da5f376beb95fd0 /internal/config/fetcher.go
parent8eb869f10a08e93f67a7feb50dc73600bc5304fb (diff)
downloadsearchix-af2068f882b390778023617e6c69c9274b346cde.tar.lz
searchix-af2068f882b390778023617e6c69c9274b346cde.tar.zst
searchix-af2068f882b390778023617e6c69c9274b346cde.zip
refactor: export functions for parsing enum types
Diffstat (limited to 'internal/config/fetcher.go')
-rw-r--r--internal/config/fetcher.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/config/fetcher.go b/internal/config/fetcher.go
index 5018b82..a01abbd 100644
--- a/internal/config/fetcher.go
+++ b/internal/config/fetcher.go
@@ -28,7 +28,7 @@ func (f Fetcher) String() string {
 	return fmt.Sprintf("Fetcher(%d)", f)
 }
 
-func parseFetcher(name string) (Fetcher, error) {
+func ParseFetcher(name string) (Fetcher, error) {
 	switch strcase.KebabCase(name) {
 	case "channel":
 		return Channel, nil
@@ -43,7 +43,7 @@ func parseFetcher(name string) (Fetcher, error) {
 
 func (f *Fetcher) UnmarshalText(text []byte) error {
 	var err error
-	*f, err = parseFetcher(string(text))
+	*f, err = ParseFetcher(string(text))
 
 	return err
 }