MCPcopy
hub / github.com/segmentio/ksuid / writeTo

Method writeTo

set.go:38–50  ·  view source on GitHub ↗
(b *bytes.Buffer)

Source from the content-addressed store, hash-verified

36}
37
38func (set CompressedSet) writeTo(b *bytes.Buffer) {
39 a := [27]byte{}
40
41 for i, it := 0, set.Iter(); it.Next(); i++ {
42 if i != 0 {
43 b.WriteString(", ")
44 }
45 b.WriteByte('"')
46 it.KSUID.Append(a[:0])
47 b.Write(a[:])
48 b.WriteByte('"')
49 }
50}
51
52// Compress creates and returns a compressed set of KSUIDs from the list given
53// as arguments.

Callers 2

StringMethod · 0.95
GoStringMethod · 0.95

Calls 3

IterMethod · 0.95
AppendMethod · 0.80
NextMethod · 0.45

Tested by

no test coverage detected