Documentation
¶
Overview ¶
Package open implements a cross-platform supported opens stuff like websites, files, directory or executables.
Index ¶
- func Command(ctx context.Context, input string, opts ...Option) (*exec.Cmd, error)
- func Run(input string, opts ...Option) error
- func RunContext(ctx context.Context, input string, opts ...Option) error
- func Start(input string, opts ...Option) (func() error, error)
- func StartContext(ctx context.Context, input string, opts ...Option) (func() error, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run opens the URI, files, directory or executables using the GOOS default application. Wait for the open command to complete.
func RunContext ¶
RunContext opens the URI, files, directory or executables using the GOOS default application with context support. Wait for the open command to complete.
Types ¶
type Option ¶
type Option func(*options)
Option represents a functional pattern option type for options.
func WithApplication ¶
WithApplication sets the open with specific application to open command.
Click to show internal directories.
Click to hide internal directories.