On this page
The go:embed classification data: the text extension and text MIME type lists, the dark and light terminal color themes, and the loaders that parse them.
#internal/config
#internal/config
Package config provides the embedded text-classification lists and color themes. Everything is compiled into the binary via go:embed: there are no runtime config files and no lookup in cwd, HOME, or XDG directories. Changing the lists means a rebuild.
#Theme
type Theme structTheme holds the ANSI 256-color codes for one color theme. Each value is a 256-color palette index as a decimal string, or "" for no color.
#TextExtensions
func TextExtensions() map[string]struct{}TextExtensions returns the set of lowercased, dot-stripped file extensions that classify a file as text.
#TextMimetypes
func TextMimetypes() map[string]struct{}TextMimetypes returns the set of lowercased MIME types that classify a file as text even though they do not start with "text/".
#CanonicalFormats
func CanonicalFormats() map[string]stringCanonicalFormats returns the alias table applied to group names under --formats canonical: raw group name (a normalized extension or a sniffed MIME type) to the canonical format it is counted under.
#LoadTheme
func LoadTheme(name string) ThemeLoadTheme returns the embedded theme for name, which must be "dark" or "light".