MCPcopy Create free account
hub / github.com/DHowett/go-plist / NewEncoderForFormat

Function NewEncoderForFormat

encode.go:67–72  ·  view source on GitHub ↗

NewEncoderForFormat returns an Encoder that writes a property list to w in the specified format. Pass AutomaticFormat to allow the library to choose the best encoding (currently BinaryFormat).

(w io.Writer, format int)

Source from the content-addressed store, hash-verified

65// NewEncoderForFormat returns an Encoder that writes a property list to w in the specified format.
66// Pass AutomaticFormat to allow the library to choose the best encoding (currently BinaryFormat).
67func NewEncoderForFormat(w io.Writer, format int) *Encoder {
68 return &Encoder{
69 writer: w,
70 format: format,
71 }
72}
73
74// NewBinaryEncoder returns an Encoder that writes a binary property list to w.
75func NewBinaryEncoder(w io.Writer) *Encoder {

Callers 6

mainFunction · 0.92
mainFunction · 0.92
BenchmarkOpenStepEncodeFunction · 0.85
NewEncoderFunction · 0.85
NewBinaryEncoderFunction · 0.85
MarshalIndentFunction · 0.85

Calls

no outgoing calls

Tested by 1

BenchmarkOpenStepEncodeFunction · 0.68