MCPcopy
hub / github.com/MadAppGang/dingo / Open

Function Open

pkg/sourcemap/dmap/reader.go:36–42  ·  view source on GitHub ↗

Open reads and parses a .dmap file from disk. Returns an error if the file cannot be read or is invalid.

(path string)

Source from the content-addressed store, hash-verified

34// Open reads and parses a .dmap file from disk.
35// Returns an error if the file cannot be read or is invalid.
36func 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).

Callers 2

GetMethod · 0.92
getReaderMethod · 0.92

Calls 2

OpenBytesFunction · 0.85
ErrorfMethod · 0.65

Tested by

no test coverage detected