Skip to content

Commit b177a75

Browse files
committed
using a named struct for Files
1 parent e0e1bf6 commit b177a75

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

config.go

+6-4
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ import (
88
"golang.org/x/crypto/ssh/terminal"
99
)
1010

11+
type Files struct {
12+
LHS string `positional-arg-name:"FILE_1"`
13+
RHS string `positional-arg-name:"FILE_2"`
14+
}
15+
1116
type config struct {
12-
Files struct {
13-
LHS string `positional-arg-name:"FILE_1"`
14-
RHS string `positional-arg-name:"FILE_2"`
15-
} `positional-args:"yes" required:"yes"`
17+
Files Files `positional-args:"yes" required:"yes"`
1618
Ignore ignorePatterns `long:"ignore" short:"i" description:"paths to ignore (glob)"`
1719
output
1820
OutputReport bool `long:"report" short:"r" description:"output report format"`

0 commit comments

Comments
 (0)