1
0
mirror of https://github.com/gofiber/fiber.git synced 2025-02-07 02:12:12 +00:00

🔦 move utils to internal

This commit is contained in:
Fenny 2020-09-14 09:09:06 +02:00
parent 816547fba9
commit a3cac71ae8
92 changed files with 42 additions and 40 deletions

7
app.go
View File

@ -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"
)

View File

@ -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
View File

@ -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 {

View File

@ -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
View File

@ -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=

View File

@ -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.

View File

@ -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.

View File

@ -14,7 +14,7 @@ import (
"syscall"
"unsafe"
"github.com/gofiber/fiber/v2/utils/isatty"
"github.com/gofiber/fiber/v2/internal/utils/isatty"
)
const (

View File

@ -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.

View File

@ -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.

View File

@ -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) {

View File

@ -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

View File

@ -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"
)

View File

@ -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.

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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

View File

@ -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"

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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) {

View File

@ -10,7 +10,7 @@ import (
"strings"
"time"
"github.com/gofiber/fiber/v2/utils"
"github.com/gofiber/fiber/v2/internal/utils"
"github.com/valyala/fasthttp"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -9,7 +9,7 @@ import (
"testing"
"time"
"github.com/gofiber/fiber/v2/utils"
"github.com/gofiber/fiber/v2/internal/utils"
"github.com/valyala/fasthttp"
)