editor

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package editor encapsulates working with external text editor.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EditLoop

func EditLoop(ctx context.Context, fname, initial string, parse func(updated string) error) error

EditLoop launches OS-specific editor (VI, notepad.exe or another editor configured through environment variables) It creates a temporary file with 'initial' contents and repeatedly invokes the editor until the provided 'parse' function returns nil result indicating success. The 'parse' function is passed the contents of edited files without # line comments.

Types

This section is empty.

Jump to

Keyboard shortcuts

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