diff options
author | Silvan Jegen <s.jegen@gmail.com> | 2016-12-25 13:58:37 +0100 |
---|---|---|
committer | Silvan Jegen <s.jegen@gmail.com> | 2016-12-25 13:58:37 +0100 |
commit | b0c4b2fbd4098f88b1abc854854fa24c7402c70a (patch) | |
tree | 36cf03e38656d3cce2a0555865392dfba376afe3 /input | |
parent | aa6ce8af52758fb932d1b011f10be307f3d88f80 (diff) |
Add and use NewStdin function
Diffstat (limited to 'input')
-rw-r--r-- | input/stdin.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/input/stdin.go b/input/stdin.go index 5acfa5e..25840ef 100644 --- a/input/stdin.go +++ b/input/stdin.go @@ -13,6 +13,10 @@ type StdinInput struct { retchan chan *work.Work } +func NewStdin() *StdinInput { + return &StdinInput{} +} + func (i *StdinInput) Start() chan *work.Work { i.retchan = make(chan *work.Work, 100) r := bufio.NewReader(os.Stdin) |