diff --git a/writers/local/config.go b/writers/local/config.go index 33cf9ff..fa75f0f 100644 --- a/writers/local/config.go +++ b/writers/local/config.go @@ -1,5 +1,12 @@ package local +import "github.com/piyushsingariya/relec" + type Config struct { BaseFilePath string `json:"path"` } + +// TODO: Add go struct validation in Config +func (c *Config) Validate() error { + return relec.Validate(c) +} diff --git a/writers/local/local.go b/writers/local/local.go index 237987e..4fabea6 100644 --- a/writers/local/local.go +++ b/writers/local/local.go @@ -38,7 +38,7 @@ type Local struct { pqSchemaMutex sync.Mutex // To prevent concurrent underlying map access from fraugster library } -func (l *Local) GetConfigRef() any { +func (l *Local) GetConfigRef() protocol.Config { l.config = &Config{} return l.config }