Library for convenient type dereferencing in Go.
import "github.com/giantswarm/to"
spec := Spec{
Enabled: to.BoolP(true), // value -> pointer
Retries: to.IntP(3),
}
enabled := to.Bool(spec.Enabled) // pointer -> valueThe X(*T) T functions dereference and will panic on a nil pointer. The
XP(T) *T functions return the address of a fresh copy, so they are safe to
call in a loop.