一个简单GOLANG路由
package controllers import ( . "logger" "web" ) //对象继承直接拥用REST标准接口 type login struct { web.ControllerBase } func (this *login) Get() { this.Template["key"] = "value" this.WriteString("GET:", this.Template) } func (this *login) Post() { this.WriteString("POST:", this.Template) } //对象不继承注册一个方法到路由 type signOut struct { } func (this *signOut) signOutGe...阅读全文