issues
search
bldsh
/
dive
dive in to learn
Apache License 2.0
0
stars
0
forks
source link
go: pointer: address: box a value on the heap
#10
Open
AmitKumarDas
opened
2 weeks ago
AmitKumarDas
commented
2 weeks ago
https://github.com/google/go-cmp/blob/master/cmp/compare_test.go
You can create a generic function for the same
Name:
newInt
vs
intPtr
or
ptrInt
; it has stuck to idiomatic practices
func newInt(n int) *int { return &n }
newInt
vsintPtr
orptrInt
; it has stuck to idiomatic practices