Skip to content
forked from hjmodha/goDevice

Device detection package in golang based on the user-agent

Notifications You must be signed in to change notification settings

lsanil/goDevice

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

####Device Detection Library in Golang

#####Installing Package:

go get github.com/hiteshmodha/goDevice

#####How To use Package to detect Device:

  if deviceType == goDevice.MOBILE {
    fmt.Fprintf(w,"<h1>Mobile</h1>")
  } else if deviceType == goDevice.WEB {
    fmt.Fprintf(w,"<h1>Web</h1>")
  } else if deviceType == goDevice.TABLET {
    fmt.Fprintf(w,"<h1>Tablet</h1>")
  }

#####Example: example

For now goDevice is detecting Mobile,Desktop and Tablet.In future we will add support for SmartTV, Watch etc

About

Device detection package in golang based on the user-agent

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%