crazy2be / browser

Provides server software with additional details about a browser, including device (mobile, desktop), and rendering engine (MSIE, Firefox)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Browser Package

What is it?

This package provides specific information about a user's browser, grabbed from the user-agent string. It can tell you what platform a user is using (mobile, desktop), and what browser they are using (firefox, IE).

Getting Started

First, install it:

goinstall github.com/crazy2be/browser

Then, import it:

import "github.com/crazy2be/browser"

Finally, use it:

if browser.IsMobile(r) {
    ...
} else {
   ...
}

Functions

Full function reference is available at http://gopkgdoc.appspot.com/pkg/github.com/crazy2be/browser.

About

Provides server software with additional details about a browser, including device (mobile, desktop), and rendering engine (MSIE, Firefox)


Languages

Language:Go 100.0%