Files
script/output_mem.go
2025-08-30 22:00:31 +03:00

22 lines
315 B
Go

package script
import "context"
type MemWriter struct {
rows [][]string
}
func NewMemWriter() *MemWriter {
return new(MemWriter)
}
func (m *MemWriter) Write(_ context.Context, record []string) error {
m.rows = append(m.rows, record)
return nil
}
func (m *MemWriter) Output() [][]string {
return m.rows
}