Documentation
¶
Overview ¶
Package editor contains functionality which allows the user to provide information in the editor of their choice.
Index ¶
- Constants
- func CaptureInputFromEditor(template []byte) ([]byte, error)
- func EscapeHTML(s interface{}) (template.HTML, error)
- func IsLastElementOfSlice(index int, lenght int) bool
- func OpenFileInEditor(filename string) error
- func OpenInteractiveEditor(o interface{}, temp string, funcMap template.FuncMap) ([]byte, error)
Constants ¶
View Source
const ( UnixDefaultEditor = "vi" WindowsDefaultEditor = "notepad" EnvironmentVariableName = "EDITOR" InteractiveModeLabel = "interactive mode" )
Variables ¶
This section is empty.
Functions ¶
func CaptureInputFromEditor ¶
CaptureInputFromEditor opens a temporary file in a text editor and returns the written bytes on success or an error on failure. It handles deletion of the temporary file behind the scenes.
func EscapeHTML ¶ added in v1.0.0
EscapeHTML is a function which marshal `s` applying Intent and returns template.HTML. This makes hmtl.Template to escape HTML codes
func IsLastElementOfSlice ¶
isLastElementOfSlice is a function which is used in HTML templates to determine the last element in a slice
func OpenFileInEditor ¶
OpenFileInEditor opens filename in a text editor.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.