/pointer

Poor man's generics for addressing non-addressable primitives

Primary LanguageGoMIT LicenseMIT

pointer

Abstractions for creating pointers to non-addressable Go primitives.

For example,

func somefunc() int64 {
  return 1
}
val := &somefunc()
./README.md:9:9: cannot take the address of somefunc()

Instead,

func somefunc() int64 {
  return 1
}
val := pointer.Int64(somefunc())