update package reference

This commit is contained in:
kevin
2020-08-08 16:40:10 +08:00
parent d19d25c72f
commit 0a7e0cce77
377 changed files with 881 additions and 1423 deletions

View File

@@ -6,10 +6,9 @@ import (
"net/http"
"net/http/httputil"
"zero/core/logx"
"zero/rest/internal"
"github.com/dgrijalva/jwt-go"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/rest/internal"
)
const (

View File

@@ -5,11 +5,11 @@ import (
"net/http"
"strings"
"zero/core/breaker"
"zero/core/logx"
"zero/core/stat"
"zero/rest/internal"
"zero/rest/internal/security"
"github.com/tal-tech/go-zero/core/breaker"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/stat"
"github.com/tal-tech/go-zero/rest/internal"
"github.com/tal-tech/go-zero/rest/internal/security"
)
const breakerSeparator = "://"

View File

@@ -6,10 +6,9 @@ import (
"net/http/httptest"
"testing"
"zero/core/logx"
"zero/core/stat"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/stat"
)
func init() {

View File

@@ -4,10 +4,10 @@ import (
"net/http"
"time"
"zero/core/codec"
"zero/core/logx"
"zero/rest/httpx"
"zero/rest/internal/security"
"github.com/tal-tech/go-zero/core/codec"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/rest/httpx"
"github.com/tal-tech/go-zero/rest/internal/security"
)
const contentSecurity = "X-Content-Security"

View File

@@ -17,10 +17,9 @@ import (
"testing"
"time"
"zero/core/codec"
"zero/rest/httpx"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/codec"
"github.com/tal-tech/go-zero/rest/httpx"
)
const timeDiff = time.Hour * 2 * 24

View File

@@ -7,8 +7,8 @@ import (
"io/ioutil"
"net/http"
"zero/core/codec"
"zero/core/logx"
"github.com/tal-tech/go-zero/core/codec"
"github.com/tal-tech/go-zero/core/logx"
)
const maxBytes = 1 << 20 // 1 MiB

View File

@@ -9,9 +9,8 @@ import (
"net/http/httptest"
"testing"
"zero/core/codec"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/codec"
)
const (

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strings"
"zero/rest/httpx"
"github.com/tal-tech/go-zero/rest/httpx"
)
const gzipEncoding = "gzip"

View File

@@ -9,10 +9,9 @@ import (
"sync"
"testing"
"zero/core/codec"
"zero/rest/httpx"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/codec"
"github.com/tal-tech/go-zero/rest/httpx"
)
func TestGunzipHandler(t *testing.T) {

View File

@@ -9,11 +9,11 @@ import (
"net/http/httputil"
"time"
"zero/core/iox"
"zero/core/logx"
"zero/core/timex"
"zero/core/utils"
"zero/rest/internal"
"github.com/tal-tech/go-zero/core/iox"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/timex"
"github.com/tal-tech/go-zero/core/utils"
"github.com/tal-tech/go-zero/rest/internal"
)
const slowThreshold = time.Millisecond * 500

View File

@@ -8,9 +8,8 @@ import (
"testing"
"time"
"zero/rest/internal"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/rest/internal"
)
func init() {

View File

@@ -3,7 +3,7 @@ package handler
import (
"net/http"
"zero/rest/internal"
"github.com/tal-tech/go-zero/rest/internal"
)
func MaxBytesHandler(n int64) func(http.Handler) http.Handler {

View File

@@ -3,9 +3,9 @@ package handler
import (
"net/http"
"zero/core/logx"
"zero/core/syncx"
"zero/rest/internal"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/syncx"
"github.com/tal-tech/go-zero/rest/internal"
)
func MaxConns(n int) func(http.Handler) http.Handler {

View File

@@ -8,9 +8,8 @@ import (
"sync"
"testing"
"zero/core/lang"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/lang"
)
const conns = 4

View File

@@ -3,8 +3,8 @@ package handler
import (
"net/http"
"zero/core/stat"
"zero/core/timex"
"github.com/tal-tech/go-zero/core/stat"
"github.com/tal-tech/go-zero/core/timex"
)
func MetricHandler(metrics *stat.Metrics) func(http.Handler) http.Handler {

View File

@@ -5,9 +5,8 @@ import (
"net/http/httptest"
"testing"
"zero/core/stat"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/stat"
)
func TestMetricHandler(t *testing.T) {

View File

@@ -5,9 +5,9 @@ import (
"strconv"
"time"
"zero/core/metric"
"zero/core/timex"
"zero/rest/internal/security"
"github.com/tal-tech/go-zero/core/metric"
"github.com/tal-tech/go-zero/core/timex"
"github.com/tal-tech/go-zero/rest/internal/security"
)
const serverNamespace = "http_server"

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"runtime/debug"
"zero/rest/internal"
"github.com/tal-tech/go-zero/rest/internal"
)
func RecoverHandler(next http.Handler) http.Handler {

View File

@@ -4,11 +4,11 @@ import (
"net/http"
"sync"
"zero/core/load"
"zero/core/logx"
"zero/core/stat"
"zero/rest/internal"
"zero/rest/internal/security"
"github.com/tal-tech/go-zero/core/load"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/stat"
"github.com/tal-tech/go-zero/rest/internal"
"github.com/tal-tech/go-zero/rest/internal/security"
)
const serviceType = "api"

View File

@@ -7,10 +7,9 @@ import (
"net/http/httptest"
"testing"
"zero/core/load"
"zero/core/stat"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/load"
"github.com/tal-tech/go-zero/core/stat"
)
func init() {

View File

@@ -3,9 +3,9 @@ package handler
import (
"net/http"
"zero/core/logx"
"zero/core/sysx"
"zero/core/trace"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/sysx"
"github.com/tal-tech/go-zero/core/trace"
)
func TracingHandler(next http.Handler) http.Handler {

View File

@@ -5,9 +5,8 @@ import (
"net/http/httptest"
"testing"
"zero/core/trace/tracespec"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/trace/tracespec"
)
func TestTracingHandler(t *testing.T) {