editor

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package editor handles opening external text editors for interactive content editing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client handles opening external editors.

func NewClient

func NewClient() *Client

NewClient creates a new editor client with auto-detected editor.

func NewClientWithEditor

func NewClientWithEditor(editorCmd string) *Client

NewClientWithEditor creates a new editor client with a specific editor command.

func (*Client) GetEditor

func (c *Client) GetEditor() string

GetEditor returns the editor command that will be used.

func (*Client) Open

func (c *Client) Open(content string) (string, error)

Open opens the given content in the configured editor. Returns the modified content after the editor closes.

Jump to

Keyboard shortcuts

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