diff options
Diffstat (limited to 'output/stdout/stdout.go')
| -rw-r--r-- | output/stdout/stdout.go | 24 | 
1 files changed, 24 insertions, 0 deletions
| diff --git a/output/stdout/stdout.go b/output/stdout/stdout.go new file mode 100644 index 0000000..9d66581 --- /dev/null +++ b/output/stdout/stdout.go @@ -0,0 +1,24 @@ +package stdout + +import ( +	"fmt" + +	"github.com/Shugyousha/stasher/output" +	"github.com/Shugyousha/stasher/registry" +	"github.com/Shugyousha/stasher/work" +) + +func init() { +	registry.Outputregistry["stdout"] = New +} + +type StdoutOutput struct { +} + +func New(map[string]string) output.Output { +	return &StdoutOutput{} +} + +func (o *StdoutOutput) Output(w *work.Work) { +	fmt.Printf("%s\n", w.Data) +} | 
