Open reads and parses a .dmap file from disk. Returns an error if the file cannot be read or is invalid.
(path string)
| 34 | // Open reads and parses a .dmap file from disk. |
| 35 | // Returns an error if the file cannot be read or is invalid. |
| 36 | func Open(path string) (*Reader, error) { |
| 37 | data, err := os.ReadFile(path) |
| 38 | if err != nil { |
| 39 | return nil, fmt.Errorf("failed to read .dmap file: %w", err) |
| 40 | } |
| 41 | return OpenBytes(data) |
| 42 | } |
| 43 | |
| 44 | // OpenBytes parses a .dmap v3 file from in-memory bytes. |
| 45 | // Returns ErrMigrationRequired for v1/v2 files (migration required). |