I ran the 'Hello World' code mentioned in the official GoFiber document document but got the following error:
$ go run main.go# github.com/gofiber/fiber/home/user/go/pkg/mod/github.com/gofiber/fiber@v1.14.6/path.go:175:21: undefined: utils.GetTrimmedParam
The code that I ran was:
package mainimport "github.com/gofiber/fiber"func main() { app := fiber.New() app.Get("/", func(c *fiber.Ctx) { c.Send("Hello, World!") }) app.Listen(3000)}
What I did before running this code was as follows:
go mod init main$ go get -u github.com/gofiber/fiber$ go get -u github.com/gofiber/fiber/v2go: added github.com/gofiber/fiber/v2 v2.52.5go: added github.com/mattn/go-runewidth v0.0.15go: added github.com/rivo/uniseg v0.4.7$ go get -u github.com/gofiber/fiber/v3go: added github.com/gofiber/fiber/v3 v3.0.0-beta.3go: added github.com/gofiber/utils/v2 v2.0.0-beta.5go mod tidy
Can anyone let me know what I am doing wrong?