editor

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Editor

type Editor struct {
	// contains filtered or unexported fields
}

Editor defines the structure holding a handle to a file and the name of the program to open it in.

func NewEditor

func NewEditor(fname *string) (*Editor, error)

NewEditor is used to create a new text editor that is capable of editing the underlying text file.

Fname, is a pointer to a string. A non-empty string would mean that a permanent file will be created. A nil pointer would mean that a temporary file will be created.

func (*Editor) Exit

func (e *Editor) Exit() error

Exit closes and removes the file.

func (*Editor) Run

func (e *Editor) Run() ([]byte, error)

Run opens the file in the text editor.

Jump to

Keyboard shortcuts

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