Versions in this module Expand all Collapse all v0 v0.1.0 May 21, 2022 Changes in this version + func MustRegex(s string) *regex + func Regex(s string) (*regex, error) + type Detector struct + Exts []string + File *regex + Files []string + Header *regex + Name string + Priority int + func LoadDetectorJson(data []byte) (*Detector, error) + type Detectors map[string][]*Detector + func LoadDefaultDetectors() Detectors + func LoadDetectors(b []byte) (Detectors, error) + func (ds Detectors) Detect(filename string, header []byte) *Detector + func (ds Detectors) RegisterDetector(d *Detector) + func (ds Detectors) Serialize() ([]byte, error) + func (ds Detectors) SetPriority(lang string, priority int)