sevki.org/goeylinguine

go get sevki.org/goeylinguine

Package goeylinguine is a package that uses data from github.com/github/linguist data to return a file's lexer type.

Index

Package Files

goeylinguine.go

type Language

type Language struct {
    Language   string
    Extensions []string
    FileNames  []string
    Color      string
    Lexer      string
    Type       string
}

Language information for linguist

func GetFileLanguage

func GetFileLanguage(f os.File) *Language

GetFileLanguage will return language information for the given os.File, useful for iterating trough readdir().

func GetLanguage

func GetLanguage(name string) *Language

GetLanguage will return language information for the given language.

func GetLanguageFromFileName

func GetLanguageFromFileName(fname string) *Language

GetLanguageFromFileName will return it's linguist information, color, lexer, type, etc of a given file name.

type Languages

type Languages struct {
    Languages []Language
}

Subdirectories