format code
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
//
|
||||
// ctx := context.Context{Request:req,ResponseWriter:rw}
|
||||
//
|
||||
// more docs http://beego.vip/docs/module/context.md
|
||||
package context
|
||||
|
||||
import (
|
||||
|
||||
@@ -96,9 +96,11 @@ type ControllerComments struct {
|
||||
// ControllerCommentsSlice implements the sort interface
|
||||
type ControllerCommentsSlice []ControllerComments
|
||||
|
||||
func (p ControllerCommentsSlice) Len() int { return len(p) }
|
||||
func (p ControllerCommentsSlice) Len() int { return len(p) }
|
||||
|
||||
func (p ControllerCommentsSlice) Less(i, j int) bool { return p[i].Router < p[j].Router }
|
||||
func (p ControllerCommentsSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
|
||||
|
||||
func (p ControllerCommentsSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
|
||||
|
||||
// Controller defines some basic http request handler operations, such as
|
||||
// http context, template and view, session and xsrf.
|
||||
|
||||
@@ -12,6 +12,5 @@ beego is inspired by Tornado, Sinatra and Flask with the added benefit of some G
|
||||
beego.Run()
|
||||
}
|
||||
|
||||
more information: http://beego.vip
|
||||
*/
|
||||
package web
|
||||
|
||||
@@ -53,8 +53,8 @@ var defaultRejectionResponse = RejectionResponse{
|
||||
// according to the configuration.
|
||||
func NewLimiter(opts ...limiterOption) web.FilterFunc {
|
||||
l := &limiter{
|
||||
buckets: make(map[string]bucket),
|
||||
sessionKey: defaultSessionKey,
|
||||
buckets: make(map[string]bucket),
|
||||
sessionKey: defaultSessionKey,
|
||||
rate: time.Millisecond * 10,
|
||||
capacity: 100,
|
||||
bucketFactory: newTokenBucket,
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
// go globalSessions.GC()
|
||||
// }
|
||||
//
|
||||
// more docs: http://beego.vip/docs/module/session.md
|
||||
package couchbase
|
||||
|
||||
import (
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
// go globalSessions.GC()
|
||||
// }
|
||||
//
|
||||
// more docs: http://beego.vip/docs/module/session.md
|
||||
package memcache
|
||||
|
||||
import (
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
// go globalSessions.GC()
|
||||
// }
|
||||
//
|
||||
// more docs: http://beego.vip/docs/module/session.md
|
||||
package mysql
|
||||
|
||||
import (
|
||||
@@ -47,7 +46,6 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
// import mysql driver
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
|
||||
"github.com/beego/beego/v2/server/web/session"
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
// go globalSessions.GC()
|
||||
// }
|
||||
//
|
||||
// more docs: http://beego.vip/docs/module/session.md
|
||||
package postgres
|
||||
|
||||
import (
|
||||
@@ -57,7 +56,6 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
// import postgresql Driver
|
||||
_ "github.com/lib/pq"
|
||||
|
||||
"github.com/beego/beego/v2/server/web/session"
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
// go globalSessions.GC()
|
||||
// }
|
||||
//
|
||||
// more docs: http://beego.vip/docs/module/session.md
|
||||
package redis
|
||||
|
||||
import (
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
// go globalSessions.GC()
|
||||
// }
|
||||
//
|
||||
// more docs: http://beego.vip/docs/module/session.md
|
||||
package redis_cluster
|
||||
|
||||
import (
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
// go globalSessions.GC()
|
||||
// }
|
||||
//
|
||||
// more docs: http://beego.vip/docs/module/session.md
|
||||
package session
|
||||
|
||||
import (
|
||||
|
||||
@@ -242,7 +242,6 @@ func Htmlunquote(text string) string {
|
||||
// /login?next=/
|
||||
// /user/John%20Doe
|
||||
//
|
||||
// more detail http://beego.vip/docs/mvc/controller/urlbuilding.md
|
||||
func URLFor(endpoint string, values ...interface{}) string {
|
||||
return BeeApp.Handlers.URLFor(endpoint, values...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user