(fn string, value interface{})
| 58 | } |
| 59 | |
| 60 | func readJSONFile(fn string, value interface{}) error { |
| 61 | file, err := os.Open(fn) |
| 62 | if err != nil { |
| 63 | return err |
| 64 | } |
| 65 | defer file.Close() |
| 66 | |
| 67 | err = readJSON(file, value) |
| 68 | if err != nil { |
| 69 | return fmt.Errorf("%s in file %s", err.Error(), fn) |
| 70 | } |
| 71 | return nil |
| 72 | } |
| 73 | |
| 74 | // findLine returns the line number for the given offset into data. |
| 75 | func findLine(data []byte, offset int64) (line int) { |
no test coverage detected