Update module github.com/medama-io/go-useragent to v1.2.3

This commit is contained in:
Renovate Bot
2026-01-05 02:28:12 +00:00
parent 787f1d4c0b
commit ae44851a68
8 changed files with 37 additions and 34 deletions

2
go.mod
View File

@@ -14,7 +14,7 @@ require (
github.com/jpillora/backoff v1.0.0
github.com/justinas/alice v1.2.0
github.com/maypok86/otter/v2 v2.3.0
github.com/medama-io/go-useragent v1.2.2
github.com/medama-io/go-useragent v1.2.3
github.com/prometheus/client_golang v1.23.2
github.com/realclientip/realclientip-go v1.0.0
github.com/rs/cors v1.11.1

4
go.sum
View File

@@ -113,8 +113,8 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/maypok86/otter/v2 v2.3.0 h1:8H8AVVFUSzJwIegKwv1uF5aGitTY+AIrtktg7OcLs8w=
github.com/maypok86/otter/v2 v2.3.0/go.mod h1:XgIdlpmL6jYz882/CAx1E4C1ukfgDKSaw4mWq59+7l8=
github.com/medama-io/go-useragent v1.2.2 h1:h/8/kurXr62CdEZv+b8PmIdyOEnBpQsYXwilum3f0k4=
github.com/medama-io/go-useragent v1.2.2/go.mod h1:H9GYWth4IN8vAFZh5LeARza7VwM4jK9uk7Tb9huVzLw=
github.com/medama-io/go-useragent v1.2.3 h1:jTv5NI+dn2hAe6zlagfXe/Y4934/YPzqxvP/gP0DjCQ=
github.com/medama-io/go-useragent v1.2.3/go.mod h1:H9GYWth4IN8vAFZh5LeARza7VwM4jK9uk7Tb9huVzLw=
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0=

View File

@@ -1,3 +1,16 @@
[tools]
go = "latest"
gofumpt = "latest"
[tasks.test]
run = "go test ./... $@"
[tasks.bench]
run = "go test -bench=. -benchmem ./..."
dir = "./benchmarks"
[tasks.generate]
run = "go run ./scripts/main.go"
[tasks.upgrade]
run = "go get -u ./..."

View File

@@ -70,8 +70,7 @@ Refer to the [pkg.go.dev](https://pkg.go.dev/github.com/medama-io/go-useragent)
Benchmarks were performed against [`ua-parser/uap-go`](https://github.com/ua-parser/uap-go) and [`mileusena/useragent`](https://github.com/mileusna/useragent) on an Apple M3 Pro Processor.
```bash
cd ./benchmarks
go test -bench=. -benchmem ./...
mise run bench
MedamaParserGetSingle-12 3871813 287.2 ns/op 0 B/op 0 allocs/op
MileusnaParserGetSingle-12 1322602 945.1 ns/op 600 B/op 16 allocs/op

View File

@@ -1,20 +0,0 @@
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: '3'
tasks:
test:
cmds:
- go test ./... {{.CLI_ARGS}}
bench:
cmds:
- go test -bench=. -benchmem ./...
dir: ./benchmarks
generate:
cmds:
- go run ./scripts/main.go
upgrade:
cmds:
- go get -u ./...

View File

@@ -454,6 +454,7 @@ MozillaGeckoFirefox
MozillaXLinuxxAppleWebKitKHTMLlikeGeckokonquerorSafari
MozillacompatibleMSIEWindowsNTTridentGTBSLCCNETCLRNETCLRNETCLRMediaCenterPCNETCNETEInfoPathTablet
MozillacompatibleMSIEWindowsNTTridentGTBSLCCNETCLRNETCLRNETCLRMediaCenterPCNETCNETETablet
Gohttpclient
MozillaLinuxUAndroidAppleWebKitKHTMLlikeGeckoVersionChromeSafari
MozillaXLinuxxAppleWebKitKHTMLlikeGeckoAroraSafari
MozillaXLinuxxDebianGNULinuxjessieAppleWebKitKHTMLlikeGeckoChromeMaxthonSafari
@@ -1226,6 +1227,7 @@ MozillacompatibleYandexAccessibilityBot
rogerbothttpwwwmozcomdprogerbotrogerbot
MozillacompatibleYandexImageResizerhttpyandexcombot
bidswitchbot
YahooCacheSystemYahooWebS
MozillacompatiblearchiveorgbotWaybackMachineLiveRecordhttparchiveorgdetailsarchiveorgbot
MozillaMacintoshIntelMacOSXAppleWebKitKHTMLlikeGeckoChromeSafarimoatbot
WhatsApp
@@ -1279,6 +1281,7 @@ ZoomBot
MozillaLinuxAndroidAppleWebKitKHTMLlikeGeckoGooglePageSpeedInsightsChromeMobileSafari
JigsawWCCSSValidatorJFouffaAppEngineGoogle
curlipclinuxgnulibcurl
NetTrackAnonymousWebS
MozillacompatibleYandexCalendarhttpyandexcombot
MozillacompatibleYaKhttplinkfluencecombot
UCWEBJavaUMIDPNokiaUUCMiniSpeedModeProxyAndroidUMobile
@@ -1297,6 +1300,7 @@ yacybotglobalamdLinuxgenericjavaAsiaenhttpyacynetbot
MozillacompatibleYandexPagecheckerhttpyandexcombot
ZDMWindowsMobile
MozillacompatibleMojeekBot
MozillacompatibleNetcraftWebS
MozillaXLinuxxGTmetrixhttpsgtmetrixcomAppleWebKitKHTMLlikeGeckoChromeSafari
MozillacompatiblePinterestbothttpwwwpinterestcombot
MozillaWindowsUWindowsNTdervGoogleSearchByImageGeckoFirefox
@@ -1345,6 +1349,7 @@ techfetchbot
PycURL
CurlyHTTPClienthttpsgithubcommdevcurl
MozillacompatibleLinkisBot
XaldonWebS
MozillacompatibleGoogleToolbarWindowsMSIE
MozillaMacintoshIntelMacOSXadbeatcompolicyAppleWebKitKHTMLlikeGeckoChromeSafari
MozillaWindowsNTWinxrvadbeatcompolicyGeckoFirefox
@@ -1397,6 +1402,7 @@ MozillaWindowsUWindowsNTfrrvVoilaBot
MozillaWindowsNTrvGeckoFirefoxGoogle
MozillacompatibleURLAppendBot
Slurp
OpenWebS
msnbotbhttpsearchmsncommsnbot
MozillaWindowsUWindowsNTFirefox
Mozillacompatiblespbothttpwwwseoprofilercombot
@@ -1407,6 +1413,7 @@ MozillacompatibleWBSearchBot
MozillacompatibleUptimebothttpwwwuptimecomuptimebot
AppleNewsBot
ICEBrowserJava
AmigaAWebS
Mozillacompatiblevebidoobothttpsblogvebidoodevebidoobot
LinkedInBotcompatibleMozillaJakartaCommonsHttpClienthttpwwwlinkedincomLinkedInBot
rogerbothttpmozcomhelpguidessearchoverviewcrawldiagnosticsmorehelprogerbot
@@ -1547,6 +1554,7 @@ MozillacompatibleMappyWarningUserAgentwillbechangedbyFebhttpmappydatanetbot
MAZBot
MozillaLinuxAndroidAppleWebKitKHTMLlikeGeckoMediapartnersGoogleChromeMobileSafari
WeSEESearchAlphahttpwwwweseecombot
ahrefhttpwwwunchaoscomUnChaosaFromChaosToOrderHybridWebS
DoximityDiffbot
MozillacompatibleSemanticbothttpsempitechbot
WindowsRSSPlatformMSIEWindowsNT
@@ -1599,7 +1607,7 @@ MAWAPCHOIJavaUMIDPviNokiaCWAPCHOIUCProUMobile
SnapchatCLTLAndroid
MozillaLinuxAndroidAppleWebKitKHTMLlikeGeckoMobileSafaricompatiblePetalBot
yacybotglobalamdLinuxjavaAmericaenhttpyacynetbot
YahooSeekerTestingvcompatibleMozillaMSIE
YahooSeekerTestingvcompatibleMozillaMSIEYahooSearchWebS
MozillaLinuxAndroidAppleWebKitKHTMLlikeGeckoGoogleWirelessTranscoderChromeSafari
MozillacompatibleImpactRadiusComplianceBotAppleWebKitKHTMLlikeGeckoChromeSafari
MozillaAmigaPowerPCAmigaOSOdysseyWebBrowserrvAppleWebKitKHTMLlikeGeckoOWBSafari
@@ -1609,6 +1617,7 @@ yacybotglobalamdLinuxarchjavaAmericaenhttpyacynetbot
yacybotglobalamdLinuxgenericjavaEtcenhttpyacynetbot
Mozillacompatiblelinkdexbothttpwwwlinkdexcomaboutbot
SnapchatSMGFAndroid
YahooSeekerTestingvcompatibleMozillaMSIE
ArchiveTeamArchiveBotbwpullandnotMozillaWindowsNTWOWAppleWebKitKHTMLlikeGeckoChromeSafari
SSERobot
RyteBotMacintoshIntelMacOSXAppleWebKitKHTMLlikeGeckoChromesSafari
@@ -1954,6 +1963,7 @@ APPRADIOPR
guzzlehttpcurl
JNLPjavawsltinternalgtJava
Pingdomcombot
MSWebS
pythonrequestsDalvikLinuxUAndroidAndroid
awssdkjavaLinuxelxJava
MozillacompatibleYandexAdNethttpyandexcombot

View File

@@ -43,7 +43,7 @@ var matchMap = map[Match][]string{
DeviceMobile: {string(agents.DeviceMobile)},
TokenMobileDevice: {"ONEPLUS", "Huawei", "HTC", "Galaxy", "iPhone", "iPod", "Windows Phone", "WindowsPhone", "LG"},
DeviceTablet: {string(agents.DeviceTablet), "Touch", "iPad", "Nintendo Switch", "NintendoSwitch", "Kindle"},
DeviceTV: {string(agents.DeviceTV), "Large Screen", "LargeScreen", "Smart Display", "SmartDisplay", "PLAYSTATION", "PlayStation", "ADT-2", "ADT-1", "CrKey", "Roku", "AFT", "Web0S", "Nexus Player", "Xbox", "XBOX", "Nintendo WiiU", "NintendoWiiU"},
DeviceTV: {string(agents.DeviceTV), "Large Screen", "LargeScreen", "Smart Display", "SmartDisplay", "PLAYSTATION", "PlayStation", "ADT-2", "ADT", "ADT-1", "CrKey", "Roku", "AFT", "Web0S", "WebS", "Nexus Player", "NexusPlayer", "Xbox", "XBOX", "Nintendo WiiU", "NintendoWiiU"},
DeviceBot: {
string(agents.DeviceBot),
"HeadlessChrome",
@@ -67,21 +67,22 @@ var matchMap = map[Match][]string{
"PHP",
"curl",
"Go-http-client",
"Gohttpclient",
"Java",
"Ruby",
"Node.js",
"Nodejs",
"Dart",
"C#",
"PHP-Curl",
"PHP-HTTP",
"PHP-SOAP",
"amazon-QBusiness",
"PHPCurl",
"PHPHTTP",
"PHPSOAP",
"amazonQBusiness",
// Python client prefixes
"Python",
"python",
"PycURL",
"aiohttp",
"Pythonurllib",
},
// Version

2
vendor/modules.txt vendored
View File

@@ -137,7 +137,7 @@ github.com/maypok86/otter/v2/internal/xmath
github.com/maypok86/otter/v2/internal/xruntime
github.com/maypok86/otter/v2/internal/xsync
github.com/maypok86/otter/v2/stats
# github.com/medama-io/go-useragent v1.2.2
# github.com/medama-io/go-useragent v1.2.3
## explicit; go 1.21.4
github.com/medama-io/go-useragent
github.com/medama-io/go-useragent/agents