Helper function to load JSON file
(filename string, v interface{})
| 129 | |
| 130 | // Helper function to load JSON file |
| 131 | func (dl *DataLoader) loadJSONFile(filename string, v interface{}) error { |
| 132 | filePath := filepath.Join(dl.dataPath, filename) |
| 133 | data, err := os.ReadFile(filePath) |
| 134 | if err != nil { |
| 135 | return err |
| 136 | } |
| 137 | return json.Unmarshal(data, v) |
| 138 | } |
| 139 | |
| 140 | // LoadPositions loads positions from JSON file |
| 141 | func (dl *DataLoader) LoadPositions() (*types.PositionsResponse, error) { |
no outgoing calls