github.com/IBM-Cloud/bluemix-go@v0.0.0-20240423071914-9e96525baef4/helpers/conversion.go (about) 1 package helpers 2 3 import "time" 4 5 // Bool returns a pointer to the bool value 6 func Bool(v bool) *bool { 7 return &v 8 } 9 10 // Int returns a pointer to the int value 11 func Int(v int) *int { 12 return &v 13 } 14 15 // String returns a pointer to the string value 16 func String(v string) *string { 17 return &v 18 } 19 20 // Map returns a pointer to the map value 21 func Map(v map[string]interface{}) *map[string]interface{} { 22 return &v 23 } 24 25 // IntSlice returns a pointer to the IntSlice value 26 func IntSlice(v []int) *[]int { 27 return &v 28 } 29 30 // Duration returns a pointer to the time.Duration 31 func Duration(v time.Duration) *time.Duration { 32 return &v 33 }