Files
odo/pkg/util/defaults.go
Parthvi Vala abc4b59369 Remove references to v2 commands, remove unused functions, and constants (#5638)
* Remove references to v2 commands, remove unused functions, and constants

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Dharmit's review

Signed-off-by: Parthvi Vala <pvala@redhat.com>
2022-04-20 00:54:15 -04:00

16 lines
243 B
Go

package util
func GetIntOrDefault(ptr *int, defaultValue int) int {
if ptr == nil {
return defaultValue
}
return *ptr
}
func GetBoolOrDefault(ptr *bool, defaultValue bool) bool {
if ptr == nil {
return defaultValue
}
return *ptr
}