Skip to content

Commit 5e8d581

Browse files
committed
chore: cleanup
1 parent def6f17 commit 5e8d581

File tree

3 files changed

+8
-18
lines changed

3 files changed

+8
-18
lines changed

.travis.yml

-12
This file was deleted.

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Source maps consumer for Golang
22

3-
[![Build Status](https://travis-ci.org/go-sourcemap/sourcemap.svg)](https://travis-ci.org/go-sourcemap/sourcemap)
43
[![PkgGoDev](https://pkg.go.dev/badge/github.com/go-sourcemap/sourcemap)](https://pkg.go.dev/github.com/go-sourcemap/sourcemap)
54

6-
> :heart: [**Uptrace.dev** - distributed traces, logs, and errors in one place](https://uptrace.dev)
5+
> This package is brought to you by :star: [**uptrace/uptrace**](https://github.com/uptrace/uptrace).
6+
> Uptrace is an open-source APM tool that supports distributed tracing, metrics, and logs. You can
7+
> use it to monitor applications and set up automatic alerts to receive notifications via email,
8+
> Slack, Telegram, and others.
79
810
## Installation
911

consumer.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ func (c *Consumer) Source(
184184
func (c *Consumer) source(
185185
m *sourceMap, genLine, genColumn int,
186186
) (source, name string, line, column int, ok bool) {
187+
if len(m.mappings) == 0 {
188+
return
189+
}
190+
187191
i := sort.Search(len(m.mappings), func(i int) bool {
188192
m := &m.mappings[i]
189193
if int(m.genLine) == genLine {
@@ -195,10 +199,6 @@ func (c *Consumer) source(
195199
var match *mapping
196200
// Mapping not found
197201
if i == len(m.mappings) {
198-
// Empty mappings
199-
if len(m.mappings) == 0 {
200-
return
201-
}
202202
// lets see if the line is correct but the column is bigger
203203
match = &m.mappings[i-1]
204204
if int(match.genLine) != genLine {

0 commit comments

Comments
 (0)