Skip to content

Commit

Permalink
removed tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
SlashGordon committed Mar 7, 2022
1 parent b26be3f commit aeb017d
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,29 @@ Accurate and fresh list of desktop, phone, tablet and tv user agents.

```golang
import (
"fmt"
"fmt"
"github.com/emetriq/gouseragents/desktop"
"github.com/emetriq/gouseragents/tv"
"github.com/emetriq/gouseragents/phone"
"github.com/emetriq/gouseragents/tablet"
"github.com/emetriq/gouseragents/tv"
"github.com/emetriq/gouseragents/phone"
"github.com/emetriq/gouseragents/tablet"
)

func main() {
if desktop.IsDesktopUserAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0") {
fmt.Println("Desktop user agent")
}
if desktop.IsDesktopUserAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0") {
fmt.Println("Desktop user agent")
}

if tv.IsTVUserAgent("Dalvik/2.1.0 (Linux; U; Android 9; AFTSSS Build/PS7242) CTV") {
fmt.Println("TV user agent")
}
if tv.IsTVUserAgent("Dalvik/2.1.0 (Linux; U; Android 9; AFTSSS Build/PS7242) CTV") {
fmt.Println("TV user agent")
}

if phone.IsPhoneUserAgent("samsung SM-A515F Android 11 phone") {
fmt.Println("Phone user agent")
}
if phone.IsPhoneUserAgent("samsung SM-A515F Android 11 phone") {
fmt.Println("Phone user agent")
}

if tablet.IsTabletUserAgent("samsung SM-T585 Android 8.1.0 tablet") {
fmt.Println("Tablet user agent")
}
if tablet.IsTabletUserAgent("samsung SM-T585 Android 8.1.0 tablet") {
fmt.Println("Tablet user agent")
}
}
```

Expand Down

0 comments on commit aeb017d

Please sign in to comment.