(id TypeID, b interface{})
| 713 | } |
| 714 | |
| 715 | func toBinary(id TypeID, b interface{}) ([]byte, error) { |
| 716 | p1 := ValueForType(BinaryID) |
| 717 | if err := Marshal(Val{id, b}, &p1); err != nil { |
| 718 | return nil, err |
| 719 | } |
| 720 | return p1.Value.([]byte), nil |
| 721 | } |
| 722 | |
| 723 | func cantConvert(from TypeID, to TypeID) error { |
| 724 | return errors.Errorf("Cannot convert %s to type %s", from.Name(), to.Name()) |
no test coverage detected