diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2015-09-25 10:21:55 -0400 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2015-09-25 10:21:55 -0400 |
commit | 6dac2f42a070d066a51352ecbc24c2feb3f0966d (patch) | |
tree | ebc3cca10f4d81efb42bdaac473013aa460ba4ff /Godeps/_workspace/src/github.com/mssola/user_agent/browser.go | |
parent | 4a871e9df8f18f364dd1e6ba6092424941a53ebe (diff) | |
download | chat-6dac2f42a070d066a51352ecbc24c2feb3f0966d.tar.gz chat-6dac2f42a070d066a51352ecbc24c2feb3f0966d.tar.bz2 chat-6dac2f42a070d066a51352ecbc24c2feb3f0966d.zip |
Updated mssola/user_agent library
Diffstat (limited to 'Godeps/_workspace/src/github.com/mssola/user_agent/browser.go')
-rw-r--r-- | Godeps/_workspace/src/github.com/mssola/user_agent/browser.go | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/Godeps/_workspace/src/github.com/mssola/user_agent/browser.go b/Godeps/_workspace/src/github.com/mssola/user_agent/browser.go index 9fb27e5f3..c5612db7b 100644 --- a/Godeps/_workspace/src/github.com/mssola/user_agent/browser.go +++ b/Godeps/_workspace/src/github.com/mssola/user_agent/browser.go @@ -48,13 +48,21 @@ func (p *UserAgent) detectBrowser(sections []section) { if slen > 2 { p.browser.Version = sections[2].version if engine.name == "AppleWebKit" { - if sections[slen-1].name == "OPR" { + switch sections[slen-1].name { + case "Edge": + p.browser.Name = "Edge" + p.browser.Version = sections[slen-1].version + p.browser.Engine = "EdgeHTML" + p.browser.EngineVersion = "" + case "OPR": p.browser.Name = "Opera" p.browser.Version = sections[slen-1].version - } else if sections[2].name == "Chrome" { - p.browser.Name = "Chrome" - } else { - p.browser.Name = "Safari" + default: + if sections[2].name == "Chrome" { + p.browser.Name = "Chrome" + } else { + p.browser.Name = "Safari" + } } } else if engine.name == "Gecko" { name := sections[2].name |