(path string, v interface{})
| 683 | } |
| 684 | |
| 685 | func 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 | } |