Add two new helper functions `IntToPtr()` and `BoolToPtr()` to the `internal/common` package, which can be used to conveniently set basic type literals in a struct literal, in which pointer to the basic type is expected. Signed-off-by: Tomas Hozza <thozza@redhat.com>
9 lines
102 B
Go
9 lines
102 B
Go
package common
|
|
|
|
func IntToPtr(x int) *int {
|
|
return &x
|
|
}
|
|
|
|
func BoolToPtr(x bool) *bool {
|
|
return &x
|
|
}
|