summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorSilvan Jegen <s.jegen@gmail.com>2017-01-20 21:03:08 +0100
committerSilvan Jegen <s.jegen@gmail.com>2017-01-20 21:03:08 +0100
commit5c24009f2b1fd5a7e5abd4dc33ebdec0c6eaaf25 (patch)
tree7447a384efe6a5b45106fde621e53bdf38ad608a /main.go
parentba15251035961020363fa5aff95ff0a361023af9 (diff)
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.
Diffstat (limited to 'main.go')
-rw-r--r--main.go4
1 files changed, 2 insertions, 2 deletions
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{},
}