mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 14:46:42 +00:00
build, vendor: move context to special vendor folder
This commit is contained in:
parent
f3541848fa
commit
6478a2601d
11 changed files with 90 additions and 38 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -13,8 +13,7 @@
|
||||||
.ethtest
|
.ethtest
|
||||||
*/**/*tx_database*
|
*/**/*tx_database*
|
||||||
*/**/*dapps*
|
*/**/*dapps*
|
||||||
Godeps/_workspace/pkg
|
build/_vendor/pkg
|
||||||
Godeps/_workspace/bin
|
|
||||||
|
|
||||||
#*
|
#*
|
||||||
.#*
|
.#*
|
||||||
|
|
|
||||||
27
build/_vendor/src/golang.org/x/net/LICENSE
Normal file
27
build/_vendor/src/golang.org/x/net/LICENSE
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
Copyright (c) 2009 The Go Authors. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following disclaimer
|
||||||
|
in the documentation and/or other materials provided with the
|
||||||
|
distribution.
|
||||||
|
* Neither the name of Google Inc. nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
@ -1,3 +1,18 @@
|
||||||
|
# Vendored Dependencies
|
||||||
|
|
||||||
|
Dependencies are almost all vendored in at the standard Go `/vendor` path. This allows
|
||||||
|
people to build go-ethereum using the standard toolchain without any particular package
|
||||||
|
manager. It also plays nicely with `go get`, not requiring external code to be relied on.
|
||||||
|
|
||||||
|
The one single dependent package missing from `vendor` is `golang.org/x/net/context`. As
|
||||||
|
this is a package exposed via public library APIs, it must not be vendored as dependent
|
||||||
|
code woulnd't be able to instantiate.
|
||||||
|
|
||||||
|
To allow reproducible builds of go-ethereum nonetheless that don't need network access
|
||||||
|
during build time to fetch `golang.org/x/net/context`, a version was copied into our repo
|
||||||
|
at the very specific `/build/_vendor` path, which is added automatically by all CI build
|
||||||
|
scripts and the makefile too.
|
||||||
|
|
||||||
# Debian Packaging
|
# Debian Packaging
|
||||||
|
|
||||||
Tagged releases and develop branch commits are available as installable Debian packages
|
Tagged releases and develop branch commits are available as installable Debian packages
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,6 @@ func doInstall(cmdline []string) {
|
||||||
log.Println("be compiled with an earlier version. Please upgrade your Go installation.")
|
log.Println("be compiled with an earlier version. Please upgrade your Go installation.")
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compile packages given as arguments, or everything if there are no arguments.
|
// Compile packages given as arguments, or everything if there are no arguments.
|
||||||
packages := []string{"./..."}
|
packages := []string{"./..."}
|
||||||
if flag.NArg() > 0 {
|
if flag.NArg() > 0 {
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,15 @@ func GOPATH() string {
|
||||||
if len(path) == 0 {
|
if len(path) == 0 {
|
||||||
log.Fatal("GOPATH is not set")
|
log.Fatal("GOPATH is not set")
|
||||||
}
|
}
|
||||||
|
// Ensure that our internal vendor folder in on GOPATH
|
||||||
|
vendor, _ := filepath.Abs(filepath.Join("build", "_vendor"))
|
||||||
|
for _, dir := range path {
|
||||||
|
if dir == vendor {
|
||||||
return strings.Join(path, string(filepath.ListSeparator))
|
return strings.Join(path, string(filepath.ListSeparator))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
newpath := append(path[:1], append([]string{vendor}, path[1:]...)...)
|
||||||
|
return strings.Join(newpath, string(filepath.ListSeparator))
|
||||||
}
|
}
|
||||||
|
|
||||||
// VERSION returns the content of the VERSION file.
|
// VERSION returns the content of the VERSION file.
|
||||||
|
|
|
||||||
18
vendor.conf
18
vendor.conf
|
|
@ -1,14 +1,15 @@
|
||||||
# package
|
# package
|
||||||
github.com/ethereum/go-ethereum
|
github.com/ethereum/go-ethereum
|
||||||
|
|
||||||
|
# import
|
||||||
github.com/cespare/cp 165db2f
|
github.com/cespare/cp 165db2f
|
||||||
github.com/davecgh/go-spew v1.0.0-3-g6d21280
|
github.com/davecgh/go-spew v1.0.0-3-g6d21280
|
||||||
github.com/ethereum/ethash v23.1-249-g214d4c0
|
github.com/ethereum/ethash v23.1-249-g214d4c0
|
||||||
github.com/fatih/color v1.1.0-1-ga360acf
|
github.com/fatih/color v1.1.0-4-gbf82308
|
||||||
github.com/gizak/termui a7e3aee
|
github.com/gizak/termui d29684e
|
||||||
github.com/golang/snappy d9eb7a3
|
github.com/golang/snappy d9eb7a3
|
||||||
github.com/hashicorp/golang-lru 0a025b7
|
github.com/hashicorp/golang-lru 0a025b7
|
||||||
github.com/huin/goupnp d7ddae7
|
github.com/huin/goupnp 97f671e
|
||||||
github.com/jackpal/go-nat-pmp v1.0.1-4-g1fa385a
|
github.com/jackpal/go-nat-pmp v1.0.1-4-g1fa385a
|
||||||
github.com/mattn/go-colorable v0.0.6-6-g6c903ff
|
github.com/mattn/go-colorable v0.0.6-6-g6c903ff
|
||||||
github.com/mattn/go-isatty 66b8e73
|
github.com/mattn/go-isatty 66b8e73
|
||||||
|
|
@ -23,14 +24,17 @@ github.com/robertkrimen/otto bf1c379
|
||||||
github.com/rs/cors v1.0
|
github.com/rs/cors v1.0
|
||||||
github.com/rs/xhandler v1.0-1-ged27b6f
|
github.com/rs/xhandler v1.0-1-ged27b6f
|
||||||
github.com/syndtr/goleveldb 6b4daa5
|
github.com/syndtr/goleveldb 6b4daa5
|
||||||
golang.org/x/crypto 1150b8b
|
golang.org/x/crypto ca7e7f1
|
||||||
golang.org/x/net 65dfc08
|
golang.org/x/net b336a97
|
||||||
golang.org/x/sys c200b10
|
golang.org/x/sys c200b10
|
||||||
golang.org/x/text 2556e84
|
golang.org/x/text a8b3843
|
||||||
golang.org/x/tools 20055e0
|
golang.org/x/tools 0db92ca
|
||||||
gopkg.in/check.v1 4f90aea
|
gopkg.in/check.v1 4f90aea
|
||||||
gopkg.in/fatih/set.v0 v0.1.0-3-g27c4092
|
gopkg.in/fatih/set.v0 v0.1.0-3-g27c4092
|
||||||
gopkg.in/karalabe/cookiejar.v2 8dcd6a7
|
gopkg.in/karalabe/cookiejar.v2 8dcd6a7
|
||||||
gopkg.in/natefinch/npipe.v2 c1b8fa8
|
gopkg.in/natefinch/npipe.v2 c1b8fa8
|
||||||
gopkg.in/sourcemap.v1 v1.0.3
|
gopkg.in/sourcemap.v1 v1.0.3
|
||||||
gopkg.in/urfave/cli.v1 v1.18.1
|
gopkg.in/urfave/cli.v1 v1.18.1
|
||||||
|
|
||||||
|
# exclude
|
||||||
|
-golang.org/x/net/context
|
||||||
|
|
|
||||||
48
vendor/github.com/fatih/color/color.go
generated
vendored
48
vendor/github.com/fatih/color/color.go
generated
vendored
|
|
@ -332,27 +332,25 @@ func getCachedColor(p Attribute) *Color {
|
||||||
return c
|
return c
|
||||||
}
|
}
|
||||||
|
|
||||||
func printColor(format string, p Attribute, a ...interface{}) {
|
func colorPrint(format string, p Attribute, a ...interface{}) {
|
||||||
c := getCachedColor(p)
|
c := getCachedColor(p)
|
||||||
|
|
||||||
if len(a) == 0 {
|
|
||||||
a = append(a, format)
|
|
||||||
format = "%s"
|
|
||||||
}
|
|
||||||
|
|
||||||
if !strings.HasSuffix(format, "\n") {
|
if !strings.HasSuffix(format, "\n") {
|
||||||
format += "\n"
|
format += "\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(a) == 0 {
|
||||||
|
c.Print(format)
|
||||||
|
} else {
|
||||||
c.Printf(format, a...)
|
c.Printf(format, a...)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func printString(format string, p Attribute, a ...interface{}) string {
|
func colorString(format string, p Attribute, a ...interface{}) string {
|
||||||
c := getCachedColor(p)
|
c := getCachedColor(p)
|
||||||
|
|
||||||
if len(a) == 0 {
|
if len(a) == 0 {
|
||||||
a = append(a, format)
|
return c.SprintFunc()(format)
|
||||||
format = "%s"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return c.SprintfFunc()(format, a...)
|
return c.SprintfFunc()(format, a...)
|
||||||
|
|
@ -360,66 +358,66 @@ func printString(format string, p Attribute, a ...interface{}) string {
|
||||||
|
|
||||||
// Black is an convenient helper function to print with black foreground. A
|
// Black is an convenient helper function to print with black foreground. A
|
||||||
// newline is appended to format by default.
|
// newline is appended to format by default.
|
||||||
func Black(format string, a ...interface{}) { printColor(format, FgBlack, a...) }
|
func Black(format string, a ...interface{}) { colorPrint(format, FgBlack, a...) }
|
||||||
|
|
||||||
// Red is an convenient helper function to print with red foreground. A
|
// Red is an convenient helper function to print with red foreground. A
|
||||||
// newline is appended to format by default.
|
// newline is appended to format by default.
|
||||||
func Red(format string, a ...interface{}) { printColor(format, FgRed, a...) }
|
func Red(format string, a ...interface{}) { colorPrint(format, FgRed, a...) }
|
||||||
|
|
||||||
// Green is an convenient helper function to print with green foreground. A
|
// Green is an convenient helper function to print with green foreground. A
|
||||||
// newline is appended to format by default.
|
// newline is appended to format by default.
|
||||||
func Green(format string, a ...interface{}) { printColor(format, FgGreen, a...) }
|
func Green(format string, a ...interface{}) { colorPrint(format, FgGreen, a...) }
|
||||||
|
|
||||||
// Yellow is an convenient helper function to print with yellow foreground.
|
// Yellow is an convenient helper function to print with yellow foreground.
|
||||||
// A newline is appended to format by default.
|
// A newline is appended to format by default.
|
||||||
func Yellow(format string, a ...interface{}) { printColor(format, FgYellow, a...) }
|
func Yellow(format string, a ...interface{}) { colorPrint(format, FgYellow, a...) }
|
||||||
|
|
||||||
// Blue is an convenient helper function to print with blue foreground. A
|
// Blue is an convenient helper function to print with blue foreground. A
|
||||||
// newline is appended to format by default.
|
// newline is appended to format by default.
|
||||||
func Blue(format string, a ...interface{}) { printColor(format, FgBlue, a...) }
|
func Blue(format string, a ...interface{}) { colorPrint(format, FgBlue, a...) }
|
||||||
|
|
||||||
// Magenta is an convenient helper function to print with magenta foreground.
|
// Magenta is an convenient helper function to print with magenta foreground.
|
||||||
// A newline is appended to format by default.
|
// A newline is appended to format by default.
|
||||||
func Magenta(format string, a ...interface{}) { printColor(format, FgMagenta, a...) }
|
func Magenta(format string, a ...interface{}) { colorPrint(format, FgMagenta, a...) }
|
||||||
|
|
||||||
// Cyan is an convenient helper function to print with cyan foreground. A
|
// Cyan is an convenient helper function to print with cyan foreground. A
|
||||||
// newline is appended to format by default.
|
// newline is appended to format by default.
|
||||||
func Cyan(format string, a ...interface{}) { printColor(format, FgCyan, a...) }
|
func Cyan(format string, a ...interface{}) { colorPrint(format, FgCyan, a...) }
|
||||||
|
|
||||||
// White is an convenient helper function to print with white foreground. A
|
// White is an convenient helper function to print with white foreground. A
|
||||||
// newline is appended to format by default.
|
// newline is appended to format by default.
|
||||||
func White(format string, a ...interface{}) { printColor(format, FgWhite, a...) }
|
func White(format string, a ...interface{}) { colorPrint(format, FgWhite, a...) }
|
||||||
|
|
||||||
// BlackString is an convenient helper function to return a string with black
|
// BlackString is an convenient helper function to return a string with black
|
||||||
// foreground.
|
// foreground.
|
||||||
func BlackString(format string, a ...interface{}) string { return printString(format, FgBlack, a...) }
|
func BlackString(format string, a ...interface{}) string { return colorString(format, FgBlack, a...) }
|
||||||
|
|
||||||
// RedString is an convenient helper function to return a string with red
|
// RedString is an convenient helper function to return a string with red
|
||||||
// foreground.
|
// foreground.
|
||||||
func RedString(format string, a ...interface{}) string { return printString(format, FgRed, a...) }
|
func RedString(format string, a ...interface{}) string { return colorString(format, FgRed, a...) }
|
||||||
|
|
||||||
// GreenString is an convenient helper function to return a string with green
|
// GreenString is an convenient helper function to return a string with green
|
||||||
// foreground.
|
// foreground.
|
||||||
func GreenString(format string, a ...interface{}) string { return printString(format, FgGreen, a...) }
|
func GreenString(format string, a ...interface{}) string { return colorString(format, FgGreen, a...) }
|
||||||
|
|
||||||
// YellowString is an convenient helper function to return a string with yellow
|
// YellowString is an convenient helper function to return a string with yellow
|
||||||
// foreground.
|
// foreground.
|
||||||
func YellowString(format string, a ...interface{}) string { return printString(format, FgYellow, a...) }
|
func YellowString(format string, a ...interface{}) string { return colorString(format, FgYellow, a...) }
|
||||||
|
|
||||||
// BlueString is an convenient helper function to return a string with blue
|
// BlueString is an convenient helper function to return a string with blue
|
||||||
// foreground.
|
// foreground.
|
||||||
func BlueString(format string, a ...interface{}) string { return printString(format, FgBlue, a...) }
|
func BlueString(format string, a ...interface{}) string { return colorString(format, FgBlue, a...) }
|
||||||
|
|
||||||
// MagentaString is an convenient helper function to return a string with magenta
|
// MagentaString is an convenient helper function to return a string with magenta
|
||||||
// foreground.
|
// foreground.
|
||||||
func MagentaString(format string, a ...interface{}) string {
|
func MagentaString(format string, a ...interface{}) string {
|
||||||
return printString(format, FgMagenta, a...)
|
return colorString(format, FgMagenta, a...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// CyanString is an convenient helper function to return a string with cyan
|
// CyanString is an convenient helper function to return a string with cyan
|
||||||
// foreground.
|
// foreground.
|
||||||
func CyanString(format string, a ...interface{}) string { return printString(format, FgCyan, a...) }
|
func CyanString(format string, a ...interface{}) string { return colorString(format, FgCyan, a...) }
|
||||||
|
|
||||||
// WhiteString is an convenient helper function to return a string with white
|
// WhiteString is an convenient helper function to return a string with white
|
||||||
// foreground.
|
// foreground.
|
||||||
func WhiteString(format string, a ...interface{}) string { return printString(format, FgWhite, a...) }
|
func WhiteString(format string, a ...interface{}) string { return colorString(format, FgWhite, a...) }
|
||||||
|
|
|
||||||
4
vendor/github.com/gizak/termui/linechart.go
generated
vendored
4
vendor/github.com/gizak/termui/linechart.go
generated
vendored
|
|
@ -69,6 +69,7 @@ type LineChart struct {
|
||||||
labelYSpace int
|
labelYSpace int
|
||||||
maxY float64
|
maxY float64
|
||||||
minY float64
|
minY float64
|
||||||
|
autoLabels bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewLineChart returns a new LineChart with current theme.
|
// NewLineChart returns a new LineChart with current theme.
|
||||||
|
|
@ -211,7 +212,8 @@ func (lc *LineChart) calcLabelY() {
|
||||||
|
|
||||||
func (lc *LineChart) calcLayout() {
|
func (lc *LineChart) calcLayout() {
|
||||||
// set datalabels if it is not provided
|
// set datalabels if it is not provided
|
||||||
if lc.DataLabels == nil || len(lc.DataLabels) == 0 {
|
if (lc.DataLabels == nil || len(lc.DataLabels) == 0) || lc.autoLabels {
|
||||||
|
lc.autoLabels = true
|
||||||
lc.DataLabels = make([]string, len(lc.Data))
|
lc.DataLabels = make([]string, len(lc.Data))
|
||||||
for i := range lc.Data {
|
for i := range lc.Data {
|
||||||
lc.DataLabels[i] = fmt.Sprint(i)
|
lc.DataLabels[i] = fmt.Sprint(i)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue