11[ ![ Software License] ( https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square )] ( LICENSE )
2- [ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/IncSW/go-51degrees ?style=flat-square )] ( https://goreportcard.com/report/github.com/IncSW/go-51degrees )
2+ [ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/IncSW/fifd ?style=flat-square )] ( https://goreportcard.com/report/github.com/IncSW/fifd )
33
4- Device Detection based on 51Degrees Trie. Golang version of [ 51Degrees/Device-Detection] ( https://github.com/51Degrees/Device-Detection ) without cgo.
4+ Golang implementation of [ 51Degrees/Device-Detection] ( https://github.com/51Degrees/Device-Detection ) based on trie without cgo.
55
66## Installation
77
8- ` go get github.com/IncSW/go-51degrees `
8+ ` go get github.com/IncSW/fifd `
99
1010``` go
11- import fiftyonedegrees " github.com/IncSW/go-51degrees "
11+ import " github.com/IncSW/fifd "
1212```
1313
1414## Quick Start
1515
1616``` go
17- reader , err := fiftyonedegrees .NewReaderFromFile (" path/to/51DegreesV3.4.trie" )
17+ reader , err := fifd .NewReaderFromFile (" path/to/51DegreesV3.4.trie" )
1818if err != nil {
1919 panic (err)
2020}
@@ -29,16 +29,16 @@ fmt.Println(device.GetValue("BrowserName"), device.GetValue("BrowserVersion"))
2929fixed ua: ` Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0 `
3030
3131```
32- go /fixed-8 1291940 927 ns/op 0 B/op 0 allocs/op
32+ fifd /fixed-8 1291940 927 ns/op 0 B/op 0 allocs/op
3333cgo/fixed-8 533149 2214 ns/op 224 B/op 19 allocs/op
3434
35- go /fixed-parallel-8 6384787 189 ns/op 0 B/op 0 allocs/op
35+ fifd /fixed-parallel-8 6384787 189 ns/op 0 B/op 0 allocs/op
3636cgo/fixed-parallel-8 2139506 554 ns/op 224 B/op 19 allocs/op
3737
38- go /range-8 422196 2720 ns/op 0 B/op 0 allocs/op
38+ fifd /range-8 422196 2720 ns/op 0 B/op 0 allocs/op
3939cgo/range-8 404926 2964 ns/op 235 B/op 18 allocs/op
4040
41- go /range-parallel-8 2738305 430 ns/op 0 B/op 0 allocs/op
41+ fifd /range-parallel-8 2738305 430 ns/op 0 B/op 0 allocs/op
4242cgo/range-parallel-8 1810068 657 ns/op 235 B/op 18 allocs/op
4343```
4444
0 commit comments