MCPcopy Create free account
hub / github.com/dropbox/dbxcli / decodeTeamOperationOutput

Function decodeTeamOperationOutput

cmd/team_json_test.go:404–417  ·  view source on GitHub ↗
(t *testing.T, data []byte)

Source from the content-addressed store, hash-verified

402}
403
404func decodeTeamOperationOutput[I, R any](t *testing.T, data []byte) teamOperationOutputForTest[I, R] {
405 t.Helper()
406 var got teamOperationOutputForTest[I, R]
407 if err := json.Unmarshal(data, &got); err != nil {
408 t.Fatalf("decode JSON output: %v\noutput: %s", err, string(data))
409 }
410 if got.Warnings == nil {
411 t.Fatalf("warnings = nil, want empty array")
412 }
413 if len(got.Warnings) != 0 {
414 t.Fatalf("warnings = %#v, want empty", got.Warnings)
415 }
416 return got
417}
418
419func onlyTeamResult[I, R any](t *testing.T, got teamOperationOutputForTest[I, R]) teamOperationResultForTest[I, R] {
420 t.Helper()

Calls

no outgoing calls

Tested by

no test coverage detected