{"id":37981231,"url":"https://github.com/fudali113/doob","last_synced_at":"2026-01-16T18:34:52.065Z","repository":{"id":64305876,"uuid":"65082812","full_name":"fudali113/doob","owner":"fudali113","description":"simple \u0026 powerful golang restful micro-framework","archived":false,"fork":false,"pushed_at":"2017-04-10T13:40:30.000Z","size":3520,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T10:11:50.725Z","etag":null,"topics":["api","go","micro-framework","rest","web"],"latest_commit_sha":null,"homepage":"http://blog.fudali.cc/doob","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/fudali113.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":"2016-08-06T13:03:25.000Z","updated_at":"2024-06-20T10:11:50.726Z","dependencies_parsed_at":"2023-01-15T10:30:37.409Z","dependency_job_id":null,"html_url":"https://github.com/fudali113/doob","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/fudali113/doob","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fudali113%2Fdoob","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fudali113%2Fdoob/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fudali113%2Fdoob/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fudali113%2Fdoob/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fudali113","download_url":"https://codeload.github.com/fudali113/doob/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fudali113%2Fdoob/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28480943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: 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":["api","go","micro-framework","rest","web"],"created_at":"2026-01-16T18:34:51.959Z","updated_at":"2026-01-16T18:34:52.035Z","avatar_url":"https://github.com/fudali113.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Doob\n![-_-](https://travis-ci.org/fudali113/Doob.svg?branch=master)\n\nDoob is a rest and a simple router handler\n\ninit invoke AddHandlerFunc(forwardUrl,methodStr,func)\nsuch as\n\n* add static folder\n```\nDoob.AddStaicPrefix(\"/static\")\n```\n\n* add forwardUrl func , use `\u0026\u0026` split urls\n```\n  router := Doob.DefaultRouter()\n\n  router.AddHandlerFunc(\"/Doob/origin/{who}/{do} \u0026\u0026 /Doob/origin1/{who}/{do}\", origin, Doob.GET, Doob.POST, Doob.PUT, Doob.DELETE)\n```\n\n* use `Get,Post,Put,Delete,Options,Head` method\n```\n  // get '/Doob' at the beginning base router\n  doobPrefixRouter := Doob.GetRouter(\"Doob\")\n\n  // use `{}` distinction pathVariable\n  doobPrefixRouter.Get(\"/{name}/{value}\", func)\n  // {} 中支持添加正则表达式，用`:`分割参数名和正则表达式\n  doobPrefixRouter.Post(\"/{name:[0-9]+}/{value}\", func)\n  doobPrefixRouter.Put(\"/{name}/{value}\", func)\n  doobPrefixRouter.Delete(\"/{name}/{value}\", func)\n  doobPrefixRouter.Options(\"/{name}/{value}\", func)\n  doobPrefixRouter.Head(\"/{name}/{value}\", func)\n```\n\n* if your not has HEAD or OPTIONS method , doob is add default HEAD and OPTIOND method\n```\n  HEAD is return this url get method headers\n  OPTIONS is return this url support methods\n```\n\n* support func classify\n```\n  // 兼容原始http方法类\n  func origin(w http.ResponseWriter, r *http.Request) {}\n\n  // 根据doob 里的context 进行获取参数或者返回\n  func ctx(ctx *Doob.Context) interface{} {}\n\n  // 根据url参数自动注入参数\n  // 返回值为string时为返回静态文件\n  // 返回不为string时默认将解析该对象，并返回给请求用户\n  func di(name, value string) interface{} {}\n\n  // 返回 string 是 type， interface{} 是你需要处理的数据\n  // 你的返回值将流向注册的返回值处理器进行匹配并处理\n  // 当只返回string时，把interface当做nil\n  //\n  // 当只返回数据时，此时returnDealDefaultType 为 auto\n  // 此时将根据 請求的header Accept参数进行判断type类型\n  // 你可以通过SetReturnDealDefaultType(t string)设置默认的type类型\n  func returnHtml() (string, interface{}) {}\n```\n\n\n* next use\n```\n  Doob.Start(8888)\n```\n\nrun you application\n\nclone this project , run demo\n```\n  cd /sample\n  go run demo.go\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffudali113%2Fdoob","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffudali113%2Fdoob","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffudali113%2Fdoob/lists"}