{"id":19966756,"url":"https://github.com/aptpod/mc","last_synced_at":"2026-05-15T05:35:56.568Z","repository":{"id":139362947,"uuid":"162376763","full_name":"aptpod/mc","owner":"aptpod","description":"Small package provides a simple way to chain http handlers ⛓️","archived":false,"fork":false,"pushed_at":"2018-12-19T03:26:00.000Z","size":2,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-12T08:41:54.278Z","etag":null,"topics":["golang","http"],"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/aptpod.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":"2018-12-19T03:17:11.000Z","updated_at":"2019-01-05T08:58:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"b0b7aed2-cb97-45c8-8189-aca1ad261b02","html_url":"https://github.com/aptpod/mc","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/aptpod%2Fmc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aptpod%2Fmc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aptpod%2Fmc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aptpod%2Fmc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aptpod","download_url":"https://codeload.github.com/aptpod/mc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241398911,"owners_count":19956824,"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":["golang","http"],"created_at":"2024-11-13T02:38:06.964Z","updated_at":"2026-05-15T05:35:51.526Z","avatar_url":"https://github.com/aptpod.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"mc - Middleware Chainer\n=======================\n\nSmall package provides a simple way to chain http handlers.\n\n[![GoDoc](https://godoc.org/github.com/aptpod/mc?status.svg)](https://godoc.org/github.com/aptpod/mc)\n[![Build Status](https://travis-ci.org/aptpod/mc.svg?branch=master)](https://travis-ci.org/aptpod/mc)\n[![Coverage Status](https://coveralls.io/repos/github/aptpod/mc/badge.svg?branch=master)](https://coveralls.io/github/aptpod/mc?branch=master)\n\nInstallation\n------------\n\n```\n$ go get -u github.com/aptpod/mc\n```\n\nExample\n-------\n\n```\nfunc main() {\n\tcommon := []func(http.Handler) http.Handler{\n\t\tmiddleware.Logger(),\n\t\tmiddleware.Recovery(),\n\t}\n\n\tauthn := middleware.Authn()\n\n\t// `common` only\n\thttp.Handle(\"/signin\", mc.Chain(http.HandlerFunc(handler.SignIn),\n\t\tcommon,\n\t))\n\n\t// `common` and `authn`\n\thttp.Handle(\"/user\", mc.Chain(http.HandlerFunc(handler.User),\n\t\tcommon, authn,\n\t))\n\n\thttp.ListenAndServe(\"127.0.0.1:8080\", nil)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faptpod%2Fmc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faptpod%2Fmc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faptpod%2Fmc/lists"}