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

Function hasEmptyResponse

coderd/database/dbauthz/setup_test.go:392–408  ·  view source on GitHub ↗
(values []reflect.Value)

Source from the content-addressed store, hash-verified

390}
391
392func hasEmptyResponse(values []reflect.Value) bool {
393 for _, r := range values {
394 if r.Kind() == reflect.Slice || r.Kind() == reflect.Array {
395 if r.Len() == 0 {
396 return true
397 }
398 }
399
400 // Special case for int64, as it's the return type for count queries.
401 if r.Kind() == reflect.Int64 {
402 if r.Int() == 0 {
403 return true
404 }
405 }
406 }
407 return false
408}
409
410func splitResp(t *testing.T, values []reflect.Value) ([]reflect.Value, error) {
411 outputs := []reflect.Value{}

Callers 1

Calls 2

IntMethod · 0.80
LenMethod · 0.45

Tested by

no test coverage detected