# ego **Repository Path**: veni0/ego ## Basic Information - **Project Name**: ego - **Description**: Ego 是一个用 Go 编写的全栈 Web 框架,轻量级和高效的前端组件解决方案 - **Primary Language**: Go - **License**: MIT - **Default Branch**: master - **Homepage**: https://github.com/go-ego/ego - **GVP Project**: No ## Statistics - **Stars**: 35 - **Forks**: 0 - **Created**: 2017-03-21 - **Last Updated**: 2023-10-29 ## Categories & Tags **Categories**: webframework **Tags**: None ## README # Ego [](https://travis-ci.org/go-ego/ego) [](https://codecov.io/gh/go-ego/ego) [](https://circleci.com/gh/go-ego/ego) [](https://goreportcard.com/report/github.com/go-ego/ego) [](https://godoc.org/github.com/go-ego/ego) [](https://github.com/go-ego/ego/releases/latest) [](https://gitter.im/go-ego/ego?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) >Ego 是一个基于 Gin 用 Go 编写的全栈 Web 框架,轻量级和高效的前端组件解决方案. 前端编译执行,不影响后端效率. 这是一项正在完善的工作. ## Contents - [Docs](#docs) - [Requirements](#requirements) - [Installation](#installation) - [Update](#update) - [Build-tools](#build-tools) - [Examples](#examples) - [TestRestful](#testrestful) - [Plans](#plans) - [Donate](#donate) - [Contributing](#contributing) - [License](#license) ## Docs - [API Docs](https://github.com/go-ego/ego/blob/master/docs/doc.md) - [中文文档](https://github.com/go-ego/ego/blob/master/docs/doc_zh.md) - [GoDoc](https://godoc.org/github.com/go-ego/ego) ## Requirements: Go Version ≥1.7 ## Installation: ``` go get github.com/go-ego/ego ``` ## Update: ``` go get -u github.com/go-ego/ego ``` ## [Build-tools](https://github.com/go-ego/re) ``` go get -u github.com/go-ego/re ``` ### re new 创建一个新的 Ego web 项目 ``` $ re new my-webapp ``` ### re run 运行我们创建的 web 项目, 你可以导航到应用程序文件夹并执行: ``` $ cd my-webapp && re run ``` ## [Examples:](https://github.com/go-ego/ego/tree/master/examples) #### [Router](https://github.com/go-ego/ego/blob/master/examples/ego/main.go) ```Go package main import ( "github.com/go-ego/ego" ) func main() { router := ego.Classic() ego.UseRenders() router.GlobHTML("views/html/*") parArr := [5]int{1, 2, 3, 4, 5} router.Ego("/head/", "head/head.html", ego.Map{ "head": "Test to load the HTML template", "parArr": parArr, }) router.Run(":3100") } ``` #### [icon.vgo](https://github.com/go-ego/ego/tree/master/examples/ego/public/src/icons) ```html // pkg icon
{prpo}
arr::: {{.}}
{{end}}