update package reference
This commit is contained in:
@@ -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 (
|
||||
|
||||
@@ -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 = "://"
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"zero/rest/httpx"
|
||||
"github.com/tal-tech/go-zero/rest/httpx"
|
||||
)
|
||||
|
||||
const gzipEncoding = "gzip"
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user