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

Method WriteFile

pkg/sourcemap/dmap/writer.go:27–33  ·  view source on GitHub ↗

WriteFile writes .dmap v3 format with line and column mappings directly to a file

(path string, lineMappings []sourcemap.LineMapping, colMappings []sourcemap.ColumnMapping)

Source from the content-addressed store, hash-verified

25
26// WriteFile writes .dmap v3 format with line and column mappings directly to a file
27func (w *Writer) WriteFile(path string, lineMappings []sourcemap.LineMapping, colMappings []sourcemap.ColumnMapping) error {
28 data, err := w.Write(lineMappings, colMappings)
29 if err != nil {
30 return err
31 }
32 return os.WriteFile(path, data, 0644)
33}
34
35// countLineDirectives counts the number of //line directives in the source
36func countLineDirectives(src []byte) uint32 {

Calls 1

WriteMethod · 0.95