MCPcopy Create free account
hub / github.com/compozy/agh / firstNonEmptyString

Function firstNonEmptyString

internal/api/httpapi/middleware.go:203–210  ·  view source on GitHub ↗
(values ...string)

Source from the content-addressed store, hash-verified

201}
202
203func firstNonEmptyString(values ...string) string {
204 for _, value := range values {
205 if trimmed := strings.TrimSpace(value); trimmed != "" {
206 return trimmed
207 }
208 }
209 return ""
210}
211
212func canonicalHost(value string) string {
213 host := strings.TrimSpace(value)

Callers 1

canonicalOriginFromHostFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected