complete nested config files

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2024-11-19 18:15:19 +03:00
parent ee4c343dee
commit 3398ee60f3
2 changed files with 35 additions and 5 deletions

View File

@@ -66,7 +66,7 @@ type TaskConfig struct {
Active bool `json:"active,omitempty" yaml:"active,omitempty"`
}
func (cfg *Config) Parse(r io.Reader) error {
func Parse(r io.Reader, cfg interface{}) error {
buf, err := io.ReadAll(r)
if err != nil {
return err