MCPcopy Index your code
hub / github.com/golang/groupcache / Slice

Method Slice

byteview.go:71–76  ·  view source on GitHub ↗

Slice slices the view between the provided from and to indices.

(from, to int)

Source from the content-addressed store, hash-verified

69
70// Slice slices the view between the provided from and to indices.
71func (v ByteView) Slice(from, to int) ByteView {
72 if v.b != nil {
73 return ByteView{b: v.b[from:to]}
74 }
75 return ByteView{s: v.s[from:to]}
76}
77
78// SliceFrom slices the view from the provided index until the end.
79func (v ByteView) SliceFrom(from int) ByteView {

Callers 1

TestByteViewSliceFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestByteViewSliceFunction · 0.64