diff options
author | Robin Jarry <robin@jarry.cc> | 2023-03-08 00:33:41 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-03-08 00:43:05 +0100 |
commit | c477d83f2493871b215aa2f8b2668b9b84fd6295 (patch) | |
tree | ab397640d4ba6dbe848a2f721e946f276d6daa6a /models | |
parent | 56a6ed0cf71ecf55f37e94b574c41927452abc44 (diff) | |
download | aerc-c477d83f2493871b215aa2f8b2668b9b84fd6295.tar.gz |
templates: add switch/case functions
This allows much shorter templates.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
Diffstat (limited to 'models')
-rw-r--r-- | models/templates.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/models/templates.go b/models/templates.go index 54537a31..dc984fc4 100644 --- a/models/templates.go +++ b/models/templates.go @@ -44,3 +44,8 @@ type TemplateData interface { PendingKeys() string Style(string, string) string } + +type Case interface { + Matches(string) bool + Value() string +} |