* Order as in spec: bool byte complex64 complex128 error float32 float64 int int8 int16 int32 int64 rune string uint uint8 uint16 uint32 uint64 uintptr time.Duration time.Time */ ToBoolOrNil returns a pointer to the passed bool value, or nil, if passed value is a zero value.
(b bool)
| 14 | |
| 15 | // ToBoolOrNil returns a pointer to the passed bool value, or nil, if passed value is a zero value. |
| 16 | func ToBoolOrNil(b bool) *bool { |
| 17 | if b == false { |
| 18 | return nil |
| 19 | } |
| 20 | return &b |
| 21 | } |
| 22 | |
| 23 | // ToByteOrNil returns a pointer to the passed byte value, or nil, if passed value is a zero value. |
| 24 | func ToByteOrNil(b byte) *byte { |