languages

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2025 License: Apache-2.0 Imports: 35 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Languages map[string]getFunc

Functions

func Get

func Get(name string) (lang highlight.Language, ok bool)

Gets one of the built-in languages using the name input. If the language exists, it is returned in lang, along with ok = true. If the language does not exist, an empty highlight.Language is returned in lang, and ok = false. If the language you want isn't built in, you can contribute it or add your own using highlight.NewLanguage.

lang, ok := languages.Get("go")
if !ok {
	lang = tsh.NewLanguage(...)
}

Types

This section is empty.

Source Files

  • languages.go

Jump to

Keyboard shortcuts

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