surveyext

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 11 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 DefaultEditorName

func DefaultEditorName() string

func Edit

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

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