MCPcopy Create free account
hub / github.com/JordanCoin/codemap / DetectLanguage

Function DetectLanguage

scanner/types.go:96–99  ·  view source on GitHub ↗

DetectLanguage returns the language name for a file path

(filePath string)

Source from the content-addressed store, hash-verified

94
95// DetectLanguage returns the language name for a file path
96func DetectLanguage(filePath string) string {
97 ext := strings.ToLower(filepath.Ext(filePath))
98 return extToLang[ext]
99}
100
101// IsSourceExt returns true if the extension (with leading dot) is a recognized source file.
102func IsSourceExt(ext string) bool {

Callers 9

findBlastRadiusSnippetFunction · 0.92
showMatchedSkillsFunction · 0.92
buildContextEnvelopeFunction · 0.92
buildProjectContextFunction · 0.92
detectLanguagesFromFilesFunction · 0.92
getProjectStatsFunction · 0.92
handleEventMethod · 0.92
TestDepsDetectLanguageFunction · 0.85
TestDetectLanguageFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestDepsDetectLanguageFunction · 0.68
TestDetectLanguageFunction · 0.68