MCPcopy Create free account
hub / github.com/QuantumNous/new-api / equalStringPtr

Function equalStringPtr

controller/channel.go:1149–1157  ·  view source on GitHub ↗

equalStringPtr 比较两个 *string 是否相等(均为 nil 视为相等)。

(a, b *string)

Source from the content-addressed store, hash-verified

1147
1148// equalStringPtr 比较两个 *string 是否相等(均为 nil 视为相等)。
1149func equalStringPtr(a, b *string) bool {
1150 if a == nil && b == nil {
1151 return true
1152 }
1153 if a == nil || b == nil {
1154 return false
1155 }
1156 return *a == *b
1157}
1158
1159func FetchModels(c *gin.Context) {
1160 var req struct {

Callers 2

UpdateChannelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected