MCPcopy Create free account
hub / github.com/AandStep/ResultV / headerIsTruthy

Function headerIsTruthy

app.go:1568–1576  ·  view source on GitHub ↗
(h http.Header, key string)

Source from the content-addressed store, hash-verified

1566}
1567
1568func headerIsTruthy(h http.Header, key string) bool {
1569 v := strings.ToLower(strings.TrimSpace(h.Get(key)))
1570 switch v {
1571 case "1", "true", "yes", "on":
1572 return true
1573 default:
1574 return false
1575 }
1576}
1577
1578func subscriptionEmptyBodyError(h http.Header) error {
1579 title := parseSubscriptionHeaderText(h.Get("Profile-Title"))

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected