MCPcopy
hub / github.com/gofiber/fiber / defaultString

Function defaultString

helpers.go:223–228  ·  view source on GitHub ↗

defaultString returns the value or a default value if it is set

(value string, defaultValue []string)

Source from the content-addressed store, hash-verified

221
222// defaultString returns the value or a default value if it is set
223func defaultString(value string, defaultValue []string) string {
224 if value == "" && len(defaultValue) > 0 {
225 return defaultValue[0]
226 }
227 return value
228}
229
230func getGroupPath(prefix, path string) string {
231 if path == "" {

Callers 4

CookiesMethod · 0.85
FormValueMethod · 0.85
ParamsMethod · 0.85
GetMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected