{"id":30668072,"url":"https://github.com/mochams/goatte","last_synced_at":"2026-06-23T23:30:58.401Z","repository":{"id":310861530,"uuid":"1041528550","full_name":"mochams/goatte","owner":"mochams","description":"My idea of a Go web library","archived":false,"fork":false,"pushed_at":"2025-08-26T18:56:12.000Z","size":15,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"develop","last_synced_at":"2025-08-31T23:22:27.899Z","etag":null,"topics":["full-stack-web-development","go","golang","web"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mochams.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}},"created_at":"2025-08-20T16:08:43.000Z","updated_at":"2025-08-26T18:55:14.000Z","dependencies_parsed_at":"2025-08-20T18:36:03.603Z","dependency_job_id":"09c9d50f-eb57-41c0-9383-c77bcb567f88","html_url":"https://github.com/mochams/goatte","commit_stats":null,"previous_names":["mochams/gorbit"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mochams/goatte","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mochams%2Fgoatte","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mochams%2Fgoatte/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mochams%2Fgoatte/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mochams%2Fgoatte/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mochams","download_url":"https://codeload.github.com/mochams/goatte/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mochams%2Fgoatte/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34711176,"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-23T02:00:07.161Z","response_time":65,"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":["full-stack-web-development","go","golang","web"],"created_at":"2025-08-31T23:08:20.709Z","updated_at":"2026-06-23T23:30:58.381Z","avatar_url":"https://github.com/mochams.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# goatte 🚀\n\n`goatte` is a lightweight HTTP library for building web services in Go.  \nIt's built on top of Go’s standard library and is inspired by [net/http](https://pkg.go.dev/net/http), [django](https://github.com/django/django), and [chi](https://github.com/go-chi/chi).  \nThanks for checking it out.\n\nNo extra dependencies — just Go.  \n100% compatible with net/http.\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/mochams/goatte.svg)](https://pkg.go.dev/github.com/mochams/goatte)\n[![License](https://img.shields.io/github/license/mochams/goatte)](https://github.com/mochams/goatte?tab=BSD-3-Clause-1-ov-file)\n\n## Features\n\n- Easy to use and learn\n\n- Clean and simple routing\n\n- Built-in support for middleware\n\n- URL reversing (name your routes and look them up)\n\n- Serve static files easily\n\n- Organize routes with sub-routers\n\n- 100% compatible with net/http\n\n- Clean and minimal API\n\n- Zero dependencies (only uses the Go standard library)\n\n## Installation\n\n```bash\ngo get github.com/mochams/goatte@latest\n```\n\n## Quick start\n\nCreate a web server with middleware, and a parameterized route:\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"log\"\n    \"net/http\"\n\n    \"github.com/mochams/goatte\"\n)\n\n// Sample middleware that logs messages before and after the request is handled\nvar ExampleMiddleware = func(next http.HandlerFunc) http.HandlerFunc {\n    return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n        fmt.Println(\"Before handler (middleware)\")\n        next.ServeHTTP(w, r)\n        fmt.Println(\"After handler (middleware)\")\n    })\n}\n\nfunc main() {\n    middleware := []goatte.Middleware{ExampleMiddleware}\n    router := goatte.NewRouter(\"main\", middleware...)\n\n    // Also fine\n    // router := goatte.NewRouter(\"main\", ExampleMiddleware)\n\n    router.Get(\"/users/{name}/\", \"user-detail\", func(w http.ResponseWriter, r *http.Request) {\n        fmt.Println(\"..Handling request in handler...\")\n        w.Write([]byte(\"Hello, \" + r.PathValue(\"name\")))\n    })\n\n    log.Println(\"Server listening on http://localhost:3000\")\n    log.Fatal(http.ListenAndServe(\":3000\", router))\n}\n```\n\nStart the server\n\n```bash\ngo run .\n```\n\nIn a new shell, call the endpoint:\n\n```bash\ncurl -i http://localhost:3000/users/goatte/\n```\n\nYou should see this in the terminal running your server:\n\n```bash\nBefore handler (middleware)\n..Handling request in handler...\nAfter handler (middleware)\n```\n\nAnd this in the response:\n\n```bash\nHTTP/1.1 200 OK\n...\n\nHello, goatte%   \n```\n\n## Examples\n\nLooking for more examples?  \nCheck out the [examples/](https://github.com/mochams/goatte/tree/develop/examples) folder for more examples\n\n## Contributing\n\nContributions are welcome!  \nIf you have ideas, bug fixes, or improvements, feel free to open a pull request.\n\n## Acknowledgments\n\n`goatte` is inspired by the simplicity of Go’s standard net/http, Chi’s routing, and the best ideas of Django framework.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmochams%2Fgoatte","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmochams%2Fgoatte","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmochams%2Fgoatte/lists"}