What is the empty or zero value for a slice in Go or Golang?
Originally Published Here ๐!
The empty or zero value of a slice in go or golang is nil. These slices have a capacity and a length of 0.
TL;DR
package main
import "fmt"
func main() {
// declare an int slice
var mySlice []int
// check i...
melvingeorge-me.hashnode.dev2 min read