From b486b63b54cbbc69cdf72a38842be4b9e6537e53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miquel=20Sabat=C3=A9=20Sol=C3=A0?= Date: Fri, 17 Feb 2023 16:39:32 +0100 Subject: [PATCH] Renamed package to useragent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- CHANGELOG.md | 72 ++++++++++++++++++++++---------------------- CONTRIBUTING.md | 6 ++-- README.md | 12 ++++---- all_test.go | 2 +- bot.go | 2 +- browser.go | 2 +- go.mod | 2 +- model.go | 2 +- operating_systems.go | 2 +- user_agent.go | 4 +-- 10 files changed, 53 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa9509c..058e622 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,66 +2,66 @@ ## 0.6.0 -- Added information on the model of mobile devices. See [746647ad73b5](https://github.com/mssola/user_agent/commit/746647ad73b5ad8648175bbd07319c0a8ac559c6). -- Added support for PhantomJS. See [6b5e6f6ebfa8](https://github.com/mssola/user_agent/commit/6b5e6f6ebfa87464ccdb42bac5448cbf46ce1ba1). +- Added information on the model of mobile devices. See [746647ad73b5](https://github.com/mssola/useragent/commit/746647ad73b5ad8648175bbd07319c0a8ac559c6). +- Added support for PhantomJS. See [6b5e6f6ebfa8](https://github.com/mssola/useragent/commit/6b5e6f6ebfa87464ccdb42bac5448cbf46ce1ba1). ## 0.5.4 -- Add detection of Coc Coc Browser. See [897eb45aec23](https://github.com/mssola/user_agent/commit/897eb45aec2330e7566c48c9e54192aae84bd8e9). -- Add detection of Headless Chrome. See [897eb45aec23](https://github.com/mssola/user_agent/commit/897eb45aec2330e7566c48c9e54192aae84bd8e9). -- Add detection of iOS WebViews. See [897eb45aec23](https://github.com/mssola/user_agent/commit/897eb45aec2330e7566c48c9e54192aae84bd8e9). +- Add detection of Coc Coc Browser. See [897eb45aec23](https://github.com/mssola/useragent/commit/897eb45aec2330e7566c48c9e54192aae84bd8e9). +- Add detection of Headless Chrome. See [897eb45aec23](https://github.com/mssola/useragent/commit/897eb45aec2330e7566c48c9e54192aae84bd8e9). +- Add detection of iOS WebViews. See [897eb45aec23](https://github.com/mssola/useragent/commit/897eb45aec2330e7566c48c9e54192aae84bd8e9). ## 0.5.3 -- Fix detection of Firefox on iPad. See [42e4a8f39125](https://github.com/mssola/user_agent/commit/42e4a8f39125a6680fb5367a4602963f1351e069). -- Fix detection of Linux ARM-based Android. See [3b0e113c8047](https://github.com/mssola/user_agent/commit/3b0e113c804708c01de00c27aae07d2acfee40d8). -- Add detection of Chromium Edge on Windows. See [ea81f1e9d61c](https://github.com/mssola/user_agent/commit/ea81f1e9d61c094df4156690a8f4d5481b0d6c4a). -- Add detection of OkHttp. See [6b33e248e796](https://github.com/mssola/user_agent/commit/6b33e248e7969cf3e76128a34d33be88d4eb0dc8). +- Fix detection of Firefox on iPad. See [42e4a8f39125](https://github.com/mssola/useragent/commit/42e4a8f39125a6680fb5367a4602963f1351e069). +- Fix detection of Linux ARM-based Android. See [3b0e113c8047](https://github.com/mssola/useragent/commit/3b0e113c804708c01de00c27aae07d2acfee40d8). +- Add detection of Chromium Edge on Windows. See [ea81f1e9d61c](https://github.com/mssola/useragent/commit/ea81f1e9d61c094df4156690a8f4d5481b0d6c4a). +- Add detection of OkHttp. See [6b33e248e796](https://github.com/mssola/useragent/commit/6b33e248e7969cf3e76128a34d33be88d4eb0dc8). ## 0.5.2 -- Detect Electron. See [commit](https://github.com/mssola/user_agent/commit/1a36963d74c0efca7de80dc7518a0958c66b3c4f). -- Add support for both http and https site urls. See [commit](https://github.com/mssola/user_agent/commit/d78bf2c5886a0ab7e1cf90b68c808fe3e3ab6f8c). -- Add more support for BingBot. See [commit](https://github.com/mssola/user_agent/commit/c6402a7b8aefdc4acfbf1e7f3b43eac0b266e49e). -- Add a test case for Firefox focus on iOS. See [commit](https://github.com/mssola/user_agent/commit/a1e9c19d5a6887a17cef1d249118ccbd45cf4c0b). -- Detect iMessage-Preview. See [commit](https://github.com/mssola/user_agent/commit/e8f5e19ded9711ee1f4b43218b9d57d00ef5c26a). +- Detect Electron. See [commit](https://github.com/mssola/useragent/commit/1a36963d74c0efca7de80dc7518a0958c66b3c4f). +- Add support for both http and https site urls. See [commit](https://github.com/mssola/useragent/commit/d78bf2c5886a0ab7e1cf90b68c808fe3e3ab6f8c). +- Add more support for BingBot. See [commit](https://github.com/mssola/useragent/commit/c6402a7b8aefdc4acfbf1e7f3b43eac0b266e49e). +- Add a test case for Firefox focus on iOS. See [commit](https://github.com/mssola/useragent/commit/a1e9c19d5a6887a17cef1d249118ccbd45cf4c0b). +- Detect iMessage-Preview. See [commit](https://github.com/mssola/useragent/commit/e8f5e19ded9711ee1f4b43218b9d57d00ef5c26a). ## 0.5.1 -- add Firefox for iOS. See [commit](https://github.com/mssola/user_agent/commit/00a868fa17e7). -- Add go.mod. See [commit](https://github.com/mssola/user_agent/commit/8c16c37f4e07). -- Use CodeLingo to Address Further Issues. See [commit](https://github.com/mssola/user_agent/commit/7e313fc62553). -- Fix function comments based on best practices from Effective Go. See [commit](https://github.com/mssola/user_agent/commit/95b0c164394f). -- test: mobile Yandex Browser. See [commit](https://github.com/mssola/user_agent/commit/1df9e04ee4f5). -- Add Yandex browser. See [commit](https://github.com/mssola/user_agent/commit/6eb76c60b5e8). -- Updating license notice. See [commit](https://github.com/mssola/user_agent/commit/8b3999083770). -- Detect Chrome for iOS correctly. See [commit](https://github.com/mssola/user_agent/commit/82f141dea4a8). -- Facebook App Handling. See [commit](https://github.com/mssola/user_agent/commit/5723c361ed97). -- Add a new google bot user agent format. See [commit](https://github.com/mssola/user_agent/commit/57c32981bd5f). +- add Firefox for iOS. See [commit](https://github.com/mssola/useragent/commit/00a868fa17e7). +- Add go.mod. See [commit](https://github.com/mssola/useragent/commit/8c16c37f4e07). +- Use CodeLingo to Address Further Issues. See [commit](https://github.com/mssola/useragent/commit/7e313fc62553). +- Fix function comments based on best practices from Effective Go. See [commit](https://github.com/mssola/useragent/commit/95b0c164394f). +- test: mobile Yandex Browser. See [commit](https://github.com/mssola/useragent/commit/1df9e04ee4f5). +- Add Yandex browser. See [commit](https://github.com/mssola/useragent/commit/6eb76c60b5e8). +- Updating license notice. See [commit](https://github.com/mssola/useragent/commit/8b3999083770). +- Detect Chrome for iOS correctly. See [commit](https://github.com/mssola/useragent/commit/82f141dea4a8). +- Facebook App Handling. See [commit](https://github.com/mssola/useragent/commit/5723c361ed97). +- Add a new google bot user agent format. See [commit](https://github.com/mssola/useragent/commit/57c32981bd5f). ## 0.5.0 ### Newly supported and improvements -- Added support for Microsoft Edge. See [commit](https://github.com/mssola/user_agent/commit/f659b9863849). -- Precompile regular expressions. See [commit](https://github.com/mssola/user_agent/commit/783ec61292ae). -- Added support for Dalvik user agent parsing. See [commit](https://github.com/mssola/user_agent/commit/78413629666f). -- Improved bot support (also e25e612b37a4). See [commit](https://github.com/mssola/user_agent/commit/0319fcf00bfd). -- Add Chromium support and Ubuntu specific tests. See [commit](https://github.com/mssola/user_agent/commit/6e7843e05771). -- Add OSInfo function to user agent (also 7286ca6abc28). See [commit](https://github.com/mssola/user_agent/commit/3335cae017e7). -- Detect updated UA for Googlebot. See [commit](https://github.com/mssola/user_agent/commit/6fe362d7cd64). -- Adds the Adsense bot (mobile). See [commit](https://github.com/mssola/user_agent/commit/1438bfba89d7). +- Added support for Microsoft Edge. See [commit](https://github.com/mssola/useragent/commit/f659b9863849). +- Precompile regular expressions. See [commit](https://github.com/mssola/useragent/commit/783ec61292ae). +- Added support for Dalvik user agent parsing. See [commit](https://github.com/mssola/useragent/commit/78413629666f). +- Improved bot support (also e25e612b37a4). See [commit](https://github.com/mssola/useragent/commit/0319fcf00bfd). +- Add Chromium support and Ubuntu specific tests. See [commit](https://github.com/mssola/useragent/commit/6e7843e05771). +- Add OSInfo function to user agent (also 7286ca6abc28). See [commit](https://github.com/mssola/useragent/commit/3335cae017e7). +- Detect updated UA for Googlebot. See [commit](https://github.com/mssola/useragent/commit/6fe362d7cd64). +- Adds the Adsense bot (mobile). See [commit](https://github.com/mssola/useragent/commit/1438bfba89d7). ### Fixes -- Fixed bug when extracting windows 10. See [commit](https://github.com/mssola/user_agent/commit/8d86c2cf88bf). -- Fixed bug on mobile Firefox browsers running on Android OS versions that report their version number inline.. See [commit](https://github.com/mssola/user_agent/commit/9d00ff9e4202). +- Fixed bug when extracting windows 10. See [commit](https://github.com/mssola/useragent/commit/8d86c2cf88bf). +- Fixed bug on mobile Firefox browsers running on Android OS versions that report their version number inline.. See [commit](https://github.com/mssola/useragent/commit/9d00ff9e4202). ### Other -- Improved testing infrastructure. See [commit](https://github.com/mssola/user_agent/commit/63395b193f8812526305bec75ea7117262a124aa). +- Improved testing infrastructure. See [commit](https://github.com/mssola/useragent/commit/63395b193f8812526305bec75ea7117262a124aa). ## Older releases See the description on each release -[here](https://github.com/mssola/user_agent/releases). +[here](https://github.com/mssola/useragent/releases). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1c4b850..c4b54f9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Contributing to user_agent +# Contributing to useragent ## Check that your changes do not break anything @@ -20,9 +20,9 @@ what you want. ## Issue reporting -I'm using [Github](https://github.com/mssola/user_agent) in order to host the +I'm using [Github](https://github.com/mssola/useragent) in order to host the code. Thus, in order to report issues you can do it on its [issue -tracker](https://github.com/mssola/user_agent/issues). A couple of notes on +tracker](https://github.com/mssola/useragent/issues). A couple of notes on reports: - Check that the issue has not already been reported or fixed in `master`. diff --git a/README.md b/README.md index 34873eb..0072f10 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

- Build Status for the default branch - go.dev page + Build Status for the default branch + go.dev page MIT

@@ -14,14 +14,14 @@ package main import ( "fmt" - "github.com/mssola/user_agent" + "github.com/mssola/useragent" ) func main() { // The "New" function will create a new UserAgent object and it will parse // the given string. If you need to parse more strings, you can re-use // this object and call: ua.Parse("another string") - ua := user_agent.New("Mozilla/5.0 (Linux; U; Android 2.3.7; en-us; Nexus One Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1") + ua := useragent.New("Mozilla/5.0 (Linux; U; Android 2.3.7; en-us; Nexus One Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1") fmt.Printf("%v\n", ua.Mobile()) // => true fmt.Printf("%v\n", ua.Bot()) // => false @@ -52,12 +52,12 @@ func main() { ``` If you want to read the full API documentation simply check -[godoc](https://pkg.go.dev/github.com/mssola/user_agent). +[godoc](https://pkg.go.dev/github.com/mssola/useragent). ## Installation ``` -go get -u github.com/mssola/user_agent +go get -u github.com/mssola/useragent ``` ## Contributing diff --git a/all_test.go b/all_test.go index 028546a..5794ede 100644 --- a/all_test.go +++ b/all_test.go @@ -2,7 +2,7 @@ // This file is licensed under the MIT license. // See the LICENSE file. -package user_agent +package useragent import ( "fmt" diff --git a/bot.go b/bot.go index 4f2afd5..d409569 100644 --- a/bot.go +++ b/bot.go @@ -2,7 +2,7 @@ // This file is licensed under the MIT license. // See the LICENSE file. -package user_agent +package useragent import ( "regexp" diff --git a/browser.go b/browser.go index 55825d1..9c6a41b 100644 --- a/browser.go +++ b/browser.go @@ -2,7 +2,7 @@ // This file is licensed under the MIT license. // See the LICENSE file. -package user_agent +package useragent import ( "regexp" diff --git a/go.mod b/go.mod index a17c7ad..3178002 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/mssola/user_agent +module github.com/mssola/useragent go 1.13 diff --git a/model.go b/model.go index f8e5c19..c564239 100644 --- a/model.go +++ b/model.go @@ -1,4 +1,4 @@ -package user_agent +package useragent import ( "strings" diff --git a/operating_systems.go b/operating_systems.go index 78630fa..78e624f 100644 --- a/operating_systems.go +++ b/operating_systems.go @@ -2,7 +2,7 @@ // This file is licensed under the MIT license. // See the LICENSE file. -package user_agent +package useragent import ( "strings" diff --git a/user_agent.go b/user_agent.go index 02619ed..1ccde0c 100644 --- a/user_agent.go +++ b/user_agent.go @@ -2,11 +2,11 @@ // This file is licensed under the MIT license. // See the LICENSE file. -// Package user_agent implements an HTTP User Agent string parser. It defines +// Package useragent implements an HTTP User Agent string parser. It defines // the type UserAgent that contains all the information from the parsed string. // It also implements the Parse function and getters for all the relevant // information that has been extracted from a parsed User Agent string. -package user_agent +package useragent import "strings"