From a90419aa46ec42588f65e6327559ce479f9c5b67 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 20 May 2024 18:46:20 +0200 Subject: feat(config): use enums' string representations to print defaults --- internal/config/fetcher.go | 4 ++++ internal/config/importer-type.go | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'internal') 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 +} -- cgit 1.4.1