format code
This commit is contained in:
1
adapter/cache/cache.go
vendored
1
adapter/cache/cache.go
vendored
@@ -28,7 +28,6 @@
|
||||
// bm.IsExist("astaxie")
|
||||
// bm.Delete("astaxie")
|
||||
//
|
||||
// more docs http://beego.vip/docs/module/cache.md
|
||||
package cache
|
||||
|
||||
import (
|
||||
|
||||
1
adapter/cache/memcache/memcache.go
vendored
1
adapter/cache/memcache/memcache.go
vendored
@@ -26,7 +26,6 @@
|
||||
//
|
||||
// bm, err := cache.NewCache("memcache", `{"conn":"127.0.0.1:11211"}`)
|
||||
//
|
||||
// more docs http://beego.vip/docs/module/cache.md
|
||||
package memcache
|
||||
|
||||
import (
|
||||
|
||||
1
adapter/cache/redis/redis.go
vendored
1
adapter/cache/redis/redis.go
vendored
@@ -26,7 +26,6 @@
|
||||
//
|
||||
// bm, err := cache.NewCache("redis", `{"conn":"127.0.0.1:11211"}`)
|
||||
//
|
||||
// more docs http://beego.vip/docs/module/cache.md
|
||||
package redis
|
||||
|
||||
import (
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
// cnf.DIY(key string) (interface{}, error)
|
||||
// cnf.GetSection(section string) (map[string]string, error)
|
||||
// cnf.SaveConfigFile(filename string) error
|
||||
// More docs http://beego.vip/docs/module/config.md
|
||||
package config
|
||||
|
||||
import (
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
//
|
||||
// cnf, err := config.NewConfig("xml", "config.xml")
|
||||
//
|
||||
// More docs http://beego.vip/docs/module/config.md
|
||||
package xml
|
||||
|
||||
import (
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
//
|
||||
// cnf, err := config.NewConfig("yaml", "config.yaml")
|
||||
//
|
||||
// More docs http://beego.vip/docs/module/config.md
|
||||
package yaml
|
||||
|
||||
import (
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
//
|
||||
// ctx := context.Context{Request:req,ResponseWriter:rw}
|
||||
//
|
||||
// more docs http://beego.vip/docs/module/context.md
|
||||
package context
|
||||
|
||||
import (
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
// }
|
||||
// fmt.Println(str)
|
||||
//
|
||||
// more docs http://beego.vip/docs/module/httplib.md
|
||||
package httplib
|
||||
|
||||
import (
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
// log.Debug("debug")
|
||||
// log.Critical("critical")
|
||||
//
|
||||
// more docs http://beego.vip/docs/module/logs.md
|
||||
package logs
|
||||
|
||||
import (
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
package logs
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
)
|
||||
|
||||
@@ -40,30 +38,6 @@ func (o *oldToNewAdapter) Flush() {
|
||||
o.old.Flush()
|
||||
}
|
||||
|
||||
func (o *oldToNewAdapter) SetFormatter(f logs.LogFormatter) {
|
||||
func (*oldToNewAdapter) SetFormatter(f logs.LogFormatter) {
|
||||
panic("unsupported operation, you should not invoke this method")
|
||||
}
|
||||
|
||||
type newToOldAdapter struct {
|
||||
n logs.Logger
|
||||
}
|
||||
|
||||
func (n *newToOldAdapter) Init(config string) error {
|
||||
return n.n.Init(config)
|
||||
}
|
||||
|
||||
func (n *newToOldAdapter) WriteMsg(when time.Time, msg string, level int) error {
|
||||
return n.n.WriteMsg(&logs.LogMsg{
|
||||
When: when,
|
||||
Msg: msg,
|
||||
Level: level,
|
||||
})
|
||||
}
|
||||
|
||||
func (n *newToOldAdapter) Destroy() {
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (n *newToOldAdapter) Flush() {
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
@@ -51,7 +51,6 @@
|
||||
// num, err = o.Delete(&u)
|
||||
// }
|
||||
//
|
||||
// more docs: http://beego.vip/docs/mvc/model/overview.md
|
||||
package orm
|
||||
|
||||
import (
|
||||
|
||||
@@ -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,14 +37,12 @@
|
||||
// go globalSessions.GC()
|
||||
// }
|
||||
//
|
||||
// more docs: http://beego.vip/docs/module/session.md
|
||||
package mysql
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
// import mysql driver
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
|
||||
"github.com/beego/beego/v2/adapter/session"
|
||||
|
||||
@@ -47,14 +47,12 @@
|
||||
// go globalSessions.GC()
|
||||
// }
|
||||
//
|
||||
// more docs: http://beego.vip/docs/module/session.md
|
||||
package postgres
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
// import postgresql Driver
|
||||
_ "github.com/lib/pq"
|
||||
|
||||
"github.com/beego/beego/v2/adapter/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 (
|
||||
|
||||
@@ -106,7 +106,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 web.URLFor(endpoint, values...)
|
||||
}
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
//
|
||||
// AddHealthCheck("database",&DatabaseCheck{})
|
||||
//
|
||||
// more docs: http://beego.vip/docs/module/toolbox.md
|
||||
package toolbox
|
||||
|
||||
import (
|
||||
|
||||
@@ -237,6 +237,7 @@ func (ms *MapSorter) Sort() {
|
||||
}
|
||||
|
||||
func (ms *MapSorter) Len() int { return len(ms.Keys) }
|
||||
|
||||
func (ms *MapSorter) Less(i, j int) bool {
|
||||
if ms.Vals[i].GetNext(context.Background()).IsZero() {
|
||||
return false
|
||||
|
||||
@@ -50,9 +50,5 @@ In your view templates:
|
||||
</ul>
|
||||
{{end}}
|
||||
|
||||
See also
|
||||
|
||||
http://beego.vip/docs/mvc/view/page.md
|
||||
|
||||
*/
|
||||
package pagination
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// more info: http://beego.vip/docs/mvc/controller/validation.md
|
||||
package validation
|
||||
|
||||
import (
|
||||
|
||||
Reference in New Issue
Block a user