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

Function DefaultPostForm

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

Source from the content-addressed store, hash-verified

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

Callers 1

PostFileUploadFunction · 0.92

Calls 1

RequestMethod · 0.80

Tested by

no test coverage detected