MCPcopy Index your code
hub / github.com/GoogleCloudPlatform/cloud-sql-proxy / pointer

Function pointer

cmd/root_test.go:78–80  ·  view source on GitHub ↗

pointer returns the address of v and makes it easy to take the address of a predeclared identifier. Compare: t := true pt := &t vs pt := pointer(true)

(v T)

Source from the content-addressed store, hash-verified

76//
77// pt := pointer(true)
78func pointer[T any](v T) *T {
79 return &v
80}
81
82func invokeProxyCommand(args []string) (*Command, error) {
83 c := NewCommand()

Calls

no outgoing calls

Tested by

no test coverage detected