package sourcemap

Import Path
	github.com/go-sourcemap/sourcemap (on go.dev)

Dependency Relation
	imports 9 packages, and imported by 2 packages

Involved Source Files consumer.go mappings.go
Code Examples package main import ( "fmt" "io/ioutil" "net/http" "github.com/go-sourcemap/sourcemap" ) func main() { mapURL := "http://code.jquery.com/jquery-2.0.3.min.map" resp, err := http.Get(mapURL) if err != nil { panic(err) } defer resp.Body.Close() b, err := ioutil.ReadAll(resp.Body) if err != nil { panic(err) } smap, err := sourcemap.Parse(mapURL, b) if err != nil { panic(err) } line, column := 5, 6789 file, fn, line, col, ok := smap.Source(line, column) fmt.Println(file, fn, line, col, ok) }
Package-Level Type Names (only one)
/* sort by: | */
File returns an optional name of the generated code that this source map is associated with. Source returns the original source, name, line, and column information for the generated source's line and column positions. SourceContent returns the original source content for the source. (*Consumer) SourcemapURL() string func Parse(sourcemapURL string, b []byte) (*Consumer, error) func github.com/dop251/goja/file.(*File).SetSourceMap(m *Consumer)
Package-Level Functions (only one)
func Parse(sourcemapURL string, b []byte) (*Consumer, error)