Skip to content

CasaOS - A simple, easy-to-use, elegant open-source Personal Cloud system.

221 B
Raw Blame
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
}