func (s *SegmentExtractor) FindSegments(id string) [][]byte {
	segmentMap := make(map[string][][]byte)
	for _, segment := range s.segments {
		segmentID := bytes.SplitN(segment, []byte(":"), 2)[0]
		mappedSegments, ok := segmentMap[string(segmentID)]
		if !ok {
			mappedSegments = make([][]byte, 0)
		}
		mappedSegments = append(mappedSegments, segment)
		segmentMap[string(segmentID)] = mappedSegments
	}
	return segmentMap[id]
}
// FindSegments finds all segments for a given ID and returns them if present
FindSegments finds all segments for a given ID and returns them if present
// FindSegments finds all segments for a given ID and returns them if present
func (s *SegmentExtractor) FindSegments(id string) [][]byte {
	segmentMap := make(map[string][][]byte)
	for _, segment := range s.segments {
		segmentID := bytes.SplitN(segment, []byte(":"), 2)[0]
		mappedSegments, ok := segmentMap[string(segmentID)]
		if !ok {
			mappedSegments = make([][]byte, 0)
		}
		mappedSegments = append(mappedSegments, segment)
		segmentMap[string(segmentID)] = mappedSegments
	}
	return segmentMap[id]
}
func ( s * SegmentExtractor ) FindSegments ( id string ) [ ] [ ] byte { segmentMap := make ( map [ string ] [ ] [ ] byte ) for _ , segment := range s . segments { segmentID := bytes . SplitN ( segment , [ ] byte ( " " ) , 2 ) [ 0 ] mappedSegments , ok := segmentMap [ string ( segmentID ) ] if ! ok { mappedSegments = make ( [ ] [ ] byte , 0 ) } mappedSegments = append ( mappedSegments , segment ) segmentMap [ string ( segmentID ) ] = mappedSegments } return segmentMap [ id ] }
FindSegments finds all segments for a given ID and returns them if present
FindSegments finds all segments for a given ID and returns them if present