package
0.0.5
Repository: https://github.com/jsautret/genapid.git
Documentation: pkg.go.dev

# README

command

The command predicate runs an external command.

Options

OptionRequiredDescription
cmdyesName of the command to run
chdirChange into this directory before running the command
ArgsList of command line args
StdinString to pass to command stdin
BackgoundIf true, don't wait for the command return

Results

FieldTypeDescription
resultbooleanfalse if command return code is not 0. Use result option to override
rcintReturn code of the command
stdoutstringstandard output
stderrstringerror output

Example:

command:
  cmd: tr
  args:
    - A-Z
    - a-z
  stdin: "Hello World!"
register: lower
log:
  msg: R.lower.stdout

# Functions

New returns a new Predicate.

# Variables

Name of the predicate.

# Structs

Predicate is a genapid.Predicate interface that describes the predicate.