Skip to content

Commit

Permalink
Merge pull request #27 from flycash/txn
Browse files Browse the repository at this point in the history
Using beego/beego
  • Loading branch information
flycash authored Dec 13, 2020
2 parents 5f55264 + fe365b0 commit 87f52d2
Show file tree
Hide file tree
Showing 60 changed files with 96 additions and 383 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Created by .ignore support plugin (hsz.mobi)
.idea

.DS_Store
.DS_Store
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
4 changes: 2 additions & 2 deletions cache/file/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"context"
"time"

"github.com/astaxie/beego/client/cache"
"github.com/astaxie/beego/core/logs"
"github.com/beego/beego/client/cache"
"github.com/beego/beego/core/logs"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions cache/memory/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"context"
"time"

"github.com/astaxie/beego/client/cache"
"github.com/astaxie/beego/core/logs"
"github.com/beego/beego/client/cache"
"github.com/beego/beego/core/logs"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions cache/memorycache/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import (
"context"
"time"

"github.com/astaxie/beego/client/cache"
"github.com/astaxie/beego/core/logs"
"github.com/beego/beego/client/cache"
"github.com/beego/beego/core/logs"

// don't forget this
_ "github.com/astaxie/beego/client/cache/memcache"
_ "github.com/beego/beego/client/cache/memcache"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions cache/redis/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (
"context"
"time"

"github.com/astaxie/beego/client/cache"
"github.com/beego/beego/client/cache"
// don't forget this
_ "github.com/astaxie/beego/client/cache/redis"
"github.com/astaxie/beego/core/logs"
_ "github.com/beego/beego/client/cache/redis"
"github.com/beego/beego/core/logs"
)

func main() {
Expand Down
8 changes: 4 additions & 4 deletions captcha/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
package main

import (
beego "github.com/astaxie/beego/adapter"
"github.com/astaxie/beego/client/cache"
"github.com/astaxie/beego/core/logs"
"github.com/astaxie/beego/server/web/captcha"
beego "github.com/beego/beego/adapter"
"github.com/beego/beego/client/cache"
"github.com/beego/beego/core/logs"
"github.com/beego/beego/server/web/captcha"
)

// init captcha
Expand Down
4 changes: 2 additions & 2 deletions config/loadConfig/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"github.com/astaxie/beego/core/logs"
"github.com/astaxie/beego/server/web"
"github.com/beego/beego/core/logs"
"github.com/beego/beego/server/web"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions config/webAutoLoadConfig/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"github.com/astaxie/beego/core/logs"
"github.com/astaxie/beego/server/web"
"github.com/beego/beego/core/logs"
"github.com/beego/beego/server/web"
)

func main() {
Expand Down
6 changes: 1 addition & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@ module github.com/beego-dev/beego-example
go 1.13

require (
github.com/astaxie/beego v1.12.4-0.20201212140031-b92edb6587e9
github.com/beego/beego v1.12.4-0.20201213162117-e2a859d1564a
github.com/go-sql-driver/mysql v1.5.0
github.com/lib/pq v1.0.0
github.com/mattn/go-sqlite3 v2.0.3+incompatible
github.com/opentracing-contrib/beego v0.0.0-20190807091843-a0eec2f7e67c
)

replace (
github.com/astaxie/beego => /Users/mindeng/go-workspace/src/beego
)
283 changes: 0 additions & 283 deletions go.sum

This file was deleted.

4 changes: 2 additions & 2 deletions httplib/basic/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package main
import (
"crypto/tls"

"github.com/astaxie/beego/client/httplib"
"github.com/astaxie/beego/core/logs"
"github.com/beego/beego/client/httplib"
"github.com/beego/beego/core/logs"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions httplib/debug/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
package main

import (
"github.com/astaxie/beego/client/httplib"
"github.com/astaxie/beego/core/logs"
"github.com/beego/beego/client/httplib"
"github.com/beego/beego/core/logs"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion httplib/file/hello.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
hello world
hello world
4 changes: 2 additions & 2 deletions httplib/file/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package main
import (
"io/ioutil"

"github.com/astaxie/beego/client/httplib"
"github.com/astaxie/beego/core/logs"
"github.com/beego/beego/client/httplib"
"github.com/beego/beego/core/logs"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions httplib/filter/custom/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"net/http"
"time"

"github.com/astaxie/beego/client/httplib"
"github.com/astaxie/beego/core/logs"
"github.com/beego/beego/client/httplib"
"github.com/beego/beego/core/logs"
)

// implement custom filter
Expand Down Expand Up @@ -58,4 +58,4 @@ func myFilter(next httplib.Filter) httplib.Filter {
// Never forget invoke this. Or the request will not be sent
return next(ctx, req)
}
}
}
8 changes: 4 additions & 4 deletions httplib/filter/opentracing/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
package main

import (
"github.com/astaxie/beego/client/httplib"
"github.com/astaxie/beego/client/httplib/filter/opentracing"
"github.com/astaxie/beego/core/logs"
"github.com/beego/beego/client/httplib"
"github.com/beego/beego/client/httplib/filter/opentracing"
"github.com/beego/beego/core/logs"
)

func main() {
Expand All @@ -36,4 +36,4 @@ func main() {
} else {
logs.Info(resp)
}
}
}
6 changes: 3 additions & 3 deletions httplib/filter/prometheus/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
package main

import (
"github.com/astaxie/beego/client/httplib"
"github.com/astaxie/beego/client/httplib/filter/prometheus"
"github.com/astaxie/beego/core/logs"
"github.com/beego/beego/client/httplib"
"github.com/beego/beego/client/httplib/filter/prometheus"
"github.com/beego/beego/core/logs"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions httplib/header/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
package main

import (
"github.com/astaxie/beego/client/httplib"
"github.com/astaxie/beego/core/logs"
"github.com/beego/beego/client/httplib"
"github.com/beego/beego/core/logs"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions httplib/timeout/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package main
import (
"time"

"github.com/astaxie/beego/client/httplib"
"github.com/astaxie/beego/core/logs"
"github.com/beego/beego/client/httplib"
"github.com/beego/beego/core/logs"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion httpserver/basic/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package main

import (
"github.com/astaxie/beego/server/web"
"github.com/beego/beego/server/web"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion httpserver/controller/error/abort/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/astaxie/beego/server/web"
"github.com/beego/beego/server/web"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion httpserver/controller/error/customize/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/astaxie/beego/server/web"
"github.com/beego/beego/server/web"
)

type ErrorController struct {
Expand Down
2 changes: 1 addition & 1 deletion httpserver/controller/error/errorpage/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"html/template"
"net/http"

"github.com/astaxie/beego/server/web"
"github.com/beego/beego/server/web"
)

func serverError(rw http.ResponseWriter, r *http.Request) {
Expand Down
2 changes: 1 addition & 1 deletion httpserver/controller/error/redirect/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"net/http"

"github.com/astaxie/beego/server/web"
"github.com/beego/beego/server/web"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion httpserver/controller/request/body/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package main
import (
"encoding/json"

"github.com/astaxie/beego/server/web"
"github.com/beego/beego/server/web"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion httpserver/controller/request/data-binding/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package main
import (
"fmt"

"github.com/astaxie/beego/server/web"
"github.com/beego/beego/server/web"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion httpserver/controller/request/form-data/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package main

import (
"github.com/astaxie/beego/server/web"
"github.com/beego/beego/server/web"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion httpserver/controller/request/query/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package main

import (
"github.com/astaxie/beego/server/web"
"github.com/beego/beego/server/web"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion httpserver/controller/request/router-params/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package main

import (
"github.com/astaxie/beego/server/web"
"github.com/beego/beego/server/web"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions httpserver/controller/request/upload/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
package main

import (
"github.com/astaxie/beego/core/logs"
"github.com/astaxie/beego/server/web"
"github.com/beego/beego/core/logs"
"github.com/beego/beego/server/web"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions httpserver/controller/validation/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"encoding/json"
"strings"

"github.com/astaxie/beego/core/validation"
"github.com/astaxie/beego/server/web"
"github.com/beego/beego/core/validation"
"github.com/beego/beego/server/web"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion httpserver/cookie/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package main

import (
"github.com/astaxie/beego/server/web"
"github.com/beego/beego/server/web"
)

// to test this
Expand Down
2 changes: 1 addition & 1 deletion httpserver/download/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package main

import (
"github.com/astaxie/beego/server/web"
"github.com/beego/beego/server/web"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions httpserver/filter/basic/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package main
import (
"fmt"

"github.com/astaxie/beego/server/web"
"github.com/astaxie/beego/server/web/context"
"github.com/beego/beego/server/web"
"github.com/beego/beego/server/web/context"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions httpserver/filter/filter_chain/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
package main

import (
"github.com/astaxie/beego/core/logs"
"github.com/astaxie/beego/server/web"
"github.com/astaxie/beego/server/web/context"
"github.com/beego/beego/core/logs"
"github.com/beego/beego/server/web"
"github.com/beego/beego/server/web/context"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions httpserver/filter/opentracing/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package main
import (
"time"

"github.com/astaxie/beego/server/web"
"github.com/astaxie/beego/server/web/filter/opentracing"
"github.com/beego/beego/server/web"
"github.com/beego/beego/server/web/filter/opentracing"
)

func main() {
Expand Down
Loading

0 comments on commit 87f52d2

Please sign in to comment.