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 }
func sliceToCassandra(slice *Slice) *cassandra.SliceRange { sr := cassandra.NewSliceRange() sr.Start = slice.Start sr.Finish = slice.End if slice.Count != 0 { 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 }