mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-08-27 21:02:09 +00:00
* WIP * WIP * WIP * Update socket_server_handlers.go and socket_routes.go * Fix stuck sockets * Update go.mod, go.sum, and 5 more files... * Update socket_routes.go * Update Dockerfile, go.sum, and fiber_middleware.go * fix analyze Co-authored-by: RamiBerm <rami.berman@up9.com>
19 lines
322 B
Go
19 lines
322 B
Go
package routes
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"net/http"
|
|
)
|
|
|
|
// NotFoundRoute defines the 404 Error route.
|
|
func NotFoundRoute(app *gin.Engine) {
|
|
app.Use(
|
|
func(c *gin.Context) {
|
|
c.JSON(http.StatusNotFound, map[string]interface{}{
|
|
"error": true,
|
|
"msg": "sorry, endpoint is not found",
|
|
})
|
|
},
|
|
)
|
|
}
|