예제 #1
0
파일: reader.go 프로젝트: carloscm/gossie
func fullSlice() *cassandra.SliceRange {
	sr := cassandra.NewSliceRange()
	// workaround some uninitialized slice == nil quirks that trickle down into the generated thrift4go code
	sr.Start = make([]byte, 0)
	sr.Finish = make([]byte, 0)
	return sr
}
예제 #2
0
파일: reader.go 프로젝트: carloscm/gossie
func sliceToCassandra(slice *Slice) *cassandra.SliceRange {
	sr := cassandra.NewSliceRange()
	sr.Start = slice.Start
	sr.Finish = slice.End
	sr.Count = int32(slice.Count)
	sr.Reversed = slice.Reversed
	// workaround some uninitialized slice == nil quirks that trickle down into the generated thrift4go code
	if sr.Start == nil {
		sr.Start = make([]byte, 0)
	}
	if sr.Finish == nil {
		sr.Finish = make([]byte, 0)
	}
	return sr
}