Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Join ¶
Join compares two sorted line streams on their common first field and emits one output line per matching pair: the key, the rest of the line1 row, then the rest of the line2 row, separated by the field separator. Lines without a pair in the other input are omitted (GNU default).
Opts:
- 1st positional file/Reader: input1 (overrides the upstream stream).
- 2nd positional file/Reader: input2.
- JoinInput: input2 as raw lines (highest precedence for input2).
- JoinSeparator (-t): the field separator (defaults to a single space).
- JoinFs: filesystem used to open File positionals (defaults to the OS).
Types ¶
type JoinFs ¶
JoinFs injects the filesystem used to open File positionals, so tests can supply an in-memory filesystem (afero.NewMemMapFs()). The zero value falls back to the OS filesystem.
type JoinInput ¶
type JoinInput [][]byte
JoinInput supplies the second input as raw lines, taking precedence over any second positional file path.
type JoinSeparator ¶
type JoinSeparator string
JoinSeparator is the -t field separator: the byte sequence that delimits the join key from the rest of each line and joins fields in the output.