package
Version:
v0.0.5
Opens a new window with list of versions in this module.
Published: Apr 2, 2021
License: Apache-2.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
command
The command
predicate runs an external command.
Options
Option |
Required |
Description |
cmd |
yes |
Name of the command to run |
chdir |
|
Change into this directory before running the command |
Args |
|
List of command line args |
Stdin |
|
String to pass to command stdin |
Backgound |
|
If true, don't wait for the command return |
Results
Field |
Type |
Description |
result |
boolean |
false if command return code is not 0. Use result option to override |
rc |
int |
Return code of the command |
stdout |
string |
standard output |
stderr |
string |
error output |
Example:
command:
cmd: tr
args:
- A-Z
- a-z
stdin: "Hello World!"
register: lower
log:
msg: R.lower.stdout
Documentation
¶
New returns a new Predicate
type Predicate struct {
}
Predicate is a genapid.Predicate interface that describes the predicate
Call evaluates the predicate
Name returns the name of the predicate
func (predicate *Predicate) Params() interface{}
Params returns a reference to a struct params accepted by the predicate
Result returns data set by the predicate
Source Files
¶
Click to show internal directories.
Click to hide internal directories.