MCPcopy Create free account
hub / github.com/crawshaw/jsonfile / mustWrite

Function mustWrite

jsonfile_test.go:16–21  ·  view source on GitHub ↗
(t *testing.T, data *JSONFile[Data], fn func(db *Data))

Source from the content-addressed store, hash-verified

14)
15
16func mustWrite[Data any](t *testing.T, data *JSONFile[Data], fn func(db *Data)) {
17 t.Helper()
18 if err := data.Write(func(db *Data) error { fn(db); return nil }); err != nil {
19 t.Fatal(err)
20 }
21}
22
23func TestBasic(t *testing.T) {
24 t.Parallel()

Callers 4

TestBasicFunction · 0.85
TestFileErrorFunction · 0.85
TestNoAliasFunction · 0.85

Calls 1

WriteMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…