{"id":13756105,"url":"https://github.com/go-ego/ego","last_synced_at":"2025-05-10T03:30:50.908Z","repository":{"id":57497188,"uuid":"77315812","full_name":"go-ego/ego","owner":"go-ego","description":"Ego is a full-stack web framework written in Go, lightweight and efficient front-end component solutions, based on gin. The front-end is compiled, does not affect the back-end.","archived":true,"fork":false,"pushed_at":"2020-04-10T16:19:47.000Z","size":591,"stargazers_count":186,"open_issues_count":0,"forks_count":23,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-02-14T19:33:17.035Z","etag":null,"topics":["ego","framework","go","golang","middleware","server","vgo","web-app","web-framework"],"latest_commit_sha":null,"homepage":"","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/go-ego.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-25T07:38:36.000Z","updated_at":"2024-01-11T01:15:48.000Z","dependencies_parsed_at":"2022-09-13T19:00:56.688Z","dependency_job_id":null,"html_url":"https://github.com/go-ego/ego","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-ego%2Fego","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-ego%2Fego/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-ego%2Fego/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-ego%2Fego/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-ego","download_url":"https://codeload.github.com/go-ego/ego/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253358069,"owners_count":21895967,"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":["ego","framework","go","golang","middleware","server","vgo","web-app","web-framework"],"created_at":"2024-08-03T11:00:36.395Z","updated_at":"2025-05-10T03:30:50.571Z","avatar_url":"https://github.com/go-ego.png","language":"Go","funding_links":[],"categories":["Go","Framework based on gin"],"sub_categories":[],"readme":"# Ego\n\u003c!--\u003cimg align=\"right\" src=\"https://raw.githubusercontent.com/go-ego/ego/master/logo.jpg\"\u003e--\u003e\n\u003c!--\u003ca href=\"https://circleci.com/gh/go-ego/ego/tree/dev\"\u003e\u003cimg src=\"https://img.shields.io/circleci/project/go-ego/ego/dev.svg\" alt=\"Build Status\"\u003e\u003c/a\u003e--\u003e\n[![Build Status](https://travis-ci.org/go-ego/ego.svg)](https://travis-ci.org/go-ego/ego)\n[![codecov](https://codecov.io/gh/go-ego/ego/branch/master/graph/badge.svg)](https://codecov.io/gh/go-ego/ego)\n[![CircleCI Status](https://circleci.com/gh/go-ego/ego.svg?style=shield)](https://circleci.com/gh/go-ego/ego)\n[![Go Report Card](https://goreportcard.com/badge/github.com/go-ego/ego)](https://goreportcard.com/report/github.com/go-ego/ego)\n[![GoDoc](https://godoc.org/github.com/go-ego/ego?status.svg)](https://godoc.org/github.com/go-ego/ego)\n[![Release](https://github-release-version.herokuapp.com/github/go-ego/ego/release.svg?style=flat)](https://github.com/go-ego/ego/releases/latest)\n[![Join the chat at https://gitter.im/go-ego/ego](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/go-ego/ego?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\u003c!--\u003ca href=\"https://github.com/go-ego/ego/releases\"\u003e\u003cimg src=\"https://img.shields.io/badge/%20version%20-%206.0.0%20-blue.svg?style=flat-square\" alt=\"Releases\"\u003e\u003c/a\u003e--\u003e\n  \n  \u003eEgo is a full-stack web framework written in Go, lightweight and efficient front-end component solutions, based on [gin](https://github.com/gin-gonic/gin). The front-end is compiled, does not affect the back-end. \n\nThis is a work in progress.\n\n[简体中文](https://github.com/go-ego/ego/blob/master/README_zh.md)\n\n## Contents\n- [Docs](#docs)\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Update](#update)\n- [Build-tools](#build-tools)\n- [Examples](#examples)\n- [TestRestful](#testrestful)\n- [Plans](#plans)\n- [Donate](#donate)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Docs\n  - [API Docs](https://github.com/go-ego/ego/blob/master/docs/doc.md) \u0026nbsp;\u0026nbsp;\u0026nbsp;\n  - [中文文档](https://github.com/go-ego/ego/blob/master/docs/doc_zh.md)\n  - [GoDoc](https://godoc.org/github.com/go-ego/ego)\n\n## Requirements:\n\nGo Version ≥1.7\n\n## Installation:\n```\ngo get github.com/go-ego/ego\n```\n## Update:\n```\ngo get -u github.com/go-ego/ego  \n```\n## [Build-tools](https://github.com/go-ego/re)\n```\ngo get -u github.com/go-ego/re \n```\n### re new \nTo create a new Ego web application\n\n```\n$ re new my-webapp\n```\n\n### re run\n\nTo run the application we just created, you can navigate to the application folder and execute:\n```\n$ cd my-webapp \u0026\u0026 re run\n```\n\n## [Examples:](https://github.com/go-ego/ego/tree/master/examples)\n\n#### [Router](https://github.com/go-ego/ego/blob/master/examples/ego/main.go)\n\n```Go\npackage main\n\nimport (\n\t\"github.com/go-ego/ego\"\n)\n\nfunc main() {\n\n\trouter := ego.Classic()\n\tego.UseRenders()\n\n\trouter.GlobHTML(\"views/html/*\")\n\n\tparArr := [5]int{1, 2, 3, 4, 5}\n\trouter.Ego(\"/head/\", \"head/head.html\", ego.Map{\n\t\t\"head\":   \"Test to load the HTML template\",\n\t\t\"parArr\": parArr,\n\t})\n\n\trouter.Run(\":3100\")\n}\n``` \n\n#### [icon.vgo](https://github.com/go-ego/ego/tree/master/examples/ego/public/src/icons)\n\n```html\n// pkg icon\n\n\u003cdiv class=\"icon\"\u003e\n\t\u003ci class=\"iconfont {vclass}\" {node}\u003e\u003c/i\u003e\n\t\u003cp\u003e{prpo}\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cstyle\u003e\n\n.header-left{\n\tfloat:left;\n}\n\n.header-right{\n\tfloat:right;\n}\n\n.iconfont {\n  position: relative;\n  font-size:24px\n}\n\u003c/style\u003e\n\n```\n\n#### [head.vgo](https://github.com/go-ego/ego/blob/master/examples/ego/public/head/head.vgo)\n\n```html\nimport (\n\t\"icons\"\n\ticon \"icons/icon.vgo\"\n\t)\n\n\u003cdiv class=\"head\"\u003e\n\t\u003cdiv\u003eego:{{.head}}\u003c/div\u003e\n\n\t\u003cicon\u003e\n\t\tvclass={icon-share-to}\n\t\tnode={ id=\"slot1\"}\n\t\tprpo={node---1}\n\t\u003c/icon\u003e\n\n\t\u003cdiv\u003e\n\t\t{{range .parArr}}\n\t        \u003cp\u003earr::: {{.}}\u003c/p\u003e\n\t\t{{end}}\n\t\u003c/div\u003e\n\n\u003c/div\u003e\n\n```\n### Renderings:\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/go-ego/ego/blob/master/img/head.png\" width=\"700\" hight=\"500\"\u003e\n\u003c/p\u003e\n\n## TestRestful\n```Go\n\npackage main\n\nimport (\n\t\"github.com/go-ego/ego\"\n)\n\nconst httpUrl string = \"http://127.0.0.1:3000\"\n\nfunc main() {\n\n  router := ego.Classic()\n\n  router.Static(\"/js\", \"./views/js\")\n  router.Static(\"/src\", \"./views/src\")\n  router.GlobHTML(\"views/html/*\")\n\n  strUrl := httpUrl + \"/test/hlist\"\n  paramMap := ego.Map{\n    \"lon\":  \"10.1010101\",\n    \"lat\":  \"20.202020\",\n    \"type\": \"1\",\n  }\n  router.TestHtml(strUrl, paramMap) // http url, http parameter, args (optional parameters): The default is \"data\".\n\n  router.Run(\":3100\")\n}\n\n```\n### Renderings:\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/go-ego/ego/blob/master/img/test.png\" width=\"700\" hight=\"500\"\u003e\n\u003c/p\u003e\n\n[More instructions](https://github.com/go-ego/RESTest)\n\n## Plans\n- Compression and merge css/js\n- CSS Preprocessing\n- Try supports MVVM and vdom\n- Update web framework\n\n## Donate\n- Supporting ego, [buy me a coffee](https://github.com/go-vgo/buy-me-a-coffee).\n\n## Contributing\n\n- To contribute to Ego, please see [Contribution Guidelines](https://github.com/go-ego/ego/blob/master/CONTRIBUTING.md).\nFork -\u003e Patch -\u003e Push -\u003e Test -\u003e Pull Request.\n\n- See [contributors page](https://github.com/go-ego/ego/graphs/contributors) for full list of contributors.\n\n## License\n\nEgo is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.\n\nSee [LICENSE-APACHE](http://www.apache.org/licenses/LICENSE-2.0), [LICENSE-MIT](https://github.com/go-ego/ego/blob/master/LICENSE), and COPYRIGHT for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-ego%2Fego","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-ego%2Fego","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-ego%2Fego/lists"}