format code

This commit is contained in:
Deng Ming
2022-12-23 10:25:06 +08:00
parent 15fa7e15d4
commit 5ade9fa025
64 changed files with 35 additions and 109 deletions

View File

@@ -19,7 +19,6 @@
//
// ctx := context.Context{Request:req,ResponseWriter:rw}
//
// more docs http://beego.vip/docs/module/context.md
package context
import (

View File

@@ -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.

View File

@@ -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

View File

@@ -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,

View File

@@ -29,7 +29,6 @@
// go globalSessions.GC()
// }
//
// more docs: http://beego.vip/docs/module/session.md
package couchbase
import (

View File

@@ -29,7 +29,6 @@
// go globalSessions.GC()
// }
//
// more docs: http://beego.vip/docs/module/session.md
package memcache
import (

View File

@@ -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"

View File

@@ -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"

View File

@@ -29,7 +29,6 @@
// go globalSessions.GC()
// }
//
// more docs: http://beego.vip/docs/module/session.md
package redis
import (

View File

@@ -29,7 +29,6 @@
// go globalSessions.GC()
// }
//
// more docs: http://beego.vip/docs/module/session.md
package redis_cluster
import (

View File

@@ -24,7 +24,6 @@
// go globalSessions.GC()
// }
//
// more docs: http://beego.vip/docs/module/session.md
package session
import (

View File

@@ -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...)
}