editor

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package editor provides a simple interface for launching a text editor. it was inspired by kubectl edit and comes from https://github.com/yuuu/go-editor/blob/master/editor.go with some patch

Index

Constants

View Source
const DefaultEditor = "vi"

Variables

This section is empty.

Functions

This section is empty.

Types

type Editor

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

func NewDefaultEditor

func NewDefaultEditor() (*Editor, error)

func NewEditor

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

func (*Editor) CleanScience

func (editor *Editor) CleanScience(filepath string)

func (*Editor) Launch

func (editor *Editor) Launch(filepath string) error

type Error

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

func (*Error) Error

func (err *Error) Error() string

Jump to

Keyboard shortcuts

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