cmdutil

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FatalIfError

func FatalIfError(err error)

FatalIfError prints err to stderr and exits with code 1.

Types

type BrowserLauncher

type BrowserLauncher interface {
	Browse(url string) error
}

BrowserLauncher opens URLs.

type EditorLauncher

type EditorLauncher interface {
	Edit(filename string) error
}

EditorLauncher opens a file in $EDITOR.

type SystemBrowser

type SystemBrowser struct{}

SystemBrowser is the real browser launcher.

func (*SystemBrowser) Browse

func (b *SystemBrowser) Browse(url string) error

Browse opens the given URL in the system browser.

type SystemEditor

type SystemEditor struct{}

SystemEditor is the real editor launcher.

func (*SystemEditor) Edit

func (e *SystemEditor) Edit(filename string) error

Edit opens the given filename in $EDITOR.

Jump to

Keyboard shortcuts

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