diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-17 00:23:51 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-17 00:23:51 +0200 |
| commit | 04b4243ad31d144c4caf9be4c5096a0f27a2648e (patch) | |
| tree | 056515d145ba8e4fba29a2150b2c58199133b0c1 /internal/cond | |
| parent | 9db67b201b80e9b7f824989df8517cefc587036d (diff) | |
| download | krino-04b4243ad31d144c4caf9be4c5096a0f27a2648e.tar.gz krino-04b4243ad31d144c4caf9be4c5096a0f27a2648e.zip | |
gui: syntax colours, a file preview, and a settings window
Diffstat (limited to 'internal/cond')
| -rw-r--r-- | internal/cond/types.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/cond/types.go b/internal/cond/types.go index 28a4fc9..62a6640 100644 --- a/internal/cond/types.go +++ b/internal/cond/types.go @@ -131,6 +131,11 @@ func (c *Cond) NameGroups() []int { // groups maps a (type ...) group name to the extensions it expands to, // spec Appendix A. +// Group is the extensions a built-in type group holds - what (type image) +// means - so a front end can treat a file the way the rules do rather than +// keeping a second list of its own. The result is not to be modified. +func Group(name string) []string { return groups[name] } + var groups = map[string][]string{ "image": {"jpg", "jpeg", "png", "gif", "webp", "bmp", "tif", "tiff", "heic", "heif", "avif", "svg", "ico", "raw", "cr2", "nef", "arw", "dng"}, "video": {"mp4", "mkv", "webm", "mov", "avi", "m4v", "mpg", "mpeg", "wmv", "flv", "3gp"}, |
