Skip to content

Commit 24d1df6

Browse files
v1.0.0 (#3)
* chores: `go fmt` * docs: update status badges * spec: add missing specs * spec: add missing specs * chores: remove unsed code * spec: add missing specs * docs: update readme
1 parent 5676eff commit 24d1df6

File tree

13 files changed

+647
-42
lines changed

13 files changed

+647
-42
lines changed

README.md

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,8 @@
1-
# Browser
2-
3-
![](logo.png)
4-
5-
<div align="center">
6-
<a href="https://github.com/dineshgowda24/browser/blob/main/LICENSE">
7-
<img alt="License: Apache-2.0" src="https://img.shields.io/github/license/dineshgowda24/browser" />
8-
</a>
9-
<a href="https://pkg.go.dev/github.com/dineshgowda24/browser">
10-
<img src="https://pkg.go.dev/badge/github.com/dineshgowda24/browser.svg" alt="Go Reference">
11-
</a>
12-
<a href="https://goreportcard.com/report/github.com/dineshgowda24/browser">
13-
<img alt="Go report card" src="https://goreportcard.com/badge/github.com/dineshgowda24/browser" />
14-
</a>
15-
<a href="https://dl.circleci.com/status-badge/redirect/circleci/MQTLZJuBejHgr2yqrojz3u/5NTLeuQeViQw2JaPQf7gKa/tree/main">
16-
<img alt="Build Status" src="https://dl.circleci.com/status-badge/img/circleci/MQTLZJuBejHgr2yqrojz3u/5NTLeuQeViQw2JaPQf7gKa/tree/main.svg?style=svg" />
17-
</a>
18-
<a href="https://codecov.io/gh/dineshgowda24/browser">
19-
<img alt="Code coverage" src="https://codecov.io/gh/dineshgowda24/browser/graph/badge.svg?token=XUA2VJW5FU">
20-
</a>
21-
</div>
1+
# browser [![MIT](https://img.shields.io/github/license/dineshgowda24/browser)](https://github.com/dineshgowda24/browser/blob/main/LICENSE) [![Go Reference](https://pkg.go.dev/badge/github.com/dineshgowda24/browser.svg)](https://pkg.go.dev/github.com/dineshgowda24/browser) [![Go report card](https://goreportcard.com/badge/github.com/dineshgowda24/browser)](https://goreportcard.com/report/github.com/dineshgowda24/browser) [![Build Status](https://dl.circleci.com/status-badge/img/circleci/MQTLZJuBejHgr2yqrojz3u/5NTLeuQeViQw2JaPQf7gKa/tree/main.svg?style=shield&circle-token=ab7a417fe410b8387c767f83568f7d2f2788ac4f)](https://dl.circleci.com/status-badge/redirect/circleci/MQTLZJuBejHgr2yqrojz3u/5NTLeuQeViQw2JaPQf7gKa/tree/main) [![Coverage](https://codecov.io/gh/dineshgowda24/browser/graph/badge.svg?token=XUA2VJW5FU)](https://codecov.io/gh/dineshgowda24/browser) [![X](https://img.shields.io/twitter/follow/_dineshgowda)](https://twitter.com/_dineshgowda)
2+
3+
<p align="center">
4+
<img src="logo.png" width="125">
5+
</p>
226

237
## Why?
248

bot.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,7 @@ func (b *Bot) Name() string {
124124
return ""
125125
}
126126

127-
n := b.matcher.Name()
128-
if n != "" {
129-
return n
130-
}
131-
132-
return genericBotName
127+
return b.matcher.Name()
133128
}
134129

135130
// Why returns the reason why the user agent is a bot

browser.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,8 @@ func NewBrowser(userAgent string) (*Browser, error) {
4444
return nil, ErrUserAgentSizeExceeded
4545
}
4646

47-
p, err := NewPlatform(userAgent)
48-
if err != nil {
49-
return nil, err
50-
}
51-
52-
d, err := NewDevice(userAgent)
53-
if err != nil {
54-
return nil, err
55-
}
47+
p, _ := NewPlatform(userAgent)
48+
d, _ := NewDevice(userAgent)
5649

5750
bot, err := NewBot(userAgent)
5851
if err != nil {

0 commit comments

Comments
 (0)