Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/songmu/timeout
Timeout invocation. Go porting of GNU timeout and able to use as Go package
https://github.com/songmu/timeout
Last synced: 11 days ago
JSON representation
Timeout invocation. Go porting of GNU timeout and able to use as Go package
- Host: GitHub
- URL: https://github.com/songmu/timeout
- Owner: Songmu
- License: mit
- Created: 2015-03-07T16:18:25.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-04-21T11:11:39.000Z (over 5 years ago)
- Last Synced: 2024-10-11T21:09:24.534Z (27 days ago)
- Language: Go
- Homepage:
- Size: 79.1 KB
- Stars: 74
- Watchers: 5
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
timeout
=======[![Build Status](https://travis-ci.org/Songmu/timeout.png?branch=master)][travis]
[![Coverage Status](https://coveralls.io/repos/Songmu/timeout/badge.png?branch=master)][coveralls]
[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)][license]
[![GoDoc](https://godoc.org/github.com/Songmu/timeout?status.svg)][godoc][travis]: https://travis-ci.org/Songmu/timeout
[coveralls]: https://coveralls.io/r/Songmu/timeout?branch=master
[license]: https://github.com/Songmu/timeout/blob/master/LICENSE
[godoc]: https://godoc.org/github.com/Songmu/timeoutTimeout 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](https://github.com/Songmu)