m-lab / go

General purpose libraries / APIs for use in mlab code.
Apache License 2.0
5 stars 6 forks source link

Add shx.Job interface with State, Description, and ExecJob #131

Closed stephen-soltesz closed 3 years ago

stephen-soltesz commented 3 years ago

This change adds a new package shx that provides shell-like operations for Go. Ultimately, shx is intended to replace M-Lab's use of the m-lab/pipe package because this package is a modified fork of a 7 year old, unmaintained package from github.com/go-pipe/pipe with several limitations.

The shx package overcomes these limitations with the following features:

This change is 1 of two or three to add more primitive types described in the package docstring: Exec, System, Func, Pipe, Script, with various convenience Jobs for common shell operations.


This change is Reviewable

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 997


Changes Missing Coverage Covered Lines Changed/Added Lines %
shx/job.go 115 120 95.83%
<!-- Total: 115 120 95.83% -->
Totals Coverage Status
Change from base Build 967: 0.2%
Covered Lines: 1695
Relevant Lines: 1827

💛 - Coveralls
stephen-soltesz commented 3 years ago

An example command using shx: https://github.com/m-lab/locate/blob/soltesz-shx-experiment/management/create_encrypted_signer_key.go

An example description of that command: https://github.com/m-lab/locate/blob/soltesz-shx-experiment/management/description_script.sh