init: basic tools

This commit is contained in:
2025-08-30 22:00:31 +03:00
commit ec5db88f97
13 changed files with 467 additions and 0 deletions

18
output_stdout.go Normal file
View File

@@ -0,0 +1,18 @@
package script
import (
"context"
"os"
"strings"
)
type StdoutWriter struct{}
func NewStdoutWriter() *StdoutWriter {
return new(StdoutWriter)
}
func (s *StdoutWriter) Write(_ context.Context, in []string) error {
_, err := os.Stdout.WriteString(strings.Join(in, ",") + "\n")
return err
}