Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EnvKey = envKeyType{}
EnvKey is a context.Context.WithValue key that can be used to override the environment of commands that are executed by this package. The value must have type []string where each entry has the form "name=value".
Functions ¶
func DecodeJsonStream ¶
func DecodeJsonStream[T any](ctx context.Context, wd string, args ...string) (iter.Seq[T], func() error)
DecodeJsonStream calls Pipe and processes the output as a stream of JSON objects. The returned done callback must be called when done processing the JSON stream. Beware that if the done callback is called before the command is done outputting JSON values then the command will receive a SIGPIPE signal.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.