Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Tigo is an HTTP web framework written in Go (Golang).It features a Tornado-like API with better performance. Tigo是一款用Go语言开发的web应用框架,API特性类似于Tornado并且拥有比Tornado更好的性能。

License

NotificationsYou must be signed in to change notification settings

changxing2/Tigo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BadgeLICENSEGoJoin the chat at https://gitter.im/karlooper/TigoOpen Source HelpersGo Report CardGoDocRelease
Tigo logo

一个使用Go语言开发的web框架。

相关工具及插件

  • tiger
    tiger是一个专门为Tigo框架量身定做的脚手架工具,可以使用tiger新建Tigo项目或者执行其他操作。
    查看tiger
  • tission
    tission是一个为Tigo定制的session插件。
    查看tission

安装

export GO111MODULE=off; go get github.com/karldoenitz/Tigo/...export GO111MODULE=on;

升级

export GO111MODULE=off; go get -u github.com/karldoenitz/Tigo/...export GO111MODULE=on;

升级到指定版本

go get github.com/karldoenitz/Tigo@{version}

示例

Hello Tigo

package mainimport ("github.com/karldoenitz/Tigo/web""net/http")// DemoHandler handlertypeDemoHandlerstruct {    web.BaseHandler}func (demoHandler*DemoHandler)Get() {demoHandler.ResponseAsText("Hello Demo!")}// Authorize 中间件funcAuthorize(w*http.ResponseWriter,r*http.Request)bool {// 此处返回true表示继续执行,false则直接返回,后续的中间件不会执行returntrue}// 路由varurls= []web.Pattern{    {"/demo",DemoHandler{}, []web.Middleware{Authorize}},}funcmain() {application:= web.Application{IPAddress:"127.0.0.1",Port:8888,UrlPatterns:urls,    }application.Run()}

编译

打开终端,进入代码目录,运行如下命令:

go build main.go

运行

编译完成后,会有一个可执行文件main,运行如下命令:

./main

终端会有如下显示:

 INFO     2022/10/07 22:40:36  Server run on: http://127.0.0.1:8080

打开浏览器访问地址http://127.0.0.1:8888/demo,就可以看到Hello Demo。

性能对比

性能对比

文档

点击此处

都有谁在使用Tigo

cube-backupTencentXiaomi

鸣谢以下组织的支持

Jetbrains

注意

如果你对此框架感兴趣,可以加入我们一同开发。

About

Tigo is an HTTP web framework written in Go (Golang).It features a Tornado-like API with better performance. Tigo是一款用Go语言开发的web应用框架,API特性类似于Tornado并且拥有比Tornado更好的性能。

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go100.0%

[8]ページ先頭

©2009-2025 Movatter.jp