Pretty printing a Slice of integers in GoLang
Following is a utility function that can be used to pretty printing a slice of integers in GoLang.
This prints both length and values of the slice.
func PrintSlice(s []int) {
fmt.Printf("len=%d cap=%d %v\n", len(s), cap(s), s)
}