MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/cloud-sql-proxy / Execute

Function Execute

cmd/root.go:75–84  ·  view source on GitHub ↗

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

()

Source from the content-addressed store, hash-verified

73// Execute adds all child commands to the root command and sets flags appropriately.
74// This is called by main.main(). It only needs to happen once to the rootCmd.
75func Execute() {
76 if err := NewCommand().Execute(); err != nil {
77 exit := 1
78 var terr *exitError
79 if errors.As(err, &terr) {
80 exit = terr.Code
81 }
82 os.Exit(exit)
83 }
84}
85
86// Command represents an invocation of the Cloud SQL Auth Proxy.
87type Command struct {

Callers 2

mainFunction · 0.92
mainFunction · 0.92

Calls 2

NewCommandFunction · 0.85
ExecuteMethod · 0.80

Tested by

no test coverage detected