(ext *super.TypeMap)
| 169 | } |
| 170 | |
| 171 | func (e *Encoder) encodeTypeMap(ext *super.TypeMap) (*super.TypeMap, error) { |
| 172 | keyType, err := e.Encode(ext.KeyType) |
| 173 | if err != nil { |
| 174 | return nil, err |
| 175 | } |
| 176 | valType, err := e.Encode(ext.ValType) |
| 177 | if err != nil { |
| 178 | return nil, err |
| 179 | } |
| 180 | typ := e.sctx.LookupTypeMap(keyType, valType) |
| 181 | e.bytes = append(e.bytes, TypeDefMap) |
| 182 | e.bytes = binary.AppendUvarint(e.bytes, uint64(super.TypeID(keyType))) |
| 183 | e.bytes = binary.AppendUvarint(e.bytes, uint64(super.TypeID(valType))) |
| 184 | return typ, nil |
| 185 | } |
| 186 | |
| 187 | func (e *Encoder) encodeTypeName(ext *super.TypeNamed) (*super.TypeNamed, error) { |
| 188 | inner, err := e.Encode(ext.Type) |
no test coverage detected