ValueOf returns the value of a pointer or its zero value
(v *T)
| 30 | |
| 31 | // ValueOf returns the value of a pointer or its zero value |
| 32 | func ValueOf[T any](v *T) T { |
| 33 | if v == nil { |
| 34 | return *new(T) |
| 35 | } |
| 36 | return *v |
| 37 | } |
| 38 | |
| 39 | // StringSliceValue takes a slice of string pointers and returns a slice of strings |
| 40 | func StringSliceValue(stringSlice []*string) []string { |