MCPcopy
hub / github.com/IceWhaleTech/CasaOS / DefaultQuery

Function DefaultQuery

pkg/utils/default_query.go:5–11  ·  view source on GitHub ↗
(ctx echo.Context, key string, defaultValue string)

Source from the content-addressed store, hash-verified

3import "github.com/labstack/echo/v4"
4
5func DefaultQuery(ctx echo.Context, key string, defaultValue string) string {
6 if value := ctx.QueryParam(key); value != "" {
7 return value
8 }
9
10 return defaultValue
11}

Callers 5

GetFileUploadFunction · 0.92
WsSshFunction · 0.92
GetCasaOSErrorLogsFunction · 0.92
GetPortFunction · 0.92
PortCheckFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected