agency

A fast user agent string parser for Go.

  • Owner: benbjohnson/agency
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

Agency

Agency is a fast user-agent parser in pure Go. It uses a simple tokenizer and weighted tokens to determine the correct device type, category and browser.

Usage

To use Agency, simply import the package and call Scan():

import "github.com/benbjohnson/agency"

ua := agency.Scan("Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 blah blah...")

User Agent Info

The Scan() function returns a UserAgent with the following string properties:

Type
----------
Desktop
Tablet
Mobile

Category
----------
Windows
Mac
Linux
iOS
Blackberry
Android

Browser
----------
Chrome
Safari
Internet Explorer

Main metrics

Overview
Name With Ownerbenbjohnson/agency
Primary LanguageGo
Program languageGo (Language Count: 2)
Platform
License:MIT License
所有者活动
Created At2013-12-05 19:08:32
Pushed At2017-06-01 16:05:17
Last Commit At2017-06-01 10:05:16
Release Count0
用户参与
Stargazers Count60
Watchers Count3
Fork Count5
Commits Count25
Has Issues Enabled
Issues Count2
Issue Open Count0
Pull Requests Count1
Pull Requests Open Count0
Pull Requests Close Count0
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private