{"id":20188014,"url":"https://github.com/arran4/gorillamuxlogic","last_synced_at":"2026-06-05T02:31:08.924Z","repository":{"id":187705059,"uuid":"677416098","full_name":"arran4/gorillamuxlogic","owner":"arran4","description":"Some very simple gorilla mux logic for `mux.MatcherFunc`","archived":false,"fork":false,"pushed_at":"2026-03-16T03:35:33.000Z","size":31,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-16T14:34:54.132Z","etag":null,"topics":["go","golang","gorilla","gorilla-mux","http","web"],"latest_commit_sha":null,"homepage":"","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/arran4.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-08-11T14:15:48.000Z","updated_at":"2026-03-16T03:35:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"b7fb91f2-0c94-4165-be27-57c6947d2b07","html_url":"https://github.com/arran4/gorillamuxlogic","commit_stats":null,"previous_names":["arran4/gorillamuxlogic"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/arran4/gorillamuxlogic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arran4%2Fgorillamuxlogic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arran4%2Fgorillamuxlogic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arran4%2Fgorillamuxlogic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arran4%2Fgorillamuxlogic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arran4","download_url":"https://codeload.github.com/arran4/gorillamuxlogic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arran4%2Fgorillamuxlogic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33927314,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","gorilla","gorilla-mux","http","web"],"created_at":"2024-11-14T03:26:59.329Z","updated_at":"2026-06-05T02:31:08.912Z","avatar_url":"https://github.com/arran4.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gorilla Mux Logic\n\nSimple primitive enabling logic like this:\n\n```go\npackage main\n\nimport (\n\t. \"github.com/arran4/gorillamuxlogic\"\n\t\"github.com/gorilla/mux\"\n)\n\nfunc main() {\n        r := mux.NewRouter()\n        r.Use(UserMiddleware)\n        r.HandleFunc(\"/blog/{blog}/comment/{comment}/edit\", blogsCommentEditPage).\n                MatcherFunc(Or(RequiredScopes(\"administrator\"), CommentAuthor())).\n                Methods(\"POST\")\n}\n```\n\nExamples of runnable programs can be found under the `examples/` directory.\n\nProvides functions:\n```go\nfunc And(matchers ...mux.MatcherFunc) mux.MatcherFunc\n\nfunc Or(matchers ...mux.MatcherFunc) mux.MatcherFunc\n\nfunc Not(matcher mux.MatcherFunc) mux.MatcherFunc\n\n```\n\nNested logic example:\n\n```go\nmux.NewRouter().\n        HandleFunc(\"/articles/{id}/edit\", articleEditPage).\n        MatcherFunc(\n                Or(\n                        And(RequiredScopes(\"administrator\"), CommentAuthor()),\n                        And(RequiredScopes(\"editor\"), Not(CommentAuthor())),\n                ),\n        ).\n        Methods(\"POST\")\n```\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n## Installation\n\nTo add this package to your project, run:\n\n```\ngo get github.com/arran4/gorillamuxlogic\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farran4%2Fgorillamuxlogic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farran4%2Fgorillamuxlogic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farran4%2Fgorillamuxlogic/lists"}