feat: documentation for cli
This commit is contained in:
@@ -14,6 +14,7 @@ type Destination interface {
|
||||
// An StdoutDestination writes to stdout.
|
||||
type StdoutDestination struct{}
|
||||
|
||||
// Write outputs to standard output.
|
||||
func (d StdoutDestination) Write(data string) error {
|
||||
fmt.Println(data)
|
||||
return nil
|
||||
@@ -22,6 +23,7 @@ func (d StdoutDestination) Write(data string) error {
|
||||
// A FileDestination writes to a file.
|
||||
type FileDestination struct{ Path string }
|
||||
|
||||
// Write outputs to a file.
|
||||
func (d FileDestination) Write(data string) error {
|
||||
return os.WriteFile(d.Path, []byte(data+"\n"), 0644)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user