Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sundowndev
GitHub Repository: sundowndev/phoneinfoga
Path: blob/master/lib/output/output.go
994 views
1
package output
2
3
import (
4
"io"
5
)
6
7
type Output interface {
8
Write(map[string]interface{}, map[string]error) error
9
}
10
11
type OutputKey int
12
13
const (
14
Console OutputKey = iota + 1
15
)
16
17
func GetOutput(o OutputKey, w io.Writer) Output {
18
switch o {
19
case Console:
20
return NewConsoleOutput(w)
21
}
22
return nil
23
}
24
25