diff --git a/.travis.yml b/.travis.yml index c019c999..05b20670 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ services: - memcached env: global: - - GO_REPO_FULLNAME="github.com/astaxie/beego" + - GO_REPO_FULLNAME="github.com/beego/beego" matrix: - ORM_DRIVER=sqlite3 ORM_SOURCE=$TRAVIS_BUILD_DIR/orm_test.db - ORM_DRIVER=postgres ORM_SOURCE="user=postgres dbname=orm_test sslmode=disable" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9d511616..f21f5e5a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,7 +30,7 @@ do it in other way. ### Create issues Any significant improvement should be documented as [a GitHub -issue](https://github.com/astaxie/beego/issues) before anybody +issue](https://github.com/beego/beego/issues) before anybody starts working on it. Also when filing an issue, make sure to answer these five questions: diff --git a/README.md b/README.md index de8f0063..f7d3a077 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Beego [![Build Status](https://travis-ci.org/astaxie/beego.svg?branch=master)](https://travis-ci.org/astaxie/beego) [![GoDoc](http://godoc.org/github.com/astaxie/beego?status.svg)](http://godoc.org/github.com/astaxie/beego) [![Foundation](https://img.shields.io/badge/Golang-Foundation-green.svg)](http://golangfoundation.org) [![Go Report Card](https://goreportcard.com/badge/github.com/astaxie/beego)](https://goreportcard.com/report/github.com/astaxie/beego) +# Beego [![Build Status](https://travis-ci.org/astaxie/beego.svg?branch=master)](https://travis-ci.org/astaxie/beego) [![GoDoc](http://godoc.org/github.com/beego/beego?status.svg)](http://godoc.org/github.com/beego/beego) [![Foundation](https://img.shields.io/badge/Golang-Foundation-green.svg)](http://golangfoundation.org) [![Go Report Card](https://goreportcard.com/badge/github.com/beego/beego)](https://goreportcard.com/report/github.com/beego/beego) beego is used for rapid development of RESTful APIs, web apps and backend services in Go. @@ -19,13 +19,13 @@ It is inspired by Tornado, Sinatra and Flask. beego has some Go-specific feature #### Download and install - go get github.com/astaxie/beego + go get github.com/beego/beego #### Create file `hello.go` ```go package main -import "github.com/astaxie/beego" +import "github.com/beego/beego" func main(){ beego.Run() diff --git a/admin.go b/admin.go index db52647e..08991ff8 100644 --- a/admin.go +++ b/admin.go @@ -27,10 +27,10 @@ import ( "github.com/prometheus/client_golang/prometheus/promhttp" - "github.com/astaxie/beego/grace" - "github.com/astaxie/beego/logs" - "github.com/astaxie/beego/toolbox" - "github.com/astaxie/beego/utils" + "github.com/beego/beego/grace" + "github.com/beego/beego/logs" + "github.com/beego/beego/toolbox" + "github.com/beego/beego/utils" ) // BeeAdminApp is the default adminApp used by admin module. diff --git a/admin_test.go b/admin_test.go index 1bef7f78..19bba17c 100644 --- a/admin_test.go +++ b/admin_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/astaxie/beego/toolbox" + "github.com/beego/beego/toolbox" ) type SampleDatabaseCheck struct { diff --git a/app.go b/app.go index 3dee8999..6dc185e7 100644 --- a/app.go +++ b/app.go @@ -27,9 +27,9 @@ import ( "strings" "time" - "github.com/astaxie/beego/grace" - "github.com/astaxie/beego/logs" - "github.com/astaxie/beego/utils" + "github.com/beego/beego/grace" + "github.com/beego/beego/logs" + "github.com/beego/beego/utils" "golang.org/x/crypto/acme/autocert" ) diff --git a/cache/README.md b/cache/README.md index b467760a..1c037c87 100644 --- a/cache/README.md +++ b/cache/README.md @@ -4,7 +4,7 @@ cache is a Go cache manager. It can use many cache adapters. The repo is inspire ## How to install? - go get github.com/astaxie/beego/cache + go get github.com/beego/beego/cache ## What adapters are supported? @@ -17,7 +17,7 @@ As of now this cache support memory, Memcache and Redis. First you must import it import ( - "github.com/astaxie/beego/cache" + "github.com/beego/beego/cache" ) Then init a Cache (example with memory adapter) diff --git a/cache/cache.go b/cache/cache.go index 82585c4e..1a492642 100644 --- a/cache/cache.go +++ b/cache/cache.go @@ -16,7 +16,7 @@ // Usage: // // import( -// "github.com/astaxie/beego/cache" +// "github.com/beego/beego/cache" // ) // // bm, err := cache.NewCache("memory", `{"interval":60}`) diff --git a/cache/memcache/memcache.go b/cache/memcache/memcache.go index 19116bfa..2f2f5a17 100644 --- a/cache/memcache/memcache.go +++ b/cache/memcache/memcache.go @@ -20,8 +20,8 @@ // // Usage: // import( -// _ "github.com/astaxie/beego/cache/memcache" -// "github.com/astaxie/beego/cache" +// _ "github.com/beego/beego/cache/memcache" +// "github.com/beego/beego/cache" // ) // // bm, err := cache.NewCache("memcache", `{"conn":"127.0.0.1:11211"}`) @@ -35,7 +35,7 @@ import ( "strings" "time" - "github.com/astaxie/beego/cache" + "github.com/beego/beego/cache" "github.com/bradfitz/gomemcache/memcache" ) diff --git a/cache/memcache/memcache_test.go b/cache/memcache/memcache_test.go index d9129b69..ee1240ca 100644 --- a/cache/memcache/memcache_test.go +++ b/cache/memcache/memcache_test.go @@ -21,7 +21,7 @@ import ( "testing" "time" - "github.com/astaxie/beego/cache" + "github.com/beego/beego/cache" ) func TestMemcacheCache(t *testing.T) { diff --git a/cache/redis/redis.go b/cache/redis/redis.go index dde760ea..06115aef 100644 --- a/cache/redis/redis.go +++ b/cache/redis/redis.go @@ -20,8 +20,8 @@ // // Usage: // import( -// _ "github.com/astaxie/beego/cache/redis" -// "github.com/astaxie/beego/cache" +// _ "github.com/beego/beego/cache/redis" +// "github.com/beego/beego/cache" // ) // // bm, err := cache.NewCache("redis", `{"conn":"127.0.0.1:11211"}`) @@ -40,7 +40,7 @@ import ( "strings" - "github.com/astaxie/beego/cache" + "github.com/beego/beego/cache" ) var ( diff --git a/cache/redis/redis_test.go b/cache/redis/redis_test.go index 7ac88f87..9ca11e71 100644 --- a/cache/redis/redis_test.go +++ b/cache/redis/redis_test.go @@ -19,7 +19,7 @@ import ( "testing" "time" - "github.com/astaxie/beego/cache" + "github.com/beego/beego/cache" "github.com/gomodule/redigo/redis" ) diff --git a/cache/ssdb/ssdb.go b/cache/ssdb/ssdb.go index fa2ce04b..ac857a54 100644 --- a/cache/ssdb/ssdb.go +++ b/cache/ssdb/ssdb.go @@ -9,7 +9,7 @@ import ( "github.com/ssdb/gossdb/ssdb" - "github.com/astaxie/beego/cache" + "github.com/beego/beego/cache" ) // Cache SSDB adapter diff --git a/cache/ssdb/ssdb_test.go b/cache/ssdb/ssdb_test.go index dd474960..6ae31269 100644 --- a/cache/ssdb/ssdb_test.go +++ b/cache/ssdb/ssdb_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/astaxie/beego/cache" + "github.com/beego/beego/cache" ) func TestSsdbcacheCache(t *testing.T) { diff --git a/config.go b/config.go index 7b06f9af..ffa89edd 100644 --- a/config.go +++ b/config.go @@ -24,11 +24,11 @@ import ( "runtime" "strings" - "github.com/astaxie/beego/config" - "github.com/astaxie/beego/context" - "github.com/astaxie/beego/logs" - "github.com/astaxie/beego/session" - "github.com/astaxie/beego/utils" + "github.com/beego/beego/config" + "github.com/beego/beego/context" + "github.com/beego/beego/logs" + "github.com/beego/beego/session" + "github.com/beego/beego/utils" ) // Config is the main struct for BConfig diff --git a/config/config.go b/config/config.go index bfd79e85..b115f0c9 100644 --- a/config/config.go +++ b/config/config.go @@ -14,7 +14,7 @@ // Package config is used to parse config. // Usage: -// import "github.com/astaxie/beego/config" +// import "github.com/beego/beego/config" //Examples. // // cnf, err := config.NewConfig("ini", "config.conf") diff --git a/config/env/env.go b/config/env/env.go index 34f094fe..6df66d51 100644 --- a/config/env/env.go +++ b/config/env/env.go @@ -21,7 +21,7 @@ import ( "os" "strings" - "github.com/astaxie/beego/utils" + "github.com/beego/beego/utils" ) var env *utils.BeeMap diff --git a/config/xml/xml.go b/config/xml/xml.go index 494242d3..7e151183 100644 --- a/config/xml/xml.go +++ b/config/xml/xml.go @@ -20,8 +20,8 @@ // // Usage: // import( -// _ "github.com/astaxie/beego/config/xml" -// "github.com/astaxie/beego/config" +// _ "github.com/beego/beego/config/xml" +// "github.com/beego/beego/config" // ) // // cnf, err := config.NewConfig("xml", "config.xml") @@ -39,7 +39,7 @@ import ( "strings" "sync" - "github.com/astaxie/beego/config" + "github.com/beego/beego/config" "github.com/beego/x2j" ) diff --git a/config/xml/xml_test.go b/config/xml/xml_test.go index 346c866e..85a4bb31 100644 --- a/config/xml/xml_test.go +++ b/config/xml/xml_test.go @@ -19,7 +19,7 @@ import ( "os" "testing" - "github.com/astaxie/beego/config" + "github.com/beego/beego/config" ) func TestXML(t *testing.T) { diff --git a/config/yaml/yaml.go b/config/yaml/yaml.go index a5644c7b..687385a7 100644 --- a/config/yaml/yaml.go +++ b/config/yaml/yaml.go @@ -20,8 +20,8 @@ // // Usage: // import( -// _ "github.com/astaxie/beego/config/yaml" -// "github.com/astaxie/beego/config" +// _ "github.com/beego/beego/config/yaml" +// "github.com/beego/beego/config" // ) // // cnf, err := config.NewConfig("yaml", "config.yaml") @@ -40,7 +40,7 @@ import ( "strings" "sync" - "github.com/astaxie/beego/config" + "github.com/beego/beego/config" "github.com/beego/goyaml2" ) diff --git a/config/yaml/yaml_test.go b/config/yaml/yaml_test.go index 49cc1d1e..6493eaac 100644 --- a/config/yaml/yaml_test.go +++ b/config/yaml/yaml_test.go @@ -19,7 +19,7 @@ import ( "os" "testing" - "github.com/astaxie/beego/config" + "github.com/beego/beego/config" ) func TestYaml(t *testing.T) { diff --git a/config_test.go b/config_test.go index 5f71f1c3..b791bff3 100644 --- a/config_test.go +++ b/config_test.go @@ -19,7 +19,7 @@ import ( "reflect" "testing" - "github.com/astaxie/beego/config" + "github.com/beego/beego/config" ) func TestDefaults(t *testing.T) { diff --git a/context/context.go b/context/context.go index e77ccbbe..bd83e825 100644 --- a/context/context.go +++ b/context/context.go @@ -15,7 +15,7 @@ // Package context provide the context utils // Usage: // -// import "github.com/astaxie/beego/context" +// import "github.com/beego/beego/context" // // ctx := context.Context{Request:req,ResponseWriter:rw} // @@ -35,7 +35,7 @@ import ( "strings" "time" - "github.com/astaxie/beego/utils" + "github.com/beego/beego/utils" ) //commonly used mime-types @@ -147,7 +147,7 @@ func (ctx *Context) SetSecureCookie(Secret, name, value string, others ...interf // XSRFToken creates a xsrf token string and returns. // others[0] bool secure // others[1] bool http-only -func (ctx *Context) XSRFToken(key string, expire int64, others...interface{}) string { +func (ctx *Context) XSRFToken(key string, expire int64, others ...interface{}) string { if ctx._xsrfToken == "" { token, ok := ctx.GetSecureCookie(key, "_xsrf") if !ok { @@ -157,7 +157,7 @@ func (ctx *Context) XSRFToken(key string, expire int64, others...interface{}) st secure = others[0].(bool) } httpOnly := false - if len(others) > 1{ + if len(others) > 1 { httpOnly = others[1].(bool) } ctx.SetSecureCookie(key, "_xsrf", token, expire, "", "", secure, httpOnly) diff --git a/context/input.go b/context/input.go index 385549c1..385cc85e 100644 --- a/context/input.go +++ b/context/input.go @@ -29,7 +29,7 @@ import ( "strings" "sync" - "github.com/astaxie/beego/session" + "github.com/beego/beego/session" ) // Regexes for checking the accept headers diff --git a/context/param/conv.go b/context/param/conv.go index c200e008..c1242042 100644 --- a/context/param/conv.go +++ b/context/param/conv.go @@ -4,8 +4,8 @@ import ( "fmt" "reflect" - beecontext "github.com/astaxie/beego/context" - "github.com/astaxie/beego/logs" + beecontext "github.com/beego/beego/context" + "github.com/beego/beego/logs" ) // ConvertParams converts http method params to values that will be passed to the method controller as arguments diff --git a/controller.go b/controller.go index c53ef2f3..27e6f133 100644 --- a/controller.go +++ b/controller.go @@ -28,9 +28,9 @@ import ( "strconv" "strings" - "github.com/astaxie/beego/context" - "github.com/astaxie/beego/context/param" - "github.com/astaxie/beego/session" + "github.com/beego/beego/context" + "github.com/beego/beego/context/param" + "github.com/beego/beego/session" ) var ( @@ -680,8 +680,7 @@ func (c *Controller) XSRFToken() string { if c.XSRFExpire > 0 { expire = int64(c.XSRFExpire) } - c._xsrfToken = c.Ctx.XSRFToken(BConfig.WebConfig.XSRFKey, expire, - BConfig.WebConfig.XSRFSecure, BConfig.WebConfig.XSRFHttpOnly) + c._xsrfToken = c.Ctx.XSRFToken(BConfig.WebConfig.XSRFKey, expire) } return c._xsrfToken } diff --git a/controller_test.go b/controller_test.go index a5888f62..30eedfdc 100644 --- a/controller_test.go +++ b/controller_test.go @@ -22,7 +22,7 @@ import ( "os" "path/filepath" - "github.com/astaxie/beego/context" + "github.com/beego/beego/context" ) func TestGetInt(t *testing.T) { diff --git a/doc.go b/doc.go index 8825bd29..cbbd2711 100644 --- a/doc.go +++ b/doc.go @@ -6,7 +6,7 @@ It is used for rapid development of RESTful APIs, web apps and backend services beego is inspired by Tornado, Sinatra and Flask with the added benefit of some Go-specific features such as interfaces and struct embedding. package main - import "github.com/astaxie/beego" + import "github.com/beego/beego" func main() { beego.Run() diff --git a/error.go b/error.go index f268f723..23e044d2 100644 --- a/error.go +++ b/error.go @@ -23,8 +23,8 @@ import ( "strconv" "strings" - "github.com/astaxie/beego/context" - "github.com/astaxie/beego/utils" + "github.com/beego/beego/context" + "github.com/beego/beego/utils" ) const ( diff --git a/filter.go b/filter.go index 9cc6e913..f4e74aaf 100644 --- a/filter.go +++ b/filter.go @@ -14,7 +14,7 @@ package beego -import "github.com/astaxie/beego/context" +import "github.com/beego/beego/context" // FilterFunc defines a filter function which is invoked before the controller handler is executed. type FilterFunc func(*context.Context) diff --git a/filter_test.go b/filter_test.go index 4ca4d2b8..673038b1 100644 --- a/filter_test.go +++ b/filter_test.go @@ -19,7 +19,7 @@ import ( "net/http/httptest" "testing" - "github.com/astaxie/beego/context" + "github.com/beego/beego/context" ) var FilterUser = func(ctx *context.Context) { diff --git a/go.mod b/go.mod index 93d603ff..27f065bb 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/astaxie/beego +module github.com/beego/beego require ( github.com/Knetic/govaluate v3.0.0+incompatible // indirect @@ -15,22 +15,18 @@ require ( github.com/go-redis/redis v6.14.2+incompatible github.com/go-sql-driver/mysql v1.5.0 github.com/gogo/protobuf v1.1.1 - github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db // indirect github.com/gomodule/redigo v2.0.0+incompatible github.com/hashicorp/golang-lru v0.5.4 github.com/ledisdb/ledisdb v0.0.0-20200510135210-d35789ec47e6 github.com/lib/pq v1.0.0 github.com/mattn/go-sqlite3 v2.0.3+incompatible - github.com/pelletier/go-toml v1.2.0 // indirect github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.7.0 github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 github.com/ssdb/gossdb v0.0.0-20180723034631-88f6b59b84ec github.com/stretchr/testify v1.4.0 - github.com/syndtr/goleveldb v0.0.0-20181127023241-353a9fca669c // indirect - github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b // indirect + github.com/wendal/errors v0.0.0-20181209125328-7f31f4b264ec // indirect golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad - golang.org/x/net v0.0.0-20190620200207-3b0461eec859 // indirect gopkg.in/yaml.v2 v2.2.8 ) diff --git a/go.sum b/go.sum index f70bc028..7d3d7774 100644 --- a/go.sum +++ b/go.sum @@ -24,18 +24,10 @@ github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58 h1:F1EaeKL/ta07PY/k9Os/UFtwERei2/XzGemhpGnBKNg= github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80= -github.com/couchbase/go-couchbase v0.0.0-20200519150804-63f3cdb75e0d h1:OMrhQqj1QCyDT2sxHCDjE+k8aMdn2ngTCGG7g4wrdLo= -github.com/couchbase/go-couchbase v0.0.0-20200519150804-63f3cdb75e0d/go.mod h1:TWI8EKQMs5u5jLKW/tsb9VwauIrMIxQG1r5fMsswK5U= github.com/couchbase/go-couchbase v0.0.0-20201216133707-c04035124b17 h1:1ZELwRDUvpBpmgKSIUP6VMW1jIehzD0sCdWxRyejegw= github.com/couchbase/go-couchbase v0.0.0-20201216133707-c04035124b17/go.mod h1:+/bddYDxXsf9qt0xpDUtRR47A2GjaXmGGAqQ/k3GJ8A= -github.com/couchbase/gomemcached v0.0.0-20200526233749-ec430f949808 h1:8s2l8TVUwMXl6tZMe3+hPCRJ25nQXiA3d1x622JtOqc= -github.com/couchbase/gomemcached v0.0.0-20200526233749-ec430f949808/go.mod h1:srVSlQLB8iXBVXHgnqemxUXqN6FCvClgCMPCsjBDR7c= -github.com/couchbase/gomemcached v0.1.1 h1:xCS8ZglJDhrlQg3jmK7Rn1V8f7bPjXABLC05CgLQauc= -github.com/couchbase/gomemcached v0.1.1/go.mod h1:mxliKQxOv84gQ0bJWbI+w9Wxdpt9HjDvgW9MjCym5Vo= github.com/couchbase/gomemcached v0.1.2-0.20201224031647-c432ccf49f32 h1:xnKbM9umdDcpWfEsJzVqRf5PGnIMbiZj2OmDYbleQjM= github.com/couchbase/gomemcached v0.1.2-0.20201224031647-c432ccf49f32/go.mod h1:mxliKQxOv84gQ0bJWbI+w9Wxdpt9HjDvgW9MjCym5Vo= -github.com/couchbase/goutils v0.0.0-20180530154633-e865a1461c8a h1:Y5XsLCEhtEI8qbD9RP3Qlv5FXdTDHxZM9UPUnMRgBp8= -github.com/couchbase/goutils v0.0.0-20180530154633-e865a1461c8a/go.mod h1:BQwMFlJzDjFDG3DJUdU0KORxn88UlsOULuxLExMh3Hs= github.com/couchbase/goutils v0.0.0-20210118111533-e33d3ffb5401 h1:4KDlx3vjalrHD/EfsjCpV91HNX3JPaIqRtt83zZ7x+Y= github.com/couchbase/goutils v0.0.0-20210118111533-e33d3ffb5401/go.mod h1:BQwMFlJzDjFDG3DJUdU0KORxn88UlsOULuxLExMh3Hs= github.com/cupcake/rdb v0.0.0-20161107195141-43ba34106c76 h1:Lgdd/Qp96Qj8jqLpq2cI1I1X7BJnu06efS+XkhRoLUQ= @@ -74,9 +66,8 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/snappy v0.0.0-20170215233205-553a64147049 h1:K9KHZbXKpGydfDN0aZrsoHpLJlZsBrGMFWbgLDGnPZk= github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomodule/redigo v2.0.0+incompatible h1:K/R+8tc58AaqLkqG2Ol3Qk+DR/TlNuhuh457pBFPtt0= github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -117,9 +108,8 @@ github.com/onsi/ginkgo v1.12.0 h1:Iw5WCbBcaAAd0fpRb1c9r5YCylv4XDoCSigm1zLevwU= github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/gomega v1.7.1 h1:K0jcRCwNQM3vFGh1ppMtDh/+7ApJrjldlX8fA0jDTLQ= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/pelletier/go-toml v1.0.1 h1:0nx4vKBl23+hEaCOV1mFhKS9vhhBtFYWC7rQY0vJAyE= github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/peterh/liner v1.0.1-0.20171122030339-3681c2a91233/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -159,25 +149,21 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/syndtr/goleveldb v0.0.0-20160425020131-cfa635847112 h1:NBrpnvz0pDPf3+HXZ1C9GcJd1DTpWDLcLWZhNq6uP7o= github.com/syndtr/goleveldb v0.0.0-20160425020131-cfa635847112/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= -github.com/syndtr/goleveldb v0.0.0-20181127023241-353a9fca669c h1:3eGShk3EQf5gJCYW+WzA0TEJQd37HLOmlYF7N0YJwv0= -github.com/syndtr/goleveldb v0.0.0-20181127023241-353a9fca669c/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= github.com/ugorji/go v0.0.0-20171122102828-84cb69a8af83/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= -github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b h1:0Ve0/CCjiAiyKddUMUn3RwIGlq2iTW4GuVzyoKBYO/8= -github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b/go.mod h1:Q12BUT7DqIlHRmgv3RskH+UCM/4eqVMgI0EMmlSpAXc= +github.com/wendal/errors v0.0.0-20181209125328-7f31f4b264ec h1:bua919NvciYmjqfeZMsVkXTny1QvXMrri0X6NlqILRs= +github.com/wendal/errors v0.0.0-20181209125328-7f31f4b264ec/go.mod h1:Q12BUT7DqIlHRmgv3RskH+UCM/4eqVMgI0EMmlSpAXc= github.com/yuin/gopher-lua v0.0.0-20171031051903-609c9cd26973/go.mod h1:aEV29XrmTYFr3CiRxZeGHpkvbwq+prZduBqMaascyCU= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowKpJ8y4AmooUzdBSR9GU= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -186,7 +172,6 @@ golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/grace/grace.go b/grace/grace.go index fb0cb7bb..3e396ea8 100644 --- a/grace/grace.go +++ b/grace/grace.go @@ -22,7 +22,7 @@ // "net/http" // "os" // -// "github.com/astaxie/beego/grace" +// "github.com/beego/beego/grace" // ) // // func handler(w http.ResponseWriter, r *http.Request) { diff --git a/hooks.go b/hooks.go index 0a51e0da..dd1cefa6 100644 --- a/hooks.go +++ b/hooks.go @@ -6,9 +6,9 @@ import ( "net/http" "path/filepath" - "github.com/astaxie/beego/context" - "github.com/astaxie/beego/logs" - "github.com/astaxie/beego/session" + "github.com/beego/beego/context" + "github.com/beego/beego/logs" + "github.com/beego/beego/session" ) // register MIME type with content type diff --git a/httplib/README.md b/httplib/README.md index 97df8e6b..3a3042da 100644 --- a/httplib/README.md +++ b/httplib/README.md @@ -6,7 +6,7 @@ httplib is an libs help you to curl remote url. ## GET you can use Get to crawl data. - import "github.com/astaxie/beego/httplib" + import "github.com/beego/beego/httplib" str, err := httplib.Get("http://beego.me/").String() if err != nil { @@ -94,4 +94,4 @@ httplib support mutil file upload, use `req.PostFile()` See godoc for further documentation and examples. -* [godoc.org/github.com/astaxie/beego/httplib](https://godoc.org/github.com/astaxie/beego/httplib) +* [godoc.org/github.com/beego/beego/httplib](https://godoc.org/github.com/beego/beego/httplib) diff --git a/httplib/httplib.go b/httplib/httplib.go index 17493970..8f5eb100 100644 --- a/httplib/httplib.go +++ b/httplib/httplib.go @@ -15,7 +15,7 @@ // Package httplib is used as http.Client // Usage: // -// import "github.com/astaxie/beego/httplib" +// import "github.com/beego/beego/httplib" // // b := httplib.Post("http://beego.me/") // b.Param("username","astaxie") diff --git a/log.go b/log.go index cc4c0f81..27ea86ba 100644 --- a/log.go +++ b/log.go @@ -17,11 +17,11 @@ package beego import ( "strings" - "github.com/astaxie/beego/logs" + "github.com/beego/beego/logs" ) // Log levels to control the logging output. -// Deprecated: use github.com/astaxie/beego/logs instead. +// Deprecated: use github.com/beego/beego/logs instead. const ( LevelEmergency = iota LevelAlert @@ -34,90 +34,90 @@ const ( ) // BeeLogger references the used application logger. -// Deprecated: use github.com/astaxie/beego/logs instead. +// Deprecated: use github.com/beego/beego/logs instead. var BeeLogger = logs.GetBeeLogger() // SetLevel sets the global log level used by the simple logger. -// Deprecated: use github.com/astaxie/beego/logs instead. +// Deprecated: use github.com/beego/beego/logs instead. func SetLevel(l int) { logs.SetLevel(l) } // SetLogFuncCall set the CallDepth, default is 3 -// Deprecated: use github.com/astaxie/beego/logs instead. +// Deprecated: use github.com/beego/beego/logs instead. func SetLogFuncCall(b bool) { logs.SetLogFuncCall(b) } // SetLogger sets a new logger. -// Deprecated: use github.com/astaxie/beego/logs instead. +// Deprecated: use github.com/beego/beego/logs instead. func SetLogger(adaptername string, config string) error { return logs.SetLogger(adaptername, config) } // Emergency logs a message at emergency level. -// Deprecated: use github.com/astaxie/beego/logs instead. +// Deprecated: use github.com/beego/beego/logs instead. func Emergency(v ...interface{}) { logs.Emergency(generateFmtStr(len(v)), v...) } // Alert logs a message at alert level. -// Deprecated: use github.com/astaxie/beego/logs instead. +// Deprecated: use github.com/beego/beego/logs instead. func Alert(v ...interface{}) { logs.Alert(generateFmtStr(len(v)), v...) } // Critical logs a message at critical level. -// Deprecated: use github.com/astaxie/beego/logs instead. +// Deprecated: use github.com/beego/beego/logs instead. func Critical(v ...interface{}) { logs.Critical(generateFmtStr(len(v)), v...) } // Error logs a message at error level. -// Deprecated: use github.com/astaxie/beego/logs instead. +// Deprecated: use github.com/beego/beego/logs instead. func Error(v ...interface{}) { logs.Error(generateFmtStr(len(v)), v...) } // Warning logs a message at warning level. -// Deprecated: use github.com/astaxie/beego/logs instead. +// Deprecated: use github.com/beego/beego/logs instead. func Warning(v ...interface{}) { logs.Warning(generateFmtStr(len(v)), v...) } // Warn compatibility alias for Warning() -// Deprecated: use github.com/astaxie/beego/logs instead. +// Deprecated: use github.com/beego/beego/logs instead. func Warn(v ...interface{}) { logs.Warn(generateFmtStr(len(v)), v...) } // Notice logs a message at notice level. -// Deprecated: use github.com/astaxie/beego/logs instead. +// Deprecated: use github.com/beego/beego/logs instead. func Notice(v ...interface{}) { logs.Notice(generateFmtStr(len(v)), v...) } // Informational logs a message at info level. -// Deprecated: use github.com/astaxie/beego/logs instead. +// Deprecated: use github.com/beego/beego/logs instead. func Informational(v ...interface{}) { logs.Informational(generateFmtStr(len(v)), v...) } // Info compatibility alias for Warning() -// Deprecated: use github.com/astaxie/beego/logs instead. +// Deprecated: use github.com/beego/beego/logs instead. func Info(v ...interface{}) { logs.Info(generateFmtStr(len(v)), v...) } // Debug logs a message at debug level. -// Deprecated: use github.com/astaxie/beego/logs instead. +// Deprecated: use github.com/beego/beego/logs instead. func Debug(v ...interface{}) { logs.Debug(generateFmtStr(len(v)), v...) } // Trace logs a message at trace level. // compatibility alias for Warning() -// Deprecated: use github.com/astaxie/beego/logs instead. +// Deprecated: use github.com/beego/beego/logs instead. func Trace(v ...interface{}) { logs.Trace(generateFmtStr(len(v)), v...) } diff --git a/logs/README.md b/logs/README.md index c05bcc04..660b1fe1 100644 --- a/logs/README.md +++ b/logs/README.md @@ -4,7 +4,7 @@ logs is a Go logs manager. It can use many logs adapters. The repo is inspired b ## How to install? - go get github.com/astaxie/beego/logs + go get github.com/beego/beego/logs ## What adapters are supported? @@ -18,7 +18,7 @@ First you must import it ```golang import ( - "github.com/astaxie/beego/logs" + "github.com/beego/beego/logs" ) ``` diff --git a/logs/alils/alils.go b/logs/alils/alils.go index 867ff4cb..ff92a715 100644 --- a/logs/alils/alils.go +++ b/logs/alils/alils.go @@ -6,7 +6,7 @@ import ( "sync" "time" - "github.com/astaxie/beego/logs" + "github.com/beego/beego/logs" "github.com/gogo/protobuf/proto" ) diff --git a/logs/es/es.go b/logs/es/es.go index 2b7b1710..add47670 100644 --- a/logs/es/es.go +++ b/logs/es/es.go @@ -12,7 +12,7 @@ import ( "github.com/elastic/go-elasticsearch/v6" "github.com/elastic/go-elasticsearch/v6/esapi" - "github.com/astaxie/beego/logs" + "github.com/beego/beego/logs" ) // NewES return a LoggerInterface @@ -28,7 +28,7 @@ func NewES() logs.Logger { // please import this package // usually means that you can import this package in your main package // for example, anonymous: -// import _ "github.com/astaxie/beego/logs/es" +// import _ "github.com/beego/beego/logs/es" type esLogger struct { *elasticsearch.Client DSN string `json:"dsn"` diff --git a/logs/log.go b/logs/log.go index 39c006d2..17bdc8d6 100644 --- a/logs/log.go +++ b/logs/log.go @@ -15,7 +15,7 @@ // Package logs provide a general log interface // Usage: // -// import "github.com/astaxie/beego/logs" +// import "github.com/beego/beego/logs" // // log := NewLogger(10000) // log.SetLogger("console", "") diff --git a/metric/prometheus.go b/metric/prometheus.go index fac50f87..fbb58d47 100644 --- a/metric/prometheus.go +++ b/metric/prometheus.go @@ -23,8 +23,8 @@ import ( "github.com/prometheus/client_golang/prometheus" - "github.com/astaxie/beego" - "github.com/astaxie/beego/logs" + "github.com/beego/beego" + "github.com/beego/beego/logs" ) func PrometheusMiddleWare(next http.Handler) http.Handler { diff --git a/metric/prometheus_test.go b/metric/prometheus_test.go index fd722245..e6cc5ced 100644 --- a/metric/prometheus_test.go +++ b/metric/prometheus_test.go @@ -22,7 +22,7 @@ import ( "github.com/prometheus/client_golang/prometheus" - "github.com/astaxie/beego/context" + "github.com/beego/beego/context" ) func TestPrometheusMiddleWare(t *testing.T) { diff --git a/migration/ddl.go b/migration/ddl.go index cd2c1c49..e4551f3e 100644 --- a/migration/ddl.go +++ b/migration/ddl.go @@ -17,7 +17,7 @@ package migration import ( "fmt" - "github.com/astaxie/beego/logs" + "github.com/beego/beego/logs" ) // Index struct defines the structure of Index Columns diff --git a/migration/migration.go b/migration/migration.go index 5ddfd972..a6fc5781 100644 --- a/migration/migration.go +++ b/migration/migration.go @@ -33,8 +33,8 @@ import ( "strings" "time" - "github.com/astaxie/beego/logs" - "github.com/astaxie/beego/orm" + "github.com/beego/beego/logs" + "github.com/beego/beego/orm" ) // const the data format for the bee generate migration datatype diff --git a/namespace.go b/namespace.go index 4952c9d5..8f21dbb9 100644 --- a/namespace.go +++ b/namespace.go @@ -18,7 +18,7 @@ import ( "net/http" "strings" - beecontext "github.com/astaxie/beego/context" + beecontext "github.com/beego/beego/context" ) type namespaceCond func(*beecontext.Context) bool @@ -97,91 +97,91 @@ func (n *Namespace) Filter(action string, filter ...FilterFunc) *Namespace { } // Router same as beego.Rourer -// refer: https://godoc.org/github.com/astaxie/beego#Router +// refer: https://godoc.org/github.com/beego/beego#Router func (n *Namespace) Router(rootpath string, c ControllerInterface, mappingMethods ...string) *Namespace { n.handlers.Add(rootpath, c, mappingMethods...) return n } // AutoRouter same as beego.AutoRouter -// refer: https://godoc.org/github.com/astaxie/beego#AutoRouter +// refer: https://godoc.org/github.com/beego/beego#AutoRouter func (n *Namespace) AutoRouter(c ControllerInterface) *Namespace { n.handlers.AddAuto(c) return n } // AutoPrefix same as beego.AutoPrefix -// refer: https://godoc.org/github.com/astaxie/beego#AutoPrefix +// refer: https://godoc.org/github.com/beego/beego#AutoPrefix func (n *Namespace) AutoPrefix(prefix string, c ControllerInterface) *Namespace { n.handlers.AddAutoPrefix(prefix, c) return n } // Get same as beego.Get -// refer: https://godoc.org/github.com/astaxie/beego#Get +// refer: https://godoc.org/github.com/beego/beego#Get func (n *Namespace) Get(rootpath string, f FilterFunc) *Namespace { n.handlers.Get(rootpath, f) return n } // Post same as beego.Post -// refer: https://godoc.org/github.com/astaxie/beego#Post +// refer: https://godoc.org/github.com/beego/beego#Post func (n *Namespace) Post(rootpath string, f FilterFunc) *Namespace { n.handlers.Post(rootpath, f) return n } // Delete same as beego.Delete -// refer: https://godoc.org/github.com/astaxie/beego#Delete +// refer: https://godoc.org/github.com/beego/beego#Delete func (n *Namespace) Delete(rootpath string, f FilterFunc) *Namespace { n.handlers.Delete(rootpath, f) return n } // Put same as beego.Put -// refer: https://godoc.org/github.com/astaxie/beego#Put +// refer: https://godoc.org/github.com/beego/beego#Put func (n *Namespace) Put(rootpath string, f FilterFunc) *Namespace { n.handlers.Put(rootpath, f) return n } // Head same as beego.Head -// refer: https://godoc.org/github.com/astaxie/beego#Head +// refer: https://godoc.org/github.com/beego/beego#Head func (n *Namespace) Head(rootpath string, f FilterFunc) *Namespace { n.handlers.Head(rootpath, f) return n } // Options same as beego.Options -// refer: https://godoc.org/github.com/astaxie/beego#Options +// refer: https://godoc.org/github.com/beego/beego#Options func (n *Namespace) Options(rootpath string, f FilterFunc) *Namespace { n.handlers.Options(rootpath, f) return n } // Patch same as beego.Patch -// refer: https://godoc.org/github.com/astaxie/beego#Patch +// refer: https://godoc.org/github.com/beego/beego#Patch func (n *Namespace) Patch(rootpath string, f FilterFunc) *Namespace { n.handlers.Patch(rootpath, f) return n } // Any same as beego.Any -// refer: https://godoc.org/github.com/astaxie/beego#Any +// refer: https://godoc.org/github.com/beego/beego#Any func (n *Namespace) Any(rootpath string, f FilterFunc) *Namespace { n.handlers.Any(rootpath, f) return n } // Handler same as beego.Handler -// refer: https://godoc.org/github.com/astaxie/beego#Handler +// refer: https://godoc.org/github.com/beego/beego#Handler func (n *Namespace) Handler(rootpath string, h http.Handler) *Namespace { n.handlers.Handler(rootpath, h) return n } // Include add include class -// refer: https://godoc.org/github.com/astaxie/beego#Include +// refer: https://godoc.org/github.com/beego/beego#Include func (n *Namespace) Include(cList ...ControllerInterface) *Namespace { n.handlers.Include(cList...) return n diff --git a/namespace_test.go b/namespace_test.go index b3f20dff..68a854b6 100644 --- a/namespace_test.go +++ b/namespace_test.go @@ -20,7 +20,7 @@ import ( "strconv" "testing" - "github.com/astaxie/beego/context" + "github.com/beego/beego/context" ) func TestNamespaceGet(t *testing.T) { diff --git a/orm/README.md b/orm/README.md index 6e808d2a..d3ef8362 100644 --- a/orm/README.md +++ b/orm/README.md @@ -1,6 +1,6 @@ # beego orm -[![Build Status](https://drone.io/github.com/astaxie/beego/status.png)](https://drone.io/github.com/astaxie/beego/latest) +[![Build Status](https://drone.io/github.com/beego/beego/status.png)](https://drone.io/github.com/beego/beego/latest) A powerful orm framework for go. @@ -27,7 +27,7 @@ more features please read the docs **Install:** - go get github.com/astaxie/beego/orm + go get github.com/beego/beego/orm ## Changelog @@ -45,7 +45,7 @@ package main import ( "fmt" - "github.com/astaxie/beego/orm" + "github.com/beego/beego/orm" _ "github.com/go-sql-driver/mysql" // import your used driver ) diff --git a/orm/models_info_f.go b/orm/models_info_f.go index 7044b0bd..970bbbfa 100644 --- a/orm/models_info_f.go +++ b/orm/models_info_f.go @@ -193,7 +193,7 @@ checkType: } fieldType = f.FieldType() if fieldType&IsRelField > 0 { - err = fmt.Errorf("unsupport type custom field, please refer to https://github.com/astaxie/beego/blob/master/orm/models_fields.go#L24-L42") + err = fmt.Errorf("unsupport type custom field, please refer to https://github.com/beego/beego/blob/master/orm/models_fields.go#L24-L42") goto end } default: diff --git a/orm/models_test.go b/orm/models_test.go index 05f438ea..a3dc625a 100644 --- a/orm/models_test.go +++ b/orm/models_test.go @@ -301,7 +301,7 @@ type Post struct { Content string `orm:"type(text)"` Created time.Time `orm:"auto_now_add"` Updated time.Time `orm:"auto_now"` - Tags []*Tag `orm:"rel(m2m);rel_through(github.com/astaxie/beego/orm.PostTags)"` + Tags []*Tag `orm:"rel(m2m);rel_through(github.com/beego/beego/orm.PostTags)"` } func (u *Post) TableIndex() [][]string { @@ -359,7 +359,7 @@ type Group struct { type Permission struct { ID int `orm:"column(id)"` Name string - Groups []*Group `orm:"rel(m2m);rel_through(github.com/astaxie/beego/orm.GroupPermissions)"` + Groups []*Group `orm:"rel(m2m);rel_through(github.com/beego/beego/orm.GroupPermissions)"` } type GroupPermissions struct { @@ -454,7 +454,7 @@ var ( usage: - go get -u github.com/astaxie/beego/orm + go get -u github.com/beego/beego/orm go get -u github.com/go-sql-driver/mysql go get -u github.com/mattn/go-sqlite3 go get -u github.com/lib/pq @@ -464,25 +464,25 @@ var ( mysql -u root -e 'create database orm_test;' export ORM_DRIVER=mysql export ORM_SOURCE="root:@/orm_test?charset=utf8" - go test -v github.com/astaxie/beego/orm + go test -v github.com/beego/beego/orm #### Sqlite3 export ORM_DRIVER=sqlite3 export ORM_SOURCE='file:memory_test?mode=memory' - go test -v github.com/astaxie/beego/orm + go test -v github.com/beego/beego/orm #### PostgreSQL psql -c 'create database orm_test;' -U postgres export ORM_DRIVER=postgres export ORM_SOURCE="user=postgres dbname=orm_test sslmode=disable" - go test -v github.com/astaxie/beego/orm + go test -v github.com/beego/beego/orm #### TiDB export ORM_DRIVER=tidb export ORM_SOURCE='memory://test/test' - go test -v github.com/astaxie/beego/orm + go test -v github.com/beego/beego/orm ` ) diff --git a/orm/orm.go b/orm/orm.go index 0551b1cd..1a4bb9b6 100644 --- a/orm/orm.go +++ b/orm/orm.go @@ -21,7 +21,7 @@ // // import ( // "fmt" -// "github.com/astaxie/beego/orm" +// "github.com/beego/beego/orm" // _ "github.com/go-sql-driver/mysql" // import your used driver // ) // diff --git a/parser.go b/parser.go index 9137a749..de4ce8dc 100644 --- a/parser.go +++ b/parser.go @@ -30,16 +30,16 @@ import ( "strings" "unicode" - "github.com/astaxie/beego/context/param" - "github.com/astaxie/beego/logs" - "github.com/astaxie/beego/utils" + "github.com/beego/beego/context/param" + "github.com/beego/beego/logs" + "github.com/beego/beego/utils" ) var globalRouterTemplate = `package {{.routersDir}} import ( - "github.com/astaxie/beego" - "github.com/astaxie/beego/context/param"{{.globalimport}} + "github.com/beego/beego" + "github.com/beego/beego/context/param"{{.globalimport}} ) func init() { @@ -69,7 +69,7 @@ var ( } ) -const commentFilename = "commentsRouter.go" +const commentFilename = "commentsRouter.go" func init() { pkgLastupdate = make(map[string]int64) diff --git a/plugins/apiauth/apiauth.go b/plugins/apiauth/apiauth.go index 10e25f3f..1ccce527 100644 --- a/plugins/apiauth/apiauth.go +++ b/plugins/apiauth/apiauth.go @@ -16,8 +16,8 @@ // // Simple Usage: // import( -// "github.com/astaxie/beego" -// "github.com/astaxie/beego/plugins/apiauth" +// "github.com/beego/beego" +// "github.com/beego/beego/plugins/apiauth" // ) // // func main(){ @@ -65,8 +65,8 @@ import ( "sort" "time" - "github.com/astaxie/beego" - "github.com/astaxie/beego/context" + "github.com/beego/beego" + "github.com/beego/beego/context" ) // AppIDToAppSecret is used to get appsecret throw appid diff --git a/plugins/auth/basic.go b/plugins/auth/basic.go index c478044a..0f25ccc9 100644 --- a/plugins/auth/basic.go +++ b/plugins/auth/basic.go @@ -15,8 +15,8 @@ // Package auth provides handlers to enable basic auth support. // Simple Usage: // import( -// "github.com/astaxie/beego" -// "github.com/astaxie/beego/plugins/auth" +// "github.com/beego/beego" +// "github.com/beego/beego/plugins/auth" // ) // // func main(){ @@ -40,8 +40,8 @@ import ( "net/http" "strings" - "github.com/astaxie/beego" - "github.com/astaxie/beego/context" + "github.com/beego/beego" + "github.com/beego/beego/context" ) var defaultRealm = "Authorization Required" diff --git a/plugins/authz/authz.go b/plugins/authz/authz.go index 879fdea6..5520fdb4 100644 --- a/plugins/authz/authz.go +++ b/plugins/authz/authz.go @@ -15,8 +15,8 @@ // Package authz provides handlers to enable ACL, RBAC, ABAC authorization support. // Simple Usage: // import( -// "github.com/astaxie/beego" -// "github.com/astaxie/beego/plugins/authz" +// "github.com/beego/beego" +// "github.com/beego/beego/plugins/authz" // "github.com/casbin/casbin" // ) // @@ -42,8 +42,8 @@ package authz import ( "net/http" - "github.com/astaxie/beego" - "github.com/astaxie/beego/context" + "github.com/beego/beego" + "github.com/beego/beego/context" "github.com/casbin/casbin" ) diff --git a/plugins/authz/authz_test.go b/plugins/authz/authz_test.go index e9d397a2..4f211a00 100644 --- a/plugins/authz/authz_test.go +++ b/plugins/authz/authz_test.go @@ -19,9 +19,9 @@ import ( "net/http/httptest" "testing" - "github.com/astaxie/beego" - "github.com/astaxie/beego/context" - "github.com/astaxie/beego/plugins/auth" + "github.com/beego/beego" + "github.com/beego/beego/context" + "github.com/beego/beego/plugins/auth" "github.com/casbin/casbin" ) diff --git a/plugins/cors/cors.go b/plugins/cors/cors.go index 45c327ab..279f0abc 100644 --- a/plugins/cors/cors.go +++ b/plugins/cors/cors.go @@ -15,8 +15,8 @@ // Package cors provides handlers to enable CORS support. // Usage // import ( -// "github.com/astaxie/beego" -// "github.com/astaxie/beego/plugins/cors" +// "github.com/beego/beego" +// "github.com/beego/beego/plugins/cors" // ) // // func main() { @@ -42,8 +42,8 @@ import ( "strings" "time" - "github.com/astaxie/beego" - "github.com/astaxie/beego/context" + "github.com/beego/beego" + "github.com/beego/beego/context" ) const ( diff --git a/plugins/cors/cors_test.go b/plugins/cors/cors_test.go index 34039143..2587015e 100644 --- a/plugins/cors/cors_test.go +++ b/plugins/cors/cors_test.go @@ -21,8 +21,8 @@ import ( "testing" "time" - "github.com/astaxie/beego" - "github.com/astaxie/beego/context" + "github.com/beego/beego" + "github.com/beego/beego/context" ) // HTTPHeaderGuardRecorder is httptest.ResponseRecorder with own http.Header diff --git a/policy.go b/policy.go index ab23f927..58222885 100644 --- a/policy.go +++ b/policy.go @@ -17,7 +17,7 @@ package beego import ( "strings" - "github.com/astaxie/beego/context" + "github.com/beego/beego/context" ) // PolicyFunc defines a policy function which is invoked before the controller handler is executed. diff --git a/router.go b/router.go index a993a1af..df8e89dc 100644 --- a/router.go +++ b/router.go @@ -27,11 +27,11 @@ import ( "sync" "time" - beecontext "github.com/astaxie/beego/context" - "github.com/astaxie/beego/context/param" - "github.com/astaxie/beego/logs" - "github.com/astaxie/beego/toolbox" - "github.com/astaxie/beego/utils" + beecontext "github.com/beego/beego/context" + "github.com/beego/beego/context/param" + "github.com/beego/beego/logs" + "github.com/beego/beego/toolbox" + "github.com/beego/beego/utils" ) // default filter execution points diff --git a/router_test.go b/router_test.go index 8ec7927a..dd2aa82a 100644 --- a/router_test.go +++ b/router_test.go @@ -21,8 +21,8 @@ import ( "strings" "testing" - "github.com/astaxie/beego/context" - "github.com/astaxie/beego/logs" + "github.com/beego/beego/context" + "github.com/beego/beego/logs" ) type TestController struct { diff --git a/scripts/gobuild.sh b/scripts/gobuild.sh index 031eafc2..fd11e75d 100755 --- a/scripts/gobuild.sh +++ b/scripts/gobuild.sh @@ -86,9 +86,9 @@ CURRENT_BRANCH=${CURRENT_BRANCH:2} BUILD_TIME=$(date +%Y-%m-%d--%T) -LD_EXTRAFLAGS="${LD_EXTRAFLAGS} -X github.com/astaxie/beego.GoVersion=${go_version[2]:2}" -LD_EXTRAFLAGS="${LD_EXTRAFLAGS} -X github.com/astaxie/beego.GitBranch=${CURRENT_BRANCH}" -LD_EXTRAFLAGS="${LD_EXTRAFLAGS} -X github.com/astaxie/beego.BuildTime=$BUILD_TIME" +LD_EXTRAFLAGS="${LD_EXTRAFLAGS} -X github.com/beego/beego.GoVersion=${go_version[2]:2}" +LD_EXTRAFLAGS="${LD_EXTRAFLAGS} -X github.com/beego/beego.GitBranch=${CURRENT_BRANCH}" +LD_EXTRAFLAGS="${LD_EXTRAFLAGS} -X github.com/beego/beego.BuildTime=$BUILD_TIME" OPTIMIZATION_FLAGS="-trimpath" if [ "${DEBUG}" == "1" ]; then diff --git a/scripts/report_build_info.sh b/scripts/report_build_info.sh index 65ba3748..34954d79 100755 --- a/scripts/report_build_info.sh +++ b/scripts/report_build_info.sh @@ -46,7 +46,7 @@ fi GIT_DESCRIBE_TAG=$(git describe --tags) -echo "github.com/astaxie/beego.BuildVersion=${VERSION}" -echo "github.com/astaxie/beego.BuildGitRevision=${BUILD_GIT_REVISION}" -echo "github.com/astaxie/beego.BuildStatus=${tree_status}" -echo "github.com/astaxie/beego.BuildTag=${GIT_DESCRIBE_TAG}" \ No newline at end of file +echo "github.com/beego/beego.BuildVersion=${VERSION}" +echo "github.com/beego/beego.BuildGitRevision=${BUILD_GIT_REVISION}" +echo "github.com/beego/beego.BuildStatus=${tree_status}" +echo "github.com/beego/beego.BuildTag=${GIT_DESCRIBE_TAG}" \ No newline at end of file diff --git a/session/README.md b/session/README.md index 6d0a297e..a7cd5fa1 100644 --- a/session/README.md +++ b/session/README.md @@ -5,7 +5,7 @@ session is a Go session manager. It can use many session providers. Just like th ## How to install? - go get github.com/astaxie/beego/session + go get github.com/beego/beego/session ## What providers are supported? @@ -18,7 +18,7 @@ As of now this session manager support memory, file, Redis and MySQL. First you must import it import ( - "github.com/astaxie/beego/session" + "github.com/beego/beego/session" ) Then in you web app init the global session manager diff --git a/session/couchbase/sess_couchbase.go b/session/couchbase/sess_couchbase.go index 707d042c..eea9f567 100644 --- a/session/couchbase/sess_couchbase.go +++ b/session/couchbase/sess_couchbase.go @@ -20,8 +20,8 @@ // // Usage: // import( -// _ "github.com/astaxie/beego/session/couchbase" -// "github.com/astaxie/beego/session" +// _ "github.com/beego/beego/session/couchbase" +// "github.com/beego/beego/session" // ) // // func init() { @@ -39,7 +39,7 @@ import ( couchbase "github.com/couchbase/go-couchbase" - "github.com/astaxie/beego/session" + "github.com/beego/beego/session" ) var couchbpder = &Provider{} diff --git a/session/ledis/ledis_session.go b/session/ledis/ledis_session.go index ee81df67..98e6b627 100644 --- a/session/ledis/ledis_session.go +++ b/session/ledis/ledis_session.go @@ -10,7 +10,7 @@ import ( "github.com/ledisdb/ledisdb/config" "github.com/ledisdb/ledisdb/ledis" - "github.com/astaxie/beego/session" + "github.com/beego/beego/session" ) var ( diff --git a/session/memcache/sess_memcache.go b/session/memcache/sess_memcache.go index 85a2d815..3d529173 100644 --- a/session/memcache/sess_memcache.go +++ b/session/memcache/sess_memcache.go @@ -20,8 +20,8 @@ // // Usage: // import( -// _ "github.com/astaxie/beego/session/memcache" -// "github.com/astaxie/beego/session" +// _ "github.com/beego/beego/session/memcache" +// "github.com/beego/beego/session" // ) // // func init() { @@ -37,7 +37,7 @@ import ( "strings" "sync" - "github.com/astaxie/beego/session" + "github.com/beego/beego/session" "github.com/bradfitz/gomemcache/memcache" ) diff --git a/session/mysql/sess_mysql.go b/session/mysql/sess_mysql.go index 301353ab..a19f74b5 100644 --- a/session/mysql/sess_mysql.go +++ b/session/mysql/sess_mysql.go @@ -28,8 +28,8 @@ // // Usage: // import( -// _ "github.com/astaxie/beego/session/mysql" -// "github.com/astaxie/beego/session" +// _ "github.com/beego/beego/session/mysql" +// "github.com/beego/beego/session" // ) // // func init() { @@ -46,7 +46,7 @@ import ( "sync" "time" - "github.com/astaxie/beego/session" + "github.com/beego/beego/session" // import mysql driver _ "github.com/go-sql-driver/mysql" ) diff --git a/session/postgres/sess_postgresql.go b/session/postgres/sess_postgresql.go index 0b8b9645..366415ee 100644 --- a/session/postgres/sess_postgresql.go +++ b/session/postgres/sess_postgresql.go @@ -38,8 +38,8 @@ // // Usage: // import( -// _ "github.com/astaxie/beego/session/postgresql" -// "github.com/astaxie/beego/session" +// _ "github.com/beego/beego/session/postgresql" +// "github.com/beego/beego/session" // ) // // func init() { @@ -56,7 +56,7 @@ import ( "sync" "time" - "github.com/astaxie/beego/session" + "github.com/beego/beego/session" // import postgresql Driver _ "github.com/lib/pq" ) diff --git a/session/redis/sess_redis.go b/session/redis/sess_redis.go index 5c382d61..a6aaa287 100644 --- a/session/redis/sess_redis.go +++ b/session/redis/sess_redis.go @@ -20,8 +20,8 @@ // // Usage: // import( -// _ "github.com/astaxie/beego/session/redis" -// "github.com/astaxie/beego/session" +// _ "github.com/beego/beego/session/redis" +// "github.com/beego/beego/session" // ) // // func init() { @@ -39,7 +39,7 @@ import ( "sync" "time" - "github.com/astaxie/beego/session" + "github.com/beego/beego/session" "github.com/gomodule/redigo/redis" ) diff --git a/session/redis_cluster/redis_cluster.go b/session/redis_cluster/redis_cluster.go index 802c1c39..1f60675c 100644 --- a/session/redis_cluster/redis_cluster.go +++ b/session/redis_cluster/redis_cluster.go @@ -20,8 +20,8 @@ // // Usage: // import( -// _ "github.com/astaxie/beego/session/redis_cluster" -// "github.com/astaxie/beego/session" +// _ "github.com/beego/beego/session/redis_cluster" +// "github.com/beego/beego/session" // ) // // func init() { @@ -39,7 +39,7 @@ import ( "sync" "time" - "github.com/astaxie/beego/session" + "github.com/beego/beego/session" rediss "github.com/go-redis/redis" ) diff --git a/session/redis_sentinel/sess_redis_sentinel.go b/session/redis_sentinel/sess_redis_sentinel.go index 29284d03..4bdd1939 100644 --- a/session/redis_sentinel/sess_redis_sentinel.go +++ b/session/redis_sentinel/sess_redis_sentinel.go @@ -20,8 +20,8 @@ // // Usage: // import( -// _ "github.com/astaxie/beego/session/redis_sentinel" -// "github.com/astaxie/beego/session" +// _ "github.com/beego/beego/session/redis_sentinel" +// "github.com/beego/beego/session" // ) // // func init() { @@ -39,7 +39,7 @@ import ( "sync" "time" - "github.com/astaxie/beego/session" + "github.com/beego/beego/session" "github.com/go-redis/redis" ) diff --git a/session/redis_sentinel/sess_redis_sentinel_test.go b/session/redis_sentinel/sess_redis_sentinel_test.go index fd4155c6..59735066 100644 --- a/session/redis_sentinel/sess_redis_sentinel_test.go +++ b/session/redis_sentinel/sess_redis_sentinel_test.go @@ -5,7 +5,7 @@ import ( "net/http/httptest" "testing" - "github.com/astaxie/beego/session" + "github.com/beego/beego/session" ) func TestRedisSentinel(t *testing.T) { diff --git a/session/sess_utils.go b/session/sess_utils.go index 20915bb6..a22ac630 100644 --- a/session/sess_utils.go +++ b/session/sess_utils.go @@ -29,7 +29,7 @@ import ( "strconv" "time" - "github.com/astaxie/beego/utils" + "github.com/beego/beego/utils" ) func init() { diff --git a/session/session.go b/session/session.go index 932e0915..b770473c 100644 --- a/session/session.go +++ b/session/session.go @@ -16,7 +16,7 @@ // // Usage: // import( -// "github.com/astaxie/beego/session" +// "github.com/beego/beego/session" // ) // // func init() { diff --git a/session/ssdb/sess_ssdb.go b/session/ssdb/sess_ssdb.go index de0c6360..cf21bf90 100644 --- a/session/ssdb/sess_ssdb.go +++ b/session/ssdb/sess_ssdb.go @@ -7,7 +7,7 @@ import ( "strings" "sync" - "github.com/astaxie/beego/session" + "github.com/beego/beego/session" "github.com/ssdb/gossdb/ssdb" ) diff --git a/staticfile.go b/staticfile.go index e26776c5..f1135e36 100644 --- a/staticfile.go +++ b/staticfile.go @@ -26,8 +26,8 @@ import ( "sync" "time" - "github.com/astaxie/beego/context" - "github.com/astaxie/beego/logs" + "github.com/beego/beego/context" + "github.com/beego/beego/logs" "github.com/hashicorp/golang-lru" ) diff --git a/template.go b/template.go index 59875be7..b871e74b 100644 --- a/template.go +++ b/template.go @@ -27,8 +27,8 @@ import ( "strings" "sync" - "github.com/astaxie/beego/logs" - "github.com/astaxie/beego/utils" + "github.com/beego/beego/logs" + "github.com/beego/beego/utils" ) var ( diff --git a/template_test.go b/template_test.go index b688c8a0..21a2e9bf 100644 --- a/template_test.go +++ b/template_test.go @@ -21,7 +21,7 @@ import ( "path/filepath" "testing" - "github.com/astaxie/beego/testdata" + "github.com/beego/beego/testdata" "github.com/elazarl/go-bindata-assetfs" ) diff --git a/testing/client.go b/testing/client.go index c3737e9c..dcce5325 100644 --- a/testing/client.go +++ b/testing/client.go @@ -15,8 +15,8 @@ package testing import ( - "github.com/astaxie/beego/config" - "github.com/astaxie/beego/httplib" + "github.com/beego/beego/config" + "github.com/beego/beego/httplib" ) var port = "" diff --git a/tree.go b/tree.go index 4d800bc4..60a7f9e8 100644 --- a/tree.go +++ b/tree.go @@ -19,8 +19,8 @@ import ( "regexp" "strings" - "github.com/astaxie/beego/context" - "github.com/astaxie/beego/utils" + "github.com/beego/beego/context" + "github.com/beego/beego/utils" ) var ( diff --git a/tree_test.go b/tree_test.go index d412a348..046d78ee 100644 --- a/tree_test.go +++ b/tree_test.go @@ -18,7 +18,7 @@ import ( "strings" "testing" - "github.com/astaxie/beego/context" + "github.com/beego/beego/context" ) type testinfo struct { diff --git a/utils/captcha/README.md b/utils/captcha/README.md index dbc2026b..9dd603ac 100644 --- a/utils/captcha/README.md +++ b/utils/captcha/README.md @@ -6,9 +6,9 @@ an example for use captcha package controllers import ( - "github.com/astaxie/beego" - "github.com/astaxie/beego/cache" - "github.com/astaxie/beego/utils/captcha" + "github.com/beego/beego" + "github.com/beego/beego/cache" + "github.com/beego/beego/utils/captcha" ) var cpt *captcha.Captcha diff --git a/utils/captcha/captcha.go b/utils/captcha/captcha.go index 42ac70d3..2abda4c8 100644 --- a/utils/captcha/captcha.go +++ b/utils/captcha/captcha.go @@ -19,9 +19,9 @@ // package controllers // // import ( -// "github.com/astaxie/beego" -// "github.com/astaxie/beego/cache" -// "github.com/astaxie/beego/utils/captcha" +// "github.com/beego/beego" +// "github.com/beego/beego/cache" +// "github.com/beego/beego/utils/captcha" // ) // // var cpt *captcha.Captcha @@ -66,11 +66,11 @@ import ( "strings" "time" - "github.com/astaxie/beego" - "github.com/astaxie/beego/cache" - "github.com/astaxie/beego/context" - "github.com/astaxie/beego/logs" - "github.com/astaxie/beego/utils" + "github.com/beego/beego" + "github.com/beego/beego/cache" + "github.com/beego/beego/context" + "github.com/beego/beego/logs" + "github.com/beego/beego/utils" ) var ( diff --git a/utils/captcha/image_test.go b/utils/captcha/image_test.go index 5e35b7f7..e3ff1422 100644 --- a/utils/captcha/image_test.go +++ b/utils/captcha/image_test.go @@ -17,7 +17,7 @@ package captcha import ( "testing" - "github.com/astaxie/beego/utils" + "github.com/beego/beego/utils" ) type byteCounter struct { diff --git a/utils/pagination/controller.go b/utils/pagination/controller.go index 2f022d0c..6ee6a158 100644 --- a/utils/pagination/controller.go +++ b/utils/pagination/controller.go @@ -15,7 +15,7 @@ package pagination import ( - "github.com/astaxie/beego/context" + "github.com/beego/beego/context" ) // SetPaginator Instantiates a Paginator and assigns it to context.Input.Data("paginator"). diff --git a/utils/pagination/doc.go b/utils/pagination/doc.go index 9abc6d78..d5d001a3 100644 --- a/utils/pagination/doc.go +++ b/utils/pagination/doc.go @@ -8,7 +8,7 @@ In your beego.Controller: package controllers - import "github.com/astaxie/beego/utils/pagination" + import "github.com/beego/beego/utils/pagination" type PostsController struct { beego.Controller diff --git a/validation/README.md b/validation/README.md index 43373e47..80085f2c 100644 --- a/validation/README.md +++ b/validation/README.md @@ -7,18 +7,18 @@ validation is a form validation for a data validation and error collecting using Install: - go get github.com/astaxie/beego/validation + go get github.com/beego/beego/validation Test: - go test github.com/astaxie/beego/validation + go test github.com/beego/beego/validation ## Example Direct Use: import ( - "github.com/astaxie/beego/validation" + "github.com/beego/beego/validation" "log" ) @@ -49,7 +49,7 @@ Direct Use: Struct Tag Use: import ( - "github.com/astaxie/beego/validation" + "github.com/beego/beego/validation" ) // validation function follow with "valid" tag @@ -81,7 +81,7 @@ Struct Tag Use: Use custom function: import ( - "github.com/astaxie/beego/validation" + "github.com/beego/beego/validation" ) type user struct { diff --git a/validation/validation.go b/validation/validation.go index 190e0f0e..18dbf62f 100644 --- a/validation/validation.go +++ b/validation/validation.go @@ -15,7 +15,7 @@ // Package validation for validations // // import ( -// "github.com/astaxie/beego/validation" +// "github.com/beego/beego/validation" // "log" // ) // diff --git a/validation/validators.go b/validation/validators.go index a0e4bcbb..3fbcc6b2 100644 --- a/validation/validators.go +++ b/validation/validators.go @@ -23,7 +23,7 @@ import ( "time" "unicode/utf8" - "github.com/astaxie/beego/logs" + "github.com/beego/beego/logs" ) // CanSkipFuncs will skip valid if RequiredFirst is true and the struct field's value is empty