package config import mapst "github.com/mitchellh/mapstructure" type Config struct { Input Input Outputs Outputs `toml:"output"` } type Input struct { Path string Recurse bool Ext string } type Outputs map[string]Output type Output struct { Enabled bool Config map[string]any } func (oo Outputs) Stdout() (s Stdout, enabled bool) { o, ok := oo["stdout"] if !ok { return s, false } enabled = o.Enabled mapst.Decode(o.Config, &s) return } type Stdout struct { Json bool }