{"id":21095373,"url":"https://github.com/d6o/itibrowser","last_synced_at":"2025-03-14T07:12:37.711Z","repository":{"id":146437301,"uuid":"83187249","full_name":"d6o/ItiBrowser","owner":"d6o","description":"Browser Matcher for Itinerary Router","archived":false,"fork":false,"pushed_at":"2017-02-26T16:40:15.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-21T01:44:07.543Z","etag":null,"topics":["go","golang","golang-library","golang-package","golang-router","golang-tools","http","mux","router"],"latest_commit_sha":null,"homepage":"https://disiqueira.github.io/ItiBrowser/","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/d6o.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-26T06:08:58.000Z","updated_at":"2017-02-26T16:40:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"95e4241b-4c3a-4aa0-8f44-02102f6957cd","html_url":"https://github.com/d6o/ItiBrowser","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/d6o%2FItiBrowser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d6o%2FItiBrowser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d6o%2FItiBrowser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d6o%2FItiBrowser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d6o","download_url":"https://codeload.github.com/d6o/ItiBrowser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243538135,"owners_count":20307104,"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":["go","golang","golang-library","golang-package","golang-router","golang-tools","http","mux","router"],"created_at":"2024-11-19T22:25:39.588Z","updated_at":"2025-03-14T07:12:37.689Z","avatar_url":"https://github.com/d6o.png","language":"Go","readme":"# ItiBrowser ![Language Badge](https://img.shields.io/badge/Language-Go-blue.svg) ![Go Report](https://goreportcard.com/badge/github.com/DiSiqueira/ItiBrowser) ![License Badge](https://img.shields.io/badge/License-MIT-blue.svg) ![Status Badge](https://img.shields.io/badge/Status-Stable-brightgreen.svg)\n\nItiBrowser is a matcher to be used in the [Itinerary][itinerary].\n\nMatch if the request is made by one of the informed Browsers. Powered by [user_agent] made by [mssola]\n\n[itinerary]: https://github.com/DiSiqueira/Itinerary\n[user_agent]: https://github.com/mssola/user_agent\n[mssola]: https://github.com/mssola\n\n## Project Status\n\nItiBrowser is stable. Pull Requests [are welcome](https://github.com/DiSiqueira/ItiBrowser#social-coding)\n\n## Installation\n\n### Go Get\n\n```bash\n$ go get github.com/disiqueira/itibrowser\n```\n\n## Basic usage\n\n```go\nr := itinerary.NewRouter()\n\nr.NewPath(ChromeHandler).AddMatcher(itibrowser.New(\"Chrome\")) //Match if the request is made using a Chrome Browser\n```\n\n## Full Example\n\n```go\npackage main\n\nimport (\n\t\"github.com/disiqueira/itibrowser\"\n\t\"github.com/disiqueira/itinerary\"\n\t\"net/http\"\n)\n\nfunc ChromeHandler(w http.ResponseWriter, r *http.Request) {\n\tw.Write([]byte(\"You are using Chrome! :)\"))\n}\n\nfunc IEHandler(w http.ResponseWriter, r *http.Request) {\n\tw.Write([]byte(\"You are using Internet Explorer :( \"))\n}\n\nfunc main() {\n\tr := itinerary.NewRouter()\n\n\tr.NewPath(ChromeHandler).AddMatcher(itibrowser.New(\"Chrome\"))\n\tr.NewPath(IEHandler).AddMatcher(itibrowser.New(\"Internet Explorer\"))\n\n\thttp.ListenAndServe(\":8000\", r)\n}\n```\n\n## Possible Values\n\nBrowsers |\n------------ |\nChrome |\nChromium |\nEdge |\nOpera |\nSafari |\nInternet Explorer |\n\n*Probably there is more values, but this should be all the most commons.\n\n## Contributing\n\n### Bug Reports \u0026 Feature Requests\n\nPlease use the [issue tracker](https://github.com/DiSiqueira/ItiBrowser/issues) to report any bugs or file feature requests.\n\n### Developing\n\nPRs are welcome. To begin developing, do this:\n\n```bash\n$ git clone https://github.com/DiSiqueira/ItiBrowser.git itibot\n$ cd itiwildcard/\n```\n\n## Social Coding\n\n1. Create an issue to discuss about your idea\n2. [Fork it] (https://github.com/DiSiqueira/ItiBrowser/fork)\n3. Create your feature branch (`git checkout -b my-new-feature`)\n4. Commit your changes (`git commit -am 'Add some feature'`)\n5. Push to the branch (`git push origin my-new-feature`)\n6. Create a new Pull Request\n7. Profit! :white_check_mark:\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2013-2017 Diego Siqueira\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\nall copies 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\nTHE SOFTWARE.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd6o%2Fitibrowser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd6o%2Fitibrowser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd6o%2Fitibrowser/lists"}