diff options
author | Kali Kaneko (leap communications) <kali@leap.se> | 2019-08-08 00:19:33 +0200 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2019-08-08 00:19:33 +0200 |
commit | fde18e485ff7cbc7b2e33dade8e81136f06a5b60 (patch) | |
tree | 79a6dbd13e7e4a46e708a70104c548f403b477ae /vendor/github.com/jmshal/go-locale/detect_locale_linux.go | |
parent | 93e1de570f47b095905835735dbd67479aa0c2de (diff) |
[pkg] remove vendor
Diffstat (limited to 'vendor/github.com/jmshal/go-locale/detect_locale_linux.go')
-rw-r--r-- | vendor/github.com/jmshal/go-locale/detect_locale_linux.go | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/vendor/github.com/jmshal/go-locale/detect_locale_linux.go b/vendor/github.com/jmshal/go-locale/detect_locale_linux.go deleted file mode 100644 index df0c33d..0000000 --- a/vendor/github.com/jmshal/go-locale/detect_locale_linux.go +++ /dev/null @@ -1,31 +0,0 @@ -package go_locale - -import ( - "strings" - "errors" -) - -func DetectLocale() (string, error) { - out, err := getCommandOutput("locale") - if err != nil { - return "", err - } - - lines := strings.Split(out, "\n") - for _, line := range lines { - if line != "" { - parts := strings.Split(line, "=") - value := strings.Trim(parts[1], `"`) - - if value != "C" && value != "" { - encodingIndex := strings.Index(value, ".") - if encodingIndex != -1 { - value = value[0:encodingIndex] - } - return value, nil - } - } - } - - return "", errors.New("unable to locale locale") -} |