From f9388f6385f4114a478d2b87c72871f3696cf71a Mon Sep 17 00:00:00 2001 From: Sylvain Rabot Date: Sun, 17 Jan 2021 00:22:48 +0100 Subject: [PATCH] Fix typos Signed-off-by: Sylvain Rabot --- ua.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ua.go b/ua.go index 41d7d8a..894481b 100644 --- a/ua.go +++ b/ua.go @@ -6,7 +6,7 @@ import ( "strings" ) -// UserAgent struct containg all determined datra from parsed user-agent string +// UserAgent struct containing all data extracted from parsed user-agent string type UserAgent struct { Name string Version string @@ -29,7 +29,7 @@ var ignore = map[string]struct{}{ "WOW64": struct{}{}, } -// Constants for browsers and operating systems for easier comparation +// Constants for browsers and operating systems for easier comparison const ( Windows = "Windows" WindowsPhone = "Windows Phone" @@ -195,7 +195,7 @@ func Parse(userAgent string) UserAgent { ua.Version = tokens["SamsungBrowser"] ua.Mobile = tokens.existsAny("Mobile", "Mobile Safari") - // if chrome and Safari defined, find any other tokensent descr + // if chrome and Safari defined, find any other token sent descr case tokens.exists(Chrome) && tokens.exists(Safari): name := tokens.findBestMatch(true) if name != "" { @@ -236,7 +236,7 @@ func Parse(userAgent string) UserAgent { } } - // if tabler, switch mobile to off + // if tablet, switch mobile to off if ua.Tablet { ua.Mobile = false } @@ -381,7 +381,7 @@ func (p properties) findMacOSVersion() string { } // findBestMatch from the rest of the bunch -// in first cycle only return key vith version value +// in first cycle only return key with version value // if withVerValue is false, do another cycle and return any token func (p properties) findBestMatch(withVerOnly bool) string { n := 2