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

Method decodeString

document/cbor/decode.go:210–220  ·  view source on GitHub ↗
(v string, rv reflect.Value)

Source from the content-addressed store, hash-verified

208}
209
210func (d *decoder) decodeString(v string, rv reflect.Value) error {
211 switch rv.Kind() {
212 case reflect.String:
213 rv.SetString(v)
214 case reflect.Interface:
215 rv.Set(reflect.ValueOf(v).Convert(rv.Type()))
216 default:
217 return &document.UnmarshalTypeError{Value: "string", Type: rv.Type()}
218 }
219 return nil
220}
221
222func (d *decoder) decodeMap(tv cbor.Map, rv reflect.Value) error {
223 switch rv.Kind() {

Callers 1

decodeMethod · 0.95

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected