From 483cf19d5de05e8a83fd1be6934baa169c7fd7c8 Mon Sep 17 00:00:00 2001 From: "Iskander (Alex) Sharipov" Date: Sat, 2 Feb 2019 10:19:12 +0300 Subject: common/herrors: Fix args order in strings.TrimPrefix Old code always returned "." or "" (if filepath.Ext(filename) returned "."). Now it properly trims the prefix. Signed-off-by: Iskander Sharipov --- common/herrors/error_locator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/herrors') diff --git a/common/herrors/error_locator.go b/common/herrors/error_locator.go index 3a72f4790..15de6d318 100644 --- a/common/herrors/error_locator.go +++ b/common/herrors/error_locator.go @@ -173,7 +173,7 @@ func chromaLexerFromType(fileType string) string { } func extNoDelimiter(filename string) string { - return strings.TrimPrefix(".", filepath.Ext(filename)) + return strings.TrimPrefix(filepath.Ext(filename), ".") } func chromaLexerFromFilename(filename string) string { -- cgit v1.2.3