MCPcopy Create free account
hub / github.com/CrunchyData/postgres-operator / Map

Function Map

internal/initialize/primitives.go:27–33  ·  view source on GitHub ↗

Map initializes m when it points to nil.

(m *M)

Source from the content-addressed store, hash-verified

25
26// Map initializes m when it points to nil.
27func Map[M ~map[K]V, K comparable, V any](m *M) {
28 // See https://pkg.go.dev/maps for similar type constraints.
29
30 if m != nil && *m == nil {
31 *m = make(M)
32 }
33}
34
35// Pointer returns a pointer to v.
36func Pointer[T any](v T) *T { return &v }

Callers 14

configmapFunction · 0.92
ClusterConfigMapFunction · 0.92
InstanceConfigMapFunction · 0.92
InstanceCertificatesFunction · 0.92
InstanceCertificatesFunction · 0.92
RestoreConfigFunction · 0.92
SecretFunction · 0.92
TestMapFunction · 0.92
ConfigMapFunction · 0.92
SecretFunction · 0.92

Calls

no outgoing calls

Tested by 2

TestMapFunction · 0.74
TestEnablePgAdminLoggingFunction · 0.74