{"id":13413487,"url":"https://github.com/digitalcrab/browscap_go","last_synced_at":"2025-04-12T14:11:34.498Z","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":248578872,"owners_count":21127713,"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-30T20:01:41.492Z","updated_at":"2025-04-12T14:11:34.474Z","avatar_url":"https://github.com/digitalcrab.png","language":"Go","funding_links":[],"categories":["其他杂项","Miscellaneous","Microsoft Office","Uncategorized","杂项","其他","\u003cspan id=\"其他-miscellaneous\"\u003e其他 Miscellaneous\u003c/span\u003e"],"sub_categories":["暂未分类","Uncategorized","Strings","Advanced Console UIs","交流","暂未分类这些库被放在这里是因为其他类别似乎都不适合。","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","未分类的"],"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"}