rename debug path to raw

This commit is contained in:
Gianni Carafa
2023-11-02 19:19:13 +01:00
parent ec7f2089fc
commit 45a3fe2adf
3 changed files with 5 additions and 5 deletions

View File

@@ -9,7 +9,7 @@ import (
"github.com/gofiber/fiber/v2"
)
func Debug(c *fiber.Ctx) error {
func Raw(c *fiber.Ctx) error {
// Get the url from the URL
urlQuery := c.Params("*")

View File

@@ -11,9 +11,9 @@ import (
"github.com/gofiber/fiber/v2"
)
func TestDebug(t *testing.T) {
func TestRaw(t *testing.T) {
app := fiber.New()
app.Get("/debug/*", Debug)
app.Get("/raw/*", Raw)
testCases := []struct {
name string
@@ -34,7 +34,7 @@ func TestDebug(t *testing.T) {
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
req := httptest.NewRequest(http.MethodGet, "/debug/"+tc.url, nil)
req := httptest.NewRequest(http.MethodGet, "/raw/"+tc.url, nil)
resp, err := app.Test(req)
if err != nil {
t.Fatalf("unexpected error: %v", err)