{"id":13634799,"url":"https://github.com/dinever/golf","last_synced_at":"2025-04-07T13:08:28.575Z","repository":{"id":57481103,"uuid":"46426592","full_name":"dinever/golf","owner":"dinever","description":":golf: The Golf web framework","archived":false,"fork":false,"pushed_at":"2021-08-27T22:20:34.000Z","size":196,"stargazers_count":269,"open_issues_count":6,"forks_count":29,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-03-31T11:08:19.225Z","etag":null,"topics":["framework","go","golf","middleware","router","server","web","webframework"],"latest_commit_sha":null,"homepage":"https://golf.readme.io/","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/dinever.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":"2015-11-18T15:10:14.000Z","updated_at":"2024-12-17T10:37:26.000Z","dependencies_parsed_at":"2022-09-26T17:50:38.914Z","dependency_job_id":null,"html_url":"https://github.com/dinever/golf","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinever%2Fgolf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinever%2Fgolf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinever%2Fgolf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinever%2Fgolf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dinever","download_url":"https://codeload.github.com/dinever/golf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657281,"owners_count":20974345,"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":["framework","go","golf","middleware","router","server","web","webframework"],"created_at":"2024-08-02T00:00:34.592Z","updated_at":"2025-04-07T13:08:28.538Z","avatar_url":"https://github.com/dinever.png","language":"Go","readme":"\u003ca href=\"http://golf.readme.io\"\u003e\u003cimg width=50% src=\"/golf-logo.png\"\u003e\u003c/img\u003e\u003c/a\u003e\n\n[![GoDoc](http://img.shields.io/badge/golf-documentation-blue.svg?style=flat-square)](http://golf.readme.io/docs)\n[![License](http://img.shields.io/badge/license-mit-blue.svg?style=flat-square)](https://raw.githubusercontent.com/dinever/golf/master/LICENSE) \n[![Build Status](http://img.shields.io/travis/dinever/golf.svg?style=flat-square)](https://travis-ci.org/dinever/golf) \n[![Build Status](https://goreportcard.com/badge/github.com/dinever/golf?style=flat-square)](https://travis-ci.org/dinever/golf) \n[![Coverage Status](http://img.shields.io/coveralls/dinever/golf.svg?style=flat-square)](https://coveralls.io/r/dinever/golf?branch=master)\n\nA fast, simple and lightweight micro-web framework for Go, comes with powerful features and has no dependencies other than the Go Standard Library.\n\nHomepage: [golf.readme.io](https://golf.readme.io/)\n\n## Installation\n\n    go get github.com/dinever/golf\n\n## Features\n\n1. No allocation during routing and parameter retrieve.\n1. Dead simple template inheritance with `extends` and `include` helper comes out of box.\n\n    **layout.html**\n    \n    ```html\n    \u003ch1\u003eHello World\u003c/h1\u003e\n    {{ template \"body\" }}\n    {{ include \"sidebar.html\" }}\n    ```\n    \n    **index.html**\n\n    ```jinja2\n    {{ extends \"layout.html\" }}\n    \n    {{ define \"body\"}}\n    \u003cp\u003eMain content\u003c/p\u003e\n    {{ end }}\n    ```\n    \n    **sidebar.html**\n    \n    ```jinja2\n    \u003cp\u003eSidebar content\u003c/p\u003e\n    ```\n1. Built-in XSRF and Session support.\n1. Powerful middleware chain.\n1. Configuration from JSON file.\n\n## Hello World\n\n```go\npackage main\n\nimport \"github.com/dinever/golf\"\n\nfunc mainHandler(ctx *golf.Context) {\n  ctx.Send(\"Hello World!\")\n}\n\nfunc pageHandler(ctx *golf.Context) {\n  ctx.Send(\"Page: \" + ctx.Param(\"page\"))\n}\n\nfunc main() {\n  app := golf.New()\n  app.Get(\"/\", mainHandler)\n  app.Get(\"/p/:page/\", pageHandler)\n  app.Run(\":9000\")\n}\n```\n\nThe website will be available at http://localhost:9000.\n\n## Benchmark\n\nThe following chart shows the benchmark performance of Golf compared with others.\n\n![Golf benchmark](https://cloud.githubusercontent.com/assets/1311594/14748305/fcbdc216-0886-11e6-90a4-231e78acfb60.png)\n\nFor more information, please see [BENCHMARKING.md](BENCHMARKING.md)\n\n## Docs\n\n[golf.readme.io/docs](https://golf.readme.io/docs)\n\n## License\n\n[MIT License](/LICENSE)\n","funding_links":[],"categories":["Web Frameworks","Web框架","Misc","web框架","web框架`web 框架`","Utility"],"sub_categories":["HTTP Clients","实用程序/Miscellaneous","Utility/Miscellaneous","版本控制","Advanced Console UIs","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","Fail injection","版本控制`版本控制相关库`","交流"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdinever%2Fgolf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdinever%2Fgolf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdinever%2Fgolf/lists"}