go-consistent
go-consistent copied to clipboard
extend empty slice
I see the empty slice section https://github.com/quasilyte/go-consistent#empty-map
does it make sense to include a var
initialisation too? eg
a := make([]int, 0)
b := []int{}
var c []int
https://play.golang.org/p/oI0oilKpgg7
Hello! Sorry for the delayed response.
The var c []int
initializes nil
slice, so c == nil
is true, while b == nil
is false.
go-consistent tries to find 100% identical forms, so the code semantics do not change.