MCPcopy Create free account
hub / github.com/cloudwan/gohan / readFixtures

Function readFixtures

db/sql/sql_test.go:685–696  ·  view source on GitHub ↗
(path string, v interface{})

Source from the content-addressed store, hash-verified

683}
684
685func readFixtures(path string, v interface{}) {
686 f, err := os.Open(path)
687 if err != nil {
688 panic("failed to open test fixtures")
689 }
690 defer f.Close()
691
692 err = json.NewDecoder(f).Decode(&v)
693 if err != nil {
694 panic("failed parse test fixtures")
695 }
696}

Callers 1

sql_test.goFile · 0.85

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected