Skip to content

Commit

Permalink
🎉 v3: init
Browse files Browse the repository at this point in the history
  • Loading branch information
efectn committed May 31, 2022
1 parent 3bb4b7e commit 1188144
Show file tree
Hide file tree
Showing 142 changed files with 241 additions and 232 deletions.
10 changes: 5 additions & 5 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"sync"
"time"

"github.com/gofiber/fiber/v2/utils"
"github.com/gofiber/fiber/v3/utils"
"github.com/valyala/fasthttp"
)

Expand Down
4 changes: 2 additions & 2 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
8 changes: 4 additions & 4 deletions ctx.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
8 changes: 4 additions & 4 deletions ctx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion error.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
4 changes: 2 additions & 2 deletions error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
11 changes: 9 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -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
)
4 changes: 2 additions & 2 deletions helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"testing"
"time"

"github.com/gofiber/fiber/v2/utils"
"github.com/gofiber/fiber/v3/utils"
"github.com/valyala/fasthttp"
)

Expand Down
4 changes: 2 additions & 2 deletions hooks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion internal/colorable/colorable_appengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion internal/colorable/colorable_others.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion internal/colorable/colorable_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"syscall"
"unsafe"

"github.com/gofiber/fiber/v2/internal/isatty"
"github.com/gofiber/fiber/v3/internal/isatty"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion internal/dictpool/dict.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion internal/dictpool/types_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/fasttemplate/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion internal/go-ole/oleutil/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion internal/go-ole/oleutil/connection_func.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion internal/go-ole/oleutil/connection_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion internal/go-ole/oleutil/oleutil.go
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion internal/gopsutil/common/common_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/gopsutil/cpu/cpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/gopsutil/cpu/cpu_darwin_nocgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/gopsutil/cpu/cpu_dragonfly.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/gopsutil/cpu/cpu_fallback.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion internal/gopsutil/cpu/cpu_freebsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/gopsutil/cpu/cpu_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion internal/gopsutil/cpu/cpu_openbsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/gopsutil/cpu/cpu_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/gopsutil/load/load_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/gopsutil/load/load_fallback.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion internal/gopsutil/load/load_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion internal/gopsutil/load/load_solaris.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion internal/gopsutil/load/load_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"sync"
"time"

"github.com/gofiber/fiber/v2/internal/gopsutil/common"
"github.com/gofiber/fiber/v3/internal/gopsutil/common"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion internal/gopsutil/mem/mem.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand Down
2 changes: 1 addition & 1 deletion internal/gopsutil/mem/mem_fallback.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion internal/gopsutil/mem/mem_freebsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading

0 comments on commit 1188144

Please sign in to comment.