From a69e7bfb4ffe7b071cef592a00e24389987e51f3 Mon Sep 17 00:00:00 2001 From: ruflin Date: Thu, 31 Dec 2015 13:32:25 +0100 Subject: [PATCH] Update glide dependencies * Change package in glide.yml to beats instead of libbeat * Add glide.lock to .gitignore file * Fix golang.org/x/text version with commit id as newest version is incompatible * Update dependencies of the following packages to the most recent version * github.com/garyburd/redigo * github.com/stretchre/testify * gopkg.in/yaml.v2 * github.com/elastic/gosigar * github.com/tsg/gopacket * github.com/pmezard/go-difflib golang.org/x/sys --- .gitignore | 2 + glide.yaml | 3 +- .../github.com/elastic/gosigar/examples/df.go | 2 +- .../elastic/gosigar/examples/free.go | 2 +- .../github.com/elastic/gosigar/examples/ps.go | 2 +- .../elastic/gosigar/examples/uptime.go | 2 +- .../elastic/gosigar/fakes/fake_sigar.go | 2 +- .../elastic/gosigar/sigar_windows_test.go | 2 +- .../garyburd/redigo/README.markdown | 13 +- .../github.com/garyburd/redigo/redis/reply.go | 30 ++++ .../garyburd/redigo/redis/reply_test.go | 10 ++ .../github.com/garyburd/redigo/redis/scan.go | 2 +- .../pmezard/go-difflib/difflib/difflib.go | 40 +++-- .../go-difflib/difflib/difflib_test.go | 47 ++++- .../github.com/stretchr/testify/LICENCE.txt | 19 +- vendor/github.com/stretchr/testify/LICENSE | 22 +++ .../stretchr/testify/assert/assertions.go | 2 +- .../testify/assert/forward_assertions.go | 2 +- .../github.com/stretchr/testify/mock/mock.go | 58 +++++- .../stretchr/testify/mock/mock_test.go | 79 +++++++++ .../testify/require/forward_requirements.go | 2 +- .../stretchr/testify/require/requirements.go | 2 +- vendor/github.com/tsg/gopacket/pcap/pcap.go | 1 + .../golang.org/x/sys/plan9/mksysnum_plan9.sh | 2 - vendor/golang.org/x/sys/unix/mkerrors.sh | 20 ++- vendor/golang.org/x/sys/unix/sockcmsg_unix.go | 6 +- vendor/golang.org/x/sys/unix/syscall_bsd.go | 79 ++++++++- .../golang.org/x/sys/unix/syscall_bsd_test.go | 7 + .../x/sys/unix/syscall_freebsd_test.go | 20 +++ vendor/golang.org/x/sys/unix/syscall_linux.go | 2 +- vendor/golang.org/x/sys/unix/types_linux.go | 11 +- .../x/sys/unix/zerrors_linux_386.go | 56 ++++++ .../x/sys/unix/zerrors_linux_amd64.go | 56 ++++++ .../x/sys/unix/zerrors_linux_arm.go | 165 ++++++++++++++++++ .../x/sys/unix/zerrors_linux_arm64.go | 53 ++++++ .../x/sys/unix/zerrors_linux_ppc64.go | 47 +++++ .../x/sys/unix/zerrors_linux_ppc64le.go | 47 +++++ .../x/sys/unix/zsyscall_linux_386.go | 10 ++ .../x/sys/unix/zsyscall_linux_amd64.go | 10 ++ .../x/sys/unix/zsyscall_linux_arm.go | 10 ++ .../x/sys/unix/zsyscall_linux_arm64.go | 10 ++ .../x/sys/unix/zsyscall_linux_ppc64.go | 10 ++ .../x/sys/unix/zsyscall_linux_ppc64le.go | 10 ++ .../golang.org/x/sys/unix/ztypes_linux_386.go | 20 +-- .../x/sys/unix/ztypes_linux_amd64.go | 20 +-- .../golang.org/x/sys/unix/ztypes_linux_arm.go | 122 +------------ .../x/sys/unix/ztypes_linux_arm64.go | 20 +-- .../x/sys/unix/ztypes_linux_ppc64.go | 20 +-- .../x/sys/unix/ztypes_linux_ppc64le.go | 20 +-- vendor/gopkg.in/yaml.v2/decode_test.go | 22 +++ vendor/gopkg.in/yaml.v2/readerc.go | 7 +- 51 files changed, 997 insertions(+), 231 deletions(-) create mode 100644 vendor/github.com/stretchr/testify/LICENSE create mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_test.go diff --git a/.gitignore b/.gitignore index b89028c690b..0e6de4d38bd 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ # Files .DS_Store +/glide.lock +/beats.iml # Editor swap files *.swp diff --git a/glide.yaml b/glide.yaml index 3b9cc86f27c..651af2bf21d 100644 --- a/glide.yaml +++ b/glide.yaml @@ -1,4 +1,4 @@ -package: github.com/elastic/beats/libbeat +package: github.com/elastic/beats import: - package: github.com/garyburd/redigo - package: gopkg.in/yaml.v2 @@ -27,6 +27,7 @@ import: subpackages: - /windows/svc/eventlog - package: golang.org/x/text + version: 9b5a19ab9a1fb7658b57cda176d68f4aa84748b0 subpackages: - /encoding - package: github.com/satori/go.uuid diff --git a/vendor/github.com/elastic/gosigar/examples/df.go b/vendor/github.com/elastic/gosigar/examples/df.go index 96c92f41d26..aa85b36b086 100644 --- a/vendor/github.com/elastic/gosigar/examples/df.go +++ b/vendor/github.com/elastic/gosigar/examples/df.go @@ -4,7 +4,7 @@ package main import ( "fmt" - "github.com/cloudfoundry/gosigar" + "github.com/elastic/gosigar" "os" ) diff --git a/vendor/github.com/elastic/gosigar/examples/free.go b/vendor/github.com/elastic/gosigar/examples/free.go index 9bf9d3db306..98f0f3bd925 100644 --- a/vendor/github.com/elastic/gosigar/examples/free.go +++ b/vendor/github.com/elastic/gosigar/examples/free.go @@ -4,7 +4,7 @@ package main import ( "fmt" - "github.com/cloudfoundry/gosigar" + "github.com/elastic/gosigar" "os" ) diff --git a/vendor/github.com/elastic/gosigar/examples/ps.go b/vendor/github.com/elastic/gosigar/examples/ps.go index e3cc2281f0f..1b1de40d98d 100644 --- a/vendor/github.com/elastic/gosigar/examples/ps.go +++ b/vendor/github.com/elastic/gosigar/examples/ps.go @@ -4,7 +4,7 @@ package main import ( "fmt" - "github.com/cloudfoundry/gosigar" + "github.com/elastic/gosigar" ) func main() { diff --git a/vendor/github.com/elastic/gosigar/examples/uptime.go b/vendor/github.com/elastic/gosigar/examples/uptime.go index 337a9b01a45..07770f7df8b 100644 --- a/vendor/github.com/elastic/gosigar/examples/uptime.go +++ b/vendor/github.com/elastic/gosigar/examples/uptime.go @@ -4,7 +4,7 @@ package main import ( "fmt" - "github.com/cloudfoundry/gosigar" + "github.com/elastic/gosigar" "os" "time" ) diff --git a/vendor/github.com/elastic/gosigar/fakes/fake_sigar.go b/vendor/github.com/elastic/gosigar/fakes/fake_sigar.go index 6fb77417c46..7d2414a1dbf 100644 --- a/vendor/github.com/elastic/gosigar/fakes/fake_sigar.go +++ b/vendor/github.com/elastic/gosigar/fakes/fake_sigar.go @@ -3,7 +3,7 @@ package fakes import ( "time" - sigar "github.com/cloudfoundry/gosigar" + sigar "github.com/elastic/gosigar" ) type FakeSigar struct { diff --git a/vendor/github.com/elastic/gosigar/sigar_windows_test.go b/vendor/github.com/elastic/gosigar/sigar_windows_test.go index 868bdaab887..1d9aa2ca6d4 100644 --- a/vendor/github.com/elastic/gosigar/sigar_windows_test.go +++ b/vendor/github.com/elastic/gosigar/sigar_windows_test.go @@ -6,7 +6,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - sigar "github.com/cloudfoundry/gosigar" + sigar "github.com/elastic/gosigar" ) var _ = Describe("SigarWindows", func() { diff --git a/vendor/github.com/garyburd/redigo/README.markdown b/vendor/github.com/garyburd/redigo/README.markdown index f412b1ea80f..d63a0894dde 100644 --- a/vendor/github.com/garyburd/redigo/README.markdown +++ b/vendor/github.com/garyburd/redigo/README.markdown @@ -30,15 +30,18 @@ Install Redigo using the "go get" command: The Go distribution is Redigo's only dependency. +Related Projects +---------------- + +- [rafaeljusto/redigomock](https://godoc.org/github.com/rafaeljusto/redigomock) - A mock library for Redigo. +- [chasex/redis-go-cluster](https://github.com/chasex/redis-go-cluster) - A Redis cluster client implementation. + Contributing ------------ -Contributions are welcome. +Gary is looking for someone to take over maintenance of this project. If you are interested, contact Gary at the email address listed on his GitHub profile page. -Before writing code, send mail to gary@beagledreams.com to discuss what you -plan to do. This gives me a chance to validate the design, avoid duplication of -effort and ensure that the changes fit the goals of the project. Do not start -the discussion with a pull request. +PRs for major features will not be accepted until a new maintainer is found. Bug reports and PRs for bug fixes are welcome. License ------- diff --git a/vendor/github.com/garyburd/redigo/redis/reply.go b/vendor/github.com/garyburd/redigo/redis/reply.go index 348a0804171..57896147f79 100644 --- a/vendor/github.com/garyburd/redigo/redis/reply.go +++ b/vendor/github.com/garyburd/redigo/redis/reply.go @@ -273,6 +273,36 @@ func Strings(reply interface{}, err error) ([]string, error) { return nil, fmt.Errorf("redigo: unexpected type for Strings, got type %T", reply) } +// ByteSlices is a helper that converts an array command reply to a [][]byte. +// If err is not equal to nil, then ByteSlices returns nil, err. Nil array +// items are stay nil. ByteSlices returns an error if an array item is not a +// bulk string or nil. +func ByteSlices(reply interface{}, err error) ([][]byte, error) { + if err != nil { + return nil, err + } + switch reply := reply.(type) { + case []interface{}: + result := make([][]byte, len(reply)) + for i := range reply { + if reply[i] == nil { + continue + } + p, ok := reply[i].([]byte) + if !ok { + return nil, fmt.Errorf("redigo: unexpected element type for ByteSlices, got type %T", reply[i]) + } + result[i] = p + } + return result, nil + case nil: + return nil, ErrNil + case Error: + return nil, reply + } + return nil, fmt.Errorf("redigo: unexpected type for ByteSlices, got type %T", reply) +} + // Ints is a helper that converts an array command reply to a []int. If // err is not equal to nil, then Ints returns nil, err. func Ints(reply interface{}, err error) ([]int, error) { diff --git a/vendor/github.com/garyburd/redigo/redis/reply_test.go b/vendor/github.com/garyburd/redigo/redis/reply_test.go index 84365bcbbd6..2c774866d47 100644 --- a/vendor/github.com/garyburd/redigo/redis/reply_test.go +++ b/vendor/github.com/garyburd/redigo/redis/reply_test.go @@ -56,6 +56,16 @@ var replyTests = []struct { ve(redis.Strings(nil, nil)), ve([]string(nil), redis.ErrNil), }, + { + "byteslices([v1, v2])", + ve(redis.ByteSlices([]interface{}{[]byte("v1"), []byte("v2")}, nil)), + ve([][]byte{[]byte("v1"), []byte("v2")}, nil), + }, + { + "byteslices(nil)", + ve(redis.ByteSlices(nil, nil)), + ve([][]byte(nil), redis.ErrNil), + }, { "values([v1, v2])", ve(redis.Values([]interface{}{[]byte("v1"), []byte("v2")}, nil)), diff --git a/vendor/github.com/garyburd/redigo/redis/scan.go b/vendor/github.com/garyburd/redigo/redis/scan.go index f9f4a9af499..962e94bcc16 100644 --- a/vendor/github.com/garyburd/redigo/redis/scan.go +++ b/vendor/github.com/garyburd/redigo/redis/scan.go @@ -259,7 +259,7 @@ func compileStructSpec(t reflect.Type, depth map[string]int, index []int, ss *st for i := 0; i < t.NumField(); i++ { f := t.Field(i) switch { - case f.PkgPath != "": + case f.PkgPath != "" && !f.Anonymous: // Ignore unexported fields. case f.Anonymous: // TODO: Handle pointers. Requires change to decoder and diff --git a/vendor/github.com/pmezard/go-difflib/difflib/difflib.go b/vendor/github.com/pmezard/go-difflib/difflib/difflib.go index 64cc40fe1da..e5005daaa3e 100644 --- a/vendor/github.com/pmezard/go-difflib/difflib/difflib.go +++ b/vendor/github.com/pmezard/go-difflib/difflib/difflib.go @@ -559,10 +559,14 @@ type UnifiedDiff struct { func WriteUnifiedDiff(writer io.Writer, diff UnifiedDiff) error { buf := bufio.NewWriter(writer) defer buf.Flush() - w := func(format string, args ...interface{}) error { + wf := func(format string, args ...interface{}) error { _, err := buf.WriteString(fmt.Sprintf(format, args...)) return err } + ws := func(s string) error { + _, err := buf.WriteString(s) + return err + } if len(diff.Eol) == 0 { diff.Eol = "\n" @@ -581,11 +585,11 @@ func WriteUnifiedDiff(writer io.Writer, diff UnifiedDiff) error { if len(diff.ToDate) > 0 { toDate = "\t" + diff.ToDate } - err := w("--- %s%s%s", diff.FromFile, fromDate, diff.Eol) + err := wf("--- %s%s%s", diff.FromFile, fromDate, diff.Eol) if err != nil { return err } - err = w("+++ %s%s%s", diff.ToFile, toDate, diff.Eol) + err = wf("+++ %s%s%s", diff.ToFile, toDate, diff.Eol) if err != nil { return err } @@ -593,14 +597,14 @@ func WriteUnifiedDiff(writer io.Writer, diff UnifiedDiff) error { first, last := g[0], g[len(g)-1] range1 := formatRangeUnified(first.I1, last.I2) range2 := formatRangeUnified(first.J1, last.J2) - if err := w("@@ -%s +%s @@%s", range1, range2, diff.Eol); err != nil { + if err := wf("@@ -%s +%s @@%s", range1, range2, diff.Eol); err != nil { return err } for _, c := range g { i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 if c.Tag == 'e' { for _, line := range diff.A[i1:i2] { - if err := w(" " + line); err != nil { + if err := ws(" " + line); err != nil { return err } } @@ -608,14 +612,14 @@ func WriteUnifiedDiff(writer io.Writer, diff UnifiedDiff) error { } if c.Tag == 'r' || c.Tag == 'd' { for _, line := range diff.A[i1:i2] { - if err := w("-" + line); err != nil { + if err := ws("-" + line); err != nil { return err } } } if c.Tag == 'r' || c.Tag == 'i' { for _, line := range diff.B[j1:j2] { - if err := w("+" + line); err != nil { + if err := ws("+" + line); err != nil { return err } } @@ -669,12 +673,18 @@ func WriteContextDiff(writer io.Writer, diff ContextDiff) error { buf := bufio.NewWriter(writer) defer buf.Flush() var diffErr error - w := func(format string, args ...interface{}) { + wf := func(format string, args ...interface{}) { _, err := buf.WriteString(fmt.Sprintf(format, args...)) if diffErr == nil && err != nil { diffErr = err } } + ws := func(s string) { + _, err := buf.WriteString(s) + if diffErr == nil && err != nil { + diffErr = err + } + } if len(diff.Eol) == 0 { diff.Eol = "\n" @@ -700,15 +710,15 @@ func WriteContextDiff(writer io.Writer, diff ContextDiff) error { if len(diff.ToDate) > 0 { toDate = "\t" + diff.ToDate } - w("*** %s%s%s", diff.FromFile, fromDate, diff.Eol) - w("--- %s%s%s", diff.ToFile, toDate, diff.Eol) + wf("*** %s%s%s", diff.FromFile, fromDate, diff.Eol) + wf("--- %s%s%s", diff.ToFile, toDate, diff.Eol) } first, last := g[0], g[len(g)-1] - w("***************" + diff.Eol) + ws("***************" + diff.Eol) range1 := formatRangeContext(first.I1, last.I2) - w("*** %s ****%s", range1, diff.Eol) + wf("*** %s ****%s", range1, diff.Eol) for _, c := range g { if c.Tag == 'r' || c.Tag == 'd' { for _, cc := range g { @@ -716,7 +726,7 @@ func WriteContextDiff(writer io.Writer, diff ContextDiff) error { continue } for _, line := range diff.A[cc.I1:cc.I2] { - w(prefix[cc.Tag] + line) + ws(prefix[cc.Tag] + line) } } break @@ -724,7 +734,7 @@ func WriteContextDiff(writer io.Writer, diff ContextDiff) error { } range2 := formatRangeContext(first.J1, last.J2) - w("--- %s ----%s", range2, diff.Eol) + wf("--- %s ----%s", range2, diff.Eol) for _, c := range g { if c.Tag == 'r' || c.Tag == 'i' { for _, cc := range g { @@ -732,7 +742,7 @@ func WriteContextDiff(writer io.Writer, diff ContextDiff) error { continue } for _, line := range diff.B[cc.J1:cc.J2] { - w(prefix[cc.Tag] + line) + ws(prefix[cc.Tag] + line) } } break diff --git a/vendor/github.com/pmezard/go-difflib/difflib/difflib_test.go b/vendor/github.com/pmezard/go-difflib/difflib/difflib_test.go index 94670bea356..4d462ec204a 100644 --- a/vendor/github.com/pmezard/go-difflib/difflib/difflib_test.go +++ b/vendor/github.com/pmezard/go-difflib/difflib/difflib_test.go @@ -102,11 +102,12 @@ group } } -func ExampleGetUnifiedDiffString() { +func ExampleGetUnifiedDiffCode() { a := `one two three -four` +four +fmt.Printf("%s,%T",a,b)` b := `zero one three @@ -121,16 +122,54 @@ four` Context: 3, } result, _ := GetUnifiedDiffString(diff) - fmt.Printf(strings.Replace(result, "\t", " ", -1)) + fmt.Println(strings.Replace(result, "\t", " ", -1)) // Output: // --- Original 2005-01-26 23:30:50 // +++ Current 2010-04-02 10:20:52 - // @@ -1,4 +1,4 @@ + // @@ -1,5 +1,4 @@ // +zero // one // -two // three // four + // -fmt.Printf("%s,%T",a,b) +} + +func ExampleGetContextDiffCode() { + a := `one +two +three +four +fmt.Printf("%s,%T",a,b)` + b := `zero +one +tree +four` + diff := ContextDiff{ + A: SplitLines(a), + B: SplitLines(b), + FromFile: "Original", + ToFile: "Current", + Context: 3, + Eol: "\n", + } + result, _ := GetContextDiffString(diff) + fmt.Print(strings.Replace(result, "\t", " ", -1)) + // Output: + // *** Original + // --- Current + // *************** + // *** 1,5 **** + // one + // ! two + // ! three + // four + // - fmt.Printf("%s,%T",a,b) + // --- 1,4 ---- + // + zero + // one + // ! tree + // four } func ExampleGetContextDiffString() { diff --git a/vendor/github.com/stretchr/testify/LICENCE.txt b/vendor/github.com/stretchr/testify/LICENCE.txt index a009ba467ce..473b670a7c6 100644 --- a/vendor/github.com/stretchr/testify/LICENCE.txt +++ b/vendor/github.com/stretchr/testify/LICENCE.txt @@ -2,8 +2,21 @@ Copyright (c) 2012 - 2013 Mat Ryer and Tyler Bunnell Please consider promoting this project if you find it useful. -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT +OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/stretchr/testify/LICENSE b/vendor/github.com/stretchr/testify/LICENSE new file mode 100644 index 00000000000..473b670a7c6 --- /dev/null +++ b/vendor/github.com/stretchr/testify/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2012 - 2013 Mat Ryer and Tyler Bunnell + +Please consider promoting this project if you find it useful. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT +OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/stretchr/testify/assert/assertions.go b/vendor/github.com/stretchr/testify/assert/assertions.go index 1935d18dae3..e95357d29c8 100644 --- a/vendor/github.com/stretchr/testify/assert/assertions.go +++ b/vendor/github.com/stretchr/testify/assert/assertions.go @@ -460,7 +460,7 @@ func True(t TestingT, value bool, msgAndArgs ...interface{}) bool { } -// False asserts that the specified value is true. +// False asserts that the specified value is false. // // assert.False(t, myBool, "myBool should be false") // diff --git a/vendor/github.com/stretchr/testify/assert/forward_assertions.go b/vendor/github.com/stretchr/testify/assert/forward_assertions.go index cab3aa2acd2..fe6b664e076 100644 --- a/vendor/github.com/stretchr/testify/assert/forward_assertions.go +++ b/vendor/github.com/stretchr/testify/assert/forward_assertions.go @@ -119,7 +119,7 @@ func (a *Assertions) True(value bool, msgAndArgs ...interface{}) bool { return True(a.t, value, msgAndArgs...) } -// False asserts that the specified value is true. +// False asserts that the specified value is false. // // assert.False(myBool, "myBool should be false") // diff --git a/vendor/github.com/stretchr/testify/mock/mock.go b/vendor/github.com/stretchr/testify/mock/mock.go index 111a281b4d3..bc6c86bc508 100644 --- a/vendor/github.com/stretchr/testify/mock/mock.go +++ b/vendor/github.com/stretchr/testify/mock/mock.go @@ -458,6 +458,55 @@ func AnythingOfType(t string) AnythingOfTypeArgument { return AnythingOfTypeArgument(t) } +// argumentMatcher performs custom argument matching, returning whether or +// not the argument is matched by the expectation fixture function. +type argumentMatcher struct { + // fn is a function which accepts one argument, and returns a bool. + fn reflect.Value +} + +func (f argumentMatcher) Matches(argument interface{}) bool { + expectType := f.fn.Type().In(0) + + if reflect.TypeOf(argument).AssignableTo(expectType) { + result := f.fn.Call([]reflect.Value{reflect.ValueOf(argument)}) + return result[0].Bool() + } else { + return false + } +} + +func (f argumentMatcher) String() string { + return fmt.Sprintf("func(%s) bool", f.fn.Type().In(0).Name()) +} + +// MatchedBy can be used to match a mock call based on only certain properties +// from a complex struct or some calculation. It takes a function that will be +// evaluated with the called argument and will return true when there's a match +// and false otherwise. +// +// Example: +// m.On("Do", func(req *http.Request) bool { return req.Host == "example.com" }) +// +// |fn|, must be a function accepting a single argument (of the expected type) +// which returns a bool. If |fn| doesn't match the required signature, +// MathedBy() panics. +func MatchedBy(fn interface{}) argumentMatcher { + fnType := reflect.TypeOf(fn) + + if fnType.Kind() != reflect.Func { + panic(fmt.Sprintf("assert: arguments: %s is not a func", fn)) + } + if fnType.NumIn() != 1 { + panic(fmt.Sprintf("assert: arguments: %s does not take exactly one argument", fn)) + } + if fnType.NumOut() != 1 || fnType.Out(0).Kind() != reflect.Bool { + panic(fmt.Sprintf("assert: arguments: %s does not return a bool", fn)) + } + + return argumentMatcher{fn: reflect.ValueOf(fn)} +} + // Get Returns the argument at the specified index. func (args Arguments) Get(index int) interface{} { if index+1 > len(args) { @@ -505,7 +554,14 @@ func (args Arguments) Diff(objects []interface{}) (string, int) { expected = args[i] } - if reflect.TypeOf(expected) == reflect.TypeOf((*AnythingOfTypeArgument)(nil)).Elem() { + if matcher, ok := expected.(argumentMatcher); ok { + if matcher.Matches(actual) { + output = fmt.Sprintf("%s\t%d: \u2705 %s matched by %s\n", output, i, actual, matcher) + } else { + differences++ + output = fmt.Sprintf("%s\t%d: \u2705 %s not matched by %s\n", output, i, actual, matcher) + } + } else if reflect.TypeOf(expected) == reflect.TypeOf((*AnythingOfTypeArgument)(nil)).Elem() { // type checking if reflect.TypeOf(actual).Name() != string(expected.(AnythingOfTypeArgument)) && reflect.TypeOf(actual).String() != string(expected.(AnythingOfTypeArgument)) { diff --git a/vendor/github.com/stretchr/testify/mock/mock_test.go b/vendor/github.com/stretchr/testify/mock/mock_test.go index 1315ceccb18..f6bde465687 100644 --- a/vendor/github.com/stretchr/testify/mock/mock_test.go +++ b/vendor/github.com/stretchr/testify/mock/mock_test.go @@ -147,6 +147,63 @@ func Test_Mock_On_WithFuncArg(t *testing.T) { }) } +func Test_Mock_On_WithIntArgMatcher(t *testing.T) { + var mockedService TestExampleImplementation + + mockedService.On("TheExampleMethod", + MatchedBy(func(a int) bool { + return a == 1 + }), MatchedBy(func(b int) bool { + return b == 2 + }), MatchedBy(func(c int) bool { + return c == 3 + })).Return(0, nil) + + assert.Panics(t, func() { + mockedService.TheExampleMethod(1, 2, 4) + }) + assert.Panics(t, func() { + mockedService.TheExampleMethod(2, 2, 3) + }) + assert.NotPanics(t, func() { + mockedService.TheExampleMethod(1, 2, 3) + }) +} + +func Test_Mock_On_WithPtrArgMatcher(t *testing.T) { + var mockedService TestExampleImplementation + + mockedService.On("TheExampleMethod3", + MatchedBy(func(a *ExampleType) bool { return a.ran == true }), + ).Return(nil) + + mockedService.On("TheExampleMethod3", + MatchedBy(func(a *ExampleType) bool { return a.ran == false }), + ).Return(errors.New("error!")) + + assert.Equal(t, mockedService.TheExampleMethod3(&ExampleType{true}), nil) + assert.EqualError(t, mockedService.TheExampleMethod3(&ExampleType{false}), "error!") +} + +func Test_Mock_On_WithFuncArgMatcher(t *testing.T) { + var mockedService TestExampleImplementation + + fixture1, fixture2 := errors.New("fixture1"), errors.New("fixture2") + + mockedService.On("TheExampleMethodFunc", + MatchedBy(func(a func(string) error) bool { return a("string") == fixture1 }), + ).Return(errors.New("fixture1")) + + mockedService.On("TheExampleMethodFunc", + MatchedBy(func(a func(string) error) bool { return a("string") == fixture2 }), + ).Return(errors.New("fixture2")) + + assert.EqualError(t, mockedService.TheExampleMethodFunc( + func(string) error { return fixture1 }), "fixture1") + assert.EqualError(t, mockedService.TheExampleMethodFunc( + func(string) error { return fixture2 }), "fixture2") +} + func Test_Mock_On_WithVariadicFunc(t *testing.T) { // make a test impl object @@ -937,6 +994,28 @@ func Test_Arguments_Diff_WithAnythingOfTypeArgument_Failing(t *testing.T) { } +func Test_Arguments_Diff_WithArgMatcher(t *testing.T) { + matchFn := func(a int) bool { + return a == 123 + } + var args Arguments = []interface{}{"string", MatchedBy(matchFn), true} + + diff, count := args.Diff([]interface{}{"string", 124, true}) + assert.Equal(t, 1, count) + assert.Contains(t, diff, `%!s(int=124) not matched by func(int) bool`) + + diff, count = args.Diff([]interface{}{"string", false, true}) + assert.Equal(t, 1, count) + assert.Contains(t, diff, `%!s(bool=false) not matched by func(int) bool`) + + diff, count = args.Diff([]interface{}{"string", 123, false}) + assert.Contains(t, diff, `%!s(int=123) matched by func(int) bool`) + + diff, count = args.Diff([]interface{}{"string", 123, true}) + assert.Equal(t, 0, count) + assert.Contains(t, diff, `No differences.`) +} + func Test_Arguments_Assert(t *testing.T) { var args Arguments = []interface{}{"string", 123, true} diff --git a/vendor/github.com/stretchr/testify/require/forward_requirements.go b/vendor/github.com/stretchr/testify/require/forward_requirements.go index 035ecee6e37..ee84abc346c 100644 --- a/vendor/github.com/stretchr/testify/require/forward_requirements.go +++ b/vendor/github.com/stretchr/testify/require/forward_requirements.go @@ -93,7 +93,7 @@ func (a *Assertions) True(value bool, msgAndArgs ...interface{}) { True(a.t, value, msgAndArgs...) } -// False asserts that the specified value is true. +// False asserts that the specified value is false. // // require.False(myBool, "myBool should be false") func (a *Assertions) False(value bool, msgAndArgs ...interface{}) { diff --git a/vendor/github.com/stretchr/testify/require/requirements.go b/vendor/github.com/stretchr/testify/require/requirements.go index 81705a553c9..d46cfe5a291 100644 --- a/vendor/github.com/stretchr/testify/require/requirements.go +++ b/vendor/github.com/stretchr/testify/require/requirements.go @@ -119,7 +119,7 @@ func True(t TestingT, value bool, msgAndArgs ...interface{}) { } } -// False asserts that the specified value is true. +// False asserts that the specified value is false. // // require.False(t, myBool, "myBool should be false") func False(t TestingT, value bool, msgAndArgs ...interface{}) { diff --git a/vendor/github.com/tsg/gopacket/pcap/pcap.go b/vendor/github.com/tsg/gopacket/pcap/pcap.go index d2465bbd47d..3b015c1e6b5 100644 --- a/vendor/github.com/tsg/gopacket/pcap/pcap.go +++ b/vendor/github.com/tsg/gopacket/pcap/pcap.go @@ -11,6 +11,7 @@ package pcap #cgo linux LDFLAGS: -lpcap #cgo freebsd LDFLAGS: -lpcap #cgo darwin LDFLAGS: -lpcap +#cgo solaris LDFLAGS: -lpcap #cgo windows CFLAGS: -I C:/WpdPack/Include #cgo windows,386 LDFLAGS: -L C:/WpdPack/Lib -lwpcap #cgo windows,amd64 LDFLAGS: -L C:/WpdPack/Lib/x64 -lwpcap diff --git a/vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh b/vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh index d798930b1c7..3c3ab05810e 100755 --- a/vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh +++ b/vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh @@ -1,8 +1,6 @@ #!/bin/sh # Copyright 2009 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file.# Copyright 2009 The Go Authors. All rights reserved. -# Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. COMMAND="mksysnum_plan9.sh $@" diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh index 785855f0701..c40d788c4ab 100755 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -128,7 +128,7 @@ includes_Linux=' #include #include #include -#include +#include #ifndef MSG_FASTOPEN #define MSG_FASTOPEN 0x20000000 @@ -276,21 +276,31 @@ ccflags="$@" $2 !~ /^EXPR_/ && $2 ~ /^E[A-Z0-9_]+$/ || $2 ~ /^B[0-9_]+$/ || + $2 == "BOTHER" || + $2 ~ /^CI?BAUD(EX)?$/ || + $2 == "IBSHIFT" || $2 ~ /^V[A-Z0-9]+$/ || $2 ~ /^CS[A-Z0-9]/ || - $2 ~ /^I(SIG|CANON|CRNL|EXTEN|MAXBEL|STRIP|UTF8)$/ || + $2 ~ /^I(SIG|CANON|CRNL|UCLC|EXTEN|MAXBEL|STRIP|UTF8)$/ || $2 ~ /^IGN/ || $2 ~ /^IX(ON|ANY|OFF)$/ || $2 ~ /^IN(LCR|PCK)$/ || $2 ~ /(^FLU?SH)|(FLU?SH$)/ || - $2 ~ /^C(LOCAL|READ)$/ || + $2 ~ /^C(LOCAL|READ|MSPAR|RTSCTS)$/ || $2 == "BRKINT" || $2 == "HUPCL" || $2 == "PENDIN" || $2 == "TOSTOP" || + $2 == "XCASE" || + $2 == "ALTWERASE" || + $2 == "NOKERNINFO" || $2 ~ /^PAR/ || $2 ~ /^SIG[^_]/ || - $2 ~ /^O[CNPFP][A-Z]+[^_][A-Z]+$/ || + $2 ~ /^O[CNPFPL][A-Z]+[^_][A-Z]+$/ || + $2 ~ /^(NL|CR|TAB|BS|VT|FF)DLY$/ || + $2 ~ /^(NL|CR|TAB|BS|VT|FF)[0-9]$/ || + $2 ~ /^O?XTABS$/ || + $2 ~ /^TC[IO](ON|OFF)$/ || $2 ~ /^IN_/ || $2 ~ /^LOCK_(SH|EX|NB|UN)$/ || $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ || @@ -311,7 +321,7 @@ ccflags="$@" $2 ~ /^TIOC/ || $2 ~ /^TCGET/ || $2 ~ /^TCSET/ || - $2 ~ /^TC(FLSH|SBRK|XONC)$/ || + $2 ~ /^TC(FLSH|SBRKP?|XONC)$/ || $2 !~ "RTF_BITS" && $2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ || $2 ~ /^BIOC/ || diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_unix.go b/vendor/golang.org/x/sys/unix/sockcmsg_unix.go index 6668bec711d..70af5a728e5 100644 --- a/vendor/golang.org/x/sys/unix/sockcmsg_unix.go +++ b/vendor/golang.org/x/sys/unix/sockcmsg_unix.go @@ -77,10 +77,10 @@ func UnixRights(fds ...int) []byte { h.Level = SOL_SOCKET h.Type = SCM_RIGHTS h.SetLen(CmsgLen(datalen)) - data := uintptr(cmsgData(h)) + data := cmsgData(h) for _, fd := range fds { - *(*int32)(unsafe.Pointer(data)) = int32(fd) - data += 4 + *(*int32)(data) = int32(fd) + data = unsafe.Pointer(uintptr(data) + 4) } return b } diff --git a/vendor/golang.org/x/sys/unix/syscall_bsd.go b/vendor/golang.org/x/sys/unix/syscall_bsd.go index 9679dec8982..e9671764ccb 100644 --- a/vendor/golang.org/x/sys/unix/syscall_bsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_bsd.go @@ -450,16 +450,34 @@ func Kevent(kq int, changes, events []Kevent_t, timeout *Timespec) (n int, err e //sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL -func Sysctl(name string) (value string, err error) { +// sysctlmib translates name to mib number and appends any additional args. +func sysctlmib(name string, args ...int) ([]_C_int, error) { // Translate name to mib number. mib, err := nametomib(name) + if err != nil { + return nil, err + } + + for _, a := range args { + mib = append(mib, _C_int(a)) + } + + return mib, nil +} + +func Sysctl(name string) (string, error) { + return SysctlArgs(name) +} + +func SysctlArgs(name string, args ...int) (string, error) { + mib, err := sysctlmib(name, args...) if err != nil { return "", err } // Find size. n := uintptr(0) - if err = sysctl(mib, nil, &n, nil, 0); err != nil { + if err := sysctl(mib, nil, &n, nil, 0); err != nil { return "", err } if n == 0 { @@ -468,7 +486,7 @@ func Sysctl(name string) (value string, err error) { // Read into buffer of that size. buf := make([]byte, n) - if err = sysctl(mib, &buf[0], &n, nil, 0); err != nil { + if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil { return "", err } @@ -479,17 +497,19 @@ func Sysctl(name string) (value string, err error) { return string(buf[0:n]), nil } -func SysctlUint32(name string) (value uint32, err error) { - // Translate name to mib number. - mib, err := nametomib(name) +func SysctlUint32(name string) (uint32, error) { + return SysctlUint32Args(name) +} + +func SysctlUint32Args(name string, args ...int) (uint32, error) { + mib, err := sysctlmib(name, args...) if err != nil { return 0, err } - // Read into buffer of that size. n := uintptr(4) buf := make([]byte, 4) - if err = sysctl(mib, &buf[0], &n, nil, 0); err != nil { + if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil { return 0, err } if n != 4 { @@ -498,6 +518,49 @@ func SysctlUint32(name string) (value uint32, err error) { return *(*uint32)(unsafe.Pointer(&buf[0])), nil } +func SysctlUint64(name string, args ...int) (uint64, error) { + mib, err := sysctlmib(name, args...) + if err != nil { + return 0, err + } + + n := uintptr(8) + buf := make([]byte, 8) + if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil { + return 0, err + } + if n != 8 { + return 0, EIO + } + return *(*uint64)(unsafe.Pointer(&buf[0])), nil +} + +func SysctlRaw(name string, args ...int) ([]byte, error) { + mib, err := sysctlmib(name, args...) + if err != nil { + return nil, err + } + + // Find size. + n := uintptr(0) + if err := sysctl(mib, nil, &n, nil, 0); err != nil { + return nil, err + } + if n == 0 { + return nil, nil + } + + // Read into buffer of that size. + buf := make([]byte, n) + if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil { + return nil, err + } + + // The actual call may return less than the original reported required + // size so ensure we deal with that. + return buf[:n], nil +} + //sys utimes(path string, timeval *[2]Timeval) (err error) func Utimes(path string, tv []Timeval) error { diff --git a/vendor/golang.org/x/sys/unix/syscall_bsd_test.go b/vendor/golang.org/x/sys/unix/syscall_bsd_test.go index 55d8843094d..0bcd741f778 100644 --- a/vendor/golang.org/x/sys/unix/syscall_bsd_test.go +++ b/vendor/golang.org/x/sys/unix/syscall_bsd_test.go @@ -33,3 +33,10 @@ func TestGetfsstat(t *testing.T) { } } } + +func TestSysctlRaw(t *testing.T) { + _, err := unix.SysctlRaw("kern.proc.pid", unix.Getpid()) + if err != nil { + t.Fatal(err) + } +} diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_test.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_test.go new file mode 100644 index 00000000000..6171a017665 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_test.go @@ -0,0 +1,20 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build freebsd + +package unix_test + +import ( + "testing" + + "golang.org/x/sys/unix" +) + +func TestSysctUint64(t *testing.T) { + _, err := unix.SysctlUint64("vm.max_kernel_address") + if err != nil { + t.Fatal(err) + } +} diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go index 9df719571d1..d3ee5d2c2f6 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -886,6 +886,7 @@ func Getpgrp() (pid int) { //sys Pause() (err error) //sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT //sysnb prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) = SYS_PRLIMIT64 +//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) //sys read(fd int, p []byte) (n int, err error) //sys Removexattr(path string, attr string) (err error) //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) @@ -1022,7 +1023,6 @@ func Munmap(b []byte) (err error) { // Personality // Poll // Ppoll -// Prctl // Pselect6 // Ptrace // Putpmsg diff --git a/vendor/golang.org/x/sys/unix/types_linux.go b/vendor/golang.org/x/sys/unix/types_linux.go index 9b75633b379..d5275875f87 100644 --- a/vendor/golang.org/x/sys/unix/types_linux.go +++ b/vendor/golang.org/x/sys/unix/types_linux.go @@ -50,12 +50,19 @@ package unix #include #include #include -#include +#include #include #include #include #include +#ifdef TCSETS2 +// On systems that have "struct termios2" use this as type Termios. +typedef struct termios2 termios_t; +#else +typedef struct termios termios_t; +#endif + enum { sizeofPtr = sizeof(void*), }; @@ -396,4 +403,4 @@ const ( // Terminal handling -type Termios C.struct_termios +type Termios C.termios_t diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go index 6fbef752263..d370be0ecb3 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -145,6 +145,7 @@ const ( B75 = 0x2 B921600 = 0x1007 B9600 = 0xd + BOTHER = 0x1000 BPF_A = 0x10 BPF_ABS = 0x20 BPF_ADD = 0x0 @@ -186,7 +187,13 @@ const ( BPF_W = 0x0 BPF_X = 0x8 BRKINT = 0x2 + BS0 = 0x0 + BS1 = 0x2000 + BSDLY = 0x2000 + CBAUD = 0x100f + CBAUDEX = 0x1000 CFLUSH = 0xf + CIBAUD = 0x100f0000 CLOCAL = 0x800 CLOCK_BOOTTIME = 0x7 CLOCK_BOOTTIME_ALARM = 0x9 @@ -225,7 +232,14 @@ const ( CLONE_UNTRACED = 0x800000 CLONE_VFORK = 0x4000 CLONE_VM = 0x100 + CMSPAR = 0x40000000 + CR0 = 0x0 + CR1 = 0x200 + CR2 = 0x400 + CR3 = 0x600 + CRDLY = 0x600 CREAD = 0x80 + CRTSCTS = 0x80000000 CS5 = 0x0 CS6 = 0x10 CS7 = 0x20 @@ -353,6 +367,9 @@ const ( EXTPROC = 0x10000 FD_CLOEXEC = 0x1 FD_SETSIZE = 0x400 + FF0 = 0x0 + FF1 = 0x8000 + FFDLY = 0x8000 FLUSHO = 0x1000 F_DUPFD = 0x0 F_DUPFD_CLOEXEC = 0x406 @@ -388,6 +405,7 @@ const ( F_UNLCK = 0x2 F_WRLCK = 0x1 HUPCL = 0x400 + IBSHIFT = 0x10 ICANON = 0x2 ICMPV6_FILTER = 0x1 ICRNL = 0x100 @@ -619,6 +637,7 @@ const ( IP_XFRM_POLICY = 0x11 ISIG = 0x1 ISTRIP = 0x20 + IUCLC = 0x200 IUTF8 = 0x4000 IXANY = 0x800 IXOFF = 0x1000 @@ -750,10 +769,13 @@ const ( NETLINK_UNUSED = 0x1 NETLINK_USERSOCK = 0x2 NETLINK_XFRM = 0x6 + NL0 = 0x0 + NL1 = 0x100 NLA_ALIGNTO = 0x4 NLA_F_NESTED = 0x8000 NLA_F_NET_BYTEORDER = 0x4000 NLA_HDRLEN = 0x4 + NLDLY = 0x100 NLMSG_ALIGNTO = 0x4 NLMSG_DONE = 0x3 NLMSG_ERROR = 0x2 @@ -778,6 +800,7 @@ const ( OCRNL = 0x8 OFDEL = 0x80 OFILL = 0x40 + OLCUC = 0x2 ONLCR = 0x4 ONLRET = 0x20 ONOCR = 0x10 @@ -1275,10 +1298,23 @@ const ( S_IXGRP = 0x8 S_IXOTH = 0x1 S_IXUSR = 0x40 + TAB0 = 0x0 + TAB1 = 0x800 + TAB2 = 0x1000 + TAB3 = 0x1800 + TABDLY = 0x1800 TCFLSH = 0x540b + TCGETA = 0x5405 + TCGETS = 0x5401 + TCGETS2 = 0x802c542a + TCGETX = 0x5432 TCIFLUSH = 0x0 + TCIOFF = 0x2 TCIOFLUSH = 0x2 + TCION = 0x3 TCOFLUSH = 0x1 + TCOOFF = 0x0 + TCOON = 0x1 TCP_CONGESTION = 0xd TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 @@ -1298,14 +1334,32 @@ const ( TCP_SYNCNT = 0x7 TCP_WINDOW_CLAMP = 0xa TCSAFLUSH = 0x2 + TCSBRK = 0x5409 + TCSBRKP = 0x5425 + TCSETA = 0x5406 + TCSETAF = 0x5408 + TCSETAW = 0x5407 + TCSETS = 0x5402 + TCSETS2 = 0x402c542b + TCSETSF = 0x5404 + TCSETSF2 = 0x402c542d + TCSETSW = 0x5403 + TCSETSW2 = 0x402c542c + TCSETX = 0x5433 + TCSETXF = 0x5434 + TCSETXW = 0x5435 + TCXONC = 0x540a TIOCCBRK = 0x5428 TIOCCONS = 0x541d TIOCEXCL = 0x540c TIOCGDEV = 0x80045432 TIOCGETD = 0x5424 + TIOCGEXCL = 0x80045440 TIOCGICOUNT = 0x545d TIOCGLCKTRMIOS = 0x5456 TIOCGPGRP = 0x540f + TIOCGPKT = 0x80045438 + TIOCGPTLCK = 0x80045439 TIOCGPTN = 0x80045430 TIOCGRS485 = 0x542e TIOCGSERIAL = 0x541e @@ -1411,6 +1465,8 @@ const ( WORDSIZE = 0x20 WSTOPPED = 0x2 WUNTRACED = 0x2 + XCASE = 0x4 + XTABS = 0x1800 ) // Errors diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go index b40ccb8d7e5..b83fb40b395 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -145,6 +145,7 @@ const ( B75 = 0x2 B921600 = 0x1007 B9600 = 0xd + BOTHER = 0x1000 BPF_A = 0x10 BPF_ABS = 0x20 BPF_ADD = 0x0 @@ -186,7 +187,13 @@ const ( BPF_W = 0x0 BPF_X = 0x8 BRKINT = 0x2 + BS0 = 0x0 + BS1 = 0x2000 + BSDLY = 0x2000 + CBAUD = 0x100f + CBAUDEX = 0x1000 CFLUSH = 0xf + CIBAUD = 0x100f0000 CLOCAL = 0x800 CLOCK_BOOTTIME = 0x7 CLOCK_BOOTTIME_ALARM = 0x9 @@ -225,7 +232,14 @@ const ( CLONE_UNTRACED = 0x800000 CLONE_VFORK = 0x4000 CLONE_VM = 0x100 + CMSPAR = 0x40000000 + CR0 = 0x0 + CR1 = 0x200 + CR2 = 0x400 + CR3 = 0x600 + CRDLY = 0x600 CREAD = 0x80 + CRTSCTS = 0x80000000 CS5 = 0x0 CS6 = 0x10 CS7 = 0x20 @@ -353,6 +367,9 @@ const ( EXTPROC = 0x10000 FD_CLOEXEC = 0x1 FD_SETSIZE = 0x400 + FF0 = 0x0 + FF1 = 0x8000 + FFDLY = 0x8000 FLUSHO = 0x1000 F_DUPFD = 0x0 F_DUPFD_CLOEXEC = 0x406 @@ -388,6 +405,7 @@ const ( F_UNLCK = 0x2 F_WRLCK = 0x1 HUPCL = 0x400 + IBSHIFT = 0x10 ICANON = 0x2 ICMPV6_FILTER = 0x1 ICRNL = 0x100 @@ -619,6 +637,7 @@ const ( IP_XFRM_POLICY = 0x11 ISIG = 0x1 ISTRIP = 0x20 + IUCLC = 0x200 IUTF8 = 0x4000 IXANY = 0x800 IXOFF = 0x1000 @@ -750,10 +769,13 @@ const ( NETLINK_UNUSED = 0x1 NETLINK_USERSOCK = 0x2 NETLINK_XFRM = 0x6 + NL0 = 0x0 + NL1 = 0x100 NLA_ALIGNTO = 0x4 NLA_F_NESTED = 0x8000 NLA_F_NET_BYTEORDER = 0x4000 NLA_HDRLEN = 0x4 + NLDLY = 0x100 NLMSG_ALIGNTO = 0x4 NLMSG_DONE = 0x3 NLMSG_ERROR = 0x2 @@ -778,6 +800,7 @@ const ( OCRNL = 0x8 OFDEL = 0x80 OFILL = 0x40 + OLCUC = 0x2 ONLCR = 0x4 ONLRET = 0x20 ONOCR = 0x10 @@ -1276,10 +1299,23 @@ const ( S_IXGRP = 0x8 S_IXOTH = 0x1 S_IXUSR = 0x40 + TAB0 = 0x0 + TAB1 = 0x800 + TAB2 = 0x1000 + TAB3 = 0x1800 + TABDLY = 0x1800 TCFLSH = 0x540b + TCGETA = 0x5405 + TCGETS = 0x5401 + TCGETS2 = 0x802c542a + TCGETX = 0x5432 TCIFLUSH = 0x0 + TCIOFF = 0x2 TCIOFLUSH = 0x2 + TCION = 0x3 TCOFLUSH = 0x1 + TCOOFF = 0x0 + TCOON = 0x1 TCP_CONGESTION = 0xd TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 @@ -1299,14 +1335,32 @@ const ( TCP_SYNCNT = 0x7 TCP_WINDOW_CLAMP = 0xa TCSAFLUSH = 0x2 + TCSBRK = 0x5409 + TCSBRKP = 0x5425 + TCSETA = 0x5406 + TCSETAF = 0x5408 + TCSETAW = 0x5407 + TCSETS = 0x5402 + TCSETS2 = 0x402c542b + TCSETSF = 0x5404 + TCSETSF2 = 0x402c542d + TCSETSW = 0x5403 + TCSETSW2 = 0x402c542c + TCSETX = 0x5433 + TCSETXF = 0x5434 + TCSETXW = 0x5435 + TCXONC = 0x540a TIOCCBRK = 0x5428 TIOCCONS = 0x541d TIOCEXCL = 0x540c TIOCGDEV = 0x80045432 TIOCGETD = 0x5424 + TIOCGEXCL = 0x80045440 TIOCGICOUNT = 0x545d TIOCGLCKTRMIOS = 0x5456 TIOCGPGRP = 0x540f + TIOCGPKT = 0x80045438 + TIOCGPTLCK = 0x80045439 TIOCGPTN = 0x80045430 TIOCGRS485 = 0x542e TIOCGSERIAL = 0x541e @@ -1412,6 +1466,8 @@ const ( WORDSIZE = 0x40 WSTOPPED = 0x2 WUNTRACED = 0x2 + XCASE = 0x4 + XTABS = 0x1800 ) // Errors diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go index 4535b78b777..1cc76a78cf4 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go @@ -110,6 +110,38 @@ const ( ARPHRD_TUNNEL6 = 0x301 ARPHRD_VOID = 0xffff ARPHRD_X25 = 0x10f + B0 = 0x0 + B1000000 = 0x1008 + B110 = 0x3 + B115200 = 0x1002 + B1152000 = 0x1009 + B1200 = 0x9 + B134 = 0x4 + B150 = 0x5 + B1500000 = 0x100a + B1800 = 0xa + B19200 = 0xe + B200 = 0x6 + B2000000 = 0x100b + B230400 = 0x1003 + B2400 = 0xb + B2500000 = 0x100c + B300 = 0x7 + B3000000 = 0x100d + B3500000 = 0x100e + B38400 = 0xf + B4000000 = 0x100f + B460800 = 0x1004 + B4800 = 0xc + B50 = 0x1 + B500000 = 0x1005 + B57600 = 0x1001 + B576000 = 0x1006 + B600 = 0x8 + B75 = 0x2 + B921600 = 0x1007 + B9600 = 0xd + BOTHER = 0x1000 BPF_A = 0x10 BPF_ABS = 0x20 BPF_ADD = 0x0 @@ -150,6 +182,15 @@ const ( BPF_TXA = 0x80 BPF_W = 0x0 BPF_X = 0x8 + BRKINT = 0x2 + BS0 = 0x0 + BS1 = 0x2000 + BSDLY = 0x2000 + CBAUD = 0x100f + CBAUDEX = 0x1000 + CFLUSH = 0xf + CIBAUD = 0x100f0000 + CLOCAL = 0x800 CLOCK_BOOTTIME = 0x7 CLOCK_BOOTTIME_ALARM = 0x9 CLOCK_DEFAULT = 0x0 @@ -187,6 +228,25 @@ const ( CLONE_UNTRACED = 0x800000 CLONE_VFORK = 0x4000 CLONE_VM = 0x100 + CMSPAR = 0x40000000 + CR0 = 0x0 + CR1 = 0x200 + CR2 = 0x400 + CR3 = 0x600 + CRDLY = 0x600 + CREAD = 0x80 + CRTSCTS = 0x80000000 + CS5 = 0x0 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSIGNAL = 0xff + CSIZE = 0x30 + CSTART = 0x11 + CSTATUS = 0x0 + CSTOP = 0x13 + CSTOPB = 0x40 + CSUSP = 0x1a DT_BLK = 0x6 DT_CHR = 0x2 DT_DIR = 0x4 @@ -198,6 +258,13 @@ const ( DT_WHT = 0xe ELF_NGREG = 0x12 ELF_PRARGSZ = 0x50 + ECHO = 0x8 + ECHOCTL = 0x200 + ECHOE = 0x10 + ECHOK = 0x20 + ECHOKE = 0x800 + ECHONL = 0x40 + ECHOPRT = 0x400 EPOLLERR = 0x8 EPOLLET = -0x80000000 EPOLLHUP = 0x10 @@ -280,8 +347,15 @@ const ( ETH_P_WAN_PPP = 0x7 ETH_P_WCCP = 0x883e ETH_P_X25 = 0x805 + EXTA = 0xe + EXTB = 0xf + EXTPROC = 0x10000 FD_CLOEXEC = 0x1 FD_SETSIZE = 0x400 + FF0 = 0x0 + FF1 = 0x8000 + FFDLY = 0x8000 + FLUSHO = 0x1000 F_DUPFD = 0x0 F_DUPFD_CLOEXEC = 0x406 F_EXLCK = 0x4 @@ -315,7 +389,12 @@ const ( F_ULOCK = 0x0 F_UNLCK = 0x2 F_WRLCK = 0x1 + HUPCL = 0x400 + IBSHIFT = 0x10 + ICANON = 0x2 ICMPV6_FILTER = 0x1 + ICRNL = 0x100 + IEXTEN = 0x8000 IFA_F_DADFAILED = 0x8 IFA_F_DEPRECATED = 0x20 IFA_F_HOMEADDRESS = 0x10 @@ -349,6 +428,12 @@ const ( IFF_UP = 0x1 IFF_VNET_HDR = 0x4000 IFNAMSIZ = 0x10 + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 IN_ACCESS = 0x1 IN_ALL_EVENTS = 0xfff IN_ATTRIB = 0x4 @@ -512,6 +597,13 @@ const ( IP_TTL = 0x2 IP_UNBLOCK_SOURCE = 0x25 IP_XFRM_POLICY = 0x11 + ISIG = 0x1 + ISTRIP = 0x20 + IUCLC = 0x200 + IUTF8 = 0x4000 + IXANY = 0x800 + IXOFF = 0x1000 + IXON = 0x400 LINUX_REBOOT_CMD_CAD_OFF = 0x0 LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef LINUX_REBOOT_CMD_HALT = 0xcdef0123 @@ -635,10 +727,13 @@ const ( NETLINK_UNUSED = 0x1 NETLINK_USERSOCK = 0x2 NETLINK_XFRM = 0x6 + NL0 = 0x0 + NL1 = 0x100 NLA_ALIGNTO = 0x4 NLA_F_NESTED = 0x8000 NLA_F_NET_BYTEORDER = 0x4000 NLA_HDRLEN = 0x4 + NLDLY = 0x100 NLMSG_ALIGNTO = 0x4 NLMSG_DONE = 0x3 NLMSG_ERROR = 0x2 @@ -658,6 +753,15 @@ const ( NLM_F_REPLACE = 0x100 NLM_F_REQUEST = 0x1 NLM_F_ROOT = 0x100 + NOFLSH = 0x80 + OCRNL = 0x8 + OFDEL = 0x80 + OFILL = 0x40 + OLCUC = 0x2 + ONLCR = 0x4 + ONLRET = 0x20 + ONOCR = 0x10 + OPOST = 0x1 O_ACCMODE = 0x3 O_APPEND = 0x400 O_ASYNC = 0x2000 @@ -674,6 +778,7 @@ const ( O_NOCTTY = 0x100 O_NOFOLLOW = 0x8000 O_NONBLOCK = 0x800 + O_PATH = 0x200000 O_RDONLY = 0x0 O_RDWR = 0x2 O_RSYNC = 0x1000 @@ -695,6 +800,10 @@ const ( PACKET_RECV_OUTPUT = 0x3 PACKET_RX_RING = 0x5 PACKET_STATISTICS = 0x6 + PARENB = 0x100 + PARMRK = 0x8 + PARODD = 0x200 + PENDIN = 0x4000 PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 @@ -1114,9 +1223,23 @@ const ( S_IXGRP = 0x8 S_IXOTH = 0x1 S_IXUSR = 0x40 + TAB0 = 0x0 + TAB1 = 0x800 + TAB2 = 0x1000 + TAB3 = 0x1800 + TABDLY = 0x1800 + TCFLSH = 0x540b + TCGETA = 0x5405 + TCGETS = 0x5401 + TCGETS2 = 0x802c542a + TCGETX = 0x5432 TCIFLUSH = 0x0 + TCIOFF = 0x2 TCIOFLUSH = 0x2 + TCION = 0x3 TCOFLUSH = 0x1 + TCOOFF = 0x0 + TCOON = 0x1 TCP_CONGESTION = 0xd TCP_CORK = 0x3 TCP_DEFER_ACCEPT = 0x9 @@ -1135,14 +1258,33 @@ const ( TCP_QUICKACK = 0xc TCP_SYNCNT = 0x7 TCP_WINDOW_CLAMP = 0xa + TCSAFLUSH = 0x2 + TCSBRK = 0x5409 + TCSBRKP = 0x5425 + TCSETA = 0x5406 + TCSETAF = 0x5408 + TCSETAW = 0x5407 + TCSETS = 0x5402 + TCSETS2 = 0x402c542b + TCSETSF = 0x5404 + TCSETSF2 = 0x402c542d + TCSETSW = 0x5403 + TCSETSW2 = 0x402c542c + TCSETX = 0x5433 + TCSETXF = 0x5434 + TCSETXW = 0x5435 + TCXONC = 0x540a TIOCCBRK = 0x5428 TIOCCONS = 0x541d TIOCEXCL = 0x540c TIOCGDEV = 0x80045432 TIOCGETD = 0x5424 + TIOCGEXCL = 0x80045440 TIOCGICOUNT = 0x545d TIOCGLCKTRMIOS = 0x5456 TIOCGPGRP = 0x540f + TIOCGPKT = 0x80045438 + TIOCGPTLCK = 0x80045439 TIOCGPTN = 0x80045430 TIOCGRS485 = 0x542e TIOCGSERIAL = 0x541e @@ -1200,6 +1342,7 @@ const ( TIOCSTI = 0x5412 TIOCSWINSZ = 0x5414 TIOCVHANGUP = 0x5437 + TOSTOP = 0x100 TUNATTACHFILTER = 0x400854d5 TUNDETACHFILTER = 0x400854d6 TUNGETFEATURES = 0x800454cf @@ -1217,6 +1360,26 @@ const ( TUNSETSNDBUF = 0x400454d4 TUNSETTXFILTER = 0x400454d1 TUNSETVNETHDRSZ = 0x400454d8 + VDISCARD = 0xd + VEOF = 0x4 + VEOL = 0xb + VEOL2 = 0x10 + VERASE = 0x2 + VINTR = 0x0 + VKILL = 0x3 + VLNEXT = 0xf + VMIN = 0x6 + VQUIT = 0x1 + VREPRINT = 0xc + VSTART = 0x8 + VSTOP = 0x9 + VSUSP = 0xa + VSWTC = 0x7 + VT0 = 0x0 + VT1 = 0x4000 + VTDLY = 0x4000 + VTIME = 0x5 + VWERASE = 0xe WALL = 0x40000000 WCLONE = 0x80000000 WCONTINUED = 0x8 @@ -1227,6 +1390,8 @@ const ( WORDSIZE = 0x20 WSTOPPED = 0x2 WUNTRACED = 0x2 + XCASE = 0x4 + XTABS = 0x1800 ) // Errors diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go index 165073f1326..47027b79c9d 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -149,6 +149,7 @@ const ( B75 = 0x2 B921600 = 0x1007 B9600 = 0xd + BOTHER = 0x1000 BPF_A = 0x10 BPF_ABS = 0x20 BPF_ADD = 0x0 @@ -192,7 +193,13 @@ const ( BPF_X = 0x8 BPF_XOR = 0xa0 BRKINT = 0x2 + BS0 = 0x0 + BS1 = 0x2000 + BSDLY = 0x2000 + CBAUD = 0x100f + CBAUDEX = 0x1000 CFLUSH = 0xf + CIBAUD = 0x100f0000 CLOCAL = 0x800 CLOCK_BOOTTIME = 0x7 CLOCK_BOOTTIME_ALARM = 0x9 @@ -231,7 +238,14 @@ const ( CLONE_UNTRACED = 0x800000 CLONE_VFORK = 0x4000 CLONE_VM = 0x100 + CMSPAR = 0x40000000 + CR0 = 0x0 + CR1 = 0x200 + CR2 = 0x400 + CR3 = 0x600 + CRDLY = 0x600 CREAD = 0x80 + CRTSCTS = 0x80000000 CS5 = 0x0 CS6 = 0x10 CS7 = 0x20 @@ -367,6 +381,9 @@ const ( EXTPROC = 0x10000 FD_CLOEXEC = 0x1 FD_SETSIZE = 0x400 + FF0 = 0x0 + FF1 = 0x8000 + FFDLY = 0x8000 FLUSHO = 0x1000 F_DUPFD = 0x0 F_DUPFD_CLOEXEC = 0x406 @@ -402,6 +419,7 @@ const ( F_UNLCK = 0x2 F_WRLCK = 0x1 HUPCL = 0x400 + IBSHIFT = 0x10 ICANON = 0x2 ICMPV6_FILTER = 0x1 ICRNL = 0x100 @@ -645,6 +663,7 @@ const ( IP_XFRM_POLICY = 0x11 ISIG = 0x1 ISTRIP = 0x20 + IUCLC = 0x200 IUTF8 = 0x4000 IXANY = 0x800 IXOFF = 0x1000 @@ -782,10 +801,13 @@ const ( NETLINK_UNUSED = 0x1 NETLINK_USERSOCK = 0x2 NETLINK_XFRM = 0x6 + NL0 = 0x0 + NL1 = 0x100 NLA_ALIGNTO = 0x4 NLA_F_NESTED = 0x8000 NLA_F_NET_BYTEORDER = 0x4000 NLA_HDRLEN = 0x4 + NLDLY = 0x100 NLMSG_ALIGNTO = 0x4 NLMSG_DONE = 0x3 NLMSG_ERROR = 0x2 @@ -810,6 +832,7 @@ const ( OCRNL = 0x8 OFDEL = 0x80 OFILL = 0x40 + OLCUC = 0x2 ONLCR = 0x4 ONLRET = 0x20 ONOCR = 0x10 @@ -1332,10 +1355,23 @@ const ( S_IXGRP = 0x8 S_IXOTH = 0x1 S_IXUSR = 0x40 + TAB0 = 0x0 + TAB1 = 0x800 + TAB2 = 0x1000 + TAB3 = 0x1800 + TABDLY = 0x1800 TCFLSH = 0x540b + TCGETA = 0x5405 + TCGETS = 0x5401 + TCGETS2 = 0x802c542a + TCGETX = 0x5432 TCIFLUSH = 0x0 + TCIOFF = 0x2 TCIOFLUSH = 0x2 + TCION = 0x3 TCOFLUSH = 0x1 + TCOOFF = 0x0 + TCOON = 0x1 TCP_CONGESTION = 0xd TCP_COOKIE_IN_ALWAYS = 0x1 TCP_COOKIE_MAX = 0x10 @@ -1374,6 +1410,21 @@ const ( TCP_USER_TIMEOUT = 0x12 TCP_WINDOW_CLAMP = 0xa TCSAFLUSH = 0x2 + TCSBRK = 0x5409 + TCSBRKP = 0x5425 + TCSETA = 0x5406 + TCSETAF = 0x5408 + TCSETAW = 0x5407 + TCSETS = 0x5402 + TCSETS2 = 0x402c542b + TCSETSF = 0x5404 + TCSETSF2 = 0x402c542d + TCSETSW = 0x5403 + TCSETSW2 = 0x402c542c + TCSETX = 0x5433 + TCSETXF = 0x5434 + TCSETXW = 0x5435 + TCXONC = 0x540a TIOCCBRK = 0x5428 TIOCCONS = 0x541d TIOCEXCL = 0x540c @@ -1493,6 +1544,8 @@ const ( WORDSIZE = 0x40 WSTOPPED = 0x2 WUNTRACED = 0x2 + XCASE = 0x4 + XTABS = 0x1800 ) // Errors diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go index 9d908d7199f..5b90d07ed23 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go @@ -150,6 +150,7 @@ const ( B75 = 0x2 B921600 = 0x16 B9600 = 0xd + BOTHER = 0x1f BPF_A = 0x10 BPF_ABS = 0x20 BPF_ADD = 0x0 @@ -193,7 +194,13 @@ const ( BPF_X = 0x8 BPF_XOR = 0xa0 BRKINT = 0x2 + BS0 = 0x0 + BS1 = 0x8000 + BSDLY = 0x8000 + CBAUD = 0xff + CBAUDEX = 0x0 CFLUSH = 0xf + CIBAUD = 0xff0000 CLOCAL = 0x8000 CLOCK_BOOTTIME = 0x7 CLOCK_BOOTTIME_ALARM = 0x9 @@ -232,7 +239,14 @@ const ( CLONE_UNTRACED = 0x800000 CLONE_VFORK = 0x4000 CLONE_VM = 0x100 + CMSPAR = 0x40000000 + CR0 = 0x0 + CR1 = 0x1000 + CR2 = 0x2000 + CR3 = 0x3000 + CRDLY = 0x3000 CREAD = 0x800 + CRTSCTS = 0x80000000 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 @@ -369,6 +383,9 @@ const ( EXTPROC = 0x10000000 FD_CLOEXEC = 0x1 FD_SETSIZE = 0x400 + FF0 = 0x0 + FF1 = 0x4000 + FFDLY = 0x4000 FLUSHO = 0x800000 F_DUPFD = 0x0 F_DUPFD_CLOEXEC = 0x406 @@ -407,6 +424,7 @@ const ( F_UNLCK = 0x2 F_WRLCK = 0x1 HUPCL = 0x4000 + IBSHIFT = 0x10 ICANON = 0x100 ICMPV6_FILTER = 0x1 ICRNL = 0x100 @@ -635,6 +653,7 @@ const ( IP_XFRM_POLICY = 0x11 ISIG = 0x80 ISTRIP = 0x20 + IUCLC = 0x1000 IUTF8 = 0x4000 IXANY = 0x800 IXOFF = 0x400 @@ -772,10 +791,15 @@ const ( NETLINK_UNUSED = 0x1 NETLINK_USERSOCK = 0x2 NETLINK_XFRM = 0x6 + NL0 = 0x0 + NL1 = 0x100 + NL2 = 0x200 + NL3 = 0x300 NLA_ALIGNTO = 0x4 NLA_F_NESTED = 0x8000 NLA_F_NET_BYTEORDER = 0x4000 NLA_HDRLEN = 0x4 + NLDLY = 0x300 NLMSG_ALIGNTO = 0x4 NLMSG_DONE = 0x3 NLMSG_ERROR = 0x2 @@ -800,6 +824,7 @@ const ( OCRNL = 0x8 OFDEL = 0x80 OFILL = 0x40 + OLCUC = 0x4 ONLCR = 0x2 ONLRET = 0x20 ONOCR = 0x10 @@ -1398,10 +1423,21 @@ const ( S_IXGRP = 0x8 S_IXOTH = 0x1 S_IXUSR = 0x40 + TAB0 = 0x0 + TAB1 = 0x400 + TAB2 = 0x800 + TAB3 = 0xc00 + TABDLY = 0xc00 TCFLSH = 0x2000741f + TCGETA = 0x40147417 + TCGETS = 0x402c7413 TCIFLUSH = 0x0 + TCIOFF = 0x2 TCIOFLUSH = 0x2 + TCION = 0x3 TCOFLUSH = 0x1 + TCOOFF = 0x0 + TCOON = 0x1 TCP_CONGESTION = 0xd TCP_COOKIE_IN_ALWAYS = 0x1 TCP_COOKIE_MAX = 0x10 @@ -1440,6 +1476,15 @@ const ( TCP_USER_TIMEOUT = 0x12 TCP_WINDOW_CLAMP = 0xa TCSAFLUSH = 0x2 + TCSBRK = 0x2000741d + TCSBRKP = 0x5425 + TCSETA = 0x80147418 + TCSETAF = 0x8014741c + TCSETAW = 0x80147419 + TCSETS = 0x802c7414 + TCSETSF = 0x802c7416 + TCSETSW = 0x802c7415 + TCXONC = 0x2000741e TIOCCBRK = 0x5428 TIOCCONS = 0x541d TIOCEXCL = 0x540c @@ -1571,6 +1616,8 @@ const ( WORDSIZE = 0x40 WSTOPPED = 0x2 WUNTRACED = 0x2 + XCASE = 0x4000 + XTABS = 0xc00 ) // Errors diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go index ccf05a27415..0861bd5666b 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go @@ -149,6 +149,7 @@ const ( B75 = 0x2 B921600 = 0x16 B9600 = 0xd + BOTHER = 0x1f BPF_A = 0x10 BPF_ABS = 0x20 BPF_ADD = 0x0 @@ -192,7 +193,13 @@ const ( BPF_X = 0x8 BPF_XOR = 0xa0 BRKINT = 0x2 + BS0 = 0x0 + BS1 = 0x8000 + BSDLY = 0x8000 + CBAUD = 0xff + CBAUDEX = 0x0 CFLUSH = 0xf + CIBAUD = 0xff0000 CLOCAL = 0x8000 CLOCK_BOOTTIME = 0x7 CLOCK_BOOTTIME_ALARM = 0x9 @@ -231,7 +238,14 @@ const ( CLONE_UNTRACED = 0x800000 CLONE_VFORK = 0x4000 CLONE_VM = 0x100 + CMSPAR = 0x40000000 + CR0 = 0x0 + CR1 = 0x1000 + CR2 = 0x2000 + CR3 = 0x3000 + CRDLY = 0x3000 CREAD = 0x800 + CRTSCTS = 0x80000000 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 @@ -365,6 +379,9 @@ const ( EXTPROC = 0x10000000 FD_CLOEXEC = 0x1 FD_SETSIZE = 0x400 + FF0 = 0x0 + FF1 = 0x4000 + FFDLY = 0x4000 FLUSHO = 0x800000 F_DUPFD = 0x0 F_DUPFD_CLOEXEC = 0x406 @@ -400,6 +417,7 @@ const ( F_UNLCK = 0x2 F_WRLCK = 0x1 HUPCL = 0x4000 + IBSHIFT = 0x10 ICANON = 0x100 ICMPV6_FILTER = 0x1 ICRNL = 0x100 @@ -643,6 +661,7 @@ const ( IP_XFRM_POLICY = 0x11 ISIG = 0x80 ISTRIP = 0x20 + IUCLC = 0x1000 IUTF8 = 0x4000 IXANY = 0x800 IXOFF = 0x400 @@ -780,10 +799,15 @@ const ( NETLINK_UNUSED = 0x1 NETLINK_USERSOCK = 0x2 NETLINK_XFRM = 0x6 + NL0 = 0x0 + NL1 = 0x100 + NL2 = 0x200 + NL3 = 0x300 NLA_ALIGNTO = 0x4 NLA_F_NESTED = 0x8000 NLA_F_NET_BYTEORDER = 0x4000 NLA_HDRLEN = 0x4 + NLDLY = 0x300 NLMSG_ALIGNTO = 0x4 NLMSG_DONE = 0x3 NLMSG_ERROR = 0x2 @@ -808,6 +832,7 @@ const ( OCRNL = 0x8 OFDEL = 0x80 OFILL = 0x40 + OLCUC = 0x4 ONLCR = 0x2 ONLRET = 0x20 ONOCR = 0x10 @@ -1397,10 +1422,21 @@ const ( S_IXGRP = 0x8 S_IXOTH = 0x1 S_IXUSR = 0x40 + TAB0 = 0x0 + TAB1 = 0x400 + TAB2 = 0x800 + TAB3 = 0xc00 + TABDLY = 0xc00 TCFLSH = 0x2000741f + TCGETA = 0x40147417 + TCGETS = 0x402c7413 TCIFLUSH = 0x0 + TCIOFF = 0x2 TCIOFLUSH = 0x2 + TCION = 0x3 TCOFLUSH = 0x1 + TCOOFF = 0x0 + TCOON = 0x1 TCP_CONGESTION = 0xd TCP_COOKIE_IN_ALWAYS = 0x1 TCP_COOKIE_MAX = 0x10 @@ -1439,6 +1475,15 @@ const ( TCP_USER_TIMEOUT = 0x12 TCP_WINDOW_CLAMP = 0xa TCSAFLUSH = 0x2 + TCSBRK = 0x2000741d + TCSBRKP = 0x5425 + TCSETA = 0x80147418 + TCSETAF = 0x8014741c + TCSETAW = 0x80147419 + TCSETS = 0x802c7414 + TCSETSF = 0x802c7416 + TCSETSW = 0x802c7415 + TCXONC = 0x2000741e TIOCCBRK = 0x5428 TIOCCONS = 0x541d TIOCEXCL = 0x540c @@ -1570,6 +1615,8 @@ const ( WORDSIZE = 0x40 WSTOPPED = 0x2 WUNTRACED = 0x2 + XCASE = 0x4000 + XTABS = 0xc00 ) // Errors diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go index 81ae498a38f..ff6c39dc244 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go @@ -788,6 +788,16 @@ func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func read(fd int, p []byte) (n int, err error) { var _p0 unsafe.Pointer if len(p) > 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go index 2adb9284a34..c2438522d34 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go @@ -788,6 +788,16 @@ func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func read(fd int, p []byte) (n int, err error) { var _p0 unsafe.Pointer if len(p) > 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go index ca00ed3dfb9..dd66c975879 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go @@ -788,6 +788,16 @@ func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func read(fd int, p []byte) (n int, err error) { var _p0 unsafe.Pointer if len(p) > 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go index 8eafcebcbfd..d0a6ed82927 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go @@ -788,6 +788,16 @@ func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func read(fd int, p []byte) (n int, err error) { var _p0 unsafe.Pointer if len(p) > 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go index 008a52638b9..f58a3ff2f92 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go @@ -788,6 +788,16 @@ func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func read(fd int, p []byte) (n int, err error) { var _p0 unsafe.Pointer if len(p) > 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go index d91f763af9d..22fc7a45725 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go @@ -788,6 +788,16 @@ func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func read(fd int, p []byte) (n int, err error) { var _p0 unsafe.Pointer if len(p) > 0 { diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go index 9a58381b4dc..cf5db0e1b67 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go @@ -1,8 +1,7 @@ +// +build 386,linux // Created by cgo -godefs - DO NOT EDIT // cgo -godefs types_linux.go -// +build 386,linux - package unix const ( @@ -580,13 +579,12 @@ const ( ) type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Line uint8 - Cc [32]uint8 - Pad_cgo_0 [3]byte - Ispeed uint32 - Ospeed uint32 + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Line uint8 + Cc [19]uint8 + Ispeed uint32 + Ospeed uint32 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go index f1937a62756..ac27784ab2e 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go @@ -1,8 +1,7 @@ +// +build amd64,linux // Created by cgo -godefs - DO NOT EDIT // cgo -godefs types_linux.go -// +build amd64,linux - package unix const ( @@ -598,13 +597,12 @@ const ( ) type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Line uint8 - Cc [32]uint8 - Pad_cgo_0 [3]byte - Ispeed uint32 - Ospeed uint32 + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Line uint8 + Cc [19]uint8 + Ispeed uint32 + Ospeed uint32 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go index c8a0de45adf..b318bb851c7 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go @@ -1,8 +1,7 @@ +// +build arm,linux // Created by cgo -godefs - DO NOT EDIT // cgo -godefs types_linux.go -// +build arm,linux - package unix const ( @@ -569,115 +568,12 @@ const ( ) type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Line uint8 - Cc [32]uint8 - Pad_cgo_0 [3]byte - Ispeed uint32 - Ospeed uint32 + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Line uint8 + Cc [19]uint8 + Ispeed uint32 + Ospeed uint32 } - -const ( - VINTR = 0x0 - VQUIT = 0x1 - VERASE = 0x2 - VKILL = 0x3 - VEOF = 0x4 - VTIME = 0x5 - VMIN = 0x6 - VSWTC = 0x7 - VSTART = 0x8 - VSTOP = 0x9 - VSUSP = 0xa - VEOL = 0xb - VREPRINT = 0xc - VDISCARD = 0xd - VWERASE = 0xe - VLNEXT = 0xf - VEOL2 = 0x10 - IGNBRK = 0x1 - BRKINT = 0x2 - IGNPAR = 0x4 - PARMRK = 0x8 - INPCK = 0x10 - ISTRIP = 0x20 - INLCR = 0x40 - IGNCR = 0x80 - ICRNL = 0x100 - IUCLC = 0x200 - IXON = 0x400 - IXANY = 0x800 - IXOFF = 0x1000 - IMAXBEL = 0x2000 - IUTF8 = 0x4000 - OPOST = 0x1 - OLCUC = 0x2 - ONLCR = 0x4 - OCRNL = 0x8 - ONOCR = 0x10 - ONLRET = 0x20 - OFILL = 0x40 - OFDEL = 0x80 - B0 = 0x0 - B50 = 0x1 - B75 = 0x2 - B110 = 0x3 - B134 = 0x4 - B150 = 0x5 - B200 = 0x6 - B300 = 0x7 - B600 = 0x8 - B1200 = 0x9 - B1800 = 0xa - B2400 = 0xb - B4800 = 0xc - B9600 = 0xd - B19200 = 0xe - B38400 = 0xf - CSIZE = 0x30 - CS5 = 0x0 - CS6 = 0x10 - CS7 = 0x20 - CS8 = 0x30 - CSTOPB = 0x40 - CREAD = 0x80 - PARENB = 0x100 - PARODD = 0x200 - HUPCL = 0x400 - CLOCAL = 0x800 - B57600 = 0x1001 - B115200 = 0x1002 - B230400 = 0x1003 - B460800 = 0x1004 - B500000 = 0x1005 - B576000 = 0x1006 - B921600 = 0x1007 - B1000000 = 0x1008 - B1152000 = 0x1009 - B1500000 = 0x100a - B2000000 = 0x100b - B2500000 = 0x100c - B3000000 = 0x100d - B3500000 = 0x100e - B4000000 = 0x100f - ISIG = 0x1 - ICANON = 0x2 - XCASE = 0x4 - ECHO = 0x8 - ECHOE = 0x10 - ECHOK = 0x20 - ECHONL = 0x40 - NOFLSH = 0x80 - TOSTOP = 0x100 - ECHOCTL = 0x200 - ECHOPRT = 0x400 - ECHOKE = 0x800 - FLUSHO = 0x1000 - PENDIN = 0x4000 - IEXTEN = 0x8000 - TCGETS = 0x5401 - TCSETS = 0x5402 -) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go index f989a36052c..a159aadab69 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go @@ -1,8 +1,7 @@ +// +build arm64,linux // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- -fsigned-char types_linux.go -// +build arm64,linux - package unix const ( @@ -585,13 +584,12 @@ const ( ) type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Line uint8 - Cc [32]uint8 - Pad_cgo_0 [3]byte - Ispeed uint32 - Ospeed uint32 + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Line uint8 + Cc [19]uint8 + Ispeed uint32 + Ospeed uint32 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go index 808203d071b..b14cbfef0d8 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go @@ -1,8 +1,7 @@ +// +build ppc64,linux // Created by cgo -godefs - DO NOT EDIT // cgo -godefs types_linux.go -// +build ppc64,linux - package unix const ( @@ -595,13 +594,12 @@ const ( ) type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Line uint8 - Cc [32]uint8 - Pad_cgo_0 [3]byte - Ispeed uint32 - Ospeed uint32 + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [19]uint8 + Line uint8 + Ispeed uint32 + Ospeed uint32 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go index d4a689faffa..22c96a2f0a0 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go @@ -1,8 +1,7 @@ +// +build ppc64le,linux // Created by cgo -godefs - DO NOT EDIT // cgo -godefs types_linux.go -// +build ppc64le,linux - package unix const ( @@ -595,13 +594,12 @@ const ( ) type Termios struct { - Iflag uint32 - Oflag uint32 - Cflag uint32 - Lflag uint32 - Line uint8 - Cc [32]uint8 - Pad_cgo_0 [3]byte - Ispeed uint32 - Ospeed uint32 + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [19]uint8 + Line uint8 + Ispeed uint32 + Ospeed uint32 } diff --git a/vendor/gopkg.in/yaml.v2/decode_test.go b/vendor/gopkg.in/yaml.v2/decode_test.go index 04fdd9e72ca..c159760b64f 100644 --- a/vendor/gopkg.in/yaml.v2/decode_test.go +++ b/vendor/gopkg.in/yaml.v2/decode_test.go @@ -559,6 +559,28 @@ var unmarshalTests = []struct { "a: []", &struct{ A []int }{[]int{}}, }, + + // UTF-16-LE + { + "\xff\xfe\xf1\x00o\x00\xf1\x00o\x00:\x00 \x00v\x00e\x00r\x00y\x00 \x00y\x00e\x00s\x00\n\x00", + M{"ñoño": "very yes"}, + }, + // UTF-16-LE with surrogate. + { + "\xff\xfe\xf1\x00o\x00\xf1\x00o\x00:\x00 \x00v\x00e\x00r\x00y\x00 \x00y\x00e\x00s\x00 \x00=\xd8\xd4\xdf\n\x00", + M{"ñoño": "very yes 🟔"}, + }, + + // UTF-16-BE + { + "\xfe\xff\x00\xf1\x00o\x00\xf1\x00o\x00:\x00 \x00v\x00e\x00r\x00y\x00 \x00y\x00e\x00s\x00\n", + M{"ñoño": "very yes"}, + }, + // UTF-16-BE with surrogate. + { + "\xfe\xff\x00\xf1\x00o\x00\xf1\x00o\x00:\x00 \x00v\x00e\x00r\x00y\x00 \x00y\x00e\x00s\x00 \xd8=\xdf\xd4\x00\n", + M{"ñoño": "very yes 🟔"}, + }, } type M map[interface{}]interface{} diff --git a/vendor/gopkg.in/yaml.v2/readerc.go b/vendor/gopkg.in/yaml.v2/readerc.go index d5fb0972772..f450791717b 100644 --- a/vendor/gopkg.in/yaml.v2/readerc.go +++ b/vendor/gopkg.in/yaml.v2/readerc.go @@ -247,7 +247,7 @@ func yaml_parser_update_buffer(parser *yaml_parser_t, length int) bool { if parser.encoding == yaml_UTF16LE_ENCODING { low, high = 0, 1 } else { - high, low = 1, 0 + low, high = 1, 0 } // The UTF-16 encoding is not as simple as one might @@ -357,23 +357,26 @@ func yaml_parser_update_buffer(parser *yaml_parser_t, length int) bool { if value <= 0x7F { // 0000 0000-0000 007F . 0xxxxxxx parser.buffer[buffer_len+0] = byte(value) + buffer_len += 1 } else if value <= 0x7FF { // 0000 0080-0000 07FF . 110xxxxx 10xxxxxx parser.buffer[buffer_len+0] = byte(0xC0 + (value >> 6)) parser.buffer[buffer_len+1] = byte(0x80 + (value & 0x3F)) + buffer_len += 2 } else if value <= 0xFFFF { // 0000 0800-0000 FFFF . 1110xxxx 10xxxxxx 10xxxxxx parser.buffer[buffer_len+0] = byte(0xE0 + (value >> 12)) parser.buffer[buffer_len+1] = byte(0x80 + ((value >> 6) & 0x3F)) parser.buffer[buffer_len+2] = byte(0x80 + (value & 0x3F)) + buffer_len += 3 } else { // 0001 0000-0010 FFFF . 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx parser.buffer[buffer_len+0] = byte(0xF0 + (value >> 18)) parser.buffer[buffer_len+1] = byte(0x80 + ((value >> 12) & 0x3F)) parser.buffer[buffer_len+2] = byte(0x80 + ((value >> 6) & 0x3F)) parser.buffer[buffer_len+3] = byte(0x80 + (value & 0x3F)) + buffer_len += 4 } - buffer_len += width parser.unread++ }