GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - go-sourcemap/sourcemap: Source maps consumer for Golang

BranchesTags
Open more actions menu

Latest commit

 

History

51 Commits
51 Commits

Folders and files

NameName
Last commit message
Last commit date
internal/base64vlq
internal/base64vlq
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
bench_test.go
bench_test.go
 
 
consumer.go
consumer.go
 
 
consumer_test.go
consumer_test.go
 
 
example_test.go
example_test.go
 
 
json_decoder.go
json_decoder.go
 
 
json_decoder_v2.go
json_decoder_v2.go
 
 
mappings.go
mappings.go
 
 
mappings_test.go
mappings_test.go
 
 

Repository files navigation

Source maps consumer for Golang

PkgGoDev

This package is brought to you by ⭐ uptrace/uptrace. Uptrace is an open-source APM tool that supports distributed tracing, metrics, and logs. You can use it to monitor applications and set up automatic alerts to receive notifications via email, Slack, Telegram, and others.

Installation

Install:

go get -u github.com/go-sourcemap/sourcemap

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
}

About

Source maps consumer for Golang

godoc.org/github.com/go-sourcemap/sourcemap

Topics

gogolangsourcemap

Resources

Readme
BSD-2-Clause license
Activity
Custom properties

Stars

83 stars

Watchers

15 watching

Forks

24 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.