19 lines
298 B
Go
19 lines
298 B
Go
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
|
|
}
|