MCPcopy Create free account
hub / github.com/auth0/auth0-cli / openEditorFlag

Function openEditorFlag

internal/cli/flags.go:281–290  ·  view source on GitHub ↗
(cmd *cobra.Command, f *Flag, value *string, defaultValue string, filename string, infoFn func(), tempFileFn func(string), isUpdate bool)

Source from the content-addressed store, hash-verified

279}
280
281func openEditorFlag(cmd *cobra.Command, f *Flag, value *string, defaultValue string, filename string, infoFn func(), tempFileFn func(string), isUpdate bool) error {
282 if shouldAsk(cmd, f, false) { // Always open the editor on update.
283 if isUpdate {
284 return openUpdateEditor(f, value, defaultValue, filename)
285 }
286 return openCreateEditor(value, defaultValue, filename, infoFn, tempFileFn)
287 }
288
289 return nil
290}
291
292func registerString(cmd *cobra.Command, f *Flag, value *string, defaultValue string, isUpdate bool) {
293 cmd.Flags().StringVarP(value, f.LongForm, f.ShortForm, defaultValue, f.Help)

Callers 3

OpenEditorMethod · 0.85
OpenEditorWMethod · 0.85
OpenEditorUMethod · 0.85

Calls 3

shouldAskFunction · 0.85
openUpdateEditorFunction · 0.85
openCreateEditorFunction · 0.85

Tested by

no test coverage detected