You've already forked CasaOS
mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-07-06 23:37:26 +02:00
feat: migrate gin to echo (#1854)
This commit is contained in:
11
pkg/utils/default_query.go
Normal file
11
pkg/utils/default_query.go
Normal file
@ -0,0 +1,11 @@
|
||||
package utils
|
||||
|
||||
import "github.com/labstack/echo/v4"
|
||||
|
||||
func DefaultQuery(ctx echo.Context, key string, defaultValue string) string {
|
||||
if value := ctx.QueryParam(key); value != "" {
|
||||
return value
|
||||
}
|
||||
|
||||
return defaultValue
|
||||
}
|
Reference in New Issue
Block a user