From 5c24009f2b1fd5a7e5abd4dc33ebdec0c6eaaf25 Mon Sep 17 00:00:00 2001 From: Silvan Jegen Date: Fri, 20 Jan 2017 21:03:08 +0100 Subject: Introduce registry We introduce a registry that contains maps to builder functions. These builder functions return the interface implementation of the modules specified in the configuration. We also make the input module type use the registry. All other module types still have to be converted. --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 7a3bb88..a52b5ac 100644 --- a/main.go +++ b/main.go @@ -8,7 +8,7 @@ import ( "github.com/Shugyousha/stasher/conf" "github.com/Shugyousha/stasher/filter" - "github.com/Shugyousha/stasher/input" + "github.com/Shugyousha/stasher/input/stdin" "github.com/Shugyousha/stasher/output" ) @@ -26,7 +26,7 @@ func main() { ffmap["F"] = func(s string) string { return strings.ToUpper(s) } m := Manager{ - Input: input.NewStdin(), + Input: stdin.New(nil), Filter: filter.NewStringFilter(ffmap), Output: &output.StdoutOutput{}, } -- cgit v1.2.1-18-gbd029