Skip to content

Commit e20c1db

Browse files
committed
doc: add note on how Cmd.Parent is set
1 parent 9866887 commit e20c1db

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cmd.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import (
2424
// Cmd describes an executable command.
2525
type Cmd struct {
2626
// Parent is the direct parent of the command.
27+
//
28+
// It is set automatically when an invokation runs.
2729
Parent *Cmd
2830
// Children is a list of direct descendants.
2931
Children []*Cmd

0 commit comments

Comments
 (0)