MCPcopy Create free account
hub / github.com/ShukeBta/MediaStationGo / firstStringFromMap

Function firstStringFromMap

internal/handler/emby_auth_request.go:142–154  ·  view source on GitHub ↗
(body map[string]any, keys ...string)

Source from the content-addressed store, hash-verified

140}
141
142func firstStringFromMap(body map[string]any, keys ...string) string {
143 if len(body) == 0 {
144 return ""
145 }
146 for _, key := range keys {
147 if value, ok := body[key]; ok {
148 if s, ok := value.(string); ok {
149 return strings.TrimSpace(s)
150 }
151 }
152 }
153 return ""
154}
155
156func firstFormValue(c *gin.Context, keys ...string) string {
157 for _, key := range keys {

Callers 1

fillEmbyAuthFromMapFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected