{"id":21470835,"url":"https://github.com/iamdanielyin/halo","last_synced_at":"2025-03-17T06:44:57.573Z","repository":{"id":89264218,"uuid":"138017463","full_name":"iamdanielyin/halo","owner":"iamdanielyin","description":"A lightweight and flexible Go web framework","archived":false,"fork":false,"pushed_at":"2018-06-27T10:53:01.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T16:14:07.156Z","etag":null,"topics":["framework","go","http","middleware","web"],"latest_commit_sha":null,"homepage":"https://yinfxs.github.io/halo/","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/iamdanielyin.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-06-20T10:31:07.000Z","updated_at":"2018-06-27T10:53:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"826d9f72-8b80-4734-88e7-5110ae7ac991","html_url":"https://github.com/iamdanielyin/halo","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/iamdanielyin%2Fhalo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamdanielyin%2Fhalo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamdanielyin%2Fhalo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamdanielyin%2Fhalo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamdanielyin","download_url":"https://codeload.github.com/iamdanielyin/halo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243988956,"owners_count":20379649,"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","http","middleware","web"],"created_at":"2024-11-23T09:29:23.869Z","updated_at":"2025-03-17T06:44:57.554Z","avatar_url":"https://github.com/iamdanielyin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Halo\n\nA lightweight and flexible Go web framework\n\n## Installation\n\n```sh\ngo get github.com/yinfxs/halo\n```\n\n## Import\n\n```go\nimport \"github.com/yinfxs/halo\"\n```\n\n## Usage\n\n```go\npackage main\n\nimport (\n  \"fmt\"\n  \"log\"\n  \"time\"\n\n  \"github.com/yinfxs/halo\"\n)\n\n// Logger 日志中间件\nfunc Logger(ctx *halo.Context) {\n  start := time.Now().Unix()\n  raw := ctx.R.URL.RawQuery\n\n  info := fmt.Sprintf(\"%s %s\", ctx.R.Method, ctx.R.URL.Path)\n  if raw != \"\" {\n    info += \"?\" + raw\n  }\n\n  log.Printf(\"--\u003e %v\\n\", info)\n  ctx.Next()\n  log.Printf(\"\u003c-- %s %dms\\n\", info, start-time.Now().Unix())\n}\n\nfunc main() {\n  a := halo.New()\n  a.Use(Logger)\n  a.Run(\":3000\")\n}\n```\n\n```sh\n2018/06/27 18:47:30 Listen and serve on :3000\n2018/06/27 18:47:33 --\u003e GET /\n2018/06/27 18:47:33 \u003c-- GET / 0ms\n2018/06/27 18:47:34 --\u003e GET /favicon.ico\n2018/06/27 18:47:34 \u003c-- GET /favicon.ico 0ms\n```\n\n## Contributing\n\nIf you'd like to help out with the project. You can put up a Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamdanielyin%2Fhalo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamdanielyin%2Fhalo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamdanielyin%2Fhalo/lists"}