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))
| 29 | // FUTURE(rpc2cbor): document support is currently disabled. This API is |
| 30 | // unexported until that changes. |
| 31 | func 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. |
| 44 | func (e *encoder) Encode(v interface{}) ([]byte, error) { |
nothing calls this directly
no outgoing calls
no test coverage detected