MCPcopy Index your code
hub / github.com/coder/coder / coalesceStringSlice

Function coalesceStringSlice

coderd/mcp.go:1331–1336  ·  view source on GitHub ↗

coalesceStringSlice returns ss if non-nil, otherwise an empty non-nil slice. This prevents pq.Array from sending NULL for NOT NULL text[] columns.

(ss []string)

Source from the content-addressed store, hash-verified

1329// non-nil slice. This prevents pq.Array from sending NULL for
1330// NOT NULL text[] columns.
1331func coalesceStringSlice(ss []string) []string {
1332 if ss == nil {
1333 return []string{}
1334 }
1335 return ss
1336}
1337
1338// mcpOAuth2Discovery holds the result of MCP OAuth2 auto-discovery
1339// and Dynamic Client Registration.

Callers 3

createMCPServerConfigMethod · 0.85
updateMCPServerConfigMethod · 0.85
convertMCPServerConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected