MCPcopy Create free account
hub / github.com/dromara/dongle / ToBytes

Method ToBytes

coding/decoder.go:51–56  ·  view source on GitHub ↗

ToBytes outputs as byte slice.

()

Source from the content-addressed store, hash-verified

49
50// ToBytes outputs as byte slice.
51func (d Decoder) ToBytes() []byte {
52 if len(d.dst) == 0 || d.Error != nil {
53 return []byte{}
54 }
55 return d.dst
56}
57
58func (d Decoder) stream(fn func(io.Reader) io.Reader) ([]byte, error) {
59 var buf bytes.Buffer

Callers 15

TestDecoder_ByHex_DecodeFunction · 0.95
TestDecoder_ToBytesFunction · 0.95
TestBase32RoundTripFunction · 0.45
TestBase32HexRoundTripFunction · 0.45
TestBase32EdgeCasesFunction · 0.45
TestBase32SpecificFunction · 0.45
TestBase45RoundTripFunction · 0.45
TestBase45EdgeCasesFunction · 0.45

Calls

no outgoing calls

Tested by 15

TestDecoder_ByHex_DecodeFunction · 0.76
TestDecoder_ToBytesFunction · 0.76
TestBase32RoundTripFunction · 0.36
TestBase32HexRoundTripFunction · 0.36
TestBase32EdgeCasesFunction · 0.36
TestBase32SpecificFunction · 0.36
TestBase45RoundTripFunction · 0.36
TestBase45EdgeCasesFunction · 0.36