summaryrefslogtreecommitdiff
path: root/widgets/msgviewer.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/msgviewer.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/msgviewer.go')
-rw-r--r--widgets/msgviewer.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go
index 9771a90..9b40ded 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"},