summaryrefslogtreecommitdiff
path: root/utils/pointers.go
blob: 9c1922794248b476de17e7676b15b56268b2de7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package utils

func AsUint64Ptr(val uint64) *uint64 {
	if val == 0 {
		val = 10
	}
	return &val
}

func AsStringPtr(val string) *string {
	if val == "" {
		return nil
	}
	return &val
}