browser

package
v1.0.0-...-3fe6b38 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lauch

func Lauch(url string, options *Options, browsers ...Browser) error

Types

type Browser

type Browser interface {
	Launcher

	Name() string
}

Browser describes host application it capable operate with.

func Firefox

func Firefox() Browser

type ErrBrowserNotFound

type ErrBrowserNotFound struct{}

Cannot find browser executable

func (ErrBrowserNotFound) Error

func (ErrBrowserNotFound) Error() string

type ErrLaunchError

type ErrLaunchError string

Failed to launch browser

func (ErrLaunchError) Error

func (e ErrLaunchError) Error() string

type Launcher

type Launcher interface {
	Launch(url string, options *Options) error
}

Launcher is responsible for starting application.

type Options

type Options struct {
	NewInstance bool
	Window      WindowOptions
}

type WindowOptions

type WindowOptions struct {
	Width  int
	Height int
}

Jump to

Keyboard shortcuts

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