diff options
author | Tim Culverhouse <tim@timculverhouse.com> | 2022-07-03 10:11:12 -0500 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-07-03 21:32:18 +0200 |
commit | d45c07eb6a0955a24efec7bd915ba19746042778 (patch) | |
tree | dc8fdd2ad6e7a99a9af458235bffc3071254fdfa /widgets/selector.go | |
parent | 12e8217d1fa0f4c4c83eebcc7473ecb8f0c072ba (diff) | |
download | aerc-d45c07eb6a0955a24efec7bd915ba19746042778.zip |
uiconfig: use pointer references to uiConfig
This patch changes references to uiConfig in function signatures and
structs to be pointers.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'widgets/selector.go')
-rw-r--r-- | widgets/selector.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/widgets/selector.go b/widgets/selector.go index 3eda06e..ea1dd97 100644 --- a/widgets/selector.go +++ b/widgets/selector.go @@ -16,13 +16,13 @@ type Selector struct { focused bool focus int options []string - uiConfig config.UIConfig + uiConfig *config.UIConfig onChoose func(option string) onSelect func(option string) } -func NewSelector(options []string, focus int, uiConfig config.UIConfig) *Selector { +func NewSelector(options []string, focus int, uiConfig *config.UIConfig) *Selector { return &Selector{ focus: focus, options: options, @@ -171,12 +171,12 @@ type SelectorDialog struct { callback func(string, error) title string prompt string - uiConfig config.UIConfig + uiConfig *config.UIConfig selector *Selector } func NewSelectorDialog(title string, prompt string, options []string, focus int, - uiConfig config.UIConfig, cb func(string, error)) *SelectorDialog { + uiConfig *config.UIConfig, cb func(string, error)) *SelectorDialog { sd := &SelectorDialog{ callback: cb, title: title, |