aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/gopkg.in
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-02-17 00:23:58 +0800
committerGitHub <noreply@github.com>2017-02-17 00:23:58 +0800
commitbdef758d5c6d397584d0c35e53d6f6c318e61351 (patch)
tree0beb8c96c7bf6a5a82434ed79218e822927434c3 /vendor/gopkg.in
parentc8695fae359aa327da9203a57ffaf4f2d47d4370 (diff)
parent2c4455b12aca82ccd29c05c1750c25430867e545 (diff)
downloaddexon-bdef758d5c6d397584d0c35e53d6f6c318e61351.tar.gz
dexon-bdef758d5c6d397584d0c35e53d6f6c318e61351.tar.zst
dexon-bdef758d5c6d397584d0c35e53d6f6c318e61351.zip
Merge pull request #3679 from fjl/vendor-govendor
vendor: update dependencies with github.com/kardianos/govendor
Diffstat (limited to 'vendor/gopkg.in')
-rw-r--r--vendor/gopkg.in/check.v1/.gitignore4
-rw-r--r--vendor/gopkg.in/check.v1/.travis.yml3
-rw-r--r--vendor/gopkg.in/fatih/set.v0/.travis.yml3
-rw-r--r--vendor/gopkg.in/natefinch/npipe.v2/.gitignore22
-rw-r--r--vendor/gopkg.in/sourcemap.v1/.travis.yml12
-rw-r--r--vendor/gopkg.in/sourcemap.v1/Makefile5
-rw-r--r--vendor/gopkg.in/sourcemap.v1/base64vlq/base64_vlq.go21
-rw-r--r--vendor/gopkg.in/sourcemap.v1/consumer.go202
-rw-r--r--vendor/gopkg.in/sourcemap.v1/sourcemap.go157
-rw-r--r--vendor/gopkg.in/urfave/cli.v1/.gitignore2
-rw-r--r--vendor/gopkg.in/urfave/cli.v1/.travis.yml39
11 files changed, 181 insertions, 289 deletions
diff --git a/vendor/gopkg.in/check.v1/.gitignore b/vendor/gopkg.in/check.v1/.gitignore
deleted file mode 100644
index 191a5360b..000000000
--- a/vendor/gopkg.in/check.v1/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-_*
-*.swp
-*.[568]
-[568].out
diff --git a/vendor/gopkg.in/check.v1/.travis.yml b/vendor/gopkg.in/check.v1/.travis.yml
deleted file mode 100644
index ead6735fc..000000000
--- a/vendor/gopkg.in/check.v1/.travis.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-language: go
-
-go_import_path: gopkg.in/check.v1
diff --git a/vendor/gopkg.in/fatih/set.v0/.travis.yml b/vendor/gopkg.in/fatih/set.v0/.travis.yml
deleted file mode 100644
index b05e4c53f..000000000
--- a/vendor/gopkg.in/fatih/set.v0/.travis.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-language: go
-go: 1.2
-
diff --git a/vendor/gopkg.in/natefinch/npipe.v2/.gitignore b/vendor/gopkg.in/natefinch/npipe.v2/.gitignore
deleted file mode 100644
index 00268614f..000000000
--- a/vendor/gopkg.in/natefinch/npipe.v2/.gitignore
+++ /dev/null
@@ -1,22 +0,0 @@
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-
-# Folders
-_obj
-_test
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-*.exe
diff --git a/vendor/gopkg.in/sourcemap.v1/.travis.yml b/vendor/gopkg.in/sourcemap.v1/.travis.yml
deleted file mode 100644
index 814f0e51a..000000000
--- a/vendor/gopkg.in/sourcemap.v1/.travis.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-language: go
-
-go:
- - 1.2
- - 1.3
- - 1.4
- - 1.5
-
-install:
- - mkdir -p $HOME/gopath/src/gopkg.in
- - mv $HOME/gopath/src/github.com/go-sourcemap/sourcemap $HOME/gopath/src/gopkg.in/sourcemap.v1
- - cd $HOME/gopath/src/gopkg.in/sourcemap.v1
diff --git a/vendor/gopkg.in/sourcemap.v1/Makefile b/vendor/gopkg.in/sourcemap.v1/Makefile
index 08381f928..161c4fd0f 100644
--- a/vendor/gopkg.in/sourcemap.v1/Makefile
+++ b/vendor/gopkg.in/sourcemap.v1/Makefile
@@ -1,3 +1,4 @@
all:
- go test ./... -test.v -test.cpu=1,2,4
- go test ./... -test.v -test.short -test.race
+ go test ./...
+ go test ./... -short -race
+ go vet
diff --git a/vendor/gopkg.in/sourcemap.v1/base64vlq/base64_vlq.go b/vendor/gopkg.in/sourcemap.v1/base64vlq/base64_vlq.go
index 598b40460..16cbfb56f 100644
--- a/vendor/gopkg.in/sourcemap.v1/base64vlq/base64_vlq.go
+++ b/vendor/gopkg.in/sourcemap.v1/base64vlq/base64_vlq.go
@@ -14,22 +14,19 @@ const (
vlqContinuationBit = vlqBase
)
-var (
- decodeMap [256]int
-)
+var decodeMap [256]byte
func init() {
for i := 0; i < len(encodeStd); i++ {
- decodeMap[encodeStd[i]] = i
+ decodeMap[encodeStd[i]] = byte(i)
}
}
func toVLQSigned(n int) int {
if n < 0 {
return -n<<1 + 1
- } else {
- return n << 1
}
+ return n << 1
}
func fromVLQSigned(n int) int {
@@ -51,7 +48,7 @@ func NewEncoder(w io.ByteWriter) *Encoder {
}
}
-func (enc *Encoder) Encode(n int) error {
+func (enc Encoder) Encode(n int) error {
n = toVLQSigned(n)
for digit := vlqContinuationBit; digit&vlqContinuationBit != 0; {
digit = n & vlqBaseMask
@@ -59,6 +56,7 @@ func (enc *Encoder) Encode(n int) error {
if n > 0 {
digit |= vlqContinuationBit
}
+
err := enc.w.WriteByte(encodeStd[digit])
if err != nil {
return err
@@ -77,7 +75,7 @@ func NewDecoder(r io.ByteReader) *Decoder {
}
}
-func (dec *Decoder) Decode() (n int, err error) {
+func (dec Decoder) Decode() (n int, err error) {
shift := uint(0)
for continuation := true; continuation; {
c, err := dec.r.ReadByte()
@@ -85,10 +83,9 @@ func (dec *Decoder) Decode() (n int, err error) {
return 0, err
}
- digit := decodeMap[c]
- continuation = digit&vlqContinuationBit != 0
- digit &= vlqBaseMask
- n = n + digit<<shift
+ c = decodeMap[c]
+ continuation = c&vlqContinuationBit != 0
+ n += int(c&vlqBaseMask) << shift
shift += vlqBaseShift
}
return fromVLQSigned(n), nil
diff --git a/vendor/gopkg.in/sourcemap.v1/consumer.go b/vendor/gopkg.in/sourcemap.v1/consumer.go
index b66761a6c..3bed06a2a 100644
--- a/vendor/gopkg.in/sourcemap.v1/consumer.go
+++ b/vendor/gopkg.in/sourcemap.v1/consumer.go
@@ -1,17 +1,12 @@
-package sourcemap // import "gopkg.in/sourcemap.v1"
+package sourcemap
import (
"encoding/json"
- "errors"
"fmt"
- "io"
"net/url"
"path"
"sort"
"strconv"
- "strings"
-
- "gopkg.in/sourcemap.v1/base64vlq"
)
type Consumer struct {
@@ -28,7 +23,10 @@ func Parse(mapURL string, b []byte) (*Consumer, error) {
}
if smap.Version != 3 {
- return nil, errors.New("sourcemap: only 3rd version is supported")
+ return nil, fmt.Errorf(
+ "sourcemap: got version=%d, but only 3rd version is supported",
+ smap.Version,
+ )
}
var sourceRootURL *url.URL
@@ -86,7 +84,10 @@ func (c *Consumer) Source(genLine, genCol int) (source, name string, line, col i
match := &c.mappings[i]
// Fuzzy match.
- if match.genCol > genCol && i > 0 {
+ if match.genLine > genLine || match.genCol > genCol {
+ if i == 0 {
+ return
+ }
match = &c.mappings[i-1]
}
@@ -94,14 +95,14 @@ func (c *Consumer) Source(genLine, genCol int) (source, name string, line, col i
source = c.absSource(c.smap.Sources[match.sourcesInd])
}
if match.namesInd >= 0 {
- iv := c.smap.Names[match.namesInd]
- switch v := iv.(type) {
+ v := c.smap.Names[match.namesInd]
+ switch v := v.(type) {
case string:
name = v
case float64:
name = strconv.FormatFloat(v, 'f', -1, 64)
default:
- name = fmt.Sprint(iv)
+ name = fmt.Sprint(v)
}
}
line = match.sourceLine
@@ -131,182 +132,3 @@ func (c *Consumer) absSource(source string) string {
return source
}
-
-func (c *Consumer) SourceName(genLine, genCol int, genName string) (name string, ok bool) {
- ind := sort.Search(len(c.mappings), func(i int) bool {
- m := c.mappings[i]
- if m.genLine == genLine {
- return m.genCol >= genCol
- }
- return m.genLine >= genLine
- })
-
- // Mapping not found.
- if ind == len(c.mappings) {
- return "", false
- }
-
- for i := ind; i >= 0; i-- {
- m := c.mappings[i]
- if m.namesInd == -1 {
- continue
- }
- if c.smap.Names[m.namesInd] == "" {
-
- }
- }
-
- return
-}
-
-type fn func() (fn, error)
-
-type sourceMap struct {
- Version int `json:"version"`
- File string `json:"file"`
- SourceRoot string `json:"sourceRoot"`
- Sources []string `json:"sources"`
- Names []interface{} `json:"names"`
- Mappings string `json:"mappings"`
-}
-
-type mapping struct {
- genLine int
- genCol int
- sourcesInd int
- sourceLine int
- sourceCol int
- namesInd int
-}
-
-type mappings struct {
- rd *strings.Reader
- dec *base64vlq.Decoder
-
- genLine int
- genCol int
- sourcesInd int
- sourceLine int
- sourceCol int
- namesInd int
-
- value mapping
- values []mapping
-}
-
-func parseMappings(s string) ([]mapping, error) {
- rd := strings.NewReader(s)
- m := &mappings{
- rd: rd,
- dec: base64vlq.NewDecoder(rd),
-
- genLine: 1,
- sourceLine: 1,
- }
- m.zeroValue()
- err := m.parse()
- if err != nil {
- return nil, err
- }
- return m.values, nil
-}
-
-func (m *mappings) parse() error {
- next := m.parseGenCol
- for {
- c, err := m.rd.ReadByte()
- if err == io.EOF {
- m.pushValue()
- return nil
- } else if err != nil {
- return err
- }
-
- switch c {
- case ',':
- m.pushValue()
- next = m.parseGenCol
- case ';':
- m.pushValue()
-
- m.genLine++
- m.genCol = 0
-
- next = m.parseGenCol
- default:
- m.rd.UnreadByte()
-
- var err error
- next, err = next()
- if err != nil {
- return err
- }
- }
- }
-}
-
-func (m *mappings) parseGenCol() (fn, error) {
- n, err := m.dec.Decode()
- if err != nil {
- return nil, err
- }
- m.genCol += n
- m.value.genCol = m.genCol
- return m.parseSourcesInd, nil
-}
-
-func (m *mappings) parseSourcesInd() (fn, error) {
- n, err := m.dec.Decode()
- if err != nil {
- return nil, err
- }
- m.sourcesInd += n
- m.value.sourcesInd = m.sourcesInd
- return m.parseSourceLine, nil
-}
-
-func (m *mappings) parseSourceLine() (fn, error) {
- n, err := m.dec.Decode()
- if err != nil {
- return nil, err
- }
- m.sourceLine += n
- m.value.sourceLine = m.sourceLine
- return m.parseSourceCol, nil
-}
-
-func (m *mappings) parseSourceCol() (fn, error) {
- n, err := m.dec.Decode()
- if err != nil {
- return nil, err
- }
- m.sourceCol += n
- m.value.sourceCol = m.sourceCol
- return m.parseNamesInd, nil
-}
-
-func (m *mappings) parseNamesInd() (fn, error) {
- n, err := m.dec.Decode()
- if err != nil {
- return nil, err
- }
- m.namesInd += n
- m.value.namesInd = m.namesInd
- return m.parseGenCol, nil
-}
-
-func (m *mappings) zeroValue() {
- m.value = mapping{
- genLine: m.genLine,
- genCol: 0,
- sourcesInd: -1,
- sourceLine: 0,
- sourceCol: 0,
- namesInd: -1,
- }
-}
-
-func (m *mappings) pushValue() {
- m.values = append(m.values, m.value)
- m.zeroValue()
-}
diff --git a/vendor/gopkg.in/sourcemap.v1/sourcemap.go b/vendor/gopkg.in/sourcemap.v1/sourcemap.go
new file mode 100644
index 000000000..0e9af1a25
--- /dev/null
+++ b/vendor/gopkg.in/sourcemap.v1/sourcemap.go
@@ -0,0 +1,157 @@
+package sourcemap // import "gopkg.in/sourcemap.v1"
+
+import (
+ "io"
+ "strings"
+
+ "gopkg.in/sourcemap.v1/base64vlq"
+)
+
+type fn func(m *mappings) (fn, error)
+
+type sourceMap struct {
+ Version int `json:"version"`
+ File string `json:"file"`
+ SourceRoot string `json:"sourceRoot"`
+ Sources []string `json:"sources"`
+ Names []interface{} `json:"names"`
+ Mappings string `json:"mappings"`
+}
+
+type mapping struct {
+ genLine int
+ genCol int
+ sourcesInd int
+ sourceLine int
+ sourceCol int
+ namesInd int
+}
+
+type mappings struct {
+ rd *strings.Reader
+ dec *base64vlq.Decoder
+
+ hasName bool
+ value mapping
+
+ values []mapping
+}
+
+func parseMappings(s string) ([]mapping, error) {
+ rd := strings.NewReader(s)
+ m := &mappings{
+ rd: rd,
+ dec: base64vlq.NewDecoder(rd),
+ }
+ m.value.genLine = 1
+ m.value.sourceLine = 1
+
+ err := m.parse()
+ if err != nil {
+ return nil, err
+ }
+ return m.values, nil
+}
+
+func (m *mappings) parse() error {
+ next := parseGenCol
+ for {
+ c, err := m.rd.ReadByte()
+ if err == io.EOF {
+ m.pushValue()
+ return nil
+ }
+ if err != nil {
+ return err
+ }
+
+ switch c {
+ case ',':
+ m.pushValue()
+ next = parseGenCol
+ case ';':
+ m.pushValue()
+
+ m.value.genLine++
+ m.value.genCol = 0
+
+ next = parseGenCol
+ default:
+ err := m.rd.UnreadByte()
+ if err != nil {
+ return err
+ }
+
+ next, err = next(m)
+ if err != nil {
+ return err
+ }
+ }
+ }
+}
+
+func parseGenCol(m *mappings) (fn, error) {
+ n, err := m.dec.Decode()
+ if err != nil {
+ return nil, err
+ }
+ m.value.genCol += n
+ return parseSourcesInd, nil
+}
+
+func parseSourcesInd(m *mappings) (fn, error) {
+ n, err := m.dec.Decode()
+ if err != nil {
+ return nil, err
+ }
+ m.value.sourcesInd += n
+ return parseSourceLine, nil
+}
+
+func parseSourceLine(m *mappings) (fn, error) {
+ n, err := m.dec.Decode()
+ if err != nil {
+ return nil, err
+ }
+ m.value.sourceLine += n
+ return parseSourceCol, nil
+}
+
+func parseSourceCol(m *mappings) (fn, error) {
+ n, err := m.dec.Decode()
+ if err != nil {
+ return nil, err
+ }
+ m.value.sourceCol += n
+ return parseNamesInd, nil
+}
+
+func parseNamesInd(m *mappings) (fn, error) {
+ n, err := m.dec.Decode()
+ if err != nil {
+ return nil, err
+ }
+ m.hasName = true
+ m.value.namesInd += n
+ return parseGenCol, nil
+}
+
+func (m *mappings) pushValue() {
+ if m.value.sourceLine == 1 && m.value.sourceCol == 0 {
+ return
+ }
+
+ if m.hasName {
+ m.values = append(m.values, m.value)
+ m.hasName = false
+ } else {
+ m.values = append(m.values, mapping{
+ genLine: m.value.genLine,
+ genCol: m.value.genCol,
+ sourcesInd: m.value.sourcesInd,
+ sourceLine: m.value.sourceLine,
+ sourceCol: m.value.sourceCol,
+ namesInd: -1,
+ })
+ }
+}
diff --git a/vendor/gopkg.in/urfave/cli.v1/.gitignore b/vendor/gopkg.in/urfave/cli.v1/.gitignore
deleted file mode 100644
index faf70c4c2..000000000
--- a/vendor/gopkg.in/urfave/cli.v1/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*.coverprofile
-node_modules/
diff --git a/vendor/gopkg.in/urfave/cli.v1/.travis.yml b/vendor/gopkg.in/urfave/cli.v1/.travis.yml
deleted file mode 100644
index 94836d750..000000000
--- a/vendor/gopkg.in/urfave/cli.v1/.travis.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-language: go
-
-sudo: false
-
-cache:
- directories:
- - node_modules
-
-go:
-- 1.2.x
-- 1.3.x
-- 1.4.2
-- 1.5.x
-- 1.6.x
-- 1.7.x
-- master
-
-matrix:
- allow_failures:
- - go: master
- include:
- - go: 1.6.x
- os: osx
- - go: 1.7.x
- os: osx
-
-before_script:
-- go get github.com/urfave/gfmrun/... || true
-- go get golang.org/x/tools/... || true
-- if [ ! -f node_modules/.bin/markdown-toc ] ; then
- npm install markdown-toc ;
- fi
-
-script:
-- ./runtests gen
-- ./runtests vet
-- ./runtests test
-- ./runtests gfmrun
-- ./runtests toc