From fd718663811d8bd24e8e950012ba99ec2cbc05ef Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 18 Nov 2020 17:35:05 +0100 Subject: [PATCH] action: provide a Menu() getter 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. --- action.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/action.go b/action.go index de123932b..c5c298697 100644 --- a/action.go +++ b/action.go @@ -95,6 +95,10 @@ func (a *Action) release() { } } +func (a *Action) Menu() *Menu { + return a.menu +} + func (a *Action) Checkable() bool { return a.checkable }