{"id":13366733,"url":"https://github.com/digitalcrab/browscap_Go","last_synced_at":"2025-03-12T18:31:22.340Z","repository":{"id":20886974,"uuid":"24174293","full_name":"digitalcrab/browscap_go","owner":"digitalcrab","description":"GoLang Library for Browser Capabilities Project","archived":false,"fork":false,"pushed_at":"2023-06-21T00:41:00.000Z","size":3329,"stargazers_count":48,"open_issues_count":8,"forks_count":27,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-05-21T04:15:29.104Z","etag":null,"topics":["browscap","go"],"latest_commit_sha":null,"homepage":"http://browscap.org/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digitalcrab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2014-09-18T04:47:42.000Z","updated_at":"2024-05-19T01:11:34.000Z","dependencies_parsed_at":"2024-01-08T15:34:45.834Z","dependency_job_id":null,"html_url":"https://github.com/digitalcrab/browscap_go","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalcrab%2Fbrowscap_go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalcrab%2Fbrowscap_go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalcrab%2Fbrowscap_go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalcrab%2Fbrowscap_go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digitalcrab","download_url":"https://codeload.github.com/digitalcrab/browscap_go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243271286,"owners_count":20264431,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browscap","go"],"created_at":"2024-07-30T00:01:30.776Z","updated_at":"2025-03-12T18:31:21.246Z","avatar_url":"https://github.com/digitalcrab.png","language":"Go","funding_links":[],"categories":["杂项","雜項"],"sub_categories":["高级控制台界面","高級控制台界面"],"readme":"# Browser Capabilities GoLang Project\n\nPHP has `get_browser()` function which tells what the user's browser is capable of.\nYou can check original documentation [here](http://php.net/get_browser). \nThis is GoLang analog of `get_browser()` function.\n\n[![Build Status](https://secure.travis-ci.org/digitalcrab/browscap_go.png?branch=master)](http://travis-ci.org/digitalcrab/browscap_go)\n\n## Introduction\n\nThe [browscap.ini](http://browscap.org/) file is a database which provides a lot of details about \nbrowsers and their capabilities, such as name, versions, Javascript support and so on.\n\n## Quick start\n\nFirst of all you need initialize library with [browscap.ini](http://browscap.org/) file. \nAnd then you can get Browser information as `Browser` structure.\n\n```go\nimport (\n\t\"fmt\"\n\tbgo \"github.com/digitalcrab/browscap_go\"\n)\n\nfunc main() {\n\tif err := bgo.InitBrowsCap(\"browscap.ini\", false); err != nil {\n\t\tpanic(err)\n\t}\n\t\n\tbrowser, ok := bgo.GetBrowser(\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36\")\n\tif !ok || browser == nil {\n    \tpanic(\"Browser not found\")\n\t} else {\n    \tfmt.Printf(\"Browser = %s [%s] v%s\\n\", browser.Browser, browser.BrowserType, browser.BrowserVersion)\n    \tfmt.Printf(\"Platform = %s v%s\\n\", browser.Platform, browser.PlatformVersion)\n    \tfmt.Printf(\"Device = %s [%s] %s\\n\", browser.DeviceName, browser.DeviceType, browser.DeviceBrand)\n    \tfmt.Printf(\"IsCrawler = %t\\n\", browser.IsCrawler())\n    \tfmt.Printf(\"IsMobile = %t\\n\", browser.IsMobile())\n\t}\n}\n```\n\n## License\n\n```\nThe MIT License (MIT)\n\nCopyright (c) 2015 Maksim Naumov\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalcrab%2Fbrowscap_Go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitalcrab%2Fbrowscap_Go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalcrab%2Fbrowscap_Go/lists"}