diff options
author | Alan Pearce | 2024-05-20 18:46:20 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-20 18:46:20 +0200 |
commit | a90419aa46ec42588f65e6327559ce479f9c5b67 (patch) | |
tree | 449e3d50d8449bf63a48462513e59858716879a7 /internal | |
parent | be3bab7fc4f8c3efc87cf7cfcc83d63177fdd7b9 (diff) | |
download | searchix-a90419aa46ec42588f65e6327559ce479f9c5b67.tar.lz searchix-a90419aa46ec42588f65e6327559ce479f9c5b67.tar.zst searchix-a90419aa46ec42588f65e6327559ce479f9c5b67.zip |
feat(config): use enums' string representations to print defaults
Diffstat (limited to 'internal')
-rw-r--r-- | internal/config/fetcher.go | 4 | ||||
-rw-r--r-- | internal/config/importer-type.go | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/internal/config/fetcher.go b/internal/config/fetcher.go index a01abbd..fd95b32 100644 --- a/internal/config/fetcher.go +++ b/internal/config/fetcher.go @@ -47,3 +47,7 @@ func (f *Fetcher) UnmarshalText(text []byte) error { return err } + +func (f *Fetcher) MarshalText() ([]byte, error) { + return []byte(f.String()), nil +} diff --git a/internal/config/importer-type.go b/internal/config/importer-type.go index 0d0263c..8f64d58 100644 --- a/internal/config/importer-type.go +++ b/internal/config/importer-type.go @@ -42,3 +42,7 @@ func (i *ImporterType) UnmarshalText(text []byte) error { return err } + +func (i *ImporterType) MarshalText() ([]byte, error) { + return []byte(i.String()), nil +} |