From e30bd324a3552fae3089110d39b61ddced66ddee Mon Sep 17 00:00:00 2001 From: Moritz Poldrack Date: Fri, 18 Mar 2022 09:53:02 +0100 Subject: 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 Acked-by: Robin Jarry --- widgets/msgviewer.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'widgets/msgviewer.go') diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go index 9771a905..9b40dede 100644 --- a/widgets/msgviewer.go +++ b/widgets/msgviewer.go @@ -71,7 +71,7 @@ func NewMessageViewer(acct *AccountView, ) rows := []ui.GridSpec{ - {ui.SIZE_EXACT, ui.Const(headerHeight)}, + {Strategy: ui.SIZE_EXACT, Size: ui.Const(headerHeight)}, } if msg.PGPDetails() != nil { @@ -79,16 +79,16 @@ func NewMessageViewer(acct *AccountView, if msg.PGPDetails().IsSigned && msg.PGPDetails().IsEncrypted { height = 2 } - rows = append(rows, ui.GridSpec{ui.SIZE_EXACT, ui.Const(height)}) + rows = append(rows, ui.GridSpec{Strategy: ui.SIZE_EXACT, Size: ui.Const(height)}) } rows = append(rows, []ui.GridSpec{ - {ui.SIZE_EXACT, ui.Const(1)}, - {ui.SIZE_WEIGHT, ui.Const(1)}, + {Strategy: ui.SIZE_EXACT, Size: ui.Const(1)}, + {Strategy: ui.SIZE_WEIGHT, Size: ui.Const(1)}, }...) grid := ui.NewGrid().Rows(rows).Columns([]ui.GridSpec{ - {ui.SIZE_WEIGHT, ui.Const(1)}, + {Strategy: ui.SIZE_WEIGHT, Size: ui.Const(1)}, }) switcher := &PartSwitcher{} @@ -539,11 +539,11 @@ func NewPartViewer(acct *AccountView, conf *config.AercConfig, } grid := ui.NewGrid().Rows([]ui.GridSpec{ - {ui.SIZE_EXACT, ui.Const(3)}, // Message - {ui.SIZE_EXACT, ui.Const(1)}, // Selector - {ui.SIZE_WEIGHT, ui.Const(1)}, + {Strategy: ui.SIZE_EXACT, Size: ui.Const(3)}, // Message + {Strategy: ui.SIZE_EXACT, Size: ui.Const(1)}, // Selector + {Strategy: ui.SIZE_WEIGHT, Size: ui.Const(1)}, }).Columns([]ui.GridSpec{ - {ui.SIZE_WEIGHT, ui.Const(1)}, + {Strategy: ui.SIZE_WEIGHT, Size: ui.Const(1)}, }) selector := NewSelector([]string{"Save message", "Pipe to command"}, -- cgit