golang last element of slice code example
Example 1: golang remove last item from slice
slice = slice[:len(slice)-1]
Example 2: golang get last element of slice
sl = sl[:len(sl)-1]
slice = slice[:len(slice)-1]
sl = sl[:len(sl)-1]