MCPcopy Create free account
hub / github.com/ddev/ddev / init

Function init

cmd/ddev/cmd/share.go:220–233  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

218}
219
220func init() {
221 RootCmd.AddCommand(DdevShareCommand)
222 DdevShareCommand.Flags().String("provider", "", "share provider to use (ngrok, cloudflared, or custom)")
223 _ = DdevShareCommand.RegisterFlagCompletionFunc("provider", configCompletionFunc([]string{"ngrok", "cloudflared"}))
224 DdevShareCommand.Flags().String("provider-args", "", "arguments to pass to the share provider")
225 DdevShareCommand.Flags().SetNormalizeFunc(func(_ *pflag.FlagSet, name string) pflag.NormalizedName {
226 if name == "ngrok-args" {
227 newName := "provider-args"
228 _, _ = fmt.Fprintf(os.Stderr, "Flag --%s has been deprecated, use --%s instead\n", name, newName)
229 name = newName
230 }
231 return pflag.NormalizedName(name)
232 })
233}

Callers

nothing calls this directly

Calls 1

configCompletionFuncFunction · 0.85

Tested by

no test coverage detected