defaults

package
v0.78.5 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package defaults of commonly used options parsed from environment. Check ResetWithEnv for details.

Index

Constants

This section is empty.

Variables

Bin is the default of launcher.Launcher.Bin

CDP is the default of cdp.Client.Logger

View Source
var Devtools bool

Devtools is the default of launcher.Launcher.Devtools

Dir is the default of launcher.Launcher.UserDataDir

View Source
var Lock int

Lock is the default of launcher.Browser.Lock

View Source
var Monitor string

Monitor is the default of rod.Browser.ServeMonitor

View Source
var Port string

Port is the default of launcher.Launcher.RemoteDebuggingPort

View Source
var Proxy string

Proxy is the default of launcher.Launcher.Proxy

View Source
var Show bool

Show is the default of launcher.Launcher.Headless

Slow is the default of rod.Browser.Slowmotion

View Source
var Trace bool

Trace is the default of rod.Browser.Trace

URL is the default of cdp.Client.New

Functions

func Reset

func Reset()

Reset all flags to their init values.

func ResetWithEnv

func ResetWithEnv(env string)

ResetWithEnv set the default value of options used by rod. It will be called in an init() , so you don't have to call it manually. The followings will be parsed and merged, later overrides previous:

os.Open(".rod")
os.Getenv("rod")
env

Values are separated by commas, key and value are separated by "=", For example, on unix-like OS:

rod="show,trace,slow,monitor" go run main.go

rod="slow=1s,dir=path/has /space,monitor=:9223" go run main.go

An example of ".rod" file content:

slow=1s
dir=path/has /space
monitor=:9223

Types

This section is empty.

Jump to

Keyboard shortcuts

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