MCPcopy
hub / github.com/gin-gonic/gin / chooseData

Function chooseData

utils.go:100–108  ·  view source on GitHub ↗
(custom, wildcard any)

Source from the content-addressed store, hash-verified

98}
99
100func chooseData(custom, wildcard any) any {
101 if custom != nil {
102 return custom
103 }
104 if wildcard != nil {
105 return wildcard
106 }
107 panic("negotiation config is invalid")
108}
109
110func parseAccept(acceptHeader string) []string {
111 parts := strings.Split(acceptHeader, ",")

Callers 2

TestChooseDataFunction · 0.85
NegotiateMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestChooseDataFunction · 0.68