diff options
Diffstat (limited to 'conf')
-rw-r--r-- | conf/parser.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/conf/parser.go b/conf/parser.go index 6aca3aa..bdec888 100644 --- a/conf/parser.go +++ b/conf/parser.go @@ -19,6 +19,8 @@ import ( "fmt" "io" "os" + + "github.com/Shugyousha/stasher/registry" ) // Having a Config to Manager function could be nice? Or we could just @@ -55,6 +57,11 @@ func NewConfig(r io.Reader) *Config { func (p *parser) startparsing() { inputmdesc := p.module("input") fmt.Fprintf(os.Stderr, "input moduledesc: %#v\n", inputmdesc) + inputfunc, ok := registry.Inputregistry[inputmdesc.name] + if !ok { + fmt.Fprintf(os.Stderr, "input module is not known: %q\n", inputmdesc.name) + } + inputfunc(nil) filtermdesc := p.module("filter") fmt.Fprintf(os.Stderr, "filter moduledesc: %#v\n", filtermdesc) |