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

Function CaptureInputViaEditor

internal/prompt/editor.go:29–32  ·  view source on GitHub ↗

CaptureInputViaEditor is the high level function to use in this package in order to capture input from an editor. The arguments have been tailored for our use of strings mostly in the rest of the CLI even though internally we're using []byte.

(contents, pattern string, infoFn func(), fileCreatedFn func(string))

Source from the content-addressed store, hash-verified

27// The arguments have been tailored for our use of strings mostly in the rest
28// of the CLI even though internally we're using []byte.
29func CaptureInputViaEditor(contents, pattern string, infoFn func(), fileCreatedFn func(string)) (result string, err error) {
30 v, err := defaultEditorPrompt.captureInput([]byte(contents), pattern, infoFn, fileCreatedFn)
31 return string(v), err
32}
33
34type editorPrompt struct {
35 cmd string

Callers 2

openCreateEditorFunction · 0.92
promptMethod · 0.85

Calls 1

captureInputMethod · 0.80

Tested by

no test coverage detected