surveyext

package
v2.0.0-...-98537dd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EditorQuestionTemplate = `` /* 714-byte string literal not displayed */

EXTENDED to change prompt text

Functions

func Edit

func Edit(editorCommand, fn, initialValue string, stdin io.Reader, stdout io.Writer, stderr io.Writer) (string, error)

func EditorName

func EditorName(editorCommand string) string

Types

type EditorTemplateData

type EditorTemplateData struct {
	survey.Editor
	EditorCommand string
	BlankAllowed  bool
	Answer        string
	ShowAnswer    bool
	ShowHelp      bool
	Config        *survey.PromptConfig
}

EXTENDED to pass editor name (to use in prompt)

type GhEditor

type GhEditor struct {
	*survey.Editor
	EditorCommand string
	BlankAllowed  bool
	// contains filtered or unexported fields
}

EXTENDED to enable different prompting behavior

func (*GhEditor) Prompt

func (e *GhEditor) Prompt(config *survey.PromptConfig) (interface{}, error)

EXTENDED This is straight copypasta from survey to get our overridden prompt called.;

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL