MCPcopy Create free account
hub / github.com/containerd/nerdctl / xmain

Function xmain

cmd/nerdctl/main.go:139–151  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

137}
138
139func xmain() error {
140 if len(os.Args) == 3 && os.Args[1] == logging.MagicArgv1 {
141 // containerd runtime v2 logging plugin mode.
142 // "binary://BIN?KEY=VALUE" URI is parsed into Args {BIN, KEY, VALUE}.
143 return logging.Main(os.Args[2])
144 }
145 // nerdctl CLI mode
146 app, err := newApp()
147 if err != nil {
148 return err
149 }
150 return app.Execute()
151}
152
153func initRootCmdFlags(rootCmd *cobra.Command, tomlPath string) (*pflag.FlagSet, error) {
154 cfg := config.New()

Callers 1

mainFunction · 0.85

Calls 2

MainFunction · 0.92
newAppFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…