MCPcopy Create free account
hub / github.com/aws/smithy-go / newEncoder

Function newEncoder

document/cbor/encode.go:31–41  ·  view source on GitHub ↗

newEncoder returns an Encoder for serializing Smithy documents. FUTURE(rpc2cbor): document support is currently disabled. This API is unexported until that changes.

(optFns ...func(options *encoderOptions))

Source from the content-addressed store, hash-verified

29// FUTURE(rpc2cbor): document support is currently disabled. This API is
30// unexported until that changes.
31func newEncoder(optFns ...func(options *encoderOptions)) *encoder {
32 o := encoderOptions{}
33
34 for _, fn := range optFns {
35 fn(&o)
36 }
37
38 return &encoder{
39 options: o,
40 }
41}
42
43// Encode returns the CBOR encoding of v.
44func (e *encoder) Encode(v interface{}) ([]byte, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected