Updated: Jul 22, 2021
Below code talks more :)
Above code split an array into multiple chunks based on the chunk size.
Why can't i use math.Min ?
Because golang Math function mainly supports float64 instead of int and one more disadvantage of golang is not having support of generics
Looks like go is getting support of generics in go 2.0.