• About Us
  • Blog
  • Basket
  • Account
  • Sign In
  •  

Golang API

Installing the Go API

If you haven't already, you can obtain a copy of the latest version of the API using one of the links on the downloads page.

From git

Clone 51Degrees/Device-Detection repository with

$ git clone https://github.com/51Degrees/Device-Detection.git

Checkout the go beta branch with

Move to the go directory with

$ cd Device-Detection/go/

Linux/MacOS

To set upthe environment withthe Pattern algorithm, do:

$ make pattern

For the Hash Trie algorithm, do:

$ make hash

If you wish to generate the Swig wrapper as well then do:

$ make swig-pat

or:

$ make swig-hash

Windows

To set up the environment with the Pattern algorithms, do:

> PreBuild.bat

For the Hash Trie algorithm, do:

> PreBuild.bat HASH

If you wish to generatte the Swig wrapper as well then do:

> PreBuild.bat SWIG

or:

> PreBuild.bat HASH SWIG

Suggested Next Steps