Skip to content

Commit

Permalink
action: provide a Menu() getter
Browse files Browse the repository at this point in the history
It's useful for abstractions to be able to get the Menu back out of an
action after putting it in, so this commit adds a simple accessor for
it.
  • Loading branch information
zx2c4 committed Nov 18, 2020
1 parent 18ea5e3 commit fd71866
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions action.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ func (a *Action) release() {
}
}

func (a *Action) Menu() *Menu {
return a.menu
}

func (a *Action) Checkable() bool {
return a.checkable
}
Expand Down

0 comments on commit fd71866

Please sign in to comment.