mirror of https://github.com/gofiber/fiber.git
🔦 move utils to internal
parent
816547fba9
commit
a3cac71ae8
7
app.go
7
app.go
|
@ -23,9 +23,10 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v2/utils/colorable"
|
||||
"github.com/gofiber/fiber/v2/utils/isatty"
|
||||
"github.com/gofiber/fiber/v2/internal/utils"
|
||||
"github.com/gofiber/fiber/v2/internal/utils/colorable"
|
||||
"github.com/gofiber/fiber/v2/internal/utils/isatty"
|
||||
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v2/internal/utils"
|
||||
"github.com/valyala/fasthttp"
|
||||
"github.com/valyala/fasthttp/fasthttputil"
|
||||
)
|
||||
|
|
10
ctx.go
10
ctx.go
|
@ -19,10 +19,10 @@ import (
|
|||
"text/template"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v2/utils/bytebufferpool"
|
||||
"github.com/gofiber/fiber/v2/utils/encoding/json"
|
||||
"github.com/gofiber/fiber/v2/utils/schema"
|
||||
"github.com/gofiber/fiber/v2/internal/utils"
|
||||
"github.com/gofiber/fiber/v2/internal/utils/bytebufferpool"
|
||||
"github.com/gofiber/fiber/v2/internal/utils/encoding/json"
|
||||
"github.com/gofiber/fiber/v2/internal/utils/schema"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
@ -612,7 +612,7 @@ func (c *Ctx) Next() (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
// OriginalURL contains the original request URL.
|
||||
// OriginalURL contains the original request URL. URI without scheme and host
|
||||
// Returned value is only valid within the handler. Do not store any references.
|
||||
// Make copies or use the Immutable setting to use the value outside the Handler.
|
||||
func (c *Ctx) OriginalURL() string {
|
||||
|
|
|
@ -24,8 +24,8 @@ import (
|
|||
"text/template"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v2/utils/bytebufferpool"
|
||||
"github.com/gofiber/fiber/v2/internal/bytebufferpool"
|
||||
"github.com/gofiber/fiber/v2/internal/utils"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
|
1
go.sum
1
go.sum
|
@ -1,5 +1,6 @@
|
|||
github.com/andybalholm/brotli v1.0.0 h1:7UCwP93aiSfvWpapti8g88vVVGp2qqtGyePsSuDafo4=
|
||||
github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
|
||||
github.com/gofiber/fiber v1.14.6 h1:QRUPvPmr8ijQuGo1MgupHBn8E+wW0IKqiOvIZPtV70o=
|
||||
github.com/klauspost/compress v1.10.7 h1:7rix8v8GpI3ZBb0nSozFRgbtXKv+hOe+qfEpZqybrAg=
|
||||
github.com/klauspost/compress v1.10.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
||||
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"io"
|
||||
"os"
|
||||
|
||||
_ "github.com/gofiber/fiber/v2/utils/isatty"
|
||||
_ "github.com/gofiber/fiber/v2/internal/utils/isatty"
|
||||
)
|
||||
|
||||
// NewColorable returns new instance of Writer which handles escape sequence.
|
|
@ -7,7 +7,7 @@ import (
|
|||
"io"
|
||||
"os"
|
||||
|
||||
_ "github.com/gofiber/fiber/v2/utils/isatty"
|
||||
_ "github.com/gofiber/fiber/v2/internal/utils/isatty"
|
||||
)
|
||||
|
||||
// NewColorable returns new instance of Writer which handles escape sequence.
|
|
@ -14,7 +14,7 @@ import (
|
|||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
"github.com/gofiber/fiber/v2/utils/isatty"
|
||||
"github.com/gofiber/fiber/v2/internal/utils/isatty"
|
||||
)
|
||||
|
||||
const (
|
|
@ -8,7 +8,7 @@ import (
|
|||
"unicode/utf16"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/gofiber/fiber/v2/utils/encoding/ascii"
|
||||
"github.com/gofiber/fiber/v2/internal/utils/encoding/ascii"
|
||||
)
|
||||
|
||||
// All spaces characters defined in the json specification.
|
|
@ -5,7 +5,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v2/internal/utils"
|
||||
)
|
||||
|
||||
// Config defines the config for middleware.
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
b64 "encoding/base64"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v2/internal/utils"
|
||||
)
|
||||
|
||||
func Test_Middleware_BasicAuth(t *testing.T) {
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v2/internal/utils"
|
||||
)
|
||||
|
||||
var filedata []byte
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v2/internal/utils"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v2/internal/utils"
|
||||
)
|
||||
|
||||
// Config defines the config for middleware.
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v2/internal/utils"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v2/internal/utils"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v2/internal/utils"
|
||||
)
|
||||
|
||||
// go test -run Test_FileSystem
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v2/internal/utils"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/valyala/fasthttp"
|
||||
|
|
|
@ -9,8 +9,8 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils/bytebufferpool"
|
||||
"github.com/gofiber/fiber/v2/utils/fasttemplate"
|
||||
"github.com/gofiber/fiber/v2/internal/utils/bytebufferpool"
|
||||
"github.com/gofiber/fiber/v2/internal/utils/fasttemplate"
|
||||
)
|
||||
|
||||
// Config defines the config for middleware.
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v2/utils/bytebufferpool"
|
||||
"github.com/gofiber/fiber/v2/internal/utils"
|
||||
"github.com/gofiber/fiber/v2/internal/utils/bytebufferpool"
|
||||
)
|
||||
|
||||
// go test -run Test_Logger
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v2/internal/utils"
|
||||
)
|
||||
|
||||
// go test -run Test_Proxy_Empty_Host
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v2/internal/utils"
|
||||
)
|
||||
|
||||
// go test -run Test_Recover
|
||||
|
|
|
@ -2,7 +2,7 @@ package requestid
|
|||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v2/internal/utils"
|
||||
)
|
||||
|
||||
// Config defines the config for middleware.
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v2/internal/utils"
|
||||
)
|
||||
|
||||
// go test -run Test_RequestID
|
||||
|
|
2
path.go
2
path.go
|
@ -10,7 +10,7 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v2/internal/utils"
|
||||
)
|
||||
|
||||
// routeParser holds the path segments and param names
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v2/internal/utils"
|
||||
)
|
||||
|
||||
// go test -race -run Test_Path_parseRoute
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v2/internal/utils"
|
||||
)
|
||||
|
||||
func Test_App_Prefork_Child_Process(t *testing.T) {
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v2/internal/utils"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v2/internal/utils"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
|
4
utils.go
4
utils.go
|
@ -18,8 +18,8 @@ import (
|
|||
"time"
|
||||
"unsafe"
|
||||
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v2/utils/bytebufferpool"
|
||||
"github.com/gofiber/fiber/v2/internal/utils"
|
||||
"github.com/gofiber/fiber/v2/internal/utils/bytebufferpool"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v2/internal/utils"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue