diff options
author | Robin Jarry <robin@jarry.cc> | 2023-06-08 22:16:31 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-06-10 23:54:06 +0200 |
commit | 9479513ec138b0e4b2ad2c53a0566c00c7035845 (patch) | |
tree | 98ce844e82eeebf2151a3c0fa1ac1b530964f344 /commands | |
parent | 8162c5be8f251e985a18928ed1a8cb571df40945 (diff) | |
download | aerc-9479513ec138b0e4b2ad2c53a0566c00c7035845.tar.gz |
templates: add map functions
Similar to switch and .StyleSwitch, add map and .StyleMap to work on
lists. An extra "exclude" item is available to filter elements out of
the list.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Inwit <inwit@sindominio.net>
Diffstat (limited to 'commands')
-rw-r--r-- | commands/commands_test.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/commands/commands_test.go b/commands/commands_test.go index e510ebe1..7c3ec84f 100644 --- a/commands/commands_test.go +++ b/commands/commands_test.go @@ -106,3 +106,5 @@ func (d *dummyData) PendingKeys() string { return "" } func (d *dummyData) Role() string { return "inbox" } func (d *dummyData) Style(string, string) string { return "" } func (d *dummyData) StyleSwitch(string, ...models.Case) string { return "" } + +func (d *dummyData) StyleMap([]string, ...models.Case) []string { return []string{} } |