MCPcopy
hub / github.com/benbjohnson/wtf / NewDialEncoder

Function NewDialEncoder

csv/dial.go:18–32  ·  view source on GitHub ↗

NewDialEncoder returns a new instance of DialEncoder that writes to w.

(w io.Writer)

Source from the content-addressed store, hash-verified

16
17// NewDialEncoder returns a new instance of DialEncoder that writes to w.
18func NewDialEncoder(w io.Writer) *DialEncoder {
19 enc := &DialEncoder{w: csv.NewWriter(w)}
20
21 // Write header to underlying writer.
22 _ = enc.w.Write([]string{
23 "id",
24 "name",
25 "value",
26 "created_by",
27 "created_at",
28 "updated_at",
29 })
30
31 return enc
32}
33
34// Close flushes the underlying writer.
35func (enc *DialEncoder) Close() error {

Callers 1

handleDialIndexMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected