⚡️ Express inspired web framework written in Go

Overview

Fiber

Fiber is an Express inspired web framework built on top of Fasthttp, the fastest HTTP engine for Go. Designed to ease things up for fast development with zero memory allocation and performance in mind.

⚡️ Quickstart

package main

import "github.com/gofiber/fiber/v2"

func main() {
    app := fiber.New()

    app.Get("/", func(c *fiber.Ctx) error {
        return c.SendString("Hello, World 👋!")
    })

    app.Listen(":3000")
}

🤖 Benchmarks

These tests are performed by TechEmpower and Go Web. If you want to see all results, please visit our Wiki.

⚙️ Installation

Make sure you have Go installed (download). Version 1.14 or higher is required.

Initialize your project by creating a folder and then running go mod init github.com/your/repo (learn more) inside the folder. Then install Fiber with the go get command:

go get -u github.com/gofiber/fiber/v2

🎯 Features

💡 Philosophy

New gophers that make the switch from Node.js to Go are dealing with a learning curve before they can start building their web applications or microservices. Fiber, as a web framework, was created with the idea of minimalism and follows the UNIX way, so that new gophers can quickly enter the world of Go with a warm and trusted welcome.

Fiber is inspired by Express, the most popular web framework on the Internet. We combined the ease of Express and raw performance of Go. If you have ever implemented a web application in Node.js (using Express or similar), then many methods and principles will seem very common to you.

We listen to our users in issues, Discord channel and all over the Internet to create a fast, flexible and friendly Go web framework for any task, deadline and developer skill! Just like Express does in the JavaScript world.

👀 Examples

Listed below are some of the common examples. If you want to see more code examples , please visit our Recipes repository or visit our hosted API documentation.

📖 Basic Routing

func main() {
    app := fiber.New()

    // GET /john
    app.Get("/:name", func(c *fiber.Ctx) error {
        msg := fmt.Sprintf("Hello, %s 👋!", c.Params("name"))
        return c.SendString(msg) // => Hello john 👋!
    })

    // GET /john/75
    app.Get("/:name/:age/:gender?", func(c *fiber.Ctx) error {
        msg := fmt.Sprintf("👴 %s is %s years old", c.Params("name"), c.Params("age"))
        return c.SendString(msg) // => 👴 john is 75 years old
    })

    // GET /dictionary.txt
    app.Get("/:file.:ext", func(c *fiber.Ctx) error {
        msg := fmt.Sprintf("📃 %s.%s", c.Params("file"), c.Params("ext"))
        return c.SendString(msg) // => 📃 dictionary.txt
    })

    // GET /flights/LAX-SFO
    app.Get("/flights/:from-:to", func(c *fiber.Ctx) error {
        msg := fmt.Sprintf("💸 From: %s, To: %s", c.Params("from"), c.Params("to"))
        return c.SendString(msg) // => 💸 From: LAX, To: SFO
    })

    // GET /api/register
    app.Get("/api/*", func(c *fiber.Ctx) error {
        msg := fmt.Sprintf("✋ %s", c.Params("*"))
        return c.SendString(msg) // => ✋ register
    })

    log.Fatal(app.Listen(":3000"))
}

📖 Serving Static Files

func main() {
    app := fiber.New()

    app.Static("/", "./public")
    // => http://localhost:3000/js/script.js
    // => http://localhost:3000/css/style.css

    app.Static("/prefix", "./public")
    // => http://localhost:3000/prefix/js/script.js
    // => http://localhost:3000/prefix/css/style.css

    app.Static("*", "./public/index.html")
    // => http://localhost:3000/any/path/shows/index/html

    log.Fatal(app.Listen(":3000"))
}

📖 Middleware & Next

func main() {
    app := fiber.New()

    // Match any route
    app.Use(func(c *fiber.Ctx) error {
        fmt.Println("🥇 First handler")
        return c.Next()
    })

    // Match all routes starting with /api
    app.Use("/api", func(c *fiber.Ctx) error {
        fmt.Println("🥈 Second handler")
        return c.Next()
    })

    // GET /api/register
    app.Get("/api/list", func(c *fiber.Ctx) error {
        fmt.Println("🥉 Last handler")
        return c.SendString("Hello, World 👋!")
    })

    log.Fatal(app.Listen(":3000"))
}
📚 Show more code examples

Views engines

📖 Config 📖 Engines 📖 Render

Fiber defaults to the html/template when no view engine is set.

If you want to execute partials or use a different engine like amber, handlebars, mustache or pug etc..

Checkout our Template package that support multiple view engines.

package main

import (
    "github.com/gofiber/fiber/v2"
    "github.com/gofiber/template/pug"
)

func main() {
    // You can setup Views engine before initiation app:
    app := fiber.New(fiber.Config{
        Views: pug.New("./views", ".pug"),
    })

    // And now, you can call template `./views/home.pug` like this:
    app.Get("/", func(c *fiber.Ctx) error {
        return c.Render("home", fiber.Map{
            "title": "Homepage",
            "year":  1999,
        })
    })

    log.Fatal(app.Listen(":3000"))
}

Grouping routes into chains

📖 Group

func middleware(c *fiber.Ctx) error {
    fmt.Println("Don't mind me!")
    return c.Next()
}

func handler(c *fiber.Ctx) error {
    return c.SendString(c.Path())
}

func main() {
    app := fiber.New()

    // Root API route
    api := app.Group("/api", middleware) // /api

    // API v1 routes
    v1 := api.Group("/v1", middleware) // /api/v1
    v1.Get("/list", handler)           // /api/v1/list
    v1.Get("/user", handler)           // /api/v1/user

    // API v2 routes
    v2 := api.Group("/v2", middleware) // /api/v2
    v2.Get("/list", handler)           // /api/v2/list
    v2.Get("/user", handler)           // /api/v2/user

    // ...
}

Middleware logger

📖 Logger

package main

import (
    "log"

    "github.com/gofiber/fiber/v2"
    "github.com/gofiber/fiber/v2/middleware/logger"
)

func main() {
    app := fiber.New()

    app.Use(logger.New())

    // ...

    log.Fatal(app.Listen(":3000"))
}

Cross-Origin Resource Sharing (CORS)

📖 CORS

import (
    "log"

    "github.com/gofiber/fiber/v2"
    "github.com/gofiber/fiber/v2/middleware/cors"
)

func main() {
    app := fiber.New()

    app.Use(cors.New())

    // ...

    log.Fatal(app.Listen(":3000"))
}

Check CORS by passing any domain in Origin header:

curl -H "Origin: http://example.com" --verbose http://localhost:3000

Custom 404 response

📖 HTTP Methods

func main() {
    app := fiber.New()

    app.Static("/", "./public")

    app.Get("/demo", func(c *fiber.Ctx) error {
        return c.SendString("This is a demo!")
    })

    app.Post("/register", func(c *fiber.Ctx) error {
        return c.SendString("Welcome!")
    })

    // Last middleware to match anything
    app.Use(func(c *fiber.Ctx) error {
        return c.SendStatus(404)
        // => 404 "Not Found"
    })

    log.Fatal(app.Listen(":3000"))
}

JSON Response

📖 JSON

type User struct {
    Name string `json:"name"`
    Age  int    `json:"age"`
}

func main() {
    app := fiber.New()

    app.Get("/user", func(c *fiber.Ctx) error {
        return c.JSON(&User{"John", 20})
        // => {"name":"John", "age":20}
    })

    app.Get("/json", func(c *fiber.Ctx) error {
        return c.JSON(fiber.Map{
            "success": true,
            "message": "Hi John!",
        })
        // => {"success":true, "message":"Hi John!"}
    })

    log.Fatal(app.Listen(":3000"))
}

WebSocket Upgrade

📖 Websocket

import (
    "github.com/gofiber/fiber/v2"
    "github.com/gofiber/fiber/v2/middleware/websocket"
)

func main() {
  app := fiber.New()

  app.Get("/ws", websocket.New(func(c *websocket.Conn) {
    for {
      mt, msg, err := c.ReadMessage()
      if err != nil {
        log.Println("read:", err)
        break
      }
      log.Printf("recv: %s", msg)
      err = c.WriteMessage(mt, msg)
      if err != nil {
        log.Println("write:", err)
        break
      }
    }
  }))

  log.Fatal(app.Listen(":3000"))
  // ws://localhost:3000/ws
}

Recover middleware

📖 Recover

import (
    "github.com/gofiber/fiber/v2"
    "github.com/gofiber/fiber/v2/middleware/recover"
)

func main() {
    app := fiber.New()

    app.Use(recover.New())

    app.Get("/", func(c *fiber.Ctx) error {
        panic("normally this would crash your app")
    })

    log.Fatal(app.Listen(":3000"))
}

🧬 Internal Middleware

Here is a list of middleware that are included within the Fiber framework.

Middleware Description
basicauth Basic auth middleware provides an HTTP basic authentication. It calls the next handler for valid credentials and 401 Unauthorized for missing or invalid credentials.
compress Compression middleware for Fiber, it supports deflate, gzip and brotli by default.
cache Intercept and cache responses
cors Enable cross-origin resource sharing (CORS) with various options.
csrf Protect from CSRF exploits.
filesystem FileSystem middleware for Fiber, special thanks and credits to Alireza Salary
favicon Ignore favicon from logs or serve from memory if a file path is provided.
limiter Rate-limiting middleware for Fiber. Use to limit repeated requests to public APIs and/or endpoints such as password reset.
logger HTTP request/response logger.
pprof Special thanks to Matthew Lee (@mthli)
proxy Allows you to proxy requests to a multiple servers
requestid Adds a requestid to every request.
recover Recover middleware recovers from panics anywhere in the stack chain and handles the control to the centralized ErrorHandler.
timeout Adds a max time for a request and forwards to ErrorHandler if it is exceeded.

🧬 External Middleware

List of externally hosted middleware modules and maintained by the Fiber team.

Middleware Description
adaptor Converter for net/http handlers to/from Fiber request handlers, special thanks to @arsmn!
helmet Helps secure your apps by setting various HTTP headers.
jwt JWT returns a JSON Web Token (JWT) auth middleware.
keyauth Key auth middleware provides a key based authentication.
rewrite Rewrite middleware rewrites the URL path based on provided rules. It can be helpful for backward compatibility or just creating cleaner and more descriptive links.
session This session middleware is build on top of fasthttp/session by @savsgio MIT. Special thanks to @thomasvvugt for helping with this middleware.
template This package contains 8 template engines that can be used with Fiber v1.10.x Go version 1.13 or higher is required.
websocket Based on Fasthttp WebSocket for Fiber with Locals support!

🌱 Third Party Middlewares

This is a list of middlewares that are created by the Fiber community, please create a PR if you want to see yours!

👍 Contribute

If you want to say thank you and/or support the active development of Fiber:

  1. Add a GitHub Star to the project.
  2. Tweet about the project on your Twitter.
  3. Write a review or tutorial on Medium, Dev.to or personal blog.
  4. Support the project by donating a cup of coffee.

Supporters

Fiber is an open source project that runs on donations to pay the bills e.g. our domain name, gitbook, netlify and serverless hosting. If you want to support Fiber, you can buy a coffee here.

User Donation
@destari x 10
@dembygenesis x 5
@thomasvvugt x 5
@hendratommy x 5
@ekaputra07 x 5
@jorgefuertes x 5
@candidosales x 5
@l0nax x 3
@ankush x 3
@bihe x 3
@justdave x 3
@koddr x 1
@lapolinar x 1
@diegowifi x 1
@ssimk0 x 1
@raymayemir x 1
@melkorm x 1
@marvinjwendt x 1
@toishy x 1

‎‍💻 Code Contributors

Code Contributors

⭐️ Stargazers

Stargazers over time

⚠️ License

Copyright (c) 2019-present Fenny and Contributors. Fiber is free and open-source software licensed under the MIT License. Official logo was created by Vic Shóstak and distributed under Creative Commons license (CC BY-SA 4.0 International).

Third-party library licenses

Comments
  • 💡 v3 discussion

    💡 v3 discussion

    Fiber

    Dear Gophers, we think it's a good idea to start discussions regarding the v3. You are welcome to join us on discord where we created a dedicated channel to pin suggestions for the next update .

    💡 Help wanted 
    opened by Fenny 48
  • :sparkles: Add customTags in logger middleware Config

    :sparkles: Add customTags in logger middleware Config

    Description

    Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. Explain the details for making this change. What existing problem does the pull request solve?

    Fixes https://github.com/gofiber/fiber/issues/2187

    Type of change

    Please delete options that are not relevant.

    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [x] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
    • [ ] This change requires a documentation update

    Checklist:

    • [x] For new functionalities I follow the inspiration of the express js framework and built them similar in usage
    • [x] I have performed a self-review of my own code
    • [x] I have commented my code, particularly in hard-to-understand areas
    • [ ] I have made corresponding changes to the documentation - https://github.com/gofiber/docs for https://docs.gofiber.io/
    • [x] I have added tests that prove my fix is effective or that my feature works
    • [x] New and existing unit tests pass locally with my changes
    • [x] If new dependencies exist, I have checked that they are really necessary and agreed with the maintainers/community (we want to have as few dependencies as possible)
    • [x] I tried to make my code as fast as possible with as few allocations as possible
    • [x] For new code I have written benchmarks so that they can be analyzed and improved

    Commit formatting:

    Use emojis on commit messages so it provides an easy way of identifying the purpose or intention of a commit. Check out the emoji cheatsheet here: https://gitmoji.carloscuesta.me/

    ✏️ Feature 
    opened by Skyenought 43
  •  🚀 Request: Route Constraints

    🚀 Request: Route Constraints

    Route constraints execute when a match has occurred to the incoming URL and the URL path is tokenized into route values. I found this very useful when defining routes. ASP NET Core was inspiration for this feature.

    Example

      app.Get("/users/{id:int}", func (ctx *fiber.Ctx) {
          // will come here if id is int
         // otherwise return 404
      })
    

    Proposed constraints:

    | Constraint | Example | Example matches | | ----------- | -------------- | ------------------------- | | int | {id:int} | 123456789, -123456789 | | bool | {active:bool} | true,false | | datetime | {dob:datetime} | 2016-12-31, 2016-12-31 7:32pm | | guid | {id:guid} | CD2C1638-1638-72D5-1638-DEADBEEF1638| | float | {weight:float} | 1.234, -1,001.01e8 | | minlength(value) | {username:minlength(4)} | Test (must be at least 4 characters) | | maxlength(value) | {filename:maxlength(8)} | MyFile (must be no more than 8 characters | | length(length) | {filename:length(12)} | somefile.txt (exactly 12 characters) | | min(value) | {age:min(18)} | 19 (Integer value must be at least 18) | | max(value) | {age:max(120)} | 91 (Integer value must be no more than 120) | | range(min,max) | {age:range(18,120)} | 91 (Integer value must be at least 18 but no more than 120) | | alpha | {name:alpha} | Rick (String must consist of one or more alphabetical characters, a-z and case-insensitive) | | regex(expression) | {ssn:regex(^\d{{3}}-\d{{2}}-\d{{4}}$)} | 123-45-6789 (Must match regular expression) |

    More details: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/routing?view=aspnetcore-6.0#route-constraints

    ✏️ Feature v2 
    opened by CerealKiller97 35
  • Use sliding window instead of fixed window algorithm in limiter middleware

    Use sliding window instead of fixed window algorithm in limiter middleware

    Please provide enough information so that others can review your pull request:

    Refactored the rate limiter to use a sliding window algorithm instead of fixed window. Added a new test that can demonstrate how to "cheat" the old rate limiting algorithm.

    Explain the details for making this change. What existing problem does the pull request solve?

    Sliding window algorithm offers significant improvement over the fixed window algorithm and has very little overhead for this gain. Fixed window makes it possible for an API consumer to wait for a reset window and then send more requests, cheating the allowed limit.

    Commit formatting

    Use emojis on commit messages so it provides an easy way of identifying the purpose or intention of a commit. Check out the emoji cheatsheet here: https://gitmoji.carloscuesta.me/

    🛠 In Progress ✏️ Feature 🧹 Updates 
    opened by conorbros 25
  • ✨ v3 (feature): add retry mechanism

    ✨ v3 (feature): add retry mechanism

    • General logic is implemented.
    • Unit tests are added.

    Signed-off-by: Gökhan Özeloğlu [email protected]

    Please provide enough information so that others can review your pull request: It is related to #1840.

    Explain the details for making this change. What existing problem does the pull request solve?

    I added a new package called retry. Exponential backoff algorithm is used. I can refactor the code like constant/default values, tests, etc. I am going to add more tests and maybe I'll do some small changes to the code.

    ✏️ Feature v3 
    opened by gozeloglu 24
  • 🐛 ClearCookie does not remove cookie

    🐛 ClearCookie does not remove cookie

    Fiber version v2

    Issue description ClearCookie does not remove cookie

    Code snippet

    I have 2 routes.

    1. a POST Sign in route to set the cookie
    cookie := new(fiber.Cookie)
    cookie.Name = "JWT"
    cookie.Value = "....."
    cookie.Domain = "mydomain.com"
    cookie.HTTPOnly = true
    cookie.Expires = expires
    
    c.Cookie(cookie)
    
    

    and second route is a POST for sign out which removes the cookie

    c.ClearCookie("JWT")
    

    In chrome, the cookie continues to exist after Sign Out and user able to make calls to restricted routes. Chrome Version 87.0.4280.141 (Official Build) (x86_64)

    🛠 In Progress 🔍 Under Investigation 
    opened by ruralcoder 22
  • Can't able to set request header to Access-Control-Allow-Origin🤗

    Can't able to set request header to Access-Control-Allow-Origin🤗

    Question description Guys I am a big fan of your work, I was just making an api to work with my react app. But Access-Control-Allow-Origin cors issue is coming up. I checked AllowOrigins was set to * in default, I manually tried it too. Then I tried to add to AllowHeaders but nothing seem to work. I read upon the Config struct and it seem to set it when its either "*" or a specific domain but in my case none works. I am doing something wrong?

    Code snippet Optional

    	app.Use(cors.New(cors.Config{
    		AllowCredentials: true,
    		AllowOrigins:     "https://gradbook-cet.netlify.com",
    		AllowHeaders:     "Origin, Content-Type, Accept, Accept-Language, Content-Length",
    	}))
    
    
    🤔 Question 
    opened by sidmohanty11 21
  • 🤗 What's the main difference in the throughout between v1.* and v2.*?

    🤗 What's the main difference in the throughout between v1.* and v2.*?

    Question description I had some stress tests on fiber v1.14.6 by accessing a local sqlite (query a few records) or remote redis (get a short string value) and found that the result throughtput can up to around 12000 requests/s.

    import "github.com/gofiber/fiber"
    

    But the above sentence actually downloads and uses fiber v1.14.6, rather than v2.*. What I wonder is how to let it use fiber v2 instead and the performance diference between the two major versions.

    Code snippet Optional

    
    import (
            "fmt"     
    
            "qc.com/m/v1/book"                    
            "qc.com/m/v1/database"             
            "github.com/gofiber/fiber"
            "github.com/jinzhu/gorm"
            _ "github.com/jinzhu/gorm/dialects/sqlite"
    )
    
    
    func setupRoutes(app *fiber.App) {  
            app.Get("/api/v1/book", book.GetBooks)
    }
    
    func initDatabase() {
            var err error
            database.DBConn, err = gorm.Open("sqlite3", "books.db")
            if err != nil {
                    panic("failed to connect database")
            }
            fmt.Println("Connection Opened to Database")
            database.DBConn.AutoMigrate(&book.Book{})
            fmt.Println("Database Migrated")
    }
    
    func main() {
            app := fiber.New()
            initDatabase()
            setupRoutes(app)
            app.Listen(3000)
           
            defer database.DBConn.Close()
    }
    
    
    opened by fengnex 21
  • 🤔 I'm having issues with go get / git on Windows

    🤔 I'm having issues with go get / git on Windows

    Description

    I am trying to install fiber using go get -u github.com/gofiber/fiber but its throwing me error I have attached below:

    image

    Here is what go env commands prints

    C:\Users\KIIT_Intern\go\src\github.com\pranjal.agni\rest-api-playground>go env
    set GO111MODULE=
    set GOARCH=amd64
    set GOBIN=
    set GOCACHE=C:\Users\KIIT_Intern\AppData\Local\go-build
    set GOENV=C:\Users\KIIT_Intern\AppData\Roaming\go\env
    set GOEXE=.exe
    set GOFLAGS=
    set GOHOSTARCH=amd64
    set GOHOSTOS=windows
    set GOINSECURE=
    set GONOPROXY=
    set GONOSUMDB=
    set GOOS=windows
    set GOPATH=C:\Users\KIIT_Intern\go
    set GOPRIVATE=
    set GOPROXY=https://proxy.golang.org,direct
    set GOROOT=c:\go
    set GOSUMDB=sum.golang.org
    set GOTMPDIR=
    set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
    set GCCGO=gccgo
    set AR=ar
    set CC=gcc
    set CXX=g++
    set CGO_ENABLED=1
    set GOMOD=
    set CGO_CFLAGS=-g -O2
    set CGO_CPPFLAGS=
    set CGO_CXXFLAGS=-g -O2
    set CGO_FFLAGS=-g -O2
    set CGO_LDFLAGS=-g -O2
    set PKG_CONFIG=pkg-config
    set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\KIIT_I~1\AppData\Local\Temp\go-build932757670=/tmp/go-build -gno-record-gcc-switches
    

    I wanted to play and learn fiber but unable to fix this issue for quite some time.

    Version

    Golang 1.14.2 windows/amd64 Windows 10 Git version 2.26.0

    opened by PranjalAgni 20
  • 🐛 Cache Middleware - Update expiration for expired entry

    🐛 Cache Middleware - Update expiration for expired entry

    Please provide enough information so that others can review your pull request: I noticed that expiration timestamp is still the same after cache entry has been expired. It leads to situation when right after the entry has been expired, all the next requests that were made right after the eviction are not cached since the expiration time is always behind the expiration deadline.

    -> call - miss
    -> call - hit
    -> call - hit
    -> call - hit
    ...
    (wait for expiration)
    ...
    (now we'll make the calls right after each other)
    -> call - miss
    -> call - miss
    -> call - miss
    ....
    

    This PR contains one-liner fix and updated test.

    🧹 Updates 
    opened by defshift 19
  • 📢 v2 - Changelog

    📢 v2 - Changelog

    Updated September 14, 2020 ( 🚀 v2 benchmark results )

    Fiber

    Dear Gophers, after long discussions in our , we decided to release v2.0.0 on 15 September 2020. We will summarize our current API proposal in this post, feedback is more than welcome.


    Breaking Changes

    • func(c *fiber.Ctx) error is the new Handler type accepting an error return, this will simplify error handling and create cleaner code because you can directly return outgoing methods like ***c.Send()***, ***c.Next()***, ***c.SendStatus()***, c.Redirect() etc... https://github.com/gofiber/fiber/issues/218
    // func(c *fiber.Ctx) {}
       func(c *fiber.Ctx) error {}
    
    app.Use(func(c *fiber.Ctx) error {
        if c.Get("x-john") == "doe" {
            return c.Next()
        }
        return c.SendStatus(fiber.StatusForbidden)
    })
    
    app.Use("/teapot", func(c *fiber.Ctx) error {
        return c.Send([]byte("Helllo, Teapot ☕!"))
    })
    
    app.Get("/world", func(c *fiber.Ctx) error {
        return c.SendString("Hello, World 👋!")
    })
    
    app.Get("/redirect", func(c *fiber.Ctx) error {
        return c.Redirect("https://google.com")
    })
    
    • fiber.New() takes an optional Config struct as value that will replace the *Settings pointer.
    // func New(settings ...*Settings) *App {}
       func New(config... Config) *App {}
    
    • app.Listen() now contains a strong typed signature accepting an string addr argument. To enable TLS, provide your own listener app.Listener(ln net.Listener) https://github.com/gofiber/fiber/issues/555
    // func (app *App) Listen(address interface{}, tlsconfig ...*tls.Config) error {}
       func (app *App) Listen(addr string) error {}
    
    • app.Listener() will remove the optional *tls.Config argument, this should be set within the given listener. Prefork will be compatible with custom listeners.
    // func (app *App) Listener(ln net.Listener, tlsconfig ...*tls.Config) error {}
       func (app *App) Listener(ln net.Listener) error {}
    
    • c.Next() returns an error to be used with the new Ctx handler signature. Passing an error through c.Next is not necessary anymore since we return all errors within the handler.
    // func (c *Ctx) Next(err ...error) {}
       func (c *Ctx) Next() error {}
    
    • c.Body() now returns []byte type instead of a string
    // func (c *Ctx) Body() string {}
       func (c *Ctx) Body() []byte {}
    
    • c.Write() will comply with the io.Writer interface.
    // func (c *Ctx) Write(bodies ...interface{}) {}
       func (c *Ctx) Write(p []byte) (n int, err error) {}
    
    // func (c *Ctx) Context() context.Context
       func (c *Ctx) Context() *fasthttp.RequestCtx
    
    • app.IsChild() will be available on the package layer
    // func (app *App) IsChild() bool {}
       func IsChild() bool {}
    

    🧹 Updates

    • c.Send() now contains a strong typed signature accepting a single []byte type Other outgoing Send methods also return an error to comply with the new Handler signature
    // func (c *Ctx) Send(bodies ...interface{}) {}
       func (c *Ctx) Send(body []byte) error {}
    
    // func (c *Ctx) SendStatus(status int) {}
       func (c *Ctx) SendStatus(status int) error {}
    
    // func (c *Ctx) SendString(body string) {}
       func (c *Ctx) SendString(body string) error {}
    
    // func (c *Ctx) SendStream(stream io.Reader, size ...int) {}
       func (c *Ctx) SendStream(stream io.Reader, size ...int) error {}
    
    • c.Redirect() now returns an error
    // func (c *Ctx) Redirect(location string, status ...int) {}
       func (c *Ctx) Redirect(location string, status ...int) error {}
    
    • c.FormValue() now supports the optional defaultValue argument
    // func (c *Ctx) FormValue(key string) string {}
       func (c *Ctx) FormValue(key string, defaultValue ...string) string {}
    

    Removed

    • c.SendBytes() will be removed and is replaced by c.Send
    // func (c *Ctx) SendBytes(body []byte) {}
    
    • c.Error() will be removed because errors can be accessed using the error return in c.Next() error
    // func (c *Ctx) Error() error {}
    

    🔥 New

    // c.Fasthttp.Request.Header.Peek("x-version")
       c.Request().Header.Peek("x-version")
    
    // c.Fasthttp.Response.Header.Peek("x-version")
       c.Response().Header.Peek("x-version")
    
    • app.Config.ErrorHandler will replace the app.Settings.ErrorHandler to override the default error handler.
    app := fiber.New(fiber.Config{
    	ErrorHandler: func(c *fiber.Ctx, err error) error {
    		return c.Status(404).SendString("hi, i'm an custom error")
    	},
    })
    
    app.Get("/", func(c *fiber.Ctx) error {
    	return c.SendFile("../there/is/nothing/here")
    })
    
    • Config.ProxyHeader will enable c.IP() to return the value of the given header key. By default c.IP() will return the Remote IP from the tcp connection, this property can be useful if you are behind a load balancer e.g. X-Forwarded-*.
    app := fiber.New(fiber.Config{
    	ProxyHeader: "CF-Connecting-IP",
    })
    app.Get("/", func(c *fiber.Ctx) error {
    	return c.SendString(c.IP()) // value from CF-Connecting-IP header
    })
    
    • Config.GETOnly rejects all non-GET requests if set to true. This option is useful as anti-DoS protection for servers accepting only GET requests and will return an ErrMethodNotAllowed to the error handler. The request size is limited by ReadBufferSize if GETOnly is set. Server accepts all the requests by default.
    app := fiber.New(fiber.Config{
    	GETOnly: true,
    })
    app.Post("/", func(c *fiber.Ctx) error {
    	return c.SendString("This method is not allowed")
    })
    

    🚀 Routing

    • The logic for parsing the route now better recognizes the parts which are not parameters, so the parameter can be placed anywhere, it is only important that the normal non-optional parameters are terminated by a delimiter character:
    // Route
    app.Get("/test::param/", handler)
    // GET /test:fiber/
    
    // Route
    app.Get("/shop/product/color::color/size::size", handler)
    // GET /shop/product/color:blue/size:xs
    
    // Route
    app.Get("/@:name", handler)
    // GET /@Fiber
    
    • Added support for the plus parameter, this is greedy like the wildcard parameter with the difference that it is required:
    // Route
    app.Get("/config/+.json", func(c *fiber.Ctx) error {
    	ctx.Params("+1") //  abc
            ctx.Params("+")   //  abc
    })
    // GET /config/abc.json  // match
    // GET /config/.json     // no match
    
    • Support for multiple wildcard and plus parameters has been added, they can now be accessed via wildcard or plus character with the counter in the route or normally for the first as in the current fiber version:
    // GET /customer/v1/cart/proxy
    app.Get("/*v1*/proxy", func(c *fiber.Ctx) error {
            c.Params("*")    //   customer/
    	c.Params("*1")  //   customer/
    	c.Params("*2")  //   /cart
    })
    

    📦 Middleware

    🚀 Improvements

    • The new version will use the segmentio/encoding package to encode JSON, this will improve performance drastically.
    // v1.14.x
    Benchmark_Ctx_JSON-16            4596667               260 ns/op              64 B/op          2 allocs/op
    Benchmark_Ctx_JSON-16            4603731               259 ns/op              64 B/op          2 allocs/op
    Benchmark_Ctx_JSON-16            4652700               259 ns/op              64 B/op          2 allocs/op
    Benchmark_Ctx_JSON-16            4598620               259 ns/op              64 B/op          2 allocs/op
    
    // v2.0.0
    Benchmark_Ctx_JSON-16            7186842               165 ns/op              64 B/op          2 allocs/op
    Benchmark_Ctx_JSON-16            7214056               164 ns/op              64 B/op          2 allocs/op
    Benchmark_Ctx_JSON-16            7227295               164 ns/op              64 B/op          2 allocs/op
    Benchmark_Ctx_JSON-16            7227291               165 ns/op              64 B/op          2 allocs/op
    
    • 405 Method Not Allowed will be passed to the global error handler, in the old version this behavior was not controllable.
    • This version will ship with fasthttp v1.16.0 which contains the statusLine/statusMessage PR found by @ReneWerner87, @Fenny and @kiyonlin
    • v2.0.0 allows us to implement a hybrid radix tree router which will remove the remaining allocation when CaseSenstitive is disabled and increase performance drasticly. The reason why we went with the hybrid implementation is because we still want to respect the router stack order 😉 thnx @reneWerner87
    // v1.14.x
    Benchmark_Router_NotFound-16                      235243              4843 ns/op              80 B/op          2 allocs/op
    Benchmark_Router_Handler-16                      1721277               696 ns/op              16 B/op          1 allocs/op
    Benchmark_Router_Handler_Strict_Case-16          1848582               651 ns/op               0 B/op          0 allocs/op
    Benchmark_Router_Chain-16                        9300248               129 ns/op               1 B/op          1 allocs/op
    Benchmark_Router_WithCompression-16              8693692               137 ns/op               1 B/op          1 allocs/op
    Benchmark_Router_Next-16                         1960342               619 ns/op               0 B/op          0 allocs/op
    Benchmark_Router_Handler_CaseSensitive-16        1862936               649 ns/op               0 B/op          0 allocs/op
    Benchmark_Router_Handler_Unescape-16              255260              4573 ns/op              16 B/op          1 allocs/op
    Benchmark_Router_Handler_StrictRouting-16        1857168               647 ns/op               0 B/op          0 allocs/op
    Benchmark_Router_Github_API-16                      3634            317628 ns/op               0 B/op          0 allocs/op
    
    // v2.0.0
    Benchmark_Router_NotFound-16                     2919049               411 ns/op              48 B/op          1 allocs/op
    Benchmark_Router_Handler-16                      8331446               145 ns/op               0 B/op          0 allocs/op
    Benchmark_Router_Handler_Strict_Case-16          9675211               124 ns/op               0 B/op          0 allocs/op
    Benchmark_Router_Chain-16                        9088828               132 ns/op               0 B/op          0 allocs/op
    Benchmark_Router_WithCompression-16              9020534               133 ns/op               0 B/op          0 allocs/op
    Benchmark_Router_Next-16                        14454469                81 ns/op               0 B/op          0 allocs/op
    Benchmark_Router_Handler_CaseSensitive-16        9597826               124 ns/op               0 B/op          0 allocs/op
    Benchmark_Router_Handler_Unescape-16             6059216               196 ns/op               0 B/op          0 allocs/op
    Benchmark_Router_Handler_StrictRouting-16        9753892               123 ns/op               0 B/op          0 allocs/op
    Benchmark_Router_Github_API-16                      5452            214098 ns/op               0 B/op          0 allocs/op
    

    See: ( 🚀 v2 benchmark results )

    🏷 Wait for Release 😎 Nice to Have 
    opened by Fenny 19
  • 🐛 [Bug]: Static file net::ERR_CONTENT_LENGTH_MISMATCH after update fasthttp

    🐛 [Bug]: Static file net::ERR_CONTENT_LENGTH_MISMATCH after update fasthttp

    Bug Description

    My CSS file is truncated. Therefore, an error will occur - net::ERR_CONTENT_LENGTH_MISMATCH. File size 5 kb. If the file is small (~ 1kb), then there is no problem.

    The error occurs only when downloading files with the CSS extension!

    OS: Ubuntu 18, Windows 10 Fiber version: v2.40.1

    This bug is reproduced on fasthttp version - github.com/valyala/fasthttp v1.42.0 On version v1.41.0 , there are no problems.

    How to Reproduce

    1. Create a fiber project and launch go get -u

    app := fiber.New() app.Static("/", "./public") app.Listen(":3000")

    1. Make sure go.mod contains the required version of fasthttp - v1.42.0
    2. Place a large css file in the public folder and launch server.
    3. Try to open the file in a browser
    4. See console or network tab.

    Expected Behavior

    Give the browser the entire file.

    Fiber Version

    2.40.1

    Code Snippet (optional)

    No response

    Checklist:

    • [X] I agree to follow Fiber's Code of Conduct.
    • [X] I have checked for existing issues that describe my problem prior to opening this one.
    • [X] I understand that improperly formatted bug reports may be closed without explanation.
    ☢️ Bug 
    opened by smalloff 1
  • 🩹 Fix: Unintended overwritten bind variables

    🩹 Fix: Unintended overwritten bind variables

    Description

    Presently, if a bind value passed when calling c.Render has the same key as a default value passed in middleware using c.Bind, the default value overwrites the value set with c.Render. Here is a small demonstration of the behavior. If you run that program, you will see that instead of the expected "Home" value being rendered in the h1 tag, the "default" value that was set with c.Bind is rendered.

    This PR addresses the described issue of overwritten bind variables.

    Type of change

    • [x] Bug fix (non-breaking change which fixes an issue)
    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
    • [ ] This change requires a documentation update

    I indicated "Bug fix" here as I have made a change that seems to be non-breaking on the surface, because it changes an unintended behavior to the intended behavior. However, I have seen cases in the past where changes like this actually end up breaking someone's project because they are depending on the existing (incorrect) behavior. Not sure if this is a concern here or not?

    Checklist:

    • [x] I have performed a self-review of my own code
    • [x] I have commented my code, particularly in hard-to-understand areas
    • [x] I have added tests that prove my fix is effective or that my feature works
    • [x] New and existing unit tests pass locally with my changes
    • [x] I tried to make my code as fast as possible with as few allocations as possible
    🧹 Updates 
    opened by cwinters8 1
  • optimize: set byteSent log to 0 when use SetBodyStreamWriter

    optimize: set byteSent log to 0 when use SetBodyStreamWriter

    Description

    Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. Explain the details for making this change. What existing problem does the pull request solve?

    Fixes https://github.com/gofiber/fiber/issues/2232

    Type of change

    Please delete options that are not relevant.

    • [x] New Optimize(non-breaking change which adds functionality)

    Checklist:

    • [x] For new functionalities I follow the inspiration of the express js framework and built them similar in usage
    • [x] I have performed a self-review of my own code
    • [x] I have added tests that prove my fix is effective or that my feature works
    • [x] New and existing unit tests pass locally with my changes

    Commit formatting:

    Use emojis on commit messages so it provides an easy way of identifying the purpose or intention of a commit. Check out the emoji cheatsheet here: https://gitmoji.carloscuesta.me/

    🧹 Updates 
    opened by li-jin-gou 0
  • 🐛 [Bug]: Mounted subapps don't work correctly if parrent app attached additional middlewares after mounting (v2.40.1 bug)

    🐛 [Bug]: Mounted subapps don't work correctly if parrent app attached additional middlewares after mounting (v2.40.1 bug)

    Bug Description

    If fiber app is mounting some subapps, routes from these subapps are not matching if the parent app added middlewares after mounting. See the code snippet above to reproduce the problem. GET /world always returns 404. v2.39.0 handled this case correctly.

    How to Reproduce

    Steps to reproduce the behavior:

    1. Run the code snippet
    2. Request GET /world
    3. Get 404

    Expected Behavior

    GET /world should return 200 'Hello'

    Fiber Version

    v2.40.1

    Code Snippet (optional)

    package main
    
    import (
    	"log"
    
    	"github.com/gofiber/fiber/v2"
    )
    
    func main() {
    	app := fiber.New()
    
    	app.Get("/hello", hello)
    
    	// subApp routes never matched if '404 handler' midlleware exists
    	subApp := fiber.New()
    	subApp.Get("/world", func(c *fiber.Ctx) error {
    		return c.SendString("World!")
    	})
    
    	app.Mount("/", subApp)
    
    	// !!! This handler breaks the /world route now
    	// 404 Handler
    	app.Use(func(c *fiber.Ctx) error {
    		return c.SendStatus(404) // => 404 "Not Found"
    	})
    
    	log.Fatal(app.Listen(":3000"))
    }
    
    // Handler
    func hello(c *fiber.Ctx) error {
    	return c.SendString("Hello!")
    }
    

    Checklist:

    • [X] I agree to follow Fiber's Code of Conduct.
    • [X] I have checked for existing issues that describe my problem prior to opening this one.
    • [X] I understand that improperly formatted bug reports may be closed without explanation.
    ☢️ Bug 
    opened by defshift 2
  • 🐛 [Bug]: Logger bytesSent incompatible with SSE

    🐛 [Bug]: Logger bytesSent incompatible with SSE

    Bug Description

    After activating bytesSent on the logger, all SSE endpoints stop streaming.

    It most likely caused by the logger attempting to read the full body length, consuming data before it is sent the client.

    https://github.com/gofiber/fiber/blob/master/middleware/logger/tags.go#L91

    How to Reproduce

    Steps to reproduce the behavior:

    1. Follow the instructions on https://github.com/gofiber/recipes/tree/master/sse
    2. Check SSE route, confirm it streams
    3. Add logger middleware https://docs.gofiber.io/api/middleware/logger
    4. Add sure the format contains ${bytesSent} as shown under https://docs.gofiber.io/api/middleware/logger#constants
    5. Check SSE route again, confirm it stops streaming

    Expected Behavior

    SSE Should continue streaming.

    Fiber Version

    2.40.1

    Code Snippet (optional)

    // @see https://github.com/gofiber/recipes/tree/master/sse
    // @see https://docs.gofiber.io/api/middleware/logger#constants
    

    Checklist:

    • [X] I agree to follow Fiber's Code of Conduct.
    • [X] I have checked for existing issues that describe my problem prior to opening this one.
    • [X] I understand that improperly formatted bug reports may be closed without explanation.
    ☢️ Bug 👍 Accepting PR 
    opened by Khez 6
Releases(v2.40.1)
  • v2.40.1(Nov 23, 2022)

  • v2.40.0(Nov 18, 2022)

    ❗ BreakingChange

    • Bump github.com/valyala/fasthttp from 1.40.0 to 1.41.0 (#2171)
    • Deprecate: go 1.14 & go 1.15 support deprecation (#2172)

    Due to the fact that fasthttp, which fiber is based on in release 1.41.0, does not support go versions 1.14 & 1.15 anymore, we had to remove them from our package as well.

    🚀 New

    • Register custom methods (#2107) https://docs.gofiber.io/api/fiber#config
    // now you can add your own custom methods
    app := fiber.New(fiber.Config{
        RequestMethods: append(fiber.DefaultMethods, "LOAD", "TEST"),
    })
    
    app.Add("LOAD", "/hello", func(c *fiber.Ctx) error {
        return c.SendString("Hello, World 👋!")
    })
    
    • Add multiple-prefix support to app.Use() and group.Use() (#2205) https://docs.gofiber.io/api/app#route-handlers - More like Express
    // declaration of multiple paths for the ".Use" method as in express is now possible
    app.Use([]string{"/john", "/doe"}, func(c *Ctx) error {
        return c.SendString(c.Path())
    })
    
    • Allow optional params with route constraints (#2179) https://docs.gofiber.io/guide/routing#constraints
    app.Get("/:userId<int>?", func(c *fiber.Ctx) error {
        return c.SendString(c.Params("userId"))
    })
    // curl -X GET http://localhost:3000/42
    // 42
    
    // curl -X GET http://localhost:3000/
    //
    
    • Improve mounting behavior (#2120) https://docs.gofiber.io/api/app#mount https://docs.gofiber.io/api/app#mountpath
    app := fiber.New()
    micro := fiber.New()
    // order when registering the mounted apps no longer plays a role
    app.Mount("/john", micro)
    // before there was problem when after mounting routes were registered
    micro.Get("/doe", func(c *fiber.Ctx) error {
        return c.SendStatus(fiber.StatusOK)
    })
    
    // output of the mount path possible
    micro.MountPath()   // "/john"
    
    • Middleware/pprof: Add URL prefix to pprof middleware (#2194) https://docs.gofiber.io/api/middleware/pprof
    // In systems where you have multiple ingress endpoints, it is common to add a URL prefix, like so:
    app.Use(pprof.New(pprof.Config{Prefix: "/endpoint-prefix"}))
    
    • Middleware/logger: Add customTags in Config (#2188, #2224, #2225) https://docs.gofiber.io/api/middleware/logger#add-custom-tags
    app.Use(logger.New(logger.Config{
        Format: "[${time}] ${status} - ${latency} ${method} ${randomNumber} ${path}\n",
        CustomTags: map[string]logger.LogFunc{
            // possibility to adapt or overwrite existing tags
            logger.TagMethod: func(output logger.Buffer, c *fiber.Ctx, data *logger.Data, extraParam string) (int, error) {
                return output.WriteString(utils.ToLower(c.Method()))
            },
            // own tags can be registered
            "randomNumber": func(output logger.Buffer, c *fiber.Ctx, data *logger.Data, extraParam string) (int, error) {
                return output.WriteString(strconv.FormatInt(rand.Int63n(100), 10))
            },
        },
    }))
    // [17:15:17] 200 -      0s get 10 /test
    // [17:15:17] 200 -      0s get 51 /test
    
    • Middleware/logger: Add callback function (#2219) https://docs.gofiber.io/api/middleware/logger#callback-after-log-is-written
    app.Use(logger.New(logger.Config{
        // is triggered when the handlers has been processed
        Done: func(c *fiber.Ctx, logString []byte) {
            // allows saving the logging string to other sources
            if c.Response().StatusCode() != fiber.StatusOK {
                reporter.SendToSlack(logString) 
            }
        },
    })) 
    

    🧹 Updates

    • Track Configured Values (#2221)
    • Ctx: simplify Protocol() (#2217)
    • Ctx: make Secure() also report whether a secure connection was established to a trusted proxy (#2215)
    • Ctx: update Locals function to accept interface{} key (#2144)
    • Utils: reduce diff to external utils package (#2206)
    • Utils: Update HTTP status codes (#2203)
    • Utils: Replace UnsafeBytes util with suggested way (#2204)
    • Fix and optimize memory storage (#2207)
    • Leverage runtime/debug to print the full stack trace info (#2183)
    • Ci: add check-latest param in vulncheck.yml (#2197)
    • Ci: replace snyk with govulncheck (#2178)

    🐛 Fixes

    • Fix naming of routes inside groups (#2199)

    📚 Documentation

    • Update list of third-party library licenses (#2211)
    • Update README_zh-CN.md (#2186)
    • Add korean translate in Installation section (#2213)
    • Comment typo (#2173)
    • Cache readme and docs update (#2169)

    Full Changelog: https://github.com/gofiber/fiber/compare/v2.39.0...v2.40.0

    Thank you @Skyenought, @calebcase, @efectn, @gandaldf, @gmlewis, @jamestiotio, @leonklingele, @li-jin-gou, @marcmartin13, @panjf2000, @pjebs, @rafimuhammad01 and @thor-son for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.39.0(Oct 23, 2022)

    🚀 New

    • Middleware/cache: Cache-Control: no-cache/no-store (#2159) https://docs.gofiber.io/api/middleware/cache
    • Middleware/proxy: support to set client (#2117) https://docs.gofiber.io/api/middleware/proxy
    • Add GetRoutes (#2112) https://docs.gofiber.io/api/app#getroutes
    • Static: add CacheControl to Static config (#2140) https://docs.gofiber.io/api/app#static

    🧹 Updates

    • Improve memory storage (#2162)
    • Make IP validation 2x faster (#2158)
    • Switch to text/javascript as per RFC9239 (#2146)
    • Test: add nil jsonDecoder test case (#2139)
    • Utils: update mime extensions (#2133)

    🐛 Fixes

    • Unhandled errors and update code comments to help the IDEs (#2128)
    • Multi-byte AppName displays confusion (#2148)
    • Query string parameter pass to fiber context (#2164)
    • Handle multiple X-Forwarded header (#2154)
    • Middleware/proxy - solve data race in middleware/proxy's test (#2153)
    • Middleware/session - Reset d.Data instead of deleting keys in it (#2156)
    • Agent: agent.Struct fails to unmarshal response since 2.33.0 #2134 (#2137)

    📚 Documentation

    • Update logger's comment (#2157)
    • Update ReadmeID (#2150)
    • Add doc about usage of CSRF and EncryptCookie middlewares. (#2141)
    • Update language count (#2131)
    • Typos (#2127)

    Full Changelog: https://github.com/gofiber/fiber/compare/v2.38.1...v2.39.0

    Thank you @Kamandlou, @Yureien, @efectn, @floxydio, @fufuok, @joseroberto, @leonklingele, @li-jin-gou, @marcmartin13, @nathanfaucett, @sadfun, @supakornbabe, @unickorn and @xbt573 for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.38.1(Sep 26, 2022)

    🚀 New

    • Middleware/cache: Add methods configuration (#2081) https://docs.gofiber.io/api/middleware/cache

    🧹 Updates

    • Middleware/timeout: Add timeout context middleware (#2090) https://docs.gofiber.io/api/middleware/timeout
    • Fix linter errors for tests (#2102)
    • Upgrade go version to 1.19 in go.mod (#2103)
    • Remove redundant parentheses and update comments (#2082)
    • Update code comment for helping IDEs (#2095)
    • Update code comments for helping IDEs and fix unhandled error in test (#2099)

    🐛 Fixes

    • Test: fix Test_Ctx_ParamParser route param (#2119)
    • SchemaPasers: Same struct parse param failed (#2101)
    • Fix ctx.SendStream(io.Reader) huge memory usage (#2091)

    📚 Documentation

    • Update README.md (#2114)
    • Fix typo (#2110)
    • Correct README_ja (#2108)

    Full Changelog: https://github.com/gofiber/fiber/compare/v2.37.1...v2.38.1

    Thank you @Kamandlou, @dayuoba, @efectn, @hakankutluay, @li-jin-gou, @nnnkkk7 and @trim21 for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.37.1(Sep 8, 2022)

    🧹 Updates

    • Bump github.com/valyala/fasthttp from 1.39.0 to 1.40.0 (#2075)
    • Unhandled errors in app_test.go (#2071)
    • Unhandled error in hooks test (#2070)

    🐛 Fixes

    • Constraints when to use multiple params (#2077)
    • Unhandle in strictmode (#2055)
    • EnvVar middleware parses base64 incorrectly (#2069)

    Full Changelog: https://github.com/gofiber/fiber/compare/v2.37.0...v2.37.1

    Thank you @Kamandlou, @efectn, @fufuok and @wangjq4214 for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.37.0(Aug 30, 2022)

    🚀 New

    • Route constraints (#1998) https://docs.gofiber.io/guide/routing#constraints
    • Add envvar expose middleware (#2054) https://docs.gofiber.io/api/middleware/envvar
    • Add XML to context. (#2003) https://docs.gofiber.io/api/ctx#xml https://docs.gofiber.io/api/fiber - XMLEncoder
    • Middleware/csrf custom extractor (#2052) https://docs.gofiber.io/api/middleware/csrf
    • Tls.ClientHelloInfo in Ctx (#2011) https://docs.gofiber.io/api/ctx#clienthelloinfo

    🧹 Updates

    • Remove prefork support from custom listeners (#2060)
    • Make IP() and IPs() more reliable (#2020)
    • Bump github.com/valyala/fasthttp from 1.38.0 to 1.39.0 (#2017)
    • Add go 1.19 to tests (#1994)
    • Add black colors to default overriding function (#1993)

    🧹 Cleanup

    • Unhandled errors in helpers_test.go (#2058)
    • Unhandled error in common_linux.go (#2056)
    • Handle file error on closing (#2050)
    • Unhandled error in cache package tests (#2049)
    • Unhandled errors and remove unused parameter (#2061)
    • Unhandled errors in tests (#2048)

    🐛 Fixes

    • Fix csrf middleware behavior with header key lookup (#2063)
    • Fix regex constraints (#2059)
    • Fix route constraints problems (#2033)
    • Make tlsHandler public to use it with Listener (#2034)
    • Case sensitivity for parameters in GetRouteURL (#2010)
    • Client: fix Agent use after free (#2037)
    • Middleware/monitor - fix ignore custom settings (#2024)
    • Fix proxy overwrote the wrong scheme (#2004)
    • Fix infinitely app.Test (#1997)
    • Fix gopsutil when compiling for bsd (#1995)

    📚 Documentation

    • Make Hooks public (#2015)
    • Gofmt & add missing copyright texts (#2013)
    • Change support claim up to go 1.19 (#2043)
    • Update Spanish readme (#2064)
    • Update Italian readme (#2042)
    • Update README.md (#2023)

    Thank you @efectn, @Maxi-Mega, @Trim21, @GalvinGao, @Kamandlou, @gbolo, @micziz, @mstrYoda, @sixcolors, @solrac97gr, @thomasdseao, @tusharxoxoxo and @wangjq4214 for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.37.0-rc.1(Aug 18, 2022)

    🚀 New

    • Route constraints (#1998)
    • Add XML to context. (#2003)

    🧹 Updates

    • Bump github.com/valyala/fasthttp from 1.38.0 to 1.39.0 (#2017)
    • Add go 1.19 to tests (#1994)
    • Add black colors to default overriding function (#1993)

    🐛 Fixes

    • Fix proxy overwrote the wrong scheme (#2004)
    • Fix infinitely app.Test (#1997)
    • Fix gopsutil when compiling for bsd (#1995)

    📚 Documentation

    • Make Hooks public (#2015)
    • Gofmt & add missing copyright texts (#2013)

    Thank you @Maxi-Mega, @Trim21, @efectn and @wangjq4214 for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.36.0(Aug 2, 2022)

    🚀 New

    • Add OnPrefork Hooks so you can get the PID of the child process. (#1974) https://docs.gofiber.io/guide/hooks#onfork
    • Customizable colors (#1977) https://docs.gofiber.io/api/fiber#config "ColorScheme"

    🐛 Fixes

    • Padding around app name in startup message when containing non-ascii characters (#1987)
    • Closes #1931 "🤗 How to get path param before a custom verb?" (#1983)

    📚 Documentation

    • Translate to Indonesian Awesome List (#1980)

    Thank you @Maxi-Mega, @efectn, @radenrishwan and @tohutohu for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.35.0(Jul 6, 2022)

    🚀 New

    • Add params parse (#1964) https://docs.gofiber.io/api/ctx#paramsparser
    • middleware/monitor: Add some parameters to config for supporting #1936 (#1956) https://docs.gofiber.io/api/middleware/monitor

    🧹 Updates

    • Binds the param string to a struct use params tag (#1968)
    • Client: Remove beta warning (#1951)
    • Bump github.com/valyala/fasthttp from 1.37.0 to 1.38.0 (#1948)
    • Delete a blank line (#1961)
    • Actions for MacOS (#1911)

    🐛 Fixes

    • middleware/logger: TagLatency doesn't have standard format between modes (#1943)
    • middleware/session: fix update cookie. (#1960)

    📚 Documentation

    • Refactor - default error handler & example (#1941)
    • New issue templates (#1945)
    • Translate some lines to turkish (#1954)
    • Update README_fa.md (#1953)
    • Flat-square style for readme badges (#1949)

    Thank you @efectn, @hamidreza01, @ly020044, @marcelogamba, @nnnkkk7, @olongfen and @taheri24 for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.34.1(Jun 14, 2022)

    🧹 Updates

    • Spliting dump request to add Query (#1909)
    • Refactor favicon middleware, avoid magic numbers. (#1919)

    🐛 Fixes

    • Fix GetLocationFromRoute bug for optional params (#1922)

    📚 Documentation

    • Fix typo for paramsInt function (#1913)

    Thank you @ancogamer, @remotenode, @sujit-baniya and @vikpe for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.34.0(May 23, 2022)

    🚀 New

    • Add max size to cache (#1892) https://docs.gofiber.io/api/middleware/cache
    • Add refresh period to monitor mw (#1898) https://docs.gofiber.io/api/middleware/monitor
    • Add page title to monitor mw (#1893) https://docs.gofiber.io/api/middleware/monitor

    🧹 Updates

    • Bump github.com/valyala/fasthttp from 1.35.0 to 1.37.0 (#1882)
    • z/OS Compatibility (#1904)

    Thank you @dranikpg, @jfcg and @philippeleite for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.34.0-rc.1(May 18, 2022)

    🚀 New

    • Add max size to cache (#1892)
    • Add refresh period to monitor mw (#1898)
    • Add page title to monitor mw (#1893)

    🧹 Updates

    • Bump github.com/valyala/fasthttp from 1.35.0 to 1.37.0 (#1882)
    • z/OS Compatibility (#1904)

    Thank you @dranikpg, @jfcg and @philippeleite for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.33.0(May 5, 2022)

    🚀 New

    • Utils: ConvertToBytes (#1875)

    🧹 Updates

    • Reduce duplicate in Get method (#1880)
    • Cannot process array of values in application/x-www-form-urlencoded request (#1873)

    🐛 Fixes

    • Fix expiration time in cache middleware (#1881)

    📚 Documentation

    • Fixed typo (#1891)
    • Typo fix in ParamsInt() (#1863)
    • Remove incorrect links from supporter table (#1862)

    Thank you @ChandanChainani, @TomRomeo, @alfuhigi, @ankush, @breakbuidl, @naveensrinivasan, @webdevium and @witer33 for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.32.0(Apr 15, 2022)

    🚀 New

    • Support adding queries to RedirectToRoute (#1858) https://docs.gofiber.io/api/ctx#redirecttoroute
    • Add AllParams method (#1853) https://docs.gofiber.io/api/ctx#allparams
    • Add context Writef feature function (#1841) https://docs.gofiber.io/api/ctx#writef

    🧹 Updates

    • Use encoding/json (#1851) https://docs.gofiber.io/guide/faster-fiber
    • Bump github.com/valyala/fasthttp from 1.34.0 to 1.35.0 (#1849)
    • RFC: Return an instance of *fiber.Error when no handler found (#1847) https://docs.gofiber.io/extra/faq#how-do-i-handle-custom-404-responses

    🐛 Fixes

    • "Sub fiber's error handlers not working #1839" and "Mount sub fiber app on '/' #1842" (#1848)

    📚 Documentation

    • ListenTLS comment (#1859)

    Thank you @asyslinux, @codemicro, @efectn and @jfcg for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.31.0(Mar 30, 2022)

    🚀 New

    • Allow parsing of square bracket query param (#1818)
    • Change name to get URL from (#1831) https://docs.gofiber.io/api/ctx#getrouteurl

    🧹 Updates

    • EqualFold and docs (#1833)
    • Bump goccy/go-json to 0.9.6 (#1832)

    Thank you @jfcg, @ninadingole and @sujit-baniya for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.30.0(Mar 21, 2022)

    🚀 New

    • Add initial support for hooks (#1777) https://docs.gofiber.io/guide/hooks

    🧹 Updates

    • Add go1.18 to tests and docs (#1819)

    🐛 Fixes

    • Limiter middleware db connection (#1813)

    Thank you @efectn and @qracer for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.29.0(Mar 8, 2022)

    🚀 New

    • Cache middleware: Store e2e headers. (#1807) https://docs.gofiber.io/api/middleware/cache#config

    🧹 Updates

    • Bump github.com/valyala/fasthttp from 1.33.0 to 1.34.0 (#1811)
    • Bump goccy/go-json to v0.9.5 (#1808)
    • Optimize App.buildTree() (#1809)

    🐛 Fixes

    • go-json generator. (#1806)

    📚 Documentation

    • Update some translation (#1815)
    • Cache middleware: Fix comment typo in manager.go. (#1804)
    • Fix goreportcard & pkg.go.dev links in READMEs (#1798)
    • Update turkish readme (#1800)
    • Update readme - cleanup (#1794)

    Thank you @FlameMida, @efectn, @jfcg and @thylong for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.28.0(Feb 28, 2022)

    🚀 New

    • Update TLS Config & Add ListenMutualTLS (#1761) https://docs.gofiber.io/api/app#listentls https://docs.gofiber.io/api/app#listenmutualtls

    🐛 Fixes

    • Restore Original URL of the context after changing it (#1788)
    • Fix for "Why net.Addr is fiber.testAddr, not *net.TCPAddr?🤗 #1574" (#1784)
    • utils.TrimBytes should trim all content (#1779)

    📚 Documentation

    • Inconsistents of storage (#1787)
    • Fixing a mistake of the comment in the limiter package (#1790)
    • Translate some words to bahasa(ID) (#1780)
    • Add SSE example (#1776)

    Thank you @efectn, @fufuok, @geet, @qracer and @rendiputra for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.27.0(Feb 14, 2022)

    🚀 New

    • Bind support for render (#1754) https://docs.gofiber.io/api/ctx#bind
    • Add RedirectToRoute and RedirectBack (#1750) https://docs.gofiber.io/api/ctx#redirecttoroute https://docs.gofiber.io/api/ctx#redirectback
    • Session Only Cookies (#1752) https://docs.gofiber.io/api/ctx#cookie https://docs.gofiber.io/api/middleware/csrf
    • Add ability to restart route handling (#1739) https://docs.gofiber.io/api/ctx#restartrouting
    • Add direct download option when serving static files (#1729) https://docs.gofiber.io/api/app#static
    • SaveFile to default External Storage (#1557) https://docs.gofiber.io/api/ctx#savefiletostorage

    🔙 Reverted ⚠️

    • Backwards incompatible change to fiber.Error (#1768) ⚠️ We have decided to remove the fiber.Errors method and set the fiber.Error to the state before 2.25.0 due to the not downward compatible changes added in the last versions

    🧹 Updates

    • Bump: goccy/go-json to 0.9.4 (#1771)
    • Change default gc interval of internal/memory (#1756)
    • middleware/limiter: Fix file names (#1747) (#1748)
    • Bump github.com/valyala/fasthttp from 1.32.0 to 1.33.0 (#1744)

    🐛 Fixes

    • utils.Trim should trim all string content (#1775)
    • middleware/proxy: Incorrect scheme on proxy.Do (#1762) (#1765)
    • middleware/cache: Mutex lock (#1764)
    • Add missing json errors (#1755)
    • Mounted app views (#1749)

    📚 Documentation

    • fix cache docs error (#1769)

    Thank you @Aliqyan, @Lian1230, @NorbertHauriel, @Trim21, @abhi12299, @apoq, @balcieren, @bigflood, @efectn, @liaohongxing, @mtneug and @sujit-baniya for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.26.0(Feb 3, 2022)

    🚀 New

    • Add Next to Pprof and Expvar middlewares. (#1737) https://docs.gofiber.io/api/middleware/pprof https://docs.gofiber.io/api/middleware/expvar
    • Add retryIf function to client agent (#1726) https://docs.gofiber.io/api/client#retryif
    • Add ReqHeaderParser. (#1721) https://docs.gofiber.io/api/ctx#reqheaderparser
    • Add Route() method like Chi router. (#1713) https://docs.gofiber.io/api/app#route
    • Pass all locals to ctx.Render (#1693) https://docs.gofiber.io/api/fiber#config - PassLocalsToViews

    🧹 Updates

    • limiter: clarify variable name 'expire' (#1742)
    • Added HEAD method to caching (#1730)

    🐛 Fixes

    • Fix route naming when to use group in group. (#1736)
    • Fix NewErrors() and Improve NewError() (#1728) https://docs.gofiber.io/api/fiber#newerror https://docs.gofiber.io/api/fiber#newerrors

    📚 Documentation

    • Add 3rd party middleware eozer/fiber_ldapauth (#1743)
    • Fix: typo (#1741)

    Thank you @NorbertHauriel, @balcieren, @cenkkoroglu, @efectn, @eozer, @jessequinn, @kingdevnl and @vecpeng for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.25.0(Jan 21, 2022)

    🚀 New

    • Add function NewErrors to create multiple new errors (#1701) https://docs.gofiber.io/api/fiber#newerrors

    🧹 Updates

    • Bump github.com/valyala/fasthttp from 1.31.0 to 1.32.0 (#1700)
    • Update goccy/go-json to 0.9.3. (#1709, #1719)
    • Change json tag for EnablePrintRoutes (#1702) https://docs.gofiber.io/api/fiber#config

    🐛 Fixes

    • Add csrf_ to default encrypt cookie exception (#1631) (#1698)

    📚 Documentation

    • Translate some English to zh-TW (#1725)
    • Translate some words to bahasa(ID) (#1717)
    • Fix typos in middleware (#1714)
    • Add Central Kurdish README (#1694)
    • Fix ID translation typo (#1691)
    • Update Turkish translation (#1689)
    • Tweaks README_id.md (#1690)
    • Add emoji for limitations (#1682)

    Thank you @ahmethakanbesel, @amir9480, @bl0cknumber, @clickthisnick, @efectn, @rendiputra, @roj1512 and @vecpeng for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.24.0(Dec 31, 2021)

    🚀 New

    • Add GetRespHeader, GetReqHeaders and TagReqHeaders for logger mw (#1678) https://docs.gofiber.io/api/ctx#getreqheaders https://docs.gofiber.io/api/ctx#getrespheaders https://docs.gofiber.io/api/middleware/logger#constants - TagReqHeaders
    • Print all routes message when server starts (#1677) https://docs.gofiber.io/api/fiber#config - EnablePrintRoutes
    • Add method the get registered handler count. (#1672) https://docs.gofiber.io/api/app#handlerscount
    • Add function to check if request came from localhost (#1671) https://docs.gofiber.io/api/ctx#isfromlocal
    • Add route naming feature. (#1650) https://docs.gofiber.io/api/app#name

    🧹 Updates

    • Improve printRoutesMessage (#1681)
    • Rename handlerCount to handlersCount (#1674)
    • Add no-color compatibility (#1646)

    🐛 Fixes

    • Fix using IP ranges in config.TrustedProxies (#1607) (#1614)
    • Middleware/csrf: unmatched token returns nil error (#1667)
    • goccy/go-json for go1.18-beta1. (#1673)
    • Error handler of app not saved when mounted in group (#1649)

    📚 Documentation

    • Indentions for READMEs (#1680)
    • Improve Chinese translation (#1679)
    • Update README_ko.md (#1653, #1656)
    • Change some Chinese translation (#1648)

    Thank you @efectn, @hi019, @ichxxx, @sangjinsu, @sixcolors and @vecpeng for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.23.0(Dec 6, 2021)

    🚀 New

    • Add disable html support to monitor middleware. (#1620) https://docs.gofiber.io/api/middleware/monitor#config
    • Recover middleware: Added, fiber.Ctx as a first paremeter to StackTrace (#1623) https://docs.gofiber.io/api/middleware/recover#config breaking change to be aware of

    🧹 Updates

    • Improvements for logger middleware (#1645)
    • middleware/session: CookieSameSite default "Lax" (#1638) https://docs.gofiber.io/api/middleware/session#config breaking change to be aware of
    • middleware/csrf: CookieSameSite default "Lax" (#1640) https://docs.gofiber.io/api/middleware/csrf#config breaking change to be aware of

    🐛 Fixes

    • Update goccy/go-json to 0.8.1 (#1644)

    Thank you @efectn, @sixcolors and @turgayozgur for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.22.0(Nov 15, 2021)

    🚀 New

    • [Cache] add ExpirationGenerator for generate custom Expiration (#1618)

    🧹 Updates

    • Tidy up the codebase (#1613)

    📚 Documentation

    • Italian translation (#1621)
    • Fix cache docs error (#1612)

    Thank you @Gusted, @djunny, @liaohongxing and @mancix for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.21.0(Oct 28, 2021)

    🚀 New

    • Add IP ranges support to config.TrustedProxies (#1602) https://docs.gofiber.io/api/fiber#config
    • Add sliding window as option for limiter middleware (#1580) https://docs.gofiber.io/api/middleware/limiter#sliding-window

    🧹 Updates

    • Update fasthttp from v1.29.0 to v1.31.0 (#1603)

    🐛 Fixes

    • Session Id immutable (#1601)
    • Prevent panic on GetTrimmedParam (#1593)
    • ParseVendorSpecificContentType for dart content type (#1594)
    • Remove Test_Limiter_Cheat test (#1595)

    📚 Documentation

    • Cache Middleware - Fix comment (#1597)
    • Etag README.md (#1584)
    • Fix example encoding issue in READMD.md of logger middle… (#1576)
    • Fix "Signaures" (expect "Signatures") word in middleware/encryptcookie/README.md (#1577)

    Thank you @Ci-Jie, @Gusted, @MiWeiss, @alibaraneser and @ivankprod for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.20.2(Oct 13, 2021)

    🧹 Updates

    • Change default json lib. (#1563)

    🐛 Fixes

    • Fix limit middleware skip options (#1568)
    • Fix macOs monitoring middleware: Add missing TargetConditionals.h include (#1572)

    📚 Documentation

    • Fix typo (#1569)

    Thank you @AliYusuf95, @aliereno, @efectn and @xwjdsh for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.20.1(Oct 7, 2021)

  • v2.20.0(Oct 6, 2021)

    🚀 New

    • Support for sub fiber's error handlers (#1560)
    • Add function to override form decoder setting (#1100, #1555) https://docs.gofiber.io/api/ctx#setparserdecoder
    • Support logging color for custom logging formats (#1513)
    • Feature: limiter middleware new skip options implemented (#1542) https://docs.gofiber.io/api/middleware/limiter
    • Add one minute load avg for monitor middleware (#1530)

    🧹 Updates

    • Add test case for QueryParser for SetParserDecoder (#1562)

    🐛 Fixes

    • Register static file routing with trailing slash (#1556)
    • Static file routing path rewrite. (#1538)
    • Fix c.OriginalURL() changed after SendFile (#1553)
    • File opening path and directory browsing path of filesystem (#1547)

    📚 Documentation

    • Update Spanish documentation (#1554)
    • Fix language mistakes in Turkish (#1552)
    • Translated some sentences for ja-version (#1551)
    • Update README with elastic/apmfiber middleware (#1540)

    Thank you @Perniciosius, @Unickorn, @aliereno, @amalshaji, @efectn, @fufuok, @ivanvc, @josebalius, @ppmasa8 and @rockcreation7 for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.19.0(Sep 21, 2021)

    🚀 New

    • Add next support for Monitor middleware. (#1527)

    🐛 Fixes

    • Get unexpected results from cache #1529 (#1531)
    • Fix Mutability issue of UserContext in fiber.Ctx (#1522)
    • Corrects ipv6 loopback ip shown on UI (#1517)

    📚 Documentation

    • fixed translation issues and translate more area in turkish readme (#1525)
    • Translate External Middleware section of README to Chinese. (#1523)
    • Add Chinese translation for internal middleware (#1511)
    • Translate Limitations section of README to Chinese (#1510)
    • Translated limitation section (#1509)
    • Add Limitations section to README (#1508)

    Thank you @Ja7ad, @Lynicis, @Thammachart, @ZACHSTRIVES, @efectn, @hi019, @j178, @techytoes and @ut-zero for making this update possible.

    Source code(tar.gz)
    Source code(zip)
  • v2.18.0(Aug 26, 2021)

    🚀 New

    • Add encrypt cookies middleware (#1343) https://docs.gofiber.io/api/middleware/encryptcookie
    • Add JSONDecoder to config (#1489)

    🧹 Updates

    • Session should not regenerate the ID in case Get() returned nil (#1493)
    • Improve startup message tests (#1504)
    • Update fasthttp from v1.26 to v1.29 (#1503)
    • Add test run for go1.17 (#1501)

    🐛 Fixes

    • panic: unaligned 64-bit atomic operation [32 bit machines] #1487 (#1502)
    • ctx.BodyParser was not able to parse vendor specific content type (#1506)

    Thank you @amir9480, @natebwangsut, @pd-pranay and @shirshendubhowmick for making this update possible.

    Source code(tar.gz)
    Source code(zip)
Owner
Fiber
🚀 Fiber is an Express inspired web framework written in Go with 💖
Fiber
A Go framework for building JSON web services inspired by Dropwizard

Tiger Tonic A Go framework for building JSON web services inspired by Dropwizard. If HTML is your game, this will hurt a little. Like the Go language

Richard Crowley 1000 Nov 12, 2022
Simple and lightweight Go web framework inspired by koa

VOX A golang web framework for humans, inspired by Koa heavily. Getting started Installation Using the go get power: $ go get -u github.com/aisk/vox B

An Long 79 Sep 27, 2022
Rocinante is a gin inspired web framework built on top of net/http.

Rocinante Rocinante is a gin inspired web framework built on top of net/http. ⚙️ Installation $ go get -u github.com/fskanokano/rocinante-go ⚡️ Quicks

null 3 Jul 27, 2021
Gouweb: A web framework for go inspired by laravel

gouweb is a web framework for go inspired by laravel Installation go get -u gith

null 2 Feb 17, 2022
Go-igni: monolith-based web-framework in Go Inspired by classical PHP Frameworks like CodeIgnier & Laravel

go-igni Web Framework in Go About This is research project about developing monolith-based web-framework in Go Inspired by classical PHP Frameworks li

Denis 1 Feb 25, 2022
Flamingo Framework and Core Library. Flamingo is a go based framework for pluggable web projects. It is used to build scalable and maintainable (web)applications.

Flamingo Framework Flamingo is a web framework based on Go. It is designed to build pluggable and maintainable web projects. It is production ready, f

Flamingo 327 Nov 13, 2022
Golanger Web Framework is a lightweight framework for writing web applications in Go.

/* Copyright 2013 Golanger.com. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except

golanger 298 Nov 14, 2022
The jin is a simplified version of the gin web framework that can help you quickly understand the core principles of a web framework.

jin About The jin is a simplified version of the gin web framework that can help you quickly understand the core principles of a web framework. If thi

null 8 Jul 14, 2022
⚡ Rux is an simple and fast web framework. support middleware, compatible http.Handler interface. 简单且快速的 Go web 框架,支持中间件,兼容 http.Handler 接口

Rux Simple and fast web framework for build golang HTTP applications. NOTICE: v1.3.x is not fully compatible with v1.2.x version Fast route match, sup

Gookit 83 Oct 3, 2022
henrylee2cn 1.6k Nov 18, 2022
Roche is a Code Generator and Web Framework, makes web development super concise with Go, CleanArch

It is still under development, so please do not use it. We plan to release v.1.0.0 in the summer. roche is a web framework optimized for microservice

Riita 14 Sep 19, 2022
A powerful go web framework for highly scalable and resource efficient web application

webfr A powerful go web framework for highly scalable and resource efficient web application Installation: go get -u github.com/krishpranav/webfr Exa

Krisna Pranav 13 Nov 28, 2021
A powerful go web framework for highly scalable and resource efficient web application

A powerful go web framework for highly scalable and resource efficient web application

null 22 Oct 3, 2022
A web app built using Go Buffalo web framework

Welcome to Buffalo Thank you for choosing Buffalo for your web development needs. Database Setup It looks like you chose to set up your application us

Mike Okoth 0 Feb 7, 2022
Gin is a HTTP web framework written in Go (Golang).

Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.

Gin-Gonic 64.6k Nov 23, 2022
BANjO is a simple web framework written in Go (golang)

BANjO banjo it's a simple web framework for building simple web applications Install $ go get github.com/nsheremet/banjo Example Usage Simple Web App

Nazarii Sheremet 20 Sep 27, 2022
Gearbox :gear: is a web framework written in Go with a focus on high performance

gearbox ⚙️ is a web framework for building micro services written in Go with a focus on high performance. It's built on fasthttp which is up to 10x fa

Gearbox 687 Nov 12, 2022
Tigo is an HTTP web framework written in Go (Golang).It features a Tornado-like API with better performance. Tigo是一款用Go语言开发的web应用框架,API特性类似于Tornado并且拥有比Tornado更好的性能。

Tigo(For English Documentation Click Here) 一个使用Go语言开发的web框架。 相关工具及插件 tiger tiger是一个专门为Tigo框架量身定做的脚手架工具,可以使用tiger新建Tigo项目或者执行其他操作。

Karl 1.4k Nov 22, 2022
go-zero is a web and rpc framework written in Go. It's born to ensure the stability of the busy sites with resilient design. Builtin goctl greatly improves the development productivity.

go-zero English | 简体中文 0. what is go-zero go-zero is a web and rpc framework that with lots of engineering practices builtin. It’s born to ensure the

好未来技术 21.6k Nov 22, 2022