package
0.116.2
Repository: https://github.com/go-rod/rod.git
Documentation: pkg.go.dev

# Packages

Package main A helper to run go test on CI with the right environment variables.
Package main ...
Package main ...
Package main ...
Package main ...
Package main It helps to launcher a transparent shell under the current shell with some extra environment variables that are required by rod testing.
Package main ...

# Functions

AbsolutePaths returns absolute paths of files in current working directory.
All runs all actions concurrently, returns the wait function for all actions.
BackoffSleeper returns a sleeper that sleeps in a backoff manner every time get called.
CountSleeper wakes immediately.
CropImage by the specified box, quality is only for jpeg bin.
DefaultBackoff algorithm: A(n) = A(n-1) * random[1.9, 2.1).
Dump values for debugging.
E if the last arg is error, panic it.
EachSleepers returns a sleeper wakes up when each sleeper is awake.
EscapeGoString not using encoding like base64 or gzip because of they will make git diff every large for small change.
Exec command.
ExecLine of command.
FileExists checks if file exists, only for file, not for dir.
FormatCLIArgs into one line string.
Mkdir makes dir recursively.
MultiLogger is similar to https://golang.org/pkg/io/#MultiWriter.
MustToJSON encode data to json string.
MustToJSONBytes encode data to json bytes.
NewIdleCounter ...
NewImgProcessor create a ImgProcessor by the format.
Noop does nothing.
OutputFile auto creates file if not exists, it will try to detect the data type and auto output binary, string or json.
Pause the goroutine forever.
RaceSleepers returns a sleeper wakes up when one of the sleepers wakes.
RandString generate random string with specified string length.
ReadString reads file as string.
Retry fn and sleeper until fn returns true or s returns error.
S Template render, the params is key-value pairs.
Sleep the goroutine for specified seconds, such as 2.3 seconds.
SplicePngVertical splice png vertically, if there is only one image, it will return the image directly.
UseNode installs Node.js and set the bin path to PATH env var.

# Variables

InContainer will be true if is inside container environment, such as docker.
LoggerQuiet does nothing.
Panic is the same as the built-in panic.
TestEnvs for testing.

# Structs

IdleCounter is similar to sync.WaitGroup but it only resolves if no jobs for specified duration.
ImgOption is the option for image processing.
ImgWithBox is a image with a box, if the box is nil, it means the whole image.
MaxSleepCountError type.

# Interfaces

ImgProcessor is the interface for image processing.
Logger interface.

# Type aliases

Log type for Println.
Sleeper sleeps the current goroutine for sometime, returns the reason to wake, if ctx is done release resource.