怎样在小程序里实现标题的更改
1257
2022-10-27
Tango 是一个微内核的Go语言Web框架
Tango 简体中文
Package tango is a micro & pluggable web framework for Go.
Current version: v0.5.0 Version History
Getting Started
To install Tango:
go get github.com/lunny/tango
A classic usage of Tango below:
package mainimport ( "errors" "github.com/lunny/tango")type Action struct { tango.jsON}func (Action) Get() interface{} { if true { return map[string]string{ "say": "Hello tango!", } } return errors.New("something error")}func main() { t := tango.Classic() t.Get("/", new(Action)) t.Run()}
Then visit http://localhost:8000 on your browser. You will get
{"say":"Hello tango!"}
If you change true after if to false, then you will get
{"err":"something error"}
This code will automatically convert returned map or error to a json because we has an embedded struct tango.JSON.
Features
Powerful routing & Flexible routes combinations.Directly integrate with existing services.Easy to plugin features with modular design.High performance dependency injection embedded.
Middlewares
Middlewares allow you easily plugin features for your Tango applications.
There are already many middlewares to simplify your work:
Documentation
Manual, And you are welcome to contribue for the book by git PR to github.com/go-tango/manual-en-US操作手册,您也可以访问 github.com/go-tango/manual-zh-CN为本手册进行贡献API Reference
Discuss
Google Group - EnglishQQ Group - 简体中文 #369240307
Cases
GopherTC - China Discuss ForumWego - Discuss Forumdbweb - DB management web UIGodaily - githubPugo - A pugo blogGos - Static web serverGoFtpd - Pure Go cross-platform ftp server
License
This project is under BSD License. See the LICENSE file for the full license text.
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~