MCPcopy
hub / github.com/kubernetes/kops / ValueOf

Function ValueOf

upup/pkg/fi/values.go:32–37  ·  view source on GitHub ↗

ValueOf returns the value of a pointer or its zero value

(v *T)

Source from the content-addressed store, hash-verified

30
31// ValueOf returns the value of a pointer or its zero value
32func 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
40func StringSliceValue(stringSlice []*string) []string {

Callers 15

DumpLoadBalancerFunction · 0.92
ListInstancesFunction · 0.92
DumpELBFunction · 0.92
ListIAMRolesFunction · 0.92
ListIAMInstanceProfilesFunction · 0.92
CreateMethod · 0.92
CreateMethod · 0.92
CreateMethod · 0.92
IdMethod · 0.92
NameMethod · 0.92
MinSizeMethod · 0.92
MaxSizeMethod · 0.92

Calls 1

newFunction · 0.85