Skip to content

Commit

Permalink
remove old binding
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed Aug 23, 2022
1 parent f9e8709 commit 2cb58a2
Show file tree
Hide file tree
Showing 26 changed files with 11 additions and 3,963 deletions.
32 changes: 8 additions & 24 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ package fiber
import (
"bufio"
"bytes"
"encoding/json"
"encoding/xml"
"errors"
"fmt"
"net"
Expand All @@ -22,9 +24,6 @@ import (
"sync/atomic"
"time"

"encoding/json"
"encoding/xml"

"github.com/gofiber/fiber/v3/utils"
"github.com/valyala/fasthttp"
)
Expand Down Expand Up @@ -116,8 +115,6 @@ type App struct {
latestGroup *Group
// newCtxFunc
newCtxFunc func(app *App) CustomCtx
// custom binders
customBinders []CustomBinder
// TLS handler
tlsHandler *tlsHandler
}
Expand Down Expand Up @@ -375,12 +372,6 @@ type Config struct {
//
// Optional. Default: DefaultColors
ColorScheme Colors `json:"color_scheme"`

// If you want to validate header/form/query... automatically when to bind, you can define struct validator.
// Fiber doesn't have default validator, so it'll skip validator step if you don't use any validator.
//
// Default: nil
StructValidator StructValidator
}

// Static defines configuration options when defining static assets.
Expand Down Expand Up @@ -469,13 +460,12 @@ func New(config ...Config) *App {
stack: make([][]*Route, len(intMethod)),
treeStack: make([]map[string][]*Route, len(intMethod)),
// Create config
config: Config{},
getBytes: utils.UnsafeBytes,
getString: utils.UnsafeString,
appList: make(map[string]*App),
latestRoute: &Route{},
latestGroup: &Group{},
customBinders: []CustomBinder{},
config: Config{},
getBytes: utils.UnsafeBytes,
getString: utils.UnsafeString,
appList: make(map[string]*App),
latestRoute: &Route{},
latestGroup: &Group{},
}

// Create Ctx pool
Expand Down Expand Up @@ -569,12 +559,6 @@ func (app *App) NewCtxFunc(function func(app *App) CustomCtx) {
app.newCtxFunc = function
}

// You can register custom binders to use as Bind().Custom("name").
// They should be compatible with CustomBinder interface.
func (app *App) RegisterCustomBinder(binder CustomBinder) {
app.customBinders = append(app.customBinders, binder)
}

// Mount attaches another app instance as a sub-router along a routing path.
// It's very useful to split up a large API as many independent routers and
// compose them as a single service using Mount. The fiber's error handler and
Expand Down
194 changes: 0 additions & 194 deletions bind.go

This file was deleted.

0 comments on commit 2cb58a2

Please sign in to comment.