diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-05-12 15:08:58 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-05-12 16:37:29 -0400 |
commit | 84d2482ddbff9564c9ad75b2d30af66e3ddfd44d (patch) | |
tree | 8bfa567d2b6381f4a996ada2deff8a16aa85a3ac /Godeps/_workspace/src/github.com/cloudfoundry/jibber_jabber/jibber_jabber_unix.go | |
parent | d1efb66ad7b017f0fbfe6f0c20843b30f396e504 (diff) | |
download | chat-84d2482ddbff9564c9ad75b2d30af66e3ddfd44d.tar.gz chat-84d2482ddbff9564c9ad75b2d30af66e3ddfd44d.tar.bz2 chat-84d2482ddbff9564c9ad75b2d30af66e3ddfd44d.zip |
Updating go depencancies. Switching to go1.6 vendoring (#2949)
Diffstat (limited to 'Godeps/_workspace/src/github.com/cloudfoundry/jibber_jabber/jibber_jabber_unix.go')
-rw-r--r-- | Godeps/_workspace/src/github.com/cloudfoundry/jibber_jabber/jibber_jabber_unix.go | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/Godeps/_workspace/src/github.com/cloudfoundry/jibber_jabber/jibber_jabber_unix.go b/Godeps/_workspace/src/github.com/cloudfoundry/jibber_jabber/jibber_jabber_unix.go deleted file mode 100644 index 374d76176..000000000 --- a/Godeps/_workspace/src/github.com/cloudfoundry/jibber_jabber/jibber_jabber_unix.go +++ /dev/null @@ -1,57 +0,0 @@ -// +build darwin freebsd linux netbsd openbsd - -package jibber_jabber - -import ( - "errors" - "os" - "strings" -) - -func getLangFromEnv() (locale string) { - locale = os.Getenv("LC_ALL") - if locale == "" { - locale = os.Getenv("LANG") - } - return -} - -func getUnixLocale() (unix_locale string, err error) { - unix_locale = getLangFromEnv() - if unix_locale == "" { - err = errors.New(COULD_NOT_DETECT_PACKAGE_ERROR_MESSAGE) - } - - return -} - -func DetectIETF() (locale string, err error) { - unix_locale, err := getUnixLocale() - if err == nil { - language, territory := splitLocale(unix_locale) - locale = language - if territory != "" { - locale = strings.Join([]string{language, territory}, "-") - } - } - - return -} - -func DetectLanguage() (language string, err error) { - unix_locale, err := getUnixLocale() - if err == nil { - language, _ = splitLocale(unix_locale) - } - - return -} - -func DetectTerritory() (territory string, err error) { - unix_locale, err := getUnixLocale() - if err == nil { - _, territory = splitLocale(unix_locale) - } - - return -} |