()
| 539 | } |
| 540 | |
| 541 | func (s String) MarshalBinary() ([]byte, error) { |
| 542 | if s.isUtf8 { |
| 543 | return writeBinary(UTF8StringType, s.raw()) |
| 544 | } |
| 545 | return writeBinary(StringType, s.raw()) |
| 546 | } |
| 547 | |
| 548 | func writebyte(b encoding2.BinaryWriter, c byte) { |
| 549 | if err := b.WriteByte(c); err != nil { |
nothing calls this directly
no test coverage detected