//first method :
slice = nil
// second method :
slice = slice[0:0]
Source page : https://www.socketloop.com/tutorials/golang-clearing-slice
时间: 2024-10-28 12:24:09
//first method :
slice = nil
// second method :
slice = slice[0:0]
Source page : https://www.socketloop.com/tutorials/golang-clearing-slice