Skip to content

Commit 1922a3a

Browse files
committed
Fixing last commit
1 parent 005016c commit 1922a3a

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

_examples/gen.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func (args *Args) writeCommand(w io.Writer, cmd *command, indent int) error {
181181
fmt.Fprintf(w, ",\n")
182182
}
183183
for _, c := range cmd.commands {
184-
fmt.Fprintf(w, "%sox.Sub( // %s\n", padding, strings.Join(c.path(), " "))
184+
fmt.Fprintf(w, "%sox.Sub( // %s\n", padding, strings.Join(c.names(), " "))
185185
if err := args.writeCommand(w, c, indent+1); err != nil {
186186
return err
187187
}
@@ -240,15 +240,6 @@ type command struct {
240240
flags []flag
241241
}
242242

243-
func (cmd *command) path() []string {
244-
v := []string{cmd.name}
245-
for c := cmd.parent; c != nil; c = c.parent {
246-
v = append(v, c.name)
247-
}
248-
slices.Reverse(v)
249-
return v
250-
}
251-
252243
func (cmd *command) parse(ctx context.Context) error {
253244
args := append([]string{"help"}, cmd.names()[1:]...)
254245
switch cmd.app {

0 commit comments

Comments
 (0)