Official Go implementation of the Ethereum protocol
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
go-ethereum/vendor/gopkg.in/sourcemap.v1
Péter Szilágyi 289b30715d Godeps, vendor: convert dependency management to trash (#3198) 8 years ago
..
base64vlq Godeps, vendor: convert dependency management to trash (#3198) 8 years ago
.travis.yml Godeps, vendor: convert dependency management to trash (#3198) 8 years ago
LICENSE Godeps, vendor: convert dependency management to trash (#3198) 8 years ago
Makefile Godeps, vendor: convert dependency management to trash (#3198) 8 years ago
README.md Godeps, vendor: convert dependency management to trash (#3198) 8 years ago
consumer.go Godeps, vendor: convert dependency management to trash (#3198) 8 years ago

README.md

Source Maps consumer for Golang Build Status

Installation

Install:

go get gopkg.in/sourcemap.v1

Quickstart

func ExampleParse() {
	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)
	// Output: http://code.jquery.com/jquery-2.0.3.js apply 4360 27 true
}