-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
languages: copy over latest version from sourcegraph
I realised we haven't been updating this package as we updated the package in the sourcegraph repo. We don't need all the functionality it has, but its easier to just copy paste everything. Test Plan: go test
- Loading branch information
1 parent
be438ef
commit 78a7ea4
Showing
10 changed files
with
908 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package languages | ||
|
||
import "strings" | ||
|
||
// This file contains functions private functions | ||
// vendored from the go-enry codebase. | ||
|
||
// convertToAliasKey is vendored from go-enry to make sure | ||
// we're normalizing strings the same way. | ||
func convertToAliasKey(langName string) string { | ||
ak := strings.SplitN(langName, `,`, 2)[0] | ||
ak = strings.Replace(ak, ` `, `_`, -1) | ||
ak = strings.ToLower(ak) | ||
return ak | ||
} |
Oops, something went wrong.