summaryrefslogtreecommitdiff
path: root/widgets/compose.go
diff options
context:
space:
mode:
authorMoritz Poldrack <git@moritz.sh>2022-03-18 09:53:02 +0100
committerRobin Jarry <robin@jarry.cc>2022-03-18 13:33:16 +0100
commite30bd324a3552fae3089110d39b61ddced66ddee (patch)
treec1d3ea03094f6781c082b627f04398909ae15234 /widgets/compose.go
parent62a5ebb1e19aeb36f8451510bc03d5dbe986fb04 (diff)
downloadaerc-e30bd324a3552fae3089110d39b61ddced66ddee.zip
go vet: composite literal uses unkeyed fields
This commit fixes all occurrences of the abovementioned lint-error in the codebase. Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'widgets/compose.go')
-rw-r--r--widgets/compose.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/widgets/compose.go b/widgets/compose.go
index 977c4c4..1300229 100644
--- a/widgets/compose.go
+++ b/widgets/compose.go
@@ -783,14 +783,14 @@ func (c *Composer) updateGrid() {
if c.grid == nil {
c.grid = ui.NewGrid().Columns([]ui.GridSpec{
- {ui.SIZE_WEIGHT, ui.Const(1)},
+ {Strategy: ui.SIZE_WEIGHT, Size: ui.Const(1)},
})
}
c.grid.Rows([]ui.GridSpec{
- {ui.SIZE_EXACT, ui.Const(height)},
- {ui.SIZE_EXACT, ui.Const(1)},
- {ui.SIZE_WEIGHT, ui.Const(1)},
+ {Strategy: ui.SIZE_EXACT, Size: ui.Const(height)},
+ {Strategy: ui.SIZE_EXACT, Size: ui.Const(1)},
+ {Strategy: ui.SIZE_WEIGHT, Size: ui.Const(1)},
})
if c.heditors != nil {
@@ -979,21 +979,21 @@ func newReviewMessage(composer *Composer, err error) *reviewMessage {
}
spec := []ui.GridSpec{
- {ui.SIZE_EXACT, ui.Const(1)},
+ {Strategy: ui.SIZE_EXACT, Size: ui.Const(1)},
}
for i := 0; i < len(actions)-1; i++ {
- spec = append(spec, ui.GridSpec{ui.SIZE_EXACT, ui.Const(1)})
+ spec = append(spec, ui.GridSpec{Strategy: ui.SIZE_EXACT, Size: ui.Const(1)})
}
- spec = append(spec, ui.GridSpec{ui.SIZE_EXACT, ui.Const(2)})
- spec = append(spec, ui.GridSpec{ui.SIZE_EXACT, ui.Const(1)})
+ spec = append(spec, ui.GridSpec{Strategy: ui.SIZE_EXACT, Size: ui.Const(2)})
+ spec = append(spec, ui.GridSpec{Strategy: ui.SIZE_EXACT, Size: ui.Const(1)})
for i := 0; i < len(composer.attachments)-1; i++ {
- spec = append(spec, ui.GridSpec{ui.SIZE_EXACT, ui.Const(1)})
+ spec = append(spec, ui.GridSpec{Strategy: ui.SIZE_EXACT, Size: ui.Const(1)})
}
// make the last element fill remaining space
- spec = append(spec, ui.GridSpec{ui.SIZE_WEIGHT, ui.Const(1)})
+ spec = append(spec, ui.GridSpec{Strategy: ui.SIZE_WEIGHT, Size: ui.Const(1)})
grid := ui.NewGrid().Rows(spec).Columns([]ui.GridSpec{
- {ui.SIZE_WEIGHT, ui.Const(1)},
+ {Strategy: ui.SIZE_WEIGHT, Size: ui.Const(1)},
})
uiConfig := composer.config.Ui