Categorygithub.com/Songmu/timeout
modulepackage
0.4.0
Repository: https://github.com/songmu/timeout.git
Documentation: pkg.go.dev

# README

timeout

Build Status Coverage Status MIT License GoDoc

Timeout invocation. Go porting of GNU timeout

Description

Run a given command with a time limit.

Synopsis

tio := &timeout.Timeout{
	Cmd:            exec.Command("perl", "-E", "say 'Hello'"),
	Duration:       10 * time.Second,
	KillAfter:      5 * time.Second,
}
exitStatus, stdout, stderr, err := tio.Run()

Author

Songmu

# Packages

No description provided by the author

# Structs

Error is error of timeout.
ExitStatus stores exit information of the command.
Timeout is main struct of timeout package.