In Go, how can I partition a slice/array/string of any type? -
guava has generic partition method can not directly implemented in go due go's lack of generics. there workaround this?
the gopart library addresses this. allows partitioning of indexable in go has type.
for idxrange := range gopart.partition(len(biglist), partitionsize) { bulkoperation(biglist[idxrange.low:idxrange.high]) }
Comments
Post a Comment