summaryrefslogtreecommitdiff
path: root/output/stdout/stdout.go
blob: f3e4f57a5cec0f3af48ed7319853215bb2044726 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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) error {
	_, err := fmt.Printf("%s\n", w.Data)
	return err
}