defaults

package
v0.1.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

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

The "-wand" flag is the middle of wand's three configuration surfaces: an option set in code beats it, and it beats the launcher's WAND_BROWSER_* environment variables, which beat the launcher's own discovery. So for the browser binary, Launcher.Bin beats "-wand=bin=", which beats WAND_BROWSER_BIN, which beats the search for a System browser, then a Managed browser, cached or downloaded (Browser resolution, ADR-0005). The six variables, documented with the launcher, are WAND_BROWSER_BIN, WAND_BROWSER_CACHE, WAND_BROWSER_HOSTS, WAND_BROWSER_DOWNLOAD, WAND_BROWSER_SOURCE and WAND_BROWSER_BINARY; only "bin" has a "-wand" option beside it.

Index

Constants

This section is empty.

Variables

Bin is the default of launcher.Launcher.Bin: the browser binary to launch. Option name is "bin". It beats WAND_BROWSER_BIN and the launcher's search for a System browser; Launcher.Bin in code beats it.

CDP is the default of cdp.Client.Logger Option name is "cdp".

View Source
var Devtools bool

Devtools is the default of launcher.Launcher.Devtools . Option name is "devtools".

Dir is the default of launcher.Launcher.UserDataDir . Option name is "dir".

View Source
var Monitor string

Monitor is the default of wand.Browser.ServeMonitor . Option name is "monitor".

View Source
var Port string

Port is the default of launcher.Launcher.RemoteDebuggingPort . Option name is "port".

View Source
var Proxy string

Proxy is the default of launcher.Launcher.Proxy Option name is "proxy".

View Source
var Show bool

Show is the default of launcher.Launcher.Headless . Option name is "show".

Slow is the default of wand.Browser.SlowMotion . The format is same as https://golang.org/pkg/time/#ParseDuration Option name is "slow".

View Source
var Trace bool

Trace is the default of wand.Browser.Trace . Option name is "trace".

URL is the default websocket url for remote control a browser. Option name is "url".

Functions

func Reset

func Reset()

Reset all flags to their init values.

func ResetWith

func ResetWith(options string)

ResetWith options and "-wand" command line flag. It will be called in an init() , so you don't have to call it manually. It will try to load the cli flag "-wand" and then the options, the later override the former. If you want to disable the global cli argument flag, set env DISABLE_WAND_FLAG. Values are separated by commas, key and value are separated by "=". For example:

go run main.go -wand=show
go run main.go -wand show,trace,slow=1s,monitor
go run main.go --wand="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