descriptors

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2020 License: BSD-3-Clause Imports: 5 Imported by: 6

Documentation

Overview

Package descriptors defines helper functions for common file descriptors.

Index

Constants

This section is empty.

Variables

View Source
var (
	// InputFDFlag defines the standard --input-fd flag.
	InputFDFlag = cli.StringFlag{
		Name:  "input-fd",
		Value: "stdin",
		Usage: "input file descriptor",
	}
	// OutputFDFlag defines the standard --output-fd flag.
	OutputFDFlag = cli.StringFlag{
		Name:  "output-fd",
		Value: "stdout",
		Usage: "output file descriptor",
	}
	// StatusFDFlag defines the standard --status-fd flag.
	StatusFDFlag = cli.StringFlag{
		Name:  "status-fd",
		Value: "stderr",
		Usage: "status file descriptor",
	}
	// PassphraseFDFlag defines the standard --passphrase-fd flag.
	PassphraseFDFlag = cli.StringFlag{
		Name:  "passphrase-fd",
		Value: "3",
		Usage: "passphrase file descriptor",
	}
	// CommandFDFlag defines the standard --command-fd flag.
	CommandFDFlag = cli.StringFlag{
		Name:  "command-fd",
		Value: "4",
		Usage: "command file descriptor",
	}
)

Functions

This section is empty.

Types

type Table

type Table struct {
	InputFD      uintptr  // input file descriptor
	OutputFD     uintptr  // output file descriptor
	StatusFD     uintptr  // status file descriptor
	PassphraseFD uintptr  // passphrase file descriptor
	CommandFD    uintptr  // command file descriptor
	InputFP      *os.File // input file pointer
	OutputFP     *os.File // output file pointer
	StatusFP     *os.File // status file pointer
	PassphraseFP *os.File // passphrase file pointer
	CommandFP    *os.File // command file pointer
}

Table contains all standard file descriptors and file pointers.

func NewTable

func NewTable(c *cli.Context) (*Table, error)

NewTable parses the standard file descriptor options in context c and returns a table with the corresponding file descriptors and file pointers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL