Этот коммит содержится в:
Christopher Speller
2016-09-23 10:17:51 -04:00
коммит произвёл GitHub
родитель 6d62d65b2d
Коммит 2ca0e8f9a0
366 изменённых файлов: 31573 добавлений и 16566 удалений

15
vendor/github.com/mssola/user_agent/user_agent.go сгенерированный поставляемый
Просмотреть файл

@@ -1,4 +1,4 @@
// Copyright (C) 2012-2016 Miquel Sabaté Solà <mikisabate@gmail.com>
// Copyright (C) 2012-2014 Miquel Sabaté Solà <mikisabate@gmail.com>
// This file is licensed under the MIT license.
// See the LICENSE file.
@@ -8,7 +8,9 @@
// information that has been extracted from a parsed User Agent string.
package user_agent
import "strings"
import (
"strings"
)
// A section contains the name of the product, its version and
// an optional comment.
@@ -139,9 +141,7 @@ func (p *UserAgent) Parse(ua string) {
}
if len(sections) > 0 {
if sections[0].name == "Mozilla" {
p.mozilla = sections[0].version
}
p.mozilla = sections[0].version
p.detectBrowser(sections)
p.detectOS(sections[0])
@@ -167,8 +167,3 @@ func (p *UserAgent) Bot() bool {
func (p *UserAgent) Mobile() bool {
return p.mobile
}
// Returns the original given user agent.
func (p *UserAgent) UA() string {
return p.ua
}