open

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Opener

type Opener interface {
	Open(resource string) error
}

Opener opens a file or URL in the user's preferred application.

type OpenerFunc

type OpenerFunc func(string) error

OpenerFunc is a func adapter for the Opener interface.

func (OpenerFunc) Open

func (f OpenerFunc) Open(resource string) error

Open invokes the OpenerFunc.

type OsOpener

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

OsOpener is an Opener using OS-specific commands. It is only relevant in desktop environments.

func NewOsOpener

func NewOsOpener(logger *logrus.Logger) *OsOpener

NewOsOpener creates a new OsOpener,

func (*OsOpener) Open

func (o *OsOpener) Open(resource string) error

Open opens a resource on Linux, it relies on "xdg-open".

Jump to

Keyboard shortcuts

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