MCPcopy
hub / github.com/google/gvisor / FirstSegment

Method FirstSegment

pkg/segment/set.go:174–179  ·  view source on GitHub ↗

FirstSegment returns the first segment in the set. If the set is empty, FirstSegment returns a terminal iterator.

()

Source from the content-addressed store, hash-verified

172// FirstSegment returns the first segment in the set. If the set is empty,
173// FirstSegment returns a terminal iterator.
174func (s *Set) FirstSegment() Iterator {
175 if s.root.nrSegments == 0 {
176 return Iterator{}
177 }
178 return s.root.firstSegment()
179}
180
181// LastSegment returns the last segment in the set. If the set is empty,
182// LastSegment returns a terminal iterator.

Callers 15

SpanMethod · 0.95
MergeAllMethod · 0.95
ExportSliceMethod · 0.95
segmentTestCheckMethod · 0.95
countSegmentsMethod · 0.95
TestMergeFunction · 0.95
TestIsolateFunction · 0.95
benchmarkIterationFunction · 0.95
ReleaseMethod · 0.80
checkpointRegularFileMethod · 0.80

Calls 1

firstSegmentMethod · 0.80

Tested by 8

TestMergeFunction · 0.76
TestIsolateFunction · 0.76
benchmarkIterationFunction · 0.76
TestSetLockFunction · 0.64
TestUnlockFunction · 0.64
realDataASMethod · 0.64