feat: rename config to cli

This commit is contained in:
2026-02-07 00:15:47 -05:00
parent 8b4b36aa9c
commit 744a2ffd3e
3 changed files with 10 additions and 10 deletions

View File

@@ -0,0 +1,27 @@
package cli
import (
"fmt"
"os"
)
// A Destination is method of writing output to the user.
type Destination interface {
// Write data to this destination.
Write(data string) error
}
// An StdoutDestination writes to stdout.
type StdoutDestination struct{}
func (d StdoutDestination) Write(data string) error {
fmt.Println(data)
return nil
}
// A FileDestination writes to a file.
type FileDestination struct{ Path string }
func (d FileDestination) Write(data string) error {
return os.WriteFile(d.Path, []byte(data+"\n"), 0644)
}