catalog

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(info LanguageInfo)

Register stores language metadata for extension lookups. Subsequent registrations for the same language overwrite prior data to keep the catalog in sync with the latest provider definition.

Types

type LanguageInfo

type LanguageInfo struct {
	ID         string
	Extensions []string
}

LanguageInfo captures metadata about a language provider.

func Languages

func Languages() []LanguageInfo

Languages returns all registered language infos sorted by language ID.

func LookupByExtension

func LookupByExtension(ext string) (LanguageInfo, bool)

LookupByExtension returns the language info associated with a file extension.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL