mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-19 17:35:16 +00:00
Merge main (recutils #2201); convert its three new parser closures
Same mechanical rewrite as the rest of phase 2: error return signature plus final 'return nil' on --irecutils/--orecutils/--recutils. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
a1a633f872
commit
39ff1b7ce9
1 changed files with 6 additions and 3 deletions
|
|
@ -958,9 +958,10 @@ var FileFormatFlagSection = FlagSection{
|
|||
{
|
||||
name: "--irecutils",
|
||||
help: "Use GNU recutils (.rec) format for input data.",
|
||||
parser: func(args []string, argc int, pargi *int, options *TOptions) {
|
||||
parser: func(args []string, argc int, pargi *int, options *TOptions) error {
|
||||
options.ReaderOptions.InputFileFormat = "recutils"
|
||||
*pargi += 1
|
||||
return nil
|
||||
},
|
||||
},
|
||||
|
||||
|
|
@ -1257,9 +1258,10 @@ var FileFormatFlagSection = FlagSection{
|
|||
{
|
||||
name: "--orecutils",
|
||||
help: "Use GNU recutils (.rec) format for output data.",
|
||||
parser: func(args []string, argc int, pargi *int, options *TOptions) {
|
||||
parser: func(args []string, argc int, pargi *int, options *TOptions) error {
|
||||
options.WriterOptions.OutputFileFormat = "recutils"
|
||||
*pargi += 1
|
||||
return nil
|
||||
},
|
||||
},
|
||||
|
||||
|
|
@ -1481,10 +1483,11 @@ var FileFormatFlagSection = FlagSection{
|
|||
{
|
||||
name: "--recutils",
|
||||
help: "Use GNU recutils (.rec) format for input and output data.",
|
||||
parser: func(args []string, argc int, pargi *int, options *TOptions) {
|
||||
parser: func(args []string, argc int, pargi *int, options *TOptions) error {
|
||||
options.ReaderOptions.InputFileFormat = "recutils"
|
||||
options.WriterOptions.OutputFileFormat = "recutils"
|
||||
*pargi += 1
|
||||
return nil
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue