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

Function decodeJSONFromZip

cli/support_test.go:452–458  ·  view source on GitHub ↗
(t *testing.T, f *zip.File, dest any)

Source from the content-addressed store, hash-verified

450}
451
452func decodeJSONFromZip(t *testing.T, f *zip.File, dest any) {
453 t.Helper()
454 rc, err := f.Open()
455 require.NoError(t, err, "open file from zip")
456 defer rc.Close()
457 require.NoError(t, json.NewDecoder(rc).Decode(&dest))
458}
459
460func readBytesFromZip(t *testing.T, f *zip.File) []byte {
461 t.Helper()

Callers 1

assertBundleContentsFunction · 0.85

Calls 3

HelperMethod · 0.65
CloseMethod · 0.65
OpenMethod · 0.45

Tested by

no test coverage detected