mirror of https://github.com/gofiber/fiber.git
🎉 v3: init
parent
3bb4b7ed41
commit
1188144d78
10
app.go
10
app.go
|
@ -31,9 +31,9 @@ import (
|
|||
|
||||
"encoding/json"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/colorable"
|
||||
"github.com/gofiber/fiber/v2/internal/isatty"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3/internal/colorable"
|
||||
"github.com/gofiber/fiber/v3/internal/isatty"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
@ -1337,8 +1337,8 @@ func (app *App) startupMessage(addr string, tls bool, pids string) {
|
|||
// printRoutesMessage print all routes with method, path, name and handlers
|
||||
// in a format of table, like this:
|
||||
// method | path | name | handlers
|
||||
// GET | / | routeName | github.com/gofiber/fiber/v2.emptyHandler
|
||||
// HEAD | / | | github.com/gofiber/fiber/v2.emptyHandler
|
||||
// GET | / | routeName | github.com/gofiber/fiber/v3.emptyHandler
|
||||
// HEAD | / | | github.com/gofiber/fiber/v3.emptyHandler
|
||||
func (app *App) printRoutesMessage() {
|
||||
// ignore child processes
|
||||
if IsChild() {
|
||||
|
|
|
@ -24,7 +24,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
"github.com/valyala/fasthttp"
|
||||
"github.com/valyala/fasthttp/fasthttputil"
|
||||
)
|
||||
|
|
|
@ -17,7 +17,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
|
|
@ -18,8 +18,8 @@ import (
|
|||
|
||||
"encoding/json"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/tlstest"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3/internal/tlstest"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
"github.com/valyala/fasthttp/fasthttputil"
|
||||
)
|
||||
|
||||
|
|
8
ctx.go
8
ctx.go
|
@ -24,10 +24,10 @@ import (
|
|||
"text/template"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/bytebufferpool"
|
||||
"github.com/gofiber/fiber/v2/internal/dictpool"
|
||||
"github.com/gofiber/fiber/v2/internal/schema"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3/internal/bytebufferpool"
|
||||
"github.com/gofiber/fiber/v3/internal/dictpool"
|
||||
"github.com/gofiber/fiber/v3/internal/schema"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
|
|
@ -28,10 +28,10 @@ import (
|
|||
"text/template"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/bytebufferpool"
|
||||
"github.com/gofiber/fiber/v2/internal/storage/memory"
|
||||
"github.com/gofiber/fiber/v2/internal/template/html"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3/internal/bytebufferpool"
|
||||
"github.com/gofiber/fiber/v3/internal/storage/memory"
|
||||
"github.com/gofiber/fiber/v3/internal/template/html"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
|
2
error.go
2
error.go
|
@ -3,7 +3,7 @@ package fiber
|
|||
import (
|
||||
errors "encoding/json"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/schema"
|
||||
"github.com/gofiber/fiber/v3/internal/schema"
|
||||
)
|
||||
|
||||
type (
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
|
||||
jerrors "encoding/json"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/schema"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3/internal/schema"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
)
|
||||
|
||||
func TestConversionError(t *testing.T) {
|
||||
|
|
11
go.mod
11
go.mod
|
@ -1,8 +1,15 @@
|
|||
module github.com/gofiber/fiber/v2
|
||||
module github.com/gofiber/fiber/v3
|
||||
|
||||
go 1.16
|
||||
go 1.18
|
||||
|
||||
require (
|
||||
github.com/valyala/fasthttp v1.37.0
|
||||
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/andybalholm/brotli v1.0.4 // indirect
|
||||
github.com/klauspost/compress v1.15.0 // indirect
|
||||
github.com/valyala/bytebufferpool v1.0.0 // indirect
|
||||
github.com/valyala/tcplisten v1.0.0 // indirect
|
||||
)
|
||||
|
|
|
@ -19,8 +19,8 @@ import (
|
|||
"time"
|
||||
"unsafe"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/bytebufferpool"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3/internal/bytebufferpool"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/bytebufferpool"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3/internal/bytebufferpool"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
)
|
||||
|
||||
var testSimpleHandler = func(c *Ctx) error {
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"io"
|
||||
"os"
|
||||
|
||||
_ "github.com/gofiber/fiber/v2/internal/isatty"
|
||||
_ "github.com/gofiber/fiber/v3/internal/isatty"
|
||||
)
|
||||
|
||||
// NewColorable returns new instance of Writer which handles escape sequence.
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"io"
|
||||
"os"
|
||||
|
||||
_ "github.com/gofiber/fiber/v2/internal/isatty"
|
||||
_ "github.com/gofiber/fiber/v3/internal/isatty"
|
||||
)
|
||||
|
||||
// NewColorable returns new instance of Writer which handles escape sequence.
|
||||
|
|
|
@ -14,7 +14,7 @@ import (
|
|||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/isatty"
|
||||
"github.com/gofiber/fiber/v3/internal/isatty"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -3,7 +3,7 @@ package dictpool
|
|||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
)
|
||||
|
||||
func (d *Dict) allocKV() *KV {
|
||||
|
|
|
@ -3,7 +3,7 @@ package dictpool
|
|||
// Code generated by github.com/tinylib/msgp DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2/internal/msgp"
|
||||
"github.com/gofiber/fiber/v3/internal/msgp"
|
||||
)
|
||||
|
||||
// DecodeMsg implements msgp.Decodable
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/bytebufferpool"
|
||||
"github.com/gofiber/fiber/v3/internal/bytebufferpool"
|
||||
)
|
||||
|
||||
// ExecuteFunc calls f on each template tag (placeholder) occurrence.
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"reflect"
|
||||
"unsafe"
|
||||
|
||||
ole "github.com/gofiber/fiber/v2/internal/go-ole"
|
||||
ole "github.com/gofiber/fiber/v3/internal/go-ole"
|
||||
)
|
||||
|
||||
type stdDispatch struct {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
package oleutil
|
||||
|
||||
import ole "github.com/gofiber/fiber/v2/internal/go-ole"
|
||||
import ole "github.com/gofiber/fiber/v3/internal/go-ole"
|
||||
|
||||
// ConnectObject creates a connection point between two services for communication.
|
||||
func ConnectObject(disp *ole.IDispatch, iid *ole.GUID, idisp interface{}) (uint32, error) {
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
ole "github.com/gofiber/fiber/v2/internal/go-ole"
|
||||
ole "github.com/gofiber/fiber/v3/internal/go-ole"
|
||||
)
|
||||
|
||||
// ConnectObject creates a connection point between two services for communication.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package oleutil
|
||||
|
||||
import ole "github.com/gofiber/fiber/v2/internal/go-ole"
|
||||
import ole "github.com/gofiber/fiber/v3/internal/go-ole"
|
||||
|
||||
// ClassIDFrom retrieves class ID whether given is program ID or application string.
|
||||
func ClassIDFrom(programID string) (classID *ole.GUID, err error) {
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/wmi"
|
||||
"github.com/gofiber/fiber/v3/internal/wmi"
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
)
|
||||
|
||||
// TimesStat contains the amounts of time the CPU has spent performing different
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
package cpu
|
||||
|
||||
import "github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
import "github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
|
||||
func perCPUTimes() ([]TimesStat, error) {
|
||||
return []TimesStat{}, common.ErrNotImplementedError
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"strings"
|
||||
"unsafe"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"context"
|
||||
"runtime"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
)
|
||||
|
||||
func Times(percpu bool) ([]TimesStat, error) {
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"strings"
|
||||
"unsafe"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
)
|
||||
|
||||
var ClocksPerSec = float64(100)
|
||||
|
|
|
@ -14,7 +14,7 @@ import (
|
|||
"strings"
|
||||
"syscall"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@ import (
|
|||
"fmt"
|
||||
"unsafe"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v2/internal/wmi"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/wmi"
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"strings"
|
||||
"unsafe"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ package load
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
)
|
||||
|
||||
func Avg() (*AvgStat, error) {
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"strings"
|
||||
"syscall"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
)
|
||||
|
||||
func Avg() (*AvgStat, error) {
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
)
|
||||
|
||||
func Avg() (*AvgStat, error) {
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -3,7 +3,7 @@ package mem
|
|||
import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
)
|
||||
|
||||
var invoke common.Invoker = common.Invoke{}
|
||||
|
|
|
@ -6,7 +6,7 @@ package mem
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
)
|
||||
|
||||
func VirtualMemory() (*VirtualMemoryStat, error) {
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
"golang.org/x/sys/unix"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
)
|
||||
|
||||
func VirtualMemory() (*VirtualMemoryStat, error) {
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"fmt"
|
||||
"os/exec"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
)
|
||||
|
||||
// VirtualMemory for Solaris is a minimal implementation which only returns
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"context"
|
||||
"unsafe"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"encoding/json"
|
||||
"net"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
)
|
||||
|
||||
var invoke common.Invoker = common.Invoke{}
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
"strings"
|
||||
"syscall"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
)
|
||||
|
||||
func parseNetstatI(output string) ([]IOCountersStat, error) {
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
"os/exec"
|
||||
"regexp"
|
||||
"strconv"
|
||||
|
|
|
@ -6,7 +6,7 @@ package net
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
)
|
||||
|
||||
func IOCounters(pernic bool) ([]IOCountersStat, error) {
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
)
|
||||
|
||||
func IOCounters(pernic bool) ([]IOCountersStat, error) {
|
||||
|
|
|
@ -17,7 +17,7 @@ import (
|
|||
"strings"
|
||||
"syscall"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
)
|
||||
|
||||
const ( // Conntrack Column numbers
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
"strings"
|
||||
"syscall"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
)
|
||||
|
||||
var portMatch = regexp.MustCompile(`(.*)\.(\d+)$`)
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"strings"
|
||||
"syscall"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
)
|
||||
|
||||
// Return a list of network connections opened.
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@ import (
|
|||
"sort"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/cpu"
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/mem"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/cpu"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/mem"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -15,9 +15,9 @@ import (
|
|||
"time"
|
||||
"unsafe"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/cpu"
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/net"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/cpu"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/net"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@ import (
|
|||
"context"
|
||||
"syscall"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/cpu"
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/net"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/cpu"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/net"
|
||||
)
|
||||
|
||||
type MemoryMapsStat struct {
|
||||
|
|
|
@ -12,9 +12,9 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
cpu "github.com/gofiber/fiber/v2/internal/gopsutil/cpu"
|
||||
net "github.com/gofiber/fiber/v2/internal/gopsutil/net"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
cpu "github.com/gofiber/fiber/v3/internal/gopsutil/cpu"
|
||||
net "github.com/gofiber/fiber/v3/internal/gopsutil/net"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/cpu"
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/net"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/cpu"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/net"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
|
|
|
@ -14,10 +14,10 @@ import (
|
|||
"strings"
|
||||
"unsafe"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
cpu "github.com/gofiber/fiber/v2/internal/gopsutil/cpu"
|
||||
mem "github.com/gofiber/fiber/v2/internal/gopsutil/mem"
|
||||
net "github.com/gofiber/fiber/v2/internal/gopsutil/net"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
cpu "github.com/gofiber/fiber/v3/internal/gopsutil/cpu"
|
||||
mem "github.com/gofiber/fiber/v3/internal/gopsutil/mem"
|
||||
net "github.com/gofiber/fiber/v3/internal/gopsutil/net"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
"strings"
|
||||
"syscall"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@ import (
|
|||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
cpu "github.com/gofiber/fiber/v2/internal/gopsutil/cpu"
|
||||
net "github.com/gofiber/fiber/v2/internal/gopsutil/net"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
cpu "github.com/gofiber/fiber/v3/internal/gopsutil/cpu"
|
||||
net "github.com/gofiber/fiber/v3/internal/gopsutil/net"
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
)
|
||||
|
||||
type PROCESS_MEMORY_COUNTERS struct {
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
|
||||
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
|
||||
)
|
||||
|
||||
type PROCESS_MEMORY_COUNTERS struct {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
)
|
||||
|
||||
// go test -run Test_Memory -v -race
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/fwd"
|
||||
"github.com/gofiber/fiber/v3/internal/fwd"
|
||||
)
|
||||
|
||||
// where we keep old *Readers
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/template/utils"
|
||||
"github.com/gofiber/fiber/v3/internal/template/utils"
|
||||
)
|
||||
|
||||
// Engine struct
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package wmi
|
||||
|
@ -8,8 +9,8 @@ import (
|
|||
"runtime"
|
||||
"sync"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/go-ole"
|
||||
"github.com/gofiber/fiber/v2/internal/go-ole/oleutil"
|
||||
"github.com/gofiber/fiber/v3/internal/go-ole"
|
||||
"github.com/gofiber/fiber/v3/internal/go-ole/oleutil"
|
||||
)
|
||||
|
||||
// SWbemServices is used to access wmi. See https://msdn.microsoft.com/en-us/library/aa393719(v=vs.85).aspx
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
/*
|
||||
|
@ -37,8 +38,8 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2/internal/go-ole"
|
||||
"github.com/gofiber/fiber/v2/internal/go-ole/oleutil"
|
||||
"github.com/gofiber/fiber/v3/internal/go-ole"
|
||||
"github.com/gofiber/fiber/v3/internal/go-ole/oleutil"
|
||||
)
|
||||
|
||||
var l = log.New(os.Stdout, "", log.LstdFlags)
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"encoding/base64"
|
||||
"strings"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
)
|
||||
|
||||
// New creates a new middleware handler
|
||||
|
|
|
@ -8,8 +8,8 @@ import (
|
|||
|
||||
b64 "encoding/base64"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ package basicauth
|
|||
import (
|
||||
"crypto/subtle"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
)
|
||||
|
||||
// Config defines the config for middleware.
|
||||
|
|
|
@ -8,8 +8,8 @@ import (
|
|||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
)
|
||||
|
||||
// timestampUpdatePeriod is the period which is used to check the cache expiration.
|
||||
|
|
|
@ -13,9 +13,9 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/internal/storage/memory"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/gofiber/fiber/v3/internal/storage/memory"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
)
|
||||
|
||||
// Config defines the config for middleware.
|
||||
|
|
|
@ -4,14 +4,14 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/internal/memory"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/gofiber/fiber/v3/internal/memory"
|
||||
)
|
||||
|
||||
// go:generate msgp
|
||||
// msgp -file="manager.go" -o="manager_msgp.go" -tests=false -unexported
|
||||
// don't forget to replace the msgp import path to:
|
||||
// "github.com/gofiber/fiber/v2/internal/msgp"
|
||||
// "github.com/gofiber/fiber/v3/internal/msgp"
|
||||
type item struct {
|
||||
body []byte
|
||||
ctype []byte
|
||||
|
|
|
@ -5,7 +5,7 @@ package cache
|
|||
// DO NOT EDIT
|
||||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2/internal/msgp"
|
||||
"github.com/gofiber/fiber/v3/internal/msgp"
|
||||
)
|
||||
|
||||
// DecodeMsg implements msgp.Decodable
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package compress
|
||||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@ import (
|
|||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
)
|
||||
|
||||
var filedata []byte
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package compress
|
||||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
)
|
||||
|
||||
// Config defines the config for middleware.
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
)
|
||||
|
||||
// Config defines the config for middleware.
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
)
|
||||
|
||||
// Config defines the config for middleware.
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"errors"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package csrf
|
|||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -4,14 +4,14 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/internal/memory"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/gofiber/fiber/v3/internal/memory"
|
||||
)
|
||||
|
||||
// go:generate msgp
|
||||
// msgp -file="manager.go" -o="manager_msgp.go" -tests=false -unexported
|
||||
// don't forget to replace the msgp import path to:
|
||||
// "github.com/gofiber/fiber/v2/internal/msgp"
|
||||
// "github.com/gofiber/fiber/v3/internal/msgp"
|
||||
type item struct{}
|
||||
|
||||
//msgp:ignore manager
|
||||
|
|
|
@ -3,7 +3,7 @@ package csrf
|
|||
// Code generated by github.com/tinylib/msgp DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2/internal/msgp"
|
||||
"github.com/gofiber/fiber/v3/internal/msgp"
|
||||
)
|
||||
|
||||
// DecodeMsg implements msgp.Decodable
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package encryptcookie
|
||||
|
||||
import "github.com/gofiber/fiber/v2"
|
||||
import "github.com/gofiber/fiber/v3"
|
||||
|
||||
// Config defines the config for middleware.
|
||||
type Config struct {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package encryptcookie
|
||||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package etag
|
||||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
)
|
||||
|
||||
// Config defines the config for middleware.
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"bytes"
|
||||
"hash/crc32"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/internal/bytebufferpool"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/gofiber/fiber/v3/internal/bytebufferpool"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package expvar
|
||||
|
||||
import "github.com/gofiber/fiber/v2"
|
||||
import "github.com/gofiber/fiber/v3"
|
||||
|
||||
// Config defines the config for middleware.
|
||||
type Config struct {
|
||||
|
|
|
@ -3,7 +3,7 @@ package expvar
|
|||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/valyala/fasthttp/expvarhandler"
|
||||
)
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
)
|
||||
|
||||
func Test_Non_Expvar_Path(t *testing.T) {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"net/http"
|
||||
"strconv"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
)
|
||||
|
||||
// Config defines the config for middleware.
|
||||
|
|
|
@ -9,8 +9,8 @@ import (
|
|||
|
||||
"github.com/valyala/fasthttp"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
)
|
||||
|
||||
// go test -run Test_Middleware_Favicon
|
||||
|
|
|
@ -7,8 +7,8 @@ import (
|
|||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
)
|
||||
|
||||
// Config defines the config for middleware.
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
)
|
||||
|
||||
// go test -run Test_FileSystem
|
||||
|
|
|
@ -9,8 +9,8 @@ import (
|
|||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/gofiber/fiber/v3/utils"
|
||||
)
|
||||
|
||||
func getFileExtension(path string) string {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue