{"id":13826692,"url":"https://github.com/alexisvisco/kcd","last_synced_at":"2026-01-31T11:08:06.469Z","repository":{"id":48918489,"uuid":"280516929","full_name":"alexisvisco/kcd","owner":"alexisvisco","description":"KCD lets you focus on what matters: coding.","archived":false,"fork":false,"pushed_at":"2022-09-15T10:04:47.000Z","size":1291,"stargazers_count":43,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-20T13:54:42.060Z","etag":null,"topics":["golang","http-handler","library"],"latest_commit_sha":null,"homepage":"https://alexisvisco.gitbook.io/kcd","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexisvisco.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}},"created_at":"2020-07-17T20:16:31.000Z","updated_at":"2025-04-02T09:26:48.000Z","dependencies_parsed_at":"2022-09-26T20:20:57.964Z","dependency_job_id":null,"html_url":"https://github.com/alexisvisco/kcd","commit_stats":null,"previous_names":["expectedsh/kcd"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/alexisvisco/kcd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexisvisco%2Fkcd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexisvisco%2Fkcd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexisvisco%2Fkcd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexisvisco%2Fkcd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexisvisco","download_url":"https://codeload.github.com/alexisvisco/kcd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexisvisco%2Fkcd/sbom","scorecard":{"id":181766,"data":{"date":"2025-08-11","repo":{"name":"github.com/alexisvisco/kcd","commit":"cd33032d843a6589e3df46cd7e85261009e4ec79"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 1/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/alexisvisco/kcd/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/alexisvisco/kcd/go.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/alexisvisco/kcd/go.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/alexisvisco/kcd/go.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/alexisvisco/kcd/go.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"15 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2025-3770","Warn: Project is vulnerable to: GO-2022-0355 / GHSA-fx95-883v-4q4h","Warn: Project is vulnerable to: GO-2021-0238 / GHSA-83g2-8m93-v3w7","Warn: Project is vulnerable to: GO-2022-0288","Warn: Project is vulnerable to: GO-2022-0969 / GHSA-69cg-p879-7622","Warn: Project is vulnerable to: GO-2022-1144 / GHSA-xrjj-mj9h-534m","Warn: Project is vulnerable to: GO-2023-1571 / GHSA-vvpx-j8f3-3w6h","Warn: Project is vulnerable to: GO-2023-1988 / GHSA-2wrh-6pvc-2jm9","Warn: Project is vulnerable to: GO-2023-2102 / GHSA-4374-p667-p6c8","Warn: Project is vulnerable to: GHSA-qppj-fm5r-hxr3","Warn: Project is vulnerable to: GO-2024-2687 / GHSA-4v7x-pqxf-cx7m","Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw","Warn: Project is vulnerable to: GO-2022-0493 / GHSA-p782-xgp4-8hr8"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T18:58:52.635Z","repository_id":48918489,"created_at":"2025-08-16T18:58:52.635Z","updated_at":"2025-08-16T18:58:52.635Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28939608,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T10:18:23.202Z","status":"ssl_error","status_checked_at":"2026-01-31T10:18:22.693Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["golang","http-handler","library"],"created_at":"2024-08-04T09:01:42.657Z","updated_at":"2026-01-31T11:08:06.441Z","avatar_url":"https://github.com/alexisvisco.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\t\u003ca href='https://alexisvisco.gitbook.io/kcd'\u003e\n\t\t\u003cimg alt=\"kcd logo\" width=\"460\" height=\"300\" src=\"./.github/kcd_logo.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://github.com/alexisvisco/kcd/actions\"\u003e\n\t\t\u003cimg alt=\"kcd is passing lint and tests\" width=\"93\" height=\"20\" src=\"https://github.com/alexisvisco/kcd/workflows/Go/badge.svg\"\u003e\u003c/a\u003e\n\t\u003ca href=\"https://goreportcard.com/report/github.com/alexisvisco/kcd\"\u003e\n\t\t\u003cimg alt=\"kcd has a a+ report\" width=\"78\" height=\"20\" src=\"https://goreportcard.com/badge/github.com/alexisvisco/kcd\"\u003e\u003c/a\u003e\n\t\u003ca href='https://coveralls.io/github/alexisvisco/kcd?branch=master'\u003e\n        \t\u003cimg src='https://coveralls.io/repos/github/alexisvisco/kcd/badge.svg?branch=master' alt='Coverage Status' /\u003e\u003c/a\u003e\n\t\u003ca href='https://alexisvisco.gitbook.io/kcd'\u003e\n        \t\u003cimg src='https://img.shields.io/badge/gitbook-documentation-blue' alt='documentation' /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n------\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg alt=\"comparaison between a code with and without kcd\" src=\"./.github/versus.svg\"\u003e\n\u003c/p\u003e\n\n## :stars: KCD\n\nKCD is a grandiose REST helper that wrap your shiny handler into a classic http handler. It manages all you want for\nbuilding REST services.\n\nThis library is **opinionated** by default but **customizable** which mean it uses some other libraries like Chi,\nLogrus... KCD is modular so each pieces of the code that rely on a specific library can be changed.\n\n## :muscle: Example\n\n- [*Demo simple*](examples/demo/main.go)\n- [*Demo standard http handler*](examples/demo-standard-http/main.go)\n- [*Bind query parameters*](examples/input-from-query-parameter/main.go)\n- [*Bind path parameters*](examples/input-from-path-parameter/main.go)\n- [*Bind json body*](examples/input-from-json-body/main.go)\n- [*Bind context value*](examples/input-from-ctx/main.go)\n- [*Set default value*](examples/input-with-default-value/main.go)\n- [*Split string with exploder tag*](examples/input-with-exploder/main.go)\n- [*Nested struct*](examples/input-with-nested-struct/main.go)\n- [*Validation*](examples/demo-validation)\n- [*Errors*](examples/demo-errors)\n- [*Real world example: pagination*](examples/demo-ordered-pagination)\n\n## :rocket: QuickStart\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\n\t\"github.com/go-chi/chi\"\n\t\"github.com/go-chi/chi/middleware\"\n\n\t\"github.com/alexisvisco/kcd\"\n)\n\nfunc main() {\n\tr := chi.NewRouter()\n\tr.Use(middleware.RequestID)\n\n\t// You can configure kcd with kcd.Config\n\n\tr.Get(\"/{name}\", kcd.Handler(YourHttpHandler, http.StatusOK))\n\t//                       ^ Here the magic happen this is the only thing you need\n\t//                         to do. Adding kcd.Handler(your handler)\n\t_ = http.ListenAndServe(\":3000\", r)\n}\n\n// CreateCustomerInput is an example of input for an http request.\ntype CreateCustomerInput struct {\n\tName     string   `path:\"name\"`                 // you can extract value from: 'path', 'query', 'header', 'ctx'\n\tEmails   []string `query:\"emails\" exploder:\",\"` // exploder split value with the characters specified\n\tSubject  string   `json:\"body\"`                 // it also works with json body\n}\n\n// CreateCustomerOutput is the output type of the http request.\ntype CreateCustomerOutput struct {\n\tName string `json:\"name\"`\n}\n\n// YourHttpHandler is your http handler but in a shiny version.\n// You can add *http.ResponseWriter or http.Request in params if you want.\nfunc YourHttpHandler(in *CreateCustomerInput) (CreateCustomerOutput, error) {\n\t// do some stuff here\n\tfmt.Printf(\"%+v\", in)\n\n\treturn CreateCustomerOutput{Name: in.Name}, nil\n}\n```\n\n## Install \n\n```shell\ngo get github.com/alexisvisco/kcd@v0.1.0\n```\n\n## Compatibility with framework\n- chi (by default)\n- [gorilla/mux](https://github.com/alexisvisco/kcd-mux)\n- [gin](https://github.com/alexisvisco/kcd-gin)\n- [echo](https://github.com/alexisvisco/kcd-echo)\n\n## :coffee: Benefits\n\n- More readable code\n- Focus on what it matters: business code\n- No more code duplication with unmarshalling, verifying, validating, marshalling ...\n- You could have one interface for the client and server implementation\n\n[ 📖 Read more...](https://alexisvisco.gitbook.io/kcd)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexisvisco%2Fkcd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexisvisco%2Fkcd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexisvisco%2Fkcd/lists"}