diff options
author | Moritz Poldrack <git@moritz.sh> | 2022-07-31 22:16:40 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-08-01 10:44:52 +0200 |
commit | aaf0a0c65673db4b94c0dc200d7394a192128da1 (patch) | |
tree | 44940936efff55b49a6d359d053f55c7ab824e4d /lib/ui | |
parent | 21dcd440f877192af128c00ca2acbabf68bb3ee3 (diff) | |
download | aerc-aaf0a0c65673db4b94c0dc200d7394a192128da1.tar.gz |
lint: apply new formatting rules
Run `make fmt`.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'lib/ui')
-rw-r--r-- | lib/ui/borders.go | 3 | ||||
-rw-r--r-- | lib/ui/context.go | 3 | ||||
-rw-r--r-- | lib/ui/tab.go | 6 | ||||
-rw-r--r-- | lib/ui/textinput.go | 3 | ||||
-rw-r--r-- | lib/ui/ui.go | 1 |
5 files changed, 10 insertions, 6 deletions
diff --git a/lib/ui/borders.go b/lib/ui/borders.go index 6a5e9dc9..8d381b91 100644 --- a/lib/ui/borders.go +++ b/lib/ui/borders.go @@ -22,7 +22,8 @@ type Bordered struct { } func NewBordered( - content Drawable, borders uint, uiConfig *config.UIConfig) *Bordered { + content Drawable, borders uint, uiConfig *config.UIConfig, +) *Bordered { b := &Bordered{ borders: borders, content: content, diff --git a/lib/ui/context.go b/lib/ui/context.go index 7936f359..fc2104df 100644 --- a/lib/ui/context.go +++ b/lib/ui/context.go @@ -63,7 +63,8 @@ func (ctx *Context) SetCell(x, y int, ch rune, style tcell.Style) { } func (ctx *Context) Printf(x, y int, style tcell.Style, - format string, a ...interface{}) int { + format string, a ...interface{}, +) int { width, height := ctx.viewport.Size() if x >= width || y >= height { diff --git a/lib/ui/tab.go b/lib/ui/tab.go index fd49dfee..bcad23c2 100644 --- a/lib/ui/tab.go +++ b/lib/ui/tab.go @@ -36,8 +36,10 @@ type Tab struct { uiConf *config.UIConfig } -type TabStrip Tabs -type TabContent Tabs +type ( + TabStrip Tabs + TabContent Tabs +) func NewTabs(uiConf *config.UIConfig) *Tabs { tabs := &Tabs{} diff --git a/lib/ui/textinput.go b/lib/ui/textinput.go index 9d1de963..8f8f00d0 100644 --- a/lib/ui/textinput.go +++ b/lib/ui/textinput.go @@ -59,7 +59,8 @@ func (ti *TextInput) Prompt(prompt string) *TextInput { } func (ti *TextInput) TabComplete( - tabcomplete func(s string) ([]string, string), d time.Duration) *TextInput { + tabcomplete func(s string) ([]string, string), d time.Duration, +) *TextInput { ti.tabcomplete = tabcomplete ti.completeDelay = d return ti diff --git a/lib/ui/ui.go b/lib/ui/ui.go index b65c06a4..1f618a6f 100644 --- a/lib/ui/ui.go +++ b/lib/ui/ui.go @@ -19,7 +19,6 @@ type UI struct { } func Initialize(content DrawableInteractive) (*UI, error) { - screen, err := tcell.NewScreen() if err != nil { return nil, err |