diff --git a/hack/lib/util.sh b/hack/lib/util.sh index c703ed65fb73e..3de8d1232f474 100755 --- a/hack/lib/util.sh +++ b/hack/lib/util.sh @@ -260,6 +260,7 @@ kube::util::gen-analytics() { mdfiles=($( find "${dir}" -name "*.md" -type f \ -not -path '*/\.*' \ -not -path "${path}/vendor/*" \ + -not -path "${path}/staging/*" \ -not -path "${path}/third_party/*" \ -not -path "${path}/_gopath/*" \ -not -path "${path}/_output/*" \ diff --git a/hack/verify-flags-underscore.py b/hack/verify-flags-underscore.py index 1e8b4f8fa26d6..9c9d5ceb74d79 100755 --- a/hack/verify-flags-underscore.py +++ b/hack/verify-flags-underscore.py @@ -55,6 +55,8 @@ def get_all_files(rootdir): # don't visit certain dirs if 'vendor' in dirs: dirs.remove('vendor') + if 'staging' in dirs: + dirs.remove('staging') if '_output' in dirs: dirs.remove('_output') if '_gopath' in dirs: diff --git a/hack/verify-gofmt.sh b/hack/verify-gofmt.sh index cd86c82657021..573c95cc22958 100755 --- a/hack/verify-gofmt.sh +++ b/hack/verify-gofmt.sh @@ -37,6 +37,7 @@ find_files() { -o -wholename './target' \ -o -wholename '*/third_party/*' \ -o -wholename '*/vendor/*' \ + -o -wholename './staging' \ \) -prune \ \) -name '*.go' } diff --git a/staging/README.md b/staging/README.md new file mode 100644 index 0000000000000..af3ed93c5975c --- /dev/null +++ b/staging/README.md @@ -0,0 +1,3 @@ +This _staging/src/k8s.io/client-go directory is the staging area of the client repo. It contains a versioned client, tools built around the client like the reflector, and all the client dependencies. The content will be periodically published to k8s.io/client-go repo. +The staged content is copied from the main repo, i.e., k8s.io/kubernetes, with directory rearrangement and necessary rewritings. To sync the content with the latest code in your local k8s.io/kubernetes, you need to run `godep restore` in k8s root directory, then run _staging/src/k8s.io/client-go/copy.sh. +vendor/k8s.io/client-go is a symlink pointing to this staging area, so to use the packages in the staging area, you can import it as "vendor/client-go/", as if the client were vendored. The client will be vendored from k8s.io/client-go for real after the test matrix is converted to vendor k8s components. diff --git a/staging/src/k8s.io/client-go/1.4/Godeps/Readme b/staging/src/k8s.io/client-go/1.4/Godeps/Readme new file mode 100644 index 0000000000000..4cdaa53d56d71 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/Godeps/Readme @@ -0,0 +1,5 @@ +This directory tree is generated automatically by godep. + +Please do not edit. + +See https://github.com/tools/godep for more information. diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/bitbucket.org/ww/goautoneg/Makefile b/staging/src/k8s.io/client-go/1.4/_vendor/bitbucket.org/ww/goautoneg/Makefile new file mode 100644 index 0000000000000..e33ee17303671 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/bitbucket.org/ww/goautoneg/Makefile @@ -0,0 +1,13 @@ +include $(GOROOT)/src/Make.inc + +TARG=bitbucket.org/ww/goautoneg +GOFILES=autoneg.go + +include $(GOROOT)/src/Make.pkg + +format: + gofmt -w *.go + +docs: + gomake clean + godoc ${TARG} > README.txt diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/bitbucket.org/ww/goautoneg/README.txt b/staging/src/k8s.io/client-go/1.4/_vendor/bitbucket.org/ww/goautoneg/README.txt new file mode 100644 index 0000000000000..7723656d58dbc --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/bitbucket.org/ww/goautoneg/README.txt @@ -0,0 +1,67 @@ +PACKAGE + +package goautoneg +import "bitbucket.org/ww/goautoneg" + +HTTP Content-Type Autonegotiation. + +The functions in this package implement the behaviour specified in +http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html + +Copyright (c) 2011, Open Knowledge Foundation Ltd. +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 the Open Knowledge Foundation Ltd. 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 +HOLDER 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. + + +FUNCTIONS + +func Negotiate(header string, alternatives []string) (content_type string) +Negotiate the most appropriate content_type given the accept header +and a list of alternatives. + +func ParseAccept(header string) (accept []Accept) +Parse an Accept Header string returning a sorted list +of clauses + + +TYPES + +type Accept struct { + Type, SubType string + Q float32 + Params map[string]string +} +Structure to represent a clause in an HTTP Accept Header + + +SUBDIRECTORIES + + .hg diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/bitbucket.org/ww/goautoneg/autoneg.go b/staging/src/k8s.io/client-go/1.4/_vendor/bitbucket.org/ww/goautoneg/autoneg.go new file mode 100644 index 0000000000000..648b38cb6546d --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/bitbucket.org/ww/goautoneg/autoneg.go @@ -0,0 +1,162 @@ +/* +HTTP Content-Type Autonegotiation. + +The functions in this package implement the behaviour specified in +http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html + +Copyright (c) 2011, Open Knowledge Foundation Ltd. +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 the Open Knowledge Foundation Ltd. 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 +HOLDER 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. + + +*/ +package goautoneg + +import ( + "sort" + "strconv" + "strings" +) + +// Structure to represent a clause in an HTTP Accept Header +type Accept struct { + Type, SubType string + Q float64 + Params map[string]string +} + +// For internal use, so that we can use the sort interface +type accept_slice []Accept + +func (accept accept_slice) Len() int { + slice := []Accept(accept) + return len(slice) +} + +func (accept accept_slice) Less(i, j int) bool { + slice := []Accept(accept) + ai, aj := slice[i], slice[j] + if ai.Q > aj.Q { + return true + } + if ai.Type != "*" && aj.Type == "*" { + return true + } + if ai.SubType != "*" && aj.SubType == "*" { + return true + } + return false +} + +func (accept accept_slice) Swap(i, j int) { + slice := []Accept(accept) + slice[i], slice[j] = slice[j], slice[i] +} + +// Parse an Accept Header string returning a sorted list +// of clauses +func ParseAccept(header string) (accept []Accept) { + parts := strings.Split(header, ",") + accept = make([]Accept, 0, len(parts)) + for _, part := range parts { + part := strings.Trim(part, " ") + + a := Accept{} + a.Params = make(map[string]string) + a.Q = 1.0 + + mrp := strings.Split(part, ";") + + media_range := mrp[0] + sp := strings.Split(media_range, "/") + a.Type = strings.Trim(sp[0], " ") + + switch { + case len(sp) == 1 && a.Type == "*": + a.SubType = "*" + case len(sp) == 2: + a.SubType = strings.Trim(sp[1], " ") + default: + continue + } + + if len(mrp) == 1 { + accept = append(accept, a) + continue + } + + for _, param := range mrp[1:] { + sp := strings.SplitN(param, "=", 2) + if len(sp) != 2 { + continue + } + token := strings.Trim(sp[0], " ") + if token == "q" { + a.Q, _ = strconv.ParseFloat(sp[1], 32) + } else { + a.Params[token] = strings.Trim(sp[1], " ") + } + } + + accept = append(accept, a) + } + + slice := accept_slice(accept) + sort.Sort(slice) + + return +} + +// Negotiate the most appropriate content_type given the accept header +// and a list of alternatives. +func Negotiate(header string, alternatives []string) (content_type string) { + asp := make([][]string, 0, len(alternatives)) + for _, ctype := range alternatives { + asp = append(asp, strings.SplitN(ctype, "/", 2)) + } + for _, clause := range ParseAccept(header) { + for i, ctsp := range asp { + if clause.Type == ctsp[0] && clause.SubType == ctsp[1] { + content_type = alternatives[i] + return + } + if clause.Type == ctsp[0] && clause.SubType == "*" { + content_type = alternatives[i] + return + } + if clause.Type == "*" && clause.SubType == "*" { + content_type = alternatives[i] + return + } + } + } + return +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/beorn7/perks/LICENSE b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/beorn7/perks/LICENSE new file mode 100644 index 0000000000000..339177be66363 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/beorn7/perks/LICENSE @@ -0,0 +1,20 @@ +Copyright (C) 2013 Blake Mizerany + +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/staging/src/k8s.io/client-go/1.4/_vendor/github.com/beorn7/perks/quantile/exampledata.txt b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/beorn7/perks/quantile/exampledata.txt new file mode 100644 index 0000000000000..1602287d7ce52 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/beorn7/perks/quantile/exampledata.txt @@ -0,0 +1,2388 @@ +8 +5 +26 +12 +5 +235 +13 +6 +28 +30 +3 +3 +3 +3 +5 +2 +33 +7 +2 +4 +7 +12 +14 +5 +8 +3 +10 +4 +5 +3 +6 +6 +209 +20 +3 +10 +14 +3 +4 +6 +8 +5 +11 +7 +3 +2 +3 +3 +212 +5 +222 +4 +10 +10 +5 +6 +3 +8 +3 +10 +254 +220 +2 +3 +5 +24 +5 +4 +222 +7 +3 +3 +223 +8 +15 +12 +14 +14 +3 +2 +2 +3 +13 +3 +11 +4 +4 +6 +5 +7 +13 +5 +3 +5 +2 +5 +3 +5 +2 +7 +15 +17 +14 +3 +6 +6 +3 +17 +5 +4 +7 +6 +4 +4 +8 +6 +8 +3 +9 +3 +6 +3 +4 +5 +3 +3 +660 +4 +6 +10 +3 +6 +3 +2 +5 +13 +2 +4 +4 +10 +4 +8 +4 +3 +7 +9 +9 +3 +10 +37 +3 +13 +4 +12 +3 +6 +10 +8 +5 +21 +2 +3 +8 +3 +2 +3 +3 +4 +12 +2 +4 +8 +8 +4 +3 +2 +20 +1 +6 +32 +2 +11 +6 +18 +3 +8 +11 +3 +212 +3 +4 +2 +6 +7 +12 +11 +3 +2 +16 +10 +6 +4 +6 +3 +2 +7 +3 +2 +2 +2 +2 +5 +6 +4 +3 +10 +3 +4 +6 +5 +3 +4 +4 +5 +6 +4 +3 +4 +4 +5 +7 +5 +5 +3 +2 +7 +2 +4 +12 +4 +5 +6 +2 +4 +4 +8 +4 +15 +13 +7 +16 +5 +3 +23 +5 +5 +7 +3 +2 +9 +8 +7 +5 +8 +11 +4 +10 +76 +4 +47 +4 +3 +2 +7 +4 +2 +3 +37 +10 +4 +2 +20 +5 +4 +4 +10 +10 +4 +3 +7 +23 +240 +7 +13 +5 +5 +3 +3 +2 +5 +4 +2 +8 +7 +19 +2 +23 +8 +7 +2 +5 +3 +8 +3 +8 +13 +5 +5 +5 +2 +3 +23 +4 +9 +8 +4 +3 +3 +5 +220 +2 +3 +4 +6 +14 +3 +53 +6 +2 +5 +18 +6 +3 +219 +6 +5 +2 +5 +3 +6 +5 +15 +4 +3 +17 +3 +2 +4 +7 +2 +3 +3 +4 +4 +3 +2 +664 +6 +3 +23 +5 +5 +16 +5 +8 +2 +4 +2 +24 +12 +3 +2 +3 +5 +8 +3 +5 +4 +3 +14 +3 +5 +8 +2 +3 +7 +9 +4 +2 +3 +6 +8 +4 +3 +4 +6 +5 +3 +3 +6 +3 +19 +4 +4 +6 +3 +6 +3 +5 +22 +5 +4 +4 +3 +8 +11 +4 +9 +7 +6 +13 +4 +4 +4 +6 +17 +9 +3 +3 +3 +4 +3 +221 +5 +11 +3 +4 +2 +12 +6 +3 +5 +7 +5 +7 +4 +9 +7 +14 +37 +19 +217 +16 +3 +5 +2 +2 +7 +19 +7 +6 +7 +4 +24 +5 +11 +4 +7 +7 +9 +13 +3 +4 +3 +6 +28 +4 +4 +5 +5 +2 +5 +6 +4 +4 +6 +10 +5 +4 +3 +2 +3 +3 +6 +5 +5 +4 +3 +2 +3 +7 +4 +6 +18 +16 +8 +16 +4 +5 +8 +6 +9 +13 +1545 +6 +215 +6 +5 +6 +3 +45 +31 +5 +2 +2 +4 +3 +3 +2 +5 +4 +3 +5 +7 +7 +4 +5 +8 +5 +4 +749 +2 +31 +9 +11 +2 +11 +5 +4 +4 +7 +9 +11 +4 +5 +4 +7 +3 +4 +6 +2 +15 +3 +4 +3 +4 +3 +5 +2 +13 +5 +5 +3 +3 +23 +4 +4 +5 +7 +4 +13 +2 +4 +3 +4 +2 +6 +2 +7 +3 +5 +5 +3 +29 +5 +4 +4 +3 +10 +2 +3 +79 +16 +6 +6 +7 +7 +3 +5 +5 +7 +4 +3 +7 +9 +5 +6 +5 +9 +6 +3 +6 +4 +17 +2 +10 +9 +3 +6 +2 +3 +21 +22 +5 +11 +4 +2 +17 +2 +224 +2 +14 +3 +4 +4 +2 +4 +4 +4 +4 +5 +3 +4 +4 +10 +2 +6 +3 +3 +5 +7 +2 +7 +5 +6 +3 +218 +2 +2 +5 +2 +6 +3 +5 +222 +14 +6 +33 +3 +2 +5 +3 +3 +3 +9 +5 +3 +3 +2 +7 +4 +3 +4 +3 +5 +6 +5 +26 +4 +13 +9 +7 +3 +221 +3 +3 +4 +4 +4 +4 +2 +18 +5 +3 +7 +9 +6 +8 +3 +10 +3 +11 +9 +5 +4 +17 +5 +5 +6 +6 +3 +2 +4 +12 +17 +6 +7 +218 +4 +2 +4 +10 +3 +5 +15 +3 +9 +4 +3 +3 +6 +29 +3 +3 +4 +5 +5 +3 +8 +5 +6 +6 +7 +5 +3 +5 +3 +29 +2 +31 +5 +15 +24 +16 +5 +207 +4 +3 +3 +2 +15 +4 +4 +13 +5 +5 +4 +6 +10 +2 +7 +8 +4 +6 +20 +5 +3 +4 +3 +12 +12 +5 +17 +7 +3 +3 +3 +6 +10 +3 +5 +25 +80 +4 +9 +3 +2 +11 +3 +3 +2 +3 +8 +7 +5 +5 +19 +5 +3 +3 +12 +11 +2 +6 +5 +5 +5 +3 +3 +3 +4 +209 +14 +3 +2 +5 +19 +4 +4 +3 +4 +14 +5 +6 +4 +13 +9 +7 +4 +7 +10 +2 +9 +5 +7 +2 +8 +4 +6 +5 +5 +222 +8 +7 +12 +5 +216 +3 +4 +4 +6 +3 +14 +8 +7 +13 +4 +3 +3 +3 +3 +17 +5 +4 +3 +33 +6 +6 +33 +7 +5 +3 +8 +7 +5 +2 +9 +4 +2 +233 +24 +7 +4 +8 +10 +3 +4 +15 +2 +16 +3 +3 +13 +12 +7 +5 +4 +207 +4 +2 +4 +27 +15 +2 +5 +2 +25 +6 +5 +5 +6 +13 +6 +18 +6 +4 +12 +225 +10 +7 +5 +2 +2 +11 +4 +14 +21 +8 +10 +3 +5 +4 +232 +2 +5 +5 +3 +7 +17 +11 +6 +6 +23 +4 +6 +3 +5 +4 +2 +17 +3 +6 +5 +8 +3 +2 +2 +14 +9 +4 +4 +2 +5 +5 +3 +7 +6 +12 +6 +10 +3 +6 +2 +2 +19 +5 +4 +4 +9 +2 +4 +13 +3 +5 +6 +3 +6 +5 +4 +9 +6 +3 +5 +7 +3 +6 +6 +4 +3 +10 +6 +3 +221 +3 +5 +3 +6 +4 +8 +5 +3 +6 +4 +4 +2 +54 +5 +6 +11 +3 +3 +4 +4 +4 +3 +7 +3 +11 +11 +7 +10 +6 +13 +223 +213 +15 +231 +7 +3 +7 +228 +2 +3 +4 +4 +5 +6 +7 +4 +13 +3 +4 +5 +3 +6 +4 +6 +7 +2 +4 +3 +4 +3 +3 +6 +3 +7 +3 +5 +18 +5 +6 +8 +10 +3 +3 +3 +2 +4 +2 +4 +4 +5 +6 +6 +4 +10 +13 +3 +12 +5 +12 +16 +8 +4 +19 +11 +2 +4 +5 +6 +8 +5 +6 +4 +18 +10 +4 +2 +216 +6 +6 +6 +2 +4 +12 +8 +3 +11 +5 +6 +14 +5 +3 +13 +4 +5 +4 +5 +3 +28 +6 +3 +7 +219 +3 +9 +7 +3 +10 +6 +3 +4 +19 +5 +7 +11 +6 +15 +19 +4 +13 +11 +3 +7 +5 +10 +2 +8 +11 +2 +6 +4 +6 +24 +6 +3 +3 +3 +3 +6 +18 +4 +11 +4 +2 +5 +10 +8 +3 +9 +5 +3 +4 +5 +6 +2 +5 +7 +4 +4 +14 +6 +4 +4 +5 +5 +7 +2 +4 +3 +7 +3 +3 +6 +4 +5 +4 +4 +4 +3 +3 +3 +3 +8 +14 +2 +3 +5 +3 +2 +4 +5 +3 +7 +3 +3 +18 +3 +4 +4 +5 +7 +3 +3 +3 +13 +5 +4 +8 +211 +5 +5 +3 +5 +2 +5 +4 +2 +655 +6 +3 +5 +11 +2 +5 +3 +12 +9 +15 +11 +5 +12 +217 +2 +6 +17 +3 +3 +207 +5 +5 +4 +5 +9 +3 +2 +8 +5 +4 +3 +2 +5 +12 +4 +14 +5 +4 +2 +13 +5 +8 +4 +225 +4 +3 +4 +5 +4 +3 +3 +6 +23 +9 +2 +6 +7 +233 +4 +4 +6 +18 +3 +4 +6 +3 +4 +4 +2 +3 +7 +4 +13 +227 +4 +3 +5 +4 +2 +12 +9 +17 +3 +7 +14 +6 +4 +5 +21 +4 +8 +9 +2 +9 +25 +16 +3 +6 +4 +7 +8 +5 +2 +3 +5 +4 +3 +3 +5 +3 +3 +3 +2 +3 +19 +2 +4 +3 +4 +2 +3 +4 +4 +2 +4 +3 +3 +3 +2 +6 +3 +17 +5 +6 +4 +3 +13 +5 +3 +3 +3 +4 +9 +4 +2 +14 +12 +4 +5 +24 +4 +3 +37 +12 +11 +21 +3 +4 +3 +13 +4 +2 +3 +15 +4 +11 +4 +4 +3 +8 +3 +4 +4 +12 +8 +5 +3 +3 +4 +2 +220 +3 +5 +223 +3 +3 +3 +10 +3 +15 +4 +241 +9 +7 +3 +6 +6 +23 +4 +13 +7 +3 +4 +7 +4 +9 +3 +3 +4 +10 +5 +5 +1 +5 +24 +2 +4 +5 +5 +6 +14 +3 +8 +2 +3 +5 +13 +13 +3 +5 +2 +3 +15 +3 +4 +2 +10 +4 +4 +4 +5 +5 +3 +5 +3 +4 +7 +4 +27 +3 +6 +4 +15 +3 +5 +6 +6 +5 +4 +8 +3 +9 +2 +6 +3 +4 +3 +7 +4 +18 +3 +11 +3 +3 +8 +9 +7 +24 +3 +219 +7 +10 +4 +5 +9 +12 +2 +5 +4 +4 +4 +3 +3 +19 +5 +8 +16 +8 +6 +22 +3 +23 +3 +242 +9 +4 +3 +3 +5 +7 +3 +3 +5 +8 +3 +7 +5 +14 +8 +10 +3 +4 +3 +7 +4 +6 +7 +4 +10 +4 +3 +11 +3 +7 +10 +3 +13 +6 +8 +12 +10 +5 +7 +9 +3 +4 +7 +7 +10 +8 +30 +9 +19 +4 +3 +19 +15 +4 +13 +3 +215 +223 +4 +7 +4 +8 +17 +16 +3 +7 +6 +5 +5 +4 +12 +3 +7 +4 +4 +13 +4 +5 +2 +5 +6 +5 +6 +6 +7 +10 +18 +23 +9 +3 +3 +6 +5 +2 +4 +2 +7 +3 +3 +2 +5 +5 +14 +10 +224 +6 +3 +4 +3 +7 +5 +9 +3 +6 +4 +2 +5 +11 +4 +3 +3 +2 +8 +4 +7 +4 +10 +7 +3 +3 +18 +18 +17 +3 +3 +3 +4 +5 +3 +3 +4 +12 +7 +3 +11 +13 +5 +4 +7 +13 +5 +4 +11 +3 +12 +3 +6 +4 +4 +21 +4 +6 +9 +5 +3 +10 +8 +4 +6 +4 +4 +6 +5 +4 +8 +6 +4 +6 +4 +4 +5 +9 +6 +3 +4 +2 +9 +3 +18 +2 +4 +3 +13 +3 +6 +6 +8 +7 +9 +3 +2 +16 +3 +4 +6 +3 +2 +33 +22 +14 +4 +9 +12 +4 +5 +6 +3 +23 +9 +4 +3 +5 +5 +3 +4 +5 +3 +5 +3 +10 +4 +5 +5 +8 +4 +4 +6 +8 +5 +4 +3 +4 +6 +3 +3 +3 +5 +9 +12 +6 +5 +9 +3 +5 +3 +2 +2 +2 +18 +3 +2 +21 +2 +5 +4 +6 +4 +5 +10 +3 +9 +3 +2 +10 +7 +3 +6 +6 +4 +4 +8 +12 +7 +3 +7 +3 +3 +9 +3 +4 +5 +4 +4 +5 +5 +10 +15 +4 +4 +14 +6 +227 +3 +14 +5 +216 +22 +5 +4 +2 +2 +6 +3 +4 +2 +9 +9 +4 +3 +28 +13 +11 +4 +5 +3 +3 +2 +3 +3 +5 +3 +4 +3 +5 +23 +26 +3 +4 +5 +6 +4 +6 +3 +5 +5 +3 +4 +3 +2 +2 +2 +7 +14 +3 +6 +7 +17 +2 +2 +15 +14 +16 +4 +6 +7 +13 +6 +4 +5 +6 +16 +3 +3 +28 +3 +6 +15 +3 +9 +2 +4 +6 +3 +3 +22 +4 +12 +6 +7 +2 +5 +4 +10 +3 +16 +6 +9 +2 +5 +12 +7 +5 +5 +5 +5 +2 +11 +9 +17 +4 +3 +11 +7 +3 +5 +15 +4 +3 +4 +211 +8 +7 +5 +4 +7 +6 +7 +6 +3 +6 +5 +6 +5 +3 +4 +4 +26 +4 +6 +10 +4 +4 +3 +2 +3 +3 +4 +5 +9 +3 +9 +4 +4 +5 +5 +8 +2 +4 +2 +3 +8 +4 +11 +19 +5 +8 +6 +3 +5 +6 +12 +3 +2 +4 +16 +12 +3 +4 +4 +8 +6 +5 +6 +6 +219 +8 +222 +6 +16 +3 +13 +19 +5 +4 +3 +11 +6 +10 +4 +7 +7 +12 +5 +3 +3 +5 +6 +10 +3 +8 +2 +5 +4 +7 +2 +4 +4 +2 +12 +9 +6 +4 +2 +40 +2 +4 +10 +4 +223 +4 +2 +20 +6 +7 +24 +5 +4 +5 +2 +20 +16 +6 +5 +13 +2 +3 +3 +19 +3 +2 +4 +5 +6 +7 +11 +12 +5 +6 +7 +7 +3 +5 +3 +5 +3 +14 +3 +4 +4 +2 +11 +1 +7 +3 +9 +6 +11 +12 +5 +8 +6 +221 +4 +2 +12 +4 +3 +15 +4 +5 +226 +7 +218 +7 +5 +4 +5 +18 +4 +5 +9 +4 +4 +2 +9 +18 +18 +9 +5 +6 +6 +3 +3 +7 +3 +5 +4 +4 +4 +12 +3 +6 +31 +5 +4 +7 +3 +6 +5 +6 +5 +11 +2 +2 +11 +11 +6 +7 +5 +8 +7 +10 +5 +23 +7 +4 +3 +5 +34 +2 +5 +23 +7 +3 +6 +8 +4 +4 +4 +2 +5 +3 +8 +5 +4 +8 +25 +2 +3 +17 +8 +3 +4 +8 +7 +3 +15 +6 +5 +7 +21 +9 +5 +6 +6 +5 +3 +2 +3 +10 +3 +6 +3 +14 +7 +4 +4 +8 +7 +8 +2 +6 +12 +4 +213 +6 +5 +21 +8 +2 +5 +23 +3 +11 +2 +3 +6 +25 +2 +3 +6 +7 +6 +6 +4 +4 +6 +3 +17 +9 +7 +6 +4 +3 +10 +7 +2 +3 +3 +3 +11 +8 +3 +7 +6 +4 +14 +36 +3 +4 +3 +3 +22 +13 +21 +4 +2 +7 +4 +4 +17 +15 +3 +7 +11 +2 +4 +7 +6 +209 +6 +3 +2 +2 +24 +4 +9 +4 +3 +3 +3 +29 +2 +2 +4 +3 +3 +5 +4 +6 +3 +3 +2 +4 diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/beorn7/perks/quantile/stream.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/beorn7/perks/quantile/stream.go new file mode 100644 index 0000000000000..587b1fc5ba862 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/beorn7/perks/quantile/stream.go @@ -0,0 +1,292 @@ +// Package quantile computes approximate quantiles over an unbounded data +// stream within low memory and CPU bounds. +// +// A small amount of accuracy is traded to achieve the above properties. +// +// Multiple streams can be merged before calling Query to generate a single set +// of results. This is meaningful when the streams represent the same type of +// data. See Merge and Samples. +// +// For more detailed information about the algorithm used, see: +// +// Effective Computation of Biased Quantiles over Data Streams +// +// http://www.cs.rutgers.edu/~muthu/bquant.pdf +package quantile + +import ( + "math" + "sort" +) + +// Sample holds an observed value and meta information for compression. JSON +// tags have been added for convenience. +type Sample struct { + Value float64 `json:",string"` + Width float64 `json:",string"` + Delta float64 `json:",string"` +} + +// Samples represents a slice of samples. It implements sort.Interface. +type Samples []Sample + +func (a Samples) Len() int { return len(a) } +func (a Samples) Less(i, j int) bool { return a[i].Value < a[j].Value } +func (a Samples) Swap(i, j int) { a[i], a[j] = a[j], a[i] } + +type invariant func(s *stream, r float64) float64 + +// NewLowBiased returns an initialized Stream for low-biased quantiles +// (e.g. 0.01, 0.1, 0.5) where the needed quantiles are not known a priori, but +// error guarantees can still be given even for the lower ranks of the data +// distribution. +// +// The provided epsilon is a relative error, i.e. the true quantile of a value +// returned by a query is guaranteed to be within (1±Epsilon)*Quantile. +// +// See http://www.cs.rutgers.edu/~muthu/bquant.pdf for time, space, and error +// properties. +func NewLowBiased(epsilon float64) *Stream { + ƒ := func(s *stream, r float64) float64 { + return 2 * epsilon * r + } + return newStream(ƒ) +} + +// NewHighBiased returns an initialized Stream for high-biased quantiles +// (e.g. 0.01, 0.1, 0.5) where the needed quantiles are not known a priori, but +// error guarantees can still be given even for the higher ranks of the data +// distribution. +// +// The provided epsilon is a relative error, i.e. the true quantile of a value +// returned by a query is guaranteed to be within 1-(1±Epsilon)*(1-Quantile). +// +// See http://www.cs.rutgers.edu/~muthu/bquant.pdf for time, space, and error +// properties. +func NewHighBiased(epsilon float64) *Stream { + ƒ := func(s *stream, r float64) float64 { + return 2 * epsilon * (s.n - r) + } + return newStream(ƒ) +} + +// NewTargeted returns an initialized Stream concerned with a particular set of +// quantile values that are supplied a priori. Knowing these a priori reduces +// space and computation time. The targets map maps the desired quantiles to +// their absolute errors, i.e. the true quantile of a value returned by a query +// is guaranteed to be within (Quantile±Epsilon). +// +// See http://www.cs.rutgers.edu/~muthu/bquant.pdf for time, space, and error properties. +func NewTargeted(targets map[float64]float64) *Stream { + ƒ := func(s *stream, r float64) float64 { + var m = math.MaxFloat64 + var f float64 + for quantile, epsilon := range targets { + if quantile*s.n <= r { + f = (2 * epsilon * r) / quantile + } else { + f = (2 * epsilon * (s.n - r)) / (1 - quantile) + } + if f < m { + m = f + } + } + return m + } + return newStream(ƒ) +} + +// Stream computes quantiles for a stream of float64s. It is not thread-safe by +// design. Take care when using across multiple goroutines. +type Stream struct { + *stream + b Samples + sorted bool +} + +func newStream(ƒ invariant) *Stream { + x := &stream{ƒ: ƒ} + return &Stream{x, make(Samples, 0, 500), true} +} + +// Insert inserts v into the stream. +func (s *Stream) Insert(v float64) { + s.insert(Sample{Value: v, Width: 1}) +} + +func (s *Stream) insert(sample Sample) { + s.b = append(s.b, sample) + s.sorted = false + if len(s.b) == cap(s.b) { + s.flush() + } +} + +// Query returns the computed qth percentiles value. If s was created with +// NewTargeted, and q is not in the set of quantiles provided a priori, Query +// will return an unspecified result. +func (s *Stream) Query(q float64) float64 { + if !s.flushed() { + // Fast path when there hasn't been enough data for a flush; + // this also yields better accuracy for small sets of data. + l := len(s.b) + if l == 0 { + return 0 + } + i := int(float64(l) * q) + if i > 0 { + i -= 1 + } + s.maybeSort() + return s.b[i].Value + } + s.flush() + return s.stream.query(q) +} + +// Merge merges samples into the underlying streams samples. This is handy when +// merging multiple streams from separate threads, database shards, etc. +// +// ATTENTION: This method is broken and does not yield correct results. The +// underlying algorithm is not capable of merging streams correctly. +func (s *Stream) Merge(samples Samples) { + sort.Sort(samples) + s.stream.merge(samples) +} + +// Reset reinitializes and clears the list reusing the samples buffer memory. +func (s *Stream) Reset() { + s.stream.reset() + s.b = s.b[:0] +} + +// Samples returns stream samples held by s. +func (s *Stream) Samples() Samples { + if !s.flushed() { + return s.b + } + s.flush() + return s.stream.samples() +} + +// Count returns the total number of samples observed in the stream +// since initialization. +func (s *Stream) Count() int { + return len(s.b) + s.stream.count() +} + +func (s *Stream) flush() { + s.maybeSort() + s.stream.merge(s.b) + s.b = s.b[:0] +} + +func (s *Stream) maybeSort() { + if !s.sorted { + s.sorted = true + sort.Sort(s.b) + } +} + +func (s *Stream) flushed() bool { + return len(s.stream.l) > 0 +} + +type stream struct { + n float64 + l []Sample + ƒ invariant +} + +func (s *stream) reset() { + s.l = s.l[:0] + s.n = 0 +} + +func (s *stream) insert(v float64) { + s.merge(Samples{{v, 1, 0}}) +} + +func (s *stream) merge(samples Samples) { + // TODO(beorn7): This tries to merge not only individual samples, but + // whole summaries. The paper doesn't mention merging summaries at + // all. Unittests show that the merging is inaccurate. Find out how to + // do merges properly. + var r float64 + i := 0 + for _, sample := range samples { + for ; i < len(s.l); i++ { + c := s.l[i] + if c.Value > sample.Value { + // Insert at position i. + s.l = append(s.l, Sample{}) + copy(s.l[i+1:], s.l[i:]) + s.l[i] = Sample{ + sample.Value, + sample.Width, + math.Max(sample.Delta, math.Floor(s.ƒ(s, r))-1), + // TODO(beorn7): How to calculate delta correctly? + } + i++ + goto inserted + } + r += c.Width + } + s.l = append(s.l, Sample{sample.Value, sample.Width, 0}) + i++ + inserted: + s.n += sample.Width + r += sample.Width + } + s.compress() +} + +func (s *stream) count() int { + return int(s.n) +} + +func (s *stream) query(q float64) float64 { + t := math.Ceil(q * s.n) + t += math.Ceil(s.ƒ(s, t) / 2) + p := s.l[0] + var r float64 + for _, c := range s.l[1:] { + r += p.Width + if r+c.Width+c.Delta > t { + return p.Value + } + p = c + } + return p.Value +} + +func (s *stream) compress() { + if len(s.l) < 2 { + return + } + x := s.l[len(s.l)-1] + xi := len(s.l) - 1 + r := s.n - 1 - x.Width + + for i := len(s.l) - 2; i >= 0; i-- { + c := s.l[i] + if c.Width+x.Width+x.Delta <= s.ƒ(s, r) { + x.Width += c.Width + s.l[xi] = x + // Remove element at i. + copy(s.l[i:], s.l[i+1:]) + s.l = s.l[:len(s.l)-1] + xi -= 1 + } else { + x = c + xi = i + } + r -= c.Width + } +} + +func (s *stream) samples() Samples { + samples := make(Samples, len(s.l)) + copy(samples, s.l) + return samples +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/blang/semver/LICENSE b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/blang/semver/LICENSE new file mode 100644 index 0000000000000..5ba5c86fcb025 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/blang/semver/LICENSE @@ -0,0 +1,22 @@ +The MIT License + +Copyright (c) 2014 Benedikt Lang + +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/staging/src/k8s.io/client-go/1.4/_vendor/github.com/blang/semver/json.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/blang/semver/json.go new file mode 100644 index 0000000000000..a74bf7c449400 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/blang/semver/json.go @@ -0,0 +1,23 @@ +package semver + +import ( + "encoding/json" +) + +// MarshalJSON implements the encoding/json.Marshaler interface. +func (v Version) MarshalJSON() ([]byte, error) { + return json.Marshal(v.String()) +} + +// UnmarshalJSON implements the encoding/json.Unmarshaler interface. +func (v *Version) UnmarshalJSON(data []byte) (err error) { + var versionString string + + if err = json.Unmarshal(data, &versionString); err != nil { + return + } + + *v, err = Parse(versionString) + + return +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/blang/semver/semver.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/blang/semver/semver.go new file mode 100644 index 0000000000000..bbf85ce972d15 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/blang/semver/semver.go @@ -0,0 +1,395 @@ +package semver + +import ( + "errors" + "fmt" + "strconv" + "strings" +) + +const ( + numbers string = "0123456789" + alphas = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-" + alphanum = alphas + numbers +) + +// SpecVersion is the latest fully supported spec version of semver +var SpecVersion = Version{ + Major: 2, + Minor: 0, + Patch: 0, +} + +// Version represents a semver compatible version +type Version struct { + Major uint64 + Minor uint64 + Patch uint64 + Pre []PRVersion + Build []string //No Precendence +} + +// Version to string +func (v Version) String() string { + b := make([]byte, 0, 5) + b = strconv.AppendUint(b, v.Major, 10) + b = append(b, '.') + b = strconv.AppendUint(b, v.Minor, 10) + b = append(b, '.') + b = strconv.AppendUint(b, v.Patch, 10) + + if len(v.Pre) > 0 { + b = append(b, '-') + b = append(b, v.Pre[0].String()...) + + for _, pre := range v.Pre[1:] { + b = append(b, '.') + b = append(b, pre.String()...) + } + } + + if len(v.Build) > 0 { + b = append(b, '+') + b = append(b, v.Build[0]...) + + for _, build := range v.Build[1:] { + b = append(b, '.') + b = append(b, build...) + } + } + + return string(b) +} + +// Equals checks if v is equal to o. +func (v Version) Equals(o Version) bool { + return (v.Compare(o) == 0) +} + +// EQ checks if v is equal to o. +func (v Version) EQ(o Version) bool { + return (v.Compare(o) == 0) +} + +// NE checks if v is not equal to o. +func (v Version) NE(o Version) bool { + return (v.Compare(o) != 0) +} + +// GT checks if v is greater than o. +func (v Version) GT(o Version) bool { + return (v.Compare(o) == 1) +} + +// GTE checks if v is greater than or equal to o. +func (v Version) GTE(o Version) bool { + return (v.Compare(o) >= 0) +} + +// GE checks if v is greater than or equal to o. +func (v Version) GE(o Version) bool { + return (v.Compare(o) >= 0) +} + +// LT checks if v is less than o. +func (v Version) LT(o Version) bool { + return (v.Compare(o) == -1) +} + +// LTE checks if v is less than or equal to o. +func (v Version) LTE(o Version) bool { + return (v.Compare(o) <= 0) +} + +// LE checks if v is less than or equal to o. +func (v Version) LE(o Version) bool { + return (v.Compare(o) <= 0) +} + +// Compare compares Versions v to o: +// -1 == v is less than o +// 0 == v is equal to o +// 1 == v is greater than o +func (v Version) Compare(o Version) int { + if v.Major != o.Major { + if v.Major > o.Major { + return 1 + } + return -1 + } + if v.Minor != o.Minor { + if v.Minor > o.Minor { + return 1 + } + return -1 + } + if v.Patch != o.Patch { + if v.Patch > o.Patch { + return 1 + } + return -1 + } + + // Quick comparison if a version has no prerelease versions + if len(v.Pre) == 0 && len(o.Pre) == 0 { + return 0 + } else if len(v.Pre) == 0 && len(o.Pre) > 0 { + return 1 + } else if len(v.Pre) > 0 && len(o.Pre) == 0 { + return -1 + } + + i := 0 + for ; i < len(v.Pre) && i < len(o.Pre); i++ { + if comp := v.Pre[i].Compare(o.Pre[i]); comp == 0 { + continue + } else if comp == 1 { + return 1 + } else { + return -1 + } + } + + // If all pr versions are the equal but one has further prversion, this one greater + if i == len(v.Pre) && i == len(o.Pre) { + return 0 + } else if i == len(v.Pre) && i < len(o.Pre) { + return -1 + } else { + return 1 + } + +} + +// Validate validates v and returns error in case +func (v Version) Validate() error { + // Major, Minor, Patch already validated using uint64 + + for _, pre := range v.Pre { + if !pre.IsNum { //Numeric prerelease versions already uint64 + if len(pre.VersionStr) == 0 { + return fmt.Errorf("Prerelease can not be empty %q", pre.VersionStr) + } + if !containsOnly(pre.VersionStr, alphanum) { + return fmt.Errorf("Invalid character(s) found in prerelease %q", pre.VersionStr) + } + } + } + + for _, build := range v.Build { + if len(build) == 0 { + return fmt.Errorf("Build meta data can not be empty %q", build) + } + if !containsOnly(build, alphanum) { + return fmt.Errorf("Invalid character(s) found in build meta data %q", build) + } + } + + return nil +} + +// New is an alias for Parse and returns a pointer, parses version string and returns a validated Version or error +func New(s string) (vp *Version, err error) { + v, err := Parse(s) + vp = &v + return +} + +// Make is an alias for Parse, parses version string and returns a validated Version or error +func Make(s string) (Version, error) { + return Parse(s) +} + +// Parse parses version string and returns a validated Version or error +func Parse(s string) (Version, error) { + if len(s) == 0 { + return Version{}, errors.New("Version string empty") + } + + // Split into major.minor.(patch+pr+meta) + parts := strings.SplitN(s, ".", 3) + if len(parts) != 3 { + return Version{}, errors.New("No Major.Minor.Patch elements found") + } + + // Major + if !containsOnly(parts[0], numbers) { + return Version{}, fmt.Errorf("Invalid character(s) found in major number %q", parts[0]) + } + if hasLeadingZeroes(parts[0]) { + return Version{}, fmt.Errorf("Major number must not contain leading zeroes %q", parts[0]) + } + major, err := strconv.ParseUint(parts[0], 10, 64) + if err != nil { + return Version{}, err + } + + // Minor + if !containsOnly(parts[1], numbers) { + return Version{}, fmt.Errorf("Invalid character(s) found in minor number %q", parts[1]) + } + if hasLeadingZeroes(parts[1]) { + return Version{}, fmt.Errorf("Minor number must not contain leading zeroes %q", parts[1]) + } + minor, err := strconv.ParseUint(parts[1], 10, 64) + if err != nil { + return Version{}, err + } + + v := Version{} + v.Major = major + v.Minor = minor + + var build, prerelease []string + patchStr := parts[2] + + if buildIndex := strings.IndexRune(patchStr, '+'); buildIndex != -1 { + build = strings.Split(patchStr[buildIndex+1:], ".") + patchStr = patchStr[:buildIndex] + } + + if preIndex := strings.IndexRune(patchStr, '-'); preIndex != -1 { + prerelease = strings.Split(patchStr[preIndex+1:], ".") + patchStr = patchStr[:preIndex] + } + + if !containsOnly(patchStr, numbers) { + return Version{}, fmt.Errorf("Invalid character(s) found in patch number %q", patchStr) + } + if hasLeadingZeroes(patchStr) { + return Version{}, fmt.Errorf("Patch number must not contain leading zeroes %q", patchStr) + } + patch, err := strconv.ParseUint(patchStr, 10, 64) + if err != nil { + return Version{}, err + } + + v.Patch = patch + + // Prerelease + for _, prstr := range prerelease { + parsedPR, err := NewPRVersion(prstr) + if err != nil { + return Version{}, err + } + v.Pre = append(v.Pre, parsedPR) + } + + // Build meta data + for _, str := range build { + if len(str) == 0 { + return Version{}, errors.New("Build meta data is empty") + } + if !containsOnly(str, alphanum) { + return Version{}, fmt.Errorf("Invalid character(s) found in build meta data %q", str) + } + v.Build = append(v.Build, str) + } + + return v, nil +} + +// MustParse is like Parse but panics if the version cannot be parsed. +func MustParse(s string) Version { + v, err := Parse(s) + if err != nil { + panic(`semver: Parse(` + s + `): ` + err.Error()) + } + return v +} + +// PRVersion represents a PreRelease Version +type PRVersion struct { + VersionStr string + VersionNum uint64 + IsNum bool +} + +// NewPRVersion creates a new valid prerelease version +func NewPRVersion(s string) (PRVersion, error) { + if len(s) == 0 { + return PRVersion{}, errors.New("Prerelease is empty") + } + v := PRVersion{} + if containsOnly(s, numbers) { + if hasLeadingZeroes(s) { + return PRVersion{}, fmt.Errorf("Numeric PreRelease version must not contain leading zeroes %q", s) + } + num, err := strconv.ParseUint(s, 10, 64) + + // Might never be hit, but just in case + if err != nil { + return PRVersion{}, err + } + v.VersionNum = num + v.IsNum = true + } else if containsOnly(s, alphanum) { + v.VersionStr = s + v.IsNum = false + } else { + return PRVersion{}, fmt.Errorf("Invalid character(s) found in prerelease %q", s) + } + return v, nil +} + +// IsNumeric checks if prerelease-version is numeric +func (v PRVersion) IsNumeric() bool { + return v.IsNum +} + +// Compare compares two PreRelease Versions v and o: +// -1 == v is less than o +// 0 == v is equal to o +// 1 == v is greater than o +func (v PRVersion) Compare(o PRVersion) int { + if v.IsNum && !o.IsNum { + return -1 + } else if !v.IsNum && o.IsNum { + return 1 + } else if v.IsNum && o.IsNum { + if v.VersionNum == o.VersionNum { + return 0 + } else if v.VersionNum > o.VersionNum { + return 1 + } else { + return -1 + } + } else { // both are Alphas + if v.VersionStr == o.VersionStr { + return 0 + } else if v.VersionStr > o.VersionStr { + return 1 + } else { + return -1 + } + } +} + +// PreRelease version to string +func (v PRVersion) String() string { + if v.IsNum { + return strconv.FormatUint(v.VersionNum, 10) + } + return v.VersionStr +} + +func containsOnly(s string, set string) bool { + return strings.IndexFunc(s, func(r rune) bool { + return !strings.ContainsRune(set, r) + }) == -1 +} + +func hasLeadingZeroes(s string) bool { + return len(s) > 1 && s[0] == '0' +} + +// NewBuildVersion creates a new valid build version +func NewBuildVersion(s string) (string, error) { + if len(s) == 0 { + return "", errors.New("Buildversion is empty") + } + if !containsOnly(s, alphanum) { + return "", fmt.Errorf("Invalid character(s) found in build meta data %q", s) + } + return s, nil +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/blang/semver/sort.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/blang/semver/sort.go new file mode 100644 index 0000000000000..e18f880826ab7 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/blang/semver/sort.go @@ -0,0 +1,28 @@ +package semver + +import ( + "sort" +) + +// Versions represents multiple versions. +type Versions []Version + +// Len returns length of version collection +func (s Versions) Len() int { + return len(s) +} + +// Swap swaps two versions inside the collection by its indices +func (s Versions) Swap(i, j int) { + s[i], s[j] = s[j], s[i] +} + +// Less checks if version at index i is less than version at index j +func (s Versions) Less(i, j int) bool { + return s[i].LT(s[j]) +} + +// Sort sorts a slice of versions +func Sort(versions []Version) { + sort.Sort(Versions(versions)) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/blang/semver/sql.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/blang/semver/sql.go new file mode 100644 index 0000000000000..eb4d802666e0b --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/blang/semver/sql.go @@ -0,0 +1,30 @@ +package semver + +import ( + "database/sql/driver" + "fmt" +) + +// Scan implements the database/sql.Scanner interface. +func (v *Version) Scan(src interface{}) (err error) { + var str string + switch src := src.(type) { + case string: + str = src + case []byte: + str = string(src) + default: + return fmt.Errorf("Version.Scan: cannot convert %T to string.", src) + } + + if t, err := Parse(str); err == nil { + *v = t + } + + return +} + +// Value implements the database/sql/driver.Valuer interface. +func (v Version) Value() (driver.Value, error) { + return v.String(), nil +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/LICENSE b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/LICENSE new file mode 100644 index 0000000000000..2a7cfd2bf6a7e --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2012-2013 Dave Collins + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/spew/bypass.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/spew/bypass.go new file mode 100644 index 0000000000000..565bf5899f27d --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/spew/bypass.go @@ -0,0 +1,151 @@ +// Copyright (c) 2015 Dave Collins +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +// NOTE: Due to the following build constraints, this file will only be compiled +// when the code is not running on Google App Engine and "-tags disableunsafe" +// is not added to the go build command line. +// +build !appengine,!disableunsafe + +package spew + +import ( + "reflect" + "unsafe" +) + +const ( + // UnsafeDisabled is a build-time constant which specifies whether or + // not access to the unsafe package is available. + UnsafeDisabled = false + + // ptrSize is the size of a pointer on the current arch. + ptrSize = unsafe.Sizeof((*byte)(nil)) +) + +var ( + // offsetPtr, offsetScalar, and offsetFlag are the offsets for the + // internal reflect.Value fields. These values are valid before golang + // commit ecccf07e7f9d which changed the format. The are also valid + // after commit 82f48826c6c7 which changed the format again to mirror + // the original format. Code in the init function updates these offsets + // as necessary. + offsetPtr = uintptr(ptrSize) + offsetScalar = uintptr(0) + offsetFlag = uintptr(ptrSize * 2) + + // flagKindWidth and flagKindShift indicate various bits that the + // reflect package uses internally to track kind information. + // + // flagRO indicates whether or not the value field of a reflect.Value is + // read-only. + // + // flagIndir indicates whether the value field of a reflect.Value is + // the actual data or a pointer to the data. + // + // These values are valid before golang commit 90a7c3c86944 which + // changed their positions. Code in the init function updates these + // flags as necessary. + flagKindWidth = uintptr(5) + flagKindShift = uintptr(flagKindWidth - 1) + flagRO = uintptr(1 << 0) + flagIndir = uintptr(1 << 1) +) + +func init() { + // Older versions of reflect.Value stored small integers directly in the + // ptr field (which is named val in the older versions). Versions + // between commits ecccf07e7f9d and 82f48826c6c7 added a new field named + // scalar for this purpose which unfortunately came before the flag + // field, so the offset of the flag field is different for those + // versions. + // + // This code constructs a new reflect.Value from a known small integer + // and checks if the size of the reflect.Value struct indicates it has + // the scalar field. When it does, the offsets are updated accordingly. + vv := reflect.ValueOf(0xf00) + if unsafe.Sizeof(vv) == (ptrSize * 4) { + offsetScalar = ptrSize * 2 + offsetFlag = ptrSize * 3 + } + + // Commit 90a7c3c86944 changed the flag positions such that the low + // order bits are the kind. This code extracts the kind from the flags + // field and ensures it's the correct type. When it's not, the flag + // order has been changed to the newer format, so the flags are updated + // accordingly. + upf := unsafe.Pointer(uintptr(unsafe.Pointer(&vv)) + offsetFlag) + upfv := *(*uintptr)(upf) + flagKindMask := uintptr((1<>flagKindShift != uintptr(reflect.Int) { + flagKindShift = 0 + flagRO = 1 << 5 + flagIndir = 1 << 6 + + // Commit adf9b30e5594 modified the flags to separate the + // flagRO flag into two bits which specifies whether or not the + // field is embedded. This causes flagIndir to move over a bit + // and means that flagRO is the combination of either of the + // original flagRO bit and the new bit. + // + // This code detects the change by extracting what used to be + // the indirect bit to ensure it's set. When it's not, the flag + // order has been changed to the newer format, so the flags are + // updated accordingly. + if upfv&flagIndir == 0 { + flagRO = 3 << 5 + flagIndir = 1 << 7 + } + } +} + +// unsafeReflectValue converts the passed reflect.Value into a one that bypasses +// the typical safety restrictions preventing access to unaddressable and +// unexported data. It works by digging the raw pointer to the underlying +// value out of the protected value and generating a new unprotected (unsafe) +// reflect.Value to it. +// +// This allows us to check for implementations of the Stringer and error +// interfaces to be used for pretty printing ordinarily unaddressable and +// inaccessible values such as unexported struct fields. +func unsafeReflectValue(v reflect.Value) (rv reflect.Value) { + indirects := 1 + vt := v.Type() + upv := unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + offsetPtr) + rvf := *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + offsetFlag)) + if rvf&flagIndir != 0 { + vt = reflect.PtrTo(v.Type()) + indirects++ + } else if offsetScalar != 0 { + // The value is in the scalar field when it's not one of the + // reference types. + switch vt.Kind() { + case reflect.Uintptr: + case reflect.Chan: + case reflect.Func: + case reflect.Map: + case reflect.Ptr: + case reflect.UnsafePointer: + default: + upv = unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + + offsetScalar) + } + } + + pv := reflect.NewAt(vt, upv) + rv = pv + for i := 0; i < indirects; i++ { + rv = rv.Elem() + } + return rv +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/spew/bypasssafe.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/spew/bypasssafe.go new file mode 100644 index 0000000000000..457e41235ed73 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/spew/bypasssafe.go @@ -0,0 +1,37 @@ +// Copyright (c) 2015 Dave Collins +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +// NOTE: Due to the following build constraints, this file will only be compiled +// when either the code is running on Google App Engine or "-tags disableunsafe" +// is added to the go build command line. +// +build appengine disableunsafe + +package spew + +import "reflect" + +const ( + // UnsafeDisabled is a build-time constant which specifies whether or + // not access to the unsafe package is available. + UnsafeDisabled = true +) + +// unsafeReflectValue typically converts the passed reflect.Value into a one +// that bypasses the typical safety restrictions preventing access to +// unaddressable and unexported data. However, doing this relies on access to +// the unsafe package. This is a stub version which simply returns the passed +// reflect.Value when the unsafe package is not available. +func unsafeReflectValue(v reflect.Value) reflect.Value { + return v +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/spew/common.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/spew/common.go new file mode 100644 index 0000000000000..14f02dc15b7dd --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/spew/common.go @@ -0,0 +1,341 @@ +/* + * Copyright (c) 2013 Dave Collins + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +package spew + +import ( + "bytes" + "fmt" + "io" + "reflect" + "sort" + "strconv" +) + +// Some constants in the form of bytes to avoid string overhead. This mirrors +// the technique used in the fmt package. +var ( + panicBytes = []byte("(PANIC=") + plusBytes = []byte("+") + iBytes = []byte("i") + trueBytes = []byte("true") + falseBytes = []byte("false") + interfaceBytes = []byte("(interface {})") + commaNewlineBytes = []byte(",\n") + newlineBytes = []byte("\n") + openBraceBytes = []byte("{") + openBraceNewlineBytes = []byte("{\n") + closeBraceBytes = []byte("}") + asteriskBytes = []byte("*") + colonBytes = []byte(":") + colonSpaceBytes = []byte(": ") + openParenBytes = []byte("(") + closeParenBytes = []byte(")") + spaceBytes = []byte(" ") + pointerChainBytes = []byte("->") + nilAngleBytes = []byte("") + maxNewlineBytes = []byte("\n") + maxShortBytes = []byte("") + circularBytes = []byte("") + circularShortBytes = []byte("") + invalidAngleBytes = []byte("") + openBracketBytes = []byte("[") + closeBracketBytes = []byte("]") + percentBytes = []byte("%") + precisionBytes = []byte(".") + openAngleBytes = []byte("<") + closeAngleBytes = []byte(">") + openMapBytes = []byte("map[") + closeMapBytes = []byte("]") + lenEqualsBytes = []byte("len=") + capEqualsBytes = []byte("cap=") +) + +// hexDigits is used to map a decimal value to a hex digit. +var hexDigits = "0123456789abcdef" + +// catchPanic handles any panics that might occur during the handleMethods +// calls. +func catchPanic(w io.Writer, v reflect.Value) { + if err := recover(); err != nil { + w.Write(panicBytes) + fmt.Fprintf(w, "%v", err) + w.Write(closeParenBytes) + } +} + +// handleMethods attempts to call the Error and String methods on the underlying +// type the passed reflect.Value represents and outputes the result to Writer w. +// +// It handles panics in any called methods by catching and displaying the error +// as the formatted value. +func handleMethods(cs *ConfigState, w io.Writer, v reflect.Value) (handled bool) { + // We need an interface to check if the type implements the error or + // Stringer interface. However, the reflect package won't give us an + // interface on certain things like unexported struct fields in order + // to enforce visibility rules. We use unsafe, when it's available, + // to bypass these restrictions since this package does not mutate the + // values. + if !v.CanInterface() { + if UnsafeDisabled { + return false + } + + v = unsafeReflectValue(v) + } + + // Choose whether or not to do error and Stringer interface lookups against + // the base type or a pointer to the base type depending on settings. + // Technically calling one of these methods with a pointer receiver can + // mutate the value, however, types which choose to satisify an error or + // Stringer interface with a pointer receiver should not be mutating their + // state inside these interface methods. + if !cs.DisablePointerMethods && !UnsafeDisabled && !v.CanAddr() { + v = unsafeReflectValue(v) + } + if v.CanAddr() { + v = v.Addr() + } + + // Is it an error or Stringer? + switch iface := v.Interface().(type) { + case error: + defer catchPanic(w, v) + if cs.ContinueOnMethod { + w.Write(openParenBytes) + w.Write([]byte(iface.Error())) + w.Write(closeParenBytes) + w.Write(spaceBytes) + return false + } + + w.Write([]byte(iface.Error())) + return true + + case fmt.Stringer: + defer catchPanic(w, v) + if cs.ContinueOnMethod { + w.Write(openParenBytes) + w.Write([]byte(iface.String())) + w.Write(closeParenBytes) + w.Write(spaceBytes) + return false + } + w.Write([]byte(iface.String())) + return true + } + return false +} + +// printBool outputs a boolean value as true or false to Writer w. +func printBool(w io.Writer, val bool) { + if val { + w.Write(trueBytes) + } else { + w.Write(falseBytes) + } +} + +// printInt outputs a signed integer value to Writer w. +func printInt(w io.Writer, val int64, base int) { + w.Write([]byte(strconv.FormatInt(val, base))) +} + +// printUint outputs an unsigned integer value to Writer w. +func printUint(w io.Writer, val uint64, base int) { + w.Write([]byte(strconv.FormatUint(val, base))) +} + +// printFloat outputs a floating point value using the specified precision, +// which is expected to be 32 or 64bit, to Writer w. +func printFloat(w io.Writer, val float64, precision int) { + w.Write([]byte(strconv.FormatFloat(val, 'g', -1, precision))) +} + +// printComplex outputs a complex value using the specified float precision +// for the real and imaginary parts to Writer w. +func printComplex(w io.Writer, c complex128, floatPrecision int) { + r := real(c) + w.Write(openParenBytes) + w.Write([]byte(strconv.FormatFloat(r, 'g', -1, floatPrecision))) + i := imag(c) + if i >= 0 { + w.Write(plusBytes) + } + w.Write([]byte(strconv.FormatFloat(i, 'g', -1, floatPrecision))) + w.Write(iBytes) + w.Write(closeParenBytes) +} + +// printHexPtr outputs a uintptr formatted as hexidecimal with a leading '0x' +// prefix to Writer w. +func printHexPtr(w io.Writer, p uintptr) { + // Null pointer. + num := uint64(p) + if num == 0 { + w.Write(nilAngleBytes) + return + } + + // Max uint64 is 16 bytes in hex + 2 bytes for '0x' prefix + buf := make([]byte, 18) + + // It's simpler to construct the hex string right to left. + base := uint64(16) + i := len(buf) - 1 + for num >= base { + buf[i] = hexDigits[num%base] + num /= base + i-- + } + buf[i] = hexDigits[num] + + // Add '0x' prefix. + i-- + buf[i] = 'x' + i-- + buf[i] = '0' + + // Strip unused leading bytes. + buf = buf[i:] + w.Write(buf) +} + +// valuesSorter implements sort.Interface to allow a slice of reflect.Value +// elements to be sorted. +type valuesSorter struct { + values []reflect.Value + strings []string // either nil or same len and values + cs *ConfigState +} + +// newValuesSorter initializes a valuesSorter instance, which holds a set of +// surrogate keys on which the data should be sorted. It uses flags in +// ConfigState to decide if and how to populate those surrogate keys. +func newValuesSorter(values []reflect.Value, cs *ConfigState) sort.Interface { + vs := &valuesSorter{values: values, cs: cs} + if canSortSimply(vs.values[0].Kind()) { + return vs + } + if !cs.DisableMethods { + vs.strings = make([]string, len(values)) + for i := range vs.values { + b := bytes.Buffer{} + if !handleMethods(cs, &b, vs.values[i]) { + vs.strings = nil + break + } + vs.strings[i] = b.String() + } + } + if vs.strings == nil && cs.SpewKeys { + vs.strings = make([]string, len(values)) + for i := range vs.values { + vs.strings[i] = Sprintf("%#v", vs.values[i].Interface()) + } + } + return vs +} + +// canSortSimply tests whether a reflect.Kind is a primitive that can be sorted +// directly, or whether it should be considered for sorting by surrogate keys +// (if the ConfigState allows it). +func canSortSimply(kind reflect.Kind) bool { + // This switch parallels valueSortLess, except for the default case. + switch kind { + case reflect.Bool: + return true + case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: + return true + case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint: + return true + case reflect.Float32, reflect.Float64: + return true + case reflect.String: + return true + case reflect.Uintptr: + return true + case reflect.Array: + return true + } + return false +} + +// Len returns the number of values in the slice. It is part of the +// sort.Interface implementation. +func (s *valuesSorter) Len() int { + return len(s.values) +} + +// Swap swaps the values at the passed indices. It is part of the +// sort.Interface implementation. +func (s *valuesSorter) Swap(i, j int) { + s.values[i], s.values[j] = s.values[j], s.values[i] + if s.strings != nil { + s.strings[i], s.strings[j] = s.strings[j], s.strings[i] + } +} + +// valueSortLess returns whether the first value should sort before the second +// value. It is used by valueSorter.Less as part of the sort.Interface +// implementation. +func valueSortLess(a, b reflect.Value) bool { + switch a.Kind() { + case reflect.Bool: + return !a.Bool() && b.Bool() + case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: + return a.Int() < b.Int() + case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint: + return a.Uint() < b.Uint() + case reflect.Float32, reflect.Float64: + return a.Float() < b.Float() + case reflect.String: + return a.String() < b.String() + case reflect.Uintptr: + return a.Uint() < b.Uint() + case reflect.Array: + // Compare the contents of both arrays. + l := a.Len() + for i := 0; i < l; i++ { + av := a.Index(i) + bv := b.Index(i) + if av.Interface() == bv.Interface() { + continue + } + return valueSortLess(av, bv) + } + } + return a.String() < b.String() +} + +// Less returns whether the value at index i should sort before the +// value at index j. It is part of the sort.Interface implementation. +func (s *valuesSorter) Less(i, j int) bool { + if s.strings == nil { + return valueSortLess(s.values[i], s.values[j]) + } + return s.strings[i] < s.strings[j] +} + +// sortValues is a sort function that handles both native types and any type that +// can be converted to error or Stringer. Other inputs are sorted according to +// their Value.String() value to ensure display stability. +func sortValues(values []reflect.Value, cs *ConfigState) { + if len(values) == 0 { + return + } + sort.Sort(newValuesSorter(values, cs)) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/spew/config.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/spew/config.go new file mode 100644 index 0000000000000..ee1ab07b3fdb1 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/spew/config.go @@ -0,0 +1,297 @@ +/* + * Copyright (c) 2013 Dave Collins + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +package spew + +import ( + "bytes" + "fmt" + "io" + "os" +) + +// ConfigState houses the configuration options used by spew to format and +// display values. There is a global instance, Config, that is used to control +// all top-level Formatter and Dump functionality. Each ConfigState instance +// provides methods equivalent to the top-level functions. +// +// The zero value for ConfigState provides no indentation. You would typically +// want to set it to a space or a tab. +// +// Alternatively, you can use NewDefaultConfig to get a ConfigState instance +// with default settings. See the documentation of NewDefaultConfig for default +// values. +type ConfigState struct { + // Indent specifies the string to use for each indentation level. The + // global config instance that all top-level functions use set this to a + // single space by default. If you would like more indentation, you might + // set this to a tab with "\t" or perhaps two spaces with " ". + Indent string + + // MaxDepth controls the maximum number of levels to descend into nested + // data structures. The default, 0, means there is no limit. + // + // NOTE: Circular data structures are properly detected, so it is not + // necessary to set this value unless you specifically want to limit deeply + // nested data structures. + MaxDepth int + + // DisableMethods specifies whether or not error and Stringer interfaces are + // invoked for types that implement them. + DisableMethods bool + + // DisablePointerMethods specifies whether or not to check for and invoke + // error and Stringer interfaces on types which only accept a pointer + // receiver when the current type is not a pointer. + // + // NOTE: This might be an unsafe action since calling one of these methods + // with a pointer receiver could technically mutate the value, however, + // in practice, types which choose to satisify an error or Stringer + // interface with a pointer receiver should not be mutating their state + // inside these interface methods. As a result, this option relies on + // access to the unsafe package, so it will not have any effect when + // running in environments without access to the unsafe package such as + // Google App Engine or with the "disableunsafe" build tag specified. + DisablePointerMethods bool + + // ContinueOnMethod specifies whether or not recursion should continue once + // a custom error or Stringer interface is invoked. The default, false, + // means it will print the results of invoking the custom error or Stringer + // interface and return immediately instead of continuing to recurse into + // the internals of the data type. + // + // NOTE: This flag does not have any effect if method invocation is disabled + // via the DisableMethods or DisablePointerMethods options. + ContinueOnMethod bool + + // SortKeys specifies map keys should be sorted before being printed. Use + // this to have a more deterministic, diffable output. Note that only + // native types (bool, int, uint, floats, uintptr and string) and types + // that support the error or Stringer interfaces (if methods are + // enabled) are supported, with other types sorted according to the + // reflect.Value.String() output which guarantees display stability. + SortKeys bool + + // SpewKeys specifies that, as a last resort attempt, map keys should + // be spewed to strings and sorted by those strings. This is only + // considered if SortKeys is true. + SpewKeys bool +} + +// Config is the active configuration of the top-level functions. +// The configuration can be changed by modifying the contents of spew.Config. +var Config = ConfigState{Indent: " "} + +// Errorf is a wrapper for fmt.Errorf that treats each argument as if it were +// passed with a Formatter interface returned by c.NewFormatter. It returns +// the formatted string as a value that satisfies error. See NewFormatter +// for formatting details. +// +// This function is shorthand for the following syntax: +// +// fmt.Errorf(format, c.NewFormatter(a), c.NewFormatter(b)) +func (c *ConfigState) Errorf(format string, a ...interface{}) (err error) { + return fmt.Errorf(format, c.convertArgs(a)...) +} + +// Fprint is a wrapper for fmt.Fprint that treats each argument as if it were +// passed with a Formatter interface returned by c.NewFormatter. It returns +// the number of bytes written and any write error encountered. See +// NewFormatter for formatting details. +// +// This function is shorthand for the following syntax: +// +// fmt.Fprint(w, c.NewFormatter(a), c.NewFormatter(b)) +func (c *ConfigState) Fprint(w io.Writer, a ...interface{}) (n int, err error) { + return fmt.Fprint(w, c.convertArgs(a)...) +} + +// Fprintf is a wrapper for fmt.Fprintf that treats each argument as if it were +// passed with a Formatter interface returned by c.NewFormatter. It returns +// the number of bytes written and any write error encountered. See +// NewFormatter for formatting details. +// +// This function is shorthand for the following syntax: +// +// fmt.Fprintf(w, format, c.NewFormatter(a), c.NewFormatter(b)) +func (c *ConfigState) Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) { + return fmt.Fprintf(w, format, c.convertArgs(a)...) +} + +// Fprintln is a wrapper for fmt.Fprintln that treats each argument as if it +// passed with a Formatter interface returned by c.NewFormatter. See +// NewFormatter for formatting details. +// +// This function is shorthand for the following syntax: +// +// fmt.Fprintln(w, c.NewFormatter(a), c.NewFormatter(b)) +func (c *ConfigState) Fprintln(w io.Writer, a ...interface{}) (n int, err error) { + return fmt.Fprintln(w, c.convertArgs(a)...) +} + +// Print is a wrapper for fmt.Print that treats each argument as if it were +// passed with a Formatter interface returned by c.NewFormatter. It returns +// the number of bytes written and any write error encountered. See +// NewFormatter for formatting details. +// +// This function is shorthand for the following syntax: +// +// fmt.Print(c.NewFormatter(a), c.NewFormatter(b)) +func (c *ConfigState) Print(a ...interface{}) (n int, err error) { + return fmt.Print(c.convertArgs(a)...) +} + +// Printf is a wrapper for fmt.Printf that treats each argument as if it were +// passed with a Formatter interface returned by c.NewFormatter. It returns +// the number of bytes written and any write error encountered. See +// NewFormatter for formatting details. +// +// This function is shorthand for the following syntax: +// +// fmt.Printf(format, c.NewFormatter(a), c.NewFormatter(b)) +func (c *ConfigState) Printf(format string, a ...interface{}) (n int, err error) { + return fmt.Printf(format, c.convertArgs(a)...) +} + +// Println is a wrapper for fmt.Println that treats each argument as if it were +// passed with a Formatter interface returned by c.NewFormatter. It returns +// the number of bytes written and any write error encountered. See +// NewFormatter for formatting details. +// +// This function is shorthand for the following syntax: +// +// fmt.Println(c.NewFormatter(a), c.NewFormatter(b)) +func (c *ConfigState) Println(a ...interface{}) (n int, err error) { + return fmt.Println(c.convertArgs(a)...) +} + +// Sprint is a wrapper for fmt.Sprint that treats each argument as if it were +// passed with a Formatter interface returned by c.NewFormatter. It returns +// the resulting string. See NewFormatter for formatting details. +// +// This function is shorthand for the following syntax: +// +// fmt.Sprint(c.NewFormatter(a), c.NewFormatter(b)) +func (c *ConfigState) Sprint(a ...interface{}) string { + return fmt.Sprint(c.convertArgs(a)...) +} + +// Sprintf is a wrapper for fmt.Sprintf that treats each argument as if it were +// passed with a Formatter interface returned by c.NewFormatter. It returns +// the resulting string. See NewFormatter for formatting details. +// +// This function is shorthand for the following syntax: +// +// fmt.Sprintf(format, c.NewFormatter(a), c.NewFormatter(b)) +func (c *ConfigState) Sprintf(format string, a ...interface{}) string { + return fmt.Sprintf(format, c.convertArgs(a)...) +} + +// Sprintln is a wrapper for fmt.Sprintln that treats each argument as if it +// were passed with a Formatter interface returned by c.NewFormatter. It +// returns the resulting string. See NewFormatter for formatting details. +// +// This function is shorthand for the following syntax: +// +// fmt.Sprintln(c.NewFormatter(a), c.NewFormatter(b)) +func (c *ConfigState) Sprintln(a ...interface{}) string { + return fmt.Sprintln(c.convertArgs(a)...) +} + +/* +NewFormatter returns a custom formatter that satisfies the fmt.Formatter +interface. As a result, it integrates cleanly with standard fmt package +printing functions. The formatter is useful for inline printing of smaller data +types similar to the standard %v format specifier. + +The custom formatter only responds to the %v (most compact), %+v (adds pointer +addresses), %#v (adds types), and %#+v (adds types and pointer addresses) verb +combinations. Any other verbs such as %x and %q will be sent to the the +standard fmt package for formatting. In addition, the custom formatter ignores +the width and precision arguments (however they will still work on the format +specifiers not handled by the custom formatter). + +Typically this function shouldn't be called directly. It is much easier to make +use of the custom formatter by calling one of the convenience functions such as +c.Printf, c.Println, or c.Printf. +*/ +func (c *ConfigState) NewFormatter(v interface{}) fmt.Formatter { + return newFormatter(c, v) +} + +// Fdump formats and displays the passed arguments to io.Writer w. It formats +// exactly the same as Dump. +func (c *ConfigState) Fdump(w io.Writer, a ...interface{}) { + fdump(c, w, a...) +} + +/* +Dump displays the passed parameters to standard out with newlines, customizable +indentation, and additional debug information such as complete types and all +pointer addresses used to indirect to the final value. It provides the +following features over the built-in printing facilities provided by the fmt +package: + + * Pointers are dereferenced and followed + * Circular data structures are detected and handled properly + * Custom Stringer/error interfaces are optionally invoked, including + on unexported types + * Custom types which only implement the Stringer/error interfaces via + a pointer receiver are optionally invoked when passing non-pointer + variables + * Byte arrays and slices are dumped like the hexdump -C command which + includes offsets, byte values in hex, and ASCII output + +The configuration options are controlled by modifying the public members +of c. See ConfigState for options documentation. + +See Fdump if you would prefer dumping to an arbitrary io.Writer or Sdump to +get the formatted result as a string. +*/ +func (c *ConfigState) Dump(a ...interface{}) { + fdump(c, os.Stdout, a...) +} + +// Sdump returns a string with the passed arguments formatted exactly the same +// as Dump. +func (c *ConfigState) Sdump(a ...interface{}) string { + var buf bytes.Buffer + fdump(c, &buf, a...) + return buf.String() +} + +// convertArgs accepts a slice of arguments and returns a slice of the same +// length with each argument converted to a spew Formatter interface using +// the ConfigState associated with s. +func (c *ConfigState) convertArgs(args []interface{}) (formatters []interface{}) { + formatters = make([]interface{}, len(args)) + for index, arg := range args { + formatters[index] = newFormatter(c, arg) + } + return formatters +} + +// NewDefaultConfig returns a ConfigState with the following default settings. +// +// Indent: " " +// MaxDepth: 0 +// DisableMethods: false +// DisablePointerMethods: false +// ContinueOnMethod: false +// SortKeys: false +func NewDefaultConfig() *ConfigState { + return &ConfigState{Indent: " "} +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/spew/doc.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/spew/doc.go new file mode 100644 index 0000000000000..5be0c4060908e --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/spew/doc.go @@ -0,0 +1,202 @@ +/* + * Copyright (c) 2013 Dave Collins + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* +Package spew implements a deep pretty printer for Go data structures to aid in +debugging. + +A quick overview of the additional features spew provides over the built-in +printing facilities for Go data types are as follows: + + * Pointers are dereferenced and followed + * Circular data structures are detected and handled properly + * Custom Stringer/error interfaces are optionally invoked, including + on unexported types + * Custom types which only implement the Stringer/error interfaces via + a pointer receiver are optionally invoked when passing non-pointer + variables + * Byte arrays and slices are dumped like the hexdump -C command which + includes offsets, byte values in hex, and ASCII output (only when using + Dump style) + +There are two different approaches spew allows for dumping Go data structures: + + * Dump style which prints with newlines, customizable indentation, + and additional debug information such as types and all pointer addresses + used to indirect to the final value + * A custom Formatter interface that integrates cleanly with the standard fmt + package and replaces %v, %+v, %#v, and %#+v to provide inline printing + similar to the default %v while providing the additional functionality + outlined above and passing unsupported format verbs such as %x and %q + along to fmt + +Quick Start + +This section demonstrates how to quickly get started with spew. See the +sections below for further details on formatting and configuration options. + +To dump a variable with full newlines, indentation, type, and pointer +information use Dump, Fdump, or Sdump: + spew.Dump(myVar1, myVar2, ...) + spew.Fdump(someWriter, myVar1, myVar2, ...) + str := spew.Sdump(myVar1, myVar2, ...) + +Alternatively, if you would prefer to use format strings with a compacted inline +printing style, use the convenience wrappers Printf, Fprintf, etc with +%v (most compact), %+v (adds pointer addresses), %#v (adds types), or +%#+v (adds types and pointer addresses): + spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2) + spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) + spew.Fprintf(someWriter, "myVar1: %v -- myVar2: %+v", myVar1, myVar2) + spew.Fprintf(someWriter, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) + +Configuration Options + +Configuration of spew is handled by fields in the ConfigState type. For +convenience, all of the top-level functions use a global state available +via the spew.Config global. + +It is also possible to create a ConfigState instance that provides methods +equivalent to the top-level functions. This allows concurrent configuration +options. See the ConfigState documentation for more details. + +The following configuration options are available: + * Indent + String to use for each indentation level for Dump functions. + It is a single space by default. A popular alternative is "\t". + + * MaxDepth + Maximum number of levels to descend into nested data structures. + There is no limit by default. + + * DisableMethods + Disables invocation of error and Stringer interface methods. + Method invocation is enabled by default. + + * DisablePointerMethods + Disables invocation of error and Stringer interface methods on types + which only accept pointer receivers from non-pointer variables. + Pointer method invocation is enabled by default. + + * ContinueOnMethod + Enables recursion into types after invoking error and Stringer interface + methods. Recursion after method invocation is disabled by default. + + * SortKeys + Specifies map keys should be sorted before being printed. Use + this to have a more deterministic, diffable output. Note that + only native types (bool, int, uint, floats, uintptr and string) + and types which implement error or Stringer interfaces are + supported with other types sorted according to the + reflect.Value.String() output which guarantees display + stability. Natural map order is used by default. + + * SpewKeys + Specifies that, as a last resort attempt, map keys should be + spewed to strings and sorted by those strings. This is only + considered if SortKeys is true. + +Dump Usage + +Simply call spew.Dump with a list of variables you want to dump: + + spew.Dump(myVar1, myVar2, ...) + +You may also call spew.Fdump if you would prefer to output to an arbitrary +io.Writer. For example, to dump to standard error: + + spew.Fdump(os.Stderr, myVar1, myVar2, ...) + +A third option is to call spew.Sdump to get the formatted output as a string: + + str := spew.Sdump(myVar1, myVar2, ...) + +Sample Dump Output + +See the Dump example for details on the setup of the types and variables being +shown here. + + (main.Foo) { + unexportedField: (*main.Bar)(0xf84002e210)({ + flag: (main.Flag) flagTwo, + data: (uintptr) + }), + ExportedField: (map[interface {}]interface {}) (len=1) { + (string) (len=3) "one": (bool) true + } + } + +Byte (and uint8) arrays and slices are displayed uniquely like the hexdump -C +command as shown. + ([]uint8) (len=32 cap=32) { + 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... | + 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0| + 00000020 31 32 |12| + } + +Custom Formatter + +Spew provides a custom formatter that implements the fmt.Formatter interface +so that it integrates cleanly with standard fmt package printing functions. The +formatter is useful for inline printing of smaller data types similar to the +standard %v format specifier. + +The custom formatter only responds to the %v (most compact), %+v (adds pointer +addresses), %#v (adds types), or %#+v (adds types and pointer addresses) verb +combinations. Any other verbs such as %x and %q will be sent to the the +standard fmt package for formatting. In addition, the custom formatter ignores +the width and precision arguments (however they will still work on the format +specifiers not handled by the custom formatter). + +Custom Formatter Usage + +The simplest way to make use of the spew custom formatter is to call one of the +convenience functions such as spew.Printf, spew.Println, or spew.Printf. The +functions have syntax you are most likely already familiar with: + + spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2) + spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) + spew.Println(myVar, myVar2) + spew.Fprintf(os.Stderr, "myVar1: %v -- myVar2: %+v", myVar1, myVar2) + spew.Fprintf(os.Stderr, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) + +See the Index for the full list convenience functions. + +Sample Formatter Output + +Double pointer to a uint8: + %v: <**>5 + %+v: <**>(0xf8400420d0->0xf8400420c8)5 + %#v: (**uint8)5 + %#+v: (**uint8)(0xf8400420d0->0xf8400420c8)5 + +Pointer to circular struct with a uint8 field and a pointer to itself: + %v: <*>{1 <*>} + %+v: <*>(0xf84003e260){ui8:1 c:<*>(0xf84003e260)} + %#v: (*main.circular){ui8:(uint8)1 c:(*main.circular)} + %#+v: (*main.circular)(0xf84003e260){ui8:(uint8)1 c:(*main.circular)(0xf84003e260)} + +See the Printf example for details on the setup of variables being shown +here. + +Errors + +Since it is possible for custom Stringer/error interfaces to panic, spew +detects them and handles them internally by printing the panic information +inline with the output. Since spew is intended to provide deep pretty printing +capabilities on structures, it intentionally does not return any errors. +*/ +package spew diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/spew/dump.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/spew/dump.go new file mode 100644 index 0000000000000..a0ff95e27e524 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/spew/dump.go @@ -0,0 +1,509 @@ +/* + * Copyright (c) 2013 Dave Collins + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +package spew + +import ( + "bytes" + "encoding/hex" + "fmt" + "io" + "os" + "reflect" + "regexp" + "strconv" + "strings" +) + +var ( + // uint8Type is a reflect.Type representing a uint8. It is used to + // convert cgo types to uint8 slices for hexdumping. + uint8Type = reflect.TypeOf(uint8(0)) + + // cCharRE is a regular expression that matches a cgo char. + // It is used to detect character arrays to hexdump them. + cCharRE = regexp.MustCompile("^.*\\._Ctype_char$") + + // cUnsignedCharRE is a regular expression that matches a cgo unsigned + // char. It is used to detect unsigned character arrays to hexdump + // them. + cUnsignedCharRE = regexp.MustCompile("^.*\\._Ctype_unsignedchar$") + + // cUint8tCharRE is a regular expression that matches a cgo uint8_t. + // It is used to detect uint8_t arrays to hexdump them. + cUint8tCharRE = regexp.MustCompile("^.*\\._Ctype_uint8_t$") +) + +// dumpState contains information about the state of a dump operation. +type dumpState struct { + w io.Writer + depth int + pointers map[uintptr]int + ignoreNextType bool + ignoreNextIndent bool + cs *ConfigState +} + +// indent performs indentation according to the depth level and cs.Indent +// option. +func (d *dumpState) indent() { + if d.ignoreNextIndent { + d.ignoreNextIndent = false + return + } + d.w.Write(bytes.Repeat([]byte(d.cs.Indent), d.depth)) +} + +// unpackValue returns values inside of non-nil interfaces when possible. +// This is useful for data types like structs, arrays, slices, and maps which +// can contain varying types packed inside an interface. +func (d *dumpState) unpackValue(v reflect.Value) reflect.Value { + if v.Kind() == reflect.Interface && !v.IsNil() { + v = v.Elem() + } + return v +} + +// dumpPtr handles formatting of pointers by indirecting them as necessary. +func (d *dumpState) dumpPtr(v reflect.Value) { + // Remove pointers at or below the current depth from map used to detect + // circular refs. + for k, depth := range d.pointers { + if depth >= d.depth { + delete(d.pointers, k) + } + } + + // Keep list of all dereferenced pointers to show later. + pointerChain := make([]uintptr, 0) + + // Figure out how many levels of indirection there are by dereferencing + // pointers and unpacking interfaces down the chain while detecting circular + // references. + nilFound := false + cycleFound := false + indirects := 0 + ve := v + for ve.Kind() == reflect.Ptr { + if ve.IsNil() { + nilFound = true + break + } + indirects++ + addr := ve.Pointer() + pointerChain = append(pointerChain, addr) + if pd, ok := d.pointers[addr]; ok && pd < d.depth { + cycleFound = true + indirects-- + break + } + d.pointers[addr] = d.depth + + ve = ve.Elem() + if ve.Kind() == reflect.Interface { + if ve.IsNil() { + nilFound = true + break + } + ve = ve.Elem() + } + } + + // Display type information. + d.w.Write(openParenBytes) + d.w.Write(bytes.Repeat(asteriskBytes, indirects)) + d.w.Write([]byte(ve.Type().String())) + d.w.Write(closeParenBytes) + + // Display pointer information. + if len(pointerChain) > 0 { + d.w.Write(openParenBytes) + for i, addr := range pointerChain { + if i > 0 { + d.w.Write(pointerChainBytes) + } + printHexPtr(d.w, addr) + } + d.w.Write(closeParenBytes) + } + + // Display dereferenced value. + d.w.Write(openParenBytes) + switch { + case nilFound == true: + d.w.Write(nilAngleBytes) + + case cycleFound == true: + d.w.Write(circularBytes) + + default: + d.ignoreNextType = true + d.dump(ve) + } + d.w.Write(closeParenBytes) +} + +// dumpSlice handles formatting of arrays and slices. Byte (uint8 under +// reflection) arrays and slices are dumped in hexdump -C fashion. +func (d *dumpState) dumpSlice(v reflect.Value) { + // Determine whether this type should be hex dumped or not. Also, + // for types which should be hexdumped, try to use the underlying data + // first, then fall back to trying to convert them to a uint8 slice. + var buf []uint8 + doConvert := false + doHexDump := false + numEntries := v.Len() + if numEntries > 0 { + vt := v.Index(0).Type() + vts := vt.String() + switch { + // C types that need to be converted. + case cCharRE.MatchString(vts): + fallthrough + case cUnsignedCharRE.MatchString(vts): + fallthrough + case cUint8tCharRE.MatchString(vts): + doConvert = true + + // Try to use existing uint8 slices and fall back to converting + // and copying if that fails. + case vt.Kind() == reflect.Uint8: + // We need an addressable interface to convert the type + // to a byte slice. However, the reflect package won't + // give us an interface on certain things like + // unexported struct fields in order to enforce + // visibility rules. We use unsafe, when available, to + // bypass these restrictions since this package does not + // mutate the values. + vs := v + if !vs.CanInterface() || !vs.CanAddr() { + vs = unsafeReflectValue(vs) + } + if !UnsafeDisabled { + vs = vs.Slice(0, numEntries) + + // Use the existing uint8 slice if it can be + // type asserted. + iface := vs.Interface() + if slice, ok := iface.([]uint8); ok { + buf = slice + doHexDump = true + break + } + } + + // The underlying data needs to be converted if it can't + // be type asserted to a uint8 slice. + doConvert = true + } + + // Copy and convert the underlying type if needed. + if doConvert && vt.ConvertibleTo(uint8Type) { + // Convert and copy each element into a uint8 byte + // slice. + buf = make([]uint8, numEntries) + for i := 0; i < numEntries; i++ { + vv := v.Index(i) + buf[i] = uint8(vv.Convert(uint8Type).Uint()) + } + doHexDump = true + } + } + + // Hexdump the entire slice as needed. + if doHexDump { + indent := strings.Repeat(d.cs.Indent, d.depth) + str := indent + hex.Dump(buf) + str = strings.Replace(str, "\n", "\n"+indent, -1) + str = strings.TrimRight(str, d.cs.Indent) + d.w.Write([]byte(str)) + return + } + + // Recursively call dump for each item. + for i := 0; i < numEntries; i++ { + d.dump(d.unpackValue(v.Index(i))) + if i < (numEntries - 1) { + d.w.Write(commaNewlineBytes) + } else { + d.w.Write(newlineBytes) + } + } +} + +// dump is the main workhorse for dumping a value. It uses the passed reflect +// value to figure out what kind of object we are dealing with and formats it +// appropriately. It is a recursive function, however circular data structures +// are detected and handled properly. +func (d *dumpState) dump(v reflect.Value) { + // Handle invalid reflect values immediately. + kind := v.Kind() + if kind == reflect.Invalid { + d.w.Write(invalidAngleBytes) + return + } + + // Handle pointers specially. + if kind == reflect.Ptr { + d.indent() + d.dumpPtr(v) + return + } + + // Print type information unless already handled elsewhere. + if !d.ignoreNextType { + d.indent() + d.w.Write(openParenBytes) + d.w.Write([]byte(v.Type().String())) + d.w.Write(closeParenBytes) + d.w.Write(spaceBytes) + } + d.ignoreNextType = false + + // Display length and capacity if the built-in len and cap functions + // work with the value's kind and the len/cap itself is non-zero. + valueLen, valueCap := 0, 0 + switch v.Kind() { + case reflect.Array, reflect.Slice, reflect.Chan: + valueLen, valueCap = v.Len(), v.Cap() + case reflect.Map, reflect.String: + valueLen = v.Len() + } + if valueLen != 0 || valueCap != 0 { + d.w.Write(openParenBytes) + if valueLen != 0 { + d.w.Write(lenEqualsBytes) + printInt(d.w, int64(valueLen), 10) + } + if valueCap != 0 { + if valueLen != 0 { + d.w.Write(spaceBytes) + } + d.w.Write(capEqualsBytes) + printInt(d.w, int64(valueCap), 10) + } + d.w.Write(closeParenBytes) + d.w.Write(spaceBytes) + } + + // Call Stringer/error interfaces if they exist and the handle methods flag + // is enabled + if !d.cs.DisableMethods { + if (kind != reflect.Invalid) && (kind != reflect.Interface) { + if handled := handleMethods(d.cs, d.w, v); handled { + return + } + } + } + + switch kind { + case reflect.Invalid: + // Do nothing. We should never get here since invalid has already + // been handled above. + + case reflect.Bool: + printBool(d.w, v.Bool()) + + case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: + printInt(d.w, v.Int(), 10) + + case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint: + printUint(d.w, v.Uint(), 10) + + case reflect.Float32: + printFloat(d.w, v.Float(), 32) + + case reflect.Float64: + printFloat(d.w, v.Float(), 64) + + case reflect.Complex64: + printComplex(d.w, v.Complex(), 32) + + case reflect.Complex128: + printComplex(d.w, v.Complex(), 64) + + case reflect.Slice: + if v.IsNil() { + d.w.Write(nilAngleBytes) + break + } + fallthrough + + case reflect.Array: + d.w.Write(openBraceNewlineBytes) + d.depth++ + if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) { + d.indent() + d.w.Write(maxNewlineBytes) + } else { + d.dumpSlice(v) + } + d.depth-- + d.indent() + d.w.Write(closeBraceBytes) + + case reflect.String: + d.w.Write([]byte(strconv.Quote(v.String()))) + + case reflect.Interface: + // The only time we should get here is for nil interfaces due to + // unpackValue calls. + if v.IsNil() { + d.w.Write(nilAngleBytes) + } + + case reflect.Ptr: + // Do nothing. We should never get here since pointers have already + // been handled above. + + case reflect.Map: + // nil maps should be indicated as different than empty maps + if v.IsNil() { + d.w.Write(nilAngleBytes) + break + } + + d.w.Write(openBraceNewlineBytes) + d.depth++ + if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) { + d.indent() + d.w.Write(maxNewlineBytes) + } else { + numEntries := v.Len() + keys := v.MapKeys() + if d.cs.SortKeys { + sortValues(keys, d.cs) + } + for i, key := range keys { + d.dump(d.unpackValue(key)) + d.w.Write(colonSpaceBytes) + d.ignoreNextIndent = true + d.dump(d.unpackValue(v.MapIndex(key))) + if i < (numEntries - 1) { + d.w.Write(commaNewlineBytes) + } else { + d.w.Write(newlineBytes) + } + } + } + d.depth-- + d.indent() + d.w.Write(closeBraceBytes) + + case reflect.Struct: + d.w.Write(openBraceNewlineBytes) + d.depth++ + if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) { + d.indent() + d.w.Write(maxNewlineBytes) + } else { + vt := v.Type() + numFields := v.NumField() + for i := 0; i < numFields; i++ { + d.indent() + vtf := vt.Field(i) + d.w.Write([]byte(vtf.Name)) + d.w.Write(colonSpaceBytes) + d.ignoreNextIndent = true + d.dump(d.unpackValue(v.Field(i))) + if i < (numFields - 1) { + d.w.Write(commaNewlineBytes) + } else { + d.w.Write(newlineBytes) + } + } + } + d.depth-- + d.indent() + d.w.Write(closeBraceBytes) + + case reflect.Uintptr: + printHexPtr(d.w, uintptr(v.Uint())) + + case reflect.UnsafePointer, reflect.Chan, reflect.Func: + printHexPtr(d.w, v.Pointer()) + + // There were not any other types at the time this code was written, but + // fall back to letting the default fmt package handle it in case any new + // types are added. + default: + if v.CanInterface() { + fmt.Fprintf(d.w, "%v", v.Interface()) + } else { + fmt.Fprintf(d.w, "%v", v.String()) + } + } +} + +// fdump is a helper function to consolidate the logic from the various public +// methods which take varying writers and config states. +func fdump(cs *ConfigState, w io.Writer, a ...interface{}) { + for _, arg := range a { + if arg == nil { + w.Write(interfaceBytes) + w.Write(spaceBytes) + w.Write(nilAngleBytes) + w.Write(newlineBytes) + continue + } + + d := dumpState{w: w, cs: cs} + d.pointers = make(map[uintptr]int) + d.dump(reflect.ValueOf(arg)) + d.w.Write(newlineBytes) + } +} + +// Fdump formats and displays the passed arguments to io.Writer w. It formats +// exactly the same as Dump. +func Fdump(w io.Writer, a ...interface{}) { + fdump(&Config, w, a...) +} + +// Sdump returns a string with the passed arguments formatted exactly the same +// as Dump. +func Sdump(a ...interface{}) string { + var buf bytes.Buffer + fdump(&Config, &buf, a...) + return buf.String() +} + +/* +Dump displays the passed parameters to standard out with newlines, customizable +indentation, and additional debug information such as complete types and all +pointer addresses used to indirect to the final value. It provides the +following features over the built-in printing facilities provided by the fmt +package: + + * Pointers are dereferenced and followed + * Circular data structures are detected and handled properly + * Custom Stringer/error interfaces are optionally invoked, including + on unexported types + * Custom types which only implement the Stringer/error interfaces via + a pointer receiver are optionally invoked when passing non-pointer + variables + * Byte arrays and slices are dumped like the hexdump -C command which + includes offsets, byte values in hex, and ASCII output + +The configuration options are controlled by an exported package global, +spew.Config. See ConfigState for options documentation. + +See Fdump if you would prefer dumping to an arbitrary io.Writer or Sdump to +get the formatted result as a string. +*/ +func Dump(a ...interface{}) { + fdump(&Config, os.Stdout, a...) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/spew/format.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/spew/format.go new file mode 100644 index 0000000000000..ecf3b80e24bc0 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/spew/format.go @@ -0,0 +1,419 @@ +/* + * Copyright (c) 2013 Dave Collins + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +package spew + +import ( + "bytes" + "fmt" + "reflect" + "strconv" + "strings" +) + +// supportedFlags is a list of all the character flags supported by fmt package. +const supportedFlags = "0-+# " + +// formatState implements the fmt.Formatter interface and contains information +// about the state of a formatting operation. The NewFormatter function can +// be used to get a new Formatter which can be used directly as arguments +// in standard fmt package printing calls. +type formatState struct { + value interface{} + fs fmt.State + depth int + pointers map[uintptr]int + ignoreNextType bool + cs *ConfigState +} + +// buildDefaultFormat recreates the original format string without precision +// and width information to pass in to fmt.Sprintf in the case of an +// unrecognized type. Unless new types are added to the language, this +// function won't ever be called. +func (f *formatState) buildDefaultFormat() (format string) { + buf := bytes.NewBuffer(percentBytes) + + for _, flag := range supportedFlags { + if f.fs.Flag(int(flag)) { + buf.WriteRune(flag) + } + } + + buf.WriteRune('v') + + format = buf.String() + return format +} + +// constructOrigFormat recreates the original format string including precision +// and width information to pass along to the standard fmt package. This allows +// automatic deferral of all format strings this package doesn't support. +func (f *formatState) constructOrigFormat(verb rune) (format string) { + buf := bytes.NewBuffer(percentBytes) + + for _, flag := range supportedFlags { + if f.fs.Flag(int(flag)) { + buf.WriteRune(flag) + } + } + + if width, ok := f.fs.Width(); ok { + buf.WriteString(strconv.Itoa(width)) + } + + if precision, ok := f.fs.Precision(); ok { + buf.Write(precisionBytes) + buf.WriteString(strconv.Itoa(precision)) + } + + buf.WriteRune(verb) + + format = buf.String() + return format +} + +// unpackValue returns values inside of non-nil interfaces when possible and +// ensures that types for values which have been unpacked from an interface +// are displayed when the show types flag is also set. +// This is useful for data types like structs, arrays, slices, and maps which +// can contain varying types packed inside an interface. +func (f *formatState) unpackValue(v reflect.Value) reflect.Value { + if v.Kind() == reflect.Interface { + f.ignoreNextType = false + if !v.IsNil() { + v = v.Elem() + } + } + return v +} + +// formatPtr handles formatting of pointers by indirecting them as necessary. +func (f *formatState) formatPtr(v reflect.Value) { + // Display nil if top level pointer is nil. + showTypes := f.fs.Flag('#') + if v.IsNil() && (!showTypes || f.ignoreNextType) { + f.fs.Write(nilAngleBytes) + return + } + + // Remove pointers at or below the current depth from map used to detect + // circular refs. + for k, depth := range f.pointers { + if depth >= f.depth { + delete(f.pointers, k) + } + } + + // Keep list of all dereferenced pointers to possibly show later. + pointerChain := make([]uintptr, 0) + + // Figure out how many levels of indirection there are by derferencing + // pointers and unpacking interfaces down the chain while detecting circular + // references. + nilFound := false + cycleFound := false + indirects := 0 + ve := v + for ve.Kind() == reflect.Ptr { + if ve.IsNil() { + nilFound = true + break + } + indirects++ + addr := ve.Pointer() + pointerChain = append(pointerChain, addr) + if pd, ok := f.pointers[addr]; ok && pd < f.depth { + cycleFound = true + indirects-- + break + } + f.pointers[addr] = f.depth + + ve = ve.Elem() + if ve.Kind() == reflect.Interface { + if ve.IsNil() { + nilFound = true + break + } + ve = ve.Elem() + } + } + + // Display type or indirection level depending on flags. + if showTypes && !f.ignoreNextType { + f.fs.Write(openParenBytes) + f.fs.Write(bytes.Repeat(asteriskBytes, indirects)) + f.fs.Write([]byte(ve.Type().String())) + f.fs.Write(closeParenBytes) + } else { + if nilFound || cycleFound { + indirects += strings.Count(ve.Type().String(), "*") + } + f.fs.Write(openAngleBytes) + f.fs.Write([]byte(strings.Repeat("*", indirects))) + f.fs.Write(closeAngleBytes) + } + + // Display pointer information depending on flags. + if f.fs.Flag('+') && (len(pointerChain) > 0) { + f.fs.Write(openParenBytes) + for i, addr := range pointerChain { + if i > 0 { + f.fs.Write(pointerChainBytes) + } + printHexPtr(f.fs, addr) + } + f.fs.Write(closeParenBytes) + } + + // Display dereferenced value. + switch { + case nilFound == true: + f.fs.Write(nilAngleBytes) + + case cycleFound == true: + f.fs.Write(circularShortBytes) + + default: + f.ignoreNextType = true + f.format(ve) + } +} + +// format is the main workhorse for providing the Formatter interface. It +// uses the passed reflect value to figure out what kind of object we are +// dealing with and formats it appropriately. It is a recursive function, +// however circular data structures are detected and handled properly. +func (f *formatState) format(v reflect.Value) { + // Handle invalid reflect values immediately. + kind := v.Kind() + if kind == reflect.Invalid { + f.fs.Write(invalidAngleBytes) + return + } + + // Handle pointers specially. + if kind == reflect.Ptr { + f.formatPtr(v) + return + } + + // Print type information unless already handled elsewhere. + if !f.ignoreNextType && f.fs.Flag('#') { + f.fs.Write(openParenBytes) + f.fs.Write([]byte(v.Type().String())) + f.fs.Write(closeParenBytes) + } + f.ignoreNextType = false + + // Call Stringer/error interfaces if they exist and the handle methods + // flag is enabled. + if !f.cs.DisableMethods { + if (kind != reflect.Invalid) && (kind != reflect.Interface) { + if handled := handleMethods(f.cs, f.fs, v); handled { + return + } + } + } + + switch kind { + case reflect.Invalid: + // Do nothing. We should never get here since invalid has already + // been handled above. + + case reflect.Bool: + printBool(f.fs, v.Bool()) + + case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: + printInt(f.fs, v.Int(), 10) + + case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint: + printUint(f.fs, v.Uint(), 10) + + case reflect.Float32: + printFloat(f.fs, v.Float(), 32) + + case reflect.Float64: + printFloat(f.fs, v.Float(), 64) + + case reflect.Complex64: + printComplex(f.fs, v.Complex(), 32) + + case reflect.Complex128: + printComplex(f.fs, v.Complex(), 64) + + case reflect.Slice: + if v.IsNil() { + f.fs.Write(nilAngleBytes) + break + } + fallthrough + + case reflect.Array: + f.fs.Write(openBracketBytes) + f.depth++ + if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) { + f.fs.Write(maxShortBytes) + } else { + numEntries := v.Len() + for i := 0; i < numEntries; i++ { + if i > 0 { + f.fs.Write(spaceBytes) + } + f.ignoreNextType = true + f.format(f.unpackValue(v.Index(i))) + } + } + f.depth-- + f.fs.Write(closeBracketBytes) + + case reflect.String: + f.fs.Write([]byte(v.String())) + + case reflect.Interface: + // The only time we should get here is for nil interfaces due to + // unpackValue calls. + if v.IsNil() { + f.fs.Write(nilAngleBytes) + } + + case reflect.Ptr: + // Do nothing. We should never get here since pointers have already + // been handled above. + + case reflect.Map: + // nil maps should be indicated as different than empty maps + if v.IsNil() { + f.fs.Write(nilAngleBytes) + break + } + + f.fs.Write(openMapBytes) + f.depth++ + if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) { + f.fs.Write(maxShortBytes) + } else { + keys := v.MapKeys() + if f.cs.SortKeys { + sortValues(keys, f.cs) + } + for i, key := range keys { + if i > 0 { + f.fs.Write(spaceBytes) + } + f.ignoreNextType = true + f.format(f.unpackValue(key)) + f.fs.Write(colonBytes) + f.ignoreNextType = true + f.format(f.unpackValue(v.MapIndex(key))) + } + } + f.depth-- + f.fs.Write(closeMapBytes) + + case reflect.Struct: + numFields := v.NumField() + f.fs.Write(openBraceBytes) + f.depth++ + if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) { + f.fs.Write(maxShortBytes) + } else { + vt := v.Type() + for i := 0; i < numFields; i++ { + if i > 0 { + f.fs.Write(spaceBytes) + } + vtf := vt.Field(i) + if f.fs.Flag('+') || f.fs.Flag('#') { + f.fs.Write([]byte(vtf.Name)) + f.fs.Write(colonBytes) + } + f.format(f.unpackValue(v.Field(i))) + } + } + f.depth-- + f.fs.Write(closeBraceBytes) + + case reflect.Uintptr: + printHexPtr(f.fs, uintptr(v.Uint())) + + case reflect.UnsafePointer, reflect.Chan, reflect.Func: + printHexPtr(f.fs, v.Pointer()) + + // There were not any other types at the time this code was written, but + // fall back to letting the default fmt package handle it if any get added. + default: + format := f.buildDefaultFormat() + if v.CanInterface() { + fmt.Fprintf(f.fs, format, v.Interface()) + } else { + fmt.Fprintf(f.fs, format, v.String()) + } + } +} + +// Format satisfies the fmt.Formatter interface. See NewFormatter for usage +// details. +func (f *formatState) Format(fs fmt.State, verb rune) { + f.fs = fs + + // Use standard formatting for verbs that are not v. + if verb != 'v' { + format := f.constructOrigFormat(verb) + fmt.Fprintf(fs, format, f.value) + return + } + + if f.value == nil { + if fs.Flag('#') { + fs.Write(interfaceBytes) + } + fs.Write(nilAngleBytes) + return + } + + f.format(reflect.ValueOf(f.value)) +} + +// newFormatter is a helper function to consolidate the logic from the various +// public methods which take varying config states. +func newFormatter(cs *ConfigState, v interface{}) fmt.Formatter { + fs := &formatState{value: v, cs: cs} + fs.pointers = make(map[uintptr]int) + return fs +} + +/* +NewFormatter returns a custom formatter that satisfies the fmt.Formatter +interface. As a result, it integrates cleanly with standard fmt package +printing functions. The formatter is useful for inline printing of smaller data +types similar to the standard %v format specifier. + +The custom formatter only responds to the %v (most compact), %+v (adds pointer +addresses), %#v (adds types), or %#+v (adds types and pointer addresses) verb +combinations. Any other verbs such as %x and %q will be sent to the the +standard fmt package for formatting. In addition, the custom formatter ignores +the width and precision arguments (however they will still work on the format +specifiers not handled by the custom formatter). + +Typically this function shouldn't be called directly. It is much easier to make +use of the custom formatter by calling one of the convenience functions such as +Printf, Println, or Fprintf. +*/ +func NewFormatter(v interface{}) fmt.Formatter { + return newFormatter(&Config, v) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/spew/spew.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/spew/spew.go new file mode 100644 index 0000000000000..d8233f542e126 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/davecgh/go-spew/spew/spew.go @@ -0,0 +1,148 @@ +/* + * Copyright (c) 2013 Dave Collins + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +package spew + +import ( + "fmt" + "io" +) + +// Errorf is a wrapper for fmt.Errorf that treats each argument as if it were +// passed with a default Formatter interface returned by NewFormatter. It +// returns the formatted string as a value that satisfies error. See +// NewFormatter for formatting details. +// +// This function is shorthand for the following syntax: +// +// fmt.Errorf(format, spew.NewFormatter(a), spew.NewFormatter(b)) +func Errorf(format string, a ...interface{}) (err error) { + return fmt.Errorf(format, convertArgs(a)...) +} + +// Fprint is a wrapper for fmt.Fprint that treats each argument as if it were +// passed with a default Formatter interface returned by NewFormatter. It +// returns the number of bytes written and any write error encountered. See +// NewFormatter for formatting details. +// +// This function is shorthand for the following syntax: +// +// fmt.Fprint(w, spew.NewFormatter(a), spew.NewFormatter(b)) +func Fprint(w io.Writer, a ...interface{}) (n int, err error) { + return fmt.Fprint(w, convertArgs(a)...) +} + +// Fprintf is a wrapper for fmt.Fprintf that treats each argument as if it were +// passed with a default Formatter interface returned by NewFormatter. It +// returns the number of bytes written and any write error encountered. See +// NewFormatter for formatting details. +// +// This function is shorthand for the following syntax: +// +// fmt.Fprintf(w, format, spew.NewFormatter(a), spew.NewFormatter(b)) +func Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) { + return fmt.Fprintf(w, format, convertArgs(a)...) +} + +// Fprintln is a wrapper for fmt.Fprintln that treats each argument as if it +// passed with a default Formatter interface returned by NewFormatter. See +// NewFormatter for formatting details. +// +// This function is shorthand for the following syntax: +// +// fmt.Fprintln(w, spew.NewFormatter(a), spew.NewFormatter(b)) +func Fprintln(w io.Writer, a ...interface{}) (n int, err error) { + return fmt.Fprintln(w, convertArgs(a)...) +} + +// Print is a wrapper for fmt.Print that treats each argument as if it were +// passed with a default Formatter interface returned by NewFormatter. It +// returns the number of bytes written and any write error encountered. See +// NewFormatter for formatting details. +// +// This function is shorthand for the following syntax: +// +// fmt.Print(spew.NewFormatter(a), spew.NewFormatter(b)) +func Print(a ...interface{}) (n int, err error) { + return fmt.Print(convertArgs(a)...) +} + +// Printf is a wrapper for fmt.Printf that treats each argument as if it were +// passed with a default Formatter interface returned by NewFormatter. It +// returns the number of bytes written and any write error encountered. See +// NewFormatter for formatting details. +// +// This function is shorthand for the following syntax: +// +// fmt.Printf(format, spew.NewFormatter(a), spew.NewFormatter(b)) +func Printf(format string, a ...interface{}) (n int, err error) { + return fmt.Printf(format, convertArgs(a)...) +} + +// Println is a wrapper for fmt.Println that treats each argument as if it were +// passed with a default Formatter interface returned by NewFormatter. It +// returns the number of bytes written and any write error encountered. See +// NewFormatter for formatting details. +// +// This function is shorthand for the following syntax: +// +// fmt.Println(spew.NewFormatter(a), spew.NewFormatter(b)) +func Println(a ...interface{}) (n int, err error) { + return fmt.Println(convertArgs(a)...) +} + +// Sprint is a wrapper for fmt.Sprint that treats each argument as if it were +// passed with a default Formatter interface returned by NewFormatter. It +// returns the resulting string. See NewFormatter for formatting details. +// +// This function is shorthand for the following syntax: +// +// fmt.Sprint(spew.NewFormatter(a), spew.NewFormatter(b)) +func Sprint(a ...interface{}) string { + return fmt.Sprint(convertArgs(a)...) +} + +// Sprintf is a wrapper for fmt.Sprintf that treats each argument as if it were +// passed with a default Formatter interface returned by NewFormatter. It +// returns the resulting string. See NewFormatter for formatting details. +// +// This function is shorthand for the following syntax: +// +// fmt.Sprintf(format, spew.NewFormatter(a), spew.NewFormatter(b)) +func Sprintf(format string, a ...interface{}) string { + return fmt.Sprintf(format, convertArgs(a)...) +} + +// Sprintln is a wrapper for fmt.Sprintln that treats each argument as if it +// were passed with a default Formatter interface returned by NewFormatter. It +// returns the resulting string. See NewFormatter for formatting details. +// +// This function is shorthand for the following syntax: +// +// fmt.Sprintln(spew.NewFormatter(a), spew.NewFormatter(b)) +func Sprintln(a ...interface{}) string { + return fmt.Sprintln(convertArgs(a)...) +} + +// convertArgs accepts a slice of arguments and returns a slice of the same +// length with each argument converted to a default spew Formatter interface. +func convertArgs(args []interface{}) (formatters []interface{}) { + formatters = make([]interface{}, len(args)) + for index, arg := range args { + formatters[index] = NewFormatter(arg) + } + return formatters +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/docker/distribution/LICENSE b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/docker/distribution/LICENSE new file mode 100644 index 0000000000000..e06d2081865a7 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/docker/distribution/LICENSE @@ -0,0 +1,202 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/docker/distribution/digest/digest.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/docker/distribution/digest/digest.go new file mode 100644 index 0000000000000..31d821bba72da --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/docker/distribution/digest/digest.go @@ -0,0 +1,139 @@ +package digest + +import ( + "fmt" + "hash" + "io" + "regexp" + "strings" +) + +const ( + // DigestSha256EmptyTar is the canonical sha256 digest of empty data + DigestSha256EmptyTar = "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" +) + +// Digest allows simple protection of hex formatted digest strings, prefixed +// by their algorithm. Strings of type Digest have some guarantee of being in +// the correct format and it provides quick access to the components of a +// digest string. +// +// The following is an example of the contents of Digest types: +// +// sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc +// +// This allows to abstract the digest behind this type and work only in those +// terms. +type Digest string + +// NewDigest returns a Digest from alg and a hash.Hash object. +func NewDigest(alg Algorithm, h hash.Hash) Digest { + return NewDigestFromBytes(alg, h.Sum(nil)) +} + +// NewDigestFromBytes returns a new digest from the byte contents of p. +// Typically, this can come from hash.Hash.Sum(...) or xxx.SumXXX(...) +// functions. This is also useful for rebuilding digests from binary +// serializations. +func NewDigestFromBytes(alg Algorithm, p []byte) Digest { + return Digest(fmt.Sprintf("%s:%x", alg, p)) +} + +// NewDigestFromHex returns a Digest from alg and a the hex encoded digest. +func NewDigestFromHex(alg, hex string) Digest { + return Digest(fmt.Sprintf("%s:%s", alg, hex)) +} + +// DigestRegexp matches valid digest types. +var DigestRegexp = regexp.MustCompile(`[a-zA-Z0-9-_+.]+:[a-fA-F0-9]+`) + +// DigestRegexpAnchored matches valid digest types, anchored to the start and end of the match. +var DigestRegexpAnchored = regexp.MustCompile(`^` + DigestRegexp.String() + `$`) + +var ( + // ErrDigestInvalidFormat returned when digest format invalid. + ErrDigestInvalidFormat = fmt.Errorf("invalid checksum digest format") + + // ErrDigestInvalidLength returned when digest has invalid length. + ErrDigestInvalidLength = fmt.Errorf("invalid checksum digest length") + + // ErrDigestUnsupported returned when the digest algorithm is unsupported. + ErrDigestUnsupported = fmt.Errorf("unsupported digest algorithm") +) + +// ParseDigest parses s and returns the validated digest object. An error will +// be returned if the format is invalid. +func ParseDigest(s string) (Digest, error) { + d := Digest(s) + + return d, d.Validate() +} + +// FromReader returns the most valid digest for the underlying content using +// the canonical digest algorithm. +func FromReader(rd io.Reader) (Digest, error) { + return Canonical.FromReader(rd) +} + +// FromBytes digests the input and returns a Digest. +func FromBytes(p []byte) Digest { + return Canonical.FromBytes(p) +} + +// Validate checks that the contents of d is a valid digest, returning an +// error if not. +func (d Digest) Validate() error { + s := string(d) + + if !DigestRegexpAnchored.MatchString(s) { + return ErrDigestInvalidFormat + } + + i := strings.Index(s, ":") + if i < 0 { + return ErrDigestInvalidFormat + } + + // case: "sha256:" with no hex. + if i+1 == len(s) { + return ErrDigestInvalidFormat + } + + switch algorithm := Algorithm(s[:i]); algorithm { + case SHA256, SHA384, SHA512: + if algorithm.Size()*2 != len(s[i+1:]) { + return ErrDigestInvalidLength + } + break + default: + return ErrDigestUnsupported + } + + return nil +} + +// Algorithm returns the algorithm portion of the digest. This will panic if +// the underlying digest is not in a valid format. +func (d Digest) Algorithm() Algorithm { + return Algorithm(d[:d.sepIndex()]) +} + +// Hex returns the hex digest portion of the digest. This will panic if the +// underlying digest is not in a valid format. +func (d Digest) Hex() string { + return string(d[d.sepIndex()+1:]) +} + +func (d Digest) String() string { + return string(d) +} + +func (d Digest) sepIndex() int { + i := strings.Index(string(d), ":") + + if i < 0 { + panic("could not find ':' in digest: " + d) + } + + return i +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/docker/distribution/digest/digester.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/docker/distribution/digest/digester.go new file mode 100644 index 0000000000000..f3105a45b6977 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/docker/distribution/digest/digester.go @@ -0,0 +1,155 @@ +package digest + +import ( + "crypto" + "fmt" + "hash" + "io" +) + +// Algorithm identifies and implementation of a digester by an identifier. +// Note the that this defines both the hash algorithm used and the string +// encoding. +type Algorithm string + +// supported digest types +const ( + SHA256 Algorithm = "sha256" // sha256 with hex encoding + SHA384 Algorithm = "sha384" // sha384 with hex encoding + SHA512 Algorithm = "sha512" // sha512 with hex encoding + + // Canonical is the primary digest algorithm used with the distribution + // project. Other digests may be used but this one is the primary storage + // digest. + Canonical = SHA256 +) + +var ( + // TODO(stevvooe): Follow the pattern of the standard crypto package for + // registration of digests. Effectively, we are a registerable set and + // common symbol access. + + // algorithms maps values to hash.Hash implementations. Other algorithms + // may be available but they cannot be calculated by the digest package. + algorithms = map[Algorithm]crypto.Hash{ + SHA256: crypto.SHA256, + SHA384: crypto.SHA384, + SHA512: crypto.SHA512, + } +) + +// Available returns true if the digest type is available for use. If this +// returns false, New and Hash will return nil. +func (a Algorithm) Available() bool { + h, ok := algorithms[a] + if !ok { + return false + } + + // check availability of the hash, as well + return h.Available() +} + +func (a Algorithm) String() string { + return string(a) +} + +// Size returns number of bytes returned by the hash. +func (a Algorithm) Size() int { + h, ok := algorithms[a] + if !ok { + return 0 + } + return h.Size() +} + +// Set implemented to allow use of Algorithm as a command line flag. +func (a *Algorithm) Set(value string) error { + if value == "" { + *a = Canonical + } else { + // just do a type conversion, support is queried with Available. + *a = Algorithm(value) + } + + return nil +} + +// New returns a new digester for the specified algorithm. If the algorithm +// does not have a digester implementation, nil will be returned. This can be +// checked by calling Available before calling New. +func (a Algorithm) New() Digester { + return &digester{ + alg: a, + hash: a.Hash(), + } +} + +// Hash returns a new hash as used by the algorithm. If not available, the +// method will panic. Check Algorithm.Available() before calling. +func (a Algorithm) Hash() hash.Hash { + if !a.Available() { + // NOTE(stevvooe): A missing hash is usually a programming error that + // must be resolved at compile time. We don't import in the digest + // package to allow users to choose their hash implementation (such as + // when using stevvooe/resumable or a hardware accelerated package). + // + // Applications that may want to resolve the hash at runtime should + // call Algorithm.Available before call Algorithm.Hash(). + panic(fmt.Sprintf("%v not available (make sure it is imported)", a)) + } + + return algorithms[a].New() +} + +// FromReader returns the digest of the reader using the algorithm. +func (a Algorithm) FromReader(rd io.Reader) (Digest, error) { + digester := a.New() + + if _, err := io.Copy(digester.Hash(), rd); err != nil { + return "", err + } + + return digester.Digest(), nil +} + +// FromBytes digests the input and returns a Digest. +func (a Algorithm) FromBytes(p []byte) Digest { + digester := a.New() + + if _, err := digester.Hash().Write(p); err != nil { + // Writes to a Hash should never fail. None of the existing + // hash implementations in the stdlib or hashes vendored + // here can return errors from Write. Having a panic in this + // condition instead of having FromBytes return an error value + // avoids unnecessary error handling paths in all callers. + panic("write to hash function returned error: " + err.Error()) + } + + return digester.Digest() +} + +// TODO(stevvooe): Allow resolution of verifiers using the digest type and +// this registration system. + +// Digester calculates the digest of written data. Writes should go directly +// to the return value of Hash, while calling Digest will return the current +// value of the digest. +type Digester interface { + Hash() hash.Hash // provides direct access to underlying hash instance. + Digest() Digest +} + +// digester provides a simple digester definition that embeds a hasher. +type digester struct { + alg Algorithm + hash hash.Hash +} + +func (d *digester) Hash() hash.Hash { + return d.hash +} + +func (d *digester) Digest() Digest { + return NewDigest(d.alg, d.hash) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/docker/distribution/digest/doc.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/docker/distribution/digest/doc.go new file mode 100644 index 0000000000000..f64b0db32b4cf --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/docker/distribution/digest/doc.go @@ -0,0 +1,42 @@ +// Package digest provides a generalized type to opaquely represent message +// digests and their operations within the registry. The Digest type is +// designed to serve as a flexible identifier in a content-addressable system. +// More importantly, it provides tools and wrappers to work with +// hash.Hash-based digests with little effort. +// +// Basics +// +// The format of a digest is simply a string with two parts, dubbed the +// "algorithm" and the "digest", separated by a colon: +// +// : +// +// An example of a sha256 digest representation follows: +// +// sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc +// +// In this case, the string "sha256" is the algorithm and the hex bytes are +// the "digest". +// +// Because the Digest type is simply a string, once a valid Digest is +// obtained, comparisons are cheap, quick and simple to express with the +// standard equality operator. +// +// Verification +// +// The main benefit of using the Digest type is simple verification against a +// given digest. The Verifier interface, modeled after the stdlib hash.Hash +// interface, provides a common write sink for digest verification. After +// writing is complete, calling the Verifier.Verified method will indicate +// whether or not the stream of bytes matches the target digest. +// +// Missing Features +// +// In addition to the above, we intend to add the following features to this +// package: +// +// 1. A Digester type that supports write sink digest calculation. +// +// 2. Suspend and resume of ongoing digest calculations to support efficient digest verification in the registry. +// +package digest diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/docker/distribution/digest/set.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/docker/distribution/digest/set.go new file mode 100644 index 0000000000000..4b9313c1aeacf --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/docker/distribution/digest/set.go @@ -0,0 +1,245 @@ +package digest + +import ( + "errors" + "sort" + "strings" + "sync" +) + +var ( + // ErrDigestNotFound is used when a matching digest + // could not be found in a set. + ErrDigestNotFound = errors.New("digest not found") + + // ErrDigestAmbiguous is used when multiple digests + // are found in a set. None of the matching digests + // should be considered valid matches. + ErrDigestAmbiguous = errors.New("ambiguous digest string") +) + +// Set is used to hold a unique set of digests which +// may be easily referenced by easily referenced by a string +// representation of the digest as well as short representation. +// The uniqueness of the short representation is based on other +// digests in the set. If digests are omitted from this set, +// collisions in a larger set may not be detected, therefore it +// is important to always do short representation lookups on +// the complete set of digests. To mitigate collisions, an +// appropriately long short code should be used. +type Set struct { + mutex sync.RWMutex + entries digestEntries +} + +// NewSet creates an empty set of digests +// which may have digests added. +func NewSet() *Set { + return &Set{ + entries: digestEntries{}, + } +} + +// checkShortMatch checks whether two digests match as either whole +// values or short values. This function does not test equality, +// rather whether the second value could match against the first +// value. +func checkShortMatch(alg Algorithm, hex, shortAlg, shortHex string) bool { + if len(hex) == len(shortHex) { + if hex != shortHex { + return false + } + if len(shortAlg) > 0 && string(alg) != shortAlg { + return false + } + } else if !strings.HasPrefix(hex, shortHex) { + return false + } else if len(shortAlg) > 0 && string(alg) != shortAlg { + return false + } + return true +} + +// Lookup looks for a digest matching the given string representation. +// If no digests could be found ErrDigestNotFound will be returned +// with an empty digest value. If multiple matches are found +// ErrDigestAmbiguous will be returned with an empty digest value. +func (dst *Set) Lookup(d string) (Digest, error) { + dst.mutex.RLock() + defer dst.mutex.RUnlock() + if len(dst.entries) == 0 { + return "", ErrDigestNotFound + } + var ( + searchFunc func(int) bool + alg Algorithm + hex string + ) + dgst, err := ParseDigest(d) + if err == ErrDigestInvalidFormat { + hex = d + searchFunc = func(i int) bool { + return dst.entries[i].val >= d + } + } else { + hex = dgst.Hex() + alg = dgst.Algorithm() + searchFunc = func(i int) bool { + if dst.entries[i].val == hex { + return dst.entries[i].alg >= alg + } + return dst.entries[i].val >= hex + } + } + idx := sort.Search(len(dst.entries), searchFunc) + if idx == len(dst.entries) || !checkShortMatch(dst.entries[idx].alg, dst.entries[idx].val, string(alg), hex) { + return "", ErrDigestNotFound + } + if dst.entries[idx].alg == alg && dst.entries[idx].val == hex { + return dst.entries[idx].digest, nil + } + if idx+1 < len(dst.entries) && checkShortMatch(dst.entries[idx+1].alg, dst.entries[idx+1].val, string(alg), hex) { + return "", ErrDigestAmbiguous + } + + return dst.entries[idx].digest, nil +} + +// Add adds the given digest to the set. An error will be returned +// if the given digest is invalid. If the digest already exists in the +// set, this operation will be a no-op. +func (dst *Set) Add(d Digest) error { + if err := d.Validate(); err != nil { + return err + } + dst.mutex.Lock() + defer dst.mutex.Unlock() + entry := &digestEntry{alg: d.Algorithm(), val: d.Hex(), digest: d} + searchFunc := func(i int) bool { + if dst.entries[i].val == entry.val { + return dst.entries[i].alg >= entry.alg + } + return dst.entries[i].val >= entry.val + } + idx := sort.Search(len(dst.entries), searchFunc) + if idx == len(dst.entries) { + dst.entries = append(dst.entries, entry) + return nil + } else if dst.entries[idx].digest == d { + return nil + } + + entries := append(dst.entries, nil) + copy(entries[idx+1:], entries[idx:len(entries)-1]) + entries[idx] = entry + dst.entries = entries + return nil +} + +// Remove removes the given digest from the set. An err will be +// returned if the given digest is invalid. If the digest does +// not exist in the set, this operation will be a no-op. +func (dst *Set) Remove(d Digest) error { + if err := d.Validate(); err != nil { + return err + } + dst.mutex.Lock() + defer dst.mutex.Unlock() + entry := &digestEntry{alg: d.Algorithm(), val: d.Hex(), digest: d} + searchFunc := func(i int) bool { + if dst.entries[i].val == entry.val { + return dst.entries[i].alg >= entry.alg + } + return dst.entries[i].val >= entry.val + } + idx := sort.Search(len(dst.entries), searchFunc) + // Not found if idx is after or value at idx is not digest + if idx == len(dst.entries) || dst.entries[idx].digest != d { + return nil + } + + entries := dst.entries + copy(entries[idx:], entries[idx+1:]) + entries = entries[:len(entries)-1] + dst.entries = entries + + return nil +} + +// All returns all the digests in the set +func (dst *Set) All() []Digest { + dst.mutex.RLock() + defer dst.mutex.RUnlock() + retValues := make([]Digest, len(dst.entries)) + for i := range dst.entries { + retValues[i] = dst.entries[i].digest + } + + return retValues +} + +// ShortCodeTable returns a map of Digest to unique short codes. The +// length represents the minimum value, the maximum length may be the +// entire value of digest if uniqueness cannot be achieved without the +// full value. This function will attempt to make short codes as short +// as possible to be unique. +func ShortCodeTable(dst *Set, length int) map[Digest]string { + dst.mutex.RLock() + defer dst.mutex.RUnlock() + m := make(map[Digest]string, len(dst.entries)) + l := length + resetIdx := 0 + for i := 0; i < len(dst.entries); i++ { + var short string + extended := true + for extended { + extended = false + if len(dst.entries[i].val) <= l { + short = dst.entries[i].digest.String() + } else { + short = dst.entries[i].val[:l] + for j := i + 1; j < len(dst.entries); j++ { + if checkShortMatch(dst.entries[j].alg, dst.entries[j].val, "", short) { + if j > resetIdx { + resetIdx = j + } + extended = true + } else { + break + } + } + if extended { + l++ + } + } + } + m[dst.entries[i].digest] = short + if i >= resetIdx { + l = length + } + } + return m +} + +type digestEntry struct { + alg Algorithm + val string + digest Digest +} + +type digestEntries []*digestEntry + +func (d digestEntries) Len() int { + return len(d) +} + +func (d digestEntries) Less(i, j int) bool { + if d[i].val != d[j].val { + return d[i].val < d[j].val + } + return d[i].alg < d[j].alg +} + +func (d digestEntries) Swap(i, j int) { + d[i], d[j] = d[j], d[i] +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/docker/distribution/digest/verifiers.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/docker/distribution/digest/verifiers.go new file mode 100644 index 0000000000000..9af3be1341eca --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/docker/distribution/digest/verifiers.go @@ -0,0 +1,44 @@ +package digest + +import ( + "hash" + "io" +) + +// Verifier presents a general verification interface to be used with message +// digests and other byte stream verifications. Users instantiate a Verifier +// from one of the various methods, write the data under test to it then check +// the result with the Verified method. +type Verifier interface { + io.Writer + + // Verified will return true if the content written to Verifier matches + // the digest. + Verified() bool +} + +// NewDigestVerifier returns a verifier that compares the written bytes +// against a passed in digest. +func NewDigestVerifier(d Digest) (Verifier, error) { + if err := d.Validate(); err != nil { + return nil, err + } + + return hashVerifier{ + hash: d.Algorithm().Hash(), + digest: d, + }, nil +} + +type hashVerifier struct { + digest Digest + hash hash.Hash +} + +func (hv hashVerifier) Write(p []byte) (n int, err error) { + return hv.hash.Write(p) +} + +func (hv hashVerifier) Verified() bool { + return hv.digest == NewDigest(hv.digest.Algorithm(), hv.hash) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/docker/distribution/reference/reference.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/docker/distribution/reference/reference.go new file mode 100644 index 0000000000000..bb09fa25dae2c --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/docker/distribution/reference/reference.go @@ -0,0 +1,334 @@ +// Package reference provides a general type to represent any way of referencing images within the registry. +// Its main purpose is to abstract tags and digests (content-addressable hash). +// +// Grammar +// +// reference := name [ ":" tag ] [ "@" digest ] +// name := [hostname '/'] component ['/' component]* +// hostname := hostcomponent ['.' hostcomponent]* [':' port-number] +// hostcomponent := /([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])/ +// port-number := /[0-9]+/ +// component := alpha-numeric [separator alpha-numeric]* +// alpha-numeric := /[a-z0-9]+/ +// separator := /[_.]|__|[-]*/ +// +// tag := /[\w][\w.-]{0,127}/ +// +// digest := digest-algorithm ":" digest-hex +// digest-algorithm := digest-algorithm-component [ digest-algorithm-separator digest-algorithm-component ] +// digest-algorithm-separator := /[+.-_]/ +// digest-algorithm-component := /[A-Za-z][A-Za-z0-9]*/ +// digest-hex := /[0-9a-fA-F]{32,}/ ; At least 128 bit digest value +package reference + +import ( + "errors" + "fmt" + + "github.com/docker/distribution/digest" +) + +const ( + // NameTotalLengthMax is the maximum total number of characters in a repository name. + NameTotalLengthMax = 255 +) + +var ( + // ErrReferenceInvalidFormat represents an error while trying to parse a string as a reference. + ErrReferenceInvalidFormat = errors.New("invalid reference format") + + // ErrTagInvalidFormat represents an error while trying to parse a string as a tag. + ErrTagInvalidFormat = errors.New("invalid tag format") + + // ErrDigestInvalidFormat represents an error while trying to parse a string as a tag. + ErrDigestInvalidFormat = errors.New("invalid digest format") + + // ErrNameEmpty is returned for empty, invalid repository names. + ErrNameEmpty = errors.New("repository name must have at least one component") + + // ErrNameTooLong is returned when a repository name is longer than NameTotalLengthMax. + ErrNameTooLong = fmt.Errorf("repository name must not be more than %v characters", NameTotalLengthMax) +) + +// Reference is an opaque object reference identifier that may include +// modifiers such as a hostname, name, tag, and digest. +type Reference interface { + // String returns the full reference + String() string +} + +// Field provides a wrapper type for resolving correct reference types when +// working with encoding. +type Field struct { + reference Reference +} + +// AsField wraps a reference in a Field for encoding. +func AsField(reference Reference) Field { + return Field{reference} +} + +// Reference unwraps the reference type from the field to +// return the Reference object. This object should be +// of the appropriate type to further check for different +// reference types. +func (f Field) Reference() Reference { + return f.reference +} + +// MarshalText serializes the field to byte text which +// is the string of the reference. +func (f Field) MarshalText() (p []byte, err error) { + return []byte(f.reference.String()), nil +} + +// UnmarshalText parses text bytes by invoking the +// reference parser to ensure the appropriately +// typed reference object is wrapped by field. +func (f *Field) UnmarshalText(p []byte) error { + r, err := Parse(string(p)) + if err != nil { + return err + } + + f.reference = r + return nil +} + +// Named is an object with a full name +type Named interface { + Reference + Name() string +} + +// Tagged is an object which has a tag +type Tagged interface { + Reference + Tag() string +} + +// NamedTagged is an object including a name and tag. +type NamedTagged interface { + Named + Tag() string +} + +// Digested is an object which has a digest +// in which it can be referenced by +type Digested interface { + Reference + Digest() digest.Digest +} + +// Canonical reference is an object with a fully unique +// name including a name with hostname and digest +type Canonical interface { + Named + Digest() digest.Digest +} + +// SplitHostname splits a named reference into a +// hostname and name string. If no valid hostname is +// found, the hostname is empty and the full value +// is returned as name +func SplitHostname(named Named) (string, string) { + name := named.Name() + match := anchoredNameRegexp.FindStringSubmatch(name) + if match == nil || len(match) != 3 { + return "", name + } + return match[1], match[2] +} + +// Parse parses s and returns a syntactically valid Reference. +// If an error was encountered it is returned, along with a nil Reference. +// NOTE: Parse will not handle short digests. +func Parse(s string) (Reference, error) { + matches := ReferenceRegexp.FindStringSubmatch(s) + if matches == nil { + if s == "" { + return nil, ErrNameEmpty + } + // TODO(dmcgowan): Provide more specific and helpful error + return nil, ErrReferenceInvalidFormat + } + + if len(matches[1]) > NameTotalLengthMax { + return nil, ErrNameTooLong + } + + ref := reference{ + name: matches[1], + tag: matches[2], + } + if matches[3] != "" { + var err error + ref.digest, err = digest.ParseDigest(matches[3]) + if err != nil { + return nil, err + } + } + + r := getBestReferenceType(ref) + if r == nil { + return nil, ErrNameEmpty + } + + return r, nil +} + +// ParseNamed parses s and returns a syntactically valid reference implementing +// the Named interface. The reference must have a name, otherwise an error is +// returned. +// If an error was encountered it is returned, along with a nil Reference. +// NOTE: ParseNamed will not handle short digests. +func ParseNamed(s string) (Named, error) { + ref, err := Parse(s) + if err != nil { + return nil, err + } + named, isNamed := ref.(Named) + if !isNamed { + return nil, fmt.Errorf("reference %s has no name", ref.String()) + } + return named, nil +} + +// WithName returns a named object representing the given string. If the input +// is invalid ErrReferenceInvalidFormat will be returned. +func WithName(name string) (Named, error) { + if len(name) > NameTotalLengthMax { + return nil, ErrNameTooLong + } + if !anchoredNameRegexp.MatchString(name) { + return nil, ErrReferenceInvalidFormat + } + return repository(name), nil +} + +// WithTag combines the name from "name" and the tag from "tag" to form a +// reference incorporating both the name and the tag. +func WithTag(name Named, tag string) (NamedTagged, error) { + if !anchoredTagRegexp.MatchString(tag) { + return nil, ErrTagInvalidFormat + } + return taggedReference{ + name: name.Name(), + tag: tag, + }, nil +} + +// WithDigest combines the name from "name" and the digest from "digest" to form +// a reference incorporating both the name and the digest. +func WithDigest(name Named, digest digest.Digest) (Canonical, error) { + if !anchoredDigestRegexp.MatchString(digest.String()) { + return nil, ErrDigestInvalidFormat + } + return canonicalReference{ + name: name.Name(), + digest: digest, + }, nil +} + +func getBestReferenceType(ref reference) Reference { + if ref.name == "" { + // Allow digest only references + if ref.digest != "" { + return digestReference(ref.digest) + } + return nil + } + if ref.tag == "" { + if ref.digest != "" { + return canonicalReference{ + name: ref.name, + digest: ref.digest, + } + } + return repository(ref.name) + } + if ref.digest == "" { + return taggedReference{ + name: ref.name, + tag: ref.tag, + } + } + + return ref +} + +type reference struct { + name string + tag string + digest digest.Digest +} + +func (r reference) String() string { + return r.name + ":" + r.tag + "@" + r.digest.String() +} + +func (r reference) Name() string { + return r.name +} + +func (r reference) Tag() string { + return r.tag +} + +func (r reference) Digest() digest.Digest { + return r.digest +} + +type repository string + +func (r repository) String() string { + return string(r) +} + +func (r repository) Name() string { + return string(r) +} + +type digestReference digest.Digest + +func (d digestReference) String() string { + return d.String() +} + +func (d digestReference) Digest() digest.Digest { + return digest.Digest(d) +} + +type taggedReference struct { + name string + tag string +} + +func (t taggedReference) String() string { + return t.name + ":" + t.tag +} + +func (t taggedReference) Name() string { + return t.name +} + +func (t taggedReference) Tag() string { + return t.tag +} + +type canonicalReference struct { + name string + digest digest.Digest +} + +func (c canonicalReference) String() string { + return c.name + "@" + c.digest.String() +} + +func (c canonicalReference) Name() string { + return c.name +} + +func (c canonicalReference) Digest() digest.Digest { + return c.digest +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/docker/distribution/reference/regexp.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/docker/distribution/reference/regexp.go new file mode 100644 index 0000000000000..9a7d366bc8a8c --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/docker/distribution/reference/regexp.go @@ -0,0 +1,124 @@ +package reference + +import "regexp" + +var ( + // alphaNumericRegexp defines the alpha numeric atom, typically a + // component of names. This only allows lower case characters and digits. + alphaNumericRegexp = match(`[a-z0-9]+`) + + // separatorRegexp defines the separators allowed to be embedded in name + // components. This allow one period, one or two underscore and multiple + // dashes. + separatorRegexp = match(`(?:[._]|__|[-]*)`) + + // nameComponentRegexp restricts registry path component names to start + // with at least one letter or number, with following parts able to be + // separated by one period, one or two underscore and multiple dashes. + nameComponentRegexp = expression( + alphaNumericRegexp, + optional(repeated(separatorRegexp, alphaNumericRegexp))) + + // hostnameComponentRegexp restricts the registry hostname component of a + // repository name to start with a component as defined by hostnameRegexp + // and followed by an optional port. + hostnameComponentRegexp = match(`(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])`) + + // hostnameRegexp defines the structure of potential hostname components + // that may be part of image names. This is purposely a subset of what is + // allowed by DNS to ensure backwards compatibility with Docker image + // names. + hostnameRegexp = expression( + hostnameComponentRegexp, + optional(repeated(literal(`.`), hostnameComponentRegexp)), + optional(literal(`:`), match(`[0-9]+`))) + + // TagRegexp matches valid tag names. From docker/docker:graph/tags.go. + TagRegexp = match(`[\w][\w.-]{0,127}`) + + // anchoredTagRegexp matches valid tag names, anchored at the start and + // end of the matched string. + anchoredTagRegexp = anchored(TagRegexp) + + // DigestRegexp matches valid digests. + DigestRegexp = match(`[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][[:xdigit:]]{32,}`) + + // anchoredDigestRegexp matches valid digests, anchored at the start and + // end of the matched string. + anchoredDigestRegexp = anchored(DigestRegexp) + + // NameRegexp is the format for the name component of references. The + // regexp has capturing groups for the hostname and name part omitting + // the separating forward slash from either. + NameRegexp = expression( + optional(hostnameRegexp, literal(`/`)), + nameComponentRegexp, + optional(repeated(literal(`/`), nameComponentRegexp))) + + // anchoredNameRegexp is used to parse a name value, capturing the + // hostname and trailing components. + anchoredNameRegexp = anchored( + optional(capture(hostnameRegexp), literal(`/`)), + capture(nameComponentRegexp, + optional(repeated(literal(`/`), nameComponentRegexp)))) + + // ReferenceRegexp is the full supported format of a reference. The regexp + // is anchored and has capturing groups for name, tag, and digest + // components. + ReferenceRegexp = anchored(capture(NameRegexp), + optional(literal(":"), capture(TagRegexp)), + optional(literal("@"), capture(DigestRegexp))) +) + +// match compiles the string to a regular expression. +var match = regexp.MustCompile + +// literal compiles s into a literal regular expression, escaping any regexp +// reserved characters. +func literal(s string) *regexp.Regexp { + re := match(regexp.QuoteMeta(s)) + + if _, complete := re.LiteralPrefix(); !complete { + panic("must be a literal") + } + + return re +} + +// expression defines a full expression, where each regular expression must +// follow the previous. +func expression(res ...*regexp.Regexp) *regexp.Regexp { + var s string + for _, re := range res { + s += re.String() + } + + return match(s) +} + +// optional wraps the expression in a non-capturing group and makes the +// production optional. +func optional(res ...*regexp.Regexp) *regexp.Regexp { + return match(group(expression(res...)).String() + `?`) +} + +// repeated wraps the regexp in a non-capturing group to get one or more +// matches. +func repeated(res ...*regexp.Regexp) *regexp.Regexp { + return match(group(expression(res...)).String() + `+`) +} + +// group wraps the regexp in a non-capturing group. +func group(res ...*regexp.Regexp) *regexp.Regexp { + return match(`(?:` + expression(res...).String() + `)`) +} + +// capture wraps the expression in a capturing group. +func capture(res ...*regexp.Regexp) *regexp.Regexp { + return match(`(` + expression(res...).String() + `)`) +} + +// anchored anchors the regular expression by adding start and end delimiters. +func anchored(res ...*regexp.Regexp) *regexp.Regexp { + return match(`^` + expression(res...).String() + `$`) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/.gitignore b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/.gitignore new file mode 100644 index 0000000000000..cece7be664975 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/.gitignore @@ -0,0 +1,70 @@ +# 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 + +restful.html + +*.out + +tmp.prof + +go-restful.test + +examples/restful-basic-authentication + +examples/restful-encoding-filter + +examples/restful-filters + +examples/restful-hello-world + +examples/restful-resource-functions + +examples/restful-serve-static + +examples/restful-user-service + +*.DS_Store +examples/restful-user-resource + +examples/restful-multi-containers + +examples/restful-form-handling + +examples/restful-CORS-filter + +examples/restful-options-filter + +examples/restful-curly-router + +examples/restful-cpuprofiler-service + +examples/restful-pre-post-filters + +curly.prof + +examples/restful-NCSA-logging + +examples/restful-html-template + +s.html +restful-path-tail diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/CHANGES.md b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/CHANGES.md new file mode 100644 index 0000000000000..070bca7cdc46d --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/CHANGES.md @@ -0,0 +1,163 @@ +Change history of go-restful += +2016-02-14 +- take the qualify factor of the Accept header mediatype into account when deciding the contentype of the response +- add constructors for custom entity accessors for xml and json + +2015-09-27 +- rename new WriteStatusAnd... to WriteHeaderAnd... for consistency + +2015-09-25 +- fixed problem with changing Header after WriteHeader (issue 235) + +2015-09-14 +- changed behavior of WriteHeader (immediate write) and WriteEntity (no status write) +- added support for custom EntityReaderWriters. + +2015-08-06 +- add support for reading entities from compressed request content +- use sync.Pool for compressors of http response and request body +- add Description to Parameter for documentation in Swagger UI + +2015-03-20 +- add configurable logging + +2015-03-18 +- if not specified, the Operation is derived from the Route function + +2015-03-17 +- expose Parameter creation functions +- make trace logger an interface +- fix OPTIONSFilter +- customize rendering of ServiceError +- JSR311 router now handles wildcards +- add Notes to Route + +2014-11-27 +- (api add) PrettyPrint per response. (as proposed in #167) + +2014-11-12 +- (api add) ApiVersion(.) for documentation in Swagger UI + +2014-11-10 +- (api change) struct fields tagged with "description" show up in Swagger UI + +2014-10-31 +- (api change) ReturnsError -> Returns +- (api add) RouteBuilder.Do(aBuilder) for DRY use of RouteBuilder +- fix swagger nested structs +- sort Swagger response messages by code + +2014-10-23 +- (api add) ReturnsError allows you to document Http codes in swagger +- fixed problem with greedy CurlyRouter +- (api add) Access-Control-Max-Age in CORS +- add tracing functionality (injectable) for debugging purposes +- support JSON parse 64bit int +- fix empty parameters for swagger +- WebServicesUrl is now optional for swagger +- fixed duplicate AccessControlAllowOrigin in CORS +- (api change) expose ServeMux in container +- (api add) added AllowedDomains in CORS +- (api add) ParameterNamed for detailed documentation + +2014-04-16 +- (api add) expose constructor of Request for testing. + +2014-06-27 +- (api add) ParameterNamed gives access to a Parameter definition and its data (for further specification). +- (api add) SetCacheReadEntity allow scontrol over whether or not the request body is being cached (default true for compatibility reasons). + +2014-07-03 +- (api add) CORS can be configured with a list of allowed domains + +2014-03-12 +- (api add) Route path parameters can use wildcard or regular expressions. (requires CurlyRouter) + +2014-02-26 +- (api add) Request now provides information about the matched Route, see method SelectedRoutePath + +2014-02-17 +- (api change) renamed parameter constants (go-lint checks) + +2014-01-10 + - (api add) support for CloseNotify, see http://golang.org/pkg/net/http/#CloseNotifier + +2014-01-07 + - (api change) Write* methods in Response now return the error or nil. + - added example of serving HTML from a Go template. + - fixed comparing Allowed headers in CORS (is now case-insensitive) + +2013-11-13 + - (api add) Response knows how many bytes are written to the response body. + +2013-10-29 + - (api add) RecoverHandler(handler RecoverHandleFunction) to change how panic recovery is handled. Default behavior is to log and return a stacktrace. This may be a security issue as it exposes sourcecode information. + +2013-10-04 + - (api add) Response knows what HTTP status has been written + - (api add) Request can have attributes (map of string->interface, also called request-scoped variables + +2013-09-12 + - (api change) Router interface simplified + - Implemented CurlyRouter, a Router that does not use|allow regular expressions in paths + +2013-08-05 + - add OPTIONS support + - add CORS support + +2013-08-27 + - fixed some reported issues (see github) + - (api change) deprecated use of WriteError; use WriteErrorString instead + +2014-04-15 + - (fix) v1.0.1 tag: fix Issue 111: WriteErrorString + +2013-08-08 + - (api add) Added implementation Container: a WebServices collection with its own http.ServeMux allowing multiple endpoints per program. Existing uses of go-restful will register their services to the DefaultContainer. + - (api add) the swagger package has be extended to have a UI per container. + - if panic is detected then a small stack trace is printed (thanks to runner-mei) + - (api add) WriteErrorString to Response + +Important API changes: + + - (api remove) package variable DoNotRecover no longer works ; use restful.DefaultContainer.DoNotRecover(true) instead. + - (api remove) package variable EnableContentEncoding no longer works ; use restful.DefaultContainer.EnableContentEncoding(true) instead. + + +2013-07-06 + + - (api add) Added support for response encoding (gzip and deflate(zlib)). This feature is disabled on default (for backwards compatibility). Use restful.EnableContentEncoding = true in your initialization to enable this feature. + +2013-06-19 + + - (improve) DoNotRecover option, moved request body closer, improved ReadEntity + +2013-06-03 + + - (api change) removed Dispatcher interface, hide PathExpression + - changed receiver names of type functions to be more idiomatic Go + +2013-06-02 + + - (optimize) Cache the RegExp compilation of Paths. + +2013-05-22 + + - (api add) Added support for request/response filter functions + +2013-05-18 + + + - (api add) Added feature to change the default Http Request Dispatch function (travis cline) + - (api change) Moved Swagger Webservice to swagger package (see example restful-user) + +[2012-11-14 .. 2013-05-18> + + - See https://github.com/emicklei/go-restful/commits + +2012-11-14 + + - Initial commit + + diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/LICENSE b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/LICENSE new file mode 100644 index 0000000000000..ece7ec61effb4 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2012,2013 Ernest Micklei + +MIT License + +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. \ No newline at end of file diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/Srcfile b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/Srcfile new file mode 100644 index 0000000000000..16fd186892e03 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/Srcfile @@ -0,0 +1 @@ +{"SkipDirs": ["examples"]} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/compress.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/compress.go new file mode 100644 index 0000000000000..220b37712f558 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/compress.go @@ -0,0 +1,123 @@ +package restful + +// Copyright 2013 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +import ( + "bufio" + "compress/gzip" + "compress/zlib" + "errors" + "io" + "net" + "net/http" + "strings" +) + +// OBSOLETE : use restful.DefaultContainer.EnableContentEncoding(true) to change this setting. +var EnableContentEncoding = false + +// CompressingResponseWriter is a http.ResponseWriter that can perform content encoding (gzip and zlib) +type CompressingResponseWriter struct { + writer http.ResponseWriter + compressor io.WriteCloser + encoding string +} + +// Header is part of http.ResponseWriter interface +func (c *CompressingResponseWriter) Header() http.Header { + return c.writer.Header() +} + +// WriteHeader is part of http.ResponseWriter interface +func (c *CompressingResponseWriter) WriteHeader(status int) { + c.writer.WriteHeader(status) +} + +// Write is part of http.ResponseWriter interface +// It is passed through the compressor +func (c *CompressingResponseWriter) Write(bytes []byte) (int, error) { + if c.isCompressorClosed() { + return -1, errors.New("Compressing error: tried to write data using closed compressor") + } + return c.compressor.Write(bytes) +} + +// CloseNotify is part of http.CloseNotifier interface +func (c *CompressingResponseWriter) CloseNotify() <-chan bool { + return c.writer.(http.CloseNotifier).CloseNotify() +} + +// Close the underlying compressor +func (c *CompressingResponseWriter) Close() error { + if c.isCompressorClosed() { + return errors.New("Compressing error: tried to close already closed compressor") + } + + c.compressor.Close() + if ENCODING_GZIP == c.encoding { + currentCompressorProvider.ReleaseGzipWriter(c.compressor.(*gzip.Writer)) + } + if ENCODING_DEFLATE == c.encoding { + currentCompressorProvider.ReleaseZlibWriter(c.compressor.(*zlib.Writer)) + } + // gc hint needed? + c.compressor = nil + return nil +} + +func (c *CompressingResponseWriter) isCompressorClosed() bool { + return nil == c.compressor +} + +// Hijack implements the Hijacker interface +// This is especially useful when combining Container.EnabledContentEncoding +// in combination with websockets (for instance gorilla/websocket) +func (c *CompressingResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) { + hijacker, ok := c.writer.(http.Hijacker) + if !ok { + return nil, nil, errors.New("ResponseWriter doesn't support Hijacker interface") + } + return hijacker.Hijack() +} + +// WantsCompressedResponse reads the Accept-Encoding header to see if and which encoding is requested. +func wantsCompressedResponse(httpRequest *http.Request) (bool, string) { + header := httpRequest.Header.Get(HEADER_AcceptEncoding) + gi := strings.Index(header, ENCODING_GZIP) + zi := strings.Index(header, ENCODING_DEFLATE) + // use in order of appearance + if gi == -1 { + return zi != -1, ENCODING_DEFLATE + } else if zi == -1 { + return gi != -1, ENCODING_GZIP + } else { + if gi < zi { + return true, ENCODING_GZIP + } + return true, ENCODING_DEFLATE + } +} + +// NewCompressingResponseWriter create a CompressingResponseWriter for a known encoding = {gzip,deflate} +func NewCompressingResponseWriter(httpWriter http.ResponseWriter, encoding string) (*CompressingResponseWriter, error) { + httpWriter.Header().Set(HEADER_ContentEncoding, encoding) + c := new(CompressingResponseWriter) + c.writer = httpWriter + var err error + if ENCODING_GZIP == encoding { + w := currentCompressorProvider.AcquireGzipWriter() + w.Reset(httpWriter) + c.compressor = w + c.encoding = ENCODING_GZIP + } else if ENCODING_DEFLATE == encoding { + w := currentCompressorProvider.AcquireZlibWriter() + w.Reset(httpWriter) + c.compressor = w + c.encoding = ENCODING_DEFLATE + } else { + return nil, errors.New("Unknown encoding:" + encoding) + } + return c, err +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/compressor_cache.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/compressor_cache.go new file mode 100644 index 0000000000000..ee426010a2d9a --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/compressor_cache.go @@ -0,0 +1,103 @@ +package restful + +// Copyright 2015 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +import ( + "compress/gzip" + "compress/zlib" +) + +// BoundedCachedCompressors is a CompressorProvider that uses a cache with a fixed amount +// of writers and readers (resources). +// If a new resource is acquired and all are in use, it will return a new unmanaged resource. +type BoundedCachedCompressors struct { + gzipWriters chan *gzip.Writer + gzipReaders chan *gzip.Reader + zlibWriters chan *zlib.Writer + writersCapacity int + readersCapacity int +} + +// NewBoundedCachedCompressors returns a new, with filled cache, BoundedCachedCompressors. +func NewBoundedCachedCompressors(writersCapacity, readersCapacity int) *BoundedCachedCompressors { + b := &BoundedCachedCompressors{ + gzipWriters: make(chan *gzip.Writer, writersCapacity), + gzipReaders: make(chan *gzip.Reader, readersCapacity), + zlibWriters: make(chan *zlib.Writer, writersCapacity), + writersCapacity: writersCapacity, + readersCapacity: readersCapacity, + } + for ix := 0; ix < writersCapacity; ix++ { + b.gzipWriters <- newGzipWriter() + b.zlibWriters <- newZlibWriter() + } + for ix := 0; ix < readersCapacity; ix++ { + b.gzipReaders <- newGzipReader() + } + return b +} + +// AcquireGzipWriter returns an resettable *gzip.Writer. Needs to be released. +func (b *BoundedCachedCompressors) AcquireGzipWriter() *gzip.Writer { + var writer *gzip.Writer + select { + case writer, _ = <-b.gzipWriters: + default: + // return a new unmanaged one + writer = newGzipWriter() + } + return writer +} + +// ReleaseGzipWriter accepts a writer (does not have to be one that was cached) +// only when the cache has room for it. It will ignore it otherwise. +func (b *BoundedCachedCompressors) ReleaseGzipWriter(w *gzip.Writer) { + // forget the unmanaged ones + if len(b.gzipWriters) < b.writersCapacity { + b.gzipWriters <- w + } +} + +// AcquireGzipReader returns a *gzip.Reader. Needs to be released. +func (b *BoundedCachedCompressors) AcquireGzipReader() *gzip.Reader { + var reader *gzip.Reader + select { + case reader, _ = <-b.gzipReaders: + default: + // return a new unmanaged one + reader = newGzipReader() + } + return reader +} + +// ReleaseGzipReader accepts a reader (does not have to be one that was cached) +// only when the cache has room for it. It will ignore it otherwise. +func (b *BoundedCachedCompressors) ReleaseGzipReader(r *gzip.Reader) { + // forget the unmanaged ones + if len(b.gzipReaders) < b.readersCapacity { + b.gzipReaders <- r + } +} + +// AcquireZlibWriter returns an resettable *zlib.Writer. Needs to be released. +func (b *BoundedCachedCompressors) AcquireZlibWriter() *zlib.Writer { + var writer *zlib.Writer + select { + case writer, _ = <-b.zlibWriters: + default: + // return a new unmanaged one + writer = newZlibWriter() + } + return writer +} + +// ReleaseZlibWriter accepts a writer (does not have to be one that was cached) +// only when the cache has room for it. It will ignore it otherwise. +func (b *BoundedCachedCompressors) ReleaseZlibWriter(w *zlib.Writer) { + // forget the unmanaged ones + if len(b.zlibWriters) < b.writersCapacity { + b.zlibWriters <- w + } +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/compressor_pools.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/compressor_pools.go new file mode 100644 index 0000000000000..d866ce64bbac7 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/compressor_pools.go @@ -0,0 +1,91 @@ +package restful + +// Copyright 2015 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +import ( + "bytes" + "compress/gzip" + "compress/zlib" + "sync" +) + +// SyncPoolCompessors is a CompressorProvider that use the standard sync.Pool. +type SyncPoolCompessors struct { + GzipWriterPool *sync.Pool + GzipReaderPool *sync.Pool + ZlibWriterPool *sync.Pool +} + +// NewSyncPoolCompessors returns a new ("empty") SyncPoolCompessors. +func NewSyncPoolCompessors() *SyncPoolCompessors { + return &SyncPoolCompessors{ + GzipWriterPool: &sync.Pool{ + New: func() interface{} { return newGzipWriter() }, + }, + GzipReaderPool: &sync.Pool{ + New: func() interface{} { return newGzipReader() }, + }, + ZlibWriterPool: &sync.Pool{ + New: func() interface{} { return newZlibWriter() }, + }, + } +} + +func (s *SyncPoolCompessors) AcquireGzipWriter() *gzip.Writer { + return s.GzipWriterPool.Get().(*gzip.Writer) +} + +func (s *SyncPoolCompessors) ReleaseGzipWriter(w *gzip.Writer) { + s.GzipWriterPool.Put(w) +} + +func (s *SyncPoolCompessors) AcquireGzipReader() *gzip.Reader { + return s.GzipReaderPool.Get().(*gzip.Reader) +} + +func (s *SyncPoolCompessors) ReleaseGzipReader(r *gzip.Reader) { + s.GzipReaderPool.Put(r) +} + +func (s *SyncPoolCompessors) AcquireZlibWriter() *zlib.Writer { + return s.ZlibWriterPool.Get().(*zlib.Writer) +} + +func (s *SyncPoolCompessors) ReleaseZlibWriter(w *zlib.Writer) { + s.ZlibWriterPool.Put(w) +} + +func newGzipWriter() *gzip.Writer { + // create with an empty bytes writer; it will be replaced before using the gzipWriter + writer, err := gzip.NewWriterLevel(new(bytes.Buffer), gzip.BestSpeed) + if err != nil { + panic(err.Error()) + } + return writer +} + +func newGzipReader() *gzip.Reader { + // create with an empty reader (but with GZIP header); it will be replaced before using the gzipReader + // we can safely use currentCompressProvider because it is set on package initialization. + w := currentCompressorProvider.AcquireGzipWriter() + defer currentCompressorProvider.ReleaseGzipWriter(w) + b := new(bytes.Buffer) + w.Reset(b) + w.Flush() + w.Close() + reader, err := gzip.NewReader(bytes.NewReader(b.Bytes())) + if err != nil { + panic(err.Error()) + } + return reader +} + +func newZlibWriter() *zlib.Writer { + writer, err := zlib.NewWriterLevel(new(bytes.Buffer), gzip.BestSpeed) + if err != nil { + panic(err.Error()) + } + return writer +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/compressors.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/compressors.go new file mode 100644 index 0000000000000..f028456e0f6cf --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/compressors.go @@ -0,0 +1,53 @@ +package restful + +// Copyright 2015 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +import ( + "compress/gzip" + "compress/zlib" +) + +type CompressorProvider interface { + // Returns a *gzip.Writer which needs to be released later. + // Before using it, call Reset(). + AcquireGzipWriter() *gzip.Writer + + // Releases an aqcuired *gzip.Writer. + ReleaseGzipWriter(w *gzip.Writer) + + // Returns a *gzip.Reader which needs to be released later. + AcquireGzipReader() *gzip.Reader + + // Releases an aqcuired *gzip.Reader. + ReleaseGzipReader(w *gzip.Reader) + + // Returns a *zlib.Writer which needs to be released later. + // Before using it, call Reset(). + AcquireZlibWriter() *zlib.Writer + + // Releases an aqcuired *zlib.Writer. + ReleaseZlibWriter(w *zlib.Writer) +} + +// DefaultCompressorProvider is the actual provider of compressors (zlib or gzip). +var currentCompressorProvider CompressorProvider + +func init() { + currentCompressorProvider = NewSyncPoolCompessors() +} + +// CurrentCompressorProvider returns the current CompressorProvider. +// It is initialized using a SyncPoolCompessors. +func CurrentCompressorProvider() CompressorProvider { + return currentCompressorProvider +} + +// CompressorProvider sets the actual provider of compressors (zlib or gzip). +func SetCompressorProvider(p CompressorProvider) { + if p == nil { + panic("cannot set compressor provider to nil") + } + currentCompressorProvider = p +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/constants.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/constants.go new file mode 100644 index 0000000000000..203439c5e5fdc --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/constants.go @@ -0,0 +1,30 @@ +package restful + +// Copyright 2013 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +const ( + MIME_XML = "application/xml" // Accept or Content-Type used in Consumes() and/or Produces() + MIME_JSON = "application/json" // Accept or Content-Type used in Consumes() and/or Produces() + MIME_OCTET = "application/octet-stream" // If Content-Type is not present in request, use the default + + HEADER_Allow = "Allow" + HEADER_Accept = "Accept" + HEADER_Origin = "Origin" + HEADER_ContentType = "Content-Type" + HEADER_LastModified = "Last-Modified" + HEADER_AcceptEncoding = "Accept-Encoding" + HEADER_ContentEncoding = "Content-Encoding" + HEADER_AccessControlExposeHeaders = "Access-Control-Expose-Headers" + HEADER_AccessControlRequestMethod = "Access-Control-Request-Method" + HEADER_AccessControlRequestHeaders = "Access-Control-Request-Headers" + HEADER_AccessControlAllowMethods = "Access-Control-Allow-Methods" + HEADER_AccessControlAllowOrigin = "Access-Control-Allow-Origin" + HEADER_AccessControlAllowCredentials = "Access-Control-Allow-Credentials" + HEADER_AccessControlAllowHeaders = "Access-Control-Allow-Headers" + HEADER_AccessControlMaxAge = "Access-Control-Max-Age" + + ENCODING_GZIP = "gzip" + ENCODING_DEFLATE = "deflate" +) diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/container.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/container.go new file mode 100644 index 0000000000000..62ded27c71b21 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/container.go @@ -0,0 +1,361 @@ +package restful + +// Copyright 2013 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +import ( + "bytes" + "errors" + "fmt" + "net/http" + "os" + "runtime" + "strings" + "sync" + + "github.com/emicklei/go-restful/log" +) + +// Container holds a collection of WebServices and a http.ServeMux to dispatch http requests. +// The requests are further dispatched to routes of WebServices using a RouteSelector +type Container struct { + webServicesLock sync.RWMutex + webServices []*WebService + ServeMux *http.ServeMux + isRegisteredOnRoot bool + containerFilters []FilterFunction + doNotRecover bool // default is false + recoverHandleFunc RecoverHandleFunction + serviceErrorHandleFunc ServiceErrorHandleFunction + router RouteSelector // default is a RouterJSR311, CurlyRouter is the faster alternative + contentEncodingEnabled bool // default is false +} + +// NewContainer creates a new Container using a new ServeMux and default router (RouterJSR311) +func NewContainer() *Container { + return &Container{ + webServices: []*WebService{}, + ServeMux: http.NewServeMux(), + isRegisteredOnRoot: false, + containerFilters: []FilterFunction{}, + doNotRecover: false, + recoverHandleFunc: logStackOnRecover, + serviceErrorHandleFunc: writeServiceError, + router: RouterJSR311{}, + contentEncodingEnabled: false} +} + +// RecoverHandleFunction declares functions that can be used to handle a panic situation. +// The first argument is what recover() returns. The second must be used to communicate an error response. +type RecoverHandleFunction func(interface{}, http.ResponseWriter) + +// RecoverHandler changes the default function (logStackOnRecover) to be called +// when a panic is detected. DoNotRecover must be have its default value (=false). +func (c *Container) RecoverHandler(handler RecoverHandleFunction) { + c.recoverHandleFunc = handler +} + +// ServiceErrorHandleFunction declares functions that can be used to handle a service error situation. +// The first argument is the service error, the second is the request that resulted in the error and +// the third must be used to communicate an error response. +type ServiceErrorHandleFunction func(ServiceError, *Request, *Response) + +// ServiceErrorHandler changes the default function (writeServiceError) to be called +// when a ServiceError is detected. +func (c *Container) ServiceErrorHandler(handler ServiceErrorHandleFunction) { + c.serviceErrorHandleFunc = handler +} + +// DoNotRecover controls whether panics will be caught to return HTTP 500. +// If set to true, Route functions are responsible for handling any error situation. +// Default value is false = recover from panics. This has performance implications. +func (c *Container) DoNotRecover(doNot bool) { + c.doNotRecover = doNot +} + +// Router changes the default Router (currently RouterJSR311) +func (c *Container) Router(aRouter RouteSelector) { + c.router = aRouter +} + +// EnableContentEncoding (default=false) allows for GZIP or DEFLATE encoding of responses. +func (c *Container) EnableContentEncoding(enabled bool) { + c.contentEncodingEnabled = enabled +} + +// Add a WebService to the Container. It will detect duplicate root paths and exit in that case. +func (c *Container) Add(service *WebService) *Container { + c.webServicesLock.Lock() + defer c.webServicesLock.Unlock() + + // if rootPath was not set then lazy initialize it + if len(service.rootPath) == 0 { + service.Path("/") + } + + // cannot have duplicate root paths + for _, each := range c.webServices { + if each.RootPath() == service.RootPath() { + log.Printf("[restful] WebService with duplicate root path detected:['%v']", each) + os.Exit(1) + } + } + + // If not registered on root then add specific mapping + if !c.isRegisteredOnRoot { + c.isRegisteredOnRoot = c.addHandler(service, c.ServeMux) + } + c.webServices = append(c.webServices, service) + return c +} + +// addHandler may set a new HandleFunc for the serveMux +// this function must run inside the critical region protected by the webServicesLock. +// returns true if the function was registered on root ("/") +func (c *Container) addHandler(service *WebService, serveMux *http.ServeMux) bool { + pattern := fixedPrefixPath(service.RootPath()) + // check if root path registration is needed + if "/" == pattern || "" == pattern { + serveMux.HandleFunc("/", c.dispatch) + return true + } + // detect if registration already exists + alreadyMapped := false + for _, each := range c.webServices { + if each.RootPath() == service.RootPath() { + alreadyMapped = true + break + } + } + if !alreadyMapped { + serveMux.HandleFunc(pattern, c.dispatch) + if !strings.HasSuffix(pattern, "/") { + serveMux.HandleFunc(pattern+"/", c.dispatch) + } + } + return false +} + +func (c *Container) Remove(ws *WebService) error { + if c.ServeMux == http.DefaultServeMux { + errMsg := fmt.Sprintf("[restful] cannot remove a WebService from a Container using the DefaultServeMux: ['%v']", ws) + log.Printf(errMsg) + return errors.New(errMsg) + } + c.webServicesLock.Lock() + defer c.webServicesLock.Unlock() + // build a new ServeMux and re-register all WebServices + newServeMux := http.NewServeMux() + newServices := []*WebService{} + newIsRegisteredOnRoot := false + for _, each := range c.webServices { + if each.rootPath != ws.rootPath { + // If not registered on root then add specific mapping + if !newIsRegisteredOnRoot { + newIsRegisteredOnRoot = c.addHandler(each, newServeMux) + } + newServices = append(newServices, each) + } + } + c.webServices, c.ServeMux, c.isRegisteredOnRoot = newServices, newServeMux, newIsRegisteredOnRoot + return nil +} + +// logStackOnRecover is the default RecoverHandleFunction and is called +// when DoNotRecover is false and the recoverHandleFunc is not set for the container. +// Default implementation logs the stacktrace and writes the stacktrace on the response. +// This may be a security issue as it exposes sourcecode information. +func logStackOnRecover(panicReason interface{}, httpWriter http.ResponseWriter) { + var buffer bytes.Buffer + buffer.WriteString(fmt.Sprintf("[restful] recover from panic situation: - %v\r\n", panicReason)) + for i := 2; ; i += 1 { + _, file, line, ok := runtime.Caller(i) + if !ok { + break + } + buffer.WriteString(fmt.Sprintf(" %s:%d\r\n", file, line)) + } + log.Print(buffer.String()) + httpWriter.WriteHeader(http.StatusInternalServerError) + httpWriter.Write(buffer.Bytes()) +} + +// writeServiceError is the default ServiceErrorHandleFunction and is called +// when a ServiceError is returned during route selection. Default implementation +// calls resp.WriteErrorString(err.Code, err.Message) +func writeServiceError(err ServiceError, req *Request, resp *Response) { + resp.WriteErrorString(err.Code, err.Message) +} + +// Dispatch the incoming Http Request to a matching WebService. +func (c *Container) dispatch(httpWriter http.ResponseWriter, httpRequest *http.Request) { + writer := httpWriter + + // CompressingResponseWriter should be closed after all operations are done + defer func() { + if compressWriter, ok := writer.(*CompressingResponseWriter); ok { + compressWriter.Close() + } + }() + + // Instal panic recovery unless told otherwise + if !c.doNotRecover { // catch all for 500 response + defer func() { + if r := recover(); r != nil { + c.recoverHandleFunc(r, writer) + return + } + }() + } + // Install closing the request body (if any) + defer func() { + if nil != httpRequest.Body { + httpRequest.Body.Close() + } + }() + + // Detect if compression is needed + // assume without compression, test for override + if c.contentEncodingEnabled { + doCompress, encoding := wantsCompressedResponse(httpRequest) + if doCompress { + var err error + writer, err = NewCompressingResponseWriter(httpWriter, encoding) + if err != nil { + log.Print("[restful] unable to install compressor: ", err) + httpWriter.WriteHeader(http.StatusInternalServerError) + return + } + } + } + // Find best match Route ; err is non nil if no match was found + var webService *WebService + var route *Route + var err error + func() { + c.webServicesLock.RLock() + defer c.webServicesLock.RUnlock() + webService, route, err = c.router.SelectRoute( + c.webServices, + httpRequest) + }() + if err != nil { + // a non-200 response has already been written + // run container filters anyway ; they should not touch the response... + chain := FilterChain{Filters: c.containerFilters, Target: func(req *Request, resp *Response) { + switch err.(type) { + case ServiceError: + ser := err.(ServiceError) + c.serviceErrorHandleFunc(ser, req, resp) + } + // TODO + }} + chain.ProcessFilter(NewRequest(httpRequest), NewResponse(writer)) + return + } + wrappedRequest, wrappedResponse := route.wrapRequestResponse(writer, httpRequest) + // pass through filters (if any) + if len(c.containerFilters)+len(webService.filters)+len(route.Filters) > 0 { + // compose filter chain + allFilters := []FilterFunction{} + allFilters = append(allFilters, c.containerFilters...) + allFilters = append(allFilters, webService.filters...) + allFilters = append(allFilters, route.Filters...) + chain := FilterChain{Filters: allFilters, Target: func(req *Request, resp *Response) { + // handle request by route after passing all filters + route.Function(wrappedRequest, wrappedResponse) + }} + chain.ProcessFilter(wrappedRequest, wrappedResponse) + } else { + // no filters, handle request by route + route.Function(wrappedRequest, wrappedResponse) + } +} + +// fixedPrefixPath returns the fixed part of the partspec ; it may include template vars {} +func fixedPrefixPath(pathspec string) string { + varBegin := strings.Index(pathspec, "{") + if -1 == varBegin { + return pathspec + } + return pathspec[:varBegin] +} + +// ServeHTTP implements net/http.Handler therefore a Container can be a Handler in a http.Server +func (c Container) ServeHTTP(httpwriter http.ResponseWriter, httpRequest *http.Request) { + c.ServeMux.ServeHTTP(httpwriter, httpRequest) +} + +// Handle registers the handler for the given pattern. If a handler already exists for pattern, Handle panics. +func (c Container) Handle(pattern string, handler http.Handler) { + c.ServeMux.Handle(pattern, handler) +} + +// HandleWithFilter registers the handler for the given pattern. +// Container's filter chain is applied for handler. +// If a handler already exists for pattern, HandleWithFilter panics. +func (c *Container) HandleWithFilter(pattern string, handler http.Handler) { + f := func(httpResponse http.ResponseWriter, httpRequest *http.Request) { + if len(c.containerFilters) == 0 { + handler.ServeHTTP(httpResponse, httpRequest) + return + } + + chain := FilterChain{Filters: c.containerFilters, Target: func(req *Request, resp *Response) { + handler.ServeHTTP(httpResponse, httpRequest) + }} + chain.ProcessFilter(NewRequest(httpRequest), NewResponse(httpResponse)) + } + + c.Handle(pattern, http.HandlerFunc(f)) +} + +// Filter appends a container FilterFunction. These are called before dispatching +// a http.Request to a WebService from the container +func (c *Container) Filter(filter FilterFunction) { + c.containerFilters = append(c.containerFilters, filter) +} + +// RegisteredWebServices returns the collections of added WebServices +func (c Container) RegisteredWebServices() []*WebService { + c.webServicesLock.RLock() + defer c.webServicesLock.RUnlock() + result := make([]*WebService, len(c.webServices)) + for ix := range c.webServices { + result[ix] = c.webServices[ix] + } + return result +} + +// computeAllowedMethods returns a list of HTTP methods that are valid for a Request +func (c Container) computeAllowedMethods(req *Request) []string { + // Go through all RegisteredWebServices() and all its Routes to collect the options + methods := []string{} + requestPath := req.Request.URL.Path + for _, ws := range c.RegisteredWebServices() { + matches := ws.pathExpr.Matcher.FindStringSubmatch(requestPath) + if matches != nil { + finalMatch := matches[len(matches)-1] + for _, rt := range ws.Routes() { + matches := rt.pathExpr.Matcher.FindStringSubmatch(finalMatch) + if matches != nil { + lastMatch := matches[len(matches)-1] + if lastMatch == "" || lastMatch == "/" { // do not include if value is neither empty nor ‘/’. + methods = append(methods, rt.Method) + } + } + } + } + } + // methods = append(methods, "OPTIONS") not sure about this + return methods +} + +// newBasicRequestResponse creates a pair of Request,Response from its http versions. +// It is basic because no parameter or (produces) content-type information is given. +func newBasicRequestResponse(httpWriter http.ResponseWriter, httpRequest *http.Request) (*Request, *Response) { + resp := NewResponse(httpWriter) + resp.requestAccept = httpRequest.Header.Get(HEADER_Accept) + return NewRequest(httpRequest), resp +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/cors_filter.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/cors_filter.go new file mode 100644 index 0000000000000..1efeef072d03e --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/cors_filter.go @@ -0,0 +1,202 @@ +package restful + +// Copyright 2013 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +import ( + "regexp" + "strconv" + "strings" +) + +// CrossOriginResourceSharing is used to create a Container Filter that implements CORS. +// Cross-origin resource sharing (CORS) is a mechanism that allows JavaScript on a web page +// to make XMLHttpRequests to another domain, not the domain the JavaScript originated from. +// +// http://en.wikipedia.org/wiki/Cross-origin_resource_sharing +// http://enable-cors.org/server.html +// http://www.html5rocks.com/en/tutorials/cors/#toc-handling-a-not-so-simple-request +type CrossOriginResourceSharing struct { + ExposeHeaders []string // list of Header names + AllowedHeaders []string // list of Header names + AllowedDomains []string // list of allowed values for Http Origin. An allowed value can be a regular expression to support subdomain matching. If empty all are allowed. + AllowedMethods []string + MaxAge int // number of seconds before requiring new Options request + CookiesAllowed bool + Container *Container + + allowedOriginPatterns []*regexp.Regexp // internal field for origin regexp check. +} + +// Filter is a filter function that implements the CORS flow as documented on http://enable-cors.org/server.html +// and http://www.html5rocks.com/static/images/cors_server_flowchart.png +func (c CrossOriginResourceSharing) Filter(req *Request, resp *Response, chain *FilterChain) { + origin := req.Request.Header.Get(HEADER_Origin) + if len(origin) == 0 { + if trace { + traceLogger.Print("no Http header Origin set") + } + chain.ProcessFilter(req, resp) + return + } + if !c.isOriginAllowed(origin) { // check whether this origin is allowed + if trace { + traceLogger.Printf("HTTP Origin:%s is not part of %v, neither matches any part of %v", origin, c.AllowedDomains, c.allowedOriginPatterns) + } + chain.ProcessFilter(req, resp) + return + } + if req.Request.Method != "OPTIONS" { + c.doActualRequest(req, resp) + chain.ProcessFilter(req, resp) + return + } + if acrm := req.Request.Header.Get(HEADER_AccessControlRequestMethod); acrm != "" { + c.doPreflightRequest(req, resp) + } else { + c.doActualRequest(req, resp) + chain.ProcessFilter(req, resp) + return + } +} + +func (c CrossOriginResourceSharing) doActualRequest(req *Request, resp *Response) { + c.setOptionsHeaders(req, resp) + // continue processing the response +} + +func (c *CrossOriginResourceSharing) doPreflightRequest(req *Request, resp *Response) { + if len(c.AllowedMethods) == 0 { + if c.Container == nil { + c.AllowedMethods = DefaultContainer.computeAllowedMethods(req) + } else { + c.AllowedMethods = c.Container.computeAllowedMethods(req) + } + } + + acrm := req.Request.Header.Get(HEADER_AccessControlRequestMethod) + if !c.isValidAccessControlRequestMethod(acrm, c.AllowedMethods) { + if trace { + traceLogger.Printf("Http header %s:%s is not in %v", + HEADER_AccessControlRequestMethod, + acrm, + c.AllowedMethods) + } + return + } + acrhs := req.Request.Header.Get(HEADER_AccessControlRequestHeaders) + if len(acrhs) > 0 { + for _, each := range strings.Split(acrhs, ",") { + if !c.isValidAccessControlRequestHeader(strings.Trim(each, " ")) { + if trace { + traceLogger.Printf("Http header %s:%s is not in %v", + HEADER_AccessControlRequestHeaders, + acrhs, + c.AllowedHeaders) + } + return + } + } + } + resp.AddHeader(HEADER_AccessControlAllowMethods, strings.Join(c.AllowedMethods, ",")) + resp.AddHeader(HEADER_AccessControlAllowHeaders, acrhs) + c.setOptionsHeaders(req, resp) + + // return http 200 response, no body +} + +func (c CrossOriginResourceSharing) setOptionsHeaders(req *Request, resp *Response) { + c.checkAndSetExposeHeaders(resp) + c.setAllowOriginHeader(req, resp) + c.checkAndSetAllowCredentials(resp) + if c.MaxAge > 0 { + resp.AddHeader(HEADER_AccessControlMaxAge, strconv.Itoa(c.MaxAge)) + } +} + +func (c CrossOriginResourceSharing) isOriginAllowed(origin string) bool { + if len(origin) == 0 { + return false + } + if len(c.AllowedDomains) == 0 { + return true + } + + allowed := false + for _, domain := range c.AllowedDomains { + if domain == origin { + allowed = true + break + } + } + + if !allowed { + if len(c.allowedOriginPatterns) == 0 { + // compile allowed domains to allowed origin patterns + allowedOriginRegexps, err := compileRegexps(c.AllowedDomains) + if err != nil { + return false + } + c.allowedOriginPatterns = allowedOriginRegexps + } + + for _, pattern := range c.allowedOriginPatterns { + if allowed = pattern.MatchString(origin); allowed { + break + } + } + } + + return allowed +} + +func (c CrossOriginResourceSharing) setAllowOriginHeader(req *Request, resp *Response) { + origin := req.Request.Header.Get(HEADER_Origin) + if c.isOriginAllowed(origin) { + resp.AddHeader(HEADER_AccessControlAllowOrigin, origin) + } +} + +func (c CrossOriginResourceSharing) checkAndSetExposeHeaders(resp *Response) { + if len(c.ExposeHeaders) > 0 { + resp.AddHeader(HEADER_AccessControlExposeHeaders, strings.Join(c.ExposeHeaders, ",")) + } +} + +func (c CrossOriginResourceSharing) checkAndSetAllowCredentials(resp *Response) { + if c.CookiesAllowed { + resp.AddHeader(HEADER_AccessControlAllowCredentials, "true") + } +} + +func (c CrossOriginResourceSharing) isValidAccessControlRequestMethod(method string, allowedMethods []string) bool { + for _, each := range allowedMethods { + if each == method { + return true + } + } + return false +} + +func (c CrossOriginResourceSharing) isValidAccessControlRequestHeader(header string) bool { + for _, each := range c.AllowedHeaders { + if strings.ToLower(each) == strings.ToLower(header) { + return true + } + } + return false +} + +// Take a list of strings and compile them into a list of regular expressions. +func compileRegexps(regexpStrings []string) ([]*regexp.Regexp, error) { + regexps := []*regexp.Regexp{} + for _, regexpStr := range regexpStrings { + r, err := regexp.Compile(regexpStr) + if err != nil { + return regexps, err + } + regexps = append(regexps, r) + } + return regexps, nil +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/curly.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/curly.go new file mode 100644 index 0000000000000..185300dbc73d5 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/curly.go @@ -0,0 +1,162 @@ +package restful + +// Copyright 2013 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +import ( + "net/http" + "regexp" + "sort" + "strings" +) + +// CurlyRouter expects Routes with paths that contain zero or more parameters in curly brackets. +type CurlyRouter struct{} + +// SelectRoute is part of the Router interface and returns the best match +// for the WebService and its Route for the given Request. +func (c CurlyRouter) SelectRoute( + webServices []*WebService, + httpRequest *http.Request) (selectedService *WebService, selected *Route, err error) { + + requestTokens := tokenizePath(httpRequest.URL.Path) + + detectedService := c.detectWebService(requestTokens, webServices) + if detectedService == nil { + if trace { + traceLogger.Printf("no WebService was found to match URL path:%s\n", httpRequest.URL.Path) + } + return nil, nil, NewError(http.StatusNotFound, "404: Page Not Found") + } + candidateRoutes := c.selectRoutes(detectedService, requestTokens) + if len(candidateRoutes) == 0 { + if trace { + traceLogger.Printf("no Route in WebService with path %s was found to match URL path:%s\n", detectedService.rootPath, httpRequest.URL.Path) + } + return detectedService, nil, NewError(http.StatusNotFound, "404: Page Not Found") + } + selectedRoute, err := c.detectRoute(candidateRoutes, httpRequest) + if selectedRoute == nil { + return detectedService, nil, err + } + return detectedService, selectedRoute, nil +} + +// selectRoutes return a collection of Route from a WebService that matches the path tokens from the request. +func (c CurlyRouter) selectRoutes(ws *WebService, requestTokens []string) sortableCurlyRoutes { + candidates := sortableCurlyRoutes{} + for _, each := range ws.routes { + matches, paramCount, staticCount := c.matchesRouteByPathTokens(each.pathParts, requestTokens) + if matches { + candidates.add(curlyRoute{each, paramCount, staticCount}) // TODO make sure Routes() return pointers? + } + } + sort.Sort(sort.Reverse(candidates)) + return candidates +} + +// matchesRouteByPathTokens computes whether it matches, howmany parameters do match and what the number of static path elements are. +func (c CurlyRouter) matchesRouteByPathTokens(routeTokens, requestTokens []string) (matches bool, paramCount int, staticCount int) { + if len(routeTokens) < len(requestTokens) { + // proceed in matching only if last routeToken is wildcard + count := len(routeTokens) + if count == 0 || !strings.HasSuffix(routeTokens[count-1], "*}") { + return false, 0, 0 + } + // proceed + } + for i, routeToken := range routeTokens { + if i == len(requestTokens) { + // reached end of request path + return false, 0, 0 + } + requestToken := requestTokens[i] + if strings.HasPrefix(routeToken, "{") { + paramCount++ + if colon := strings.Index(routeToken, ":"); colon != -1 { + // match by regex + matchesToken, matchesRemainder := c.regularMatchesPathToken(routeToken, colon, requestToken) + if !matchesToken { + return false, 0, 0 + } + if matchesRemainder { + break + } + } + } else { // no { prefix + if requestToken != routeToken { + return false, 0, 0 + } + staticCount++ + } + } + return true, paramCount, staticCount +} + +// regularMatchesPathToken tests whether the regular expression part of routeToken matches the requestToken or all remaining tokens +// format routeToken is {someVar:someExpression}, e.g. {zipcode:[\d][\d][\d][\d][A-Z][A-Z]} +func (c CurlyRouter) regularMatchesPathToken(routeToken string, colon int, requestToken string) (matchesToken bool, matchesRemainder bool) { + regPart := routeToken[colon+1 : len(routeToken)-1] + if regPart == "*" { + if trace { + traceLogger.Printf("wildcard parameter detected in route token %s that matches %s\n", routeToken, requestToken) + } + return true, true + } + matched, err := regexp.MatchString(regPart, requestToken) + return (matched && err == nil), false +} + +// detectRoute selectes from a list of Route the first match by inspecting both the Accept and Content-Type +// headers of the Request. See also RouterJSR311 in jsr311.go +func (c CurlyRouter) detectRoute(candidateRoutes sortableCurlyRoutes, httpRequest *http.Request) (*Route, error) { + // tracing is done inside detectRoute + return RouterJSR311{}.detectRoute(candidateRoutes.routes(), httpRequest) +} + +// detectWebService returns the best matching webService given the list of path tokens. +// see also computeWebserviceScore +func (c CurlyRouter) detectWebService(requestTokens []string, webServices []*WebService) *WebService { + var best *WebService + score := -1 + for _, each := range webServices { + matches, eachScore := c.computeWebserviceScore(requestTokens, each.pathExpr.tokens) + if matches && (eachScore > score) { + best = each + score = eachScore + } + } + return best +} + +// computeWebserviceScore returns whether tokens match and +// the weighted score of the longest matching consecutive tokens from the beginning. +func (c CurlyRouter) computeWebserviceScore(requestTokens []string, tokens []string) (bool, int) { + if len(tokens) > len(requestTokens) { + return false, 0 + } + score := 0 + for i := 0; i < len(tokens); i++ { + each := requestTokens[i] + other := tokens[i] + if len(each) == 0 && len(other) == 0 { + score++ + continue + } + if len(other) > 0 && strings.HasPrefix(other, "{") { + // no empty match + if len(each) == 0 { + return false, score + } + score += 1 + } else { + // not a parameter + if each != other { + return false, score + } + score += (len(tokens) - i) * 10 //fuzzy + } + } + return true, score +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/curly_route.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/curly_route.go new file mode 100644 index 0000000000000..296f94650e655 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/curly_route.go @@ -0,0 +1,52 @@ +package restful + +// Copyright 2013 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +// curlyRoute exits for sorting Routes by the CurlyRouter based on number of parameters and number of static path elements. +type curlyRoute struct { + route Route + paramCount int + staticCount int +} + +type sortableCurlyRoutes []curlyRoute + +func (s *sortableCurlyRoutes) add(route curlyRoute) { + *s = append(*s, route) +} + +func (s sortableCurlyRoutes) routes() (routes []Route) { + for _, each := range s { + routes = append(routes, each.route) // TODO change return type + } + return routes +} + +func (s sortableCurlyRoutes) Len() int { + return len(s) +} +func (s sortableCurlyRoutes) Swap(i, j int) { + s[i], s[j] = s[j], s[i] +} +func (s sortableCurlyRoutes) Less(i, j int) bool { + ci := s[i] + cj := s[j] + + // primary key + if ci.staticCount < cj.staticCount { + return true + } + if ci.staticCount > cj.staticCount { + return false + } + // secundary key + if ci.paramCount < cj.paramCount { + return true + } + if ci.paramCount > cj.paramCount { + return false + } + return ci.route.Path < cj.route.Path +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/doc.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/doc.go new file mode 100644 index 0000000000000..d40405bf76a7f --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/doc.go @@ -0,0 +1,196 @@ +/* +Package restful, a lean package for creating REST-style WebServices without magic. + +WebServices and Routes + +A WebService has a collection of Route objects that dispatch incoming Http Requests to a function calls. +Typically, a WebService has a root path (e.g. /users) and defines common MIME types for its routes. +WebServices must be added to a container (see below) in order to handler Http requests from a server. + +A Route is defined by a HTTP method, an URL path and (optionally) the MIME types it consumes (Content-Type) and produces (Accept). +This package has the logic to find the best matching Route and if found, call its Function. + + ws := new(restful.WebService) + ws. + Path("/users"). + Consumes(restful.MIME_JSON, restful.MIME_XML). + Produces(restful.MIME_JSON, restful.MIME_XML) + + ws.Route(ws.GET("/{user-id}").To(u.findUser)) // u is a UserResource + + ... + + // GET http://localhost:8080/users/1 + func (u UserResource) findUser(request *restful.Request, response *restful.Response) { + id := request.PathParameter("user-id") + ... + } + +The (*Request, *Response) arguments provide functions for reading information from the request and writing information back to the response. + +See the example https://github.com/emicklei/go-restful/blob/master/examples/restful-user-resource.go with a full implementation. + +Regular expression matching Routes + +A Route parameter can be specified using the format "uri/{var[:regexp]}" or the special version "uri/{var:*}" for matching the tail of the path. +For example, /persons/{name:[A-Z][A-Z]} can be used to restrict values for the parameter "name" to only contain capital alphabetic characters. +Regular expressions must use the standard Go syntax as described in the regexp package. (https://code.google.com/p/re2/wiki/Syntax) +This feature requires the use of a CurlyRouter. + +Containers + +A Container holds a collection of WebServices, Filters and a http.ServeMux for multiplexing http requests. +Using the statements "restful.Add(...) and restful.Filter(...)" will register WebServices and Filters to the Default Container. +The Default container of go-restful uses the http.DefaultServeMux. +You can create your own Container and create a new http.Server for that particular container. + + container := restful.NewContainer() + server := &http.Server{Addr: ":8081", Handler: container} + +Filters + +A filter dynamically intercepts requests and responses to transform or use the information contained in the requests or responses. +You can use filters to perform generic logging, measurement, authentication, redirect, set response headers etc. +In the restful package there are three hooks into the request,response flow where filters can be added. +Each filter must define a FilterFunction: + + func (req *restful.Request, resp *restful.Response, chain *restful.FilterChain) + +Use the following statement to pass the request,response pair to the next filter or RouteFunction + + chain.ProcessFilter(req, resp) + +Container Filters + +These are processed before any registered WebService. + + // install a (global) filter for the default container (processed before any webservice) + restful.Filter(globalLogging) + +WebService Filters + +These are processed before any Route of a WebService. + + // install a webservice filter (processed before any route) + ws.Filter(webserviceLogging).Filter(measureTime) + + +Route Filters + +These are processed before calling the function associated with the Route. + + // install 2 chained route filters (processed before calling findUser) + ws.Route(ws.GET("/{user-id}").Filter(routeLogging).Filter(NewCountFilter().routeCounter).To(findUser)) + +See the example https://github.com/emicklei/go-restful/blob/master/examples/restful-filters.go with full implementations. + +Response Encoding + +Two encodings are supported: gzip and deflate. To enable this for all responses: + + restful.DefaultContainer.EnableContentEncoding(true) + +If a Http request includes the Accept-Encoding header then the response content will be compressed using the specified encoding. +Alternatively, you can create a Filter that performs the encoding and install it per WebService or Route. + +See the example https://github.com/emicklei/go-restful/blob/master/examples/restful-encoding-filter.go + +OPTIONS support + +By installing a pre-defined container filter, your Webservice(s) can respond to the OPTIONS Http request. + + Filter(OPTIONSFilter()) + +CORS + +By installing the filter of a CrossOriginResourceSharing (CORS), your WebService(s) can handle CORS requests. + + cors := CrossOriginResourceSharing{ExposeHeaders: []string{"X-My-Header"}, CookiesAllowed: false, Container: DefaultContainer} + Filter(cors.Filter) + +Error Handling + +Unexpected things happen. If a request cannot be processed because of a failure, your service needs to tell via the response what happened and why. +For this reason HTTP status codes exist and it is important to use the correct code in every exceptional situation. + + 400: Bad Request + +If path or query parameters are not valid (content or type) then use http.StatusBadRequest. + + 404: Not Found + +Despite a valid URI, the resource requested may not be available + + 500: Internal Server Error + +If the application logic could not process the request (or write the response) then use http.StatusInternalServerError. + + 405: Method Not Allowed + +The request has a valid URL but the method (GET,PUT,POST,...) is not allowed. + + 406: Not Acceptable + +The request does not have or has an unknown Accept Header set for this operation. + + 415: Unsupported Media Type + +The request does not have or has an unknown Content-Type Header set for this operation. + +ServiceError + +In addition to setting the correct (error) Http status code, you can choose to write a ServiceError message on the response. + +Performance options + +This package has several options that affect the performance of your service. It is important to understand them and how you can change it. + + restful.DefaultContainer.Router(CurlyRouter{}) + +The default router is the RouterJSR311 which is an implementation of its spec (http://jsr311.java.net/nonav/releases/1.1/spec/spec.html). +However, it uses regular expressions for all its routes which, depending on your usecase, may consume a significant amount of time. +The CurlyRouter implementation is more lightweight that also allows you to use wildcards and expressions, but only if needed. + + restful.DefaultContainer.DoNotRecover(true) + +DoNotRecover controls whether panics will be caught to return HTTP 500. +If set to true, Route functions are responsible for handling any error situation. +Default value is false; it will recover from panics. This has performance implications. + + restful.SetCacheReadEntity(false) + +SetCacheReadEntity controls whether the response data ([]byte) is cached such that ReadEntity is repeatable. +If you expect to read large amounts of payload data, and you do not use this feature, you should set it to false. + + restful.SetCompressorProvider(NewBoundedCachedCompressors(20, 20)) + +If content encoding is enabled then the default strategy for getting new gzip/zlib writers and readers is to use a sync.Pool. +Because writers are expensive structures, performance is even more improved when using a preloaded cache. You can also inject your own implementation. + +Trouble shooting + +This package has the means to produce detail logging of the complete Http request matching process and filter invocation. +Enabling this feature requires you to set an implementation of restful.StdLogger (e.g. log.Logger) instance such as: + + restful.TraceLogger(log.New(os.Stdout, "[restful] ", log.LstdFlags|log.Lshortfile)) + +Logging + +The restful.SetLogger() method allows you to override the logger used by the package. By default restful +uses the standard library `log` package and logs to stdout. Different logging packages are supported as +long as they conform to `StdLogger` interface defined in the `log` sub-package, writing an adapter for your +preferred package is simple. + +Resources + +[project]: https://github.com/emicklei/go-restful + +[examples]: https://github.com/emicklei/go-restful/blob/master/examples + +[design]: http://ernestmicklei.com/2012/11/11/go-restful-api-design/ + +[showcases]: https://github.com/emicklei/mora, https://github.com/emicklei/landskape + +(c) 2012-2015, http://ernestmicklei.com. MIT License +*/ +package restful diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/entity_accessors.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/entity_accessors.go new file mode 100644 index 0000000000000..6ecf6c7f897b1 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/entity_accessors.go @@ -0,0 +1,163 @@ +package restful + +// Copyright 2015 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +import ( + "encoding/json" + "encoding/xml" + "strings" + "sync" +) + +// EntityReaderWriter can read and write values using an encoding such as JSON,XML. +type EntityReaderWriter interface { + // Read a serialized version of the value from the request. + // The Request may have a decompressing reader. Depends on Content-Encoding. + Read(req *Request, v interface{}) error + + // Write a serialized version of the value on the response. + // The Response may have a compressing writer. Depends on Accept-Encoding. + // status should be a valid Http Status code + Write(resp *Response, status int, v interface{}) error +} + +// entityAccessRegistry is a singleton +var entityAccessRegistry = &entityReaderWriters{ + protection: new(sync.RWMutex), + accessors: map[string]EntityReaderWriter{}, +} + +// entityReaderWriters associates MIME to an EntityReaderWriter +type entityReaderWriters struct { + protection *sync.RWMutex + accessors map[string]EntityReaderWriter +} + +func init() { + RegisterEntityAccessor(MIME_JSON, NewEntityAccessorJSON(MIME_JSON)) + RegisterEntityAccessor(MIME_XML, NewEntityAccessorXML(MIME_XML)) +} + +// RegisterEntityAccessor add/overrides the ReaderWriter for encoding content with this MIME type. +func RegisterEntityAccessor(mime string, erw EntityReaderWriter) { + entityAccessRegistry.protection.Lock() + defer entityAccessRegistry.protection.Unlock() + entityAccessRegistry.accessors[mime] = erw +} + +// NewEntityAccessorJSON returns a new EntityReaderWriter for accessing JSON content. +// This package is already initialized with such an accessor using the MIME_JSON contentType. +func NewEntityAccessorJSON(contentType string) EntityReaderWriter { + return entityJSONAccess{ContentType: contentType} +} + +// NewEntityAccessorXML returns a new EntityReaderWriter for accessing XML content. +// This package is already initialized with such an accessor using the MIME_XML contentType. +func NewEntityAccessorXML(contentType string) EntityReaderWriter { + return entityXMLAccess{ContentType: contentType} +} + +// accessorAt returns the registered ReaderWriter for this MIME type. +func (r *entityReaderWriters) accessorAt(mime string) (EntityReaderWriter, bool) { + r.protection.RLock() + defer r.protection.RUnlock() + er, ok := r.accessors[mime] + if !ok { + // retry with reverse lookup + // more expensive but we are in an exceptional situation anyway + for k, v := range r.accessors { + if strings.Contains(mime, k) { + return v, true + } + } + } + return er, ok +} + +// entityXMLAccess is a EntityReaderWriter for XML encoding +type entityXMLAccess struct { + // This is used for setting the Content-Type header when writing + ContentType string +} + +// Read unmarshalls the value from XML +func (e entityXMLAccess) Read(req *Request, v interface{}) error { + return xml.NewDecoder(req.Request.Body).Decode(v) +} + +// Write marshalls the value to JSON and set the Content-Type Header. +func (e entityXMLAccess) Write(resp *Response, status int, v interface{}) error { + return writeXML(resp, status, e.ContentType, v) +} + +// writeXML marshalls the value to JSON and set the Content-Type Header. +func writeXML(resp *Response, status int, contentType string, v interface{}) error { + if v == nil { + resp.WriteHeader(status) + // do not write a nil representation + return nil + } + if resp.prettyPrint { + // pretty output must be created and written explicitly + output, err := xml.MarshalIndent(v, " ", " ") + if err != nil { + return err + } + resp.Header().Set(HEADER_ContentType, contentType) + resp.WriteHeader(status) + _, err = resp.Write([]byte(xml.Header)) + if err != nil { + return err + } + _, err = resp.Write(output) + return err + } + // not-so-pretty + resp.Header().Set(HEADER_ContentType, contentType) + resp.WriteHeader(status) + return xml.NewEncoder(resp).Encode(v) +} + +// entityJSONAccess is a EntityReaderWriter for JSON encoding +type entityJSONAccess struct { + // This is used for setting the Content-Type header when writing + ContentType string +} + +// Read unmarshalls the value from JSON +func (e entityJSONAccess) Read(req *Request, v interface{}) error { + decoder := json.NewDecoder(req.Request.Body) + decoder.UseNumber() + return decoder.Decode(v) +} + +// Write marshalls the value to JSON and set the Content-Type Header. +func (e entityJSONAccess) Write(resp *Response, status int, v interface{}) error { + return writeJSON(resp, status, e.ContentType, v) +} + +// write marshalls the value to JSON and set the Content-Type Header. +func writeJSON(resp *Response, status int, contentType string, v interface{}) error { + if v == nil { + resp.WriteHeader(status) + // do not write a nil representation + return nil + } + if resp.prettyPrint { + // pretty output must be created and written explicitly + output, err := json.MarshalIndent(v, " ", " ") + if err != nil { + return err + } + resp.Header().Set(HEADER_ContentType, contentType) + resp.WriteHeader(status) + _, err = resp.Write(output) + return err + } + // not-so-pretty + resp.Header().Set(HEADER_ContentType, contentType) + resp.WriteHeader(status) + return json.NewEncoder(resp).Encode(v) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/filter.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/filter.go new file mode 100644 index 0000000000000..4b86656e17969 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/filter.go @@ -0,0 +1,26 @@ +package restful + +// Copyright 2013 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +// FilterChain is a request scoped object to process one or more filters before calling the target RouteFunction. +type FilterChain struct { + Filters []FilterFunction // ordered list of FilterFunction + Index int // index into filters that is currently in progress + Target RouteFunction // function to call after passing all filters +} + +// ProcessFilter passes the request,response pair through the next of Filters. +// Each filter can decide to proceed to the next Filter or handle the Response itself. +func (f *FilterChain) ProcessFilter(request *Request, response *Response) { + if f.Index < len(f.Filters) { + f.Index++ + f.Filters[f.Index-1](request, response, f) + } else { + f.Target(request, response) + } +} + +// FilterFunction definitions must call ProcessFilter on the FilterChain to pass on the control and eventually call the RouteFunction +type FilterFunction func(*Request, *Response, *FilterChain) diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/jsr311.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/jsr311.go new file mode 100644 index 0000000000000..511444ac6854a --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/jsr311.go @@ -0,0 +1,248 @@ +package restful + +// Copyright 2013 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +import ( + "errors" + "fmt" + "net/http" + "sort" +) + +// RouterJSR311 implements the flow for matching Requests to Routes (and consequently Resource Functions) +// as specified by the JSR311 http://jsr311.java.net/nonav/releases/1.1/spec/spec.html. +// RouterJSR311 implements the Router interface. +// Concept of locators is not implemented. +type RouterJSR311 struct{} + +// SelectRoute is part of the Router interface and returns the best match +// for the WebService and its Route for the given Request. +func (r RouterJSR311) SelectRoute( + webServices []*WebService, + httpRequest *http.Request) (selectedService *WebService, selectedRoute *Route, err error) { + + // Identify the root resource class (WebService) + dispatcher, finalMatch, err := r.detectDispatcher(httpRequest.URL.Path, webServices) + if err != nil { + return nil, nil, NewError(http.StatusNotFound, "") + } + // Obtain the set of candidate methods (Routes) + routes := r.selectRoutes(dispatcher, finalMatch) + if len(routes) == 0 { + return dispatcher, nil, NewError(http.StatusNotFound, "404: Page Not Found") + } + + // Identify the method (Route) that will handle the request + route, ok := r.detectRoute(routes, httpRequest) + return dispatcher, route, ok +} + +// http://jsr311.java.net/nonav/releases/1.1/spec/spec3.html#x3-360003.7.2 +func (r RouterJSR311) detectRoute(routes []Route, httpRequest *http.Request) (*Route, error) { + // http method + methodOk := []Route{} + for _, each := range routes { + if httpRequest.Method == each.Method { + methodOk = append(methodOk, each) + } + } + if len(methodOk) == 0 { + if trace { + traceLogger.Printf("no Route found (in %d routes) that matches HTTP method %s\n", len(routes), httpRequest.Method) + } + return nil, NewError(http.StatusMethodNotAllowed, "405: Method Not Allowed") + } + inputMediaOk := methodOk + + // content-type + contentType := httpRequest.Header.Get(HEADER_ContentType) + inputMediaOk = []Route{} + for _, each := range methodOk { + if each.matchesContentType(contentType) { + inputMediaOk = append(inputMediaOk, each) + } + } + if len(inputMediaOk) == 0 { + if trace { + traceLogger.Printf("no Route found (from %d) that matches HTTP Content-Type: %s\n", len(methodOk), contentType) + } + return nil, NewError(http.StatusUnsupportedMediaType, "415: Unsupported Media Type") + } + + // accept + outputMediaOk := []Route{} + accept := httpRequest.Header.Get(HEADER_Accept) + if len(accept) == 0 { + accept = "*/*" + } + for _, each := range inputMediaOk { + if each.matchesAccept(accept) { + outputMediaOk = append(outputMediaOk, each) + } + } + if len(outputMediaOk) == 0 { + if trace { + traceLogger.Printf("no Route found (from %d) that matches HTTP Accept: %s\n", len(inputMediaOk), accept) + } + return nil, NewError(http.StatusNotAcceptable, "406: Not Acceptable") + } + // return r.bestMatchByMedia(outputMediaOk, contentType, accept), nil + return &outputMediaOk[0], nil +} + +// http://jsr311.java.net/nonav/releases/1.1/spec/spec3.html#x3-360003.7.2 +// n/m > n/* > */* +func (r RouterJSR311) bestMatchByMedia(routes []Route, contentType string, accept string) *Route { + // TODO + return &routes[0] +} + +// http://jsr311.java.net/nonav/releases/1.1/spec/spec3.html#x3-360003.7.2 (step 2) +func (r RouterJSR311) selectRoutes(dispatcher *WebService, pathRemainder string) []Route { + filtered := &sortableRouteCandidates{} + for _, each := range dispatcher.Routes() { + pathExpr := each.pathExpr + matches := pathExpr.Matcher.FindStringSubmatch(pathRemainder) + if matches != nil { + lastMatch := matches[len(matches)-1] + if len(lastMatch) == 0 || lastMatch == "/" { // do not include if value is neither empty nor ‘/’. + filtered.candidates = append(filtered.candidates, + routeCandidate{each, len(matches) - 1, pathExpr.LiteralCount, pathExpr.VarCount}) + } + } + } + if len(filtered.candidates) == 0 { + if trace { + traceLogger.Printf("WebService on path %s has no routes that match URL path remainder:%s\n", dispatcher.rootPath, pathRemainder) + } + return []Route{} + } + sort.Sort(sort.Reverse(filtered)) + + // select other routes from candidates whoes expression matches rmatch + matchingRoutes := []Route{filtered.candidates[0].route} + for c := 1; c < len(filtered.candidates); c++ { + each := filtered.candidates[c] + if each.route.pathExpr.Matcher.MatchString(pathRemainder) { + matchingRoutes = append(matchingRoutes, each.route) + } + } + return matchingRoutes +} + +// http://jsr311.java.net/nonav/releases/1.1/spec/spec3.html#x3-360003.7.2 (step 1) +func (r RouterJSR311) detectDispatcher(requestPath string, dispatchers []*WebService) (*WebService, string, error) { + filtered := &sortableDispatcherCandidates{} + for _, each := range dispatchers { + matches := each.pathExpr.Matcher.FindStringSubmatch(requestPath) + if matches != nil { + filtered.candidates = append(filtered.candidates, + dispatcherCandidate{each, matches[len(matches)-1], len(matches), each.pathExpr.LiteralCount, each.pathExpr.VarCount}) + } + } + if len(filtered.candidates) == 0 { + if trace { + traceLogger.Printf("no WebService was found to match URL path:%s\n", requestPath) + } + return nil, "", errors.New("not found") + } + sort.Sort(sort.Reverse(filtered)) + return filtered.candidates[0].dispatcher, filtered.candidates[0].finalMatch, nil +} + +// Types and functions to support the sorting of Routes + +type routeCandidate struct { + route Route + matchesCount int // the number of capturing groups + literalCount int // the number of literal characters (means those not resulting from template variable substitution) + nonDefaultCount int // the number of capturing groups with non-default regular expressions (i.e. not ‘([^ /]+?)’) +} + +func (r routeCandidate) expressionToMatch() string { + return r.route.pathExpr.Source +} + +func (r routeCandidate) String() string { + return fmt.Sprintf("(m=%d,l=%d,n=%d)", r.matchesCount, r.literalCount, r.nonDefaultCount) +} + +type sortableRouteCandidates struct { + candidates []routeCandidate +} + +func (rcs *sortableRouteCandidates) Len() int { + return len(rcs.candidates) +} +func (rcs *sortableRouteCandidates) Swap(i, j int) { + rcs.candidates[i], rcs.candidates[j] = rcs.candidates[j], rcs.candidates[i] +} +func (rcs *sortableRouteCandidates) Less(i, j int) bool { + ci := rcs.candidates[i] + cj := rcs.candidates[j] + // primary key + if ci.literalCount < cj.literalCount { + return true + } + if ci.literalCount > cj.literalCount { + return false + } + // secundary key + if ci.matchesCount < cj.matchesCount { + return true + } + if ci.matchesCount > cj.matchesCount { + return false + } + // tertiary key + if ci.nonDefaultCount < cj.nonDefaultCount { + return true + } + if ci.nonDefaultCount > cj.nonDefaultCount { + return false + } + // quaternary key ("source" is interpreted as Path) + return ci.route.Path < cj.route.Path +} + +// Types and functions to support the sorting of Dispatchers + +type dispatcherCandidate struct { + dispatcher *WebService + finalMatch string + matchesCount int // the number of capturing groups + literalCount int // the number of literal characters (means those not resulting from template variable substitution) + nonDefaultCount int // the number of capturing groups with non-default regular expressions (i.e. not ‘([^ /]+?)’) +} +type sortableDispatcherCandidates struct { + candidates []dispatcherCandidate +} + +func (dc *sortableDispatcherCandidates) Len() int { + return len(dc.candidates) +} +func (dc *sortableDispatcherCandidates) Swap(i, j int) { + dc.candidates[i], dc.candidates[j] = dc.candidates[j], dc.candidates[i] +} +func (dc *sortableDispatcherCandidates) Less(i, j int) bool { + ci := dc.candidates[i] + cj := dc.candidates[j] + // primary key + if ci.matchesCount < cj.matchesCount { + return true + } + if ci.matchesCount > cj.matchesCount { + return false + } + // secundary key + if ci.literalCount < cj.literalCount { + return true + } + if ci.literalCount > cj.literalCount { + return false + } + // tertiary key + return ci.nonDefaultCount < cj.nonDefaultCount +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/log/log.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/log/log.go new file mode 100644 index 0000000000000..f70d89524ac35 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/log/log.go @@ -0,0 +1,31 @@ +package log + +import ( + stdlog "log" + "os" +) + +// Logger corresponds to a minimal subset of the interface satisfied by stdlib log.Logger +type StdLogger interface { + Print(v ...interface{}) + Printf(format string, v ...interface{}) +} + +var Logger StdLogger + +func init() { + // default Logger + SetLogger(stdlog.New(os.Stderr, "[restful] ", stdlog.LstdFlags|stdlog.Lshortfile)) +} + +func SetLogger(customLogger StdLogger) { + Logger = customLogger +} + +func Print(v ...interface{}) { + Logger.Print(v...) +} + +func Printf(format string, v ...interface{}) { + Logger.Printf(format, v...) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/logger.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/logger.go new file mode 100644 index 0000000000000..3f1c4db86bca6 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/logger.go @@ -0,0 +1,32 @@ +package restful + +// Copyright 2014 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. +import ( + "github.com/emicklei/go-restful/log" +) + +var trace bool = false +var traceLogger log.StdLogger + +func init() { + traceLogger = log.Logger // use the package logger by default +} + +// TraceLogger enables detailed logging of Http request matching and filter invocation. Default no logger is set. +// You may call EnableTracing() directly to enable trace logging to the package-wide logger. +func TraceLogger(logger log.StdLogger) { + traceLogger = logger + EnableTracing(logger != nil) +} + +// expose the setter for the global logger on the top-level package +func SetLogger(customLogger log.StdLogger) { + log.SetLogger(customLogger) +} + +// EnableTracing can be used to Trace logging on and off. +func EnableTracing(enabled bool) { + trace = enabled +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/mime.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/mime.go new file mode 100644 index 0000000000000..d7ea2b6157949 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/mime.go @@ -0,0 +1,45 @@ +package restful + +import ( + "strconv" + "strings" +) + +type mime struct { + media string + quality float64 +} + +// insertMime adds a mime to a list and keeps it sorted by quality. +func insertMime(l []mime, e mime) []mime { + for i, each := range l { + // if current mime has lower quality then insert before + if e.quality > each.quality { + left := append([]mime{}, l[0:i]...) + return append(append(left, e), l[i:]...) + } + } + return append(l, e) +} + +// sortedMimes returns a list of mime sorted (desc) by its specified quality. +func sortedMimes(accept string) (sorted []mime) { + for _, each := range strings.Split(accept, ",") { + typeAndQuality := strings.Split(strings.Trim(each, " "), ";") + if len(typeAndQuality) == 1 { + sorted = insertMime(sorted, mime{typeAndQuality[0], 1.0}) + } else { + // take factor + parts := strings.Split(typeAndQuality[1], "=") + if len(parts) == 2 { + f, err := strconv.ParseFloat(parts[1], 64) + if err != nil { + traceLogger.Printf("unable to parse quality in %s, %v", each, err) + } else { + sorted = insertMime(sorted, mime{typeAndQuality[0], f}) + } + } + } + } + return +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/options_filter.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/options_filter.go new file mode 100644 index 0000000000000..4514eadcfaa9a --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/options_filter.go @@ -0,0 +1,26 @@ +package restful + +import "strings" + +// Copyright 2013 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +// OPTIONSFilter is a filter function that inspects the Http Request for the OPTIONS method +// and provides the response with a set of allowed methods for the request URL Path. +// As for any filter, you can also install it for a particular WebService within a Container. +// Note: this filter is not needed when using CrossOriginResourceSharing (for CORS). +func (c *Container) OPTIONSFilter(req *Request, resp *Response, chain *FilterChain) { + if "OPTIONS" != req.Request.Method { + chain.ProcessFilter(req, resp) + return + } + resp.AddHeader(HEADER_Allow, strings.Join(c.computeAllowedMethods(req), ",")) +} + +// OPTIONSFilter is a filter function that inspects the Http Request for the OPTIONS method +// and provides the response with a set of allowed methods for the request URL Path. +// Note: this filter is not needed when using CrossOriginResourceSharing (for CORS). +func OPTIONSFilter() FilterFunction { + return DefaultContainer.OPTIONSFilter +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/parameter.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/parameter.go new file mode 100644 index 0000000000000..e11c8162a71de --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/parameter.go @@ -0,0 +1,114 @@ +package restful + +// Copyright 2013 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +const ( + // PathParameterKind = indicator of Request parameter type "path" + PathParameterKind = iota + + // QueryParameterKind = indicator of Request parameter type "query" + QueryParameterKind + + // BodyParameterKind = indicator of Request parameter type "body" + BodyParameterKind + + // HeaderParameterKind = indicator of Request parameter type "header" + HeaderParameterKind + + // FormParameterKind = indicator of Request parameter type "form" + FormParameterKind +) + +// Parameter is for documententing the parameter used in a Http Request +// ParameterData kinds are Path,Query and Body +type Parameter struct { + data *ParameterData +} + +// ParameterData represents the state of a Parameter. +// It is made public to make it accessible to e.g. the Swagger package. +type ParameterData struct { + Name, Description, DataType, DataFormat string + Kind int + Required bool + AllowableValues map[string]string + AllowMultiple bool + DefaultValue string +} + +// Data returns the state of the Parameter +func (p *Parameter) Data() ParameterData { + return *p.data +} + +// Kind returns the parameter type indicator (see const for valid values) +func (p *Parameter) Kind() int { + return p.data.Kind +} + +func (p *Parameter) bePath() *Parameter { + p.data.Kind = PathParameterKind + return p +} +func (p *Parameter) beQuery() *Parameter { + p.data.Kind = QueryParameterKind + return p +} +func (p *Parameter) beBody() *Parameter { + p.data.Kind = BodyParameterKind + return p +} + +func (p *Parameter) beHeader() *Parameter { + p.data.Kind = HeaderParameterKind + return p +} + +func (p *Parameter) beForm() *Parameter { + p.data.Kind = FormParameterKind + return p +} + +// Required sets the required field and returns the receiver +func (p *Parameter) Required(required bool) *Parameter { + p.data.Required = required + return p +} + +// AllowMultiple sets the allowMultiple field and returns the receiver +func (p *Parameter) AllowMultiple(multiple bool) *Parameter { + p.data.AllowMultiple = multiple + return p +} + +// AllowableValues sets the allowableValues field and returns the receiver +func (p *Parameter) AllowableValues(values map[string]string) *Parameter { + p.data.AllowableValues = values + return p +} + +// DataType sets the dataType field and returns the receiver +func (p *Parameter) DataType(typeName string) *Parameter { + p.data.DataType = typeName + return p +} + +// DataFormat sets the dataFormat field for Swagger UI +func (p *Parameter) DataFormat(formatName string) *Parameter { + p.data.DataFormat = formatName + return p +} + +// DefaultValue sets the default value field and returns the receiver +func (p *Parameter) DefaultValue(stringRepresentation string) *Parameter { + p.data.DefaultValue = stringRepresentation + return p +} + +// Description sets the description value field and returns the receiver +func (p *Parameter) Description(doc string) *Parameter { + p.data.Description = doc + return p +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/path_expression.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/path_expression.go new file mode 100644 index 0000000000000..a921e6f22454e --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/path_expression.go @@ -0,0 +1,69 @@ +package restful + +// Copyright 2013 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +import ( + "bytes" + "fmt" + "regexp" + "strings" +) + +// PathExpression holds a compiled path expression (RegExp) needed to match against +// Http request paths and to extract path parameter values. +type pathExpression struct { + LiteralCount int // the number of literal characters (means those not resulting from template variable substitution) + VarCount int // the number of named parameters (enclosed by {}) in the path + Matcher *regexp.Regexp + Source string // Path as defined by the RouteBuilder + tokens []string +} + +// NewPathExpression creates a PathExpression from the input URL path. +// Returns an error if the path is invalid. +func newPathExpression(path string) (*pathExpression, error) { + expression, literalCount, varCount, tokens := templateToRegularExpression(path) + compiled, err := regexp.Compile(expression) + if err != nil { + return nil, err + } + return &pathExpression{literalCount, varCount, compiled, expression, tokens}, nil +} + +// http://jsr311.java.net/nonav/releases/1.1/spec/spec3.html#x3-370003.7.3 +func templateToRegularExpression(template string) (expression string, literalCount int, varCount int, tokens []string) { + var buffer bytes.Buffer + buffer.WriteString("^") + //tokens = strings.Split(template, "/") + tokens = tokenizePath(template) + for _, each := range tokens { + if each == "" { + continue + } + buffer.WriteString("/") + if strings.HasPrefix(each, "{") { + // check for regular expression in variable + colon := strings.Index(each, ":") + if colon != -1 { + // extract expression + paramExpr := strings.TrimSpace(each[colon+1 : len(each)-1]) + if paramExpr == "*" { // special case + buffer.WriteString("(.*)") + } else { + buffer.WriteString(fmt.Sprintf("(%s)", paramExpr)) // between colon and closing moustache + } + } else { + // plain var + buffer.WriteString("([^/]+?)") + } + varCount += 1 + } else { + literalCount += len(each) + encoded := each // TODO URI encode + buffer.WriteString(regexp.QuoteMeta(encoded)) + } + } + return strings.TrimRight(buffer.String(), "/") + "(/.*)?$", literalCount, varCount, tokens +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/request.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/request.go new file mode 100644 index 0000000000000..3e4234697d699 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/request.go @@ -0,0 +1,131 @@ +package restful + +// Copyright 2013 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +import ( + "bytes" + "compress/zlib" + "io/ioutil" + "net/http" +) + +var defaultRequestContentType string + +var doCacheReadEntityBytes = true + +// Request is a wrapper for a http Request that provides convenience methods +type Request struct { + Request *http.Request + bodyContent *[]byte // to cache the request body for multiple reads of ReadEntity + pathParameters map[string]string + attributes map[string]interface{} // for storing request-scoped values + selectedRoutePath string // root path + route path that matched the request, e.g. /meetings/{id}/attendees +} + +func NewRequest(httpRequest *http.Request) *Request { + return &Request{ + Request: httpRequest, + pathParameters: map[string]string{}, + attributes: map[string]interface{}{}, + } // empty parameters, attributes +} + +// If ContentType is missing or */* is given then fall back to this type, otherwise +// a "Unable to unmarshal content of type:" response is returned. +// Valid values are restful.MIME_JSON and restful.MIME_XML +// Example: +// restful.DefaultRequestContentType(restful.MIME_JSON) +func DefaultRequestContentType(mime string) { + defaultRequestContentType = mime +} + +// SetCacheReadEntity controls whether the response data ([]byte) is cached such that ReadEntity is repeatable. +// Default is true (due to backwardcompatibility). For better performance, you should set it to false if you don't need it. +func SetCacheReadEntity(doCache bool) { + doCacheReadEntityBytes = doCache +} + +// PathParameter accesses the Path parameter value by its name +func (r *Request) PathParameter(name string) string { + return r.pathParameters[name] +} + +// PathParameters accesses the Path parameter values +func (r *Request) PathParameters() map[string]string { + return r.pathParameters +} + +// QueryParameter returns the (first) Query parameter value by its name +func (r *Request) QueryParameter(name string) string { + return r.Request.FormValue(name) +} + +// BodyParameter parses the body of the request (once for typically a POST or a PUT) and returns the value of the given name or an error. +func (r *Request) BodyParameter(name string) (string, error) { + err := r.Request.ParseForm() + if err != nil { + return "", err + } + return r.Request.PostFormValue(name), nil +} + +// HeaderParameter returns the HTTP Header value of a Header name or empty if missing +func (r *Request) HeaderParameter(name string) string { + return r.Request.Header.Get(name) +} + +// ReadEntity checks the Accept header and reads the content into the entityPointer. +func (r *Request) ReadEntity(entityPointer interface{}) (err error) { + contentType := r.Request.Header.Get(HEADER_ContentType) + contentEncoding := r.Request.Header.Get(HEADER_ContentEncoding) + + // OLD feature, cache the body for reads + if doCacheReadEntityBytes { + if r.bodyContent == nil { + data, err := ioutil.ReadAll(r.Request.Body) + if err != nil { + return err + } + r.bodyContent = &data + } + r.Request.Body = ioutil.NopCloser(bytes.NewReader(*r.bodyContent)) + } + + // check if the request body needs decompression + if ENCODING_GZIP == contentEncoding { + gzipReader := currentCompressorProvider.AcquireGzipReader() + defer currentCompressorProvider.ReleaseGzipReader(gzipReader) + gzipReader.Reset(r.Request.Body) + r.Request.Body = gzipReader + } else if ENCODING_DEFLATE == contentEncoding { + zlibReader, err := zlib.NewReader(r.Request.Body) + if err != nil { + return err + } + r.Request.Body = zlibReader + } + + // lookup the EntityReader + entityReader, ok := entityAccessRegistry.accessorAt(contentType) + if !ok { + return NewError(http.StatusBadRequest, "Unable to unmarshal content of type:"+contentType) + } + return entityReader.Read(r, entityPointer) +} + +// SetAttribute adds or replaces the attribute with the given value. +func (r *Request) SetAttribute(name string, value interface{}) { + r.attributes[name] = value +} + +// Attribute returns the value associated to the given name. Returns nil if absent. +func (r Request) Attribute(name string) interface{} { + return r.attributes[name] +} + +// SelectedRoutePath root path + route path that matched the request, e.g. /meetings/{id}/attendees +func (r Request) SelectedRoutePath() string { + return r.selectedRoutePath +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/response.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/response.go new file mode 100644 index 0000000000000..971cd0b42ced8 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/response.go @@ -0,0 +1,235 @@ +package restful + +// Copyright 2013 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +import ( + "errors" + "net/http" +) + +// DEPRECATED, use DefaultResponseContentType(mime) +var DefaultResponseMimeType string + +//PrettyPrintResponses controls the indentation feature of XML and JSON serialization +var PrettyPrintResponses = true + +// Response is a wrapper on the actual http ResponseWriter +// It provides several convenience methods to prepare and write response content. +type Response struct { + http.ResponseWriter + requestAccept string // mime-type what the Http Request says it wants to receive + routeProduces []string // mime-types what the Route says it can produce + statusCode int // HTTP status code that has been written explicity (if zero then net/http has written 200) + contentLength int // number of bytes written for the response body + prettyPrint bool // controls the indentation feature of XML and JSON serialization. It is initialized using var PrettyPrintResponses. + err error // err property is kept when WriteError is called +} + +// Creates a new response based on a http ResponseWriter. +func NewResponse(httpWriter http.ResponseWriter) *Response { + return &Response{httpWriter, "", []string{}, http.StatusOK, 0, PrettyPrintResponses, nil} // empty content-types +} + +// If Accept header matching fails, fall back to this type. +// Valid values are restful.MIME_JSON and restful.MIME_XML +// Example: +// restful.DefaultResponseContentType(restful.MIME_JSON) +func DefaultResponseContentType(mime string) { + DefaultResponseMimeType = mime +} + +// InternalServerError writes the StatusInternalServerError header. +// DEPRECATED, use WriteErrorString(http.StatusInternalServerError,reason) +func (r Response) InternalServerError() Response { + r.WriteHeader(http.StatusInternalServerError) + return r +} + +// PrettyPrint changes whether this response must produce pretty (line-by-line, indented) JSON or XML output. +func (r *Response) PrettyPrint(bePretty bool) { + r.prettyPrint = bePretty +} + +// AddHeader is a shortcut for .Header().Add(header,value) +func (r Response) AddHeader(header string, value string) Response { + r.Header().Add(header, value) + return r +} + +// SetRequestAccepts tells the response what Mime-type(s) the HTTP request said it wants to accept. Exposed for testing. +func (r *Response) SetRequestAccepts(mime string) { + r.requestAccept = mime +} + +// EntityWriter returns the registered EntityWriter that the entity (requested resource) +// can write according to what the request wants (Accept) and what the Route can produce or what the restful defaults say. +// If called before WriteEntity and WriteHeader then a false return value can be used to write a 406: Not Acceptable. +func (r *Response) EntityWriter() (EntityReaderWriter, bool) { + sorted := sortedMimes(r.requestAccept) + for _, eachAccept := range sorted { + for _, eachProduce := range r.routeProduces { + if eachProduce == eachAccept.media { + if w, ok := entityAccessRegistry.accessorAt(eachAccept.media); ok { + return w, true + } + } + } + if eachAccept.media == "*/*" { + for _, each := range r.routeProduces { + if w, ok := entityAccessRegistry.accessorAt(each); ok { + return w, true + } + } + } + } + // if requestAccept is empty + writer, ok := entityAccessRegistry.accessorAt(r.requestAccept) + if !ok { + // if not registered then fallback to the defaults (if set) + if DefaultResponseMimeType == MIME_JSON { + return entityAccessRegistry.accessorAt(MIME_JSON) + } + if DefaultResponseMimeType == MIME_XML { + return entityAccessRegistry.accessorAt(MIME_XML) + } + // Fallback to whatever the route says it can produce. + // https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html + for _, each := range r.routeProduces { + if w, ok := entityAccessRegistry.accessorAt(each); ok { + return w, true + } + } + if trace { + traceLogger.Printf("no registered EntityReaderWriter found for %s", r.requestAccept) + } + } + return writer, ok +} + +// WriteEntity calls WriteHeaderAndEntity with Http Status OK (200) +func (r *Response) WriteEntity(value interface{}) error { + return r.WriteHeaderAndEntity(http.StatusOK, value) +} + +// WriteHeaderAndEntity marshals the value using the representation denoted by the Accept Header and the registered EntityWriters. +// If no Accept header is specified (or */*) then respond with the Content-Type as specified by the first in the Route.Produces. +// If an Accept header is specified then respond with the Content-Type as specified by the first in the Route.Produces that is matched with the Accept header. +// If the value is nil then no response is send except for the Http status. You may want to call WriteHeader(http.StatusNotFound) instead. +// If there is no writer available that can represent the value in the requested MIME type then Http Status NotAcceptable is written. +// Current implementation ignores any q-parameters in the Accept Header. +// Returns an error if the value could not be written on the response. +func (r *Response) WriteHeaderAndEntity(status int, value interface{}) error { + writer, ok := r.EntityWriter() + if !ok { + r.WriteHeader(http.StatusNotAcceptable) + return nil + } + return writer.Write(r, status, value) +} + +// WriteAsXml is a convenience method for writing a value in xml (requires Xml tags on the value) +// It uses the standard encoding/xml package for marshalling the value ; not using a registered EntityReaderWriter. +func (r *Response) WriteAsXml(value interface{}) error { + return writeXML(r, http.StatusOK, MIME_XML, value) +} + +// WriteHeaderAndXml is a convenience method for writing a status and value in xml (requires Xml tags on the value) +// It uses the standard encoding/xml package for marshalling the value ; not using a registered EntityReaderWriter. +func (r *Response) WriteHeaderAndXml(status int, value interface{}) error { + return writeXML(r, status, MIME_XML, value) +} + +// WriteAsJson is a convenience method for writing a value in json. +// It uses the standard encoding/json package for marshalling the value ; not using a registered EntityReaderWriter. +func (r *Response) WriteAsJson(value interface{}) error { + return writeJSON(r, http.StatusOK, MIME_JSON, value) +} + +// WriteJson is a convenience method for writing a value in Json with a given Content-Type. +// It uses the standard encoding/json package for marshalling the value ; not using a registered EntityReaderWriter. +func (r *Response) WriteJson(value interface{}, contentType string) error { + return writeJSON(r, http.StatusOK, contentType, value) +} + +// WriteHeaderAndJson is a convenience method for writing the status and a value in Json with a given Content-Type. +// It uses the standard encoding/json package for marshalling the value ; not using a registered EntityReaderWriter. +func (r *Response) WriteHeaderAndJson(status int, value interface{}, contentType string) error { + return writeJSON(r, status, contentType, value) +} + +// WriteError write the http status and the error string on the response. +func (r *Response) WriteError(httpStatus int, err error) error { + r.err = err + return r.WriteErrorString(httpStatus, err.Error()) +} + +// WriteServiceError is a convenience method for a responding with a status and a ServiceError +func (r *Response) WriteServiceError(httpStatus int, err ServiceError) error { + r.err = err + return r.WriteHeaderAndEntity(httpStatus, err) +} + +// WriteErrorString is a convenience method for an error status with the actual error +func (r *Response) WriteErrorString(httpStatus int, errorReason string) error { + if r.err == nil { + // if not called from WriteError + r.err = errors.New(errorReason) + } + r.WriteHeader(httpStatus) + if _, err := r.Write([]byte(errorReason)); err != nil { + return err + } + return nil +} + +// Flush implements http.Flusher interface, which sends any buffered data to the client. +func (r *Response) Flush() { + if f, ok := r.ResponseWriter.(http.Flusher); ok { + f.Flush() + } else if trace { + traceLogger.Printf("ResponseWriter %v doesn't support Flush", r) + } +} + +// WriteHeader is overridden to remember the Status Code that has been written. +// Changes to the Header of the response have no effect after this. +func (r *Response) WriteHeader(httpStatus int) { + r.statusCode = httpStatus + r.ResponseWriter.WriteHeader(httpStatus) +} + +// StatusCode returns the code that has been written using WriteHeader. +func (r Response) StatusCode() int { + if 0 == r.statusCode { + // no status code has been written yet; assume OK + return http.StatusOK + } + return r.statusCode +} + +// Write writes the data to the connection as part of an HTTP reply. +// Write is part of http.ResponseWriter interface. +func (r *Response) Write(bytes []byte) (int, error) { + written, err := r.ResponseWriter.Write(bytes) + r.contentLength += written + return written, err +} + +// ContentLength returns the number of bytes written for the response content. +// Note that this value is only correct if all data is written through the Response using its Write* methods. +// Data written directly using the underlying http.ResponseWriter is not accounted for. +func (r Response) ContentLength() int { + return r.contentLength +} + +// CloseNotify is part of http.CloseNotifier interface +func (r Response) CloseNotify() <-chan bool { + return r.ResponseWriter.(http.CloseNotifier).CloseNotify() +} + +// Error returns the err created by WriteError +func (r Response) Error() error { + return r.err +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/route.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/route.go new file mode 100644 index 0000000000000..f54e8622e3f43 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/route.go @@ -0,0 +1,183 @@ +package restful + +// Copyright 2013 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +import ( + "bytes" + "net/http" + "strings" +) + +// RouteFunction declares the signature of a function that can be bound to a Route. +type RouteFunction func(*Request, *Response) + +// Route binds a HTTP Method,Path,Consumes combination to a RouteFunction. +type Route struct { + Method string + Produces []string + Consumes []string + Path string // webservice root path + described path + Function RouteFunction + Filters []FilterFunction + + // cached values for dispatching + relativePath string + pathParts []string + pathExpr *pathExpression // cached compilation of relativePath as RegExp + + // documentation + Doc string + Notes string + Operation string + ParameterDocs []*Parameter + ResponseErrors map[int]ResponseError + ReadSample, WriteSample interface{} // structs that model an example request or response payload +} + +// Initialize for Route +func (r *Route) postBuild() { + r.pathParts = tokenizePath(r.Path) +} + +// Create Request and Response from their http versions +func (r *Route) wrapRequestResponse(httpWriter http.ResponseWriter, httpRequest *http.Request) (*Request, *Response) { + params := r.extractParameters(httpRequest.URL.Path) + wrappedRequest := NewRequest(httpRequest) + wrappedRequest.pathParameters = params + wrappedRequest.selectedRoutePath = r.Path + wrappedResponse := NewResponse(httpWriter) + wrappedResponse.requestAccept = httpRequest.Header.Get(HEADER_Accept) + wrappedResponse.routeProduces = r.Produces + return wrappedRequest, wrappedResponse +} + +// dispatchWithFilters call the function after passing through its own filters +func (r *Route) dispatchWithFilters(wrappedRequest *Request, wrappedResponse *Response) { + if len(r.Filters) > 0 { + chain := FilterChain{Filters: r.Filters, Target: r.Function} + chain.ProcessFilter(wrappedRequest, wrappedResponse) + } else { + // unfiltered + r.Function(wrappedRequest, wrappedResponse) + } +} + +// Return whether the mimeType matches to what this Route can produce. +func (r Route) matchesAccept(mimeTypesWithQuality string) bool { + parts := strings.Split(mimeTypesWithQuality, ",") + for _, each := range parts { + var withoutQuality string + if strings.Contains(each, ";") { + withoutQuality = strings.Split(each, ";")[0] + } else { + withoutQuality = each + } + // trim before compare + withoutQuality = strings.Trim(withoutQuality, " ") + if withoutQuality == "*/*" { + return true + } + for _, producibleType := range r.Produces { + if producibleType == "*/*" || producibleType == withoutQuality { + return true + } + } + } + return false +} + +// Return whether this Route can consume content with a type specified by mimeTypes (can be empty). +func (r Route) matchesContentType(mimeTypes string) bool { + + if len(r.Consumes) == 0 { + // did not specify what it can consume ; any media type (“*/*”) is assumed + return true + } + + if len(mimeTypes) == 0 { + // idempotent methods with (most-likely or garanteed) empty content match missing Content-Type + m := r.Method + if m == "GET" || m == "HEAD" || m == "OPTIONS" || m == "DELETE" || m == "TRACE" { + return true + } + // proceed with default + mimeTypes = MIME_OCTET + } + + parts := strings.Split(mimeTypes, ",") + for _, each := range parts { + var contentType string + if strings.Contains(each, ";") { + contentType = strings.Split(each, ";")[0] + } else { + contentType = each + } + // trim before compare + contentType = strings.Trim(contentType, " ") + for _, consumeableType := range r.Consumes { + if consumeableType == "*/*" || consumeableType == contentType { + return true + } + } + } + return false +} + +// Extract the parameters from the request url path +func (r Route) extractParameters(urlPath string) map[string]string { + urlParts := tokenizePath(urlPath) + pathParameters := map[string]string{} + for i, key := range r.pathParts { + var value string + if i >= len(urlParts) { + value = "" + } else { + value = urlParts[i] + } + if strings.HasPrefix(key, "{") { // path-parameter + if colon := strings.Index(key, ":"); colon != -1 { + // extract by regex + regPart := key[colon+1 : len(key)-1] + keyPart := key[1:colon] + if regPart == "*" { + pathParameters[keyPart] = untokenizePath(i, urlParts) + break + } else { + pathParameters[keyPart] = value + } + } else { + // without enclosing {} + pathParameters[key[1:len(key)-1]] = value + } + } + } + return pathParameters +} + +// Untokenize back into an URL path using the slash separator +func untokenizePath(offset int, parts []string) string { + var buffer bytes.Buffer + for p := offset; p < len(parts); p++ { + buffer.WriteString(parts[p]) + // do not end + if p < len(parts)-1 { + buffer.WriteString("/") + } + } + return buffer.String() +} + +// Tokenize an URL path using the slash separator ; the result does not have empty tokens +func tokenizePath(path string) []string { + if "/" == path { + return []string{} + } + return strings.Split(strings.Trim(path, "/"), "/") +} + +// for debugging +func (r Route) String() string { + return r.Method + " " + r.Path +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/route_builder.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/route_builder.go new file mode 100644 index 0000000000000..8bc1ab684621f --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/route_builder.go @@ -0,0 +1,240 @@ +package restful + +// Copyright 2013 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +import ( + "os" + "reflect" + "runtime" + "strings" + + "github.com/emicklei/go-restful/log" +) + +// RouteBuilder is a helper to construct Routes. +type RouteBuilder struct { + rootPath string + currentPath string + produces []string + consumes []string + httpMethod string // required + function RouteFunction // required + filters []FilterFunction + // documentation + doc string + notes string + operation string + readSample, writeSample interface{} + parameters []*Parameter + errorMap map[int]ResponseError +} + +// Do evaluates each argument with the RouteBuilder itself. +// This allows you to follow DRY principles without breaking the fluent programming style. +// Example: +// ws.Route(ws.DELETE("/{name}").To(t.deletePerson).Do(Returns200, Returns500)) +// +// func Returns500(b *RouteBuilder) { +// b.Returns(500, "Internal Server Error", restful.ServiceError{}) +// } +func (b *RouteBuilder) Do(oneArgBlocks ...func(*RouteBuilder)) *RouteBuilder { + for _, each := range oneArgBlocks { + each(b) + } + return b +} + +// To bind the route to a function. +// If this route is matched with the incoming Http Request then call this function with the *Request,*Response pair. Required. +func (b *RouteBuilder) To(function RouteFunction) *RouteBuilder { + b.function = function + return b +} + +// Method specifies what HTTP method to match. Required. +func (b *RouteBuilder) Method(method string) *RouteBuilder { + b.httpMethod = method + return b +} + +// Produces specifies what MIME types can be produced ; the matched one will appear in the Content-Type Http header. +func (b *RouteBuilder) Produces(mimeTypes ...string) *RouteBuilder { + b.produces = mimeTypes + return b +} + +// Consumes specifies what MIME types can be consumes ; the Accept Http header must matched any of these +func (b *RouteBuilder) Consumes(mimeTypes ...string) *RouteBuilder { + b.consumes = mimeTypes + return b +} + +// Path specifies the relative (w.r.t WebService root path) URL path to match. Default is "/". +func (b *RouteBuilder) Path(subPath string) *RouteBuilder { + b.currentPath = subPath + return b +} + +// Doc tells what this route is all about. Optional. +func (b *RouteBuilder) Doc(documentation string) *RouteBuilder { + b.doc = documentation + return b +} + +// A verbose explanation of the operation behavior. Optional. +func (b *RouteBuilder) Notes(notes string) *RouteBuilder { + b.notes = notes + return b +} + +// Reads tells what resource type will be read from the request payload. Optional. +// A parameter of type "body" is added ,required is set to true and the dataType is set to the qualified name of the sample's type. +func (b *RouteBuilder) Reads(sample interface{}) *RouteBuilder { + b.readSample = sample + typeAsName := reflect.TypeOf(sample).String() + bodyParameter := &Parameter{&ParameterData{Name: "body"}} + bodyParameter.beBody() + bodyParameter.Required(true) + bodyParameter.DataType(typeAsName) + b.Param(bodyParameter) + return b +} + +// ParameterNamed returns a Parameter already known to the RouteBuilder. Returns nil if not. +// Use this to modify or extend information for the Parameter (through its Data()). +func (b RouteBuilder) ParameterNamed(name string) (p *Parameter) { + for _, each := range b.parameters { + if each.Data().Name == name { + return each + } + } + return p +} + +// Writes tells what resource type will be written as the response payload. Optional. +func (b *RouteBuilder) Writes(sample interface{}) *RouteBuilder { + b.writeSample = sample + return b +} + +// Param allows you to document the parameters of the Route. It adds a new Parameter (does not check for duplicates). +func (b *RouteBuilder) Param(parameter *Parameter) *RouteBuilder { + if b.parameters == nil { + b.parameters = []*Parameter{} + } + b.parameters = append(b.parameters, parameter) + return b +} + +// Operation allows you to document what the actual method/function call is of the Route. +// Unless called, the operation name is derived from the RouteFunction set using To(..). +func (b *RouteBuilder) Operation(name string) *RouteBuilder { + b.operation = name + return b +} + +// ReturnsError is deprecated, use Returns instead. +func (b *RouteBuilder) ReturnsError(code int, message string, model interface{}) *RouteBuilder { + log.Print("ReturnsError is deprecated, use Returns instead.") + return b.Returns(code, message, model) +} + +// Returns allows you to document what responses (errors or regular) can be expected. +// The model parameter is optional ; either pass a struct instance or use nil if not applicable. +func (b *RouteBuilder) Returns(code int, message string, model interface{}) *RouteBuilder { + err := ResponseError{ + Code: code, + Message: message, + Model: model, + } + // lazy init because there is no NewRouteBuilder (yet) + if b.errorMap == nil { + b.errorMap = map[int]ResponseError{} + } + b.errorMap[code] = err + return b +} + +type ResponseError struct { + Code int + Message string + Model interface{} +} + +func (b *RouteBuilder) servicePath(path string) *RouteBuilder { + b.rootPath = path + return b +} + +// Filter appends a FilterFunction to the end of filters for this Route to build. +func (b *RouteBuilder) Filter(filter FilterFunction) *RouteBuilder { + b.filters = append(b.filters, filter) + return b +} + +// If no specific Route path then set to rootPath +// If no specific Produces then set to rootProduces +// If no specific Consumes then set to rootConsumes +func (b *RouteBuilder) copyDefaults(rootProduces, rootConsumes []string) { + if len(b.produces) == 0 { + b.produces = rootProduces + } + if len(b.consumes) == 0 { + b.consumes = rootConsumes + } +} + +// Build creates a new Route using the specification details collected by the RouteBuilder +func (b *RouteBuilder) Build() Route { + pathExpr, err := newPathExpression(b.currentPath) + if err != nil { + log.Printf("[restful] Invalid path:%s because:%v", b.currentPath, err) + os.Exit(1) + } + if b.function == nil { + log.Printf("[restful] No function specified for route:" + b.currentPath) + os.Exit(1) + } + operationName := b.operation + if len(operationName) == 0 && b.function != nil { + // extract from definition + operationName = nameOfFunction(b.function) + } + route := Route{ + Method: b.httpMethod, + Path: concatPath(b.rootPath, b.currentPath), + Produces: b.produces, + Consumes: b.consumes, + Function: b.function, + Filters: b.filters, + relativePath: b.currentPath, + pathExpr: pathExpr, + Doc: b.doc, + Notes: b.notes, + Operation: operationName, + ParameterDocs: b.parameters, + ResponseErrors: b.errorMap, + ReadSample: b.readSample, + WriteSample: b.writeSample} + route.postBuild() + return route +} + +func concatPath(path1, path2 string) string { + return strings.TrimRight(path1, "/") + "/" + strings.TrimLeft(path2, "/") +} + +// nameOfFunction returns the short name of the function f for documentation. +// It uses a runtime feature for debugging ; its value may change for later Go versions. +func nameOfFunction(f interface{}) string { + fun := runtime.FuncForPC(reflect.ValueOf(f).Pointer()) + tokenized := strings.Split(fun.Name(), ".") + last := tokenized[len(tokenized)-1] + last = strings.TrimSuffix(last, ")·fm") // < Go 1.5 + last = strings.TrimSuffix(last, ")-fm") // Go 1.5 + last = strings.TrimSuffix(last, "·fm") // < Go 1.5 + last = strings.TrimSuffix(last, "-fm") // Go 1.5 + return last +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/router.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/router.go new file mode 100644 index 0000000000000..9b32fb67530aa --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/router.go @@ -0,0 +1,18 @@ +package restful + +// Copyright 2013 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +import "net/http" + +// A RouteSelector finds the best matching Route given the input HTTP Request +type RouteSelector interface { + + // SelectRoute finds a Route given the input HTTP Request and a list of WebServices. + // It returns a selected Route and its containing WebService or an error indicating + // a problem. + SelectRoute( + webServices []*WebService, + httpRequest *http.Request) (selectedService *WebService, selected *Route, err error) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/service_error.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/service_error.go new file mode 100644 index 0000000000000..62d1108bbdaf3 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/service_error.go @@ -0,0 +1,23 @@ +package restful + +// Copyright 2013 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +import "fmt" + +// ServiceError is a transport object to pass information about a non-Http error occurred in a WebService while processing a request. +type ServiceError struct { + Code int + Message string +} + +// NewError returns a ServiceError using the code and reason +func NewError(code int, message string) ServiceError { + return ServiceError{Code: code, Message: message} +} + +// Error returns a text representation of the service error +func (s ServiceError) Error() string { + return fmt.Sprintf("[ServiceError:%v] %v", s.Code, s.Message) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/CHANGES.md b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/CHANGES.md new file mode 100644 index 0000000000000..736f6f37c56a7 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/CHANGES.md @@ -0,0 +1,43 @@ +Change history of swagger += +2015-10-16 +- add type override mechanism for swagger models (MR 254, nathanejohnson) +- replace uses of wildcard in generated apidocs (issue 251) + +2015-05-25 +- (api break) changed the type of Properties in Model +- (api break) changed the type of Models in ApiDeclaration +- (api break) changed the parameter type of PostBuildDeclarationMapFunc + +2015-04-09 +- add ModelBuildable interface for customization of Model + +2015-03-17 +- preserve order of Routes per WebService in Swagger listing +- fix use of $ref and type in Swagger models +- add api version to listing + +2014-11-14 +- operation parameters are now sorted using ordering path,query,form,header,body + +2014-11-12 +- respect omitempty tag value for embedded structs +- expose ApiVersion of WebService to Swagger ApiDeclaration + +2014-05-29 +- (api add) Ability to define custom http.Handler to serve swagger-ui static files + +2014-05-04 +- (fix) include model for array element type of response + +2014-01-03 +- (fix) do not add primitive type to the Api models + +2013-11-27 +- (fix) make Swagger work for WebServices with root ("/" or "") paths + +2013-10-29 +- (api add) package variable LogInfo to customize logging function + +2013-10-15 +- upgraded to spec version 1.2 (https://github.com/wordnik/swagger-core/wiki/1.2-transition) \ No newline at end of file diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/api_declaration_list.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/api_declaration_list.go new file mode 100644 index 0000000000000..9f4c3690acb8e --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/api_declaration_list.go @@ -0,0 +1,64 @@ +package swagger + +// Copyright 2015 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +import ( + "bytes" + "encoding/json" +) + +// ApiDeclarationList maintains an ordered list of ApiDeclaration. +type ApiDeclarationList struct { + List []ApiDeclaration +} + +// At returns the ApiDeclaration by its path unless absent, then ok is false +func (l *ApiDeclarationList) At(path string) (a ApiDeclaration, ok bool) { + for _, each := range l.List { + if each.ResourcePath == path { + return each, true + } + } + return a, false +} + +// Put adds or replaces a ApiDeclaration with this name +func (l *ApiDeclarationList) Put(path string, a ApiDeclaration) { + // maybe replace existing + for i, each := range l.List { + if each.ResourcePath == path { + // replace + l.List[i] = a + return + } + } + // add + l.List = append(l.List, a) +} + +// Do enumerates all the properties, each with its assigned name +func (l *ApiDeclarationList) Do(block func(path string, decl ApiDeclaration)) { + for _, each := range l.List { + block(each.ResourcePath, each) + } +} + +// MarshalJSON writes the ModelPropertyList as if it was a map[string]ModelProperty +func (l ApiDeclarationList) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + encoder := json.NewEncoder(&buf) + buf.WriteString("{\n") + for i, each := range l.List { + buf.WriteString("\"") + buf.WriteString(each.ResourcePath) + buf.WriteString("\": ") + encoder.Encode(each) + if i < len(l.List)-1 { + buf.WriteString(",\n") + } + } + buf.WriteString("}") + return buf.Bytes(), nil +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/config.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/config.go new file mode 100644 index 0000000000000..510d6fc133aa8 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/config.go @@ -0,0 +1,38 @@ +package swagger + +import ( + "net/http" + + "github.com/emicklei/go-restful" +) + +// PostBuildDeclarationMapFunc can be used to modify the api declaration map. +type PostBuildDeclarationMapFunc func(apiDeclarationMap *ApiDeclarationList) + +type MapSchemaFormatFunc func(typeName string) string + +type Config struct { + // url where the services are available, e.g. http://localhost:8080 + // if left empty then the basePath of Swagger is taken from the actual request + WebServicesUrl string + // path where the JSON api is avaiable , e.g. /apidocs + ApiPath string + // [optional] path where the swagger UI will be served, e.g. /swagger + SwaggerPath string + // [optional] location of folder containing Swagger HTML5 application index.html + SwaggerFilePath string + // api listing is constructed from this list of restful WebServices. + WebServices []*restful.WebService + // will serve all static content (scripts,pages,images) + StaticHandler http.Handler + // [optional] on default CORS (Cross-Origin-Resource-Sharing) is enabled. + DisableCORS bool + // Top-level API version. Is reflected in the resource listing. + ApiVersion string + // If set then call this handler after building the complete ApiDeclaration Map + PostBuildHandler PostBuildDeclarationMapFunc + // Swagger global info struct + Info Info + // [optional] If set, model builder should call this handler to get addition typename-to-swagger-format-field convertion. + SchemaFormatHandler MapSchemaFormatFunc +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/model_builder.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/model_builder.go new file mode 100644 index 0000000000000..085b6ab9cea12 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/model_builder.go @@ -0,0 +1,436 @@ +package swagger + +import ( + "encoding/json" + "reflect" + "strings" +) + +// ModelBuildable is used for extending Structs that need more control over +// how the Model appears in the Swagger api declaration. +type ModelBuildable interface { + PostBuildModel(m *Model) *Model +} + +type modelBuilder struct { + Models *ModelList + Config *Config +} + +type documentable interface { + SwaggerDoc() map[string]string +} + +// Check if this structure has a method with signature func () SwaggerDoc() map[string]string +// If it exists, retrive the documentation and overwrite all struct tag descriptions +func getDocFromMethodSwaggerDoc2(model reflect.Type) map[string]string { + if docable, ok := reflect.New(model).Elem().Interface().(documentable); ok { + return docable.SwaggerDoc() + } + return make(map[string]string) +} + +// addModelFrom creates and adds a Model to the builder and detects and calls +// the post build hook for customizations +func (b modelBuilder) addModelFrom(sample interface{}) { + if modelOrNil := b.addModel(reflect.TypeOf(sample), ""); modelOrNil != nil { + // allow customizations + if buildable, ok := sample.(ModelBuildable); ok { + modelOrNil = buildable.PostBuildModel(modelOrNil) + b.Models.Put(modelOrNil.Id, *modelOrNil) + } + } +} + +func (b modelBuilder) addModel(st reflect.Type, nameOverride string) *Model { + modelName := b.keyFrom(st) + if nameOverride != "" { + modelName = nameOverride + } + // no models needed for primitive types + if b.isPrimitiveType(modelName) { + return nil + } + // see if we already have visited this model + if _, ok := b.Models.At(modelName); ok { + return nil + } + sm := Model{ + Id: modelName, + Required: []string{}, + Properties: ModelPropertyList{}} + + // reference the model before further initializing (enables recursive structs) + b.Models.Put(modelName, sm) + + // check for slice or array + if st.Kind() == reflect.Slice || st.Kind() == reflect.Array { + b.addModel(st.Elem(), "") + return &sm + } + // check for structure or primitive type + if st.Kind() != reflect.Struct { + return &sm + } + + fullDoc := getDocFromMethodSwaggerDoc2(st) + modelDescriptions := []string{} + + for i := 0; i < st.NumField(); i++ { + field := st.Field(i) + jsonName, modelDescription, prop := b.buildProperty(field, &sm, modelName) + if len(modelDescription) > 0 { + modelDescriptions = append(modelDescriptions, modelDescription) + } + + // add if not omitted + if len(jsonName) != 0 { + // update description + if fieldDoc, ok := fullDoc[jsonName]; ok { + prop.Description = fieldDoc + } + // update Required + if b.isPropertyRequired(field) { + sm.Required = append(sm.Required, jsonName) + } + sm.Properties.Put(jsonName, prop) + } + } + + // We always overwrite documentation if SwaggerDoc method exists + // "" is special for documenting the struct itself + if modelDoc, ok := fullDoc[""]; ok { + sm.Description = modelDoc + } else if len(modelDescriptions) != 0 { + sm.Description = strings.Join(modelDescriptions, "\n") + } + + // update model builder with completed model + b.Models.Put(modelName, sm) + + return &sm +} + +func (b modelBuilder) isPropertyRequired(field reflect.StructField) bool { + required := true + if jsonTag := field.Tag.Get("json"); jsonTag != "" { + s := strings.Split(jsonTag, ",") + if len(s) > 1 && s[1] == "omitempty" { + return false + } + } + return required +} + +func (b modelBuilder) buildProperty(field reflect.StructField, model *Model, modelName string) (jsonName, modelDescription string, prop ModelProperty) { + jsonName = b.jsonNameOfField(field) + if len(jsonName) == 0 { + // empty name signals skip property + return "", "", prop + } + + if tag := field.Tag.Get("modelDescription"); tag != "" { + modelDescription = tag + } + + prop.setPropertyMetadata(field) + if prop.Type != nil { + return jsonName, modelDescription, prop + } + fieldType := field.Type + + // check if type is doing its own marshalling + marshalerType := reflect.TypeOf((*json.Marshaler)(nil)).Elem() + if fieldType.Implements(marshalerType) { + var pType = "string" + if prop.Type == nil { + prop.Type = &pType + } + if prop.Format == "" { + prop.Format = b.jsonSchemaFormat(fieldType.String()) + } + return jsonName, modelDescription, prop + } + + // check if annotation says it is a string + if jsonTag := field.Tag.Get("json"); jsonTag != "" { + s := strings.Split(jsonTag, ",") + if len(s) > 1 && s[1] == "string" { + stringt := "string" + prop.Type = &stringt + return jsonName, modelDescription, prop + } + } + + fieldKind := fieldType.Kind() + switch { + case fieldKind == reflect.Struct: + jsonName, prop := b.buildStructTypeProperty(field, jsonName, model) + return jsonName, modelDescription, prop + case fieldKind == reflect.Slice || fieldKind == reflect.Array: + jsonName, prop := b.buildArrayTypeProperty(field, jsonName, modelName) + return jsonName, modelDescription, prop + case fieldKind == reflect.Ptr: + jsonName, prop := b.buildPointerTypeProperty(field, jsonName, modelName) + return jsonName, modelDescription, prop + case fieldKind == reflect.String: + stringt := "string" + prop.Type = &stringt + return jsonName, modelDescription, prop + case fieldKind == reflect.Map: + // if it's a map, it's unstructured, and swagger 1.2 can't handle it + objectType := "object" + prop.Type = &objectType + return jsonName, modelDescription, prop + } + + if b.isPrimitiveType(fieldType.String()) { + mapped := b.jsonSchemaType(fieldType.String()) + prop.Type = &mapped + prop.Format = b.jsonSchemaFormat(fieldType.String()) + return jsonName, modelDescription, prop + } + modelType := fieldType.String() + prop.Ref = &modelType + + if fieldType.Name() == "" { // override type of anonymous structs + nestedTypeName := modelName + "." + jsonName + prop.Ref = &nestedTypeName + b.addModel(fieldType, nestedTypeName) + } + return jsonName, modelDescription, prop +} + +func hasNamedJSONTag(field reflect.StructField) bool { + parts := strings.Split(field.Tag.Get("json"), ",") + if len(parts) == 0 { + return false + } + for _, s := range parts[1:] { + if s == "inline" { + return false + } + } + return len(parts[0]) > 0 +} + +func (b modelBuilder) buildStructTypeProperty(field reflect.StructField, jsonName string, model *Model) (nameJson string, prop ModelProperty) { + prop.setPropertyMetadata(field) + // Check for type override in tag + if prop.Type != nil { + return jsonName, prop + } + fieldType := field.Type + // check for anonymous + if len(fieldType.Name()) == 0 { + // anonymous + anonType := model.Id + "." + jsonName + b.addModel(fieldType, anonType) + prop.Ref = &anonType + return jsonName, prop + } + + if field.Name == fieldType.Name() && field.Anonymous && !hasNamedJSONTag(field) { + // embedded struct + sub := modelBuilder{new(ModelList), b.Config} + sub.addModel(fieldType, "") + subKey := sub.keyFrom(fieldType) + // merge properties from sub + subModel, _ := sub.Models.At(subKey) + subModel.Properties.Do(func(k string, v ModelProperty) { + model.Properties.Put(k, v) + // if subModel says this property is required then include it + required := false + for _, each := range subModel.Required { + if k == each { + required = true + break + } + } + if required { + model.Required = append(model.Required, k) + } + }) + // add all new referenced models + sub.Models.Do(func(key string, sub Model) { + if key != subKey { + if _, ok := b.Models.At(key); !ok { + b.Models.Put(key, sub) + } + } + }) + // empty name signals skip property + return "", prop + } + // simple struct + b.addModel(fieldType, "") + var pType = fieldType.String() + prop.Ref = &pType + return jsonName, prop +} + +func (b modelBuilder) buildArrayTypeProperty(field reflect.StructField, jsonName, modelName string) (nameJson string, prop ModelProperty) { + // check for type override in tags + prop.setPropertyMetadata(field) + if prop.Type != nil { + return jsonName, prop + } + fieldType := field.Type + var pType = "array" + prop.Type = &pType + isPrimitive := b.isPrimitiveType(fieldType.Elem().Name()) + elemTypeName := b.getElementTypeName(modelName, jsonName, fieldType.Elem()) + prop.Items = new(Item) + if isPrimitive { + mapped := b.jsonSchemaType(elemTypeName) + prop.Items.Type = &mapped + } else { + prop.Items.Ref = &elemTypeName + } + // add|overwrite model for element type + if fieldType.Elem().Kind() == reflect.Ptr { + fieldType = fieldType.Elem() + } + if !isPrimitive { + b.addModel(fieldType.Elem(), elemTypeName) + } + return jsonName, prop +} + +func (b modelBuilder) buildPointerTypeProperty(field reflect.StructField, jsonName, modelName string) (nameJson string, prop ModelProperty) { + prop.setPropertyMetadata(field) + // Check for type override in tags + if prop.Type != nil { + return jsonName, prop + } + fieldType := field.Type + + // override type of pointer to list-likes + if fieldType.Elem().Kind() == reflect.Slice || fieldType.Elem().Kind() == reflect.Array { + var pType = "array" + prop.Type = &pType + isPrimitive := b.isPrimitiveType(fieldType.Elem().Elem().Name()) + elemName := b.getElementTypeName(modelName, jsonName, fieldType.Elem().Elem()) + if isPrimitive { + primName := b.jsonSchemaType(elemName) + prop.Items = &Item{Ref: &primName} + } else { + prop.Items = &Item{Ref: &elemName} + } + if !isPrimitive { + // add|overwrite model for element type + b.addModel(fieldType.Elem().Elem(), elemName) + } + } else { + // non-array, pointer type + var pType = b.jsonSchemaType(fieldType.String()[1:]) // no star, include pkg path + if b.isPrimitiveType(fieldType.String()[1:]) { + prop.Type = &pType + prop.Format = b.jsonSchemaFormat(fieldType.String()[1:]) + return jsonName, prop + } + prop.Ref = &pType + elemName := "" + if fieldType.Elem().Name() == "" { + elemName = modelName + "." + jsonName + prop.Ref = &elemName + } + b.addModel(fieldType.Elem(), elemName) + } + return jsonName, prop +} + +func (b modelBuilder) getElementTypeName(modelName, jsonName string, t reflect.Type) string { + if t.Kind() == reflect.Ptr { + return t.String()[1:] + } + if t.Name() == "" { + return modelName + "." + jsonName + } + return b.keyFrom(t) +} + +func (b modelBuilder) keyFrom(st reflect.Type) string { + key := st.String() + if len(st.Name()) == 0 { // unnamed type + // Swagger UI has special meaning for [ + key = strings.Replace(key, "[]", "||", -1) + } + return key +} + +// see also https://golang.org/ref/spec#Numeric_types +func (b modelBuilder) isPrimitiveType(modelName string) bool { + if len(modelName) == 0 { + return false + } + return strings.Contains("uint uint8 uint16 uint32 uint64 int int8 int16 int32 int64 float32 float64 bool string byte rune time.Time", modelName) +} + +// jsonNameOfField returns the name of the field as it should appear in JSON format +// An empty string indicates that this field is not part of the JSON representation +func (b modelBuilder) jsonNameOfField(field reflect.StructField) string { + if jsonTag := field.Tag.Get("json"); jsonTag != "" { + s := strings.Split(jsonTag, ",") + if s[0] == "-" { + // empty name signals skip property + return "" + } else if s[0] != "" { + return s[0] + } + } + return field.Name +} + +// see also http://json-schema.org/latest/json-schema-testing.html#anchor8 +func (b modelBuilder) jsonSchemaType(modelName string) string { + schemaMap := map[string]string{ + "uint": "integer", + "uint8": "integer", + "uint16": "integer", + "uint32": "integer", + "uint64": "integer", + + "int": "integer", + "int8": "integer", + "int16": "integer", + "int32": "integer", + "int64": "integer", + + "byte": "integer", + "float64": "number", + "float32": "number", + "bool": "boolean", + "time.Time": "string", + } + mapped, ok := schemaMap[modelName] + if !ok { + return modelName // use as is (custom or struct) + } + return mapped +} + +func (b modelBuilder) jsonSchemaFormat(modelName string) string { + if b.Config != nil && b.Config.SchemaFormatHandler != nil { + if mapped := b.Config.SchemaFormatHandler(modelName); mapped != "" { + return mapped + } + } + schemaMap := map[string]string{ + "int": "int32", + "int32": "int32", + "int64": "int64", + "byte": "byte", + "uint": "integer", + "uint8": "byte", + "float64": "double", + "float32": "float", + "time.Time": "date-time", + "*time.Time": "date-time", + } + mapped, ok := schemaMap[modelName] + if !ok { + return "" // no format + } + return mapped +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/model_list.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/model_list.go new file mode 100644 index 0000000000000..9bb6cb6785050 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/model_list.go @@ -0,0 +1,86 @@ +package swagger + +// Copyright 2015 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +import ( + "bytes" + "encoding/json" +) + +// NamedModel associates a name with a Model (not using its Id) +type NamedModel struct { + Name string + Model Model +} + +// ModelList encapsulates a list of NamedModel (association) +type ModelList struct { + List []NamedModel +} + +// Put adds or replaces a Model by its name +func (l *ModelList) Put(name string, model Model) { + for i, each := range l.List { + if each.Name == name { + // replace + l.List[i] = NamedModel{name, model} + return + } + } + // add + l.List = append(l.List, NamedModel{name, model}) +} + +// At returns a Model by its name, ok is false if absent +func (l *ModelList) At(name string) (m Model, ok bool) { + for _, each := range l.List { + if each.Name == name { + return each.Model, true + } + } + return m, false +} + +// Do enumerates all the models, each with its assigned name +func (l *ModelList) Do(block func(name string, value Model)) { + for _, each := range l.List { + block(each.Name, each.Model) + } +} + +// MarshalJSON writes the ModelList as if it was a map[string]Model +func (l ModelList) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + encoder := json.NewEncoder(&buf) + buf.WriteString("{\n") + for i, each := range l.List { + buf.WriteString("\"") + buf.WriteString(each.Name) + buf.WriteString("\": ") + encoder.Encode(each.Model) + if i < len(l.List)-1 { + buf.WriteString(",\n") + } + } + buf.WriteString("}") + return buf.Bytes(), nil +} + +// UnmarshalJSON reads back a ModelList. This is an expensive operation. +func (l *ModelList) UnmarshalJSON(data []byte) error { + raw := map[string]interface{}{} + json.NewDecoder(bytes.NewReader(data)).Decode(&raw) + for k, v := range raw { + // produces JSON bytes for each value + data, err := json.Marshal(v) + if err != nil { + return err + } + var m Model + json.NewDecoder(bytes.NewReader(data)).Decode(&m) + l.Put(k, m) + } + return nil +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/model_property_ext.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/model_property_ext.go new file mode 100644 index 0000000000000..04fff2c57aad3 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/model_property_ext.go @@ -0,0 +1,66 @@ +package swagger + +import ( + "reflect" + "strings" +) + +func (prop *ModelProperty) setDescription(field reflect.StructField) { + if tag := field.Tag.Get("description"); tag != "" { + prop.Description = tag + } +} + +func (prop *ModelProperty) setDefaultValue(field reflect.StructField) { + if tag := field.Tag.Get("default"); tag != "" { + prop.DefaultValue = Special(tag) + } +} + +func (prop *ModelProperty) setEnumValues(field reflect.StructField) { + // We use | to separate the enum values. This value is chosen + // since its unlikely to be useful in actual enumeration values. + if tag := field.Tag.Get("enum"); tag != "" { + prop.Enum = strings.Split(tag, "|") + } +} + +func (prop *ModelProperty) setMaximum(field reflect.StructField) { + if tag := field.Tag.Get("maximum"); tag != "" { + prop.Maximum = tag + } +} + +func (prop *ModelProperty) setType(field reflect.StructField) { + if tag := field.Tag.Get("type"); tag != "" { + prop.Type = &tag + } +} + +func (prop *ModelProperty) setMinimum(field reflect.StructField) { + if tag := field.Tag.Get("minimum"); tag != "" { + prop.Minimum = tag + } +} + +func (prop *ModelProperty) setUniqueItems(field reflect.StructField) { + tag := field.Tag.Get("unique") + switch tag { + case "true": + v := true + prop.UniqueItems = &v + case "false": + v := false + prop.UniqueItems = &v + } +} + +func (prop *ModelProperty) setPropertyMetadata(field reflect.StructField) { + prop.setDescription(field) + prop.setEnumValues(field) + prop.setMinimum(field) + prop.setMaximum(field) + prop.setUniqueItems(field) + prop.setDefaultValue(field) + prop.setType(field) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/model_property_list.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/model_property_list.go new file mode 100644 index 0000000000000..3babb19448904 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/model_property_list.go @@ -0,0 +1,87 @@ +package swagger + +// Copyright 2015 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +import ( + "bytes" + "encoding/json" +) + +// NamedModelProperty associates a name to a ModelProperty +type NamedModelProperty struct { + Name string + Property ModelProperty +} + +// ModelPropertyList encapsulates a list of NamedModelProperty (association) +type ModelPropertyList struct { + List []NamedModelProperty +} + +// At returns the ModelPropety by its name unless absent, then ok is false +func (l *ModelPropertyList) At(name string) (p ModelProperty, ok bool) { + for _, each := range l.List { + if each.Name == name { + return each.Property, true + } + } + return p, false +} + +// Put adds or replaces a ModelProperty with this name +func (l *ModelPropertyList) Put(name string, prop ModelProperty) { + // maybe replace existing + for i, each := range l.List { + if each.Name == name { + // replace + l.List[i] = NamedModelProperty{Name: name, Property: prop} + return + } + } + // add + l.List = append(l.List, NamedModelProperty{Name: name, Property: prop}) +} + +// Do enumerates all the properties, each with its assigned name +func (l *ModelPropertyList) Do(block func(name string, value ModelProperty)) { + for _, each := range l.List { + block(each.Name, each.Property) + } +} + +// MarshalJSON writes the ModelPropertyList as if it was a map[string]ModelProperty +func (l ModelPropertyList) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + encoder := json.NewEncoder(&buf) + buf.WriteString("{\n") + for i, each := range l.List { + buf.WriteString("\"") + buf.WriteString(each.Name) + buf.WriteString("\": ") + encoder.Encode(each.Property) + if i < len(l.List)-1 { + buf.WriteString(",\n") + } + } + buf.WriteString("}") + return buf.Bytes(), nil +} + +// UnmarshalJSON reads back a ModelPropertyList. This is an expensive operation. +func (l *ModelPropertyList) UnmarshalJSON(data []byte) error { + raw := map[string]interface{}{} + json.NewDecoder(bytes.NewReader(data)).Decode(&raw) + for k, v := range raw { + // produces JSON bytes for each value + data, err := json.Marshal(v) + if err != nil { + return err + } + var m ModelProperty + json.NewDecoder(bytes.NewReader(data)).Decode(&m) + l.Put(k, m) + } + return nil +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/ordered_route_map.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/ordered_route_map.go new file mode 100644 index 0000000000000..b33ccfbeb9ea3 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/ordered_route_map.go @@ -0,0 +1,36 @@ +package swagger + +// Copyright 2015 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +import "github.com/emicklei/go-restful" + +type orderedRouteMap struct { + elements map[string][]restful.Route + keys []string +} + +func newOrderedRouteMap() *orderedRouteMap { + return &orderedRouteMap{ + elements: map[string][]restful.Route{}, + keys: []string{}, + } +} + +func (o *orderedRouteMap) Add(key string, route restful.Route) { + routes, ok := o.elements[key] + if ok { + routes = append(routes, route) + o.elements[key] = routes + return + } + o.elements[key] = []restful.Route{route} + o.keys = append(o.keys, key) +} + +func (o *orderedRouteMap) Do(block func(key string, routes []restful.Route)) { + for _, k := range o.keys { + block(k, o.elements[k]) + } +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/swagger.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/swagger.go new file mode 100644 index 0000000000000..967b6711e8b87 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/swagger.go @@ -0,0 +1,184 @@ +// Package swagger implements the structures of the Swagger +// https://github.com/wordnik/swagger-spec/blob/master/versions/1.2.md +package swagger + +const swaggerVersion = "1.2" + +// 4.3.3 Data Type Fields +type DataTypeFields struct { + Type *string `json:"type,omitempty"` // if Ref not used + Ref *string `json:"$ref,omitempty"` // if Type not used + Format string `json:"format,omitempty"` + DefaultValue Special `json:"defaultValue,omitempty"` + Enum []string `json:"enum,omitempty"` + Minimum string `json:"minimum,omitempty"` + Maximum string `json:"maximum,omitempty"` + Items *Item `json:"items,omitempty"` + UniqueItems *bool `json:"uniqueItems,omitempty"` +} + +type Special string + +// 4.3.4 Items Object +type Item struct { + Type *string `json:"type,omitempty"` + Ref *string `json:"$ref,omitempty"` + Format string `json:"format,omitempty"` +} + +// 5.1 Resource Listing +type ResourceListing struct { + SwaggerVersion string `json:"swaggerVersion"` // e.g 1.2 + Apis []Resource `json:"apis"` + ApiVersion string `json:"apiVersion"` + Info Info `json:"info"` + Authorizations []Authorization `json:"authorizations,omitempty"` +} + +// 5.1.2 Resource Object +type Resource struct { + Path string `json:"path"` // relative or absolute, must start with / + Description string `json:"description"` +} + +// 5.1.3 Info Object +type Info struct { + Title string `json:"title"` + Description string `json:"description"` + TermsOfServiceUrl string `json:"termsOfServiceUrl,omitempty"` + Contact string `json:"contact,omitempty"` + License string `json:"license,omitempty"` + LicenseUrl string `json:"licenseUrl,omitempty"` +} + +// 5.1.5 +type Authorization struct { + Type string `json:"type"` + PassAs string `json:"passAs"` + Keyname string `json:"keyname"` + Scopes []Scope `json:"scopes"` + GrantTypes []GrantType `json:"grandTypes"` +} + +// 5.1.6, 5.2.11 +type Scope struct { + // Required. The name of the scope. + Scope string `json:"scope"` + // Recommended. A short description of the scope. + Description string `json:"description"` +} + +// 5.1.7 +type GrantType struct { + Implicit Implicit `json:"implicit"` + AuthorizationCode AuthorizationCode `json:"authorization_code"` +} + +// 5.1.8 Implicit Object +type Implicit struct { + // Required. The login endpoint definition. + loginEndpoint LoginEndpoint `json:"loginEndpoint"` + // An optional alternative name to standard "access_token" OAuth2 parameter. + TokenName string `json:"tokenName"` +} + +// 5.1.9 Authorization Code Object +type AuthorizationCode struct { + TokenRequestEndpoint TokenRequestEndpoint `json:"tokenRequestEndpoint"` + TokenEndpoint TokenEndpoint `json:"tokenEndpoint"` +} + +// 5.1.10 Login Endpoint Object +type LoginEndpoint struct { + // Required. The URL of the authorization endpoint for the implicit grant flow. The value SHOULD be in a URL format. + Url string `json:"url"` +} + +// 5.1.11 Token Request Endpoint Object +type TokenRequestEndpoint struct { + // Required. The URL of the authorization endpoint for the authentication code grant flow. The value SHOULD be in a URL format. + Url string `json:"url"` + // An optional alternative name to standard "client_id" OAuth2 parameter. + ClientIdName string `json:"clientIdName"` + // An optional alternative name to the standard "client_secret" OAuth2 parameter. + ClientSecretName string `json:"clientSecretName"` +} + +// 5.1.12 Token Endpoint Object +type TokenEndpoint struct { + // Required. The URL of the token endpoint for the authentication code grant flow. The value SHOULD be in a URL format. + Url string `json:"url"` + // An optional alternative name to standard "access_token" OAuth2 parameter. + TokenName string `json:"tokenName"` +} + +// 5.2 API Declaration +type ApiDeclaration struct { + SwaggerVersion string `json:"swaggerVersion"` + ApiVersion string `json:"apiVersion"` + BasePath string `json:"basePath"` + ResourcePath string `json:"resourcePath"` // must start with / + Apis []Api `json:"apis,omitempty"` + Models ModelList `json:"models,omitempty"` + Produces []string `json:"produces,omitempty"` + Consumes []string `json:"consumes,omitempty"` + Authorizations []Authorization `json:"authorizations,omitempty"` +} + +// 5.2.2 API Object +type Api struct { + Path string `json:"path"` // relative or absolute, must start with / + Description string `json:"description"` + Operations []Operation `json:"operations,omitempty"` +} + +// 5.2.3 Operation Object +type Operation struct { + DataTypeFields + Method string `json:"method"` + Summary string `json:"summary,omitempty"` + Notes string `json:"notes,omitempty"` + Nickname string `json:"nickname"` + Authorizations []Authorization `json:"authorizations,omitempty"` + Parameters []Parameter `json:"parameters"` + ResponseMessages []ResponseMessage `json:"responseMessages,omitempty"` // optional + Produces []string `json:"produces,omitempty"` + Consumes []string `json:"consumes,omitempty"` + Deprecated string `json:"deprecated,omitempty"` +} + +// 5.2.4 Parameter Object +type Parameter struct { + DataTypeFields + ParamType string `json:"paramType"` // path,query,body,header,form + Name string `json:"name"` + Description string `json:"description"` + Required bool `json:"required"` + AllowMultiple bool `json:"allowMultiple"` +} + +// 5.2.5 Response Message Object +type ResponseMessage struct { + Code int `json:"code"` + Message string `json:"message"` + ResponseModel string `json:"responseModel,omitempty"` +} + +// 5.2.6, 5.2.7 Models Object +type Model struct { + Id string `json:"id"` + Description string `json:"description,omitempty"` + Required []string `json:"required,omitempty"` + Properties ModelPropertyList `json:"properties"` + SubTypes []string `json:"subTypes,omitempty"` + Discriminator string `json:"discriminator,omitempty"` +} + +// 5.2.8 Properties Object +type ModelProperty struct { + DataTypeFields + Description string `json:"description,omitempty"` +} + +// 5.2.10 +type Authorizations map[string]Authorization diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/swagger_builder.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/swagger_builder.go new file mode 100644 index 0000000000000..05a3c7e76f900 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/swagger_builder.go @@ -0,0 +1,21 @@ +package swagger + +type SwaggerBuilder struct { + SwaggerService +} + +func NewSwaggerBuilder(config Config) *SwaggerBuilder { + return &SwaggerBuilder{*newSwaggerService(config)} +} + +func (sb SwaggerBuilder) ProduceListing() ResourceListing { + return sb.SwaggerService.produceListing() +} + +func (sb SwaggerBuilder) ProduceAllDeclarations() map[string]ApiDeclaration { + return sb.SwaggerService.produceAllDeclarations() +} + +func (sb SwaggerBuilder) ProduceDeclarations(route string) (*ApiDeclaration, bool) { + return sb.SwaggerService.produceDeclarations(route) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/swagger_webservice.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/swagger_webservice.go new file mode 100644 index 0000000000000..58dd6259022e6 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/swagger/swagger_webservice.go @@ -0,0 +1,440 @@ +package swagger + +import ( + "fmt" + + "github.com/emicklei/go-restful" + // "github.com/emicklei/hopwatch" + "net/http" + "reflect" + "sort" + "strings" + + "github.com/emicklei/go-restful/log" +) + +type SwaggerService struct { + config Config + apiDeclarationMap *ApiDeclarationList +} + +func newSwaggerService(config Config) *SwaggerService { + sws := &SwaggerService{ + config: config, + apiDeclarationMap: new(ApiDeclarationList)} + + // Build all ApiDeclarations + for _, each := range config.WebServices { + rootPath := each.RootPath() + // skip the api service itself + if rootPath != config.ApiPath { + if rootPath == "" || rootPath == "/" { + // use routes + for _, route := range each.Routes() { + entry := staticPathFromRoute(route) + _, exists := sws.apiDeclarationMap.At(entry) + if !exists { + sws.apiDeclarationMap.Put(entry, sws.composeDeclaration(each, entry)) + } + } + } else { // use root path + sws.apiDeclarationMap.Put(each.RootPath(), sws.composeDeclaration(each, each.RootPath())) + } + } + } + + // if specified then call the PostBuilderHandler + if config.PostBuildHandler != nil { + config.PostBuildHandler(sws.apiDeclarationMap) + } + return sws +} + +// LogInfo is the function that is called when this package needs to log. It defaults to log.Printf +var LogInfo = func(format string, v ...interface{}) { + // use the restful package-wide logger + log.Printf(format, v...) +} + +// InstallSwaggerService add the WebService that provides the API documentation of all services +// conform the Swagger documentation specifcation. (https://github.com/wordnik/swagger-core/wiki). +func InstallSwaggerService(aSwaggerConfig Config) { + RegisterSwaggerService(aSwaggerConfig, restful.DefaultContainer) +} + +// RegisterSwaggerService add the WebService that provides the API documentation of all services +// conform the Swagger documentation specifcation. (https://github.com/wordnik/swagger-core/wiki). +func RegisterSwaggerService(config Config, wsContainer *restful.Container) { + sws := newSwaggerService(config) + ws := new(restful.WebService) + ws.Path(config.ApiPath) + ws.Produces(restful.MIME_JSON) + if config.DisableCORS { + ws.Filter(enableCORS) + } + ws.Route(ws.GET("/").To(sws.getListing)) + ws.Route(ws.GET("/{a}").To(sws.getDeclarations)) + ws.Route(ws.GET("/{a}/{b}").To(sws.getDeclarations)) + ws.Route(ws.GET("/{a}/{b}/{c}").To(sws.getDeclarations)) + ws.Route(ws.GET("/{a}/{b}/{c}/{d}").To(sws.getDeclarations)) + ws.Route(ws.GET("/{a}/{b}/{c}/{d}/{e}").To(sws.getDeclarations)) + ws.Route(ws.GET("/{a}/{b}/{c}/{d}/{e}/{f}").To(sws.getDeclarations)) + ws.Route(ws.GET("/{a}/{b}/{c}/{d}/{e}/{f}/{g}").To(sws.getDeclarations)) + LogInfo("[restful/swagger] listing is available at %v%v", config.WebServicesUrl, config.ApiPath) + wsContainer.Add(ws) + + // Check paths for UI serving + if config.StaticHandler == nil && config.SwaggerFilePath != "" && config.SwaggerPath != "" { + swaggerPathSlash := config.SwaggerPath + // path must end with slash / + if "/" != config.SwaggerPath[len(config.SwaggerPath)-1:] { + LogInfo("[restful/swagger] use corrected SwaggerPath ; must end with slash (/)") + swaggerPathSlash += "/" + } + + LogInfo("[restful/swagger] %v%v is mapped to folder %v", config.WebServicesUrl, swaggerPathSlash, config.SwaggerFilePath) + wsContainer.Handle(swaggerPathSlash, http.StripPrefix(swaggerPathSlash, http.FileServer(http.Dir(config.SwaggerFilePath)))) + + //if we define a custom static handler use it + } else if config.StaticHandler != nil && config.SwaggerPath != "" { + swaggerPathSlash := config.SwaggerPath + // path must end with slash / + if "/" != config.SwaggerPath[len(config.SwaggerPath)-1:] { + LogInfo("[restful/swagger] use corrected SwaggerFilePath ; must end with slash (/)") + swaggerPathSlash += "/" + + } + LogInfo("[restful/swagger] %v%v is mapped to custom Handler %T", config.WebServicesUrl, swaggerPathSlash, config.StaticHandler) + wsContainer.Handle(swaggerPathSlash, config.StaticHandler) + + } else { + LogInfo("[restful/swagger] Swagger(File)Path is empty ; no UI is served") + } +} + +func staticPathFromRoute(r restful.Route) string { + static := r.Path + bracket := strings.Index(static, "{") + if bracket <= 1 { // result cannot be empty + return static + } + if bracket != -1 { + static = r.Path[:bracket] + } + if strings.HasSuffix(static, "/") { + return static[:len(static)-1] + } else { + return static + } +} + +func enableCORS(req *restful.Request, resp *restful.Response, chain *restful.FilterChain) { + if origin := req.HeaderParameter(restful.HEADER_Origin); origin != "" { + // prevent duplicate header + if len(resp.Header().Get(restful.HEADER_AccessControlAllowOrigin)) == 0 { + resp.AddHeader(restful.HEADER_AccessControlAllowOrigin, origin) + } + } + chain.ProcessFilter(req, resp) +} + +func (sws SwaggerService) getListing(req *restful.Request, resp *restful.Response) { + listing := sws.produceListing() + resp.WriteAsJson(listing) +} + +func (sws SwaggerService) produceListing() ResourceListing { + listing := ResourceListing{SwaggerVersion: swaggerVersion, ApiVersion: sws.config.ApiVersion, Info: sws.config.Info} + sws.apiDeclarationMap.Do(func(k string, v ApiDeclaration) { + ref := Resource{Path: k} + if len(v.Apis) > 0 { // use description of first (could still be empty) + ref.Description = v.Apis[0].Description + } + listing.Apis = append(listing.Apis, ref) + }) + return listing +} + +func (sws SwaggerService) getDeclarations(req *restful.Request, resp *restful.Response) { + decl, ok := sws.produceDeclarations(composeRootPath(req)) + if !ok { + resp.WriteErrorString(http.StatusNotFound, "ApiDeclaration not found") + return + } + // unless WebServicesUrl is given + if len(sws.config.WebServicesUrl) == 0 { + // update base path from the actual request + // TODO how to detect https? assume http for now + var host string + // X-Forwarded-Host or Host or Request.Host + hostvalues, ok := req.Request.Header["X-Forwarded-Host"] // apache specific? + if !ok || len(hostvalues) == 0 { + forwarded, ok := req.Request.Header["Host"] // without reverse-proxy + if !ok || len(forwarded) == 0 { + // fallback to Host field + host = req.Request.Host + } else { + host = forwarded[0] + } + } else { + host = hostvalues[0] + } + // inspect Referer for the scheme (http vs https) + scheme := "http" + if referer := req.Request.Header["Referer"]; len(referer) > 0 { + if strings.HasPrefix(referer[0], "https") { + scheme = "https" + } + } + decl.BasePath = fmt.Sprintf("%s://%s", scheme, host) + } + resp.WriteAsJson(decl) +} + +func (sws SwaggerService) produceAllDeclarations() map[string]ApiDeclaration { + decls := map[string]ApiDeclaration{} + sws.apiDeclarationMap.Do(func(k string, v ApiDeclaration) { + decls[k] = v + }) + return decls +} + +func (sws SwaggerService) produceDeclarations(route string) (*ApiDeclaration, bool) { + decl, ok := sws.apiDeclarationMap.At(route) + if !ok { + return nil, false + } + decl.BasePath = sws.config.WebServicesUrl + return &decl, true +} + +// composeDeclaration uses all routes and parameters to create a ApiDeclaration +func (sws SwaggerService) composeDeclaration(ws *restful.WebService, pathPrefix string) ApiDeclaration { + decl := ApiDeclaration{ + SwaggerVersion: swaggerVersion, + BasePath: sws.config.WebServicesUrl, + ResourcePath: pathPrefix, + Models: ModelList{}, + ApiVersion: ws.Version()} + + // collect any path parameters + rootParams := []Parameter{} + for _, param := range ws.PathParameters() { + rootParams = append(rootParams, asSwaggerParameter(param.Data())) + } + // aggregate by path + pathToRoutes := newOrderedRouteMap() + for _, other := range ws.Routes() { + if strings.HasPrefix(other.Path, pathPrefix) { + pathToRoutes.Add(other.Path, other) + } + } + pathToRoutes.Do(func(path string, routes []restful.Route) { + api := Api{Path: strings.TrimSuffix(withoutWildcard(path), "/"), Description: ws.Documentation()} + voidString := "void" + for _, route := range routes { + operation := Operation{ + Method: route.Method, + Summary: route.Doc, + Notes: route.Notes, + // Type gets overwritten if there is a write sample + DataTypeFields: DataTypeFields{Type: &voidString}, + Parameters: []Parameter{}, + Nickname: route.Operation, + ResponseMessages: composeResponseMessages(route, &decl, &sws.config)} + + operation.Consumes = route.Consumes + operation.Produces = route.Produces + + // share root params if any + for _, swparam := range rootParams { + operation.Parameters = append(operation.Parameters, swparam) + } + // route specific params + for _, param := range route.ParameterDocs { + operation.Parameters = append(operation.Parameters, asSwaggerParameter(param.Data())) + } + + sws.addModelsFromRouteTo(&operation, route, &decl) + api.Operations = append(api.Operations, operation) + } + decl.Apis = append(decl.Apis, api) + }) + return decl +} + +func withoutWildcard(path string) string { + if strings.HasSuffix(path, ":*}") { + return path[0:len(path)-3] + "}" + } + return path +} + +// composeResponseMessages takes the ResponseErrors (if any) and creates ResponseMessages from them. +func composeResponseMessages(route restful.Route, decl *ApiDeclaration, config *Config) (messages []ResponseMessage) { + if route.ResponseErrors == nil { + return messages + } + // sort by code + codes := sort.IntSlice{} + for code, _ := range route.ResponseErrors { + codes = append(codes, code) + } + codes.Sort() + for _, code := range codes { + each := route.ResponseErrors[code] + message := ResponseMessage{ + Code: code, + Message: each.Message, + } + if each.Model != nil { + st := reflect.TypeOf(each.Model) + isCollection, st := detectCollectionType(st) + modelName := modelBuilder{}.keyFrom(st) + if isCollection { + modelName = "array[" + modelName + "]" + } + modelBuilder{Models: &decl.Models, Config: config}.addModel(st, "") + // reference the model + message.ResponseModel = modelName + } + messages = append(messages, message) + } + return +} + +// addModelsFromRoute takes any read or write sample from the Route and creates a Swagger model from it. +func (sws SwaggerService) addModelsFromRouteTo(operation *Operation, route restful.Route, decl *ApiDeclaration) { + if route.ReadSample != nil { + sws.addModelFromSampleTo(operation, false, route.ReadSample, &decl.Models) + } + if route.WriteSample != nil { + sws.addModelFromSampleTo(operation, true, route.WriteSample, &decl.Models) + } +} + +func detectCollectionType(st reflect.Type) (bool, reflect.Type) { + isCollection := false + if st.Kind() == reflect.Slice || st.Kind() == reflect.Array { + st = st.Elem() + isCollection = true + } else { + if st.Kind() == reflect.Ptr { + if st.Elem().Kind() == reflect.Slice || st.Elem().Kind() == reflect.Array { + st = st.Elem().Elem() + isCollection = true + } + } + } + return isCollection, st +} + +// addModelFromSample creates and adds (or overwrites) a Model from a sample resource +func (sws SwaggerService) addModelFromSampleTo(operation *Operation, isResponse bool, sample interface{}, models *ModelList) { + if isResponse { + type_, items := asDataType(sample, &sws.config) + operation.Type = type_ + operation.Items = items + } + modelBuilder{Models: models, Config: &sws.config}.addModelFrom(sample) +} + +func asSwaggerParameter(param restful.ParameterData) Parameter { + return Parameter{ + DataTypeFields: DataTypeFields{ + Type: ¶m.DataType, + Format: asFormat(param.DataType, param.DataFormat), + DefaultValue: Special(param.DefaultValue), + }, + Name: param.Name, + Description: param.Description, + ParamType: asParamType(param.Kind), + + Required: param.Required} +} + +// Between 1..7 path parameters is supported +func composeRootPath(req *restful.Request) string { + path := "/" + req.PathParameter("a") + b := req.PathParameter("b") + if b == "" { + return path + } + path = path + "/" + b + c := req.PathParameter("c") + if c == "" { + return path + } + path = path + "/" + c + d := req.PathParameter("d") + if d == "" { + return path + } + path = path + "/" + d + e := req.PathParameter("e") + if e == "" { + return path + } + path = path + "/" + e + f := req.PathParameter("f") + if f == "" { + return path + } + path = path + "/" + f + g := req.PathParameter("g") + if g == "" { + return path + } + return path + "/" + g +} + +func asFormat(dataType string, dataFormat string) string { + if dataFormat != "" { + return dataFormat + } + return "" // TODO +} + +func asParamType(kind int) string { + switch { + case kind == restful.PathParameterKind: + return "path" + case kind == restful.QueryParameterKind: + return "query" + case kind == restful.BodyParameterKind: + return "body" + case kind == restful.HeaderParameterKind: + return "header" + case kind == restful.FormParameterKind: + return "form" + } + return "" +} + +func asDataType(any interface{}, config *Config) (*string, *Item) { + // If it's not a collection, return the suggested model name + st := reflect.TypeOf(any) + isCollection, st := detectCollectionType(st) + modelName := modelBuilder{}.keyFrom(st) + // if it's not a collection we are done + if !isCollection { + return &modelName, nil + } + + // XXX: This is not very elegant + // We create an Item object referring to the given model + models := ModelList{} + mb := modelBuilder{Models: &models, Config: config} + mb.addModelFrom(any) + + elemTypeName := mb.getElementTypeName(modelName, "", st) + item := new(Item) + if mb.isPrimitiveType(elemTypeName) { + mapped := mb.jsonSchemaType(elemTypeName) + item.Type = &mapped + } else { + item.Ref = &elemTypeName + } + tmp := "array" + return &tmp, item +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/web_service.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/web_service.go new file mode 100644 index 0000000000000..24fc5328b14b7 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/web_service.go @@ -0,0 +1,268 @@ +package restful + +import ( + "fmt" + "os" + "sync" + + "github.com/emicklei/go-restful/log" +) + +// Copyright 2013 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +// WebService holds a collection of Route values that bind a Http Method + URL Path to a function. +type WebService struct { + rootPath string + pathExpr *pathExpression // cached compilation of rootPath as RegExp + routes []Route + produces []string + consumes []string + pathParameters []*Parameter + filters []FilterFunction + documentation string + apiVersion string + + dynamicRoutes bool + + // protects 'routes' if dynamic routes are enabled + routesLock sync.RWMutex +} + +func (w *WebService) SetDynamicRoutes(enable bool) { + w.dynamicRoutes = enable +} + +// compilePathExpression ensures that the path is compiled into a RegEx for those routers that need it. +func (w *WebService) compilePathExpression() { + compiled, err := newPathExpression(w.rootPath) + if err != nil { + log.Printf("[restful] invalid path:%s because:%v", w.rootPath, err) + os.Exit(1) + } + w.pathExpr = compiled +} + +// ApiVersion sets the API version for documentation purposes. +func (w *WebService) ApiVersion(apiVersion string) *WebService { + w.apiVersion = apiVersion + return w +} + +// Version returns the API version for documentation purposes. +func (w WebService) Version() string { return w.apiVersion } + +// Path specifies the root URL template path of the WebService. +// All Routes will be relative to this path. +func (w *WebService) Path(root string) *WebService { + w.rootPath = root + if len(w.rootPath) == 0 { + w.rootPath = "/" + } + w.compilePathExpression() + return w +} + +// Param adds a PathParameter to document parameters used in the root path. +func (w *WebService) Param(parameter *Parameter) *WebService { + if w.pathParameters == nil { + w.pathParameters = []*Parameter{} + } + w.pathParameters = append(w.pathParameters, parameter) + return w +} + +// PathParameter creates a new Parameter of kind Path for documentation purposes. +// It is initialized as required with string as its DataType. +func (w *WebService) PathParameter(name, description string) *Parameter { + return PathParameter(name, description) +} + +// PathParameter creates a new Parameter of kind Path for documentation purposes. +// It is initialized as required with string as its DataType. +func PathParameter(name, description string) *Parameter { + p := &Parameter{&ParameterData{Name: name, Description: description, Required: true, DataType: "string"}} + p.bePath() + return p +} + +// QueryParameter creates a new Parameter of kind Query for documentation purposes. +// It is initialized as not required with string as its DataType. +func (w *WebService) QueryParameter(name, description string) *Parameter { + return QueryParameter(name, description) +} + +// QueryParameter creates a new Parameter of kind Query for documentation purposes. +// It is initialized as not required with string as its DataType. +func QueryParameter(name, description string) *Parameter { + p := &Parameter{&ParameterData{Name: name, Description: description, Required: false, DataType: "string"}} + p.beQuery() + return p +} + +// BodyParameter creates a new Parameter of kind Body for documentation purposes. +// It is initialized as required without a DataType. +func (w *WebService) BodyParameter(name, description string) *Parameter { + return BodyParameter(name, description) +} + +// BodyParameter creates a new Parameter of kind Body for documentation purposes. +// It is initialized as required without a DataType. +func BodyParameter(name, description string) *Parameter { + p := &Parameter{&ParameterData{Name: name, Description: description, Required: true}} + p.beBody() + return p +} + +// HeaderParameter creates a new Parameter of kind (Http) Header for documentation purposes. +// It is initialized as not required with string as its DataType. +func (w *WebService) HeaderParameter(name, description string) *Parameter { + return HeaderParameter(name, description) +} + +// HeaderParameter creates a new Parameter of kind (Http) Header for documentation purposes. +// It is initialized as not required with string as its DataType. +func HeaderParameter(name, description string) *Parameter { + p := &Parameter{&ParameterData{Name: name, Description: description, Required: false, DataType: "string"}} + p.beHeader() + return p +} + +// FormParameter creates a new Parameter of kind Form (using application/x-www-form-urlencoded) for documentation purposes. +// It is initialized as required with string as its DataType. +func (w *WebService) FormParameter(name, description string) *Parameter { + return FormParameter(name, description) +} + +// FormParameter creates a new Parameter of kind Form (using application/x-www-form-urlencoded) for documentation purposes. +// It is initialized as required with string as its DataType. +func FormParameter(name, description string) *Parameter { + p := &Parameter{&ParameterData{Name: name, Description: description, Required: false, DataType: "string"}} + p.beForm() + return p +} + +// Route creates a new Route using the RouteBuilder and add to the ordered list of Routes. +func (w *WebService) Route(builder *RouteBuilder) *WebService { + w.routesLock.Lock() + defer w.routesLock.Unlock() + builder.copyDefaults(w.produces, w.consumes) + w.routes = append(w.routes, builder.Build()) + return w +} + +// RemoveRoute removes the specified route, looks for something that matches 'path' and 'method' +func (w *WebService) RemoveRoute(path, method string) error { + if !w.dynamicRoutes { + return fmt.Errorf("dynamic routes are not enabled.") + } + w.routesLock.Lock() + defer w.routesLock.Unlock() + newRoutes := make([]Route, (len(w.routes) - 1)) + current := 0 + for ix := range w.routes { + if w.routes[ix].Method == method && w.routes[ix].Path == path { + continue + } + newRoutes[current] = w.routes[ix] + current = current + 1 + } + w.routes = newRoutes + return nil +} + +// Method creates a new RouteBuilder and initialize its http method +func (w *WebService) Method(httpMethod string) *RouteBuilder { + return new(RouteBuilder).servicePath(w.rootPath).Method(httpMethod) +} + +// Produces specifies that this WebService can produce one or more MIME types. +// Http requests must have one of these values set for the Accept header. +func (w *WebService) Produces(contentTypes ...string) *WebService { + w.produces = contentTypes + return w +} + +// Consumes specifies that this WebService can consume one or more MIME types. +// Http requests must have one of these values set for the Content-Type header. +func (w *WebService) Consumes(accepts ...string) *WebService { + w.consumes = accepts + return w +} + +// Routes returns the Routes associated with this WebService +func (w WebService) Routes() []Route { + if !w.dynamicRoutes { + return w.routes + } + // Make a copy of the array to prevent concurrency problems + w.routesLock.RLock() + defer w.routesLock.RUnlock() + result := make([]Route, len(w.routes)) + for ix := range w.routes { + result[ix] = w.routes[ix] + } + return result +} + +// RootPath returns the RootPath associated with this WebService. Default "/" +func (w WebService) RootPath() string { + return w.rootPath +} + +// PathParameters return the path parameter names for (shared amoung its Routes) +func (w WebService) PathParameters() []*Parameter { + return w.pathParameters +} + +// Filter adds a filter function to the chain of filters applicable to all its Routes +func (w *WebService) Filter(filter FilterFunction) *WebService { + w.filters = append(w.filters, filter) + return w +} + +// Doc is used to set the documentation of this service. +func (w *WebService) Doc(plainText string) *WebService { + w.documentation = plainText + return w +} + +// Documentation returns it. +func (w WebService) Documentation() string { + return w.documentation +} + +/* + Convenience methods +*/ + +// HEAD is a shortcut for .Method("HEAD").Path(subPath) +func (w *WebService) HEAD(subPath string) *RouteBuilder { + return new(RouteBuilder).servicePath(w.rootPath).Method("HEAD").Path(subPath) +} + +// GET is a shortcut for .Method("GET").Path(subPath) +func (w *WebService) GET(subPath string) *RouteBuilder { + return new(RouteBuilder).servicePath(w.rootPath).Method("GET").Path(subPath) +} + +// POST is a shortcut for .Method("POST").Path(subPath) +func (w *WebService) POST(subPath string) *RouteBuilder { + return new(RouteBuilder).servicePath(w.rootPath).Method("POST").Path(subPath) +} + +// PUT is a shortcut for .Method("PUT").Path(subPath) +func (w *WebService) PUT(subPath string) *RouteBuilder { + return new(RouteBuilder).servicePath(w.rootPath).Method("PUT").Path(subPath) +} + +// PATCH is a shortcut for .Method("PATCH").Path(subPath) +func (w *WebService) PATCH(subPath string) *RouteBuilder { + return new(RouteBuilder).servicePath(w.rootPath).Method("PATCH").Path(subPath) +} + +// DELETE is a shortcut for .Method("DELETE").Path(subPath) +func (w *WebService) DELETE(subPath string) *RouteBuilder { + return new(RouteBuilder).servicePath(w.rootPath).Method("DELETE").Path(subPath) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/web_service_container.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/web_service_container.go new file mode 100644 index 0000000000000..c9d31b06c478d --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/emicklei/go-restful/web_service_container.go @@ -0,0 +1,39 @@ +package restful + +// Copyright 2013 Ernest Micklei. All rights reserved. +// Use of this source code is governed by a license +// that can be found in the LICENSE file. + +import ( + "net/http" +) + +// DefaultContainer is a restful.Container that uses http.DefaultServeMux +var DefaultContainer *Container + +func init() { + DefaultContainer = NewContainer() + DefaultContainer.ServeMux = http.DefaultServeMux +} + +// If set the true then panics will not be caught to return HTTP 500. +// In that case, Route functions are responsible for handling any error situation. +// Default value is false = recover from panics. This has performance implications. +// OBSOLETE ; use restful.DefaultContainer.DoNotRecover(true) +var DoNotRecover = false + +// Add registers a new WebService add it to the DefaultContainer. +func Add(service *WebService) { + DefaultContainer.Add(service) +} + +// Filter appends a container FilterFunction from the DefaultContainer. +// These are called before dispatching a http.Request to a WebService. +func Filter(filter FilterFunction) { + DefaultContainer.Filter(filter) +} + +// RegisteredWebServices returns the collections of WebServices from the DefaultContainer +func RegisteredWebServices() []*WebService { + return DefaultContainer.RegisteredWebServices() +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ghodss/yaml/.gitignore b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ghodss/yaml/.gitignore new file mode 100644 index 0000000000000..e256a31e00a52 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ghodss/yaml/.gitignore @@ -0,0 +1,20 @@ +# OSX leaves these everywhere on SMB shares +._* + +# Eclipse files +.classpath +.project +.settings/** + +# Emacs save files +*~ + +# Vim-related files +[._]*.s[a-w][a-z] +[._]s[a-w][a-z] +*.un~ +Session.vim +.netrwhist + +# Go test binaries +*.test diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ghodss/yaml/LICENSE b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ghodss/yaml/LICENSE new file mode 100644 index 0000000000000..7805d36de7305 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ghodss/yaml/LICENSE @@ -0,0 +1,50 @@ +The MIT License (MIT) + +Copyright (c) 2014 Sam Ghods + +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. + + +Copyright (c) 2012 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. diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ghodss/yaml/fields.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ghodss/yaml/fields.go new file mode 100644 index 0000000000000..0bd3c2b46267d --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ghodss/yaml/fields.go @@ -0,0 +1,497 @@ +// Copyright 2013 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. +package yaml + +import ( + "bytes" + "encoding" + "encoding/json" + "reflect" + "sort" + "strings" + "sync" + "unicode" + "unicode/utf8" +) + +// indirect walks down v allocating pointers as needed, +// until it gets to a non-pointer. +// if it encounters an Unmarshaler, indirect stops and returns that. +// if decodingNull is true, indirect stops at the last pointer so it can be set to nil. +func indirect(v reflect.Value, decodingNull bool) (json.Unmarshaler, encoding.TextUnmarshaler, reflect.Value) { + // If v is a named type and is addressable, + // start with its address, so that if the type has pointer methods, + // we find them. + if v.Kind() != reflect.Ptr && v.Type().Name() != "" && v.CanAddr() { + v = v.Addr() + } + for { + // Load value from interface, but only if the result will be + // usefully addressable. + if v.Kind() == reflect.Interface && !v.IsNil() { + e := v.Elem() + if e.Kind() == reflect.Ptr && !e.IsNil() && (!decodingNull || e.Elem().Kind() == reflect.Ptr) { + v = e + continue + } + } + + if v.Kind() != reflect.Ptr { + break + } + + if v.Elem().Kind() != reflect.Ptr && decodingNull && v.CanSet() { + break + } + if v.IsNil() { + v.Set(reflect.New(v.Type().Elem())) + } + if v.Type().NumMethod() > 0 { + if u, ok := v.Interface().(json.Unmarshaler); ok { + return u, nil, reflect.Value{} + } + if u, ok := v.Interface().(encoding.TextUnmarshaler); ok { + return nil, u, reflect.Value{} + } + } + v = v.Elem() + } + return nil, nil, v +} + +// A field represents a single field found in a struct. +type field struct { + name string + nameBytes []byte // []byte(name) + equalFold func(s, t []byte) bool // bytes.EqualFold or equivalent + + tag bool + index []int + typ reflect.Type + omitEmpty bool + quoted bool +} + +func fillField(f field) field { + f.nameBytes = []byte(f.name) + f.equalFold = foldFunc(f.nameBytes) + return f +} + +// byName sorts field by name, breaking ties with depth, +// then breaking ties with "name came from json tag", then +// breaking ties with index sequence. +type byName []field + +func (x byName) Len() int { return len(x) } + +func (x byName) Swap(i, j int) { x[i], x[j] = x[j], x[i] } + +func (x byName) Less(i, j int) bool { + if x[i].name != x[j].name { + return x[i].name < x[j].name + } + if len(x[i].index) != len(x[j].index) { + return len(x[i].index) < len(x[j].index) + } + if x[i].tag != x[j].tag { + return x[i].tag + } + return byIndex(x).Less(i, j) +} + +// byIndex sorts field by index sequence. +type byIndex []field + +func (x byIndex) Len() int { return len(x) } + +func (x byIndex) Swap(i, j int) { x[i], x[j] = x[j], x[i] } + +func (x byIndex) Less(i, j int) bool { + for k, xik := range x[i].index { + if k >= len(x[j].index) { + return false + } + if xik != x[j].index[k] { + return xik < x[j].index[k] + } + } + return len(x[i].index) < len(x[j].index) +} + +// typeFields returns a list of fields that JSON should recognize for the given type. +// The algorithm is breadth-first search over the set of structs to include - the top struct +// and then any reachable anonymous structs. +func typeFields(t reflect.Type) []field { + // Anonymous fields to explore at the current level and the next. + current := []field{} + next := []field{{typ: t}} + + // Count of queued names for current level and the next. + count := map[reflect.Type]int{} + nextCount := map[reflect.Type]int{} + + // Types already visited at an earlier level. + visited := map[reflect.Type]bool{} + + // Fields found. + var fields []field + + for len(next) > 0 { + current, next = next, current[:0] + count, nextCount = nextCount, map[reflect.Type]int{} + + for _, f := range current { + if visited[f.typ] { + continue + } + visited[f.typ] = true + + // Scan f.typ for fields to include. + for i := 0; i < f.typ.NumField(); i++ { + sf := f.typ.Field(i) + if sf.PkgPath != "" { // unexported + continue + } + tag := sf.Tag.Get("json") + if tag == "-" { + continue + } + name, opts := parseTag(tag) + if !isValidTag(name) { + name = "" + } + index := make([]int, len(f.index)+1) + copy(index, f.index) + index[len(f.index)] = i + + ft := sf.Type + if ft.Name() == "" && ft.Kind() == reflect.Ptr { + // Follow pointer. + ft = ft.Elem() + } + + // Record found field and index sequence. + if name != "" || !sf.Anonymous || ft.Kind() != reflect.Struct { + tagged := name != "" + if name == "" { + name = sf.Name + } + fields = append(fields, fillField(field{ + name: name, + tag: tagged, + index: index, + typ: ft, + omitEmpty: opts.Contains("omitempty"), + quoted: opts.Contains("string"), + })) + if count[f.typ] > 1 { + // If there were multiple instances, add a second, + // so that the annihilation code will see a duplicate. + // It only cares about the distinction between 1 or 2, + // so don't bother generating any more copies. + fields = append(fields, fields[len(fields)-1]) + } + continue + } + + // Record new anonymous struct to explore in next round. + nextCount[ft]++ + if nextCount[ft] == 1 { + next = append(next, fillField(field{name: ft.Name(), index: index, typ: ft})) + } + } + } + } + + sort.Sort(byName(fields)) + + // Delete all fields that are hidden by the Go rules for embedded fields, + // except that fields with JSON tags are promoted. + + // The fields are sorted in primary order of name, secondary order + // of field index length. Loop over names; for each name, delete + // hidden fields by choosing the one dominant field that survives. + out := fields[:0] + for advance, i := 0, 0; i < len(fields); i += advance { + // One iteration per name. + // Find the sequence of fields with the name of this first field. + fi := fields[i] + name := fi.name + for advance = 1; i+advance < len(fields); advance++ { + fj := fields[i+advance] + if fj.name != name { + break + } + } + if advance == 1 { // Only one field with this name + out = append(out, fi) + continue + } + dominant, ok := dominantField(fields[i : i+advance]) + if ok { + out = append(out, dominant) + } + } + + fields = out + sort.Sort(byIndex(fields)) + + return fields +} + +// dominantField looks through the fields, all of which are known to +// have the same name, to find the single field that dominates the +// others using Go's embedding rules, modified by the presence of +// JSON tags. If there are multiple top-level fields, the boolean +// will be false: This condition is an error in Go and we skip all +// the fields. +func dominantField(fields []field) (field, bool) { + // The fields are sorted in increasing index-length order. The winner + // must therefore be one with the shortest index length. Drop all + // longer entries, which is easy: just truncate the slice. + length := len(fields[0].index) + tagged := -1 // Index of first tagged field. + for i, f := range fields { + if len(f.index) > length { + fields = fields[:i] + break + } + if f.tag { + if tagged >= 0 { + // Multiple tagged fields at the same level: conflict. + // Return no field. + return field{}, false + } + tagged = i + } + } + if tagged >= 0 { + return fields[tagged], true + } + // All remaining fields have the same length. If there's more than one, + // we have a conflict (two fields named "X" at the same level) and we + // return no field. + if len(fields) > 1 { + return field{}, false + } + return fields[0], true +} + +var fieldCache struct { + sync.RWMutex + m map[reflect.Type][]field +} + +// cachedTypeFields is like typeFields but uses a cache to avoid repeated work. +func cachedTypeFields(t reflect.Type) []field { + fieldCache.RLock() + f := fieldCache.m[t] + fieldCache.RUnlock() + if f != nil { + return f + } + + // Compute fields without lock. + // Might duplicate effort but won't hold other computations back. + f = typeFields(t) + if f == nil { + f = []field{} + } + + fieldCache.Lock() + if fieldCache.m == nil { + fieldCache.m = map[reflect.Type][]field{} + } + fieldCache.m[t] = f + fieldCache.Unlock() + return f +} + +func isValidTag(s string) bool { + if s == "" { + return false + } + for _, c := range s { + switch { + case strings.ContainsRune("!#$%&()*+-./:<=>?@[]^_{|}~ ", c): + // Backslash and quote chars are reserved, but + // otherwise any punctuation chars are allowed + // in a tag name. + default: + if !unicode.IsLetter(c) && !unicode.IsDigit(c) { + return false + } + } + } + return true +} + +const ( + caseMask = ^byte(0x20) // Mask to ignore case in ASCII. + kelvin = '\u212a' + smallLongEss = '\u017f' +) + +// foldFunc returns one of four different case folding equivalence +// functions, from most general (and slow) to fastest: +// +// 1) bytes.EqualFold, if the key s contains any non-ASCII UTF-8 +// 2) equalFoldRight, if s contains special folding ASCII ('k', 'K', 's', 'S') +// 3) asciiEqualFold, no special, but includes non-letters (including _) +// 4) simpleLetterEqualFold, no specials, no non-letters. +// +// The letters S and K are special because they map to 3 runes, not just 2: +// * S maps to s and to U+017F 'ſ' Latin small letter long s +// * k maps to K and to U+212A 'K' Kelvin sign +// See http://play.golang.org/p/tTxjOc0OGo +// +// The returned function is specialized for matching against s and +// should only be given s. It's not curried for performance reasons. +func foldFunc(s []byte) func(s, t []byte) bool { + nonLetter := false + special := false // special letter + for _, b := range s { + if b >= utf8.RuneSelf { + return bytes.EqualFold + } + upper := b & caseMask + if upper < 'A' || upper > 'Z' { + nonLetter = true + } else if upper == 'K' || upper == 'S' { + // See above for why these letters are special. + special = true + } + } + if special { + return equalFoldRight + } + if nonLetter { + return asciiEqualFold + } + return simpleLetterEqualFold +} + +// equalFoldRight is a specialization of bytes.EqualFold when s is +// known to be all ASCII (including punctuation), but contains an 's', +// 'S', 'k', or 'K', requiring a Unicode fold on the bytes in t. +// See comments on foldFunc. +func equalFoldRight(s, t []byte) bool { + for _, sb := range s { + if len(t) == 0 { + return false + } + tb := t[0] + if tb < utf8.RuneSelf { + if sb != tb { + sbUpper := sb & caseMask + if 'A' <= sbUpper && sbUpper <= 'Z' { + if sbUpper != tb&caseMask { + return false + } + } else { + return false + } + } + t = t[1:] + continue + } + // sb is ASCII and t is not. t must be either kelvin + // sign or long s; sb must be s, S, k, or K. + tr, size := utf8.DecodeRune(t) + switch sb { + case 's', 'S': + if tr != smallLongEss { + return false + } + case 'k', 'K': + if tr != kelvin { + return false + } + default: + return false + } + t = t[size:] + + } + if len(t) > 0 { + return false + } + return true +} + +// asciiEqualFold is a specialization of bytes.EqualFold for use when +// s is all ASCII (but may contain non-letters) and contains no +// special-folding letters. +// See comments on foldFunc. +func asciiEqualFold(s, t []byte) bool { + if len(s) != len(t) { + return false + } + for i, sb := range s { + tb := t[i] + if sb == tb { + continue + } + if ('a' <= sb && sb <= 'z') || ('A' <= sb && sb <= 'Z') { + if sb&caseMask != tb&caseMask { + return false + } + } else { + return false + } + } + return true +} + +// simpleLetterEqualFold is a specialization of bytes.EqualFold for +// use when s is all ASCII letters (no underscores, etc) and also +// doesn't contain 'k', 'K', 's', or 'S'. +// See comments on foldFunc. +func simpleLetterEqualFold(s, t []byte) bool { + if len(s) != len(t) { + return false + } + for i, b := range s { + if b&caseMask != t[i]&caseMask { + return false + } + } + return true +} + +// tagOptions is the string following a comma in a struct field's "json" +// tag, or the empty string. It does not include the leading comma. +type tagOptions string + +// parseTag splits a struct field's json tag into its name and +// comma-separated options. +func parseTag(tag string) (string, tagOptions) { + if idx := strings.Index(tag, ","); idx != -1 { + return tag[:idx], tagOptions(tag[idx+1:]) + } + return tag, tagOptions("") +} + +// Contains reports whether a comma-separated list of options +// contains a particular substr flag. substr must be surrounded by a +// string boundary or commas. +func (o tagOptions) Contains(optionName string) bool { + if len(o) == 0 { + return false + } + s := string(o) + for s != "" { + var next string + i := strings.Index(s, ",") + if i >= 0 { + s, next = s[:i], s[i+1:] + } + if s == optionName { + return true + } + s = next + } + return false +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ghodss/yaml/yaml.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ghodss/yaml/yaml.go new file mode 100644 index 0000000000000..c02beacb9a41a --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ghodss/yaml/yaml.go @@ -0,0 +1,277 @@ +package yaml + +import ( + "bytes" + "encoding/json" + "fmt" + "reflect" + "strconv" + + "gopkg.in/yaml.v2" +) + +// Marshals the object into JSON then converts JSON to YAML and returns the +// YAML. +func Marshal(o interface{}) ([]byte, error) { + j, err := json.Marshal(o) + if err != nil { + return nil, fmt.Errorf("error marshaling into JSON: ", err) + } + + y, err := JSONToYAML(j) + if err != nil { + return nil, fmt.Errorf("error converting JSON to YAML: ", err) + } + + return y, nil +} + +// Converts YAML to JSON then uses JSON to unmarshal into an object. +func Unmarshal(y []byte, o interface{}) error { + vo := reflect.ValueOf(o) + j, err := yamlToJSON(y, &vo) + if err != nil { + return fmt.Errorf("error converting YAML to JSON: %v", err) + } + + err = json.Unmarshal(j, o) + if err != nil { + return fmt.Errorf("error unmarshaling JSON: %v", err) + } + + return nil +} + +// Convert JSON to YAML. +func JSONToYAML(j []byte) ([]byte, error) { + // Convert the JSON to an object. + var jsonObj interface{} + // We are using yaml.Unmarshal here (instead of json.Unmarshal) because the + // Go JSON library doesn't try to pick the right number type (int, float, + // etc.) when unmarshling to interface{}, it just picks float64 + // universally. go-yaml does go through the effort of picking the right + // number type, so we can preserve number type throughout this process. + err := yaml.Unmarshal(j, &jsonObj) + if err != nil { + return nil, err + } + + // Marshal this object into YAML. + return yaml.Marshal(jsonObj) +} + +// Convert YAML to JSON. Since JSON is a subset of YAML, passing JSON through +// this method should be a no-op. +// +// Things YAML can do that are not supported by JSON: +// * In YAML you can have binary and null keys in your maps. These are invalid +// in JSON. (int and float keys are converted to strings.) +// * Binary data in YAML with the !!binary tag is not supported. If you want to +// use binary data with this library, encode the data as base64 as usual but do +// not use the !!binary tag in your YAML. This will ensure the original base64 +// encoded data makes it all the way through to the JSON. +func YAMLToJSON(y []byte) ([]byte, error) { + return yamlToJSON(y, nil) +} + +func yamlToJSON(y []byte, jsonTarget *reflect.Value) ([]byte, error) { + // Convert the YAML to an object. + var yamlObj interface{} + err := yaml.Unmarshal(y, &yamlObj) + if err != nil { + return nil, err + } + + // YAML objects are not completely compatible with JSON objects (e.g. you + // can have non-string keys in YAML). So, convert the YAML-compatible object + // to a JSON-compatible object, failing with an error if irrecoverable + // incompatibilties happen along the way. + jsonObj, err := convertToJSONableObject(yamlObj, jsonTarget) + if err != nil { + return nil, err + } + + // Convert this object to JSON and return the data. + return json.Marshal(jsonObj) +} + +func convertToJSONableObject(yamlObj interface{}, jsonTarget *reflect.Value) (interface{}, error) { + var err error + + // Resolve jsonTarget to a concrete value (i.e. not a pointer or an + // interface). We pass decodingNull as false because we're not actually + // decoding into the value, we're just checking if the ultimate target is a + // string. + if jsonTarget != nil { + ju, tu, pv := indirect(*jsonTarget, false) + // We have a JSON or Text Umarshaler at this level, so we can't be trying + // to decode into a string. + if ju != nil || tu != nil { + jsonTarget = nil + } else { + jsonTarget = &pv + } + } + + // If yamlObj is a number or a boolean, check if jsonTarget is a string - + // if so, coerce. Else return normal. + // If yamlObj is a map or array, find the field that each key is + // unmarshaling to, and when you recurse pass the reflect.Value for that + // field back into this function. + switch typedYAMLObj := yamlObj.(type) { + case map[interface{}]interface{}: + // JSON does not support arbitrary keys in a map, so we must convert + // these keys to strings. + // + // From my reading of go-yaml v2 (specifically the resolve function), + // keys can only have the types string, int, int64, float64, binary + // (unsupported), or null (unsupported). + strMap := make(map[string]interface{}) + for k, v := range typedYAMLObj { + // Resolve the key to a string first. + var keyString string + switch typedKey := k.(type) { + case string: + keyString = typedKey + case int: + keyString = strconv.Itoa(typedKey) + case int64: + // go-yaml will only return an int64 as a key if the system + // architecture is 32-bit and the key's value is between 32-bit + // and 64-bit. Otherwise the key type will simply be int. + keyString = strconv.FormatInt(typedKey, 10) + case float64: + // Stolen from go-yaml to use the same conversion to string as + // the go-yaml library uses to convert float to string when + // Marshaling. + s := strconv.FormatFloat(typedKey, 'g', -1, 32) + switch s { + case "+Inf": + s = ".inf" + case "-Inf": + s = "-.inf" + case "NaN": + s = ".nan" + } + keyString = s + case bool: + if typedKey { + keyString = "true" + } else { + keyString = "false" + } + default: + return nil, fmt.Errorf("Unsupported map key of type: %s, key: %+#v, value: %+#v", + reflect.TypeOf(k), k, v) + } + + // jsonTarget should be a struct or a map. If it's a struct, find + // the field it's going to map to and pass its reflect.Value. If + // it's a map, find the element type of the map and pass the + // reflect.Value created from that type. If it's neither, just pass + // nil - JSON conversion will error for us if it's a real issue. + if jsonTarget != nil { + t := *jsonTarget + if t.Kind() == reflect.Struct { + keyBytes := []byte(keyString) + // Find the field that the JSON library would use. + var f *field + fields := cachedTypeFields(t.Type()) + for i := range fields { + ff := &fields[i] + if bytes.Equal(ff.nameBytes, keyBytes) { + f = ff + break + } + // Do case-insensitive comparison. + if f == nil && ff.equalFold(ff.nameBytes, keyBytes) { + f = ff + } + } + if f != nil { + // Find the reflect.Value of the most preferential + // struct field. + jtf := t.Field(f.index[0]) + strMap[keyString], err = convertToJSONableObject(v, &jtf) + if err != nil { + return nil, err + } + continue + } + } else if t.Kind() == reflect.Map { + // Create a zero value of the map's element type to use as + // the JSON target. + jtv := reflect.Zero(t.Type().Elem()) + strMap[keyString], err = convertToJSONableObject(v, &jtv) + if err != nil { + return nil, err + } + continue + } + } + strMap[keyString], err = convertToJSONableObject(v, nil) + if err != nil { + return nil, err + } + } + return strMap, nil + case []interface{}: + // We need to recurse into arrays in case there are any + // map[interface{}]interface{}'s inside and to convert any + // numbers to strings. + + // If jsonTarget is a slice (which it really should be), find the + // thing it's going to map to. If it's not a slice, just pass nil + // - JSON conversion will error for us if it's a real issue. + var jsonSliceElemValue *reflect.Value + if jsonTarget != nil { + t := *jsonTarget + if t.Kind() == reflect.Slice { + // By default slices point to nil, but we need a reflect.Value + // pointing to a value of the slice type, so we create one here. + ev := reflect.Indirect(reflect.New(t.Type().Elem())) + jsonSliceElemValue = &ev + } + } + + // Make and use a new array. + arr := make([]interface{}, len(typedYAMLObj)) + for i, v := range typedYAMLObj { + arr[i], err = convertToJSONableObject(v, jsonSliceElemValue) + if err != nil { + return nil, err + } + } + return arr, nil + default: + // If the target type is a string and the YAML type is a number, + // convert the YAML type to a string. + if jsonTarget != nil && (*jsonTarget).Kind() == reflect.String { + // Based on my reading of go-yaml, it may return int, int64, + // float64, or uint64. + var s string + switch typedVal := typedYAMLObj.(type) { + case int: + s = strconv.FormatInt(int64(typedVal), 10) + case int64: + s = strconv.FormatInt(typedVal, 10) + case float64: + s = strconv.FormatFloat(typedVal, 'g', -1, 32) + case uint64: + s = strconv.FormatUint(typedVal, 10) + case bool: + if typedVal { + s = "true" + } else { + s = "false" + } + } + if len(s) > 0 { + yamlObj = interface{}(s) + } + } + return yamlObj, nil + } + + return nil, nil +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/LICENSE b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/LICENSE new file mode 100644 index 0000000000000..335e38e19b97f --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/LICENSE @@ -0,0 +1,36 @@ +Extensions for Protocol Buffers to create more go like structures. + +Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +http://github.com/gogo/protobuf/gogoproto + +Go support for Protocol Buffers - Google's data interchange format + +Copyright 2010 The Go Authors. All rights reserved. +https://github.com/golang/protobuf + +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. + diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/Makefile b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/Makefile new file mode 100644 index 0000000000000..23a6b17344088 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/Makefile @@ -0,0 +1,43 @@ +# Go support for Protocol Buffers - Google's data interchange format +# +# Copyright 2010 The Go Authors. All rights reserved. +# https://github.com/golang/protobuf +# +# 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. + +install: + go install + +test: install generate-test-pbs + go test + + +generate-test-pbs: + make install + make -C testdata + protoc-min-version --version="3.0.0" --proto_path=.:../../../../ --gogo_out=. proto3_proto/proto3.proto + make diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/clone.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/clone.go new file mode 100644 index 0000000000000..79edb86119a1d --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/clone.go @@ -0,0 +1,228 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2011 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +// Protocol buffer deep copy and merge. +// TODO: RawMessage. + +package proto + +import ( + "log" + "reflect" + "strings" +) + +// Clone returns a deep copy of a protocol buffer. +func Clone(pb Message) Message { + in := reflect.ValueOf(pb) + if in.IsNil() { + return pb + } + + out := reflect.New(in.Type().Elem()) + // out is empty so a merge is a deep copy. + mergeStruct(out.Elem(), in.Elem()) + return out.Interface().(Message) +} + +// Merge merges src into dst. +// Required and optional fields that are set in src will be set to that value in dst. +// Elements of repeated fields will be appended. +// Merge panics if src and dst are not the same type, or if dst is nil. +func Merge(dst, src Message) { + in := reflect.ValueOf(src) + out := reflect.ValueOf(dst) + if out.IsNil() { + panic("proto: nil destination") + } + if in.Type() != out.Type() { + // Explicit test prior to mergeStruct so that mistyped nils will fail + panic("proto: type mismatch") + } + if in.IsNil() { + // Merging nil into non-nil is a quiet no-op + return + } + mergeStruct(out.Elem(), in.Elem()) +} + +func mergeStruct(out, in reflect.Value) { + sprop := GetProperties(in.Type()) + for i := 0; i < in.NumField(); i++ { + f := in.Type().Field(i) + if strings.HasPrefix(f.Name, "XXX_") { + continue + } + mergeAny(out.Field(i), in.Field(i), false, sprop.Prop[i]) + } + + if emIn, ok := in.Addr().Interface().(extensionsMap); ok { + emOut := out.Addr().Interface().(extensionsMap) + mergeExtension(emOut.ExtensionMap(), emIn.ExtensionMap()) + } else if emIn, ok := in.Addr().Interface().(extensionsBytes); ok { + emOut := out.Addr().Interface().(extensionsBytes) + bIn := emIn.GetExtensions() + bOut := emOut.GetExtensions() + *bOut = append(*bOut, *bIn...) + } + + uf := in.FieldByName("XXX_unrecognized") + if !uf.IsValid() { + return + } + uin := uf.Bytes() + if len(uin) > 0 { + out.FieldByName("XXX_unrecognized").SetBytes(append([]byte(nil), uin...)) + } +} + +// mergeAny performs a merge between two values of the same type. +// viaPtr indicates whether the values were indirected through a pointer (implying proto2). +// prop is set if this is a struct field (it may be nil). +func mergeAny(out, in reflect.Value, viaPtr bool, prop *Properties) { + if in.Type() == protoMessageType { + if !in.IsNil() { + if out.IsNil() { + out.Set(reflect.ValueOf(Clone(in.Interface().(Message)))) + } else { + Merge(out.Interface().(Message), in.Interface().(Message)) + } + } + return + } + switch in.Kind() { + case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64, + reflect.String, reflect.Uint32, reflect.Uint64: + if !viaPtr && isProto3Zero(in) { + return + } + out.Set(in) + case reflect.Interface: + // Probably a oneof field; copy non-nil values. + if in.IsNil() { + return + } + // Allocate destination if it is not set, or set to a different type. + // Otherwise we will merge as normal. + if out.IsNil() || out.Elem().Type() != in.Elem().Type() { + out.Set(reflect.New(in.Elem().Elem().Type())) // interface -> *T -> T -> new(T) + } + mergeAny(out.Elem(), in.Elem(), false, nil) + case reflect.Map: + if in.Len() == 0 { + return + } + if out.IsNil() { + out.Set(reflect.MakeMap(in.Type())) + } + // For maps with value types of *T or []byte we need to deep copy each value. + elemKind := in.Type().Elem().Kind() + for _, key := range in.MapKeys() { + var val reflect.Value + switch elemKind { + case reflect.Ptr: + val = reflect.New(in.Type().Elem().Elem()) + mergeAny(val, in.MapIndex(key), false, nil) + case reflect.Slice: + val = in.MapIndex(key) + val = reflect.ValueOf(append([]byte{}, val.Bytes()...)) + default: + val = in.MapIndex(key) + } + out.SetMapIndex(key, val) + } + case reflect.Ptr: + if in.IsNil() { + return + } + if out.IsNil() { + out.Set(reflect.New(in.Elem().Type())) + } + mergeAny(out.Elem(), in.Elem(), true, nil) + case reflect.Slice: + if in.IsNil() { + return + } + if in.Type().Elem().Kind() == reflect.Uint8 { + // []byte is a scalar bytes field, not a repeated field. + + // Edge case: if this is in a proto3 message, a zero length + // bytes field is considered the zero value, and should not + // be merged. + if prop != nil && prop.proto3 && in.Len() == 0 { + return + } + + // Make a deep copy. + // Append to []byte{} instead of []byte(nil) so that we never end up + // with a nil result. + out.SetBytes(append([]byte{}, in.Bytes()...)) + return + } + n := in.Len() + if out.IsNil() { + out.Set(reflect.MakeSlice(in.Type(), 0, n)) + } + switch in.Type().Elem().Kind() { + case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64, + reflect.String, reflect.Uint32, reflect.Uint64: + out.Set(reflect.AppendSlice(out, in)) + default: + for i := 0; i < n; i++ { + x := reflect.Indirect(reflect.New(in.Type().Elem())) + mergeAny(x, in.Index(i), false, nil) + out.Set(reflect.Append(out, x)) + } + } + case reflect.Struct: + mergeStruct(out, in) + default: + // unknown type, so not a protocol buffer + log.Printf("proto: don't know how to copy %v", in) + } +} + +func mergeExtension(out, in map[int32]Extension) { + for extNum, eIn := range in { + eOut := Extension{desc: eIn.desc} + if eIn.value != nil { + v := reflect.New(reflect.TypeOf(eIn.value)).Elem() + mergeAny(v, reflect.ValueOf(eIn.value), false, nil) + eOut.value = v.Interface() + } + if eIn.enc != nil { + eOut.enc = make([]byte, len(eIn.enc)) + copy(eOut.enc, eIn.enc) + } + + out[extNum] = eOut + } +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/decode.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/decode.go new file mode 100644 index 0000000000000..7b06266d14f87 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/decode.go @@ -0,0 +1,873 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto + +/* + * Routines for decoding protocol buffer data to construct in-memory representations. + */ + +import ( + "errors" + "fmt" + "io" + "os" + "reflect" +) + +// errOverflow is returned when an integer is too large to be represented. +var errOverflow = errors.New("proto: integer overflow") + +// ErrInternalBadWireType is returned by generated code when an incorrect +// wire type is encountered. It does not get returned to user code. +var ErrInternalBadWireType = errors.New("proto: internal error: bad wiretype for oneof") + +// The fundamental decoders that interpret bytes on the wire. +// Those that take integer types all return uint64 and are +// therefore of type valueDecoder. + +// DecodeVarint reads a varint-encoded integer from the slice. +// It returns the integer and the number of bytes consumed, or +// zero if there is not enough. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +func DecodeVarint(buf []byte) (x uint64, n int) { + // x, n already 0 + for shift := uint(0); shift < 64; shift += 7 { + if n >= len(buf) { + return 0, 0 + } + b := uint64(buf[n]) + n++ + x |= (b & 0x7F) << shift + if (b & 0x80) == 0 { + return x, n + } + } + + // The number is too large to represent in a 64-bit value. + return 0, 0 +} + +// DecodeVarint reads a varint-encoded integer from the Buffer. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +func (p *Buffer) DecodeVarint() (x uint64, err error) { + // x, err already 0 + + i := p.index + l := len(p.buf) + + for shift := uint(0); shift < 64; shift += 7 { + if i >= l { + err = io.ErrUnexpectedEOF + return + } + b := p.buf[i] + i++ + x |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + p.index = i + return + } + } + + // The number is too large to represent in a 64-bit value. + err = errOverflow + return +} + +// DecodeFixed64 reads a 64-bit integer from the Buffer. +// This is the format for the +// fixed64, sfixed64, and double protocol buffer types. +func (p *Buffer) DecodeFixed64() (x uint64, err error) { + // x, err already 0 + i := p.index + 8 + if i < 0 || i > len(p.buf) { + err = io.ErrUnexpectedEOF + return + } + p.index = i + + x = uint64(p.buf[i-8]) + x |= uint64(p.buf[i-7]) << 8 + x |= uint64(p.buf[i-6]) << 16 + x |= uint64(p.buf[i-5]) << 24 + x |= uint64(p.buf[i-4]) << 32 + x |= uint64(p.buf[i-3]) << 40 + x |= uint64(p.buf[i-2]) << 48 + x |= uint64(p.buf[i-1]) << 56 + return +} + +// DecodeFixed32 reads a 32-bit integer from the Buffer. +// This is the format for the +// fixed32, sfixed32, and float protocol buffer types. +func (p *Buffer) DecodeFixed32() (x uint64, err error) { + // x, err already 0 + i := p.index + 4 + if i < 0 || i > len(p.buf) { + err = io.ErrUnexpectedEOF + return + } + p.index = i + + x = uint64(p.buf[i-4]) + x |= uint64(p.buf[i-3]) << 8 + x |= uint64(p.buf[i-2]) << 16 + x |= uint64(p.buf[i-1]) << 24 + return +} + +// DecodeZigzag64 reads a zigzag-encoded 64-bit integer +// from the Buffer. +// This is the format used for the sint64 protocol buffer type. +func (p *Buffer) DecodeZigzag64() (x uint64, err error) { + x, err = p.DecodeVarint() + if err != nil { + return + } + x = (x >> 1) ^ uint64((int64(x&1)<<63)>>63) + return +} + +// DecodeZigzag32 reads a zigzag-encoded 32-bit integer +// from the Buffer. +// This is the format used for the sint32 protocol buffer type. +func (p *Buffer) DecodeZigzag32() (x uint64, err error) { + x, err = p.DecodeVarint() + if err != nil { + return + } + x = uint64((uint32(x) >> 1) ^ uint32((int32(x&1)<<31)>>31)) + return +} + +// These are not ValueDecoders: they produce an array of bytes or a string. +// bytes, embedded messages + +// DecodeRawBytes reads a count-delimited byte buffer from the Buffer. +// This is the format used for the bytes protocol buffer +// type and for embedded messages. +func (p *Buffer) DecodeRawBytes(alloc bool) (buf []byte, err error) { + n, err := p.DecodeVarint() + if err != nil { + return nil, err + } + + nb := int(n) + if nb < 0 { + return nil, fmt.Errorf("proto: bad byte length %d", nb) + } + end := p.index + nb + if end < p.index || end > len(p.buf) { + return nil, io.ErrUnexpectedEOF + } + + if !alloc { + // todo: check if can get more uses of alloc=false + buf = p.buf[p.index:end] + p.index += nb + return + } + + buf = make([]byte, nb) + copy(buf, p.buf[p.index:]) + p.index += nb + return +} + +// DecodeStringBytes reads an encoded string from the Buffer. +// This is the format used for the proto2 string type. +func (p *Buffer) DecodeStringBytes() (s string, err error) { + buf, err := p.DecodeRawBytes(false) + if err != nil { + return + } + return string(buf), nil +} + +// Skip the next item in the buffer. Its wire type is decoded and presented as an argument. +// If the protocol buffer has extensions, and the field matches, add it as an extension. +// Otherwise, if the XXX_unrecognized field exists, append the skipped data there. +func (o *Buffer) skipAndSave(t reflect.Type, tag, wire int, base structPointer, unrecField field) error { + oi := o.index + + err := o.skip(t, tag, wire) + if err != nil { + return err + } + + if !unrecField.IsValid() { + return nil + } + + ptr := structPointer_Bytes(base, unrecField) + + // Add the skipped field to struct field + obuf := o.buf + + o.buf = *ptr + o.EncodeVarint(uint64(tag<<3 | wire)) + *ptr = append(o.buf, obuf[oi:o.index]...) + + o.buf = obuf + + return nil +} + +// Skip the next item in the buffer. Its wire type is decoded and presented as an argument. +func (o *Buffer) skip(t reflect.Type, tag, wire int) error { + + var u uint64 + var err error + + switch wire { + case WireVarint: + _, err = o.DecodeVarint() + case WireFixed64: + _, err = o.DecodeFixed64() + case WireBytes: + _, err = o.DecodeRawBytes(false) + case WireFixed32: + _, err = o.DecodeFixed32() + case WireStartGroup: + for { + u, err = o.DecodeVarint() + if err != nil { + break + } + fwire := int(u & 0x7) + if fwire == WireEndGroup { + break + } + ftag := int(u >> 3) + err = o.skip(t, ftag, fwire) + if err != nil { + break + } + } + default: + err = fmt.Errorf("proto: can't skip unknown wire type %d for %s", wire, t) + } + return err +} + +// Unmarshaler is the interface representing objects that can +// unmarshal themselves. The method should reset the receiver before +// decoding starts. The argument points to data that may be +// overwritten, so implementations should not keep references to the +// buffer. +type Unmarshaler interface { + Unmarshal([]byte) error +} + +// Unmarshal parses the protocol buffer representation in buf and places the +// decoded result in pb. If the struct underlying pb does not match +// the data in buf, the results can be unpredictable. +// +// Unmarshal resets pb before starting to unmarshal, so any +// existing data in pb is always removed. Use UnmarshalMerge +// to preserve and append to existing data. +func Unmarshal(buf []byte, pb Message) error { + pb.Reset() + return UnmarshalMerge(buf, pb) +} + +// UnmarshalMerge parses the protocol buffer representation in buf and +// writes the decoded result to pb. If the struct underlying pb does not match +// the data in buf, the results can be unpredictable. +// +// UnmarshalMerge merges into existing data in pb. +// Most code should use Unmarshal instead. +func UnmarshalMerge(buf []byte, pb Message) error { + // If the object can unmarshal itself, let it. + if u, ok := pb.(Unmarshaler); ok { + return u.Unmarshal(buf) + } + return NewBuffer(buf).Unmarshal(pb) +} + +// DecodeMessage reads a count-delimited message from the Buffer. +func (p *Buffer) DecodeMessage(pb Message) error { + enc, err := p.DecodeRawBytes(false) + if err != nil { + return err + } + return NewBuffer(enc).Unmarshal(pb) +} + +// DecodeGroup reads a tag-delimited group from the Buffer. +func (p *Buffer) DecodeGroup(pb Message) error { + typ, base, err := getbase(pb) + if err != nil { + return err + } + return p.unmarshalType(typ.Elem(), GetProperties(typ.Elem()), true, base) +} + +// Unmarshal parses the protocol buffer representation in the +// Buffer and places the decoded result in pb. If the struct +// underlying pb does not match the data in the buffer, the results can be +// unpredictable. +func (p *Buffer) Unmarshal(pb Message) error { + // If the object can unmarshal itself, let it. + if u, ok := pb.(Unmarshaler); ok { + err := u.Unmarshal(p.buf[p.index:]) + p.index = len(p.buf) + return err + } + + typ, base, err := getbase(pb) + if err != nil { + return err + } + + err = p.unmarshalType(typ.Elem(), GetProperties(typ.Elem()), false, base) + + if collectStats { + stats.Decode++ + } + + return err +} + +// unmarshalType does the work of unmarshaling a structure. +func (o *Buffer) unmarshalType(st reflect.Type, prop *StructProperties, is_group bool, base structPointer) error { + var state errorState + required, reqFields := prop.reqCount, uint64(0) + + var err error + for err == nil && o.index < len(o.buf) { + oi := o.index + var u uint64 + u, err = o.DecodeVarint() + if err != nil { + break + } + wire := int(u & 0x7) + if wire == WireEndGroup { + if is_group { + return nil // input is satisfied + } + return fmt.Errorf("proto: %s: wiretype end group for non-group", st) + } + tag := int(u >> 3) + if tag <= 0 { + return fmt.Errorf("proto: %s: illegal tag %d (wire type %d)", st, tag, wire) + } + fieldnum, ok := prop.decoderTags.get(tag) + if !ok { + // Maybe it's an extension? + if prop.extendable { + if e := structPointer_Interface(base, st).(extendableProto); isExtensionField(e, int32(tag)) { + if err = o.skip(st, tag, wire); err == nil { + if ee, eok := e.(extensionsMap); eok { + ext := ee.ExtensionMap()[int32(tag)] // may be missing + ext.enc = append(ext.enc, o.buf[oi:o.index]...) + ee.ExtensionMap()[int32(tag)] = ext + } else if ee, eok := e.(extensionsBytes); eok { + ext := ee.GetExtensions() + *ext = append(*ext, o.buf[oi:o.index]...) + } + } + continue + } + } + // Maybe it's a oneof? + if prop.oneofUnmarshaler != nil { + m := structPointer_Interface(base, st).(Message) + // First return value indicates whether tag is a oneof field. + ok, err = prop.oneofUnmarshaler(m, tag, wire, o) + if err == ErrInternalBadWireType { + // Map the error to something more descriptive. + // Do the formatting here to save generated code space. + err = fmt.Errorf("bad wiretype for oneof field in %T", m) + } + if ok { + continue + } + } + err = o.skipAndSave(st, tag, wire, base, prop.unrecField) + continue + } + p := prop.Prop[fieldnum] + + if p.dec == nil { + fmt.Fprintf(os.Stderr, "proto: no protobuf decoder for %s.%s\n", st, st.Field(fieldnum).Name) + continue + } + dec := p.dec + if wire != WireStartGroup && wire != p.WireType { + if wire == WireBytes && p.packedDec != nil { + // a packable field + dec = p.packedDec + } else { + err = fmt.Errorf("proto: bad wiretype for field %s.%s: got wiretype %d, want %d", st, st.Field(fieldnum).Name, wire, p.WireType) + continue + } + } + decErr := dec(o, p, base) + if decErr != nil && !state.shouldContinue(decErr, p) { + err = decErr + } + if err == nil && p.Required { + // Successfully decoded a required field. + if tag <= 64 { + // use bitmap for fields 1-64 to catch field reuse. + var mask uint64 = 1 << uint64(tag-1) + if reqFields&mask == 0 { + // new required field + reqFields |= mask + required-- + } + } else { + // This is imprecise. It can be fooled by a required field + // with a tag > 64 that is encoded twice; that's very rare. + // A fully correct implementation would require allocating + // a data structure, which we would like to avoid. + required-- + } + } + } + if err == nil { + if is_group { + return io.ErrUnexpectedEOF + } + if state.err != nil { + return state.err + } + if required > 0 { + // Not enough information to determine the exact field. If we use extra + // CPU, we could determine the field only if the missing required field + // has a tag <= 64 and we check reqFields. + return &RequiredNotSetError{"{Unknown}"} + } + } + return err +} + +// Individual type decoders +// For each, +// u is the decoded value, +// v is a pointer to the field (pointer) in the struct + +// Sizes of the pools to allocate inside the Buffer. +// The goal is modest amortization and allocation +// on at least 16-byte boundaries. +const ( + boolPoolSize = 16 + uint32PoolSize = 8 + uint64PoolSize = 4 +) + +// Decode a bool. +func (o *Buffer) dec_bool(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + if len(o.bools) == 0 { + o.bools = make([]bool, boolPoolSize) + } + o.bools[0] = u != 0 + *structPointer_Bool(base, p.field) = &o.bools[0] + o.bools = o.bools[1:] + return nil +} + +func (o *Buffer) dec_proto3_bool(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + *structPointer_BoolVal(base, p.field) = u != 0 + return nil +} + +// Decode an int32. +func (o *Buffer) dec_int32(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + word32_Set(structPointer_Word32(base, p.field), o, uint32(u)) + return nil +} + +func (o *Buffer) dec_proto3_int32(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + word32Val_Set(structPointer_Word32Val(base, p.field), uint32(u)) + return nil +} + +// Decode an int64. +func (o *Buffer) dec_int64(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + word64_Set(structPointer_Word64(base, p.field), o, u) + return nil +} + +func (o *Buffer) dec_proto3_int64(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + word64Val_Set(structPointer_Word64Val(base, p.field), o, u) + return nil +} + +// Decode a string. +func (o *Buffer) dec_string(p *Properties, base structPointer) error { + s, err := o.DecodeStringBytes() + if err != nil { + return err + } + *structPointer_String(base, p.field) = &s + return nil +} + +func (o *Buffer) dec_proto3_string(p *Properties, base structPointer) error { + s, err := o.DecodeStringBytes() + if err != nil { + return err + } + *structPointer_StringVal(base, p.field) = s + return nil +} + +// Decode a slice of bytes ([]byte). +func (o *Buffer) dec_slice_byte(p *Properties, base structPointer) error { + b, err := o.DecodeRawBytes(true) + if err != nil { + return err + } + *structPointer_Bytes(base, p.field) = b + return nil +} + +// Decode a slice of bools ([]bool). +func (o *Buffer) dec_slice_bool(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + v := structPointer_BoolSlice(base, p.field) + *v = append(*v, u != 0) + return nil +} + +// Decode a slice of bools ([]bool) in packed format. +func (o *Buffer) dec_slice_packed_bool(p *Properties, base structPointer) error { + v := structPointer_BoolSlice(base, p.field) + + nn, err := o.DecodeVarint() + if err != nil { + return err + } + nb := int(nn) // number of bytes of encoded bools + fin := o.index + nb + if fin < o.index { + return errOverflow + } + + y := *v + for o.index < fin { + u, err := p.valDec(o) + if err != nil { + return err + } + y = append(y, u != 0) + } + + *v = y + return nil +} + +// Decode a slice of int32s ([]int32). +func (o *Buffer) dec_slice_int32(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + structPointer_Word32Slice(base, p.field).Append(uint32(u)) + return nil +} + +// Decode a slice of int32s ([]int32) in packed format. +func (o *Buffer) dec_slice_packed_int32(p *Properties, base structPointer) error { + v := structPointer_Word32Slice(base, p.field) + + nn, err := o.DecodeVarint() + if err != nil { + return err + } + nb := int(nn) // number of bytes of encoded int32s + + fin := o.index + nb + if fin < o.index { + return errOverflow + } + for o.index < fin { + u, err := p.valDec(o) + if err != nil { + return err + } + v.Append(uint32(u)) + } + return nil +} + +// Decode a slice of int64s ([]int64). +func (o *Buffer) dec_slice_int64(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + + structPointer_Word64Slice(base, p.field).Append(u) + return nil +} + +// Decode a slice of int64s ([]int64) in packed format. +func (o *Buffer) dec_slice_packed_int64(p *Properties, base structPointer) error { + v := structPointer_Word64Slice(base, p.field) + + nn, err := o.DecodeVarint() + if err != nil { + return err + } + nb := int(nn) // number of bytes of encoded int64s + + fin := o.index + nb + if fin < o.index { + return errOverflow + } + for o.index < fin { + u, err := p.valDec(o) + if err != nil { + return err + } + v.Append(u) + } + return nil +} + +// Decode a slice of strings ([]string). +func (o *Buffer) dec_slice_string(p *Properties, base structPointer) error { + s, err := o.DecodeStringBytes() + if err != nil { + return err + } + v := structPointer_StringSlice(base, p.field) + *v = append(*v, s) + return nil +} + +// Decode a slice of slice of bytes ([][]byte). +func (o *Buffer) dec_slice_slice_byte(p *Properties, base structPointer) error { + b, err := o.DecodeRawBytes(true) + if err != nil { + return err + } + v := structPointer_BytesSlice(base, p.field) + *v = append(*v, b) + return nil +} + +// Decode a map field. +func (o *Buffer) dec_new_map(p *Properties, base structPointer) error { + raw, err := o.DecodeRawBytes(false) + if err != nil { + return err + } + oi := o.index // index at the end of this map entry + o.index -= len(raw) // move buffer back to start of map entry + + mptr := structPointer_NewAt(base, p.field, p.mtype) // *map[K]V + if mptr.Elem().IsNil() { + mptr.Elem().Set(reflect.MakeMap(mptr.Type().Elem())) + } + v := mptr.Elem() // map[K]V + + // Prepare addressable doubly-indirect placeholders for the key and value types. + // See enc_new_map for why. + keyptr := reflect.New(reflect.PtrTo(p.mtype.Key())).Elem() // addressable *K + keybase := toStructPointer(keyptr.Addr()) // **K + + var valbase structPointer + var valptr reflect.Value + switch p.mtype.Elem().Kind() { + case reflect.Slice: + // []byte + var dummy []byte + valptr = reflect.ValueOf(&dummy) // *[]byte + valbase = toStructPointer(valptr) // *[]byte + case reflect.Ptr: + // message; valptr is **Msg; need to allocate the intermediate pointer + valptr = reflect.New(reflect.PtrTo(p.mtype.Elem())).Elem() // addressable *V + valptr.Set(reflect.New(valptr.Type().Elem())) + valbase = toStructPointer(valptr) + default: + // everything else + valptr = reflect.New(reflect.PtrTo(p.mtype.Elem())).Elem() // addressable *V + valbase = toStructPointer(valptr.Addr()) // **V + } + + // Decode. + // This parses a restricted wire format, namely the encoding of a message + // with two fields. See enc_new_map for the format. + for o.index < oi { + // tagcode for key and value properties are always a single byte + // because they have tags 1 and 2. + tagcode := o.buf[o.index] + o.index++ + switch tagcode { + case p.mkeyprop.tagcode[0]: + if err := p.mkeyprop.dec(o, p.mkeyprop, keybase); err != nil { + return err + } + case p.mvalprop.tagcode[0]: + if err := p.mvalprop.dec(o, p.mvalprop, valbase); err != nil { + return err + } + default: + // TODO: Should we silently skip this instead? + return fmt.Errorf("proto: bad map data tag %d", raw[0]) + } + } + keyelem, valelem := keyptr.Elem(), valptr.Elem() + if !keyelem.IsValid() { + keyelem = reflect.Zero(p.mtype.Key()) + } + if !valelem.IsValid() { + valelem = reflect.Zero(p.mtype.Elem()) + } + + v.SetMapIndex(keyelem, valelem) + return nil +} + +// Decode a group. +func (o *Buffer) dec_struct_group(p *Properties, base structPointer) error { + bas := structPointer_GetStructPointer(base, p.field) + if structPointer_IsNil(bas) { + // allocate new nested message + bas = toStructPointer(reflect.New(p.stype)) + structPointer_SetStructPointer(base, p.field, bas) + } + return o.unmarshalType(p.stype, p.sprop, true, bas) +} + +// Decode an embedded message. +func (o *Buffer) dec_struct_message(p *Properties, base structPointer) (err error) { + raw, e := o.DecodeRawBytes(false) + if e != nil { + return e + } + + bas := structPointer_GetStructPointer(base, p.field) + if structPointer_IsNil(bas) { + // allocate new nested message + bas = toStructPointer(reflect.New(p.stype)) + structPointer_SetStructPointer(base, p.field, bas) + } + + // If the object can unmarshal itself, let it. + if p.isUnmarshaler { + iv := structPointer_Interface(bas, p.stype) + return iv.(Unmarshaler).Unmarshal(raw) + } + + obuf := o.buf + oi := o.index + o.buf = raw + o.index = 0 + + err = o.unmarshalType(p.stype, p.sprop, false, bas) + o.buf = obuf + o.index = oi + + return err +} + +// Decode a slice of embedded messages. +func (o *Buffer) dec_slice_struct_message(p *Properties, base structPointer) error { + return o.dec_slice_struct(p, false, base) +} + +// Decode a slice of embedded groups. +func (o *Buffer) dec_slice_struct_group(p *Properties, base structPointer) error { + return o.dec_slice_struct(p, true, base) +} + +// Decode a slice of structs ([]*struct). +func (o *Buffer) dec_slice_struct(p *Properties, is_group bool, base structPointer) error { + v := reflect.New(p.stype) + bas := toStructPointer(v) + structPointer_StructPointerSlice(base, p.field).Append(bas) + + if is_group { + err := o.unmarshalType(p.stype, p.sprop, is_group, bas) + return err + } + + raw, err := o.DecodeRawBytes(false) + if err != nil { + return err + } + + // If the object can unmarshal itself, let it. + if p.isUnmarshaler { + iv := v.Interface() + return iv.(Unmarshaler).Unmarshal(raw) + } + + obuf := o.buf + oi := o.index + o.buf = raw + o.index = 0 + + err = o.unmarshalType(p.stype, p.sprop, is_group, bas) + + o.buf = obuf + o.index = oi + + return err +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/decode_gogo.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/decode_gogo.go new file mode 100644 index 0000000000000..603dabec3f7e3 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/decode_gogo.go @@ -0,0 +1,169 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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. +// +// 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. + +package proto + +import ( + "reflect" +) + +// Decode a reference to a struct pointer. +func (o *Buffer) dec_ref_struct_message(p *Properties, base structPointer) (err error) { + raw, e := o.DecodeRawBytes(false) + if e != nil { + return e + } + + // If the object can unmarshal itself, let it. + if p.isUnmarshaler { + panic("not supported, since this is a pointer receiver") + } + + obuf := o.buf + oi := o.index + o.buf = raw + o.index = 0 + + bas := structPointer_FieldPointer(base, p.field) + + err = o.unmarshalType(p.stype, p.sprop, false, bas) + o.buf = obuf + o.index = oi + + return err +} + +// Decode a slice of references to struct pointers ([]struct). +func (o *Buffer) dec_slice_ref_struct(p *Properties, is_group bool, base structPointer) error { + newBas := appendStructPointer(base, p.field, p.sstype) + + if is_group { + panic("not supported, maybe in future, if requested.") + } + + raw, err := o.DecodeRawBytes(false) + if err != nil { + return err + } + + // If the object can unmarshal itself, let it. + if p.isUnmarshaler { + panic("not supported, since this is not a pointer receiver.") + } + + obuf := o.buf + oi := o.index + o.buf = raw + o.index = 0 + + err = o.unmarshalType(p.stype, p.sprop, is_group, newBas) + + o.buf = obuf + o.index = oi + + return err +} + +// Decode a slice of references to struct pointers. +func (o *Buffer) dec_slice_ref_struct_message(p *Properties, base structPointer) error { + return o.dec_slice_ref_struct(p, false, base) +} + +func setPtrCustomType(base structPointer, f field, v interface{}) { + if v == nil { + return + } + structPointer_SetStructPointer(base, f, structPointer(reflect.ValueOf(v).Pointer())) +} + +func setCustomType(base structPointer, f field, value interface{}) { + if value == nil { + return + } + v := reflect.ValueOf(value).Elem() + t := reflect.TypeOf(value).Elem() + kind := t.Kind() + switch kind { + case reflect.Slice: + slice := reflect.MakeSlice(t, v.Len(), v.Cap()) + reflect.Copy(slice, v) + oldHeader := structPointer_GetSliceHeader(base, f) + oldHeader.Data = slice.Pointer() + oldHeader.Len = v.Len() + oldHeader.Cap = v.Cap() + default: + size := reflect.TypeOf(value).Elem().Size() + structPointer_Copy(toStructPointer(reflect.ValueOf(value)), structPointer_Add(base, f), int(size)) + } +} + +func (o *Buffer) dec_custom_bytes(p *Properties, base structPointer) error { + b, err := o.DecodeRawBytes(true) + if err != nil { + return err + } + i := reflect.New(p.ctype.Elem()).Interface() + custom := (i).(Unmarshaler) + if err := custom.Unmarshal(b); err != nil { + return err + } + setPtrCustomType(base, p.field, custom) + return nil +} + +func (o *Buffer) dec_custom_ref_bytes(p *Properties, base structPointer) error { + b, err := o.DecodeRawBytes(true) + if err != nil { + return err + } + i := reflect.New(p.ctype).Interface() + custom := (i).(Unmarshaler) + if err := custom.Unmarshal(b); err != nil { + return err + } + if custom != nil { + setCustomType(base, p.field, custom) + } + return nil +} + +// Decode a slice of bytes ([]byte) into a slice of custom types. +func (o *Buffer) dec_custom_slice_bytes(p *Properties, base structPointer) error { + b, err := o.DecodeRawBytes(true) + if err != nil { + return err + } + i := reflect.New(p.ctype.Elem()).Interface() + custom := (i).(Unmarshaler) + if err := custom.Unmarshal(b); err != nil { + return err + } + newBas := appendStructPointer(base, p.field, p.ctype) + + setCustomType(newBas, 0, custom) + + return nil +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/encode.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/encode.go new file mode 100644 index 0000000000000..eb7e0474ef6a8 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/encode.go @@ -0,0 +1,1331 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto + +/* + * Routines for encoding data into the wire format for protocol buffers. + */ + +import ( + "errors" + "fmt" + "reflect" + "sort" +) + +// RequiredNotSetError is the error returned if Marshal is called with +// a protocol buffer struct whose required fields have not +// all been initialized. It is also the error returned if Unmarshal is +// called with an encoded protocol buffer that does not include all the +// required fields. +// +// When printed, RequiredNotSetError reports the first unset required field in a +// message. If the field cannot be precisely determined, it is reported as +// "{Unknown}". +type RequiredNotSetError struct { + field string +} + +func (e *RequiredNotSetError) Error() string { + return fmt.Sprintf("proto: required field %q not set", e.field) +} + +var ( + // errRepeatedHasNil is the error returned if Marshal is called with + // a struct with a repeated field containing a nil element. + errRepeatedHasNil = errors.New("proto: repeated field has nil element") + + // errOneofHasNil is the error returned if Marshal is called with + // a struct with a oneof field containing a nil element. + errOneofHasNil = errors.New("proto: oneof field has nil value") + + // ErrNil is the error returned if Marshal is called with nil. + ErrNil = errors.New("proto: Marshal called with nil") +) + +// The fundamental encoders that put bytes on the wire. +// Those that take integer types all accept uint64 and are +// therefore of type valueEncoder. + +const maxVarintBytes = 10 // maximum length of a varint + +// EncodeVarint returns the varint encoding of x. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +// Not used by the package itself, but helpful to clients +// wishing to use the same encoding. +func EncodeVarint(x uint64) []byte { + var buf [maxVarintBytes]byte + var n int + for n = 0; x > 127; n++ { + buf[n] = 0x80 | uint8(x&0x7F) + x >>= 7 + } + buf[n] = uint8(x) + n++ + return buf[0:n] +} + +// EncodeVarint writes a varint-encoded integer to the Buffer. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +func (p *Buffer) EncodeVarint(x uint64) error { + for x >= 1<<7 { + p.buf = append(p.buf, uint8(x&0x7f|0x80)) + x >>= 7 + } + p.buf = append(p.buf, uint8(x)) + return nil +} + +// SizeVarint returns the varint encoding size of an integer. +func SizeVarint(x uint64) int { + return sizeVarint(x) +} + +func sizeVarint(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} + +// EncodeFixed64 writes a 64-bit integer to the Buffer. +// This is the format for the +// fixed64, sfixed64, and double protocol buffer types. +func (p *Buffer) EncodeFixed64(x uint64) error { + p.buf = append(p.buf, + uint8(x), + uint8(x>>8), + uint8(x>>16), + uint8(x>>24), + uint8(x>>32), + uint8(x>>40), + uint8(x>>48), + uint8(x>>56)) + return nil +} + +func sizeFixed64(x uint64) int { + return 8 +} + +// EncodeFixed32 writes a 32-bit integer to the Buffer. +// This is the format for the +// fixed32, sfixed32, and float protocol buffer types. +func (p *Buffer) EncodeFixed32(x uint64) error { + p.buf = append(p.buf, + uint8(x), + uint8(x>>8), + uint8(x>>16), + uint8(x>>24)) + return nil +} + +func sizeFixed32(x uint64) int { + return 4 +} + +// EncodeZigzag64 writes a zigzag-encoded 64-bit integer +// to the Buffer. +// This is the format used for the sint64 protocol buffer type. +func (p *Buffer) EncodeZigzag64(x uint64) error { + // use signed number to get arithmetic right shift. + return p.EncodeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +func sizeZigzag64(x uint64) int { + return sizeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +// EncodeZigzag32 writes a zigzag-encoded 32-bit integer +// to the Buffer. +// This is the format used for the sint32 protocol buffer type. +func (p *Buffer) EncodeZigzag32(x uint64) error { + // use signed number to get arithmetic right shift. + return p.EncodeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31)))) +} + +func sizeZigzag32(x uint64) int { + return sizeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31)))) +} + +// EncodeRawBytes writes a count-delimited byte buffer to the Buffer. +// This is the format used for the bytes protocol buffer +// type and for embedded messages. +func (p *Buffer) EncodeRawBytes(b []byte) error { + p.EncodeVarint(uint64(len(b))) + p.buf = append(p.buf, b...) + return nil +} + +func sizeRawBytes(b []byte) int { + return sizeVarint(uint64(len(b))) + + len(b) +} + +// EncodeStringBytes writes an encoded string to the Buffer. +// This is the format used for the proto2 string type. +func (p *Buffer) EncodeStringBytes(s string) error { + p.EncodeVarint(uint64(len(s))) + p.buf = append(p.buf, s...) + return nil +} + +func sizeStringBytes(s string) int { + return sizeVarint(uint64(len(s))) + + len(s) +} + +// Marshaler is the interface representing objects that can marshal themselves. +type Marshaler interface { + Marshal() ([]byte, error) +} + +// Marshal takes the protocol buffer +// and encodes it into the wire format, returning the data. +func Marshal(pb Message) ([]byte, error) { + // Can the object marshal itself? + if m, ok := pb.(Marshaler); ok { + return m.Marshal() + } + p := NewBuffer(nil) + err := p.Marshal(pb) + var state errorState + if err != nil && !state.shouldContinue(err, nil) { + return nil, err + } + if p.buf == nil && err == nil { + // Return a non-nil slice on success. + return []byte{}, nil + } + return p.buf, err +} + +// EncodeMessage writes the protocol buffer to the Buffer, +// prefixed by a varint-encoded length. +func (p *Buffer) EncodeMessage(pb Message) error { + t, base, err := getbase(pb) + if structPointer_IsNil(base) { + return ErrNil + } + if err == nil { + var state errorState + err = p.enc_len_struct(GetProperties(t.Elem()), base, &state) + } + return err +} + +// Marshal takes the protocol buffer +// and encodes it into the wire format, writing the result to the +// Buffer. +func (p *Buffer) Marshal(pb Message) error { + // Can the object marshal itself? + if m, ok := pb.(Marshaler); ok { + data, err := m.Marshal() + if err != nil { + return err + } + p.buf = append(p.buf, data...) + return nil + } + + t, base, err := getbase(pb) + if structPointer_IsNil(base) { + return ErrNil + } + if err == nil { + err = p.enc_struct(GetProperties(t.Elem()), base) + } + + if collectStats { + stats.Encode++ + } + + return err +} + +// Size returns the encoded size of a protocol buffer. +func Size(pb Message) (n int) { + // Can the object marshal itself? If so, Size is slow. + // TODO: add Size to Marshaler, or add a Sizer interface. + if m, ok := pb.(Marshaler); ok { + b, _ := m.Marshal() + return len(b) + } + + t, base, err := getbase(pb) + if structPointer_IsNil(base) { + return 0 + } + if err == nil { + n = size_struct(GetProperties(t.Elem()), base) + } + + if collectStats { + stats.Size++ + } + + return +} + +// Individual type encoders. + +// Encode a bool. +func (o *Buffer) enc_bool(p *Properties, base structPointer) error { + v := *structPointer_Bool(base, p.field) + if v == nil { + return ErrNil + } + x := 0 + if *v { + x = 1 + } + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, uint64(x)) + return nil +} + +func (o *Buffer) enc_proto3_bool(p *Properties, base structPointer) error { + v := *structPointer_BoolVal(base, p.field) + if !v { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, 1) + return nil +} + +func size_bool(p *Properties, base structPointer) int { + v := *structPointer_Bool(base, p.field) + if v == nil { + return 0 + } + return len(p.tagcode) + 1 // each bool takes exactly one byte +} + +func size_proto3_bool(p *Properties, base structPointer) int { + v := *structPointer_BoolVal(base, p.field) + if !v && !p.oneof { + return 0 + } + return len(p.tagcode) + 1 // each bool takes exactly one byte +} + +// Encode an int32. +func (o *Buffer) enc_int32(p *Properties, base structPointer) error { + v := structPointer_Word32(base, p.field) + if word32_IsNil(v) { + return ErrNil + } + x := int32(word32_Get(v)) // permit sign extension to use full 64-bit range + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, uint64(x)) + return nil +} + +func (o *Buffer) enc_proto3_int32(p *Properties, base structPointer) error { + v := structPointer_Word32Val(base, p.field) + x := int32(word32Val_Get(v)) // permit sign extension to use full 64-bit range + if x == 0 { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, uint64(x)) + return nil +} + +func size_int32(p *Properties, base structPointer) (n int) { + v := structPointer_Word32(base, p.field) + if word32_IsNil(v) { + return 0 + } + x := int32(word32_Get(v)) // permit sign extension to use full 64-bit range + n += len(p.tagcode) + n += p.valSize(uint64(x)) + return +} + +func size_proto3_int32(p *Properties, base structPointer) (n int) { + v := structPointer_Word32Val(base, p.field) + x := int32(word32Val_Get(v)) // permit sign extension to use full 64-bit range + if x == 0 && !p.oneof { + return 0 + } + n += len(p.tagcode) + n += p.valSize(uint64(x)) + return +} + +// Encode a uint32. +// Exactly the same as int32, except for no sign extension. +func (o *Buffer) enc_uint32(p *Properties, base structPointer) error { + v := structPointer_Word32(base, p.field) + if word32_IsNil(v) { + return ErrNil + } + x := word32_Get(v) + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, uint64(x)) + return nil +} + +func (o *Buffer) enc_proto3_uint32(p *Properties, base structPointer) error { + v := structPointer_Word32Val(base, p.field) + x := word32Val_Get(v) + if x == 0 { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, uint64(x)) + return nil +} + +func size_uint32(p *Properties, base structPointer) (n int) { + v := structPointer_Word32(base, p.field) + if word32_IsNil(v) { + return 0 + } + x := word32_Get(v) + n += len(p.tagcode) + n += p.valSize(uint64(x)) + return +} + +func size_proto3_uint32(p *Properties, base structPointer) (n int) { + v := structPointer_Word32Val(base, p.field) + x := word32Val_Get(v) + if x == 0 && !p.oneof { + return 0 + } + n += len(p.tagcode) + n += p.valSize(uint64(x)) + return +} + +// Encode an int64. +func (o *Buffer) enc_int64(p *Properties, base structPointer) error { + v := structPointer_Word64(base, p.field) + if word64_IsNil(v) { + return ErrNil + } + x := word64_Get(v) + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, x) + return nil +} + +func (o *Buffer) enc_proto3_int64(p *Properties, base structPointer) error { + v := structPointer_Word64Val(base, p.field) + x := word64Val_Get(v) + if x == 0 { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, x) + return nil +} + +func size_int64(p *Properties, base structPointer) (n int) { + v := structPointer_Word64(base, p.field) + if word64_IsNil(v) { + return 0 + } + x := word64_Get(v) + n += len(p.tagcode) + n += p.valSize(x) + return +} + +func size_proto3_int64(p *Properties, base structPointer) (n int) { + v := structPointer_Word64Val(base, p.field) + x := word64Val_Get(v) + if x == 0 && !p.oneof { + return 0 + } + n += len(p.tagcode) + n += p.valSize(x) + return +} + +// Encode a string. +func (o *Buffer) enc_string(p *Properties, base structPointer) error { + v := *structPointer_String(base, p.field) + if v == nil { + return ErrNil + } + x := *v + o.buf = append(o.buf, p.tagcode...) + o.EncodeStringBytes(x) + return nil +} + +func (o *Buffer) enc_proto3_string(p *Properties, base structPointer) error { + v := *structPointer_StringVal(base, p.field) + if v == "" { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeStringBytes(v) + return nil +} + +func size_string(p *Properties, base structPointer) (n int) { + v := *structPointer_String(base, p.field) + if v == nil { + return 0 + } + x := *v + n += len(p.tagcode) + n += sizeStringBytes(x) + return +} + +func size_proto3_string(p *Properties, base structPointer) (n int) { + v := *structPointer_StringVal(base, p.field) + if v == "" && !p.oneof { + return 0 + } + n += len(p.tagcode) + n += sizeStringBytes(v) + return +} + +// All protocol buffer fields are nillable, but be careful. +func isNil(v reflect.Value) bool { + switch v.Kind() { + case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: + return v.IsNil() + } + return false +} + +// Encode a message struct. +func (o *Buffer) enc_struct_message(p *Properties, base structPointer) error { + var state errorState + structp := structPointer_GetStructPointer(base, p.field) + if structPointer_IsNil(structp) { + return ErrNil + } + + // Can the object marshal itself? + if p.isMarshaler { + m := structPointer_Interface(structp, p.stype).(Marshaler) + data, err := m.Marshal() + if err != nil && !state.shouldContinue(err, nil) { + return err + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(data) + return state.err + } + + o.buf = append(o.buf, p.tagcode...) + return o.enc_len_struct(p.sprop, structp, &state) +} + +func size_struct_message(p *Properties, base structPointer) int { + structp := structPointer_GetStructPointer(base, p.field) + if structPointer_IsNil(structp) { + return 0 + } + + // Can the object marshal itself? + if p.isMarshaler { + m := structPointer_Interface(structp, p.stype).(Marshaler) + data, _ := m.Marshal() + n0 := len(p.tagcode) + n1 := sizeRawBytes(data) + return n0 + n1 + } + + n0 := len(p.tagcode) + n1 := size_struct(p.sprop, structp) + n2 := sizeVarint(uint64(n1)) // size of encoded length + return n0 + n1 + n2 +} + +// Encode a group struct. +func (o *Buffer) enc_struct_group(p *Properties, base structPointer) error { + var state errorState + b := structPointer_GetStructPointer(base, p.field) + if structPointer_IsNil(b) { + return ErrNil + } + + o.EncodeVarint(uint64((p.Tag << 3) | WireStartGroup)) + err := o.enc_struct(p.sprop, b) + if err != nil && !state.shouldContinue(err, nil) { + return err + } + o.EncodeVarint(uint64((p.Tag << 3) | WireEndGroup)) + return state.err +} + +func size_struct_group(p *Properties, base structPointer) (n int) { + b := structPointer_GetStructPointer(base, p.field) + if structPointer_IsNil(b) { + return 0 + } + + n += sizeVarint(uint64((p.Tag << 3) | WireStartGroup)) + n += size_struct(p.sprop, b) + n += sizeVarint(uint64((p.Tag << 3) | WireEndGroup)) + return +} + +// Encode a slice of bools ([]bool). +func (o *Buffer) enc_slice_bool(p *Properties, base structPointer) error { + s := *structPointer_BoolSlice(base, p.field) + l := len(s) + if l == 0 { + return ErrNil + } + for _, x := range s { + o.buf = append(o.buf, p.tagcode...) + v := uint64(0) + if x { + v = 1 + } + p.valEnc(o, v) + } + return nil +} + +func size_slice_bool(p *Properties, base structPointer) int { + s := *structPointer_BoolSlice(base, p.field) + l := len(s) + if l == 0 { + return 0 + } + return l * (len(p.tagcode) + 1) // each bool takes exactly one byte +} + +// Encode a slice of bools ([]bool) in packed format. +func (o *Buffer) enc_slice_packed_bool(p *Properties, base structPointer) error { + s := *structPointer_BoolSlice(base, p.field) + l := len(s) + if l == 0 { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeVarint(uint64(l)) // each bool takes exactly one byte + for _, x := range s { + v := uint64(0) + if x { + v = 1 + } + p.valEnc(o, v) + } + return nil +} + +func size_slice_packed_bool(p *Properties, base structPointer) (n int) { + s := *structPointer_BoolSlice(base, p.field) + l := len(s) + if l == 0 { + return 0 + } + n += len(p.tagcode) + n += sizeVarint(uint64(l)) + n += l // each bool takes exactly one byte + return +} + +// Encode a slice of bytes ([]byte). +func (o *Buffer) enc_slice_byte(p *Properties, base structPointer) error { + s := *structPointer_Bytes(base, p.field) + if s == nil { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(s) + return nil +} + +func (o *Buffer) enc_proto3_slice_byte(p *Properties, base structPointer) error { + s := *structPointer_Bytes(base, p.field) + if len(s) == 0 { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(s) + return nil +} + +func size_slice_byte(p *Properties, base structPointer) (n int) { + s := *structPointer_Bytes(base, p.field) + if s == nil && !p.oneof { + return 0 + } + n += len(p.tagcode) + n += sizeRawBytes(s) + return +} + +func size_proto3_slice_byte(p *Properties, base structPointer) (n int) { + s := *structPointer_Bytes(base, p.field) + if len(s) == 0 && !p.oneof { + return 0 + } + n += len(p.tagcode) + n += sizeRawBytes(s) + return +} + +// Encode a slice of int32s ([]int32). +func (o *Buffer) enc_slice_int32(p *Properties, base structPointer) error { + s := structPointer_Word32Slice(base, p.field) + l := s.Len() + if l == 0 { + return ErrNil + } + for i := 0; i < l; i++ { + o.buf = append(o.buf, p.tagcode...) + x := int32(s.Index(i)) // permit sign extension to use full 64-bit range + p.valEnc(o, uint64(x)) + } + return nil +} + +func size_slice_int32(p *Properties, base structPointer) (n int) { + s := structPointer_Word32Slice(base, p.field) + l := s.Len() + if l == 0 { + return 0 + } + for i := 0; i < l; i++ { + n += len(p.tagcode) + x := int32(s.Index(i)) // permit sign extension to use full 64-bit range + n += p.valSize(uint64(x)) + } + return +} + +// Encode a slice of int32s ([]int32) in packed format. +func (o *Buffer) enc_slice_packed_int32(p *Properties, base structPointer) error { + s := structPointer_Word32Slice(base, p.field) + l := s.Len() + if l == 0 { + return ErrNil + } + // TODO: Reuse a Buffer. + buf := NewBuffer(nil) + for i := 0; i < l; i++ { + x := int32(s.Index(i)) // permit sign extension to use full 64-bit range + p.valEnc(buf, uint64(x)) + } + + o.buf = append(o.buf, p.tagcode...) + o.EncodeVarint(uint64(len(buf.buf))) + o.buf = append(o.buf, buf.buf...) + return nil +} + +func size_slice_packed_int32(p *Properties, base structPointer) (n int) { + s := structPointer_Word32Slice(base, p.field) + l := s.Len() + if l == 0 { + return 0 + } + var bufSize int + for i := 0; i < l; i++ { + x := int32(s.Index(i)) // permit sign extension to use full 64-bit range + bufSize += p.valSize(uint64(x)) + } + + n += len(p.tagcode) + n += sizeVarint(uint64(bufSize)) + n += bufSize + return +} + +// Encode a slice of uint32s ([]uint32). +// Exactly the same as int32, except for no sign extension. +func (o *Buffer) enc_slice_uint32(p *Properties, base structPointer) error { + s := structPointer_Word32Slice(base, p.field) + l := s.Len() + if l == 0 { + return ErrNil + } + for i := 0; i < l; i++ { + o.buf = append(o.buf, p.tagcode...) + x := s.Index(i) + p.valEnc(o, uint64(x)) + } + return nil +} + +func size_slice_uint32(p *Properties, base structPointer) (n int) { + s := structPointer_Word32Slice(base, p.field) + l := s.Len() + if l == 0 { + return 0 + } + for i := 0; i < l; i++ { + n += len(p.tagcode) + x := s.Index(i) + n += p.valSize(uint64(x)) + } + return +} + +// Encode a slice of uint32s ([]uint32) in packed format. +// Exactly the same as int32, except for no sign extension. +func (o *Buffer) enc_slice_packed_uint32(p *Properties, base structPointer) error { + s := structPointer_Word32Slice(base, p.field) + l := s.Len() + if l == 0 { + return ErrNil + } + // TODO: Reuse a Buffer. + buf := NewBuffer(nil) + for i := 0; i < l; i++ { + p.valEnc(buf, uint64(s.Index(i))) + } + + o.buf = append(o.buf, p.tagcode...) + o.EncodeVarint(uint64(len(buf.buf))) + o.buf = append(o.buf, buf.buf...) + return nil +} + +func size_slice_packed_uint32(p *Properties, base structPointer) (n int) { + s := structPointer_Word32Slice(base, p.field) + l := s.Len() + if l == 0 { + return 0 + } + var bufSize int + for i := 0; i < l; i++ { + bufSize += p.valSize(uint64(s.Index(i))) + } + + n += len(p.tagcode) + n += sizeVarint(uint64(bufSize)) + n += bufSize + return +} + +// Encode a slice of int64s ([]int64). +func (o *Buffer) enc_slice_int64(p *Properties, base structPointer) error { + s := structPointer_Word64Slice(base, p.field) + l := s.Len() + if l == 0 { + return ErrNil + } + for i := 0; i < l; i++ { + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, s.Index(i)) + } + return nil +} + +func size_slice_int64(p *Properties, base structPointer) (n int) { + s := structPointer_Word64Slice(base, p.field) + l := s.Len() + if l == 0 { + return 0 + } + for i := 0; i < l; i++ { + n += len(p.tagcode) + n += p.valSize(s.Index(i)) + } + return +} + +// Encode a slice of int64s ([]int64) in packed format. +func (o *Buffer) enc_slice_packed_int64(p *Properties, base structPointer) error { + s := structPointer_Word64Slice(base, p.field) + l := s.Len() + if l == 0 { + return ErrNil + } + // TODO: Reuse a Buffer. + buf := NewBuffer(nil) + for i := 0; i < l; i++ { + p.valEnc(buf, s.Index(i)) + } + + o.buf = append(o.buf, p.tagcode...) + o.EncodeVarint(uint64(len(buf.buf))) + o.buf = append(o.buf, buf.buf...) + return nil +} + +func size_slice_packed_int64(p *Properties, base structPointer) (n int) { + s := structPointer_Word64Slice(base, p.field) + l := s.Len() + if l == 0 { + return 0 + } + var bufSize int + for i := 0; i < l; i++ { + bufSize += p.valSize(s.Index(i)) + } + + n += len(p.tagcode) + n += sizeVarint(uint64(bufSize)) + n += bufSize + return +} + +// Encode a slice of slice of bytes ([][]byte). +func (o *Buffer) enc_slice_slice_byte(p *Properties, base structPointer) error { + ss := *structPointer_BytesSlice(base, p.field) + l := len(ss) + if l == 0 { + return ErrNil + } + for i := 0; i < l; i++ { + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(ss[i]) + } + return nil +} + +func size_slice_slice_byte(p *Properties, base structPointer) (n int) { + ss := *structPointer_BytesSlice(base, p.field) + l := len(ss) + if l == 0 { + return 0 + } + n += l * len(p.tagcode) + for i := 0; i < l; i++ { + n += sizeRawBytes(ss[i]) + } + return +} + +// Encode a slice of strings ([]string). +func (o *Buffer) enc_slice_string(p *Properties, base structPointer) error { + ss := *structPointer_StringSlice(base, p.field) + l := len(ss) + for i := 0; i < l; i++ { + o.buf = append(o.buf, p.tagcode...) + o.EncodeStringBytes(ss[i]) + } + return nil +} + +func size_slice_string(p *Properties, base structPointer) (n int) { + ss := *structPointer_StringSlice(base, p.field) + l := len(ss) + n += l * len(p.tagcode) + for i := 0; i < l; i++ { + n += sizeStringBytes(ss[i]) + } + return +} + +// Encode a slice of message structs ([]*struct). +func (o *Buffer) enc_slice_struct_message(p *Properties, base structPointer) error { + var state errorState + s := structPointer_StructPointerSlice(base, p.field) + l := s.Len() + + for i := 0; i < l; i++ { + structp := s.Index(i) + if structPointer_IsNil(structp) { + return errRepeatedHasNil + } + + // Can the object marshal itself? + if p.isMarshaler { + m := structPointer_Interface(structp, p.stype).(Marshaler) + data, err := m.Marshal() + if err != nil && !state.shouldContinue(err, nil) { + return err + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(data) + continue + } + + o.buf = append(o.buf, p.tagcode...) + err := o.enc_len_struct(p.sprop, structp, &state) + if err != nil && !state.shouldContinue(err, nil) { + if err == ErrNil { + return errRepeatedHasNil + } + return err + } + } + return state.err +} + +func size_slice_struct_message(p *Properties, base structPointer) (n int) { + s := structPointer_StructPointerSlice(base, p.field) + l := s.Len() + n += l * len(p.tagcode) + for i := 0; i < l; i++ { + structp := s.Index(i) + if structPointer_IsNil(structp) { + return // return the size up to this point + } + + // Can the object marshal itself? + if p.isMarshaler { + m := structPointer_Interface(structp, p.stype).(Marshaler) + data, _ := m.Marshal() + n += len(p.tagcode) + n += sizeRawBytes(data) + continue + } + + n0 := size_struct(p.sprop, structp) + n1 := sizeVarint(uint64(n0)) // size of encoded length + n += n0 + n1 + } + return +} + +// Encode a slice of group structs ([]*struct). +func (o *Buffer) enc_slice_struct_group(p *Properties, base structPointer) error { + var state errorState + s := structPointer_StructPointerSlice(base, p.field) + l := s.Len() + + for i := 0; i < l; i++ { + b := s.Index(i) + if structPointer_IsNil(b) { + return errRepeatedHasNil + } + + o.EncodeVarint(uint64((p.Tag << 3) | WireStartGroup)) + + err := o.enc_struct(p.sprop, b) + + if err != nil && !state.shouldContinue(err, nil) { + if err == ErrNil { + return errRepeatedHasNil + } + return err + } + + o.EncodeVarint(uint64((p.Tag << 3) | WireEndGroup)) + } + return state.err +} + +func size_slice_struct_group(p *Properties, base structPointer) (n int) { + s := structPointer_StructPointerSlice(base, p.field) + l := s.Len() + + n += l * sizeVarint(uint64((p.Tag<<3)|WireStartGroup)) + n += l * sizeVarint(uint64((p.Tag<<3)|WireEndGroup)) + for i := 0; i < l; i++ { + b := s.Index(i) + if structPointer_IsNil(b) { + return // return size up to this point + } + + n += size_struct(p.sprop, b) + } + return +} + +// Encode an extension map. +func (o *Buffer) enc_map(p *Properties, base structPointer) error { + v := *structPointer_ExtMap(base, p.field) + if err := encodeExtensionMap(v); err != nil { + return err + } + // Fast-path for common cases: zero or one extensions. + if len(v) <= 1 { + for _, e := range v { + o.buf = append(o.buf, e.enc...) + } + return nil + } + + // Sort keys to provide a deterministic encoding. + keys := make([]int, 0, len(v)) + for k := range v { + keys = append(keys, int(k)) + } + sort.Ints(keys) + + for _, k := range keys { + o.buf = append(o.buf, v[int32(k)].enc...) + } + return nil +} + +func size_map(p *Properties, base structPointer) int { + v := *structPointer_ExtMap(base, p.field) + return sizeExtensionMap(v) +} + +// Encode a map field. +func (o *Buffer) enc_new_map(p *Properties, base structPointer) error { + var state errorState // XXX: or do we need to plumb this through? + + /* + A map defined as + map map_field = N; + is encoded in the same way as + message MapFieldEntry { + key_type key = 1; + value_type value = 2; + } + repeated MapFieldEntry map_field = N; + */ + + v := structPointer_NewAt(base, p.field, p.mtype).Elem() // map[K]V + if v.Len() == 0 { + return nil + } + + keycopy, valcopy, keybase, valbase := mapEncodeScratch(p.mtype) + + enc := func() error { + if err := p.mkeyprop.enc(o, p.mkeyprop, keybase); err != nil { + return err + } + if err := p.mvalprop.enc(o, p.mvalprop, valbase); err != nil { + return err + } + return nil + } + + // Don't sort map keys. It is not required by the spec, and C++ doesn't do it. + for _, key := range v.MapKeys() { + val := v.MapIndex(key) + + // The only illegal map entry values are nil message pointers. + if val.Kind() == reflect.Ptr && val.IsNil() { + return errors.New("proto: map has nil element") + } + + keycopy.Set(key) + valcopy.Set(val) + + o.buf = append(o.buf, p.tagcode...) + if err := o.enc_len_thing(enc, &state); err != nil { + return err + } + } + return nil +} + +func size_new_map(p *Properties, base structPointer) int { + v := structPointer_NewAt(base, p.field, p.mtype).Elem() // map[K]V + + keycopy, valcopy, keybase, valbase := mapEncodeScratch(p.mtype) + + n := 0 + for _, key := range v.MapKeys() { + val := v.MapIndex(key) + keycopy.Set(key) + valcopy.Set(val) + + // Tag codes for key and val are the responsibility of the sub-sizer. + keysize := p.mkeyprop.size(p.mkeyprop, keybase) + valsize := p.mvalprop.size(p.mvalprop, valbase) + entry := keysize + valsize + // Add on tag code and length of map entry itself. + n += len(p.tagcode) + sizeVarint(uint64(entry)) + entry + } + return n +} + +// mapEncodeScratch returns a new reflect.Value matching the map's value type, +// and a structPointer suitable for passing to an encoder or sizer. +func mapEncodeScratch(mapType reflect.Type) (keycopy, valcopy reflect.Value, keybase, valbase structPointer) { + // Prepare addressable doubly-indirect placeholders for the key and value types. + // This is needed because the element-type encoders expect **T, but the map iteration produces T. + + keycopy = reflect.New(mapType.Key()).Elem() // addressable K + keyptr := reflect.New(reflect.PtrTo(keycopy.Type())).Elem() // addressable *K + keyptr.Set(keycopy.Addr()) // + keybase = toStructPointer(keyptr.Addr()) // **K + + // Value types are more varied and require special handling. + switch mapType.Elem().Kind() { + case reflect.Slice: + // []byte + var dummy []byte + valcopy = reflect.ValueOf(&dummy).Elem() // addressable []byte + valbase = toStructPointer(valcopy.Addr()) + case reflect.Ptr: + // message; the generated field type is map[K]*Msg (so V is *Msg), + // so we only need one level of indirection. + valcopy = reflect.New(mapType.Elem()).Elem() // addressable V + valbase = toStructPointer(valcopy.Addr()) + default: + // everything else + valcopy = reflect.New(mapType.Elem()).Elem() // addressable V + valptr := reflect.New(reflect.PtrTo(valcopy.Type())).Elem() // addressable *V + valptr.Set(valcopy.Addr()) // + valbase = toStructPointer(valptr.Addr()) // **V + } + return +} + +// Encode a struct. +func (o *Buffer) enc_struct(prop *StructProperties, base structPointer) error { + var state errorState + // Encode fields in tag order so that decoders may use optimizations + // that depend on the ordering. + // https://developers.google.com/protocol-buffers/docs/encoding#order + for _, i := range prop.order { + p := prop.Prop[i] + if p.enc != nil { + err := p.enc(o, p, base) + if err != nil { + if err == ErrNil { + if p.Required && state.err == nil { + state.err = &RequiredNotSetError{p.Name} + } + } else if err == errRepeatedHasNil { + // Give more context to nil values in repeated fields. + return errors.New("repeated field " + p.OrigName + " has nil element") + } else if !state.shouldContinue(err, p) { + return err + } + } + } + } + + // Do oneof fields. + if prop.oneofMarshaler != nil { + m := structPointer_Interface(base, prop.stype).(Message) + if err := prop.oneofMarshaler(m, o); err == ErrNil { + return errOneofHasNil + } else if err != nil { + return err + } + } + + // Add unrecognized fields at the end. + if prop.unrecField.IsValid() { + v := *structPointer_Bytes(base, prop.unrecField) + if len(v) > 0 { + o.buf = append(o.buf, v...) + } + } + + return state.err +} + +func size_struct(prop *StructProperties, base structPointer) (n int) { + for _, i := range prop.order { + p := prop.Prop[i] + if p.size != nil { + n += p.size(p, base) + } + } + + // Add unrecognized fields at the end. + if prop.unrecField.IsValid() { + v := *structPointer_Bytes(base, prop.unrecField) + n += len(v) + } + + // Factor in any oneof fields. + if prop.oneofSizer != nil { + m := structPointer_Interface(base, prop.stype).(Message) + n += prop.oneofSizer(m) + } + + return +} + +var zeroes [20]byte // longer than any conceivable sizeVarint + +// Encode a struct, preceded by its encoded length (as a varint). +func (o *Buffer) enc_len_struct(prop *StructProperties, base structPointer, state *errorState) error { + return o.enc_len_thing(func() error { return o.enc_struct(prop, base) }, state) +} + +// Encode something, preceded by its encoded length (as a varint). +func (o *Buffer) enc_len_thing(enc func() error, state *errorState) error { + iLen := len(o.buf) + o.buf = append(o.buf, 0, 0, 0, 0) // reserve four bytes for length + iMsg := len(o.buf) + err := enc() + if err != nil && !state.shouldContinue(err, nil) { + return err + } + lMsg := len(o.buf) - iMsg + lLen := sizeVarint(uint64(lMsg)) + switch x := lLen - (iMsg - iLen); { + case x > 0: // actual length is x bytes larger than the space we reserved + // Move msg x bytes right. + o.buf = append(o.buf, zeroes[:x]...) + copy(o.buf[iMsg+x:], o.buf[iMsg:iMsg+lMsg]) + case x < 0: // actual length is x bytes smaller than the space we reserved + // Move msg x bytes left. + copy(o.buf[iMsg+x:], o.buf[iMsg:iMsg+lMsg]) + o.buf = o.buf[:len(o.buf)+x] // x is negative + } + // Encode the length in the reserved space. + o.buf = o.buf[:iLen] + o.EncodeVarint(uint64(lMsg)) + o.buf = o.buf[:len(o.buf)+lMsg] + return state.err +} + +// errorState maintains the first error that occurs and updates that error +// with additional context. +type errorState struct { + err error +} + +// shouldContinue reports whether encoding should continue upon encountering the +// given error. If the error is RequiredNotSetError, shouldContinue returns true +// and, if this is the first appearance of that error, remembers it for future +// reporting. +// +// If prop is not nil, it may update any error with additional context about the +// field with the error. +func (s *errorState) shouldContinue(err error, prop *Properties) bool { + // Ignore unset required fields. + reqNotSet, ok := err.(*RequiredNotSetError) + if !ok { + return false + } + if s.err == nil { + if prop != nil { + err = &RequiredNotSetError{prop.Name + "." + reqNotSet.field} + } + s.err = err + } + return true +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/encode_gogo.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/encode_gogo.go new file mode 100644 index 0000000000000..f77cfb1eea4db --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/encode_gogo.go @@ -0,0 +1,354 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// http://github.com/golang/protobuf/ +// +// 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. + +package proto + +import ( + "reflect" +) + +func NewRequiredNotSetError(field string) *RequiredNotSetError { + return &RequiredNotSetError{field} +} + +type Sizer interface { + Size() int +} + +func (o *Buffer) enc_ext_slice_byte(p *Properties, base structPointer) error { + s := *structPointer_Bytes(base, p.field) + if s == nil { + return ErrNil + } + o.buf = append(o.buf, s...) + return nil +} + +func size_ext_slice_byte(p *Properties, base structPointer) (n int) { + s := *structPointer_Bytes(base, p.field) + if s == nil { + return 0 + } + n += len(s) + return +} + +// Encode a reference to bool pointer. +func (o *Buffer) enc_ref_bool(p *Properties, base structPointer) error { + v := *structPointer_BoolVal(base, p.field) + x := 0 + if v { + x = 1 + } + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, uint64(x)) + return nil +} + +func size_ref_bool(p *Properties, base structPointer) int { + return len(p.tagcode) + 1 // each bool takes exactly one byte +} + +// Encode a reference to int32 pointer. +func (o *Buffer) enc_ref_int32(p *Properties, base structPointer) error { + v := structPointer_Word32Val(base, p.field) + x := int32(word32Val_Get(v)) + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, uint64(x)) + return nil +} + +func size_ref_int32(p *Properties, base structPointer) (n int) { + v := structPointer_Word32Val(base, p.field) + x := int32(word32Val_Get(v)) + n += len(p.tagcode) + n += p.valSize(uint64(x)) + return +} + +func (o *Buffer) enc_ref_uint32(p *Properties, base structPointer) error { + v := structPointer_Word32Val(base, p.field) + x := word32Val_Get(v) + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, uint64(x)) + return nil +} + +func size_ref_uint32(p *Properties, base structPointer) (n int) { + v := structPointer_Word32Val(base, p.field) + x := word32Val_Get(v) + n += len(p.tagcode) + n += p.valSize(uint64(x)) + return +} + +// Encode a reference to an int64 pointer. +func (o *Buffer) enc_ref_int64(p *Properties, base structPointer) error { + v := structPointer_Word64Val(base, p.field) + x := word64Val_Get(v) + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, x) + return nil +} + +func size_ref_int64(p *Properties, base structPointer) (n int) { + v := structPointer_Word64Val(base, p.field) + x := word64Val_Get(v) + n += len(p.tagcode) + n += p.valSize(x) + return +} + +// Encode a reference to a string pointer. +func (o *Buffer) enc_ref_string(p *Properties, base structPointer) error { + v := *structPointer_StringVal(base, p.field) + o.buf = append(o.buf, p.tagcode...) + o.EncodeStringBytes(v) + return nil +} + +func size_ref_string(p *Properties, base structPointer) (n int) { + v := *structPointer_StringVal(base, p.field) + n += len(p.tagcode) + n += sizeStringBytes(v) + return +} + +// Encode a reference to a message struct. +func (o *Buffer) enc_ref_struct_message(p *Properties, base structPointer) error { + var state errorState + structp := structPointer_GetRefStructPointer(base, p.field) + if structPointer_IsNil(structp) { + return ErrNil + } + + // Can the object marshal itself? + if p.isMarshaler { + m := structPointer_Interface(structp, p.stype).(Marshaler) + data, err := m.Marshal() + if err != nil && !state.shouldContinue(err, nil) { + return err + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(data) + return nil + } + + o.buf = append(o.buf, p.tagcode...) + return o.enc_len_struct(p.sprop, structp, &state) +} + +//TODO this is only copied, please fix this +func size_ref_struct_message(p *Properties, base structPointer) int { + structp := structPointer_GetRefStructPointer(base, p.field) + if structPointer_IsNil(structp) { + return 0 + } + + // Can the object marshal itself? + if p.isMarshaler { + m := structPointer_Interface(structp, p.stype).(Marshaler) + data, _ := m.Marshal() + n0 := len(p.tagcode) + n1 := sizeRawBytes(data) + return n0 + n1 + } + + n0 := len(p.tagcode) + n1 := size_struct(p.sprop, structp) + n2 := sizeVarint(uint64(n1)) // size of encoded length + return n0 + n1 + n2 +} + +// Encode a slice of references to message struct pointers ([]struct). +func (o *Buffer) enc_slice_ref_struct_message(p *Properties, base structPointer) error { + var state errorState + ss := structPointer_GetStructPointer(base, p.field) + ss1 := structPointer_GetRefStructPointer(ss, field(0)) + size := p.stype.Size() + l := structPointer_Len(base, p.field) + for i := 0; i < l; i++ { + structp := structPointer_Add(ss1, field(uintptr(i)*size)) + if structPointer_IsNil(structp) { + return errRepeatedHasNil + } + + // Can the object marshal itself? + if p.isMarshaler { + m := structPointer_Interface(structp, p.stype).(Marshaler) + data, err := m.Marshal() + if err != nil && !state.shouldContinue(err, nil) { + return err + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(data) + continue + } + + o.buf = append(o.buf, p.tagcode...) + err := o.enc_len_struct(p.sprop, structp, &state) + if err != nil && !state.shouldContinue(err, nil) { + if err == ErrNil { + return errRepeatedHasNil + } + return err + } + + } + return state.err +} + +//TODO this is only copied, please fix this +func size_slice_ref_struct_message(p *Properties, base structPointer) (n int) { + ss := structPointer_GetStructPointer(base, p.field) + ss1 := structPointer_GetRefStructPointer(ss, field(0)) + size := p.stype.Size() + l := structPointer_Len(base, p.field) + n += l * len(p.tagcode) + for i := 0; i < l; i++ { + structp := structPointer_Add(ss1, field(uintptr(i)*size)) + if structPointer_IsNil(structp) { + return // return the size up to this point + } + + // Can the object marshal itself? + if p.isMarshaler { + m := structPointer_Interface(structp, p.stype).(Marshaler) + data, _ := m.Marshal() + n += len(p.tagcode) + n += sizeRawBytes(data) + continue + } + + n0 := size_struct(p.sprop, structp) + n1 := sizeVarint(uint64(n0)) // size of encoded length + n += n0 + n1 + } + return +} + +func (o *Buffer) enc_custom_bytes(p *Properties, base structPointer) error { + i := structPointer_InterfaceRef(base, p.field, p.ctype) + if i == nil { + return ErrNil + } + custom := i.(Marshaler) + data, err := custom.Marshal() + if err != nil { + return err + } + if data == nil { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(data) + return nil +} + +func size_custom_bytes(p *Properties, base structPointer) (n int) { + n += len(p.tagcode) + i := structPointer_InterfaceRef(base, p.field, p.ctype) + if i == nil { + return 0 + } + custom := i.(Marshaler) + data, _ := custom.Marshal() + n += sizeRawBytes(data) + return +} + +func (o *Buffer) enc_custom_ref_bytes(p *Properties, base structPointer) error { + custom := structPointer_InterfaceAt(base, p.field, p.ctype).(Marshaler) + data, err := custom.Marshal() + if err != nil { + return err + } + if data == nil { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(data) + return nil +} + +func size_custom_ref_bytes(p *Properties, base structPointer) (n int) { + n += len(p.tagcode) + i := structPointer_InterfaceAt(base, p.field, p.ctype) + if i == nil { + return 0 + } + custom := i.(Marshaler) + data, _ := custom.Marshal() + n += sizeRawBytes(data) + return +} + +func (o *Buffer) enc_custom_slice_bytes(p *Properties, base structPointer) error { + inter := structPointer_InterfaceRef(base, p.field, p.ctype) + if inter == nil { + return ErrNil + } + slice := reflect.ValueOf(inter) + l := slice.Len() + for i := 0; i < l; i++ { + v := slice.Index(i) + custom := v.Interface().(Marshaler) + data, err := custom.Marshal() + if err != nil { + return err + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(data) + } + return nil +} + +func size_custom_slice_bytes(p *Properties, base structPointer) (n int) { + inter := structPointer_InterfaceRef(base, p.field, p.ctype) + if inter == nil { + return 0 + } + slice := reflect.ValueOf(inter) + l := slice.Len() + n += l * len(p.tagcode) + for i := 0; i < l; i++ { + v := slice.Index(i) + custom := v.Interface().(Marshaler) + data, _ := custom.Marshal() + n += sizeRawBytes(data) + } + return +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/equal.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/equal.go new file mode 100644 index 0000000000000..f5db1def3c248 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/equal.go @@ -0,0 +1,276 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2011 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +// Protocol buffer comparison. + +package proto + +import ( + "bytes" + "log" + "reflect" + "strings" +) + +/* +Equal returns true iff protocol buffers a and b are equal. +The arguments must both be pointers to protocol buffer structs. + +Equality is defined in this way: + - Two messages are equal iff they are the same type, + corresponding fields are equal, unknown field sets + are equal, and extensions sets are equal. + - Two set scalar fields are equal iff their values are equal. + If the fields are of a floating-point type, remember that + NaN != x for all x, including NaN. If the message is defined + in a proto3 .proto file, fields are not "set"; specifically, + zero length proto3 "bytes" fields are equal (nil == {}). + - Two repeated fields are equal iff their lengths are the same, + and their corresponding elements are equal (a "bytes" field, + although represented by []byte, is not a repeated field) + - Two unset fields are equal. + - Two unknown field sets are equal if their current + encoded state is equal. + - Two extension sets are equal iff they have corresponding + elements that are pairwise equal. + - Every other combination of things are not equal. + +The return value is undefined if a and b are not protocol buffers. +*/ +func Equal(a, b Message) bool { + if a == nil || b == nil { + return a == b + } + v1, v2 := reflect.ValueOf(a), reflect.ValueOf(b) + if v1.Type() != v2.Type() { + return false + } + if v1.Kind() == reflect.Ptr { + if v1.IsNil() { + return v2.IsNil() + } + if v2.IsNil() { + return false + } + v1, v2 = v1.Elem(), v2.Elem() + } + if v1.Kind() != reflect.Struct { + return false + } + return equalStruct(v1, v2) +} + +// v1 and v2 are known to have the same type. +func equalStruct(v1, v2 reflect.Value) bool { + sprop := GetProperties(v1.Type()) + for i := 0; i < v1.NumField(); i++ { + f := v1.Type().Field(i) + if strings.HasPrefix(f.Name, "XXX_") { + continue + } + f1, f2 := v1.Field(i), v2.Field(i) + if f.Type.Kind() == reflect.Ptr { + if n1, n2 := f1.IsNil(), f2.IsNil(); n1 && n2 { + // both unset + continue + } else if n1 != n2 { + // set/unset mismatch + return false + } + b1, ok := f1.Interface().(raw) + if ok { + b2 := f2.Interface().(raw) + // RawMessage + if !bytes.Equal(b1.Bytes(), b2.Bytes()) { + return false + } + continue + } + f1, f2 = f1.Elem(), f2.Elem() + } + if !equalAny(f1, f2, sprop.Prop[i]) { + return false + } + } + + if em1 := v1.FieldByName("XXX_extensions"); em1.IsValid() { + em2 := v2.FieldByName("XXX_extensions") + if !equalExtensions(v1.Type(), em1.Interface().(map[int32]Extension), em2.Interface().(map[int32]Extension)) { + return false + } + } + + uf := v1.FieldByName("XXX_unrecognized") + if !uf.IsValid() { + return true + } + + u1 := uf.Bytes() + u2 := v2.FieldByName("XXX_unrecognized").Bytes() + if !bytes.Equal(u1, u2) { + return false + } + + return true +} + +// v1 and v2 are known to have the same type. +// prop may be nil. +func equalAny(v1, v2 reflect.Value, prop *Properties) bool { + if v1.Type() == protoMessageType { + m1, _ := v1.Interface().(Message) + m2, _ := v2.Interface().(Message) + return Equal(m1, m2) + } + switch v1.Kind() { + case reflect.Bool: + return v1.Bool() == v2.Bool() + case reflect.Float32, reflect.Float64: + return v1.Float() == v2.Float() + case reflect.Int32, reflect.Int64: + return v1.Int() == v2.Int() + case reflect.Interface: + // Probably a oneof field; compare the inner values. + n1, n2 := v1.IsNil(), v2.IsNil() + if n1 || n2 { + return n1 == n2 + } + e1, e2 := v1.Elem(), v2.Elem() + if e1.Type() != e2.Type() { + return false + } + return equalAny(e1, e2, nil) + case reflect.Map: + if v1.Len() != v2.Len() { + return false + } + for _, key := range v1.MapKeys() { + val2 := v2.MapIndex(key) + if !val2.IsValid() { + // This key was not found in the second map. + return false + } + if !equalAny(v1.MapIndex(key), val2, nil) { + return false + } + } + return true + case reflect.Ptr: + return equalAny(v1.Elem(), v2.Elem(), prop) + case reflect.Slice: + if v1.Type().Elem().Kind() == reflect.Uint8 { + // short circuit: []byte + + // Edge case: if this is in a proto3 message, a zero length + // bytes field is considered the zero value. + if prop != nil && prop.proto3 && v1.Len() == 0 && v2.Len() == 0 { + return true + } + if v1.IsNil() != v2.IsNil() { + return false + } + return bytes.Equal(v1.Interface().([]byte), v2.Interface().([]byte)) + } + + if v1.Len() != v2.Len() { + return false + } + for i := 0; i < v1.Len(); i++ { + if !equalAny(v1.Index(i), v2.Index(i), prop) { + return false + } + } + return true + case reflect.String: + return v1.Interface().(string) == v2.Interface().(string) + case reflect.Struct: + return equalStruct(v1, v2) + case reflect.Uint32, reflect.Uint64: + return v1.Uint() == v2.Uint() + } + + // unknown type, so not a protocol buffer + log.Printf("proto: don't know how to compare %v", v1) + return false +} + +// base is the struct type that the extensions are based on. +// em1 and em2 are extension maps. +func equalExtensions(base reflect.Type, em1, em2 map[int32]Extension) bool { + if len(em1) != len(em2) { + return false + } + + for extNum, e1 := range em1 { + e2, ok := em2[extNum] + if !ok { + return false + } + + m1, m2 := e1.value, e2.value + + if m1 != nil && m2 != nil { + // Both are unencoded. + if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2), nil) { + return false + } + continue + } + + // At least one is encoded. To do a semantically correct comparison + // we need to unmarshal them first. + var desc *ExtensionDesc + if m := extensionMaps[base]; m != nil { + desc = m[extNum] + } + if desc == nil { + log.Printf("proto: don't know how to compare extension %d of %v", extNum, base) + continue + } + var err error + if m1 == nil { + m1, err = decodeExtension(e1.enc, desc) + } + if m2 == nil && err == nil { + m2, err = decodeExtension(e2.enc, desc) + } + if err != nil { + // The encoded form is invalid. + log.Printf("proto: badly encoded extension %d of %v: %v", extNum, base, err) + return false + } + if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2), nil) { + return false + } + } + + return true +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/extensions.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/extensions.go new file mode 100644 index 0000000000000..6180347e3933e --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/extensions.go @@ -0,0 +1,518 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto + +/* + * Types and routines for supporting protocol buffer extensions. + */ + +import ( + "errors" + "fmt" + "reflect" + "strconv" + "sync" +) + +// ErrMissingExtension is the error returned by GetExtension if the named extension is not in the message. +var ErrMissingExtension = errors.New("proto: missing extension") + +// ExtensionRange represents a range of message extensions for a protocol buffer. +// Used in code generated by the protocol compiler. +type ExtensionRange struct { + Start, End int32 // both inclusive +} + +// extendableProto is an interface implemented by any protocol buffer that may be extended. +type extendableProto interface { + Message + ExtensionRangeArray() []ExtensionRange +} + +type extensionsMap interface { + extendableProto + ExtensionMap() map[int32]Extension +} + +type extensionsBytes interface { + extendableProto + GetExtensions() *[]byte +} + +var extendableProtoType = reflect.TypeOf((*extendableProto)(nil)).Elem() + +// ExtensionDesc represents an extension specification. +// Used in generated code from the protocol compiler. +type ExtensionDesc struct { + ExtendedType Message // nil pointer to the type that is being extended + ExtensionType interface{} // nil pointer to the extension type + Field int32 // field number + Name string // fully-qualified name of extension, for text formatting + Tag string // protobuf tag style +} + +func (ed *ExtensionDesc) repeated() bool { + t := reflect.TypeOf(ed.ExtensionType) + return t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 +} + +// Extension represents an extension in a message. +type Extension struct { + // When an extension is stored in a message using SetExtension + // only desc and value are set. When the message is marshaled + // enc will be set to the encoded form of the message. + // + // When a message is unmarshaled and contains extensions, each + // extension will have only enc set. When such an extension is + // accessed using GetExtension (or GetExtensions) desc and value + // will be set. + desc *ExtensionDesc + value interface{} + enc []byte +} + +// SetRawExtension is for testing only. +func SetRawExtension(base extendableProto, id int32, b []byte) { + if ebase, ok := base.(extensionsMap); ok { + ebase.ExtensionMap()[id] = Extension{enc: b} + } else if ebase, ok := base.(extensionsBytes); ok { + clearExtension(base, id) + ext := ebase.GetExtensions() + *ext = append(*ext, b...) + } else { + panic("unreachable") + } +} + +// isExtensionField returns true iff the given field number is in an extension range. +func isExtensionField(pb extendableProto, field int32) bool { + for _, er := range pb.ExtensionRangeArray() { + if er.Start <= field && field <= er.End { + return true + } + } + return false +} + +// checkExtensionTypes checks that the given extension is valid for pb. +func checkExtensionTypes(pb extendableProto, extension *ExtensionDesc) error { + // Check the extended type. + if a, b := reflect.TypeOf(pb), reflect.TypeOf(extension.ExtendedType); a != b { + return errors.New("proto: bad extended type; " + b.String() + " does not extend " + a.String()) + } + // Check the range. + if !isExtensionField(pb, extension.Field) { + return errors.New("proto: bad extension number; not in declared ranges") + } + return nil +} + +// extPropKey is sufficient to uniquely identify an extension. +type extPropKey struct { + base reflect.Type + field int32 +} + +var extProp = struct { + sync.RWMutex + m map[extPropKey]*Properties +}{ + m: make(map[extPropKey]*Properties), +} + +func extensionProperties(ed *ExtensionDesc) *Properties { + key := extPropKey{base: reflect.TypeOf(ed.ExtendedType), field: ed.Field} + + extProp.RLock() + if prop, ok := extProp.m[key]; ok { + extProp.RUnlock() + return prop + } + extProp.RUnlock() + + extProp.Lock() + defer extProp.Unlock() + // Check again. + if prop, ok := extProp.m[key]; ok { + return prop + } + + prop := new(Properties) + prop.Init(reflect.TypeOf(ed.ExtensionType), "unknown_name", ed.Tag, nil) + extProp.m[key] = prop + return prop +} + +// encodeExtensionMap encodes any unmarshaled (unencoded) extensions in m. +func encodeExtensionMap(m map[int32]Extension) error { + for k, e := range m { + err := encodeExtension(&e) + if err != nil { + return err + } + m[k] = e + } + return nil +} + +func encodeExtension(e *Extension) error { + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + return nil + } + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + et := reflect.TypeOf(e.desc.ExtensionType) + props := extensionProperties(e.desc) + + p := NewBuffer(nil) + // If e.value has type T, the encoder expects a *struct{ X T }. + // Pass a *T with a zero field and hope it all works out. + x := reflect.New(et) + x.Elem().Set(reflect.ValueOf(e.value)) + if err := props.enc(p, props, toStructPointer(x)); err != nil { + return err + } + e.enc = p.buf + return nil +} + +func sizeExtensionMap(m map[int32]Extension) (n int) { + for _, e := range m { + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + n += len(e.enc) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + et := reflect.TypeOf(e.desc.ExtensionType) + props := extensionProperties(e.desc) + + // If e.value has type T, the encoder expects a *struct{ X T }. + // Pass a *T with a zero field and hope it all works out. + x := reflect.New(et) + x.Elem().Set(reflect.ValueOf(e.value)) + n += props.size(props, toStructPointer(x)) + } + return +} + +// HasExtension returns whether the given extension is present in pb. +func HasExtension(pb extendableProto, extension *ExtensionDesc) bool { + // TODO: Check types, field numbers, etc.? + if epb, doki := pb.(extensionsMap); doki { + _, ok := epb.ExtensionMap()[extension.Field] + return ok + } else if epb, doki := pb.(extensionsBytes); doki { + ext := epb.GetExtensions() + buf := *ext + o := 0 + for o < len(buf) { + tag, n := DecodeVarint(buf[o:]) + fieldNum := int32(tag >> 3) + if int32(fieldNum) == extension.Field { + return true + } + wireType := int(tag & 0x7) + o += n + l, err := size(buf[o:], wireType) + if err != nil { + return false + } + o += l + } + return false + } + panic("unreachable") +} + +func deleteExtension(pb extensionsBytes, theFieldNum int32, offset int) int { + ext := pb.GetExtensions() + for offset < len(*ext) { + tag, n1 := DecodeVarint((*ext)[offset:]) + fieldNum := int32(tag >> 3) + wireType := int(tag & 0x7) + n2, err := size((*ext)[offset+n1:], wireType) + if err != nil { + panic(err) + } + newOffset := offset + n1 + n2 + if fieldNum == theFieldNum { + *ext = append((*ext)[:offset], (*ext)[newOffset:]...) + return offset + } + offset = newOffset + } + return -1 +} + +func clearExtension(pb extendableProto, fieldNum int32) { + if epb, doki := pb.(extensionsMap); doki { + delete(epb.ExtensionMap(), fieldNum) + } else if epb, doki := pb.(extensionsBytes); doki { + offset := 0 + for offset != -1 { + offset = deleteExtension(epb, fieldNum, offset) + } + } else { + panic("unreachable") + } +} + +// ClearExtension removes the given extension from pb. +func ClearExtension(pb extendableProto, extension *ExtensionDesc) { + // TODO: Check types, field numbers, etc.? + clearExtension(pb, extension.Field) +} + +// GetExtension parses and returns the given extension of pb. +// If the extension is not present it returns ErrMissingExtension. +func GetExtension(pb extendableProto, extension *ExtensionDesc) (interface{}, error) { + if err := checkExtensionTypes(pb, extension); err != nil { + return nil, err + } + + if epb, doki := pb.(extensionsMap); doki { + emap := epb.ExtensionMap() + e, ok := emap[extension.Field] + if !ok { + // defaultExtensionValue returns the default value or + // ErrMissingExtension if there is no default. + return defaultExtensionValue(extension) + } + if e.value != nil { + // Already decoded. Check the descriptor, though. + if e.desc != extension { + // This shouldn't happen. If it does, it means that + // GetExtension was called twice with two different + // descriptors with the same field number. + return nil, errors.New("proto: descriptor conflict") + } + return e.value, nil + } + + v, err := decodeExtension(e.enc, extension) + if err != nil { + return nil, err + } + + // Remember the decoded version and drop the encoded version. + // That way it is safe to mutate what we return. + e.value = v + e.desc = extension + e.enc = nil + emap[extension.Field] = e + return e.value, nil + } else if epb, doki := pb.(extensionsBytes); doki { + ext := epb.GetExtensions() + o := 0 + for o < len(*ext) { + tag, n := DecodeVarint((*ext)[o:]) + fieldNum := int32(tag >> 3) + wireType := int(tag & 0x7) + l, err := size((*ext)[o+n:], wireType) + if err != nil { + return nil, err + } + if int32(fieldNum) == extension.Field { + v, err := decodeExtension((*ext)[o:o+n+l], extension) + if err != nil { + return nil, err + } + return v, nil + } + o += n + l + } + return defaultExtensionValue(extension) + } + panic("unreachable") +} + +// defaultExtensionValue returns the default value for extension. +// If no default for an extension is defined ErrMissingExtension is returned. +func defaultExtensionValue(extension *ExtensionDesc) (interface{}, error) { + t := reflect.TypeOf(extension.ExtensionType) + props := extensionProperties(extension) + + sf, _, err := fieldDefault(t, props) + if err != nil { + return nil, err + } + + if sf == nil || sf.value == nil { + // There is no default value. + return nil, ErrMissingExtension + } + + if t.Kind() != reflect.Ptr { + // We do not need to return a Ptr, we can directly return sf.value. + return sf.value, nil + } + + // We need to return an interface{} that is a pointer to sf.value. + value := reflect.New(t).Elem() + value.Set(reflect.New(value.Type().Elem())) + if sf.kind == reflect.Int32 { + // We may have an int32 or an enum, but the underlying data is int32. + // Since we can't set an int32 into a non int32 reflect.value directly + // set it as a int32. + value.Elem().SetInt(int64(sf.value.(int32))) + } else { + value.Elem().Set(reflect.ValueOf(sf.value)) + } + return value.Interface(), nil +} + +// decodeExtension decodes an extension encoded in b. +func decodeExtension(b []byte, extension *ExtensionDesc) (interface{}, error) { + o := NewBuffer(b) + + t := reflect.TypeOf(extension.ExtensionType) + + props := extensionProperties(extension) + + // t is a pointer to a struct, pointer to basic type or a slice. + // Allocate a "field" to store the pointer/slice itself; the + // pointer/slice will be stored here. We pass + // the address of this field to props.dec. + // This passes a zero field and a *t and lets props.dec + // interpret it as a *struct{ x t }. + value := reflect.New(t).Elem() + + for { + // Discard wire type and field number varint. It isn't needed. + if _, err := o.DecodeVarint(); err != nil { + return nil, err + } + + if err := props.dec(o, props, toStructPointer(value.Addr())); err != nil { + return nil, err + } + + if o.index >= len(o.buf) { + break + } + } + return value.Interface(), nil +} + +// GetExtensions returns a slice of the extensions present in pb that are also listed in es. +// The returned slice has the same length as es; missing extensions will appear as nil elements. +func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, err error) { + epb, ok := pb.(extendableProto) + if !ok { + err = errors.New("proto: not an extendable proto") + return + } + extensions = make([]interface{}, len(es)) + for i, e := range es { + extensions[i], err = GetExtension(epb, e) + if err == ErrMissingExtension { + err = nil + } + if err != nil { + return + } + } + return +} + +// SetExtension sets the specified extension of pb to the specified value. +func SetExtension(pb extendableProto, extension *ExtensionDesc, value interface{}) error { + if err := checkExtensionTypes(pb, extension); err != nil { + return err + } + typ := reflect.TypeOf(extension.ExtensionType) + if typ != reflect.TypeOf(value) { + return errors.New("proto: bad extension value type") + } + // nil extension values need to be caught early, because the + // encoder can't distinguish an ErrNil due to a nil extension + // from an ErrNil due to a missing field. Extensions are + // always optional, so the encoder would just swallow the error + // and drop all the extensions from the encoded message. + if reflect.ValueOf(value).IsNil() { + return fmt.Errorf("proto: SetExtension called with nil value of type %T", value) + } + return setExtension(pb, extension, value) +} + +func setExtension(pb extendableProto, extension *ExtensionDesc, value interface{}) error { + if epb, doki := pb.(extensionsMap); doki { + epb.ExtensionMap()[extension.Field] = Extension{desc: extension, value: value} + } else if epb, doki := pb.(extensionsBytes); doki { + ClearExtension(pb, extension) + ext := epb.GetExtensions() + et := reflect.TypeOf(extension.ExtensionType) + props := extensionProperties(extension) + p := NewBuffer(nil) + x := reflect.New(et) + x.Elem().Set(reflect.ValueOf(value)) + if err := props.enc(p, props, toStructPointer(x)); err != nil { + return err + } + *ext = append(*ext, p.buf...) + } + return nil +} + +// A global registry of extensions. +// The generated code will register the generated descriptors by calling RegisterExtension. + +var extensionMaps = make(map[reflect.Type]map[int32]*ExtensionDesc) + +// RegisterExtension is called from the generated code. +func RegisterExtension(desc *ExtensionDesc) { + st := reflect.TypeOf(desc.ExtendedType).Elem() + m := extensionMaps[st] + if m == nil { + m = make(map[int32]*ExtensionDesc) + extensionMaps[st] = m + } + if _, ok := m[desc.Field]; ok { + panic("proto: duplicate extension registered: " + st.String() + " " + strconv.Itoa(int(desc.Field))) + } + m[desc.Field] = desc +} + +// RegisteredExtensions returns a map of the registered extensions of a +// protocol buffer struct, indexed by the extension number. +// The argument pb should be a nil pointer to the struct type. +func RegisteredExtensions(pb Message) map[int32]*ExtensionDesc { + return extensionMaps[reflect.TypeOf(pb).Elem()] +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/extensions_gogo.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/extensions_gogo.go new file mode 100644 index 0000000000000..86b1fa2344fcf --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/extensions_gogo.go @@ -0,0 +1,236 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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. +// +// 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. + +package proto + +import ( + "bytes" + "errors" + "fmt" + "reflect" + "sort" + "strings" +) + +func GetBoolExtension(pb extendableProto, extension *ExtensionDesc, ifnotset bool) bool { + if reflect.ValueOf(pb).IsNil() { + return ifnotset + } + value, err := GetExtension(pb, extension) + if err != nil { + return ifnotset + } + if value == nil { + return ifnotset + } + if value.(*bool) == nil { + return ifnotset + } + return *(value.(*bool)) +} + +func (this *Extension) Equal(that *Extension) bool { + return bytes.Equal(this.enc, that.enc) +} + +func (this *Extension) Compare(that *Extension) int { + return bytes.Compare(this.enc, that.enc) +} + +func SizeOfExtensionMap(m map[int32]Extension) (n int) { + return sizeExtensionMap(m) +} + +type sortableMapElem struct { + field int32 + ext Extension +} + +func newSortableExtensionsFromMap(m map[int32]Extension) sortableExtensions { + s := make(sortableExtensions, 0, len(m)) + for k, v := range m { + s = append(s, &sortableMapElem{field: k, ext: v}) + } + return s +} + +type sortableExtensions []*sortableMapElem + +func (this sortableExtensions) Len() int { return len(this) } + +func (this sortableExtensions) Swap(i, j int) { this[i], this[j] = this[j], this[i] } + +func (this sortableExtensions) Less(i, j int) bool { return this[i].field < this[j].field } + +func (this sortableExtensions) String() string { + sort.Sort(this) + ss := make([]string, len(this)) + for i := range this { + ss[i] = fmt.Sprintf("%d: %v", this[i].field, this[i].ext) + } + return "map[" + strings.Join(ss, ",") + "]" +} + +func StringFromExtensionsMap(m map[int32]Extension) string { + return newSortableExtensionsFromMap(m).String() +} + +func StringFromExtensionsBytes(ext []byte) string { + m, err := BytesToExtensionsMap(ext) + if err != nil { + panic(err) + } + return StringFromExtensionsMap(m) +} + +func EncodeExtensionMap(m map[int32]Extension, data []byte) (n int, err error) { + if err := encodeExtensionMap(m); err != nil { + return 0, err + } + keys := make([]int, 0, len(m)) + for k := range m { + keys = append(keys, int(k)) + } + sort.Ints(keys) + for _, k := range keys { + n += copy(data[n:], m[int32(k)].enc) + } + return n, nil +} + +func GetRawExtension(m map[int32]Extension, id int32) ([]byte, error) { + if m[id].value == nil || m[id].desc == nil { + return m[id].enc, nil + } + if err := encodeExtensionMap(m); err != nil { + return nil, err + } + return m[id].enc, nil +} + +func size(buf []byte, wire int) (int, error) { + switch wire { + case WireVarint: + _, n := DecodeVarint(buf) + return n, nil + case WireFixed64: + return 8, nil + case WireBytes: + v, n := DecodeVarint(buf) + return int(v) + n, nil + case WireFixed32: + return 4, nil + case WireStartGroup: + offset := 0 + for { + u, n := DecodeVarint(buf[offset:]) + fwire := int(u & 0x7) + offset += n + if fwire == WireEndGroup { + return offset, nil + } + s, err := size(buf[offset:], wire) + if err != nil { + return 0, err + } + offset += s + } + } + return 0, fmt.Errorf("proto: can't get size for unknown wire type %d", wire) +} + +func BytesToExtensionsMap(buf []byte) (map[int32]Extension, error) { + m := make(map[int32]Extension) + i := 0 + for i < len(buf) { + tag, n := DecodeVarint(buf[i:]) + if n <= 0 { + return nil, fmt.Errorf("unable to decode varint") + } + fieldNum := int32(tag >> 3) + wireType := int(tag & 0x7) + l, err := size(buf[i+n:], wireType) + if err != nil { + return nil, err + } + end := i + int(l) + n + m[int32(fieldNum)] = Extension{enc: buf[i:end]} + i = end + } + return m, nil +} + +func NewExtension(e []byte) Extension { + ee := Extension{enc: make([]byte, len(e))} + copy(ee.enc, e) + return ee +} + +func AppendExtension(e extendableProto, tag int32, buf []byte) { + if ee, eok := e.(extensionsMap); eok { + ext := ee.ExtensionMap()[int32(tag)] // may be missing + ext.enc = append(ext.enc, buf...) + ee.ExtensionMap()[int32(tag)] = ext + } else if ee, eok := e.(extensionsBytes); eok { + ext := ee.GetExtensions() + *ext = append(*ext, buf...) + } +} + +func (this Extension) GoString() string { + if this.enc == nil { + if err := encodeExtension(&this); err != nil { + panic(err) + } + } + return fmt.Sprintf("proto.NewExtension(%#v)", this.enc) +} + +func SetUnsafeExtension(pb extendableProto, fieldNum int32, value interface{}) error { + typ := reflect.TypeOf(pb).Elem() + ext, ok := extensionMaps[typ] + if !ok { + return fmt.Errorf("proto: bad extended type; %s is not extendable", typ.String()) + } + desc, ok := ext[fieldNum] + if !ok { + return errors.New("proto: bad extension number; not in declared ranges") + } + return setExtension(pb, desc, value) +} + +func GetUnsafeExtension(pb extendableProto, fieldNum int32) (interface{}, error) { + typ := reflect.TypeOf(pb).Elem() + ext, ok := extensionMaps[typ] + if !ok { + return nil, fmt.Errorf("proto: bad extended type; %s is not extendable", typ.String()) + } + desc, ok := ext[fieldNum] + if !ok { + return nil, fmt.Errorf("unregistered field number %d", fieldNum) + } + return GetExtension(pb, desc) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/lib.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/lib.go new file mode 100644 index 0000000000000..2e35ae2d2ace5 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/lib.go @@ -0,0 +1,894 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +/* +Package proto converts data structures to and from the wire format of +protocol buffers. It works in concert with the Go source code generated +for .proto files by the protocol compiler. + +A summary of the properties of the protocol buffer interface +for a protocol buffer variable v: + + - Names are turned from camel_case to CamelCase for export. + - There are no methods on v to set fields; just treat + them as structure fields. + - There are getters that return a field's value if set, + and return the field's default value if unset. + The getters work even if the receiver is a nil message. + - The zero value for a struct is its correct initialization state. + All desired fields must be set before marshaling. + - A Reset() method will restore a protobuf struct to its zero state. + - Non-repeated fields are pointers to the values; nil means unset. + That is, optional or required field int32 f becomes F *int32. + - Repeated fields are slices. + - Helper functions are available to aid the setting of fields. + msg.Foo = proto.String("hello") // set field + - Constants are defined to hold the default values of all fields that + have them. They have the form Default_StructName_FieldName. + Because the getter methods handle defaulted values, + direct use of these constants should be rare. + - Enums are given type names and maps from names to values. + Enum values are prefixed by the enclosing message's name, or by the + enum's type name if it is a top-level enum. Enum types have a String + method, and a Enum method to assist in message construction. + - Nested messages, groups and enums have type names prefixed with the name of + the surrounding message type. + - Extensions are given descriptor names that start with E_, + followed by an underscore-delimited list of the nested messages + that contain it (if any) followed by the CamelCased name of the + extension field itself. HasExtension, ClearExtension, GetExtension + and SetExtension are functions for manipulating extensions. + - Oneof field sets are given a single field in their message, + with distinguished wrapper types for each possible field value. + - Marshal and Unmarshal are functions to encode and decode the wire format. + +When the .proto file specifies `syntax="proto3"`, there are some differences: + + - Non-repeated fields of non-message type are values instead of pointers. + - Getters are only generated for message and oneof fields. + - Enum types do not get an Enum method. + +The simplest way to describe this is to see an example. +Given file test.proto, containing + + package example; + + enum FOO { X = 17; } + + message Test { + required string label = 1; + optional int32 type = 2 [default=77]; + repeated int64 reps = 3; + optional group OptionalGroup = 4 { + required string RequiredField = 5; + } + oneof union { + int32 number = 6; + string name = 7; + } + } + +The resulting file, test.pb.go, is: + + package example + + import proto "github.com/gogo/protobuf/proto" + import math "math" + + type FOO int32 + const ( + FOO_X FOO = 17 + ) + var FOO_name = map[int32]string{ + 17: "X", + } + var FOO_value = map[string]int32{ + "X": 17, + } + + func (x FOO) Enum() *FOO { + p := new(FOO) + *p = x + return p + } + func (x FOO) String() string { + return proto.EnumName(FOO_name, int32(x)) + } + func (x *FOO) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FOO_value, data) + if err != nil { + return err + } + *x = FOO(value) + return nil + } + + type Test struct { + Label *string `protobuf:"bytes,1,req,name=label" json:"label,omitempty"` + Type *int32 `protobuf:"varint,2,opt,name=type,def=77" json:"type,omitempty"` + Reps []int64 `protobuf:"varint,3,rep,name=reps" json:"reps,omitempty"` + Optionalgroup *Test_OptionalGroup `protobuf:"group,4,opt,name=OptionalGroup" json:"optionalgroup,omitempty"` + // Types that are valid to be assigned to Union: + // *Test_Number + // *Test_Name + Union isTest_Union `protobuf_oneof:"union"` + XXX_unrecognized []byte `json:"-"` + } + func (m *Test) Reset() { *m = Test{} } + func (m *Test) String() string { return proto.CompactTextString(m) } + func (*Test) ProtoMessage() {} + + type isTest_Union interface { + isTest_Union() + } + + type Test_Number struct { + Number int32 `protobuf:"varint,6,opt,name=number"` + } + type Test_Name struct { + Name string `protobuf:"bytes,7,opt,name=name"` + } + + func (*Test_Number) isTest_Union() {} + func (*Test_Name) isTest_Union() {} + + func (m *Test) GetUnion() isTest_Union { + if m != nil { + return m.Union + } + return nil + } + const Default_Test_Type int32 = 77 + + func (m *Test) GetLabel() string { + if m != nil && m.Label != nil { + return *m.Label + } + return "" + } + + func (m *Test) GetType() int32 { + if m != nil && m.Type != nil { + return *m.Type + } + return Default_Test_Type + } + + func (m *Test) GetOptionalgroup() *Test_OptionalGroup { + if m != nil { + return m.Optionalgroup + } + return nil + } + + type Test_OptionalGroup struct { + RequiredField *string `protobuf:"bytes,5,req" json:"RequiredField,omitempty"` + } + func (m *Test_OptionalGroup) Reset() { *m = Test_OptionalGroup{} } + func (m *Test_OptionalGroup) String() string { return proto.CompactTextString(m) } + + func (m *Test_OptionalGroup) GetRequiredField() string { + if m != nil && m.RequiredField != nil { + return *m.RequiredField + } + return "" + } + + func (m *Test) GetNumber() int32 { + if x, ok := m.GetUnion().(*Test_Number); ok { + return x.Number + } + return 0 + } + + func (m *Test) GetName() string { + if x, ok := m.GetUnion().(*Test_Name); ok { + return x.Name + } + return "" + } + + func init() { + proto.RegisterEnum("example.FOO", FOO_name, FOO_value) + } + +To create and play with a Test object: + + package main + + import ( + "log" + + "github.com/gogo/protobuf/proto" + pb "./example.pb" + ) + + func main() { + test := &pb.Test{ + Label: proto.String("hello"), + Type: proto.Int32(17), + Reps: []int64{1, 2, 3}, + Optionalgroup: &pb.Test_OptionalGroup{ + RequiredField: proto.String("good bye"), + }, + Union: &pb.Test_Name{"fred"}, + } + data, err := proto.Marshal(test) + if err != nil { + log.Fatal("marshaling error: ", err) + } + newTest := &pb.Test{} + err = proto.Unmarshal(data, newTest) + if err != nil { + log.Fatal("unmarshaling error: ", err) + } + // Now test and newTest contain the same data. + if test.GetLabel() != newTest.GetLabel() { + log.Fatalf("data mismatch %q != %q", test.GetLabel(), newTest.GetLabel()) + } + // Use a type switch to determine which oneof was set. + switch u := test.Union.(type) { + case *pb.Test_Number: // u.Number contains the number. + case *pb.Test_Name: // u.Name contains the string. + } + // etc. + } +*/ +package proto + +import ( + "encoding/json" + "fmt" + "log" + "reflect" + "sort" + "strconv" + "sync" +) + +// Message is implemented by generated protocol buffer messages. +type Message interface { + Reset() + String() string + ProtoMessage() +} + +// Stats records allocation details about the protocol buffer encoders +// and decoders. Useful for tuning the library itself. +type Stats struct { + Emalloc uint64 // mallocs in encode + Dmalloc uint64 // mallocs in decode + Encode uint64 // number of encodes + Decode uint64 // number of decodes + Chit uint64 // number of cache hits + Cmiss uint64 // number of cache misses + Size uint64 // number of sizes +} + +// Set to true to enable stats collection. +const collectStats = false + +var stats Stats + +// GetStats returns a copy of the global Stats structure. +func GetStats() Stats { return stats } + +// A Buffer is a buffer manager for marshaling and unmarshaling +// protocol buffers. It may be reused between invocations to +// reduce memory usage. It is not necessary to use a Buffer; +// the global functions Marshal and Unmarshal create a +// temporary Buffer and are fine for most applications. +type Buffer struct { + buf []byte // encode/decode byte stream + index int // write point + + // pools of basic types to amortize allocation. + bools []bool + uint32s []uint32 + uint64s []uint64 + + // extra pools, only used with pointer_reflect.go + int32s []int32 + int64s []int64 + float32s []float32 + float64s []float64 +} + +// NewBuffer allocates a new Buffer and initializes its internal data to +// the contents of the argument slice. +func NewBuffer(e []byte) *Buffer { + return &Buffer{buf: e} +} + +// Reset resets the Buffer, ready for marshaling a new protocol buffer. +func (p *Buffer) Reset() { + p.buf = p.buf[0:0] // for reading/writing + p.index = 0 // for reading +} + +// SetBuf replaces the internal buffer with the slice, +// ready for unmarshaling the contents of the slice. +func (p *Buffer) SetBuf(s []byte) { + p.buf = s + p.index = 0 +} + +// Bytes returns the contents of the Buffer. +func (p *Buffer) Bytes() []byte { return p.buf } + +/* + * Helper routines for simplifying the creation of optional fields of basic type. + */ + +// Bool is a helper routine that allocates a new bool value +// to store v and returns a pointer to it. +func Bool(v bool) *bool { + return &v +} + +// Int32 is a helper routine that allocates a new int32 value +// to store v and returns a pointer to it. +func Int32(v int32) *int32 { + return &v +} + +// Int is a helper routine that allocates a new int32 value +// to store v and returns a pointer to it, but unlike Int32 +// its argument value is an int. +func Int(v int) *int32 { + p := new(int32) + *p = int32(v) + return p +} + +// Int64 is a helper routine that allocates a new int64 value +// to store v and returns a pointer to it. +func Int64(v int64) *int64 { + return &v +} + +// Float32 is a helper routine that allocates a new float32 value +// to store v and returns a pointer to it. +func Float32(v float32) *float32 { + return &v +} + +// Float64 is a helper routine that allocates a new float64 value +// to store v and returns a pointer to it. +func Float64(v float64) *float64 { + return &v +} + +// Uint32 is a helper routine that allocates a new uint32 value +// to store v and returns a pointer to it. +func Uint32(v uint32) *uint32 { + return &v +} + +// Uint64 is a helper routine that allocates a new uint64 value +// to store v and returns a pointer to it. +func Uint64(v uint64) *uint64 { + return &v +} + +// String is a helper routine that allocates a new string value +// to store v and returns a pointer to it. +func String(v string) *string { + return &v +} + +// EnumName is a helper function to simplify printing protocol buffer enums +// by name. Given an enum map and a value, it returns a useful string. +func EnumName(m map[int32]string, v int32) string { + s, ok := m[v] + if ok { + return s + } + return strconv.Itoa(int(v)) +} + +// UnmarshalJSONEnum is a helper function to simplify recovering enum int values +// from their JSON-encoded representation. Given a map from the enum's symbolic +// names to its int values, and a byte buffer containing the JSON-encoded +// value, it returns an int32 that can be cast to the enum type by the caller. +// +// The function can deal with both JSON representations, numeric and symbolic. +func UnmarshalJSONEnum(m map[string]int32, data []byte, enumName string) (int32, error) { + if data[0] == '"' { + // New style: enums are strings. + var repr string + if err := json.Unmarshal(data, &repr); err != nil { + return -1, err + } + val, ok := m[repr] + if !ok { + return 0, fmt.Errorf("unrecognized enum %s value %q", enumName, repr) + } + return val, nil + } + // Old style: enums are ints. + var val int32 + if err := json.Unmarshal(data, &val); err != nil { + return 0, fmt.Errorf("cannot unmarshal %#q into enum %s", data, enumName) + } + return val, nil +} + +// DebugPrint dumps the encoded data in b in a debugging format with a header +// including the string s. Used in testing but made available for general debugging. +func (p *Buffer) DebugPrint(s string, b []byte) { + var u uint64 + + obuf := p.buf + sindex := p.index + p.buf = b + p.index = 0 + depth := 0 + + fmt.Printf("\n--- %s ---\n", s) + +out: + for { + for i := 0; i < depth; i++ { + fmt.Print(" ") + } + + index := p.index + if index == len(p.buf) { + break + } + + op, err := p.DecodeVarint() + if err != nil { + fmt.Printf("%3d: fetching op err %v\n", index, err) + break out + } + tag := op >> 3 + wire := op & 7 + + switch wire { + default: + fmt.Printf("%3d: t=%3d unknown wire=%d\n", + index, tag, wire) + break out + + case WireBytes: + var r []byte + + r, err = p.DecodeRawBytes(false) + if err != nil { + break out + } + fmt.Printf("%3d: t=%3d bytes [%d]", index, tag, len(r)) + if len(r) <= 6 { + for i := 0; i < len(r); i++ { + fmt.Printf(" %.2x", r[i]) + } + } else { + for i := 0; i < 3; i++ { + fmt.Printf(" %.2x", r[i]) + } + fmt.Printf(" ..") + for i := len(r) - 3; i < len(r); i++ { + fmt.Printf(" %.2x", r[i]) + } + } + fmt.Printf("\n") + + case WireFixed32: + u, err = p.DecodeFixed32() + if err != nil { + fmt.Printf("%3d: t=%3d fix32 err %v\n", index, tag, err) + break out + } + fmt.Printf("%3d: t=%3d fix32 %d\n", index, tag, u) + + case WireFixed64: + u, err = p.DecodeFixed64() + if err != nil { + fmt.Printf("%3d: t=%3d fix64 err %v\n", index, tag, err) + break out + } + fmt.Printf("%3d: t=%3d fix64 %d\n", index, tag, u) + + case WireVarint: + u, err = p.DecodeVarint() + if err != nil { + fmt.Printf("%3d: t=%3d varint err %v\n", index, tag, err) + break out + } + fmt.Printf("%3d: t=%3d varint %d\n", index, tag, u) + + case WireStartGroup: + fmt.Printf("%3d: t=%3d start\n", index, tag) + depth++ + + case WireEndGroup: + depth-- + fmt.Printf("%3d: t=%3d end\n", index, tag) + } + } + + if depth != 0 { + fmt.Printf("%3d: start-end not balanced %d\n", p.index, depth) + } + fmt.Printf("\n") + + p.buf = obuf + p.index = sindex +} + +// SetDefaults sets unset protocol buffer fields to their default values. +// It only modifies fields that are both unset and have defined defaults. +// It recursively sets default values in any non-nil sub-messages. +func SetDefaults(pb Message) { + setDefaults(reflect.ValueOf(pb), true, false) +} + +// v is a pointer to a struct. +func setDefaults(v reflect.Value, recur, zeros bool) { + v = v.Elem() + + defaultMu.RLock() + dm, ok := defaults[v.Type()] + defaultMu.RUnlock() + if !ok { + dm = buildDefaultMessage(v.Type()) + defaultMu.Lock() + defaults[v.Type()] = dm + defaultMu.Unlock() + } + + for _, sf := range dm.scalars { + f := v.Field(sf.index) + if !f.IsNil() { + // field already set + continue + } + dv := sf.value + if dv == nil && !zeros { + // no explicit default, and don't want to set zeros + continue + } + fptr := f.Addr().Interface() // **T + // TODO: Consider batching the allocations we do here. + switch sf.kind { + case reflect.Bool: + b := new(bool) + if dv != nil { + *b = dv.(bool) + } + *(fptr.(**bool)) = b + case reflect.Float32: + f := new(float32) + if dv != nil { + *f = dv.(float32) + } + *(fptr.(**float32)) = f + case reflect.Float64: + f := new(float64) + if dv != nil { + *f = dv.(float64) + } + *(fptr.(**float64)) = f + case reflect.Int32: + // might be an enum + if ft := f.Type(); ft != int32PtrType { + // enum + f.Set(reflect.New(ft.Elem())) + if dv != nil { + f.Elem().SetInt(int64(dv.(int32))) + } + } else { + // int32 field + i := new(int32) + if dv != nil { + *i = dv.(int32) + } + *(fptr.(**int32)) = i + } + case reflect.Int64: + i := new(int64) + if dv != nil { + *i = dv.(int64) + } + *(fptr.(**int64)) = i + case reflect.String: + s := new(string) + if dv != nil { + *s = dv.(string) + } + *(fptr.(**string)) = s + case reflect.Uint8: + // exceptional case: []byte + var b []byte + if dv != nil { + db := dv.([]byte) + b = make([]byte, len(db)) + copy(b, db) + } else { + b = []byte{} + } + *(fptr.(*[]byte)) = b + case reflect.Uint32: + u := new(uint32) + if dv != nil { + *u = dv.(uint32) + } + *(fptr.(**uint32)) = u + case reflect.Uint64: + u := new(uint64) + if dv != nil { + *u = dv.(uint64) + } + *(fptr.(**uint64)) = u + default: + log.Printf("proto: can't set default for field %v (sf.kind=%v)", f, sf.kind) + } + } + + for _, ni := range dm.nested { + f := v.Field(ni) + // f is *T or []*T or map[T]*T + switch f.Kind() { + case reflect.Ptr: + if f.IsNil() { + continue + } + setDefaults(f, recur, zeros) + + case reflect.Slice: + for i := 0; i < f.Len(); i++ { + e := f.Index(i) + if e.IsNil() { + continue + } + setDefaults(e, recur, zeros) + } + + case reflect.Map: + for _, k := range f.MapKeys() { + e := f.MapIndex(k) + if e.IsNil() { + continue + } + setDefaults(e, recur, zeros) + } + } + } +} + +var ( + // defaults maps a protocol buffer struct type to a slice of the fields, + // with its scalar fields set to their proto-declared non-zero default values. + defaultMu sync.RWMutex + defaults = make(map[reflect.Type]defaultMessage) + + int32PtrType = reflect.TypeOf((*int32)(nil)) +) + +// defaultMessage represents information about the default values of a message. +type defaultMessage struct { + scalars []scalarField + nested []int // struct field index of nested messages +} + +type scalarField struct { + index int // struct field index + kind reflect.Kind // element type (the T in *T or []T) + value interface{} // the proto-declared default value, or nil +} + +// t is a struct type. +func buildDefaultMessage(t reflect.Type) (dm defaultMessage) { + sprop := GetProperties(t) + for _, prop := range sprop.Prop { + fi, ok := sprop.decoderTags.get(prop.Tag) + if !ok { + // XXX_unrecognized + continue + } + ft := t.Field(fi).Type + + sf, nested, err := fieldDefault(ft, prop) + switch { + case err != nil: + log.Print(err) + case nested: + dm.nested = append(dm.nested, fi) + case sf != nil: + sf.index = fi + dm.scalars = append(dm.scalars, *sf) + } + } + + return dm +} + +// fieldDefault returns the scalarField for field type ft. +// sf will be nil if the field can not have a default. +// nestedMessage will be true if this is a nested message. +// Note that sf.index is not set on return. +func fieldDefault(ft reflect.Type, prop *Properties) (sf *scalarField, nestedMessage bool, err error) { + var canHaveDefault bool + switch ft.Kind() { + case reflect.Ptr: + if ft.Elem().Kind() == reflect.Struct { + nestedMessage = true + } else { + canHaveDefault = true // proto2 scalar field + } + + case reflect.Slice: + switch ft.Elem().Kind() { + case reflect.Ptr: + nestedMessage = true // repeated message + case reflect.Uint8: + canHaveDefault = true // bytes field + } + + case reflect.Map: + if ft.Elem().Kind() == reflect.Ptr { + nestedMessage = true // map with message values + } + } + + if !canHaveDefault { + if nestedMessage { + return nil, true, nil + } + return nil, false, nil + } + + // We now know that ft is a pointer or slice. + sf = &scalarField{kind: ft.Elem().Kind()} + + // scalar fields without defaults + if !prop.HasDefault { + return sf, false, nil + } + + // a scalar field: either *T or []byte + switch ft.Elem().Kind() { + case reflect.Bool: + x, err := strconv.ParseBool(prop.Default) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default bool %q: %v", prop.Default, err) + } + sf.value = x + case reflect.Float32: + x, err := strconv.ParseFloat(prop.Default, 32) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default float32 %q: %v", prop.Default, err) + } + sf.value = float32(x) + case reflect.Float64: + x, err := strconv.ParseFloat(prop.Default, 64) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default float64 %q: %v", prop.Default, err) + } + sf.value = x + case reflect.Int32: + x, err := strconv.ParseInt(prop.Default, 10, 32) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default int32 %q: %v", prop.Default, err) + } + sf.value = int32(x) + case reflect.Int64: + x, err := strconv.ParseInt(prop.Default, 10, 64) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default int64 %q: %v", prop.Default, err) + } + sf.value = x + case reflect.String: + sf.value = prop.Default + case reflect.Uint8: + // []byte (not *uint8) + sf.value = []byte(prop.Default) + case reflect.Uint32: + x, err := strconv.ParseUint(prop.Default, 10, 32) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default uint32 %q: %v", prop.Default, err) + } + sf.value = uint32(x) + case reflect.Uint64: + x, err := strconv.ParseUint(prop.Default, 10, 64) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default uint64 %q: %v", prop.Default, err) + } + sf.value = x + default: + return nil, false, fmt.Errorf("proto: unhandled def kind %v", ft.Elem().Kind()) + } + + return sf, false, nil +} + +// Map fields may have key types of non-float scalars, strings and enums. +// The easiest way to sort them in some deterministic order is to use fmt. +// If this turns out to be inefficient we can always consider other options, +// such as doing a Schwartzian transform. + +func mapKeys(vs []reflect.Value) sort.Interface { + s := mapKeySorter{ + vs: vs, + // default Less function: textual comparison + less: func(a, b reflect.Value) bool { + return fmt.Sprint(a.Interface()) < fmt.Sprint(b.Interface()) + }, + } + + // Type specialization per https://developers.google.com/protocol-buffers/docs/proto#maps; + // numeric keys are sorted numerically. + if len(vs) == 0 { + return s + } + switch vs[0].Kind() { + case reflect.Int32, reflect.Int64: + s.less = func(a, b reflect.Value) bool { return a.Int() < b.Int() } + case reflect.Uint32, reflect.Uint64: + s.less = func(a, b reflect.Value) bool { return a.Uint() < b.Uint() } + } + + return s +} + +type mapKeySorter struct { + vs []reflect.Value + less func(a, b reflect.Value) bool +} + +func (s mapKeySorter) Len() int { return len(s.vs) } +func (s mapKeySorter) Swap(i, j int) { s.vs[i], s.vs[j] = s.vs[j], s.vs[i] } +func (s mapKeySorter) Less(i, j int) bool { + return s.less(s.vs[i], s.vs[j]) +} + +// isProto3Zero reports whether v is a zero proto3 value. +func isProto3Zero(v reflect.Value) bool { + switch v.Kind() { + case reflect.Bool: + return !v.Bool() + case reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint32, reflect.Uint64: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.String: + return v.String() == "" + } + return false +} + +// ProtoPackageIsVersion1 is referenced from generated protocol buffer files +// to assert that that code is compatible with this version of the proto package. +const GoGoProtoPackageIsVersion1 = true diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/lib_gogo.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/lib_gogo.go new file mode 100644 index 0000000000000..a6c2c06b23de2 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/lib_gogo.go @@ -0,0 +1,40 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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. +// +// 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. + +package proto + +import ( + "encoding/json" + "strconv" +) + +func MarshalJSONEnum(m map[int32]string, value int32) ([]byte, error) { + s, ok := m[value] + if !ok { + s = strconv.Itoa(int(value)) + } + return json.Marshal(s) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/message_set.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/message_set.go new file mode 100644 index 0000000000000..e25e01e637483 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/message_set.go @@ -0,0 +1,280 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto + +/* + * Support for message sets. + */ + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "reflect" + "sort" +) + +// errNoMessageTypeID occurs when a protocol buffer does not have a message type ID. +// A message type ID is required for storing a protocol buffer in a message set. +var errNoMessageTypeID = errors.New("proto does not have a message type ID") + +// The first two types (_MessageSet_Item and messageSet) +// model what the protocol compiler produces for the following protocol message: +// message MessageSet { +// repeated group Item = 1 { +// required int32 type_id = 2; +// required string message = 3; +// }; +// } +// That is the MessageSet wire format. We can't use a proto to generate these +// because that would introduce a circular dependency between it and this package. + +type _MessageSet_Item struct { + TypeId *int32 `protobuf:"varint,2,req,name=type_id"` + Message []byte `protobuf:"bytes,3,req,name=message"` +} + +type messageSet struct { + Item []*_MessageSet_Item `protobuf:"group,1,rep"` + XXX_unrecognized []byte + // TODO: caching? +} + +// Make sure messageSet is a Message. +var _ Message = (*messageSet)(nil) + +// messageTypeIder is an interface satisfied by a protocol buffer type +// that may be stored in a MessageSet. +type messageTypeIder interface { + MessageTypeId() int32 +} + +func (ms *messageSet) find(pb Message) *_MessageSet_Item { + mti, ok := pb.(messageTypeIder) + if !ok { + return nil + } + id := mti.MessageTypeId() + for _, item := range ms.Item { + if *item.TypeId == id { + return item + } + } + return nil +} + +func (ms *messageSet) Has(pb Message) bool { + if ms.find(pb) != nil { + return true + } + return false +} + +func (ms *messageSet) Unmarshal(pb Message) error { + if item := ms.find(pb); item != nil { + return Unmarshal(item.Message, pb) + } + if _, ok := pb.(messageTypeIder); !ok { + return errNoMessageTypeID + } + return nil // TODO: return error instead? +} + +func (ms *messageSet) Marshal(pb Message) error { + msg, err := Marshal(pb) + if err != nil { + return err + } + if item := ms.find(pb); item != nil { + // reuse existing item + item.Message = msg + return nil + } + + mti, ok := pb.(messageTypeIder) + if !ok { + return errNoMessageTypeID + } + + mtid := mti.MessageTypeId() + ms.Item = append(ms.Item, &_MessageSet_Item{ + TypeId: &mtid, + Message: msg, + }) + return nil +} + +func (ms *messageSet) Reset() { *ms = messageSet{} } +func (ms *messageSet) String() string { return CompactTextString(ms) } +func (*messageSet) ProtoMessage() {} + +// Support for the message_set_wire_format message option. + +func skipVarint(buf []byte) []byte { + i := 0 + for ; buf[i]&0x80 != 0; i++ { + } + return buf[i+1:] +} + +// MarshalMessageSet encodes the extension map represented by m in the message set wire format. +// It is called by generated Marshal methods on protocol buffer messages with the message_set_wire_format option. +func MarshalMessageSet(m map[int32]Extension) ([]byte, error) { + if err := encodeExtensionMap(m); err != nil { + return nil, err + } + + // Sort extension IDs to provide a deterministic encoding. + // See also enc_map in encode.go. + ids := make([]int, 0, len(m)) + for id := range m { + ids = append(ids, int(id)) + } + sort.Ints(ids) + + ms := &messageSet{Item: make([]*_MessageSet_Item, 0, len(m))} + for _, id := range ids { + e := m[int32(id)] + // Remove the wire type and field number varint, as well as the length varint. + msg := skipVarint(skipVarint(e.enc)) + + ms.Item = append(ms.Item, &_MessageSet_Item{ + TypeId: Int32(int32(id)), + Message: msg, + }) + } + return Marshal(ms) +} + +// UnmarshalMessageSet decodes the extension map encoded in buf in the message set wire format. +// It is called by generated Unmarshal methods on protocol buffer messages with the message_set_wire_format option. +func UnmarshalMessageSet(buf []byte, m map[int32]Extension) error { + ms := new(messageSet) + if err := Unmarshal(buf, ms); err != nil { + return err + } + for _, item := range ms.Item { + id := *item.TypeId + msg := item.Message + + // Restore wire type and field number varint, plus length varint. + // Be careful to preserve duplicate items. + b := EncodeVarint(uint64(id)<<3 | WireBytes) + if ext, ok := m[id]; ok { + // Existing data; rip off the tag and length varint + // so we join the new data correctly. + // We can assume that ext.enc is set because we are unmarshaling. + o := ext.enc[len(b):] // skip wire type and field number + _, n := DecodeVarint(o) // calculate length of length varint + o = o[n:] // skip length varint + msg = append(o, msg...) // join old data and new data + } + b = append(b, EncodeVarint(uint64(len(msg)))...) + b = append(b, msg...) + + m[id] = Extension{enc: b} + } + return nil +} + +// MarshalMessageSetJSON encodes the extension map represented by m in JSON format. +// It is called by generated MarshalJSON methods on protocol buffer messages with the message_set_wire_format option. +func MarshalMessageSetJSON(m map[int32]Extension) ([]byte, error) { + var b bytes.Buffer + b.WriteByte('{') + + // Process the map in key order for deterministic output. + ids := make([]int32, 0, len(m)) + for id := range m { + ids = append(ids, id) + } + sort.Sort(int32Slice(ids)) // int32Slice defined in text.go + + for i, id := range ids { + ext := m[id] + if i > 0 { + b.WriteByte(',') + } + + msd, ok := messageSetMap[id] + if !ok { + // Unknown type; we can't render it, so skip it. + continue + } + fmt.Fprintf(&b, `"[%s]":`, msd.name) + + x := ext.value + if x == nil { + x = reflect.New(msd.t.Elem()).Interface() + if err := Unmarshal(ext.enc, x.(Message)); err != nil { + return nil, err + } + } + d, err := json.Marshal(x) + if err != nil { + return nil, err + } + b.Write(d) + } + b.WriteByte('}') + return b.Bytes(), nil +} + +// UnmarshalMessageSetJSON decodes the extension map encoded in buf in JSON format. +// It is called by generated UnmarshalJSON methods on protocol buffer messages with the message_set_wire_format option. +func UnmarshalMessageSetJSON(buf []byte, m map[int32]Extension) error { + // Common-case fast path. + if len(buf) == 0 || bytes.Equal(buf, []byte("{}")) { + return nil + } + + // This is fairly tricky, and it's not clear that it is needed. + return errors.New("TODO: UnmarshalMessageSetJSON not yet implemented") +} + +// A global registry of types that can be used in a MessageSet. + +var messageSetMap = make(map[int32]messageSetDesc) + +type messageSetDesc struct { + t reflect.Type // pointer to struct + name string +} + +// RegisterMessageSetType is called from the generated code. +func RegisterMessageSetType(m Message, fieldNum int32, name string) { + messageSetMap[fieldNum] = messageSetDesc{ + t: reflect.TypeOf(m), + name: name, + } +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/pointer_reflect.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/pointer_reflect.go new file mode 100644 index 0000000000000..749919d250a1a --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/pointer_reflect.go @@ -0,0 +1,479 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2012 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +// +build appengine + +// This file contains an implementation of proto field accesses using package reflect. +// It is slower than the code in pointer_unsafe.go but it avoids package unsafe and can +// be used on App Engine. + +package proto + +import ( + "math" + "reflect" +) + +// A structPointer is a pointer to a struct. +type structPointer struct { + v reflect.Value +} + +// toStructPointer returns a structPointer equivalent to the given reflect value. +// The reflect value must itself be a pointer to a struct. +func toStructPointer(v reflect.Value) structPointer { + return structPointer{v} +} + +// IsNil reports whether p is nil. +func structPointer_IsNil(p structPointer) bool { + return p.v.IsNil() +} + +// Interface returns the struct pointer as an interface value. +func structPointer_Interface(p structPointer, _ reflect.Type) interface{} { + return p.v.Interface() +} + +// A field identifies a field in a struct, accessible from a structPointer. +// In this implementation, a field is identified by the sequence of field indices +// passed to reflect's FieldByIndex. +type field []int + +// toField returns a field equivalent to the given reflect field. +func toField(f *reflect.StructField) field { + return f.Index +} + +// invalidField is an invalid field identifier. +var invalidField = field(nil) + +// IsValid reports whether the field identifier is valid. +func (f field) IsValid() bool { return f != nil } + +// field returns the given field in the struct as a reflect value. +func structPointer_field(p structPointer, f field) reflect.Value { + // Special case: an extension map entry with a value of type T + // passes a *T to the struct-handling code with a zero field, + // expecting that it will be treated as equivalent to *struct{ X T }, + // which has the same memory layout. We have to handle that case + // specially, because reflect will panic if we call FieldByIndex on a + // non-struct. + if f == nil { + return p.v.Elem() + } + + return p.v.Elem().FieldByIndex(f) +} + +// ifield returns the given field in the struct as an interface value. +func structPointer_ifield(p structPointer, f field) interface{} { + return structPointer_field(p, f).Addr().Interface() +} + +// Bytes returns the address of a []byte field in the struct. +func structPointer_Bytes(p structPointer, f field) *[]byte { + return structPointer_ifield(p, f).(*[]byte) +} + +// BytesSlice returns the address of a [][]byte field in the struct. +func structPointer_BytesSlice(p structPointer, f field) *[][]byte { + return structPointer_ifield(p, f).(*[][]byte) +} + +// Bool returns the address of a *bool field in the struct. +func structPointer_Bool(p structPointer, f field) **bool { + return structPointer_ifield(p, f).(**bool) +} + +// BoolVal returns the address of a bool field in the struct. +func structPointer_BoolVal(p structPointer, f field) *bool { + return structPointer_ifield(p, f).(*bool) +} + +// BoolSlice returns the address of a []bool field in the struct. +func structPointer_BoolSlice(p structPointer, f field) *[]bool { + return structPointer_ifield(p, f).(*[]bool) +} + +// String returns the address of a *string field in the struct. +func structPointer_String(p structPointer, f field) **string { + return structPointer_ifield(p, f).(**string) +} + +// StringVal returns the address of a string field in the struct. +func structPointer_StringVal(p structPointer, f field) *string { + return structPointer_ifield(p, f).(*string) +} + +// StringSlice returns the address of a []string field in the struct. +func structPointer_StringSlice(p structPointer, f field) *[]string { + return structPointer_ifield(p, f).(*[]string) +} + +// ExtMap returns the address of an extension map field in the struct. +func structPointer_ExtMap(p structPointer, f field) *map[int32]Extension { + return structPointer_ifield(p, f).(*map[int32]Extension) +} + +// NewAt returns the reflect.Value for a pointer to a field in the struct. +func structPointer_NewAt(p structPointer, f field, typ reflect.Type) reflect.Value { + return structPointer_field(p, f).Addr() +} + +// SetStructPointer writes a *struct field in the struct. +func structPointer_SetStructPointer(p structPointer, f field, q structPointer) { + structPointer_field(p, f).Set(q.v) +} + +// GetStructPointer reads a *struct field in the struct. +func structPointer_GetStructPointer(p structPointer, f field) structPointer { + return structPointer{structPointer_field(p, f)} +} + +// StructPointerSlice the address of a []*struct field in the struct. +func structPointer_StructPointerSlice(p structPointer, f field) structPointerSlice { + return structPointerSlice{structPointer_field(p, f)} +} + +// A structPointerSlice represents the address of a slice of pointers to structs +// (themselves messages or groups). That is, v.Type() is *[]*struct{...}. +type structPointerSlice struct { + v reflect.Value +} + +func (p structPointerSlice) Len() int { return p.v.Len() } +func (p structPointerSlice) Index(i int) structPointer { return structPointer{p.v.Index(i)} } +func (p structPointerSlice) Append(q structPointer) { + p.v.Set(reflect.Append(p.v, q.v)) +} + +var ( + int32Type = reflect.TypeOf(int32(0)) + uint32Type = reflect.TypeOf(uint32(0)) + float32Type = reflect.TypeOf(float32(0)) + int64Type = reflect.TypeOf(int64(0)) + uint64Type = reflect.TypeOf(uint64(0)) + float64Type = reflect.TypeOf(float64(0)) +) + +// A word32 represents a field of type *int32, *uint32, *float32, or *enum. +// That is, v.Type() is *int32, *uint32, *float32, or *enum and v is assignable. +type word32 struct { + v reflect.Value +} + +// IsNil reports whether p is nil. +func word32_IsNil(p word32) bool { + return p.v.IsNil() +} + +// Set sets p to point at a newly allocated word with bits set to x. +func word32_Set(p word32, o *Buffer, x uint32) { + t := p.v.Type().Elem() + switch t { + case int32Type: + if len(o.int32s) == 0 { + o.int32s = make([]int32, uint32PoolSize) + } + o.int32s[0] = int32(x) + p.v.Set(reflect.ValueOf(&o.int32s[0])) + o.int32s = o.int32s[1:] + return + case uint32Type: + if len(o.uint32s) == 0 { + o.uint32s = make([]uint32, uint32PoolSize) + } + o.uint32s[0] = x + p.v.Set(reflect.ValueOf(&o.uint32s[0])) + o.uint32s = o.uint32s[1:] + return + case float32Type: + if len(o.float32s) == 0 { + o.float32s = make([]float32, uint32PoolSize) + } + o.float32s[0] = math.Float32frombits(x) + p.v.Set(reflect.ValueOf(&o.float32s[0])) + o.float32s = o.float32s[1:] + return + } + + // must be enum + p.v.Set(reflect.New(t)) + p.v.Elem().SetInt(int64(int32(x))) +} + +// Get gets the bits pointed at by p, as a uint32. +func word32_Get(p word32) uint32 { + elem := p.v.Elem() + switch elem.Kind() { + case reflect.Int32: + return uint32(elem.Int()) + case reflect.Uint32: + return uint32(elem.Uint()) + case reflect.Float32: + return math.Float32bits(float32(elem.Float())) + } + panic("unreachable") +} + +// Word32 returns a reference to a *int32, *uint32, *float32, or *enum field in the struct. +func structPointer_Word32(p structPointer, f field) word32 { + return word32{structPointer_field(p, f)} +} + +// A word32Val represents a field of type int32, uint32, float32, or enum. +// That is, v.Type() is int32, uint32, float32, or enum and v is assignable. +type word32Val struct { + v reflect.Value +} + +// Set sets *p to x. +func word32Val_Set(p word32Val, x uint32) { + switch p.v.Type() { + case int32Type: + p.v.SetInt(int64(x)) + return + case uint32Type: + p.v.SetUint(uint64(x)) + return + case float32Type: + p.v.SetFloat(float64(math.Float32frombits(x))) + return + } + + // must be enum + p.v.SetInt(int64(int32(x))) +} + +// Get gets the bits pointed at by p, as a uint32. +func word32Val_Get(p word32Val) uint32 { + elem := p.v + switch elem.Kind() { + case reflect.Int32: + return uint32(elem.Int()) + case reflect.Uint32: + return uint32(elem.Uint()) + case reflect.Float32: + return math.Float32bits(float32(elem.Float())) + } + panic("unreachable") +} + +// Word32Val returns a reference to a int32, uint32, float32, or enum field in the struct. +func structPointer_Word32Val(p structPointer, f field) word32Val { + return word32Val{structPointer_field(p, f)} +} + +// A word32Slice is a slice of 32-bit values. +// That is, v.Type() is []int32, []uint32, []float32, or []enum. +type word32Slice struct { + v reflect.Value +} + +func (p word32Slice) Append(x uint32) { + n, m := p.v.Len(), p.v.Cap() + if n < m { + p.v.SetLen(n + 1) + } else { + t := p.v.Type().Elem() + p.v.Set(reflect.Append(p.v, reflect.Zero(t))) + } + elem := p.v.Index(n) + switch elem.Kind() { + case reflect.Int32: + elem.SetInt(int64(int32(x))) + case reflect.Uint32: + elem.SetUint(uint64(x)) + case reflect.Float32: + elem.SetFloat(float64(math.Float32frombits(x))) + } +} + +func (p word32Slice) Len() int { + return p.v.Len() +} + +func (p word32Slice) Index(i int) uint32 { + elem := p.v.Index(i) + switch elem.Kind() { + case reflect.Int32: + return uint32(elem.Int()) + case reflect.Uint32: + return uint32(elem.Uint()) + case reflect.Float32: + return math.Float32bits(float32(elem.Float())) + } + panic("unreachable") +} + +// Word32Slice returns a reference to a []int32, []uint32, []float32, or []enum field in the struct. +func structPointer_Word32Slice(p structPointer, f field) word32Slice { + return word32Slice{structPointer_field(p, f)} +} + +// word64 is like word32 but for 64-bit values. +type word64 struct { + v reflect.Value +} + +func word64_Set(p word64, o *Buffer, x uint64) { + t := p.v.Type().Elem() + switch t { + case int64Type: + if len(o.int64s) == 0 { + o.int64s = make([]int64, uint64PoolSize) + } + o.int64s[0] = int64(x) + p.v.Set(reflect.ValueOf(&o.int64s[0])) + o.int64s = o.int64s[1:] + return + case uint64Type: + if len(o.uint64s) == 0 { + o.uint64s = make([]uint64, uint64PoolSize) + } + o.uint64s[0] = x + p.v.Set(reflect.ValueOf(&o.uint64s[0])) + o.uint64s = o.uint64s[1:] + return + case float64Type: + if len(o.float64s) == 0 { + o.float64s = make([]float64, uint64PoolSize) + } + o.float64s[0] = math.Float64frombits(x) + p.v.Set(reflect.ValueOf(&o.float64s[0])) + o.float64s = o.float64s[1:] + return + } + panic("unreachable") +} + +func word64_IsNil(p word64) bool { + return p.v.IsNil() +} + +func word64_Get(p word64) uint64 { + elem := p.v.Elem() + switch elem.Kind() { + case reflect.Int64: + return uint64(elem.Int()) + case reflect.Uint64: + return elem.Uint() + case reflect.Float64: + return math.Float64bits(elem.Float()) + } + panic("unreachable") +} + +func structPointer_Word64(p structPointer, f field) word64 { + return word64{structPointer_field(p, f)} +} + +// word64Val is like word32Val but for 64-bit values. +type word64Val struct { + v reflect.Value +} + +func word64Val_Set(p word64Val, o *Buffer, x uint64) { + switch p.v.Type() { + case int64Type: + p.v.SetInt(int64(x)) + return + case uint64Type: + p.v.SetUint(x) + return + case float64Type: + p.v.SetFloat(math.Float64frombits(x)) + return + } + panic("unreachable") +} + +func word64Val_Get(p word64Val) uint64 { + elem := p.v + switch elem.Kind() { + case reflect.Int64: + return uint64(elem.Int()) + case reflect.Uint64: + return elem.Uint() + case reflect.Float64: + return math.Float64bits(elem.Float()) + } + panic("unreachable") +} + +func structPointer_Word64Val(p structPointer, f field) word64Val { + return word64Val{structPointer_field(p, f)} +} + +type word64Slice struct { + v reflect.Value +} + +func (p word64Slice) Append(x uint64) { + n, m := p.v.Len(), p.v.Cap() + if n < m { + p.v.SetLen(n + 1) + } else { + t := p.v.Type().Elem() + p.v.Set(reflect.Append(p.v, reflect.Zero(t))) + } + elem := p.v.Index(n) + switch elem.Kind() { + case reflect.Int64: + elem.SetInt(int64(int64(x))) + case reflect.Uint64: + elem.SetUint(uint64(x)) + case reflect.Float64: + elem.SetFloat(float64(math.Float64frombits(x))) + } +} + +func (p word64Slice) Len() int { + return p.v.Len() +} + +func (p word64Slice) Index(i int) uint64 { + elem := p.v.Index(i) + switch elem.Kind() { + case reflect.Int64: + return uint64(elem.Int()) + case reflect.Uint64: + return uint64(elem.Uint()) + case reflect.Float64: + return math.Float64bits(float64(elem.Float())) + } + panic("unreachable") +} + +func structPointer_Word64Slice(p structPointer, f field) word64Slice { + return word64Slice{structPointer_field(p, f)} +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go new file mode 100644 index 0000000000000..e9be0fe92ee70 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go @@ -0,0 +1,266 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2012 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +// +build !appengine + +// This file contains the implementation of the proto field accesses using package unsafe. + +package proto + +import ( + "reflect" + "unsafe" +) + +// NOTE: These type_Foo functions would more idiomatically be methods, +// but Go does not allow methods on pointer types, and we must preserve +// some pointer type for the garbage collector. We use these +// funcs with clunky names as our poor approximation to methods. +// +// An alternative would be +// type structPointer struct { p unsafe.Pointer } +// but that does not registerize as well. + +// A structPointer is a pointer to a struct. +type structPointer unsafe.Pointer + +// toStructPointer returns a structPointer equivalent to the given reflect value. +func toStructPointer(v reflect.Value) structPointer { + return structPointer(unsafe.Pointer(v.Pointer())) +} + +// IsNil reports whether p is nil. +func structPointer_IsNil(p structPointer) bool { + return p == nil +} + +// Interface returns the struct pointer, assumed to have element type t, +// as an interface value. +func structPointer_Interface(p structPointer, t reflect.Type) interface{} { + return reflect.NewAt(t, unsafe.Pointer(p)).Interface() +} + +// A field identifies a field in a struct, accessible from a structPointer. +// In this implementation, a field is identified by its byte offset from the start of the struct. +type field uintptr + +// toField returns a field equivalent to the given reflect field. +func toField(f *reflect.StructField) field { + return field(f.Offset) +} + +// invalidField is an invalid field identifier. +const invalidField = ^field(0) + +// IsValid reports whether the field identifier is valid. +func (f field) IsValid() bool { + return f != ^field(0) +} + +// Bytes returns the address of a []byte field in the struct. +func structPointer_Bytes(p structPointer, f field) *[]byte { + return (*[]byte)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// BytesSlice returns the address of a [][]byte field in the struct. +func structPointer_BytesSlice(p structPointer, f field) *[][]byte { + return (*[][]byte)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// Bool returns the address of a *bool field in the struct. +func structPointer_Bool(p structPointer, f field) **bool { + return (**bool)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// BoolVal returns the address of a bool field in the struct. +func structPointer_BoolVal(p structPointer, f field) *bool { + return (*bool)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// BoolSlice returns the address of a []bool field in the struct. +func structPointer_BoolSlice(p structPointer, f field) *[]bool { + return (*[]bool)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// String returns the address of a *string field in the struct. +func structPointer_String(p structPointer, f field) **string { + return (**string)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// StringVal returns the address of a string field in the struct. +func structPointer_StringVal(p structPointer, f field) *string { + return (*string)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// StringSlice returns the address of a []string field in the struct. +func structPointer_StringSlice(p structPointer, f field) *[]string { + return (*[]string)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// ExtMap returns the address of an extension map field in the struct. +func structPointer_ExtMap(p structPointer, f field) *map[int32]Extension { + return (*map[int32]Extension)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// NewAt returns the reflect.Value for a pointer to a field in the struct. +func structPointer_NewAt(p structPointer, f field, typ reflect.Type) reflect.Value { + return reflect.NewAt(typ, unsafe.Pointer(uintptr(p)+uintptr(f))) +} + +// SetStructPointer writes a *struct field in the struct. +func structPointer_SetStructPointer(p structPointer, f field, q structPointer) { + *(*structPointer)(unsafe.Pointer(uintptr(p) + uintptr(f))) = q +} + +// GetStructPointer reads a *struct field in the struct. +func structPointer_GetStructPointer(p structPointer, f field) structPointer { + return *(*structPointer)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// StructPointerSlice the address of a []*struct field in the struct. +func structPointer_StructPointerSlice(p structPointer, f field) *structPointerSlice { + return (*structPointerSlice)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// A structPointerSlice represents a slice of pointers to structs (themselves submessages or groups). +type structPointerSlice []structPointer + +func (v *structPointerSlice) Len() int { return len(*v) } +func (v *structPointerSlice) Index(i int) structPointer { return (*v)[i] } +func (v *structPointerSlice) Append(p structPointer) { *v = append(*v, p) } + +// A word32 is the address of a "pointer to 32-bit value" field. +type word32 **uint32 + +// IsNil reports whether *v is nil. +func word32_IsNil(p word32) bool { + return *p == nil +} + +// Set sets *v to point at a newly allocated word set to x. +func word32_Set(p word32, o *Buffer, x uint32) { + if len(o.uint32s) == 0 { + o.uint32s = make([]uint32, uint32PoolSize) + } + o.uint32s[0] = x + *p = &o.uint32s[0] + o.uint32s = o.uint32s[1:] +} + +// Get gets the value pointed at by *v. +func word32_Get(p word32) uint32 { + return **p +} + +// Word32 returns the address of a *int32, *uint32, *float32, or *enum field in the struct. +func structPointer_Word32(p structPointer, f field) word32 { + return word32((**uint32)(unsafe.Pointer(uintptr(p) + uintptr(f)))) +} + +// A word32Val is the address of a 32-bit value field. +type word32Val *uint32 + +// Set sets *p to x. +func word32Val_Set(p word32Val, x uint32) { + *p = x +} + +// Get gets the value pointed at by p. +func word32Val_Get(p word32Val) uint32 { + return *p +} + +// Word32Val returns the address of a *int32, *uint32, *float32, or *enum field in the struct. +func structPointer_Word32Val(p structPointer, f field) word32Val { + return word32Val((*uint32)(unsafe.Pointer(uintptr(p) + uintptr(f)))) +} + +// A word32Slice is a slice of 32-bit values. +type word32Slice []uint32 + +func (v *word32Slice) Append(x uint32) { *v = append(*v, x) } +func (v *word32Slice) Len() int { return len(*v) } +func (v *word32Slice) Index(i int) uint32 { return (*v)[i] } + +// Word32Slice returns the address of a []int32, []uint32, []float32, or []enum field in the struct. +func structPointer_Word32Slice(p structPointer, f field) *word32Slice { + return (*word32Slice)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// word64 is like word32 but for 64-bit values. +type word64 **uint64 + +func word64_Set(p word64, o *Buffer, x uint64) { + if len(o.uint64s) == 0 { + o.uint64s = make([]uint64, uint64PoolSize) + } + o.uint64s[0] = x + *p = &o.uint64s[0] + o.uint64s = o.uint64s[1:] +} + +func word64_IsNil(p word64) bool { + return *p == nil +} + +func word64_Get(p word64) uint64 { + return **p +} + +func structPointer_Word64(p structPointer, f field) word64 { + return word64((**uint64)(unsafe.Pointer(uintptr(p) + uintptr(f)))) +} + +// word64Val is like word32Val but for 64-bit values. +type word64Val *uint64 + +func word64Val_Set(p word64Val, o *Buffer, x uint64) { + *p = x +} + +func word64Val_Get(p word64Val) uint64 { + return *p +} + +func structPointer_Word64Val(p structPointer, f field) word64Val { + return word64Val((*uint64)(unsafe.Pointer(uintptr(p) + uintptr(f)))) +} + +// word64Slice is like word32Slice but for 64-bit values. +type word64Slice []uint64 + +func (v *word64Slice) Append(x uint64) { *v = append(*v, x) } +func (v *word64Slice) Len() int { return len(*v) } +func (v *word64Slice) Index(i int) uint64 { return (*v)[i] } + +func structPointer_Word64Slice(p structPointer, f field) *word64Slice { + return (*word64Slice)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go new file mode 100644 index 0000000000000..6bc85fa9873f4 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go @@ -0,0 +1,108 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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. +// +// 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. + +// +build !appengine + +// This file contains the implementation of the proto field accesses using package unsafe. + +package proto + +import ( + "reflect" + "unsafe" +) + +func structPointer_InterfaceAt(p structPointer, f field, t reflect.Type) interface{} { + point := unsafe.Pointer(uintptr(p) + uintptr(f)) + r := reflect.NewAt(t, point) + return r.Interface() +} + +func structPointer_InterfaceRef(p structPointer, f field, t reflect.Type) interface{} { + point := unsafe.Pointer(uintptr(p) + uintptr(f)) + r := reflect.NewAt(t, point) + if r.Elem().IsNil() { + return nil + } + return r.Elem().Interface() +} + +func copyUintPtr(oldptr, newptr uintptr, size int) { + oldbytes := make([]byte, 0) + oldslice := (*reflect.SliceHeader)(unsafe.Pointer(&oldbytes)) + oldslice.Data = oldptr + oldslice.Len = size + oldslice.Cap = size + newbytes := make([]byte, 0) + newslice := (*reflect.SliceHeader)(unsafe.Pointer(&newbytes)) + newslice.Data = newptr + newslice.Len = size + newslice.Cap = size + copy(newbytes, oldbytes) +} + +func structPointer_Copy(oldptr structPointer, newptr structPointer, size int) { + copyUintPtr(uintptr(oldptr), uintptr(newptr), size) +} + +func appendStructPointer(base structPointer, f field, typ reflect.Type) structPointer { + size := typ.Elem().Size() + oldHeader := structPointer_GetSliceHeader(base, f) + newLen := oldHeader.Len + 1 + slice := reflect.MakeSlice(typ, newLen, newLen) + bas := toStructPointer(slice) + for i := 0; i < oldHeader.Len; i++ { + newElemptr := uintptr(bas) + uintptr(i)*size + oldElemptr := oldHeader.Data + uintptr(i)*size + copyUintPtr(oldElemptr, newElemptr, int(size)) + } + + oldHeader.Data = uintptr(bas) + oldHeader.Len = newLen + oldHeader.Cap = newLen + + return structPointer(unsafe.Pointer(uintptr(unsafe.Pointer(bas)) + uintptr(uintptr(newLen-1)*size))) +} + +func structPointer_FieldPointer(p structPointer, f field) structPointer { + return structPointer(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +func structPointer_GetRefStructPointer(p structPointer, f field) structPointer { + return structPointer((*structPointer)(unsafe.Pointer(uintptr(p) + uintptr(f)))) +} + +func structPointer_GetSliceHeader(p structPointer, f field) *reflect.SliceHeader { + return (*reflect.SliceHeader)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +func structPointer_Add(p structPointer, size field) structPointer { + return structPointer(unsafe.Pointer(uintptr(p) + uintptr(size))) +} + +func structPointer_Len(p structPointer, f field) int { + return len(*(*[]interface{})(unsafe.Pointer(structPointer_GetRefStructPointer(p, f)))) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/properties.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/properties.go new file mode 100644 index 0000000000000..5e6a0b3ba719b --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/properties.go @@ -0,0 +1,923 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto + +/* + * Routines for encoding data into the wire format for protocol buffers. + */ + +import ( + "fmt" + "log" + "os" + "reflect" + "sort" + "strconv" + "strings" + "sync" +) + +const debug bool = false + +// Constants that identify the encoding of a value on the wire. +const ( + WireVarint = 0 + WireFixed64 = 1 + WireBytes = 2 + WireStartGroup = 3 + WireEndGroup = 4 + WireFixed32 = 5 +) + +const startSize = 10 // initial slice/string sizes + +// Encoders are defined in encode.go +// An encoder outputs the full representation of a field, including its +// tag and encoder type. +type encoder func(p *Buffer, prop *Properties, base structPointer) error + +// A valueEncoder encodes a single integer in a particular encoding. +type valueEncoder func(o *Buffer, x uint64) error + +// Sizers are defined in encode.go +// A sizer returns the encoded size of a field, including its tag and encoder +// type. +type sizer func(prop *Properties, base structPointer) int + +// A valueSizer returns the encoded size of a single integer in a particular +// encoding. +type valueSizer func(x uint64) int + +// Decoders are defined in decode.go +// A decoder creates a value from its wire representation. +// Unrecognized subelements are saved in unrec. +type decoder func(p *Buffer, prop *Properties, base structPointer) error + +// A valueDecoder decodes a single integer in a particular encoding. +type valueDecoder func(o *Buffer) (x uint64, err error) + +// A oneofMarshaler does the marshaling for all oneof fields in a message. +type oneofMarshaler func(Message, *Buffer) error + +// A oneofUnmarshaler does the unmarshaling for a oneof field in a message. +type oneofUnmarshaler func(Message, int, int, *Buffer) (bool, error) + +// A oneofSizer does the sizing for all oneof fields in a message. +type oneofSizer func(Message) int + +// tagMap is an optimization over map[int]int for typical protocol buffer +// use-cases. Encoded protocol buffers are often in tag order with small tag +// numbers. +type tagMap struct { + fastTags []int + slowTags map[int]int +} + +// tagMapFastLimit is the upper bound on the tag number that will be stored in +// the tagMap slice rather than its map. +const tagMapFastLimit = 1024 + +func (p *tagMap) get(t int) (int, bool) { + if t > 0 && t < tagMapFastLimit { + if t >= len(p.fastTags) { + return 0, false + } + fi := p.fastTags[t] + return fi, fi >= 0 + } + fi, ok := p.slowTags[t] + return fi, ok +} + +func (p *tagMap) put(t int, fi int) { + if t > 0 && t < tagMapFastLimit { + for len(p.fastTags) < t+1 { + p.fastTags = append(p.fastTags, -1) + } + p.fastTags[t] = fi + return + } + if p.slowTags == nil { + p.slowTags = make(map[int]int) + } + p.slowTags[t] = fi +} + +// StructProperties represents properties for all the fields of a struct. +// decoderTags and decoderOrigNames should only be used by the decoder. +type StructProperties struct { + Prop []*Properties // properties for each field + reqCount int // required count + decoderTags tagMap // map from proto tag to struct field number + decoderOrigNames map[string]int // map from original name to struct field number + order []int // list of struct field numbers in tag order + unrecField field // field id of the XXX_unrecognized []byte field + extendable bool // is this an extendable proto + + oneofMarshaler oneofMarshaler + oneofUnmarshaler oneofUnmarshaler + oneofSizer oneofSizer + stype reflect.Type + + // OneofTypes contains information about the oneof fields in this message. + // It is keyed by the original name of a field. + OneofTypes map[string]*OneofProperties +} + +// OneofProperties represents information about a specific field in a oneof. +type OneofProperties struct { + Type reflect.Type // pointer to generated struct type for this oneof field + Field int // struct field number of the containing oneof in the message + Prop *Properties +} + +// Implement the sorting interface so we can sort the fields in tag order, as recommended by the spec. +// See encode.go, (*Buffer).enc_struct. + +func (sp *StructProperties) Len() int { return len(sp.order) } +func (sp *StructProperties) Less(i, j int) bool { + return sp.Prop[sp.order[i]].Tag < sp.Prop[sp.order[j]].Tag +} +func (sp *StructProperties) Swap(i, j int) { sp.order[i], sp.order[j] = sp.order[j], sp.order[i] } + +// Properties represents the protocol-specific behavior of a single struct field. +type Properties struct { + Name string // name of the field, for error messages + OrigName string // original name before protocol compiler (always set) + JSONName string // name to use for JSON; determined by protoc + Wire string + WireType int + Tag int + Required bool + Optional bool + Repeated bool + Packed bool // relevant for repeated primitives only + Enum string // set for enum types only + proto3 bool // whether this is known to be a proto3 field; set for []byte only + oneof bool // whether this is a oneof field + + Default string // default value + HasDefault bool // whether an explicit default was provided + CustomType string + def_uint64 uint64 + + enc encoder + valEnc valueEncoder // set for bool and numeric types only + field field + tagcode []byte // encoding of EncodeVarint((Tag<<3)|WireType) + tagbuf [8]byte + stype reflect.Type // set for struct types only + sstype reflect.Type // set for slices of structs types only + ctype reflect.Type // set for custom types only + sprop *StructProperties // set for struct types only + isMarshaler bool + isUnmarshaler bool + + mtype reflect.Type // set for map types only + mkeyprop *Properties // set for map types only + mvalprop *Properties // set for map types only + + size sizer + valSize valueSizer // set for bool and numeric types only + + dec decoder + valDec valueDecoder // set for bool and numeric types only + + // If this is a packable field, this will be the decoder for the packed version of the field. + packedDec decoder +} + +// String formats the properties in the protobuf struct field tag style. +func (p *Properties) String() string { + s := p.Wire + s = "," + s += strconv.Itoa(p.Tag) + if p.Required { + s += ",req" + } + if p.Optional { + s += ",opt" + } + if p.Repeated { + s += ",rep" + } + if p.Packed { + s += ",packed" + } + s += ",name=" + p.OrigName + if p.JSONName != p.OrigName { + s += ",json=" + p.JSONName + } + if p.proto3 { + s += ",proto3" + } + if p.oneof { + s += ",oneof" + } + if len(p.Enum) > 0 { + s += ",enum=" + p.Enum + } + if p.HasDefault { + s += ",def=" + p.Default + } + return s +} + +// Parse populates p by parsing a string in the protobuf struct field tag style. +func (p *Properties) Parse(s string) { + // "bytes,49,opt,name=foo,def=hello!" + fields := strings.Split(s, ",") // breaks def=, but handled below. + if len(fields) < 2 { + fmt.Fprintf(os.Stderr, "proto: tag has too few fields: %q\n", s) + return + } + + p.Wire = fields[0] + switch p.Wire { + case "varint": + p.WireType = WireVarint + p.valEnc = (*Buffer).EncodeVarint + p.valDec = (*Buffer).DecodeVarint + p.valSize = sizeVarint + case "fixed32": + p.WireType = WireFixed32 + p.valEnc = (*Buffer).EncodeFixed32 + p.valDec = (*Buffer).DecodeFixed32 + p.valSize = sizeFixed32 + case "fixed64": + p.WireType = WireFixed64 + p.valEnc = (*Buffer).EncodeFixed64 + p.valDec = (*Buffer).DecodeFixed64 + p.valSize = sizeFixed64 + case "zigzag32": + p.WireType = WireVarint + p.valEnc = (*Buffer).EncodeZigzag32 + p.valDec = (*Buffer).DecodeZigzag32 + p.valSize = sizeZigzag32 + case "zigzag64": + p.WireType = WireVarint + p.valEnc = (*Buffer).EncodeZigzag64 + p.valDec = (*Buffer).DecodeZigzag64 + p.valSize = sizeZigzag64 + case "bytes", "group": + p.WireType = WireBytes + // no numeric converter for non-numeric types + default: + fmt.Fprintf(os.Stderr, "proto: tag has unknown wire type: %q\n", s) + return + } + + var err error + p.Tag, err = strconv.Atoi(fields[1]) + if err != nil { + return + } + + for i := 2; i < len(fields); i++ { + f := fields[i] + switch { + case f == "req": + p.Required = true + case f == "opt": + p.Optional = true + case f == "rep": + p.Repeated = true + case f == "packed": + p.Packed = true + case strings.HasPrefix(f, "name="): + p.OrigName = f[5:] + case strings.HasPrefix(f, "json="): + p.JSONName = f[5:] + case strings.HasPrefix(f, "enum="): + p.Enum = f[5:] + case f == "proto3": + p.proto3 = true + case f == "oneof": + p.oneof = true + case strings.HasPrefix(f, "def="): + p.HasDefault = true + p.Default = f[4:] // rest of string + if i+1 < len(fields) { + // Commas aren't escaped, and def is always last. + p.Default += "," + strings.Join(fields[i+1:], ",") + break + } + case strings.HasPrefix(f, "embedded="): + p.OrigName = strings.Split(f, "=")[1] + case strings.HasPrefix(f, "customtype="): + p.CustomType = strings.Split(f, "=")[1] + } + } +} + +func logNoSliceEnc(t1, t2 reflect.Type) { + fmt.Fprintf(os.Stderr, "proto: no slice oenc for %T = []%T\n", t1, t2) +} + +var protoMessageType = reflect.TypeOf((*Message)(nil)).Elem() + +// Initialize the fields for encoding and decoding. +func (p *Properties) setEncAndDec(typ reflect.Type, f *reflect.StructField, lockGetProp bool) { + p.enc = nil + p.dec = nil + p.size = nil + if len(p.CustomType) > 0 { + p.setCustomEncAndDec(typ) + p.setTag(lockGetProp) + return + } + switch t1 := typ; t1.Kind() { + default: + fmt.Fprintf(os.Stderr, "proto: no coders for %v\n", t1) + + // proto3 scalar types + + case reflect.Bool: + if p.proto3 { + p.enc = (*Buffer).enc_proto3_bool + p.dec = (*Buffer).dec_proto3_bool + p.size = size_proto3_bool + } else { + p.enc = (*Buffer).enc_ref_bool + p.dec = (*Buffer).dec_proto3_bool + p.size = size_ref_bool + } + case reflect.Int32: + if p.proto3 { + p.enc = (*Buffer).enc_proto3_int32 + p.dec = (*Buffer).dec_proto3_int32 + p.size = size_proto3_int32 + } else { + p.enc = (*Buffer).enc_ref_int32 + p.dec = (*Buffer).dec_proto3_int32 + p.size = size_ref_int32 + } + case reflect.Uint32: + if p.proto3 { + p.enc = (*Buffer).enc_proto3_uint32 + p.dec = (*Buffer).dec_proto3_int32 // can reuse + p.size = size_proto3_uint32 + } else { + p.enc = (*Buffer).enc_ref_uint32 + p.dec = (*Buffer).dec_proto3_int32 // can reuse + p.size = size_ref_uint32 + } + case reflect.Int64, reflect.Uint64: + if p.proto3 { + p.enc = (*Buffer).enc_proto3_int64 + p.dec = (*Buffer).dec_proto3_int64 + p.size = size_proto3_int64 + } else { + p.enc = (*Buffer).enc_ref_int64 + p.dec = (*Buffer).dec_proto3_int64 + p.size = size_ref_int64 + } + case reflect.Float32: + if p.proto3 { + p.enc = (*Buffer).enc_proto3_uint32 // can just treat them as bits + p.dec = (*Buffer).dec_proto3_int32 + p.size = size_proto3_uint32 + } else { + p.enc = (*Buffer).enc_ref_uint32 // can just treat them as bits + p.dec = (*Buffer).dec_proto3_int32 + p.size = size_ref_uint32 + } + case reflect.Float64: + if p.proto3 { + p.enc = (*Buffer).enc_proto3_int64 // can just treat them as bits + p.dec = (*Buffer).dec_proto3_int64 + p.size = size_proto3_int64 + } else { + p.enc = (*Buffer).enc_ref_int64 // can just treat them as bits + p.dec = (*Buffer).dec_proto3_int64 + p.size = size_ref_int64 + } + case reflect.String: + if p.proto3 { + p.enc = (*Buffer).enc_proto3_string + p.dec = (*Buffer).dec_proto3_string + p.size = size_proto3_string + } else { + p.enc = (*Buffer).enc_ref_string + p.dec = (*Buffer).dec_proto3_string + p.size = size_ref_string + } + case reflect.Struct: + p.stype = typ + p.isMarshaler = isMarshaler(typ) + p.isUnmarshaler = isUnmarshaler(typ) + if p.Wire == "bytes" { + p.enc = (*Buffer).enc_ref_struct_message + p.dec = (*Buffer).dec_ref_struct_message + p.size = size_ref_struct_message + } else { + fmt.Fprintf(os.Stderr, "proto: no coders for struct %T\n", typ) + } + + case reflect.Ptr: + switch t2 := t1.Elem(); t2.Kind() { + default: + fmt.Fprintf(os.Stderr, "proto: no encoder function for %v -> %v\n", t1, t2) + break + case reflect.Bool: + p.enc = (*Buffer).enc_bool + p.dec = (*Buffer).dec_bool + p.size = size_bool + case reflect.Int32: + p.enc = (*Buffer).enc_int32 + p.dec = (*Buffer).dec_int32 + p.size = size_int32 + case reflect.Uint32: + p.enc = (*Buffer).enc_uint32 + p.dec = (*Buffer).dec_int32 // can reuse + p.size = size_uint32 + case reflect.Int64, reflect.Uint64: + p.enc = (*Buffer).enc_int64 + p.dec = (*Buffer).dec_int64 + p.size = size_int64 + case reflect.Float32: + p.enc = (*Buffer).enc_uint32 // can just treat them as bits + p.dec = (*Buffer).dec_int32 + p.size = size_uint32 + case reflect.Float64: + p.enc = (*Buffer).enc_int64 // can just treat them as bits + p.dec = (*Buffer).dec_int64 + p.size = size_int64 + case reflect.String: + p.enc = (*Buffer).enc_string + p.dec = (*Buffer).dec_string + p.size = size_string + case reflect.Struct: + p.stype = t1.Elem() + p.isMarshaler = isMarshaler(t1) + p.isUnmarshaler = isUnmarshaler(t1) + if p.Wire == "bytes" { + p.enc = (*Buffer).enc_struct_message + p.dec = (*Buffer).dec_struct_message + p.size = size_struct_message + } else { + p.enc = (*Buffer).enc_struct_group + p.dec = (*Buffer).dec_struct_group + p.size = size_struct_group + } + } + + case reflect.Slice: + switch t2 := t1.Elem(); t2.Kind() { + default: + logNoSliceEnc(t1, t2) + break + case reflect.Bool: + if p.Packed { + p.enc = (*Buffer).enc_slice_packed_bool + p.size = size_slice_packed_bool + } else { + p.enc = (*Buffer).enc_slice_bool + p.size = size_slice_bool + } + p.dec = (*Buffer).dec_slice_bool + p.packedDec = (*Buffer).dec_slice_packed_bool + case reflect.Int32: + if p.Packed { + p.enc = (*Buffer).enc_slice_packed_int32 + p.size = size_slice_packed_int32 + } else { + p.enc = (*Buffer).enc_slice_int32 + p.size = size_slice_int32 + } + p.dec = (*Buffer).dec_slice_int32 + p.packedDec = (*Buffer).dec_slice_packed_int32 + case reflect.Uint32: + if p.Packed { + p.enc = (*Buffer).enc_slice_packed_uint32 + p.size = size_slice_packed_uint32 + } else { + p.enc = (*Buffer).enc_slice_uint32 + p.size = size_slice_uint32 + } + p.dec = (*Buffer).dec_slice_int32 + p.packedDec = (*Buffer).dec_slice_packed_int32 + case reflect.Int64, reflect.Uint64: + if p.Packed { + p.enc = (*Buffer).enc_slice_packed_int64 + p.size = size_slice_packed_int64 + } else { + p.enc = (*Buffer).enc_slice_int64 + p.size = size_slice_int64 + } + p.dec = (*Buffer).dec_slice_int64 + p.packedDec = (*Buffer).dec_slice_packed_int64 + case reflect.Uint8: + p.enc = (*Buffer).enc_slice_byte + p.dec = (*Buffer).dec_slice_byte + p.size = size_slice_byte + // This is a []byte, which is either a bytes field, + // or the value of a map field. In the latter case, + // we always encode an empty []byte, so we should not + // use the proto3 enc/size funcs. + // f == nil iff this is the key/value of a map field. + if p.proto3 && f != nil { + p.enc = (*Buffer).enc_proto3_slice_byte + p.size = size_proto3_slice_byte + } + case reflect.Float32, reflect.Float64: + switch t2.Bits() { + case 32: + // can just treat them as bits + if p.Packed { + p.enc = (*Buffer).enc_slice_packed_uint32 + p.size = size_slice_packed_uint32 + } else { + p.enc = (*Buffer).enc_slice_uint32 + p.size = size_slice_uint32 + } + p.dec = (*Buffer).dec_slice_int32 + p.packedDec = (*Buffer).dec_slice_packed_int32 + case 64: + // can just treat them as bits + if p.Packed { + p.enc = (*Buffer).enc_slice_packed_int64 + p.size = size_slice_packed_int64 + } else { + p.enc = (*Buffer).enc_slice_int64 + p.size = size_slice_int64 + } + p.dec = (*Buffer).dec_slice_int64 + p.packedDec = (*Buffer).dec_slice_packed_int64 + default: + logNoSliceEnc(t1, t2) + break + } + case reflect.String: + p.enc = (*Buffer).enc_slice_string + p.dec = (*Buffer).dec_slice_string + p.size = size_slice_string + case reflect.Ptr: + switch t3 := t2.Elem(); t3.Kind() { + default: + fmt.Fprintf(os.Stderr, "proto: no ptr oenc for %T -> %T -> %T\n", t1, t2, t3) + break + case reflect.Struct: + p.stype = t2.Elem() + p.isMarshaler = isMarshaler(t2) + p.isUnmarshaler = isUnmarshaler(t2) + if p.Wire == "bytes" { + p.enc = (*Buffer).enc_slice_struct_message + p.dec = (*Buffer).dec_slice_struct_message + p.size = size_slice_struct_message + } else { + p.enc = (*Buffer).enc_slice_struct_group + p.dec = (*Buffer).dec_slice_struct_group + p.size = size_slice_struct_group + } + } + case reflect.Slice: + switch t2.Elem().Kind() { + default: + fmt.Fprintf(os.Stderr, "proto: no slice elem oenc for %T -> %T -> %T\n", t1, t2, t2.Elem()) + break + case reflect.Uint8: + p.enc = (*Buffer).enc_slice_slice_byte + p.dec = (*Buffer).dec_slice_slice_byte + p.size = size_slice_slice_byte + } + case reflect.Struct: + p.setSliceOfNonPointerStructs(t1) + } + + case reflect.Map: + p.enc = (*Buffer).enc_new_map + p.dec = (*Buffer).dec_new_map + p.size = size_new_map + + p.mtype = t1 + p.mkeyprop = &Properties{} + p.mkeyprop.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp) + p.mvalprop = &Properties{} + vtype := p.mtype.Elem() + if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice { + // The value type is not a message (*T) or bytes ([]byte), + // so we need encoders for the pointer to this type. + vtype = reflect.PtrTo(vtype) + } + p.mvalprop.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp) + } + p.setTag(lockGetProp) +} + +func (p *Properties) setTag(lockGetProp bool) { + // precalculate tag code + wire := p.WireType + if p.Packed { + wire = WireBytes + } + x := uint32(p.Tag)<<3 | uint32(wire) + i := 0 + for i = 0; x > 127; i++ { + p.tagbuf[i] = 0x80 | uint8(x&0x7F) + x >>= 7 + } + p.tagbuf[i] = uint8(x) + p.tagcode = p.tagbuf[0 : i+1] + + if p.stype != nil { + if lockGetProp { + p.sprop = GetProperties(p.stype) + } else { + p.sprop = getPropertiesLocked(p.stype) + } + } +} + +var ( + marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem() + unmarshalerType = reflect.TypeOf((*Unmarshaler)(nil)).Elem() +) + +// isMarshaler reports whether type t implements Marshaler. +func isMarshaler(t reflect.Type) bool { + return t.Implements(marshalerType) +} + +// isUnmarshaler reports whether type t implements Unmarshaler. +func isUnmarshaler(t reflect.Type) bool { + return t.Implements(unmarshalerType) +} + +// Init populates the properties from a protocol buffer struct tag. +func (p *Properties) Init(typ reflect.Type, name, tag string, f *reflect.StructField) { + p.init(typ, name, tag, f, true) +} + +func (p *Properties) init(typ reflect.Type, name, tag string, f *reflect.StructField, lockGetProp bool) { + // "bytes,49,opt,def=hello!" + p.Name = name + p.OrigName = name + if f != nil { + p.field = toField(f) + } + if tag == "" { + return + } + p.Parse(tag) + p.setEncAndDec(typ, f, lockGetProp) +} + +var ( + propertiesMu sync.RWMutex + propertiesMap = make(map[reflect.Type]*StructProperties) +) + +// GetProperties returns the list of properties for the type represented by t. +// t must represent a generated struct type of a protocol message. +func GetProperties(t reflect.Type) *StructProperties { + if t.Kind() != reflect.Struct { + panic("proto: type must have kind struct") + } + + // Most calls to GetProperties in a long-running program will be + // retrieving details for types we have seen before. + propertiesMu.RLock() + sprop, ok := propertiesMap[t] + propertiesMu.RUnlock() + if ok { + if collectStats { + stats.Chit++ + } + return sprop + } + + propertiesMu.Lock() + sprop = getPropertiesLocked(t) + propertiesMu.Unlock() + return sprop +} + +// getPropertiesLocked requires that propertiesMu is held. +func getPropertiesLocked(t reflect.Type) *StructProperties { + if prop, ok := propertiesMap[t]; ok { + if collectStats { + stats.Chit++ + } + return prop + } + if collectStats { + stats.Cmiss++ + } + + prop := new(StructProperties) + // in case of recursive protos, fill this in now. + propertiesMap[t] = prop + + // build properties + prop.extendable = reflect.PtrTo(t).Implements(extendableProtoType) + prop.unrecField = invalidField + prop.Prop = make([]*Properties, t.NumField()) + prop.order = make([]int, t.NumField()) + + isOneofMessage := false + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + p := new(Properties) + name := f.Name + p.init(f.Type, name, f.Tag.Get("protobuf"), &f, false) + + if f.Name == "XXX_extensions" { // special case + if len(f.Tag.Get("protobuf")) > 0 { + p.enc = (*Buffer).enc_ext_slice_byte + p.dec = nil // not needed + p.size = size_ext_slice_byte + } else { + p.enc = (*Buffer).enc_map + p.dec = nil // not needed + p.size = size_map + } + } + if f.Name == "XXX_unrecognized" { // special case + prop.unrecField = toField(&f) + } + oneof := f.Tag.Get("protobuf_oneof") != "" // special case + if oneof { + isOneofMessage = true + } + prop.Prop[i] = p + prop.order[i] = i + if debug { + print(i, " ", f.Name, " ", t.String(), " ") + if p.Tag > 0 { + print(p.String()) + } + print("\n") + } + if p.enc == nil && !strings.HasPrefix(f.Name, "XXX_") && !oneof { + fmt.Fprintln(os.Stderr, "proto: no encoder for", f.Name, f.Type.String(), "[GetProperties]") + } + } + + // Re-order prop.order. + sort.Sort(prop) + + type oneofMessage interface { + XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{}) + } + if om, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); isOneofMessage && ok { + var oots []interface{} + prop.oneofMarshaler, prop.oneofUnmarshaler, prop.oneofSizer, oots = om.XXX_OneofFuncs() + prop.stype = t + + // Interpret oneof metadata. + prop.OneofTypes = make(map[string]*OneofProperties) + for _, oot := range oots { + oop := &OneofProperties{ + Type: reflect.ValueOf(oot).Type(), // *T + Prop: new(Properties), + } + sft := oop.Type.Elem().Field(0) + oop.Prop.Name = sft.Name + oop.Prop.Parse(sft.Tag.Get("protobuf")) + // There will be exactly one interface field that + // this new value is assignable to. + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + if f.Type.Kind() != reflect.Interface { + continue + } + if !oop.Type.AssignableTo(f.Type) { + continue + } + oop.Field = i + break + } + prop.OneofTypes[oop.Prop.OrigName] = oop + } + } + + // build required counts + // build tags + reqCount := 0 + prop.decoderOrigNames = make(map[string]int) + for i, p := range prop.Prop { + if strings.HasPrefix(p.Name, "XXX_") { + // Internal fields should not appear in tags/origNames maps. + // They are handled specially when encoding and decoding. + continue + } + if p.Required { + reqCount++ + } + prop.decoderTags.put(p.Tag, i) + prop.decoderOrigNames[p.OrigName] = i + } + prop.reqCount = reqCount + + return prop +} + +// Return the Properties object for the x[0]'th field of the structure. +func propByIndex(t reflect.Type, x []int) *Properties { + if len(x) != 1 { + fmt.Fprintf(os.Stderr, "proto: field index dimension %d (not 1) for type %s\n", len(x), t) + return nil + } + prop := GetProperties(t) + return prop.Prop[x[0]] +} + +// Get the address and type of a pointer to a struct from an interface. +func getbase(pb Message) (t reflect.Type, b structPointer, err error) { + if pb == nil { + err = ErrNil + return + } + // get the reflect type of the pointer to the struct. + t = reflect.TypeOf(pb) + // get the address of the struct. + value := reflect.ValueOf(pb) + b = toStructPointer(value) + return +} + +// A global registry of enum types. +// The generated code will register the generated maps by calling RegisterEnum. + +var enumValueMaps = make(map[string]map[string]int32) +var enumStringMaps = make(map[string]map[int32]string) + +// RegisterEnum is called from the generated code to install the enum descriptor +// maps into the global table to aid parsing text format protocol buffers. +func RegisterEnum(typeName string, unusedNameMap map[int32]string, valueMap map[string]int32) { + if _, ok := enumValueMaps[typeName]; ok { + panic("proto: duplicate enum registered: " + typeName) + } + enumValueMaps[typeName] = valueMap + if _, ok := enumStringMaps[typeName]; ok { + panic("proto: duplicate enum registered: " + typeName) + } + enumStringMaps[typeName] = unusedNameMap +} + +// EnumValueMap returns the mapping from names to integers of the +// enum type enumType, or a nil if not found. +func EnumValueMap(enumType string) map[string]int32 { + return enumValueMaps[enumType] +} + +// A registry of all linked message types. +// The string is a fully-qualified proto name ("pkg.Message"). +var ( + protoTypes = make(map[string]reflect.Type) + revProtoTypes = make(map[reflect.Type]string) +) + +// RegisterType is called from generated code and maps from the fully qualified +// proto name to the type (pointer to struct) of the protocol buffer. +func RegisterType(x Message, name string) { + if _, ok := protoTypes[name]; ok { + // TODO: Some day, make this a panic. + log.Printf("proto: duplicate proto type registered: %s", name) + return + } + t := reflect.TypeOf(x) + protoTypes[name] = t + revProtoTypes[t] = name +} + +// MessageName returns the fully-qualified proto name for the given message type. +func MessageName(x Message) string { return revProtoTypes[reflect.TypeOf(x)] } + +// MessageType returns the message type (pointer to struct) for a named message. +func MessageType(name string) reflect.Type { return protoTypes[name] } diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/properties_gogo.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/properties_gogo.go new file mode 100644 index 0000000000000..8daf9f7768c25 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/properties_gogo.go @@ -0,0 +1,64 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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. +// +// 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. + +package proto + +import ( + "fmt" + "os" + "reflect" +) + +func (p *Properties) setCustomEncAndDec(typ reflect.Type) { + p.ctype = typ + if p.Repeated { + p.enc = (*Buffer).enc_custom_slice_bytes + p.dec = (*Buffer).dec_custom_slice_bytes + p.size = size_custom_slice_bytes + } else if typ.Kind() == reflect.Ptr { + p.enc = (*Buffer).enc_custom_bytes + p.dec = (*Buffer).dec_custom_bytes + p.size = size_custom_bytes + } else { + p.enc = (*Buffer).enc_custom_ref_bytes + p.dec = (*Buffer).dec_custom_ref_bytes + p.size = size_custom_ref_bytes + } +} + +func (p *Properties) setSliceOfNonPointerStructs(typ reflect.Type) { + t2 := typ.Elem() + p.sstype = typ + p.stype = t2 + p.isMarshaler = isMarshaler(t2) + p.isUnmarshaler = isUnmarshaler(t2) + p.enc = (*Buffer).enc_slice_ref_struct_message + p.dec = (*Buffer).dec_slice_ref_struct_message + p.size = size_slice_ref_struct_message + if p.Wire != "bytes" { + fmt.Fprintf(os.Stderr, "proto: no ptr oenc for %T -> %T \n", typ, t2) + } +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/skip_gogo.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/skip_gogo.go new file mode 100644 index 0000000000000..4fe7e0815c9f3 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/skip_gogo.go @@ -0,0 +1,117 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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. +// +// 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. + +package proto + +import ( + "fmt" + "io" +) + +func Skip(data []byte) (n int, err error) { + l := len(data) + index := 0 + for index < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if index >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[index] + index++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for { + if index >= l { + return 0, io.ErrUnexpectedEOF + } + index++ + if data[index-1] < 0x80 { + break + } + } + return index, nil + case 1: + index += 8 + return index, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if index >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[index] + index++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + index += length + return index, nil + case 3: + for { + var innerWire uint64 + var start int = index + for shift := uint(0); ; shift += 7 { + if index >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[index] + index++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := Skip(data[start:]) + if err != nil { + return 0, err + } + index = start + next + } + return index, nil + case 4: + return index, nil + case 5: + index += 4 + return index, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/text.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/text.go new file mode 100644 index 0000000000000..b60be28ab081d --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/text.go @@ -0,0 +1,805 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto + +// Functions for writing the text protocol buffer format. + +import ( + "bufio" + "bytes" + "encoding" + "errors" + "fmt" + "io" + "log" + "math" + "reflect" + "sort" + "strings" +) + +var ( + newline = []byte("\n") + spaces = []byte(" ") + gtNewline = []byte(">\n") + endBraceNewline = []byte("}\n") + backslashN = []byte{'\\', 'n'} + backslashR = []byte{'\\', 'r'} + backslashT = []byte{'\\', 't'} + backslashDQ = []byte{'\\', '"'} + backslashBS = []byte{'\\', '\\'} + posInf = []byte("inf") + negInf = []byte("-inf") + nan = []byte("nan") +) + +type writer interface { + io.Writer + WriteByte(byte) error +} + +// textWriter is an io.Writer that tracks its indentation level. +type textWriter struct { + ind int + complete bool // if the current position is a complete line + compact bool // whether to write out as a one-liner + w writer +} + +func (w *textWriter) WriteString(s string) (n int, err error) { + if !strings.Contains(s, "\n") { + if !w.compact && w.complete { + w.writeIndent() + } + w.complete = false + return io.WriteString(w.w, s) + } + // WriteString is typically called without newlines, so this + // codepath and its copy are rare. We copy to avoid + // duplicating all of Write's logic here. + return w.Write([]byte(s)) +} + +func (w *textWriter) Write(p []byte) (n int, err error) { + newlines := bytes.Count(p, newline) + if newlines == 0 { + if !w.compact && w.complete { + w.writeIndent() + } + n, err = w.w.Write(p) + w.complete = false + return n, err + } + + frags := bytes.SplitN(p, newline, newlines+1) + if w.compact { + for i, frag := range frags { + if i > 0 { + if err := w.w.WriteByte(' '); err != nil { + return n, err + } + n++ + } + nn, err := w.w.Write(frag) + n += nn + if err != nil { + return n, err + } + } + return n, nil + } + + for i, frag := range frags { + if w.complete { + w.writeIndent() + } + nn, err := w.w.Write(frag) + n += nn + if err != nil { + return n, err + } + if i+1 < len(frags) { + if err := w.w.WriteByte('\n'); err != nil { + return n, err + } + n++ + } + } + w.complete = len(frags[len(frags)-1]) == 0 + return n, nil +} + +func (w *textWriter) WriteByte(c byte) error { + if w.compact && c == '\n' { + c = ' ' + } + if !w.compact && w.complete { + w.writeIndent() + } + err := w.w.WriteByte(c) + w.complete = c == '\n' + return err +} + +func (w *textWriter) indent() { w.ind++ } + +func (w *textWriter) unindent() { + if w.ind == 0 { + log.Printf("proto: textWriter unindented too far") + return + } + w.ind-- +} + +func writeName(w *textWriter, props *Properties) error { + if _, err := w.WriteString(props.OrigName); err != nil { + return err + } + if props.Wire != "group" { + return w.WriteByte(':') + } + return nil +} + +// raw is the interface satisfied by RawMessage. +type raw interface { + Bytes() []byte +} + +func writeStruct(w *textWriter, sv reflect.Value) error { + st := sv.Type() + sprops := GetProperties(st) + for i := 0; i < sv.NumField(); i++ { + fv := sv.Field(i) + props := sprops.Prop[i] + name := st.Field(i).Name + + if strings.HasPrefix(name, "XXX_") { + // There are two XXX_ fields: + // XXX_unrecognized []byte + // XXX_extensions map[int32]proto.Extension + // The first is handled here; + // the second is handled at the bottom of this function. + if name == "XXX_unrecognized" && !fv.IsNil() { + if err := writeUnknownStruct(w, fv.Interface().([]byte)); err != nil { + return err + } + } + continue + } + if fv.Kind() == reflect.Ptr && fv.IsNil() { + // Field not filled in. This could be an optional field or + // a required field that wasn't filled in. Either way, there + // isn't anything we can show for it. + continue + } + if fv.Kind() == reflect.Slice && fv.IsNil() { + // Repeated field that is empty, or a bytes field that is unused. + continue + } + + if props.Repeated && fv.Kind() == reflect.Slice { + // Repeated field. + for j := 0; j < fv.Len(); j++ { + if err := writeName(w, props); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + v := fv.Index(j) + if v.Kind() == reflect.Ptr && v.IsNil() { + // A nil message in a repeated field is not valid, + // but we can handle that more gracefully than panicking. + if _, err := w.Write([]byte("\n")); err != nil { + return err + } + continue + } + if len(props.Enum) > 0 { + if err := writeEnum(w, v, props); err != nil { + return err + } + } else if err := writeAny(w, v, props); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + } + continue + } + if fv.Kind() == reflect.Map { + // Map fields are rendered as a repeated struct with key/value fields. + keys := fv.MapKeys() + sort.Sort(mapKeys(keys)) + for _, key := range keys { + val := fv.MapIndex(key) + if err := writeName(w, props); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + // open struct + if err := w.WriteByte('<'); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte('\n'); err != nil { + return err + } + } + w.indent() + // key + if _, err := w.WriteString("key:"); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + if err := writeAny(w, key, props.mkeyprop); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + // nil values aren't legal, but we can avoid panicking because of them. + if val.Kind() != reflect.Ptr || !val.IsNil() { + // value + if _, err := w.WriteString("value:"); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + if err := writeAny(w, val, props.mvalprop); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + } + // close struct + w.unindent() + if err := w.WriteByte('>'); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + } + continue + } + if props.proto3 && fv.Kind() == reflect.Slice && fv.Len() == 0 { + // empty bytes field + continue + } + if props.proto3 && fv.Kind() != reflect.Ptr && fv.Kind() != reflect.Slice { + // proto3 non-repeated scalar field; skip if zero value + if isProto3Zero(fv) { + continue + } + } + + if fv.Kind() == reflect.Interface { + // Check if it is a oneof. + if st.Field(i).Tag.Get("protobuf_oneof") != "" { + // fv is nil, or holds a pointer to generated struct. + // That generated struct has exactly one field, + // which has a protobuf struct tag. + if fv.IsNil() { + continue + } + inner := fv.Elem().Elem() // interface -> *T -> T + tag := inner.Type().Field(0).Tag.Get("protobuf") + props = new(Properties) // Overwrite the outer props var, but not its pointee. + props.Parse(tag) + // Write the value in the oneof, not the oneof itself. + fv = inner.Field(0) + + // Special case to cope with malformed messages gracefully: + // If the value in the oneof is a nil pointer, don't panic + // in writeAny. + if fv.Kind() == reflect.Ptr && fv.IsNil() { + // Use errors.New so writeAny won't render quotes. + msg := errors.New("/* nil */") + fv = reflect.ValueOf(&msg).Elem() + } + } + } + + if err := writeName(w, props); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + if b, ok := fv.Interface().(raw); ok { + if err := writeRaw(w, b.Bytes()); err != nil { + return err + } + continue + } + + if len(props.Enum) > 0 { + if err := writeEnum(w, fv, props); err != nil { + return err + } + } else if err := writeAny(w, fv, props); err != nil { + return err + } + + if err := w.WriteByte('\n'); err != nil { + return err + } + } + + // Extensions (the XXX_extensions field). + pv := sv + if pv.CanAddr() { + pv = sv.Addr() + } else { + pv = reflect.New(sv.Type()) + pv.Elem().Set(sv) + } + if pv.Type().Implements(extendableProtoType) { + if err := writeExtensions(w, pv); err != nil { + return err + } + } + + return nil +} + +// writeRaw writes an uninterpreted raw message. +func writeRaw(w *textWriter, b []byte) error { + if err := w.WriteByte('<'); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte('\n'); err != nil { + return err + } + } + w.indent() + if err := writeUnknownStruct(w, b); err != nil { + return err + } + w.unindent() + if err := w.WriteByte('>'); err != nil { + return err + } + return nil +} + +// writeAny writes an arbitrary field. +func writeAny(w *textWriter, v reflect.Value, props *Properties) error { + v = reflect.Indirect(v) + + if props != nil && len(props.CustomType) > 0 { + custom, ok := v.Interface().(Marshaler) + if ok { + data, err := custom.Marshal() + if err != nil { + return err + } + if err := writeString(w, string(data)); err != nil { + return err + } + return nil + } + } + + // Floats have special cases. + if v.Kind() == reflect.Float32 || v.Kind() == reflect.Float64 { + x := v.Float() + var b []byte + switch { + case math.IsInf(x, 1): + b = posInf + case math.IsInf(x, -1): + b = negInf + case math.IsNaN(x): + b = nan + } + if b != nil { + _, err := w.Write(b) + return err + } + // Other values are handled below. + } + + // We don't attempt to serialise every possible value type; only those + // that can occur in protocol buffers. + switch v.Kind() { + case reflect.Slice: + // Should only be a []byte; repeated fields are handled in writeStruct. + if err := writeString(w, string(v.Bytes())); err != nil { + return err + } + case reflect.String: + if err := writeString(w, v.String()); err != nil { + return err + } + case reflect.Struct: + // Required/optional group/message. + var bra, ket byte = '<', '>' + if props != nil && props.Wire == "group" { + bra, ket = '{', '}' + } + if err := w.WriteByte(bra); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte('\n'); err != nil { + return err + } + } + w.indent() + if tm, ok := v.Interface().(encoding.TextMarshaler); ok { + text, err := tm.MarshalText() + if err != nil { + return err + } + if _, err = w.Write(text); err != nil { + return err + } + } else if err := writeStruct(w, v); err != nil { + return err + } + w.unindent() + if err := w.WriteByte(ket); err != nil { + return err + } + default: + _, err := fmt.Fprint(w, v.Interface()) + return err + } + return nil +} + +// equivalent to C's isprint. +func isprint(c byte) bool { + return c >= 0x20 && c < 0x7f +} + +// writeString writes a string in the protocol buffer text format. +// It is similar to strconv.Quote except we don't use Go escape sequences, +// we treat the string as a byte sequence, and we use octal escapes. +// These differences are to maintain interoperability with the other +// languages' implementations of the text format. +func writeString(w *textWriter, s string) error { + // use WriteByte here to get any needed indent + if err := w.WriteByte('"'); err != nil { + return err + } + // Loop over the bytes, not the runes. + for i := 0; i < len(s); i++ { + var err error + // Divergence from C++: we don't escape apostrophes. + // There's no need to escape them, and the C++ parser + // copes with a naked apostrophe. + switch c := s[i]; c { + case '\n': + _, err = w.w.Write(backslashN) + case '\r': + _, err = w.w.Write(backslashR) + case '\t': + _, err = w.w.Write(backslashT) + case '"': + _, err = w.w.Write(backslashDQ) + case '\\': + _, err = w.w.Write(backslashBS) + default: + if isprint(c) { + err = w.w.WriteByte(c) + } else { + _, err = fmt.Fprintf(w.w, "\\%03o", c) + } + } + if err != nil { + return err + } + } + return w.WriteByte('"') +} + +func writeUnknownStruct(w *textWriter, data []byte) (err error) { + if !w.compact { + if _, err := fmt.Fprintf(w, "/* %d unknown bytes */\n", len(data)); err != nil { + return err + } + } + b := NewBuffer(data) + for b.index < len(b.buf) { + x, err := b.DecodeVarint() + if err != nil { + _, ferr := fmt.Fprintf(w, "/* %v */\n", err) + return ferr + } + wire, tag := x&7, x>>3 + if wire == WireEndGroup { + w.unindent() + if _, werr := w.Write(endBraceNewline); werr != nil { + return werr + } + continue + } + if _, ferr := fmt.Fprint(w, tag); ferr != nil { + return ferr + } + if wire != WireStartGroup { + if err = w.WriteByte(':'); err != nil { + return err + } + } + if !w.compact || wire == WireStartGroup { + if err = w.WriteByte(' '); err != nil { + return err + } + } + switch wire { + case WireBytes: + buf, e := b.DecodeRawBytes(false) + if e == nil { + _, err = fmt.Fprintf(w, "%q", buf) + } else { + _, err = fmt.Fprintf(w, "/* %v */", e) + } + case WireFixed32: + x, err = b.DecodeFixed32() + err = writeUnknownInt(w, x, err) + case WireFixed64: + x, err = b.DecodeFixed64() + err = writeUnknownInt(w, x, err) + case WireStartGroup: + err = w.WriteByte('{') + w.indent() + case WireVarint: + x, err = b.DecodeVarint() + err = writeUnknownInt(w, x, err) + default: + _, err = fmt.Fprintf(w, "/* unknown wire type %d */", wire) + } + if err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + } + return nil +} + +func writeUnknownInt(w *textWriter, x uint64, err error) error { + if err == nil { + _, err = fmt.Fprint(w, x) + } else { + _, err = fmt.Fprintf(w, "/* %v */", err) + } + return err +} + +type int32Slice []int32 + +func (s int32Slice) Len() int { return len(s) } +func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] } +func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } + +// writeExtensions writes all the extensions in pv. +// pv is assumed to be a pointer to a protocol message struct that is extendable. +func writeExtensions(w *textWriter, pv reflect.Value) error { + emap := extensionMaps[pv.Type().Elem()] + ep := pv.Interface().(extendableProto) + + // Order the extensions by ID. + // This isn't strictly necessary, but it will give us + // canonical output, which will also make testing easier. + var m map[int32]Extension + if em, ok := ep.(extensionsMap); ok { + m = em.ExtensionMap() + } else if em, ok := ep.(extensionsBytes); ok { + eb := em.GetExtensions() + var err error + m, err = BytesToExtensionsMap(*eb) + if err != nil { + return err + } + } + + ids := make([]int32, 0, len(m)) + for id := range m { + ids = append(ids, id) + } + sort.Sort(int32Slice(ids)) + + for _, extNum := range ids { + ext := m[extNum] + var desc *ExtensionDesc + if emap != nil { + desc = emap[extNum] + } + if desc == nil { + // Unknown extension. + if err := writeUnknownStruct(w, ext.enc); err != nil { + return err + } + continue + } + + pb, err := GetExtension(ep, desc) + if err != nil { + return fmt.Errorf("failed getting extension: %v", err) + } + + // Repeated extensions will appear as a slice. + if !desc.repeated() { + if err := writeExtension(w, desc.Name, pb); err != nil { + return err + } + } else { + v := reflect.ValueOf(pb) + for i := 0; i < v.Len(); i++ { + if err := writeExtension(w, desc.Name, v.Index(i).Interface()); err != nil { + return err + } + } + } + } + return nil +} + +func writeExtension(w *textWriter, name string, pb interface{}) error { + if _, err := fmt.Fprintf(w, "[%s]:", name); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + if err := writeAny(w, reflect.ValueOf(pb), nil); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + return nil +} + +func (w *textWriter) writeIndent() { + if !w.complete { + return + } + remain := w.ind * 2 + for remain > 0 { + n := remain + if n > len(spaces) { + n = len(spaces) + } + w.w.Write(spaces[:n]) + remain -= n + } + w.complete = false +} + +// TextMarshaler is a configurable text format marshaler. +type TextMarshaler struct { + Compact bool // use compact text format (one line). +} + +// Marshal writes a given protocol buffer in text format. +// The only errors returned are from w. +func (m *TextMarshaler) Marshal(w io.Writer, pb Message) error { + val := reflect.ValueOf(pb) + if pb == nil || val.IsNil() { + w.Write([]byte("")) + return nil + } + var bw *bufio.Writer + ww, ok := w.(writer) + if !ok { + bw = bufio.NewWriter(w) + ww = bw + } + aw := &textWriter{ + w: ww, + complete: true, + compact: m.Compact, + } + + if tm, ok := pb.(encoding.TextMarshaler); ok { + text, err := tm.MarshalText() + if err != nil { + return err + } + if _, err = aw.Write(text); err != nil { + return err + } + if bw != nil { + return bw.Flush() + } + return nil + } + // Dereference the received pointer so we don't have outer < and >. + v := reflect.Indirect(val) + if err := writeStruct(aw, v); err != nil { + return err + } + if bw != nil { + return bw.Flush() + } + return nil +} + +// Text is the same as Marshal, but returns the string directly. +func (m *TextMarshaler) Text(pb Message) string { + var buf bytes.Buffer + m.Marshal(&buf, pb) + return buf.String() +} + +var ( + defaultTextMarshaler = TextMarshaler{} + compactTextMarshaler = TextMarshaler{Compact: true} +) + +// TODO: consider removing some of the Marshal functions below. + +// MarshalText writes a given protocol buffer in text format. +// The only errors returned are from w. +func MarshalText(w io.Writer, pb Message) error { return defaultTextMarshaler.Marshal(w, pb) } + +// MarshalTextString is the same as MarshalText, but returns the string directly. +func MarshalTextString(pb Message) string { return defaultTextMarshaler.Text(pb) } + +// CompactText writes a given protocol buffer in compact text format (one line). +func CompactText(w io.Writer, pb Message) error { return compactTextMarshaler.Marshal(w, pb) } + +// CompactTextString is the same as CompactText, but returns the string directly. +func CompactTextString(pb Message) string { return compactTextMarshaler.Text(pb) } diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/text_gogo.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/text_gogo.go new file mode 100644 index 0000000000000..cdb23373c39ba --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/text_gogo.go @@ -0,0 +1,55 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// 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. +// +// 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. + +package proto + +import ( + "fmt" + "reflect" +) + +func writeEnum(w *textWriter, v reflect.Value, props *Properties) error { + m, ok := enumStringMaps[props.Enum] + if !ok { + if err := writeAny(w, v, props); err != nil { + return err + } + } + key := int32(0) + if v.Kind() == reflect.Ptr { + key = int32(v.Elem().Int()) + } else { + key = int32(v.Int()) + } + s, ok := m[key] + if !ok { + if err := writeAny(w, v, props); err != nil { + return err + } + } + _, err := fmt.Fprint(w, s) + return err +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/text_parser.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/text_parser.go new file mode 100644 index 0000000000000..61b4bc8cc8fc6 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/proto/text_parser.go @@ -0,0 +1,849 @@ +// Extensions for Protocol Buffers to create more go like structures. +// +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf/gogoproto +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto + +// Functions for parsing the Text protocol buffer format. +// TODO: message sets. + +import ( + "encoding" + "errors" + "fmt" + "reflect" + "strconv" + "strings" + "unicode/utf8" +) + +type ParseError struct { + Message string + Line int // 1-based line number + Offset int // 0-based byte offset from start of input +} + +func (p *ParseError) Error() string { + if p.Line == 1 { + // show offset only for first line + return fmt.Sprintf("line 1.%d: %v", p.Offset, p.Message) + } + return fmt.Sprintf("line %d: %v", p.Line, p.Message) +} + +type token struct { + value string + err *ParseError + line int // line number + offset int // byte number from start of input, not start of line + unquoted string // the unquoted version of value, if it was a quoted string +} + +func (t *token) String() string { + if t.err == nil { + return fmt.Sprintf("%q (line=%d, offset=%d)", t.value, t.line, t.offset) + } + return fmt.Sprintf("parse error: %v", t.err) +} + +type textParser struct { + s string // remaining input + done bool // whether the parsing is finished (success or error) + backed bool // whether back() was called + offset, line int + cur token +} + +func newTextParser(s string) *textParser { + p := new(textParser) + p.s = s + p.line = 1 + p.cur.line = 1 + return p +} + +func (p *textParser) errorf(format string, a ...interface{}) *ParseError { + pe := &ParseError{fmt.Sprintf(format, a...), p.cur.line, p.cur.offset} + p.cur.err = pe + p.done = true + return pe +} + +// Numbers and identifiers are matched by [-+._A-Za-z0-9] +func isIdentOrNumberChar(c byte) bool { + switch { + case 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z': + return true + case '0' <= c && c <= '9': + return true + } + switch c { + case '-', '+', '.', '_': + return true + } + return false +} + +func isWhitespace(c byte) bool { + switch c { + case ' ', '\t', '\n', '\r': + return true + } + return false +} + +func isQuote(c byte) bool { + switch c { + case '"', '\'': + return true + } + return false +} + +func (p *textParser) skipWhitespace() { + i := 0 + for i < len(p.s) && (isWhitespace(p.s[i]) || p.s[i] == '#') { + if p.s[i] == '#' { + // comment; skip to end of line or input + for i < len(p.s) && p.s[i] != '\n' { + i++ + } + if i == len(p.s) { + break + } + } + if p.s[i] == '\n' { + p.line++ + } + i++ + } + p.offset += i + p.s = p.s[i:len(p.s)] + if len(p.s) == 0 { + p.done = true + } +} + +func (p *textParser) advance() { + // Skip whitespace + p.skipWhitespace() + if p.done { + return + } + + // Start of non-whitespace + p.cur.err = nil + p.cur.offset, p.cur.line = p.offset, p.line + p.cur.unquoted = "" + switch p.s[0] { + case '<', '>', '{', '}', ':', '[', ']', ';', ',': + // Single symbol + p.cur.value, p.s = p.s[0:1], p.s[1:len(p.s)] + case '"', '\'': + // Quoted string + i := 1 + for i < len(p.s) && p.s[i] != p.s[0] && p.s[i] != '\n' { + if p.s[i] == '\\' && i+1 < len(p.s) { + // skip escaped char + i++ + } + i++ + } + if i >= len(p.s) || p.s[i] != p.s[0] { + p.errorf("unmatched quote") + return + } + unq, err := unquoteC(p.s[1:i], rune(p.s[0])) + if err != nil { + p.errorf("invalid quoted string %s: %v", p.s[0:i+1], err) + return + } + p.cur.value, p.s = p.s[0:i+1], p.s[i+1:len(p.s)] + p.cur.unquoted = unq + default: + i := 0 + for i < len(p.s) && isIdentOrNumberChar(p.s[i]) { + i++ + } + if i == 0 { + p.errorf("unexpected byte %#x", p.s[0]) + return + } + p.cur.value, p.s = p.s[0:i], p.s[i:len(p.s)] + } + p.offset += len(p.cur.value) +} + +var ( + errBadUTF8 = errors.New("proto: bad UTF-8") + errBadHex = errors.New("proto: bad hexadecimal") +) + +func unquoteC(s string, quote rune) (string, error) { + // This is based on C++'s tokenizer.cc. + // Despite its name, this is *not* parsing C syntax. + // For instance, "\0" is an invalid quoted string. + + // Avoid allocation in trivial cases. + simple := true + for _, r := range s { + if r == '\\' || r == quote { + simple = false + break + } + } + if simple { + return s, nil + } + + buf := make([]byte, 0, 3*len(s)/2) + for len(s) > 0 { + r, n := utf8.DecodeRuneInString(s) + if r == utf8.RuneError && n == 1 { + return "", errBadUTF8 + } + s = s[n:] + if r != '\\' { + if r < utf8.RuneSelf { + buf = append(buf, byte(r)) + } else { + buf = append(buf, string(r)...) + } + continue + } + + ch, tail, err := unescape(s) + if err != nil { + return "", err + } + buf = append(buf, ch...) + s = tail + } + return string(buf), nil +} + +func unescape(s string) (ch string, tail string, err error) { + r, n := utf8.DecodeRuneInString(s) + if r == utf8.RuneError && n == 1 { + return "", "", errBadUTF8 + } + s = s[n:] + switch r { + case 'a': + return "\a", s, nil + case 'b': + return "\b", s, nil + case 'f': + return "\f", s, nil + case 'n': + return "\n", s, nil + case 'r': + return "\r", s, nil + case 't': + return "\t", s, nil + case 'v': + return "\v", s, nil + case '?': + return "?", s, nil // trigraph workaround + case '\'', '"', '\\': + return string(r), s, nil + case '0', '1', '2', '3', '4', '5', '6', '7', 'x', 'X': + if len(s) < 2 { + return "", "", fmt.Errorf(`\%c requires 2 following digits`, r) + } + base := 8 + ss := s[:2] + s = s[2:] + if r == 'x' || r == 'X' { + base = 16 + } else { + ss = string(r) + ss + } + i, err := strconv.ParseUint(ss, base, 8) + if err != nil { + return "", "", err + } + return string([]byte{byte(i)}), s, nil + case 'u', 'U': + n := 4 + if r == 'U' { + n = 8 + } + if len(s) < n { + return "", "", fmt.Errorf(`\%c requires %d digits`, r, n) + } + + bs := make([]byte, n/2) + for i := 0; i < n; i += 2 { + a, ok1 := unhex(s[i]) + b, ok2 := unhex(s[i+1]) + if !ok1 || !ok2 { + return "", "", errBadHex + } + bs[i/2] = a<<4 | b + } + s = s[n:] + return string(bs), s, nil + } + return "", "", fmt.Errorf(`unknown escape \%c`, r) +} + +// Adapted from src/pkg/strconv/quote.go. +func unhex(b byte) (v byte, ok bool) { + switch { + case '0' <= b && b <= '9': + return b - '0', true + case 'a' <= b && b <= 'f': + return b - 'a' + 10, true + case 'A' <= b && b <= 'F': + return b - 'A' + 10, true + } + return 0, false +} + +// Back off the parser by one token. Can only be done between calls to next(). +// It makes the next advance() a no-op. +func (p *textParser) back() { p.backed = true } + +// Advances the parser and returns the new current token. +func (p *textParser) next() *token { + if p.backed || p.done { + p.backed = false + return &p.cur + } + p.advance() + if p.done { + p.cur.value = "" + } else if len(p.cur.value) > 0 && isQuote(p.cur.value[0]) { + // Look for multiple quoted strings separated by whitespace, + // and concatenate them. + cat := p.cur + for { + p.skipWhitespace() + if p.done || !isQuote(p.s[0]) { + break + } + p.advance() + if p.cur.err != nil { + return &p.cur + } + cat.value += " " + p.cur.value + cat.unquoted += p.cur.unquoted + } + p.done = false // parser may have seen EOF, but we want to return cat + p.cur = cat + } + return &p.cur +} + +func (p *textParser) consumeToken(s string) error { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value != s { + p.back() + return p.errorf("expected %q, found %q", s, tok.value) + } + return nil +} + +// Return a RequiredNotSetError indicating which required field was not set. +func (p *textParser) missingRequiredFieldError(sv reflect.Value) *RequiredNotSetError { + st := sv.Type() + sprops := GetProperties(st) + for i := 0; i < st.NumField(); i++ { + if !isNil(sv.Field(i)) { + continue + } + + props := sprops.Prop[i] + if props.Required { + return &RequiredNotSetError{fmt.Sprintf("%v.%v", st, props.OrigName)} + } + } + return &RequiredNotSetError{fmt.Sprintf("%v.", st)} // should not happen +} + +// Returns the index in the struct for the named field, as well as the parsed tag properties. +func structFieldByName(sprops *StructProperties, name string) (int, *Properties, bool) { + i, ok := sprops.decoderOrigNames[name] + if ok { + return i, sprops.Prop[i], true + } + return -1, nil, false +} + +// Consume a ':' from the input stream (if the next token is a colon), +// returning an error if a colon is needed but not present. +func (p *textParser) checkForColon(props *Properties, typ reflect.Type) *ParseError { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value != ":" { + // Colon is optional when the field is a group or message. + needColon := true + switch props.Wire { + case "group": + needColon = false + case "bytes": + // A "bytes" field is either a message, a string, or a repeated field; + // those three become *T, *string and []T respectively, so we can check for + // this field being a pointer to a non-string. + if typ.Kind() == reflect.Ptr { + // *T or *string + if typ.Elem().Kind() == reflect.String { + break + } + } else if typ.Kind() == reflect.Slice { + // []T or []*T + if typ.Elem().Kind() != reflect.Ptr { + break + } + } else if typ.Kind() == reflect.String { + // The proto3 exception is for a string field, + // which requires a colon. + break + } + needColon = false + } + if needColon { + return p.errorf("expected ':', found %q", tok.value) + } + p.back() + } + return nil +} + +func (p *textParser) readStruct(sv reflect.Value, terminator string) error { + st := sv.Type() + sprops := GetProperties(st) + reqCount := sprops.reqCount + var reqFieldErr error + fieldSet := make(map[string]bool) + // A struct is a sequence of "name: value", terminated by one of + // '>' or '}', or the end of the input. A name may also be + // "[extension]". + for { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value == terminator { + break + } + if tok.value == "[" { + // Looks like an extension. + // + // TODO: Check whether we need to handle + // namespace rooted names (e.g. ".something.Foo"). + tok = p.next() + if tok.err != nil { + return tok.err + } + var desc *ExtensionDesc + // This could be faster, but it's functional. + // TODO: Do something smarter than a linear scan. + for _, d := range RegisteredExtensions(reflect.New(st).Interface().(Message)) { + if d.Name == tok.value { + desc = d + break + } + } + if desc == nil { + return p.errorf("unrecognized extension %q", tok.value) + } + // Check the extension terminator. + tok = p.next() + if tok.err != nil { + return tok.err + } + if tok.value != "]" { + return p.errorf("unrecognized extension terminator %q", tok.value) + } + + props := &Properties{} + props.Parse(desc.Tag) + + typ := reflect.TypeOf(desc.ExtensionType) + if err := p.checkForColon(props, typ); err != nil { + return err + } + + rep := desc.repeated() + + // Read the extension structure, and set it in + // the value we're constructing. + var ext reflect.Value + if !rep { + ext = reflect.New(typ).Elem() + } else { + ext = reflect.New(typ.Elem()).Elem() + } + if err := p.readAny(ext, props); err != nil { + if _, ok := err.(*RequiredNotSetError); !ok { + return err + } + reqFieldErr = err + } + ep := sv.Addr().Interface().(extendableProto) + if !rep { + SetExtension(ep, desc, ext.Interface()) + } else { + old, err := GetExtension(ep, desc) + var sl reflect.Value + if err == nil { + sl = reflect.ValueOf(old) // existing slice + } else { + sl = reflect.MakeSlice(typ, 0, 1) + } + sl = reflect.Append(sl, ext) + SetExtension(ep, desc, sl.Interface()) + } + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + continue + } + + // This is a normal, non-extension field. + name := tok.value + var dst reflect.Value + fi, props, ok := structFieldByName(sprops, name) + if ok { + dst = sv.Field(fi) + } else if oop, ok := sprops.OneofTypes[name]; ok { + // It is a oneof. + props = oop.Prop + nv := reflect.New(oop.Type.Elem()) + dst = nv.Elem().Field(0) + sv.Field(oop.Field).Set(nv) + } + if !dst.IsValid() { + return p.errorf("unknown field name %q in %v", name, st) + } + + if dst.Kind() == reflect.Map { + // Consume any colon. + if err := p.checkForColon(props, dst.Type()); err != nil { + return err + } + + // Construct the map if it doesn't already exist. + if dst.IsNil() { + dst.Set(reflect.MakeMap(dst.Type())) + } + key := reflect.New(dst.Type().Key()).Elem() + val := reflect.New(dst.Type().Elem()).Elem() + + // The map entry should be this sequence of tokens: + // < key : KEY value : VALUE > + // Technically the "key" and "value" could come in any order, + // but in practice they won't. + + tok := p.next() + var terminator string + switch tok.value { + case "<": + terminator = ">" + case "{": + terminator = "}" + default: + return p.errorf("expected '{' or '<', found %q", tok.value) + } + if err := p.consumeToken("key"); err != nil { + return err + } + if err := p.consumeToken(":"); err != nil { + return err + } + if err := p.readAny(key, props.mkeyprop); err != nil { + return err + } + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + if err := p.consumeToken("value"); err != nil { + return err + } + if err := p.checkForColon(props.mvalprop, dst.Type().Elem()); err != nil { + return err + } + if err := p.readAny(val, props.mvalprop); err != nil { + return err + } + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + if err := p.consumeToken(terminator); err != nil { + return err + } + + dst.SetMapIndex(key, val) + continue + } + + // Check that it's not already set if it's not a repeated field. + if !props.Repeated && fieldSet[name] { + return p.errorf("non-repeated field %q was repeated", name) + } + + if err := p.checkForColon(props, dst.Type()); err != nil { + return err + } + + // Parse into the field. + fieldSet[name] = true + if err := p.readAny(dst, props); err != nil { + if _, ok := err.(*RequiredNotSetError); !ok { + return err + } + reqFieldErr = err + } else if props.Required { + reqCount-- + } + + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + + } + + if reqCount > 0 { + return p.missingRequiredFieldError(sv) + } + return reqFieldErr +} + +// consumeOptionalSeparator consumes an optional semicolon or comma. +// It is used in readStruct to provide backward compatibility. +func (p *textParser) consumeOptionalSeparator() error { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value != ";" && tok.value != "," { + p.back() + } + return nil +} + +func (p *textParser) readAny(v reflect.Value, props *Properties) error { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value == "" { + return p.errorf("unexpected EOF") + } + if len(props.CustomType) > 0 { + if props.Repeated { + t := reflect.TypeOf(v.Interface()) + if t.Kind() == reflect.Slice { + tc := reflect.TypeOf(new(Marshaler)) + ok := t.Elem().Implements(tc.Elem()) + if ok { + fv := v + flen := fv.Len() + if flen == fv.Cap() { + nav := reflect.MakeSlice(v.Type(), flen, 2*flen+1) + reflect.Copy(nav, fv) + fv.Set(nav) + } + fv.SetLen(flen + 1) + + // Read one. + p.back() + return p.readAny(fv.Index(flen), props) + } + } + } + if reflect.TypeOf(v.Interface()).Kind() == reflect.Ptr { + custom := reflect.New(props.ctype.Elem()).Interface().(Unmarshaler) + err := custom.Unmarshal([]byte(tok.unquoted)) + if err != nil { + return p.errorf("%v %v: %v", err, v.Type(), tok.value) + } + v.Set(reflect.ValueOf(custom)) + } else { + custom := reflect.New(reflect.TypeOf(v.Interface())).Interface().(Unmarshaler) + err := custom.Unmarshal([]byte(tok.unquoted)) + if err != nil { + return p.errorf("%v %v: %v", err, v.Type(), tok.value) + } + v.Set(reflect.Indirect(reflect.ValueOf(custom))) + } + return nil + } + switch fv := v; fv.Kind() { + case reflect.Slice: + at := v.Type() + if at.Elem().Kind() == reflect.Uint8 { + // Special case for []byte + if tok.value[0] != '"' && tok.value[0] != '\'' { + // Deliberately written out here, as the error after + // this switch statement would write "invalid []byte: ...", + // which is not as user-friendly. + return p.errorf("invalid string: %v", tok.value) + } + bytes := []byte(tok.unquoted) + fv.Set(reflect.ValueOf(bytes)) + return nil + } + // Repeated field. + if tok.value == "[" { + // Repeated field with list notation, like [1,2,3]. + for { + fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem())) + err := p.readAny(fv.Index(fv.Len()-1), props) + if err != nil { + return err + } + ntok := p.next() + if ntok.err != nil { + return ntok.err + } + if ntok.value == "]" { + break + } + if ntok.value != "," { + return p.errorf("Expected ']' or ',' found %q", ntok.value) + } + } + return nil + } + // One value of the repeated field. + p.back() + fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem())) + return p.readAny(fv.Index(fv.Len()-1), props) + case reflect.Bool: + // Either "true", "false", 1 or 0. + switch tok.value { + case "true", "1": + fv.SetBool(true) + return nil + case "false", "0": + fv.SetBool(false) + return nil + } + case reflect.Float32, reflect.Float64: + v := tok.value + // Ignore 'f' for compatibility with output generated by C++, but don't + // remove 'f' when the value is "-inf" or "inf". + if strings.HasSuffix(v, "f") && tok.value != "-inf" && tok.value != "inf" { + v = v[:len(v)-1] + } + if f, err := strconv.ParseFloat(v, fv.Type().Bits()); err == nil { + fv.SetFloat(f) + return nil + } + case reflect.Int32: + if x, err := strconv.ParseInt(tok.value, 0, 32); err == nil { + fv.SetInt(x) + return nil + } + + if len(props.Enum) == 0 { + break + } + m, ok := enumValueMaps[props.Enum] + if !ok { + break + } + x, ok := m[tok.value] + if !ok { + break + } + fv.SetInt(int64(x)) + return nil + case reflect.Int64: + if x, err := strconv.ParseInt(tok.value, 0, 64); err == nil { + fv.SetInt(x) + return nil + } + + case reflect.Ptr: + // A basic field (indirected through pointer), or a repeated message/group + p.back() + fv.Set(reflect.New(fv.Type().Elem())) + return p.readAny(fv.Elem(), props) + case reflect.String: + if tok.value[0] == '"' || tok.value[0] == '\'' { + fv.SetString(tok.unquoted) + return nil + } + case reflect.Struct: + var terminator string + switch tok.value { + case "{": + terminator = "}" + case "<": + terminator = ">" + default: + return p.errorf("expected '{' or '<', found %q", tok.value) + } + // TODO: Handle nested messages which implement encoding.TextUnmarshaler. + return p.readStruct(fv, terminator) + case reflect.Uint32: + if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil { + fv.SetUint(uint64(x)) + return nil + } + case reflect.Uint64: + if x, err := strconv.ParseUint(tok.value, 0, 64); err == nil { + fv.SetUint(x) + return nil + } + } + return p.errorf("invalid %v: %v", v.Type(), tok.value) +} + +// UnmarshalText reads a protocol buffer in Text format. UnmarshalText resets pb +// before starting to unmarshal, so any existing data in pb is always removed. +// If a required field is not set and no other error occurs, +// UnmarshalText returns *RequiredNotSetError. +func UnmarshalText(s string, pb Message) error { + if um, ok := pb.(encoding.TextUnmarshaler); ok { + err := um.UnmarshalText([]byte(s)) + return err + } + pb.Reset() + v := reflect.ValueOf(pb) + if pe := newTextParser(s).readStruct(v.Elem(), ""); pe != nil { + return pe + } + return nil +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go new file mode 100644 index 0000000000000..c52878dd5965a --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go @@ -0,0 +1,99 @@ +// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +// http://github.com/gogo/protobuf +// +// 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. +// +// 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. + +package sortkeys + +import ( + "sort" +) + +func Strings(l []string) { + sort.Strings(l) +} + +func Float64s(l []float64) { + sort.Float64s(l) +} + +func Float32s(l []float32) { + sort.Sort(Float32Slice(l)) +} + +func Int64s(l []int64) { + sort.Sort(Int64Slice(l)) +} + +func Int32s(l []int32) { + sort.Sort(Int32Slice(l)) +} + +func Uint64s(l []uint64) { + sort.Sort(Uint64Slice(l)) +} + +func Uint32s(l []uint32) { + sort.Sort(Uint32Slice(l)) +} + +func Bools(l []bool) { + sort.Sort(BoolSlice(l)) +} + +type BoolSlice []bool + +func (p BoolSlice) Len() int { return len(p) } +func (p BoolSlice) Less(i, j int) bool { return p[j] } +func (p BoolSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +type Int64Slice []int64 + +func (p Int64Slice) Len() int { return len(p) } +func (p Int64Slice) Less(i, j int) bool { return p[i] < p[j] } +func (p Int64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +type Int32Slice []int32 + +func (p Int32Slice) Len() int { return len(p) } +func (p Int32Slice) Less(i, j int) bool { return p[i] < p[j] } +func (p Int32Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +type Uint64Slice []uint64 + +func (p Uint64Slice) Len() int { return len(p) } +func (p Uint64Slice) Less(i, j int) bool { return p[i] < p[j] } +func (p Uint64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +type Uint32Slice []uint32 + +func (p Uint32Slice) Len() int { return len(p) } +func (p Uint32Slice) Less(i, j int) bool { return p[i] < p[j] } +func (p Uint32Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +type Float32Slice []float32 + +func (p Float32Slice) Len() int { return len(p) } +func (p Float32Slice) Less(i, j int) bool { return p[i] < p[j] } +func (p Float32Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/glog/LICENSE b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/glog/LICENSE new file mode 100644 index 0000000000000..37ec93a14fdcd --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/glog/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/glog/README b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/glog/README new file mode 100644 index 0000000000000..5f9c11485e037 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/glog/README @@ -0,0 +1,44 @@ +glog +==== + +Leveled execution logs for Go. + +This is an efficient pure Go implementation of leveled logs in the +manner of the open source C++ package + http://code.google.com/p/google-glog + +By binding methods to booleans it is possible to use the log package +without paying the expense of evaluating the arguments to the log. +Through the -vmodule flag, the package also provides fine-grained +control over logging at the file level. + +The comment from glog.go introduces the ideas: + + Package glog implements logging analogous to the Google-internal + C++ INFO/ERROR/V setup. It provides functions Info, Warning, + Error, Fatal, plus formatting variants such as Infof. It + also provides V-style logging controlled by the -v and + -vmodule=file=2 flags. + + Basic examples: + + glog.Info("Prepare to repel boarders") + + glog.Fatalf("Initialization failed: %s", err) + + See the documentation for the V function for an explanation + of these examples: + + if glog.V(2) { + glog.Info("Starting transaction...") + } + + glog.V(2).Infoln("Processed", nItems, "elements") + + +The repository contains an open source version of the log package +used inside Google. The master copy of the source lives inside +Google, not here. The code in this repo is for export only and is not itself +under development. Feature requests will be ignored. + +Send bug reports to golang-nuts@googlegroups.com. diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/glog/glog.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/glog/glog.go new file mode 100644 index 0000000000000..3e63fffd5ecb1 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/glog/glog.go @@ -0,0 +1,1177 @@ +// Go support for leveled logs, analogous to https://code.google.com/p/google-glog/ +// +// Copyright 2013 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package glog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup. +// It provides functions Info, Warning, Error, Fatal, plus formatting variants such as +// Infof. It also provides V-style logging controlled by the -v and -vmodule=file=2 flags. +// +// Basic examples: +// +// glog.Info("Prepare to repel boarders") +// +// glog.Fatalf("Initialization failed: %s", err) +// +// See the documentation for the V function for an explanation of these examples: +// +// if glog.V(2) { +// glog.Info("Starting transaction...") +// } +// +// glog.V(2).Infoln("Processed", nItems, "elements") +// +// Log output is buffered and written periodically using Flush. Programs +// should call Flush before exiting to guarantee all log output is written. +// +// By default, all log statements write to files in a temporary directory. +// This package provides several flags that modify this behavior. +// As a result, flag.Parse must be called before any logging is done. +// +// -logtostderr=false +// Logs are written to standard error instead of to files. +// -alsologtostderr=false +// Logs are written to standard error as well as to files. +// -stderrthreshold=ERROR +// Log events at or above this severity are logged to standard +// error as well as to files. +// -log_dir="" +// Log files will be written to this directory instead of the +// default temporary directory. +// +// Other flags provide aids to debugging. +// +// -log_backtrace_at="" +// When set to a file and line number holding a logging statement, +// such as +// -log_backtrace_at=gopherflakes.go:234 +// a stack trace will be written to the Info log whenever execution +// hits that statement. (Unlike with -vmodule, the ".go" must be +// present.) +// -v=0 +// Enable V-leveled logging at the specified level. +// -vmodule="" +// The syntax of the argument is a comma-separated list of pattern=N, +// where pattern is a literal file name (minus the ".go" suffix) or +// "glob" pattern and N is a V level. For instance, +// -vmodule=gopher*=3 +// sets the V level to 3 in all Go files whose names begin "gopher". +// +package glog + +import ( + "bufio" + "bytes" + "errors" + "flag" + "fmt" + "io" + stdLog "log" + "os" + "path/filepath" + "runtime" + "strconv" + "strings" + "sync" + "sync/atomic" + "time" +) + +// severity identifies the sort of log: info, warning etc. It also implements +// the flag.Value interface. The -stderrthreshold flag is of type severity and +// should be modified only through the flag.Value interface. The values match +// the corresponding constants in C++. +type severity int32 // sync/atomic int32 + +// These constants identify the log levels in order of increasing severity. +// A message written to a high-severity log file is also written to each +// lower-severity log file. +const ( + infoLog severity = iota + warningLog + errorLog + fatalLog + numSeverity = 4 +) + +const severityChar = "IWEF" + +var severityName = []string{ + infoLog: "INFO", + warningLog: "WARNING", + errorLog: "ERROR", + fatalLog: "FATAL", +} + +// get returns the value of the severity. +func (s *severity) get() severity { + return severity(atomic.LoadInt32((*int32)(s))) +} + +// set sets the value of the severity. +func (s *severity) set(val severity) { + atomic.StoreInt32((*int32)(s), int32(val)) +} + +// String is part of the flag.Value interface. +func (s *severity) String() string { + return strconv.FormatInt(int64(*s), 10) +} + +// Get is part of the flag.Value interface. +func (s *severity) Get() interface{} { + return *s +} + +// Set is part of the flag.Value interface. +func (s *severity) Set(value string) error { + var threshold severity + // Is it a known name? + if v, ok := severityByName(value); ok { + threshold = v + } else { + v, err := strconv.Atoi(value) + if err != nil { + return err + } + threshold = severity(v) + } + logging.stderrThreshold.set(threshold) + return nil +} + +func severityByName(s string) (severity, bool) { + s = strings.ToUpper(s) + for i, name := range severityName { + if name == s { + return severity(i), true + } + } + return 0, false +} + +// OutputStats tracks the number of output lines and bytes written. +type OutputStats struct { + lines int64 + bytes int64 +} + +// Lines returns the number of lines written. +func (s *OutputStats) Lines() int64 { + return atomic.LoadInt64(&s.lines) +} + +// Bytes returns the number of bytes written. +func (s *OutputStats) Bytes() int64 { + return atomic.LoadInt64(&s.bytes) +} + +// Stats tracks the number of lines of output and number of bytes +// per severity level. Values must be read with atomic.LoadInt64. +var Stats struct { + Info, Warning, Error OutputStats +} + +var severityStats = [numSeverity]*OutputStats{ + infoLog: &Stats.Info, + warningLog: &Stats.Warning, + errorLog: &Stats.Error, +} + +// Level is exported because it appears in the arguments to V and is +// the type of the v flag, which can be set programmatically. +// It's a distinct type because we want to discriminate it from logType. +// Variables of type level are only changed under logging.mu. +// The -v flag is read only with atomic ops, so the state of the logging +// module is consistent. + +// Level is treated as a sync/atomic int32. + +// Level specifies a level of verbosity for V logs. *Level implements +// flag.Value; the -v flag is of type Level and should be modified +// only through the flag.Value interface. +type Level int32 + +// get returns the value of the Level. +func (l *Level) get() Level { + return Level(atomic.LoadInt32((*int32)(l))) +} + +// set sets the value of the Level. +func (l *Level) set(val Level) { + atomic.StoreInt32((*int32)(l), int32(val)) +} + +// String is part of the flag.Value interface. +func (l *Level) String() string { + return strconv.FormatInt(int64(*l), 10) +} + +// Get is part of the flag.Value interface. +func (l *Level) Get() interface{} { + return *l +} + +// Set is part of the flag.Value interface. +func (l *Level) Set(value string) error { + v, err := strconv.Atoi(value) + if err != nil { + return err + } + logging.mu.Lock() + defer logging.mu.Unlock() + logging.setVState(Level(v), logging.vmodule.filter, false) + return nil +} + +// moduleSpec represents the setting of the -vmodule flag. +type moduleSpec struct { + filter []modulePat +} + +// modulePat contains a filter for the -vmodule flag. +// It holds a verbosity level and a file pattern to match. +type modulePat struct { + pattern string + literal bool // The pattern is a literal string + level Level +} + +// match reports whether the file matches the pattern. It uses a string +// comparison if the pattern contains no metacharacters. +func (m *modulePat) match(file string) bool { + if m.literal { + return file == m.pattern + } + match, _ := filepath.Match(m.pattern, file) + return match +} + +func (m *moduleSpec) String() string { + // Lock because the type is not atomic. TODO: clean this up. + logging.mu.Lock() + defer logging.mu.Unlock() + var b bytes.Buffer + for i, f := range m.filter { + if i > 0 { + b.WriteRune(',') + } + fmt.Fprintf(&b, "%s=%d", f.pattern, f.level) + } + return b.String() +} + +// Get is part of the (Go 1.2) flag.Getter interface. It always returns nil for this flag type since the +// struct is not exported. +func (m *moduleSpec) Get() interface{} { + return nil +} + +var errVmoduleSyntax = errors.New("syntax error: expect comma-separated list of filename=N") + +// Syntax: -vmodule=recordio=2,file=1,gfs*=3 +func (m *moduleSpec) Set(value string) error { + var filter []modulePat + for _, pat := range strings.Split(value, ",") { + if len(pat) == 0 { + // Empty strings such as from a trailing comma can be ignored. + continue + } + patLev := strings.Split(pat, "=") + if len(patLev) != 2 || len(patLev[0]) == 0 || len(patLev[1]) == 0 { + return errVmoduleSyntax + } + pattern := patLev[0] + v, err := strconv.Atoi(patLev[1]) + if err != nil { + return errors.New("syntax error: expect comma-separated list of filename=N") + } + if v < 0 { + return errors.New("negative value for vmodule level") + } + if v == 0 { + continue // Ignore. It's harmless but no point in paying the overhead. + } + // TODO: check syntax of filter? + filter = append(filter, modulePat{pattern, isLiteral(pattern), Level(v)}) + } + logging.mu.Lock() + defer logging.mu.Unlock() + logging.setVState(logging.verbosity, filter, true) + return nil +} + +// isLiteral reports whether the pattern is a literal string, that is, has no metacharacters +// that require filepath.Match to be called to match the pattern. +func isLiteral(pattern string) bool { + return !strings.ContainsAny(pattern, `\*?[]`) +} + +// traceLocation represents the setting of the -log_backtrace_at flag. +type traceLocation struct { + file string + line int +} + +// isSet reports whether the trace location has been specified. +// logging.mu is held. +func (t *traceLocation) isSet() bool { + return t.line > 0 +} + +// match reports whether the specified file and line matches the trace location. +// The argument file name is the full path, not the basename specified in the flag. +// logging.mu is held. +func (t *traceLocation) match(file string, line int) bool { + if t.line != line { + return false + } + if i := strings.LastIndex(file, "/"); i >= 0 { + file = file[i+1:] + } + return t.file == file +} + +func (t *traceLocation) String() string { + // Lock because the type is not atomic. TODO: clean this up. + logging.mu.Lock() + defer logging.mu.Unlock() + return fmt.Sprintf("%s:%d", t.file, t.line) +} + +// Get is part of the (Go 1.2) flag.Getter interface. It always returns nil for this flag type since the +// struct is not exported +func (t *traceLocation) Get() interface{} { + return nil +} + +var errTraceSyntax = errors.New("syntax error: expect file.go:234") + +// Syntax: -log_backtrace_at=gopherflakes.go:234 +// Note that unlike vmodule the file extension is included here. +func (t *traceLocation) Set(value string) error { + if value == "" { + // Unset. + t.line = 0 + t.file = "" + } + fields := strings.Split(value, ":") + if len(fields) != 2 { + return errTraceSyntax + } + file, line := fields[0], fields[1] + if !strings.Contains(file, ".") { + return errTraceSyntax + } + v, err := strconv.Atoi(line) + if err != nil { + return errTraceSyntax + } + if v <= 0 { + return errors.New("negative or zero value for level") + } + logging.mu.Lock() + defer logging.mu.Unlock() + t.line = v + t.file = file + return nil +} + +// flushSyncWriter is the interface satisfied by logging destinations. +type flushSyncWriter interface { + Flush() error + Sync() error + io.Writer +} + +func init() { + flag.BoolVar(&logging.toStderr, "logtostderr", false, "log to standard error instead of files") + flag.BoolVar(&logging.alsoToStderr, "alsologtostderr", false, "log to standard error as well as files") + flag.Var(&logging.verbosity, "v", "log level for V logs") + flag.Var(&logging.stderrThreshold, "stderrthreshold", "logs at or above this threshold go to stderr") + flag.Var(&logging.vmodule, "vmodule", "comma-separated list of pattern=N settings for file-filtered logging") + flag.Var(&logging.traceLocation, "log_backtrace_at", "when logging hits line file:N, emit a stack trace") + + // Default stderrThreshold is ERROR. + logging.stderrThreshold = errorLog + + logging.setVState(0, nil, false) + go logging.flushDaemon() +} + +// Flush flushes all pending log I/O. +func Flush() { + logging.lockAndFlushAll() +} + +// loggingT collects all the global state of the logging setup. +type loggingT struct { + // Boolean flags. Not handled atomically because the flag.Value interface + // does not let us avoid the =true, and that shorthand is necessary for + // compatibility. TODO: does this matter enough to fix? Seems unlikely. + toStderr bool // The -logtostderr flag. + alsoToStderr bool // The -alsologtostderr flag. + + // Level flag. Handled atomically. + stderrThreshold severity // The -stderrthreshold flag. + + // freeList is a list of byte buffers, maintained under freeListMu. + freeList *buffer + // freeListMu maintains the free list. It is separate from the main mutex + // so buffers can be grabbed and printed to without holding the main lock, + // for better parallelization. + freeListMu sync.Mutex + + // mu protects the remaining elements of this structure and is + // used to synchronize logging. + mu sync.Mutex + // file holds writer for each of the log types. + file [numSeverity]flushSyncWriter + // pcs is used in V to avoid an allocation when computing the caller's PC. + pcs [1]uintptr + // vmap is a cache of the V Level for each V() call site, identified by PC. + // It is wiped whenever the vmodule flag changes state. + vmap map[uintptr]Level + // filterLength stores the length of the vmodule filter chain. If greater + // than zero, it means vmodule is enabled. It may be read safely + // using sync.LoadInt32, but is only modified under mu. + filterLength int32 + // traceLocation is the state of the -log_backtrace_at flag. + traceLocation traceLocation + // These flags are modified only under lock, although verbosity may be fetched + // safely using atomic.LoadInt32. + vmodule moduleSpec // The state of the -vmodule flag. + verbosity Level // V logging level, the value of the -v flag/ +} + +// buffer holds a byte Buffer for reuse. The zero value is ready for use. +type buffer struct { + bytes.Buffer + tmp [64]byte // temporary byte array for creating headers. + next *buffer +} + +var logging loggingT + +// setVState sets a consistent state for V logging. +// l.mu is held. +func (l *loggingT) setVState(verbosity Level, filter []modulePat, setFilter bool) { + // Turn verbosity off so V will not fire while we are in transition. + logging.verbosity.set(0) + // Ditto for filter length. + atomic.StoreInt32(&logging.filterLength, 0) + + // Set the new filters and wipe the pc->Level map if the filter has changed. + if setFilter { + logging.vmodule.filter = filter + logging.vmap = make(map[uintptr]Level) + } + + // Things are consistent now, so enable filtering and verbosity. + // They are enabled in order opposite to that in V. + atomic.StoreInt32(&logging.filterLength, int32(len(filter))) + logging.verbosity.set(verbosity) +} + +// getBuffer returns a new, ready-to-use buffer. +func (l *loggingT) getBuffer() *buffer { + l.freeListMu.Lock() + b := l.freeList + if b != nil { + l.freeList = b.next + } + l.freeListMu.Unlock() + if b == nil { + b = new(buffer) + } else { + b.next = nil + b.Reset() + } + return b +} + +// putBuffer returns a buffer to the free list. +func (l *loggingT) putBuffer(b *buffer) { + if b.Len() >= 256 { + // Let big buffers die a natural death. + return + } + l.freeListMu.Lock() + b.next = l.freeList + l.freeList = b + l.freeListMu.Unlock() +} + +var timeNow = time.Now // Stubbed out for testing. + +/* +header formats a log header as defined by the C++ implementation. +It returns a buffer containing the formatted header and the user's file and line number. +The depth specifies how many stack frames above lives the source line to be identified in the log message. + +Log lines have this form: + Lmmdd hh:mm:ss.uuuuuu threadid file:line] msg... +where the fields are defined as follows: + L A single character, representing the log level (eg 'I' for INFO) + mm The month (zero padded; ie May is '05') + dd The day (zero padded) + hh:mm:ss.uuuuuu Time in hours, minutes and fractional seconds + threadid The space-padded thread ID as returned by GetTID() + file The file name + line The line number + msg The user-supplied message +*/ +func (l *loggingT) header(s severity, depth int) (*buffer, string, int) { + _, file, line, ok := runtime.Caller(3 + depth) + if !ok { + file = "???" + line = 1 + } else { + slash := strings.LastIndex(file, "/") + if slash >= 0 { + file = file[slash+1:] + } + } + return l.formatHeader(s, file, line), file, line +} + +// formatHeader formats a log header using the provided file name and line number. +func (l *loggingT) formatHeader(s severity, file string, line int) *buffer { + now := timeNow() + if line < 0 { + line = 0 // not a real line number, but acceptable to someDigits + } + if s > fatalLog { + s = infoLog // for safety. + } + buf := l.getBuffer() + + // Avoid Fprintf, for speed. The format is so simple that we can do it quickly by hand. + // It's worth about 3X. Fprintf is hard. + _, month, day := now.Date() + hour, minute, second := now.Clock() + // Lmmdd hh:mm:ss.uuuuuu threadid file:line] + buf.tmp[0] = severityChar[s] + buf.twoDigits(1, int(month)) + buf.twoDigits(3, day) + buf.tmp[5] = ' ' + buf.twoDigits(6, hour) + buf.tmp[8] = ':' + buf.twoDigits(9, minute) + buf.tmp[11] = ':' + buf.twoDigits(12, second) + buf.tmp[14] = '.' + buf.nDigits(6, 15, now.Nanosecond()/1000, '0') + buf.tmp[21] = ' ' + buf.nDigits(7, 22, pid, ' ') // TODO: should be TID + buf.tmp[29] = ' ' + buf.Write(buf.tmp[:30]) + buf.WriteString(file) + buf.tmp[0] = ':' + n := buf.someDigits(1, line) + buf.tmp[n+1] = ']' + buf.tmp[n+2] = ' ' + buf.Write(buf.tmp[:n+3]) + return buf +} + +// Some custom tiny helper functions to print the log header efficiently. + +const digits = "0123456789" + +// twoDigits formats a zero-prefixed two-digit integer at buf.tmp[i]. +func (buf *buffer) twoDigits(i, d int) { + buf.tmp[i+1] = digits[d%10] + d /= 10 + buf.tmp[i] = digits[d%10] +} + +// nDigits formats an n-digit integer at buf.tmp[i], +// padding with pad on the left. +// It assumes d >= 0. +func (buf *buffer) nDigits(n, i, d int, pad byte) { + j := n - 1 + for ; j >= 0 && d > 0; j-- { + buf.tmp[i+j] = digits[d%10] + d /= 10 + } + for ; j >= 0; j-- { + buf.tmp[i+j] = pad + } +} + +// someDigits formats a zero-prefixed variable-width integer at buf.tmp[i]. +func (buf *buffer) someDigits(i, d int) int { + // Print into the top, then copy down. We know there's space for at least + // a 10-digit number. + j := len(buf.tmp) + for { + j-- + buf.tmp[j] = digits[d%10] + d /= 10 + if d == 0 { + break + } + } + return copy(buf.tmp[i:], buf.tmp[j:]) +} + +func (l *loggingT) println(s severity, args ...interface{}) { + buf, file, line := l.header(s, 0) + fmt.Fprintln(buf, args...) + l.output(s, buf, file, line, false) +} + +func (l *loggingT) print(s severity, args ...interface{}) { + l.printDepth(s, 1, args...) +} + +func (l *loggingT) printDepth(s severity, depth int, args ...interface{}) { + buf, file, line := l.header(s, depth) + fmt.Fprint(buf, args...) + if buf.Bytes()[buf.Len()-1] != '\n' { + buf.WriteByte('\n') + } + l.output(s, buf, file, line, false) +} + +func (l *loggingT) printf(s severity, format string, args ...interface{}) { + buf, file, line := l.header(s, 0) + fmt.Fprintf(buf, format, args...) + if buf.Bytes()[buf.Len()-1] != '\n' { + buf.WriteByte('\n') + } + l.output(s, buf, file, line, false) +} + +// printWithFileLine behaves like print but uses the provided file and line number. If +// alsoLogToStderr is true, the log message always appears on standard error; it +// will also appear in the log file unless --logtostderr is set. +func (l *loggingT) printWithFileLine(s severity, file string, line int, alsoToStderr bool, args ...interface{}) { + buf := l.formatHeader(s, file, line) + fmt.Fprint(buf, args...) + if buf.Bytes()[buf.Len()-1] != '\n' { + buf.WriteByte('\n') + } + l.output(s, buf, file, line, alsoToStderr) +} + +// output writes the data to the log files and releases the buffer. +func (l *loggingT) output(s severity, buf *buffer, file string, line int, alsoToStderr bool) { + l.mu.Lock() + if l.traceLocation.isSet() { + if l.traceLocation.match(file, line) { + buf.Write(stacks(false)) + } + } + data := buf.Bytes() + if l.toStderr { + os.Stderr.Write(data) + } else { + if alsoToStderr || l.alsoToStderr || s >= l.stderrThreshold.get() { + os.Stderr.Write(data) + } + if l.file[s] == nil { + if err := l.createFiles(s); err != nil { + os.Stderr.Write(data) // Make sure the message appears somewhere. + l.exit(err) + } + } + switch s { + case fatalLog: + l.file[fatalLog].Write(data) + fallthrough + case errorLog: + l.file[errorLog].Write(data) + fallthrough + case warningLog: + l.file[warningLog].Write(data) + fallthrough + case infoLog: + l.file[infoLog].Write(data) + } + } + if s == fatalLog { + // If we got here via Exit rather than Fatal, print no stacks. + if atomic.LoadUint32(&fatalNoStacks) > 0 { + l.mu.Unlock() + timeoutFlush(10 * time.Second) + os.Exit(1) + } + // Dump all goroutine stacks before exiting. + // First, make sure we see the trace for the current goroutine on standard error. + // If -logtostderr has been specified, the loop below will do that anyway + // as the first stack in the full dump. + if !l.toStderr { + os.Stderr.Write(stacks(false)) + } + // Write the stack trace for all goroutines to the files. + trace := stacks(true) + logExitFunc = func(error) {} // If we get a write error, we'll still exit below. + for log := fatalLog; log >= infoLog; log-- { + if f := l.file[log]; f != nil { // Can be nil if -logtostderr is set. + f.Write(trace) + } + } + l.mu.Unlock() + timeoutFlush(10 * time.Second) + os.Exit(255) // C++ uses -1, which is silly because it's anded with 255 anyway. + } + l.putBuffer(buf) + l.mu.Unlock() + if stats := severityStats[s]; stats != nil { + atomic.AddInt64(&stats.lines, 1) + atomic.AddInt64(&stats.bytes, int64(len(data))) + } +} + +// timeoutFlush calls Flush and returns when it completes or after timeout +// elapses, whichever happens first. This is needed because the hooks invoked +// by Flush may deadlock when glog.Fatal is called from a hook that holds +// a lock. +func timeoutFlush(timeout time.Duration) { + done := make(chan bool, 1) + go func() { + Flush() // calls logging.lockAndFlushAll() + done <- true + }() + select { + case <-done: + case <-time.After(timeout): + fmt.Fprintln(os.Stderr, "glog: Flush took longer than", timeout) + } +} + +// stacks is a wrapper for runtime.Stack that attempts to recover the data for all goroutines. +func stacks(all bool) []byte { + // We don't know how big the traces are, so grow a few times if they don't fit. Start large, though. + n := 10000 + if all { + n = 100000 + } + var trace []byte + for i := 0; i < 5; i++ { + trace = make([]byte, n) + nbytes := runtime.Stack(trace, all) + if nbytes < len(trace) { + return trace[:nbytes] + } + n *= 2 + } + return trace +} + +// logExitFunc provides a simple mechanism to override the default behavior +// of exiting on error. Used in testing and to guarantee we reach a required exit +// for fatal logs. Instead, exit could be a function rather than a method but that +// would make its use clumsier. +var logExitFunc func(error) + +// exit is called if there is trouble creating or writing log files. +// It flushes the logs and exits the program; there's no point in hanging around. +// l.mu is held. +func (l *loggingT) exit(err error) { + fmt.Fprintf(os.Stderr, "log: exiting because of error: %s\n", err) + // If logExitFunc is set, we do that instead of exiting. + if logExitFunc != nil { + logExitFunc(err) + return + } + l.flushAll() + os.Exit(2) +} + +// syncBuffer joins a bufio.Writer to its underlying file, providing access to the +// file's Sync method and providing a wrapper for the Write method that provides log +// file rotation. There are conflicting methods, so the file cannot be embedded. +// l.mu is held for all its methods. +type syncBuffer struct { + logger *loggingT + *bufio.Writer + file *os.File + sev severity + nbytes uint64 // The number of bytes written to this file +} + +func (sb *syncBuffer) Sync() error { + return sb.file.Sync() +} + +func (sb *syncBuffer) Write(p []byte) (n int, err error) { + if sb.nbytes+uint64(len(p)) >= MaxSize { + if err := sb.rotateFile(time.Now()); err != nil { + sb.logger.exit(err) + } + } + n, err = sb.Writer.Write(p) + sb.nbytes += uint64(n) + if err != nil { + sb.logger.exit(err) + } + return +} + +// rotateFile closes the syncBuffer's file and starts a new one. +func (sb *syncBuffer) rotateFile(now time.Time) error { + if sb.file != nil { + sb.Flush() + sb.file.Close() + } + var err error + sb.file, _, err = create(severityName[sb.sev], now) + sb.nbytes = 0 + if err != nil { + return err + } + + sb.Writer = bufio.NewWriterSize(sb.file, bufferSize) + + // Write header. + var buf bytes.Buffer + fmt.Fprintf(&buf, "Log file created at: %s\n", now.Format("2006/01/02 15:04:05")) + fmt.Fprintf(&buf, "Running on machine: %s\n", host) + fmt.Fprintf(&buf, "Binary: Built with %s %s for %s/%s\n", runtime.Compiler, runtime.Version(), runtime.GOOS, runtime.GOARCH) + fmt.Fprintf(&buf, "Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg\n") + n, err := sb.file.Write(buf.Bytes()) + sb.nbytes += uint64(n) + return err +} + +// bufferSize sizes the buffer associated with each log file. It's large +// so that log records can accumulate without the logging thread blocking +// on disk I/O. The flushDaemon will block instead. +const bufferSize = 256 * 1024 + +// createFiles creates all the log files for severity from sev down to infoLog. +// l.mu is held. +func (l *loggingT) createFiles(sev severity) error { + now := time.Now() + // Files are created in decreasing severity order, so as soon as we find one + // has already been created, we can stop. + for s := sev; s >= infoLog && l.file[s] == nil; s-- { + sb := &syncBuffer{ + logger: l, + sev: s, + } + if err := sb.rotateFile(now); err != nil { + return err + } + l.file[s] = sb + } + return nil +} + +const flushInterval = 30 * time.Second + +// flushDaemon periodically flushes the log file buffers. +func (l *loggingT) flushDaemon() { + for _ = range time.NewTicker(flushInterval).C { + l.lockAndFlushAll() + } +} + +// lockAndFlushAll is like flushAll but locks l.mu first. +func (l *loggingT) lockAndFlushAll() { + l.mu.Lock() + l.flushAll() + l.mu.Unlock() +} + +// flushAll flushes all the logs and attempts to "sync" their data to disk. +// l.mu is held. +func (l *loggingT) flushAll() { + // Flush from fatal down, in case there's trouble flushing. + for s := fatalLog; s >= infoLog; s-- { + file := l.file[s] + if file != nil { + file.Flush() // ignore error + file.Sync() // ignore error + } + } +} + +// CopyStandardLogTo arranges for messages written to the Go "log" package's +// default logs to also appear in the Google logs for the named and lower +// severities. Subsequent changes to the standard log's default output location +// or format may break this behavior. +// +// Valid names are "INFO", "WARNING", "ERROR", and "FATAL". If the name is not +// recognized, CopyStandardLogTo panics. +func CopyStandardLogTo(name string) { + sev, ok := severityByName(name) + if !ok { + panic(fmt.Sprintf("log.CopyStandardLogTo(%q): unrecognized severity name", name)) + } + // Set a log format that captures the user's file and line: + // d.go:23: message + stdLog.SetFlags(stdLog.Lshortfile) + stdLog.SetOutput(logBridge(sev)) +} + +// logBridge provides the Write method that enables CopyStandardLogTo to connect +// Go's standard logs to the logs provided by this package. +type logBridge severity + +// Write parses the standard logging line and passes its components to the +// logger for severity(lb). +func (lb logBridge) Write(b []byte) (n int, err error) { + var ( + file = "???" + line = 1 + text string + ) + // Split "d.go:23: message" into "d.go", "23", and "message". + if parts := bytes.SplitN(b, []byte{':'}, 3); len(parts) != 3 || len(parts[0]) < 1 || len(parts[2]) < 1 { + text = fmt.Sprintf("bad log format: %s", b) + } else { + file = string(parts[0]) + text = string(parts[2][1:]) // skip leading space + line, err = strconv.Atoi(string(parts[1])) + if err != nil { + text = fmt.Sprintf("bad line number: %s", b) + line = 1 + } + } + // printWithFileLine with alsoToStderr=true, so standard log messages + // always appear on standard error. + logging.printWithFileLine(severity(lb), file, line, true, text) + return len(b), nil +} + +// setV computes and remembers the V level for a given PC +// when vmodule is enabled. +// File pattern matching takes the basename of the file, stripped +// of its .go suffix, and uses filepath.Match, which is a little more +// general than the *? matching used in C++. +// l.mu is held. +func (l *loggingT) setV(pc uintptr) Level { + fn := runtime.FuncForPC(pc) + file, _ := fn.FileLine(pc) + // The file is something like /a/b/c/d.go. We want just the d. + if strings.HasSuffix(file, ".go") { + file = file[:len(file)-3] + } + if slash := strings.LastIndex(file, "/"); slash >= 0 { + file = file[slash+1:] + } + for _, filter := range l.vmodule.filter { + if filter.match(file) { + l.vmap[pc] = filter.level + return filter.level + } + } + l.vmap[pc] = 0 + return 0 +} + +// Verbose is a boolean type that implements Infof (like Printf) etc. +// See the documentation of V for more information. +type Verbose bool + +// V reports whether verbosity at the call site is at least the requested level. +// The returned value is a boolean of type Verbose, which implements Info, Infoln +// and Infof. These methods will write to the Info log if called. +// Thus, one may write either +// if glog.V(2) { glog.Info("log this") } +// or +// glog.V(2).Info("log this") +// The second form is shorter but the first is cheaper if logging is off because it does +// not evaluate its arguments. +// +// Whether an individual call to V generates a log record depends on the setting of +// the -v and --vmodule flags; both are off by default. If the level in the call to +// V is at least the value of -v, or of -vmodule for the source file containing the +// call, the V call will log. +func V(level Level) Verbose { + // This function tries hard to be cheap unless there's work to do. + // The fast path is two atomic loads and compares. + + // Here is a cheap but safe test to see if V logging is enabled globally. + if logging.verbosity.get() >= level { + return Verbose(true) + } + + // It's off globally but it vmodule may still be set. + // Here is another cheap but safe test to see if vmodule is enabled. + if atomic.LoadInt32(&logging.filterLength) > 0 { + // Now we need a proper lock to use the logging structure. The pcs field + // is shared so we must lock before accessing it. This is fairly expensive, + // but if V logging is enabled we're slow anyway. + logging.mu.Lock() + defer logging.mu.Unlock() + if runtime.Callers(2, logging.pcs[:]) == 0 { + return Verbose(false) + } + v, ok := logging.vmap[logging.pcs[0]] + if !ok { + v = logging.setV(logging.pcs[0]) + } + return Verbose(v >= level) + } + return Verbose(false) +} + +// Info is equivalent to the global Info function, guarded by the value of v. +// See the documentation of V for usage. +func (v Verbose) Info(args ...interface{}) { + if v { + logging.print(infoLog, args...) + } +} + +// Infoln is equivalent to the global Infoln function, guarded by the value of v. +// See the documentation of V for usage. +func (v Verbose) Infoln(args ...interface{}) { + if v { + logging.println(infoLog, args...) + } +} + +// Infof is equivalent to the global Infof function, guarded by the value of v. +// See the documentation of V for usage. +func (v Verbose) Infof(format string, args ...interface{}) { + if v { + logging.printf(infoLog, format, args...) + } +} + +// Info logs to the INFO log. +// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +func Info(args ...interface{}) { + logging.print(infoLog, args...) +} + +// InfoDepth acts as Info but uses depth to determine which call frame to log. +// InfoDepth(0, "msg") is the same as Info("msg"). +func InfoDepth(depth int, args ...interface{}) { + logging.printDepth(infoLog, depth, args...) +} + +// Infoln logs to the INFO log. +// Arguments are handled in the manner of fmt.Println; a newline is appended if missing. +func Infoln(args ...interface{}) { + logging.println(infoLog, args...) +} + +// Infof logs to the INFO log. +// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +func Infof(format string, args ...interface{}) { + logging.printf(infoLog, format, args...) +} + +// Warning logs to the WARNING and INFO logs. +// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +func Warning(args ...interface{}) { + logging.print(warningLog, args...) +} + +// WarningDepth acts as Warning but uses depth to determine which call frame to log. +// WarningDepth(0, "msg") is the same as Warning("msg"). +func WarningDepth(depth int, args ...interface{}) { + logging.printDepth(warningLog, depth, args...) +} + +// Warningln logs to the WARNING and INFO logs. +// Arguments are handled in the manner of fmt.Println; a newline is appended if missing. +func Warningln(args ...interface{}) { + logging.println(warningLog, args...) +} + +// Warningf logs to the WARNING and INFO logs. +// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +func Warningf(format string, args ...interface{}) { + logging.printf(warningLog, format, args...) +} + +// Error logs to the ERROR, WARNING, and INFO logs. +// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +func Error(args ...interface{}) { + logging.print(errorLog, args...) +} + +// ErrorDepth acts as Error but uses depth to determine which call frame to log. +// ErrorDepth(0, "msg") is the same as Error("msg"). +func ErrorDepth(depth int, args ...interface{}) { + logging.printDepth(errorLog, depth, args...) +} + +// Errorln logs to the ERROR, WARNING, and INFO logs. +// Arguments are handled in the manner of fmt.Println; a newline is appended if missing. +func Errorln(args ...interface{}) { + logging.println(errorLog, args...) +} + +// Errorf logs to the ERROR, WARNING, and INFO logs. +// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +func Errorf(format string, args ...interface{}) { + logging.printf(errorLog, format, args...) +} + +// Fatal logs to the FATAL, ERROR, WARNING, and INFO logs, +// including a stack trace of all running goroutines, then calls os.Exit(255). +// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +func Fatal(args ...interface{}) { + logging.print(fatalLog, args...) +} + +// FatalDepth acts as Fatal but uses depth to determine which call frame to log. +// FatalDepth(0, "msg") is the same as Fatal("msg"). +func FatalDepth(depth int, args ...interface{}) { + logging.printDepth(fatalLog, depth, args...) +} + +// Fatalln logs to the FATAL, ERROR, WARNING, and INFO logs, +// including a stack trace of all running goroutines, then calls os.Exit(255). +// Arguments are handled in the manner of fmt.Println; a newline is appended if missing. +func Fatalln(args ...interface{}) { + logging.println(fatalLog, args...) +} + +// Fatalf logs to the FATAL, ERROR, WARNING, and INFO logs, +// including a stack trace of all running goroutines, then calls os.Exit(255). +// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +func Fatalf(format string, args ...interface{}) { + logging.printf(fatalLog, format, args...) +} + +// fatalNoStacks is non-zero if we are to exit without dumping goroutine stacks. +// It allows Exit and relatives to use the Fatal logs. +var fatalNoStacks uint32 + +// Exit logs to the FATAL, ERROR, WARNING, and INFO logs, then calls os.Exit(1). +// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +func Exit(args ...interface{}) { + atomic.StoreUint32(&fatalNoStacks, 1) + logging.print(fatalLog, args...) +} + +// ExitDepth acts as Exit but uses depth to determine which call frame to log. +// ExitDepth(0, "msg") is the same as Exit("msg"). +func ExitDepth(depth int, args ...interface{}) { + atomic.StoreUint32(&fatalNoStacks, 1) + logging.printDepth(fatalLog, depth, args...) +} + +// Exitln logs to the FATAL, ERROR, WARNING, and INFO logs, then calls os.Exit(1). +func Exitln(args ...interface{}) { + atomic.StoreUint32(&fatalNoStacks, 1) + logging.println(fatalLog, args...) +} + +// Exitf logs to the FATAL, ERROR, WARNING, and INFO logs, then calls os.Exit(1). +// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +func Exitf(format string, args ...interface{}) { + atomic.StoreUint32(&fatalNoStacks, 1) + logging.printf(fatalLog, format, args...) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/glog/glog_file.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/glog/glog_file.go new file mode 100644 index 0000000000000..65075d281110c --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/glog/glog_file.go @@ -0,0 +1,124 @@ +// Go support for leveled logs, analogous to https://code.google.com/p/google-glog/ +// +// Copyright 2013 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// File I/O for logs. + +package glog + +import ( + "errors" + "flag" + "fmt" + "os" + "os/user" + "path/filepath" + "strings" + "sync" + "time" +) + +// MaxSize is the maximum size of a log file in bytes. +var MaxSize uint64 = 1024 * 1024 * 1800 + +// logDirs lists the candidate directories for new log files. +var logDirs []string + +// If non-empty, overrides the choice of directory in which to write logs. +// See createLogDirs for the full list of possible destinations. +var logDir = flag.String("log_dir", "", "If non-empty, write log files in this directory") + +func createLogDirs() { + if *logDir != "" { + logDirs = append(logDirs, *logDir) + } + logDirs = append(logDirs, os.TempDir()) +} + +var ( + pid = os.Getpid() + program = filepath.Base(os.Args[0]) + host = "unknownhost" + userName = "unknownuser" +) + +func init() { + h, err := os.Hostname() + if err == nil { + host = shortHostname(h) + } + + current, err := user.Current() + if err == nil { + userName = current.Username + } + + // Sanitize userName since it may contain filepath separators on Windows. + userName = strings.Replace(userName, `\`, "_", -1) +} + +// shortHostname returns its argument, truncating at the first period. +// For instance, given "www.google.com" it returns "www". +func shortHostname(hostname string) string { + if i := strings.Index(hostname, "."); i >= 0 { + return hostname[:i] + } + return hostname +} + +// logName returns a new log file name containing tag, with start time t, and +// the name for the symlink for tag. +func logName(tag string, t time.Time) (name, link string) { + name = fmt.Sprintf("%s.%s.%s.log.%s.%04d%02d%02d-%02d%02d%02d.%d", + program, + host, + userName, + tag, + t.Year(), + t.Month(), + t.Day(), + t.Hour(), + t.Minute(), + t.Second(), + pid) + return name, program + "." + tag +} + +var onceLogDirs sync.Once + +// create creates a new log file and returns the file and its filename, which +// contains tag ("INFO", "FATAL", etc.) and t. If the file is created +// successfully, create also attempts to update the symlink for that tag, ignoring +// errors. +func create(tag string, t time.Time) (f *os.File, filename string, err error) { + onceLogDirs.Do(createLogDirs) + if len(logDirs) == 0 { + return nil, "", errors.New("log: no log dirs") + } + name, link := logName(tag, t) + var lastErr error + for _, dir := range logDirs { + fname := filepath.Join(dir, name) + f, err := os.Create(fname) + if err == nil { + symlink := filepath.Join(dir, link) + os.Remove(symlink) // ignore err + os.Symlink(name, symlink) // ignore err + return f, fname, nil + } + lastErr = err + } + return nil, "", fmt.Errorf("log: cannot create log: %v", lastErr) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/groupcache/LICENSE b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/groupcache/LICENSE new file mode 100644 index 0000000000000..37ec93a14fdcd --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/groupcache/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/groupcache/lru/lru.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/groupcache/lru/lru.go new file mode 100644 index 0000000000000..cdfe2991fd40a --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/groupcache/lru/lru.go @@ -0,0 +1,121 @@ +/* +Copyright 2013 Google Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package lru implements an LRU cache. +package lru + +import "container/list" + +// Cache is an LRU cache. It is not safe for concurrent access. +type Cache struct { + // MaxEntries is the maximum number of cache entries before + // an item is evicted. Zero means no limit. + MaxEntries int + + // OnEvicted optionally specificies a callback function to be + // executed when an entry is purged from the cache. + OnEvicted func(key Key, value interface{}) + + ll *list.List + cache map[interface{}]*list.Element +} + +// A Key may be any value that is comparable. See http://golang.org/ref/spec#Comparison_operators +type Key interface{} + +type entry struct { + key Key + value interface{} +} + +// New creates a new Cache. +// If maxEntries is zero, the cache has no limit and it's assumed +// that eviction is done by the caller. +func New(maxEntries int) *Cache { + return &Cache{ + MaxEntries: maxEntries, + ll: list.New(), + cache: make(map[interface{}]*list.Element), + } +} + +// Add adds a value to the cache. +func (c *Cache) Add(key Key, value interface{}) { + if c.cache == nil { + c.cache = make(map[interface{}]*list.Element) + c.ll = list.New() + } + if ee, ok := c.cache[key]; ok { + c.ll.MoveToFront(ee) + ee.Value.(*entry).value = value + return + } + ele := c.ll.PushFront(&entry{key, value}) + c.cache[key] = ele + if c.MaxEntries != 0 && c.ll.Len() > c.MaxEntries { + c.RemoveOldest() + } +} + +// Get looks up a key's value from the cache. +func (c *Cache) Get(key Key) (value interface{}, ok bool) { + if c.cache == nil { + return + } + if ele, hit := c.cache[key]; hit { + c.ll.MoveToFront(ele) + return ele.Value.(*entry).value, true + } + return +} + +// Remove removes the provided key from the cache. +func (c *Cache) Remove(key Key) { + if c.cache == nil { + return + } + if ele, hit := c.cache[key]; hit { + c.removeElement(ele) + } +} + +// RemoveOldest removes the oldest item from the cache. +func (c *Cache) RemoveOldest() { + if c.cache == nil { + return + } + ele := c.ll.Back() + if ele != nil { + c.removeElement(ele) + } +} + +func (c *Cache) removeElement(e *list.Element) { + c.ll.Remove(e) + kv := e.Value.(*entry) + delete(c.cache, kv.key) + if c.OnEvicted != nil { + c.OnEvicted(kv.key, kv.value) + } +} + +// Len returns the number of items in the cache. +func (c *Cache) Len() int { + if c.cache == nil { + return 0 + } + return c.ll.Len() +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/LICENSE b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/LICENSE new file mode 100644 index 0000000000000..1b1b1921efa6d --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/LICENSE @@ -0,0 +1,31 @@ +Go support for Protocol Buffers - Google's data interchange format + +Copyright 2010 The Go Authors. All rights reserved. +https://github.com/golang/protobuf + +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. + diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/Makefile b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/Makefile new file mode 100644 index 0000000000000..e2e0651a934d3 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/Makefile @@ -0,0 +1,43 @@ +# Go support for Protocol Buffers - Google's data interchange format +# +# Copyright 2010 The Go Authors. All rights reserved. +# https://github.com/golang/protobuf +# +# 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. + +install: + go install + +test: install generate-test-pbs + go test + + +generate-test-pbs: + make install + make -C testdata + protoc --go_out=Mtestdata/test.proto=github.com/golang/protobuf/proto/testdata,Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any:. proto3_proto/proto3.proto + make diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/clone.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/clone.go new file mode 100644 index 0000000000000..e392575b353af --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/clone.go @@ -0,0 +1,229 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2011 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +// Protocol buffer deep copy and merge. +// TODO: RawMessage. + +package proto + +import ( + "log" + "reflect" + "strings" +) + +// Clone returns a deep copy of a protocol buffer. +func Clone(pb Message) Message { + in := reflect.ValueOf(pb) + if in.IsNil() { + return pb + } + + out := reflect.New(in.Type().Elem()) + // out is empty so a merge is a deep copy. + mergeStruct(out.Elem(), in.Elem()) + return out.Interface().(Message) +} + +// Merge merges src into dst. +// Required and optional fields that are set in src will be set to that value in dst. +// Elements of repeated fields will be appended. +// Merge panics if src and dst are not the same type, or if dst is nil. +func Merge(dst, src Message) { + in := reflect.ValueOf(src) + out := reflect.ValueOf(dst) + if out.IsNil() { + panic("proto: nil destination") + } + if in.Type() != out.Type() { + // Explicit test prior to mergeStruct so that mistyped nils will fail + panic("proto: type mismatch") + } + if in.IsNil() { + // Merging nil into non-nil is a quiet no-op + return + } + mergeStruct(out.Elem(), in.Elem()) +} + +func mergeStruct(out, in reflect.Value) { + sprop := GetProperties(in.Type()) + for i := 0; i < in.NumField(); i++ { + f := in.Type().Field(i) + if strings.HasPrefix(f.Name, "XXX_") { + continue + } + mergeAny(out.Field(i), in.Field(i), false, sprop.Prop[i]) + } + + if emIn, ok := extendable(in.Addr().Interface()); ok { + emOut, _ := extendable(out.Addr().Interface()) + mIn, muIn := emIn.extensionsRead() + if mIn != nil { + mOut := emOut.extensionsWrite() + muIn.Lock() + mergeExtension(mOut, mIn) + muIn.Unlock() + } + } + + uf := in.FieldByName("XXX_unrecognized") + if !uf.IsValid() { + return + } + uin := uf.Bytes() + if len(uin) > 0 { + out.FieldByName("XXX_unrecognized").SetBytes(append([]byte(nil), uin...)) + } +} + +// mergeAny performs a merge between two values of the same type. +// viaPtr indicates whether the values were indirected through a pointer (implying proto2). +// prop is set if this is a struct field (it may be nil). +func mergeAny(out, in reflect.Value, viaPtr bool, prop *Properties) { + if in.Type() == protoMessageType { + if !in.IsNil() { + if out.IsNil() { + out.Set(reflect.ValueOf(Clone(in.Interface().(Message)))) + } else { + Merge(out.Interface().(Message), in.Interface().(Message)) + } + } + return + } + switch in.Kind() { + case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64, + reflect.String, reflect.Uint32, reflect.Uint64: + if !viaPtr && isProto3Zero(in) { + return + } + out.Set(in) + case reflect.Interface: + // Probably a oneof field; copy non-nil values. + if in.IsNil() { + return + } + // Allocate destination if it is not set, or set to a different type. + // Otherwise we will merge as normal. + if out.IsNil() || out.Elem().Type() != in.Elem().Type() { + out.Set(reflect.New(in.Elem().Elem().Type())) // interface -> *T -> T -> new(T) + } + mergeAny(out.Elem(), in.Elem(), false, nil) + case reflect.Map: + if in.Len() == 0 { + return + } + if out.IsNil() { + out.Set(reflect.MakeMap(in.Type())) + } + // For maps with value types of *T or []byte we need to deep copy each value. + elemKind := in.Type().Elem().Kind() + for _, key := range in.MapKeys() { + var val reflect.Value + switch elemKind { + case reflect.Ptr: + val = reflect.New(in.Type().Elem().Elem()) + mergeAny(val, in.MapIndex(key), false, nil) + case reflect.Slice: + val = in.MapIndex(key) + val = reflect.ValueOf(append([]byte{}, val.Bytes()...)) + default: + val = in.MapIndex(key) + } + out.SetMapIndex(key, val) + } + case reflect.Ptr: + if in.IsNil() { + return + } + if out.IsNil() { + out.Set(reflect.New(in.Elem().Type())) + } + mergeAny(out.Elem(), in.Elem(), true, nil) + case reflect.Slice: + if in.IsNil() { + return + } + if in.Type().Elem().Kind() == reflect.Uint8 { + // []byte is a scalar bytes field, not a repeated field. + + // Edge case: if this is in a proto3 message, a zero length + // bytes field is considered the zero value, and should not + // be merged. + if prop != nil && prop.proto3 && in.Len() == 0 { + return + } + + // Make a deep copy. + // Append to []byte{} instead of []byte(nil) so that we never end up + // with a nil result. + out.SetBytes(append([]byte{}, in.Bytes()...)) + return + } + n := in.Len() + if out.IsNil() { + out.Set(reflect.MakeSlice(in.Type(), 0, n)) + } + switch in.Type().Elem().Kind() { + case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64, + reflect.String, reflect.Uint32, reflect.Uint64: + out.Set(reflect.AppendSlice(out, in)) + default: + for i := 0; i < n; i++ { + x := reflect.Indirect(reflect.New(in.Type().Elem())) + mergeAny(x, in.Index(i), false, nil) + out.Set(reflect.Append(out, x)) + } + } + case reflect.Struct: + mergeStruct(out, in) + default: + // unknown type, so not a protocol buffer + log.Printf("proto: don't know how to copy %v", in) + } +} + +func mergeExtension(out, in map[int32]Extension) { + for extNum, eIn := range in { + eOut := Extension{desc: eIn.desc} + if eIn.value != nil { + v := reflect.New(reflect.TypeOf(eIn.value)).Elem() + mergeAny(v, reflect.ValueOf(eIn.value), false, nil) + eOut.value = v.Interface() + } + if eIn.enc != nil { + eOut.enc = make([]byte, len(eIn.enc)) + copy(eOut.enc, eIn.enc) + } + + out[extNum] = eOut + } +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/decode.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/decode.go new file mode 100644 index 0000000000000..07288a250b47a --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/decode.go @@ -0,0 +1,869 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto + +/* + * Routines for decoding protocol buffer data to construct in-memory representations. + */ + +import ( + "errors" + "fmt" + "io" + "os" + "reflect" +) + +// errOverflow is returned when an integer is too large to be represented. +var errOverflow = errors.New("proto: integer overflow") + +// ErrInternalBadWireType is returned by generated code when an incorrect +// wire type is encountered. It does not get returned to user code. +var ErrInternalBadWireType = errors.New("proto: internal error: bad wiretype for oneof") + +// The fundamental decoders that interpret bytes on the wire. +// Those that take integer types all return uint64 and are +// therefore of type valueDecoder. + +// DecodeVarint reads a varint-encoded integer from the slice. +// It returns the integer and the number of bytes consumed, or +// zero if there is not enough. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +func DecodeVarint(buf []byte) (x uint64, n int) { + // x, n already 0 + for shift := uint(0); shift < 64; shift += 7 { + if n >= len(buf) { + return 0, 0 + } + b := uint64(buf[n]) + n++ + x |= (b & 0x7F) << shift + if (b & 0x80) == 0 { + return x, n + } + } + + // The number is too large to represent in a 64-bit value. + return 0, 0 +} + +// DecodeVarint reads a varint-encoded integer from the Buffer. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +func (p *Buffer) DecodeVarint() (x uint64, err error) { + // x, err already 0 + + i := p.index + l := len(p.buf) + + for shift := uint(0); shift < 64; shift += 7 { + if i >= l { + err = io.ErrUnexpectedEOF + return + } + b := p.buf[i] + i++ + x |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + p.index = i + return + } + } + + // The number is too large to represent in a 64-bit value. + err = errOverflow + return +} + +// DecodeFixed64 reads a 64-bit integer from the Buffer. +// This is the format for the +// fixed64, sfixed64, and double protocol buffer types. +func (p *Buffer) DecodeFixed64() (x uint64, err error) { + // x, err already 0 + i := p.index + 8 + if i < 0 || i > len(p.buf) { + err = io.ErrUnexpectedEOF + return + } + p.index = i + + x = uint64(p.buf[i-8]) + x |= uint64(p.buf[i-7]) << 8 + x |= uint64(p.buf[i-6]) << 16 + x |= uint64(p.buf[i-5]) << 24 + x |= uint64(p.buf[i-4]) << 32 + x |= uint64(p.buf[i-3]) << 40 + x |= uint64(p.buf[i-2]) << 48 + x |= uint64(p.buf[i-1]) << 56 + return +} + +// DecodeFixed32 reads a 32-bit integer from the Buffer. +// This is the format for the +// fixed32, sfixed32, and float protocol buffer types. +func (p *Buffer) DecodeFixed32() (x uint64, err error) { + // x, err already 0 + i := p.index + 4 + if i < 0 || i > len(p.buf) { + err = io.ErrUnexpectedEOF + return + } + p.index = i + + x = uint64(p.buf[i-4]) + x |= uint64(p.buf[i-3]) << 8 + x |= uint64(p.buf[i-2]) << 16 + x |= uint64(p.buf[i-1]) << 24 + return +} + +// DecodeZigzag64 reads a zigzag-encoded 64-bit integer +// from the Buffer. +// This is the format used for the sint64 protocol buffer type. +func (p *Buffer) DecodeZigzag64() (x uint64, err error) { + x, err = p.DecodeVarint() + if err != nil { + return + } + x = (x >> 1) ^ uint64((int64(x&1)<<63)>>63) + return +} + +// DecodeZigzag32 reads a zigzag-encoded 32-bit integer +// from the Buffer. +// This is the format used for the sint32 protocol buffer type. +func (p *Buffer) DecodeZigzag32() (x uint64, err error) { + x, err = p.DecodeVarint() + if err != nil { + return + } + x = uint64((uint32(x) >> 1) ^ uint32((int32(x&1)<<31)>>31)) + return +} + +// These are not ValueDecoders: they produce an array of bytes or a string. +// bytes, embedded messages + +// DecodeRawBytes reads a count-delimited byte buffer from the Buffer. +// This is the format used for the bytes protocol buffer +// type and for embedded messages. +func (p *Buffer) DecodeRawBytes(alloc bool) (buf []byte, err error) { + n, err := p.DecodeVarint() + if err != nil { + return nil, err + } + + nb := int(n) + if nb < 0 { + return nil, fmt.Errorf("proto: bad byte length %d", nb) + } + end := p.index + nb + if end < p.index || end > len(p.buf) { + return nil, io.ErrUnexpectedEOF + } + + if !alloc { + // todo: check if can get more uses of alloc=false + buf = p.buf[p.index:end] + p.index += nb + return + } + + buf = make([]byte, nb) + copy(buf, p.buf[p.index:]) + p.index += nb + return +} + +// DecodeStringBytes reads an encoded string from the Buffer. +// This is the format used for the proto2 string type. +func (p *Buffer) DecodeStringBytes() (s string, err error) { + buf, err := p.DecodeRawBytes(false) + if err != nil { + return + } + return string(buf), nil +} + +// Skip the next item in the buffer. Its wire type is decoded and presented as an argument. +// If the protocol buffer has extensions, and the field matches, add it as an extension. +// Otherwise, if the XXX_unrecognized field exists, append the skipped data there. +func (o *Buffer) skipAndSave(t reflect.Type, tag, wire int, base structPointer, unrecField field) error { + oi := o.index + + err := o.skip(t, tag, wire) + if err != nil { + return err + } + + if !unrecField.IsValid() { + return nil + } + + ptr := structPointer_Bytes(base, unrecField) + + // Add the skipped field to struct field + obuf := o.buf + + o.buf = *ptr + o.EncodeVarint(uint64(tag<<3 | wire)) + *ptr = append(o.buf, obuf[oi:o.index]...) + + o.buf = obuf + + return nil +} + +// Skip the next item in the buffer. Its wire type is decoded and presented as an argument. +func (o *Buffer) skip(t reflect.Type, tag, wire int) error { + + var u uint64 + var err error + + switch wire { + case WireVarint: + _, err = o.DecodeVarint() + case WireFixed64: + _, err = o.DecodeFixed64() + case WireBytes: + _, err = o.DecodeRawBytes(false) + case WireFixed32: + _, err = o.DecodeFixed32() + case WireStartGroup: + for { + u, err = o.DecodeVarint() + if err != nil { + break + } + fwire := int(u & 0x7) + if fwire == WireEndGroup { + break + } + ftag := int(u >> 3) + err = o.skip(t, ftag, fwire) + if err != nil { + break + } + } + default: + err = fmt.Errorf("proto: can't skip unknown wire type %d for %s", wire, t) + } + return err +} + +// Unmarshaler is the interface representing objects that can +// unmarshal themselves. The method should reset the receiver before +// decoding starts. The argument points to data that may be +// overwritten, so implementations should not keep references to the +// buffer. +type Unmarshaler interface { + Unmarshal([]byte) error +} + +// Unmarshal parses the protocol buffer representation in buf and places the +// decoded result in pb. If the struct underlying pb does not match +// the data in buf, the results can be unpredictable. +// +// Unmarshal resets pb before starting to unmarshal, so any +// existing data in pb is always removed. Use UnmarshalMerge +// to preserve and append to existing data. +func Unmarshal(buf []byte, pb Message) error { + pb.Reset() + return UnmarshalMerge(buf, pb) +} + +// UnmarshalMerge parses the protocol buffer representation in buf and +// writes the decoded result to pb. If the struct underlying pb does not match +// the data in buf, the results can be unpredictable. +// +// UnmarshalMerge merges into existing data in pb. +// Most code should use Unmarshal instead. +func UnmarshalMerge(buf []byte, pb Message) error { + // If the object can unmarshal itself, let it. + if u, ok := pb.(Unmarshaler); ok { + return u.Unmarshal(buf) + } + return NewBuffer(buf).Unmarshal(pb) +} + +// DecodeMessage reads a count-delimited message from the Buffer. +func (p *Buffer) DecodeMessage(pb Message) error { + enc, err := p.DecodeRawBytes(false) + if err != nil { + return err + } + return NewBuffer(enc).Unmarshal(pb) +} + +// DecodeGroup reads a tag-delimited group from the Buffer. +func (p *Buffer) DecodeGroup(pb Message) error { + typ, base, err := getbase(pb) + if err != nil { + return err + } + return p.unmarshalType(typ.Elem(), GetProperties(typ.Elem()), true, base) +} + +// Unmarshal parses the protocol buffer representation in the +// Buffer and places the decoded result in pb. If the struct +// underlying pb does not match the data in the buffer, the results can be +// unpredictable. +func (p *Buffer) Unmarshal(pb Message) error { + // If the object can unmarshal itself, let it. + if u, ok := pb.(Unmarshaler); ok { + err := u.Unmarshal(p.buf[p.index:]) + p.index = len(p.buf) + return err + } + + typ, base, err := getbase(pb) + if err != nil { + return err + } + + err = p.unmarshalType(typ.Elem(), GetProperties(typ.Elem()), false, base) + + if collectStats { + stats.Decode++ + } + + return err +} + +// unmarshalType does the work of unmarshaling a structure. +func (o *Buffer) unmarshalType(st reflect.Type, prop *StructProperties, is_group bool, base structPointer) error { + var state errorState + required, reqFields := prop.reqCount, uint64(0) + + var err error + for err == nil && o.index < len(o.buf) { + oi := o.index + var u uint64 + u, err = o.DecodeVarint() + if err != nil { + break + } + wire := int(u & 0x7) + if wire == WireEndGroup { + if is_group { + return nil // input is satisfied + } + return fmt.Errorf("proto: %s: wiretype end group for non-group", st) + } + tag := int(u >> 3) + if tag <= 0 { + return fmt.Errorf("proto: %s: illegal tag %d (wire type %d)", st, tag, wire) + } + fieldnum, ok := prop.decoderTags.get(tag) + if !ok { + // Maybe it's an extension? + if prop.extendable { + if e, _ := extendable(structPointer_Interface(base, st)); isExtensionField(e, int32(tag)) { + if err = o.skip(st, tag, wire); err == nil { + extmap := e.extensionsWrite() + ext := extmap[int32(tag)] // may be missing + ext.enc = append(ext.enc, o.buf[oi:o.index]...) + extmap[int32(tag)] = ext + } + continue + } + } + // Maybe it's a oneof? + if prop.oneofUnmarshaler != nil { + m := structPointer_Interface(base, st).(Message) + // First return value indicates whether tag is a oneof field. + ok, err = prop.oneofUnmarshaler(m, tag, wire, o) + if err == ErrInternalBadWireType { + // Map the error to something more descriptive. + // Do the formatting here to save generated code space. + err = fmt.Errorf("bad wiretype for oneof field in %T", m) + } + if ok { + continue + } + } + err = o.skipAndSave(st, tag, wire, base, prop.unrecField) + continue + } + p := prop.Prop[fieldnum] + + if p.dec == nil { + fmt.Fprintf(os.Stderr, "proto: no protobuf decoder for %s.%s\n", st, st.Field(fieldnum).Name) + continue + } + dec := p.dec + if wire != WireStartGroup && wire != p.WireType { + if wire == WireBytes && p.packedDec != nil { + // a packable field + dec = p.packedDec + } else { + err = fmt.Errorf("proto: bad wiretype for field %s.%s: got wiretype %d, want %d", st, st.Field(fieldnum).Name, wire, p.WireType) + continue + } + } + decErr := dec(o, p, base) + if decErr != nil && !state.shouldContinue(decErr, p) { + err = decErr + } + if err == nil && p.Required { + // Successfully decoded a required field. + if tag <= 64 { + // use bitmap for fields 1-64 to catch field reuse. + var mask uint64 = 1 << uint64(tag-1) + if reqFields&mask == 0 { + // new required field + reqFields |= mask + required-- + } + } else { + // This is imprecise. It can be fooled by a required field + // with a tag > 64 that is encoded twice; that's very rare. + // A fully correct implementation would require allocating + // a data structure, which we would like to avoid. + required-- + } + } + } + if err == nil { + if is_group { + return io.ErrUnexpectedEOF + } + if state.err != nil { + return state.err + } + if required > 0 { + // Not enough information to determine the exact field. If we use extra + // CPU, we could determine the field only if the missing required field + // has a tag <= 64 and we check reqFields. + return &RequiredNotSetError{"{Unknown}"} + } + } + return err +} + +// Individual type decoders +// For each, +// u is the decoded value, +// v is a pointer to the field (pointer) in the struct + +// Sizes of the pools to allocate inside the Buffer. +// The goal is modest amortization and allocation +// on at least 16-byte boundaries. +const ( + boolPoolSize = 16 + uint32PoolSize = 8 + uint64PoolSize = 4 +) + +// Decode a bool. +func (o *Buffer) dec_bool(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + if len(o.bools) == 0 { + o.bools = make([]bool, boolPoolSize) + } + o.bools[0] = u != 0 + *structPointer_Bool(base, p.field) = &o.bools[0] + o.bools = o.bools[1:] + return nil +} + +func (o *Buffer) dec_proto3_bool(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + *structPointer_BoolVal(base, p.field) = u != 0 + return nil +} + +// Decode an int32. +func (o *Buffer) dec_int32(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + word32_Set(structPointer_Word32(base, p.field), o, uint32(u)) + return nil +} + +func (o *Buffer) dec_proto3_int32(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + word32Val_Set(structPointer_Word32Val(base, p.field), uint32(u)) + return nil +} + +// Decode an int64. +func (o *Buffer) dec_int64(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + word64_Set(structPointer_Word64(base, p.field), o, u) + return nil +} + +func (o *Buffer) dec_proto3_int64(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + word64Val_Set(structPointer_Word64Val(base, p.field), o, u) + return nil +} + +// Decode a string. +func (o *Buffer) dec_string(p *Properties, base structPointer) error { + s, err := o.DecodeStringBytes() + if err != nil { + return err + } + *structPointer_String(base, p.field) = &s + return nil +} + +func (o *Buffer) dec_proto3_string(p *Properties, base structPointer) error { + s, err := o.DecodeStringBytes() + if err != nil { + return err + } + *structPointer_StringVal(base, p.field) = s + return nil +} + +// Decode a slice of bytes ([]byte). +func (o *Buffer) dec_slice_byte(p *Properties, base structPointer) error { + b, err := o.DecodeRawBytes(true) + if err != nil { + return err + } + *structPointer_Bytes(base, p.field) = b + return nil +} + +// Decode a slice of bools ([]bool). +func (o *Buffer) dec_slice_bool(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + v := structPointer_BoolSlice(base, p.field) + *v = append(*v, u != 0) + return nil +} + +// Decode a slice of bools ([]bool) in packed format. +func (o *Buffer) dec_slice_packed_bool(p *Properties, base structPointer) error { + v := structPointer_BoolSlice(base, p.field) + + nn, err := o.DecodeVarint() + if err != nil { + return err + } + nb := int(nn) // number of bytes of encoded bools + fin := o.index + nb + if fin < o.index { + return errOverflow + } + + y := *v + for o.index < fin { + u, err := p.valDec(o) + if err != nil { + return err + } + y = append(y, u != 0) + } + + *v = y + return nil +} + +// Decode a slice of int32s ([]int32). +func (o *Buffer) dec_slice_int32(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + structPointer_Word32Slice(base, p.field).Append(uint32(u)) + return nil +} + +// Decode a slice of int32s ([]int32) in packed format. +func (o *Buffer) dec_slice_packed_int32(p *Properties, base structPointer) error { + v := structPointer_Word32Slice(base, p.field) + + nn, err := o.DecodeVarint() + if err != nil { + return err + } + nb := int(nn) // number of bytes of encoded int32s + + fin := o.index + nb + if fin < o.index { + return errOverflow + } + for o.index < fin { + u, err := p.valDec(o) + if err != nil { + return err + } + v.Append(uint32(u)) + } + return nil +} + +// Decode a slice of int64s ([]int64). +func (o *Buffer) dec_slice_int64(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + + structPointer_Word64Slice(base, p.field).Append(u) + return nil +} + +// Decode a slice of int64s ([]int64) in packed format. +func (o *Buffer) dec_slice_packed_int64(p *Properties, base structPointer) error { + v := structPointer_Word64Slice(base, p.field) + + nn, err := o.DecodeVarint() + if err != nil { + return err + } + nb := int(nn) // number of bytes of encoded int64s + + fin := o.index + nb + if fin < o.index { + return errOverflow + } + for o.index < fin { + u, err := p.valDec(o) + if err != nil { + return err + } + v.Append(u) + } + return nil +} + +// Decode a slice of strings ([]string). +func (o *Buffer) dec_slice_string(p *Properties, base structPointer) error { + s, err := o.DecodeStringBytes() + if err != nil { + return err + } + v := structPointer_StringSlice(base, p.field) + *v = append(*v, s) + return nil +} + +// Decode a slice of slice of bytes ([][]byte). +func (o *Buffer) dec_slice_slice_byte(p *Properties, base structPointer) error { + b, err := o.DecodeRawBytes(true) + if err != nil { + return err + } + v := structPointer_BytesSlice(base, p.field) + *v = append(*v, b) + return nil +} + +// Decode a map field. +func (o *Buffer) dec_new_map(p *Properties, base structPointer) error { + raw, err := o.DecodeRawBytes(false) + if err != nil { + return err + } + oi := o.index // index at the end of this map entry + o.index -= len(raw) // move buffer back to start of map entry + + mptr := structPointer_NewAt(base, p.field, p.mtype) // *map[K]V + if mptr.Elem().IsNil() { + mptr.Elem().Set(reflect.MakeMap(mptr.Type().Elem())) + } + v := mptr.Elem() // map[K]V + + // Prepare addressable doubly-indirect placeholders for the key and value types. + // See enc_new_map for why. + keyptr := reflect.New(reflect.PtrTo(p.mtype.Key())).Elem() // addressable *K + keybase := toStructPointer(keyptr.Addr()) // **K + + var valbase structPointer + var valptr reflect.Value + switch p.mtype.Elem().Kind() { + case reflect.Slice: + // []byte + var dummy []byte + valptr = reflect.ValueOf(&dummy) // *[]byte + valbase = toStructPointer(valptr) // *[]byte + case reflect.Ptr: + // message; valptr is **Msg; need to allocate the intermediate pointer + valptr = reflect.New(reflect.PtrTo(p.mtype.Elem())).Elem() // addressable *V + valptr.Set(reflect.New(valptr.Type().Elem())) + valbase = toStructPointer(valptr) + default: + // everything else + valptr = reflect.New(reflect.PtrTo(p.mtype.Elem())).Elem() // addressable *V + valbase = toStructPointer(valptr.Addr()) // **V + } + + // Decode. + // This parses a restricted wire format, namely the encoding of a message + // with two fields. See enc_new_map for the format. + for o.index < oi { + // tagcode for key and value properties are always a single byte + // because they have tags 1 and 2. + tagcode := o.buf[o.index] + o.index++ + switch tagcode { + case p.mkeyprop.tagcode[0]: + if err := p.mkeyprop.dec(o, p.mkeyprop, keybase); err != nil { + return err + } + case p.mvalprop.tagcode[0]: + if err := p.mvalprop.dec(o, p.mvalprop, valbase); err != nil { + return err + } + default: + // TODO: Should we silently skip this instead? + return fmt.Errorf("proto: bad map data tag %d", raw[0]) + } + } + keyelem, valelem := keyptr.Elem(), valptr.Elem() + if !keyelem.IsValid() { + keyelem = reflect.Zero(p.mtype.Key()) + } + if !valelem.IsValid() { + valelem = reflect.Zero(p.mtype.Elem()) + } + + v.SetMapIndex(keyelem, valelem) + return nil +} + +// Decode a group. +func (o *Buffer) dec_struct_group(p *Properties, base structPointer) error { + bas := structPointer_GetStructPointer(base, p.field) + if structPointer_IsNil(bas) { + // allocate new nested message + bas = toStructPointer(reflect.New(p.stype)) + structPointer_SetStructPointer(base, p.field, bas) + } + return o.unmarshalType(p.stype, p.sprop, true, bas) +} + +// Decode an embedded message. +func (o *Buffer) dec_struct_message(p *Properties, base structPointer) (err error) { + raw, e := o.DecodeRawBytes(false) + if e != nil { + return e + } + + bas := structPointer_GetStructPointer(base, p.field) + if structPointer_IsNil(bas) { + // allocate new nested message + bas = toStructPointer(reflect.New(p.stype)) + structPointer_SetStructPointer(base, p.field, bas) + } + + // If the object can unmarshal itself, let it. + if p.isUnmarshaler { + iv := structPointer_Interface(bas, p.stype) + return iv.(Unmarshaler).Unmarshal(raw) + } + + obuf := o.buf + oi := o.index + o.buf = raw + o.index = 0 + + err = o.unmarshalType(p.stype, p.sprop, false, bas) + o.buf = obuf + o.index = oi + + return err +} + +// Decode a slice of embedded messages. +func (o *Buffer) dec_slice_struct_message(p *Properties, base structPointer) error { + return o.dec_slice_struct(p, false, base) +} + +// Decode a slice of embedded groups. +func (o *Buffer) dec_slice_struct_group(p *Properties, base structPointer) error { + return o.dec_slice_struct(p, true, base) +} + +// Decode a slice of structs ([]*struct). +func (o *Buffer) dec_slice_struct(p *Properties, is_group bool, base structPointer) error { + v := reflect.New(p.stype) + bas := toStructPointer(v) + structPointer_StructPointerSlice(base, p.field).Append(bas) + + if is_group { + err := o.unmarshalType(p.stype, p.sprop, is_group, bas) + return err + } + + raw, err := o.DecodeRawBytes(false) + if err != nil { + return err + } + + // If the object can unmarshal itself, let it. + if p.isUnmarshaler { + iv := v.Interface() + return iv.(Unmarshaler).Unmarshal(raw) + } + + obuf := o.buf + oi := o.index + o.buf = raw + o.index = 0 + + err = o.unmarshalType(p.stype, p.sprop, is_group, bas) + + o.buf = obuf + o.index = oi + + return err +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/encode.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/encode.go new file mode 100644 index 0000000000000..8c1b8fd1f6831 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/encode.go @@ -0,0 +1,1363 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto + +/* + * Routines for encoding data into the wire format for protocol buffers. + */ + +import ( + "errors" + "fmt" + "reflect" + "sort" +) + +// RequiredNotSetError is the error returned if Marshal is called with +// a protocol buffer struct whose required fields have not +// all been initialized. It is also the error returned if Unmarshal is +// called with an encoded protocol buffer that does not include all the +// required fields. +// +// When printed, RequiredNotSetError reports the first unset required field in a +// message. If the field cannot be precisely determined, it is reported as +// "{Unknown}". +type RequiredNotSetError struct { + field string +} + +func (e *RequiredNotSetError) Error() string { + return fmt.Sprintf("proto: required field %q not set", e.field) +} + +var ( + // errRepeatedHasNil is the error returned if Marshal is called with + // a struct with a repeated field containing a nil element. + errRepeatedHasNil = errors.New("proto: repeated field has nil element") + + // errOneofHasNil is the error returned if Marshal is called with + // a struct with a oneof field containing a nil element. + errOneofHasNil = errors.New("proto: oneof field has nil value") + + // ErrNil is the error returned if Marshal is called with nil. + ErrNil = errors.New("proto: Marshal called with nil") + + // ErrTooLarge is the error returned if Marshal is called with a + // message that encodes to >2GB. + ErrTooLarge = errors.New("proto: message encodes to over 2 GB") +) + +// The fundamental encoders that put bytes on the wire. +// Those that take integer types all accept uint64 and are +// therefore of type valueEncoder. + +const maxVarintBytes = 10 // maximum length of a varint + +// maxMarshalSize is the largest allowed size of an encoded protobuf, +// since C++ and Java use signed int32s for the size. +const maxMarshalSize = 1<<31 - 1 + +// EncodeVarint returns the varint encoding of x. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +// Not used by the package itself, but helpful to clients +// wishing to use the same encoding. +func EncodeVarint(x uint64) []byte { + var buf [maxVarintBytes]byte + var n int + for n = 0; x > 127; n++ { + buf[n] = 0x80 | uint8(x&0x7F) + x >>= 7 + } + buf[n] = uint8(x) + n++ + return buf[0:n] +} + +// EncodeVarint writes a varint-encoded integer to the Buffer. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +func (p *Buffer) EncodeVarint(x uint64) error { + for x >= 1<<7 { + p.buf = append(p.buf, uint8(x&0x7f|0x80)) + x >>= 7 + } + p.buf = append(p.buf, uint8(x)) + return nil +} + +// SizeVarint returns the varint encoding size of an integer. +func SizeVarint(x uint64) int { + return sizeVarint(x) +} + +func sizeVarint(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} + +// EncodeFixed64 writes a 64-bit integer to the Buffer. +// This is the format for the +// fixed64, sfixed64, and double protocol buffer types. +func (p *Buffer) EncodeFixed64(x uint64) error { + p.buf = append(p.buf, + uint8(x), + uint8(x>>8), + uint8(x>>16), + uint8(x>>24), + uint8(x>>32), + uint8(x>>40), + uint8(x>>48), + uint8(x>>56)) + return nil +} + +func sizeFixed64(x uint64) int { + return 8 +} + +// EncodeFixed32 writes a 32-bit integer to the Buffer. +// This is the format for the +// fixed32, sfixed32, and float protocol buffer types. +func (p *Buffer) EncodeFixed32(x uint64) error { + p.buf = append(p.buf, + uint8(x), + uint8(x>>8), + uint8(x>>16), + uint8(x>>24)) + return nil +} + +func sizeFixed32(x uint64) int { + return 4 +} + +// EncodeZigzag64 writes a zigzag-encoded 64-bit integer +// to the Buffer. +// This is the format used for the sint64 protocol buffer type. +func (p *Buffer) EncodeZigzag64(x uint64) error { + // use signed number to get arithmetic right shift. + return p.EncodeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +func sizeZigzag64(x uint64) int { + return sizeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +// EncodeZigzag32 writes a zigzag-encoded 32-bit integer +// to the Buffer. +// This is the format used for the sint32 protocol buffer type. +func (p *Buffer) EncodeZigzag32(x uint64) error { + // use signed number to get arithmetic right shift. + return p.EncodeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31)))) +} + +func sizeZigzag32(x uint64) int { + return sizeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31)))) +} + +// EncodeRawBytes writes a count-delimited byte buffer to the Buffer. +// This is the format used for the bytes protocol buffer +// type and for embedded messages. +func (p *Buffer) EncodeRawBytes(b []byte) error { + p.EncodeVarint(uint64(len(b))) + p.buf = append(p.buf, b...) + return nil +} + +func sizeRawBytes(b []byte) int { + return sizeVarint(uint64(len(b))) + + len(b) +} + +// EncodeStringBytes writes an encoded string to the Buffer. +// This is the format used for the proto2 string type. +func (p *Buffer) EncodeStringBytes(s string) error { + p.EncodeVarint(uint64(len(s))) + p.buf = append(p.buf, s...) + return nil +} + +func sizeStringBytes(s string) int { + return sizeVarint(uint64(len(s))) + + len(s) +} + +// Marshaler is the interface representing objects that can marshal themselves. +type Marshaler interface { + Marshal() ([]byte, error) +} + +// Marshal takes the protocol buffer +// and encodes it into the wire format, returning the data. +func Marshal(pb Message) ([]byte, error) { + // Can the object marshal itself? + if m, ok := pb.(Marshaler); ok { + return m.Marshal() + } + p := NewBuffer(nil) + err := p.Marshal(pb) + var state errorState + if err != nil && !state.shouldContinue(err, nil) { + return nil, err + } + if p.buf == nil && err == nil { + // Return a non-nil slice on success. + return []byte{}, nil + } + return p.buf, err +} + +// EncodeMessage writes the protocol buffer to the Buffer, +// prefixed by a varint-encoded length. +func (p *Buffer) EncodeMessage(pb Message) error { + t, base, err := getbase(pb) + if structPointer_IsNil(base) { + return ErrNil + } + if err == nil { + var state errorState + err = p.enc_len_struct(GetProperties(t.Elem()), base, &state) + } + return err +} + +// Marshal takes the protocol buffer +// and encodes it into the wire format, writing the result to the +// Buffer. +func (p *Buffer) Marshal(pb Message) error { + // Can the object marshal itself? + if m, ok := pb.(Marshaler); ok { + data, err := m.Marshal() + if err != nil { + return err + } + p.buf = append(p.buf, data...) + return nil + } + + t, base, err := getbase(pb) + if structPointer_IsNil(base) { + return ErrNil + } + if err == nil { + err = p.enc_struct(GetProperties(t.Elem()), base) + } + + if collectStats { + stats.Encode++ + } + + if len(p.buf) > maxMarshalSize { + return ErrTooLarge + } + return err +} + +// Size returns the encoded size of a protocol buffer. +func Size(pb Message) (n int) { + // Can the object marshal itself? If so, Size is slow. + // TODO: add Size to Marshaler, or add a Sizer interface. + if m, ok := pb.(Marshaler); ok { + b, _ := m.Marshal() + return len(b) + } + + t, base, err := getbase(pb) + if structPointer_IsNil(base) { + return 0 + } + if err == nil { + n = size_struct(GetProperties(t.Elem()), base) + } + + if collectStats { + stats.Size++ + } + + return +} + +// Individual type encoders. + +// Encode a bool. +func (o *Buffer) enc_bool(p *Properties, base structPointer) error { + v := *structPointer_Bool(base, p.field) + if v == nil { + return ErrNil + } + x := 0 + if *v { + x = 1 + } + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, uint64(x)) + return nil +} + +func (o *Buffer) enc_proto3_bool(p *Properties, base structPointer) error { + v := *structPointer_BoolVal(base, p.field) + if !v { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, 1) + return nil +} + +func size_bool(p *Properties, base structPointer) int { + v := *structPointer_Bool(base, p.field) + if v == nil { + return 0 + } + return len(p.tagcode) + 1 // each bool takes exactly one byte +} + +func size_proto3_bool(p *Properties, base structPointer) int { + v := *structPointer_BoolVal(base, p.field) + if !v && !p.oneof { + return 0 + } + return len(p.tagcode) + 1 // each bool takes exactly one byte +} + +// Encode an int32. +func (o *Buffer) enc_int32(p *Properties, base structPointer) error { + v := structPointer_Word32(base, p.field) + if word32_IsNil(v) { + return ErrNil + } + x := int32(word32_Get(v)) // permit sign extension to use full 64-bit range + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, uint64(x)) + return nil +} + +func (o *Buffer) enc_proto3_int32(p *Properties, base structPointer) error { + v := structPointer_Word32Val(base, p.field) + x := int32(word32Val_Get(v)) // permit sign extension to use full 64-bit range + if x == 0 { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, uint64(x)) + return nil +} + +func size_int32(p *Properties, base structPointer) (n int) { + v := structPointer_Word32(base, p.field) + if word32_IsNil(v) { + return 0 + } + x := int32(word32_Get(v)) // permit sign extension to use full 64-bit range + n += len(p.tagcode) + n += p.valSize(uint64(x)) + return +} + +func size_proto3_int32(p *Properties, base structPointer) (n int) { + v := structPointer_Word32Val(base, p.field) + x := int32(word32Val_Get(v)) // permit sign extension to use full 64-bit range + if x == 0 && !p.oneof { + return 0 + } + n += len(p.tagcode) + n += p.valSize(uint64(x)) + return +} + +// Encode a uint32. +// Exactly the same as int32, except for no sign extension. +func (o *Buffer) enc_uint32(p *Properties, base structPointer) error { + v := structPointer_Word32(base, p.field) + if word32_IsNil(v) { + return ErrNil + } + x := word32_Get(v) + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, uint64(x)) + return nil +} + +func (o *Buffer) enc_proto3_uint32(p *Properties, base structPointer) error { + v := structPointer_Word32Val(base, p.field) + x := word32Val_Get(v) + if x == 0 { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, uint64(x)) + return nil +} + +func size_uint32(p *Properties, base structPointer) (n int) { + v := structPointer_Word32(base, p.field) + if word32_IsNil(v) { + return 0 + } + x := word32_Get(v) + n += len(p.tagcode) + n += p.valSize(uint64(x)) + return +} + +func size_proto3_uint32(p *Properties, base structPointer) (n int) { + v := structPointer_Word32Val(base, p.field) + x := word32Val_Get(v) + if x == 0 && !p.oneof { + return 0 + } + n += len(p.tagcode) + n += p.valSize(uint64(x)) + return +} + +// Encode an int64. +func (o *Buffer) enc_int64(p *Properties, base structPointer) error { + v := structPointer_Word64(base, p.field) + if word64_IsNil(v) { + return ErrNil + } + x := word64_Get(v) + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, x) + return nil +} + +func (o *Buffer) enc_proto3_int64(p *Properties, base structPointer) error { + v := structPointer_Word64Val(base, p.field) + x := word64Val_Get(v) + if x == 0 { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, x) + return nil +} + +func size_int64(p *Properties, base structPointer) (n int) { + v := structPointer_Word64(base, p.field) + if word64_IsNil(v) { + return 0 + } + x := word64_Get(v) + n += len(p.tagcode) + n += p.valSize(x) + return +} + +func size_proto3_int64(p *Properties, base structPointer) (n int) { + v := structPointer_Word64Val(base, p.field) + x := word64Val_Get(v) + if x == 0 && !p.oneof { + return 0 + } + n += len(p.tagcode) + n += p.valSize(x) + return +} + +// Encode a string. +func (o *Buffer) enc_string(p *Properties, base structPointer) error { + v := *structPointer_String(base, p.field) + if v == nil { + return ErrNil + } + x := *v + o.buf = append(o.buf, p.tagcode...) + o.EncodeStringBytes(x) + return nil +} + +func (o *Buffer) enc_proto3_string(p *Properties, base structPointer) error { + v := *structPointer_StringVal(base, p.field) + if v == "" { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeStringBytes(v) + return nil +} + +func size_string(p *Properties, base structPointer) (n int) { + v := *structPointer_String(base, p.field) + if v == nil { + return 0 + } + x := *v + n += len(p.tagcode) + n += sizeStringBytes(x) + return +} + +func size_proto3_string(p *Properties, base structPointer) (n int) { + v := *structPointer_StringVal(base, p.field) + if v == "" && !p.oneof { + return 0 + } + n += len(p.tagcode) + n += sizeStringBytes(v) + return +} + +// All protocol buffer fields are nillable, but be careful. +func isNil(v reflect.Value) bool { + switch v.Kind() { + case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: + return v.IsNil() + } + return false +} + +// Encode a message struct. +func (o *Buffer) enc_struct_message(p *Properties, base structPointer) error { + var state errorState + structp := structPointer_GetStructPointer(base, p.field) + if structPointer_IsNil(structp) { + return ErrNil + } + + // Can the object marshal itself? + if p.isMarshaler { + m := structPointer_Interface(structp, p.stype).(Marshaler) + data, err := m.Marshal() + if err != nil && !state.shouldContinue(err, nil) { + return err + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(data) + return state.err + } + + o.buf = append(o.buf, p.tagcode...) + return o.enc_len_struct(p.sprop, structp, &state) +} + +func size_struct_message(p *Properties, base structPointer) int { + structp := structPointer_GetStructPointer(base, p.field) + if structPointer_IsNil(structp) { + return 0 + } + + // Can the object marshal itself? + if p.isMarshaler { + m := structPointer_Interface(structp, p.stype).(Marshaler) + data, _ := m.Marshal() + n0 := len(p.tagcode) + n1 := sizeRawBytes(data) + return n0 + n1 + } + + n0 := len(p.tagcode) + n1 := size_struct(p.sprop, structp) + n2 := sizeVarint(uint64(n1)) // size of encoded length + return n0 + n1 + n2 +} + +// Encode a group struct. +func (o *Buffer) enc_struct_group(p *Properties, base structPointer) error { + var state errorState + b := structPointer_GetStructPointer(base, p.field) + if structPointer_IsNil(b) { + return ErrNil + } + + o.EncodeVarint(uint64((p.Tag << 3) | WireStartGroup)) + err := o.enc_struct(p.sprop, b) + if err != nil && !state.shouldContinue(err, nil) { + return err + } + o.EncodeVarint(uint64((p.Tag << 3) | WireEndGroup)) + return state.err +} + +func size_struct_group(p *Properties, base structPointer) (n int) { + b := structPointer_GetStructPointer(base, p.field) + if structPointer_IsNil(b) { + return 0 + } + + n += sizeVarint(uint64((p.Tag << 3) | WireStartGroup)) + n += size_struct(p.sprop, b) + n += sizeVarint(uint64((p.Tag << 3) | WireEndGroup)) + return +} + +// Encode a slice of bools ([]bool). +func (o *Buffer) enc_slice_bool(p *Properties, base structPointer) error { + s := *structPointer_BoolSlice(base, p.field) + l := len(s) + if l == 0 { + return ErrNil + } + for _, x := range s { + o.buf = append(o.buf, p.tagcode...) + v := uint64(0) + if x { + v = 1 + } + p.valEnc(o, v) + } + return nil +} + +func size_slice_bool(p *Properties, base structPointer) int { + s := *structPointer_BoolSlice(base, p.field) + l := len(s) + if l == 0 { + return 0 + } + return l * (len(p.tagcode) + 1) // each bool takes exactly one byte +} + +// Encode a slice of bools ([]bool) in packed format. +func (o *Buffer) enc_slice_packed_bool(p *Properties, base structPointer) error { + s := *structPointer_BoolSlice(base, p.field) + l := len(s) + if l == 0 { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeVarint(uint64(l)) // each bool takes exactly one byte + for _, x := range s { + v := uint64(0) + if x { + v = 1 + } + p.valEnc(o, v) + } + return nil +} + +func size_slice_packed_bool(p *Properties, base structPointer) (n int) { + s := *structPointer_BoolSlice(base, p.field) + l := len(s) + if l == 0 { + return 0 + } + n += len(p.tagcode) + n += sizeVarint(uint64(l)) + n += l // each bool takes exactly one byte + return +} + +// Encode a slice of bytes ([]byte). +func (o *Buffer) enc_slice_byte(p *Properties, base structPointer) error { + s := *structPointer_Bytes(base, p.field) + if s == nil { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(s) + return nil +} + +func (o *Buffer) enc_proto3_slice_byte(p *Properties, base structPointer) error { + s := *structPointer_Bytes(base, p.field) + if len(s) == 0 { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(s) + return nil +} + +func size_slice_byte(p *Properties, base structPointer) (n int) { + s := *structPointer_Bytes(base, p.field) + if s == nil && !p.oneof { + return 0 + } + n += len(p.tagcode) + n += sizeRawBytes(s) + return +} + +func size_proto3_slice_byte(p *Properties, base structPointer) (n int) { + s := *structPointer_Bytes(base, p.field) + if len(s) == 0 && !p.oneof { + return 0 + } + n += len(p.tagcode) + n += sizeRawBytes(s) + return +} + +// Encode a slice of int32s ([]int32). +func (o *Buffer) enc_slice_int32(p *Properties, base structPointer) error { + s := structPointer_Word32Slice(base, p.field) + l := s.Len() + if l == 0 { + return ErrNil + } + for i := 0; i < l; i++ { + o.buf = append(o.buf, p.tagcode...) + x := int32(s.Index(i)) // permit sign extension to use full 64-bit range + p.valEnc(o, uint64(x)) + } + return nil +} + +func size_slice_int32(p *Properties, base structPointer) (n int) { + s := structPointer_Word32Slice(base, p.field) + l := s.Len() + if l == 0 { + return 0 + } + for i := 0; i < l; i++ { + n += len(p.tagcode) + x := int32(s.Index(i)) // permit sign extension to use full 64-bit range + n += p.valSize(uint64(x)) + } + return +} + +// Encode a slice of int32s ([]int32) in packed format. +func (o *Buffer) enc_slice_packed_int32(p *Properties, base structPointer) error { + s := structPointer_Word32Slice(base, p.field) + l := s.Len() + if l == 0 { + return ErrNil + } + // TODO: Reuse a Buffer. + buf := NewBuffer(nil) + for i := 0; i < l; i++ { + x := int32(s.Index(i)) // permit sign extension to use full 64-bit range + p.valEnc(buf, uint64(x)) + } + + o.buf = append(o.buf, p.tagcode...) + o.EncodeVarint(uint64(len(buf.buf))) + o.buf = append(o.buf, buf.buf...) + return nil +} + +func size_slice_packed_int32(p *Properties, base structPointer) (n int) { + s := structPointer_Word32Slice(base, p.field) + l := s.Len() + if l == 0 { + return 0 + } + var bufSize int + for i := 0; i < l; i++ { + x := int32(s.Index(i)) // permit sign extension to use full 64-bit range + bufSize += p.valSize(uint64(x)) + } + + n += len(p.tagcode) + n += sizeVarint(uint64(bufSize)) + n += bufSize + return +} + +// Encode a slice of uint32s ([]uint32). +// Exactly the same as int32, except for no sign extension. +func (o *Buffer) enc_slice_uint32(p *Properties, base structPointer) error { + s := structPointer_Word32Slice(base, p.field) + l := s.Len() + if l == 0 { + return ErrNil + } + for i := 0; i < l; i++ { + o.buf = append(o.buf, p.tagcode...) + x := s.Index(i) + p.valEnc(o, uint64(x)) + } + return nil +} + +func size_slice_uint32(p *Properties, base structPointer) (n int) { + s := structPointer_Word32Slice(base, p.field) + l := s.Len() + if l == 0 { + return 0 + } + for i := 0; i < l; i++ { + n += len(p.tagcode) + x := s.Index(i) + n += p.valSize(uint64(x)) + } + return +} + +// Encode a slice of uint32s ([]uint32) in packed format. +// Exactly the same as int32, except for no sign extension. +func (o *Buffer) enc_slice_packed_uint32(p *Properties, base structPointer) error { + s := structPointer_Word32Slice(base, p.field) + l := s.Len() + if l == 0 { + return ErrNil + } + // TODO: Reuse a Buffer. + buf := NewBuffer(nil) + for i := 0; i < l; i++ { + p.valEnc(buf, uint64(s.Index(i))) + } + + o.buf = append(o.buf, p.tagcode...) + o.EncodeVarint(uint64(len(buf.buf))) + o.buf = append(o.buf, buf.buf...) + return nil +} + +func size_slice_packed_uint32(p *Properties, base structPointer) (n int) { + s := structPointer_Word32Slice(base, p.field) + l := s.Len() + if l == 0 { + return 0 + } + var bufSize int + for i := 0; i < l; i++ { + bufSize += p.valSize(uint64(s.Index(i))) + } + + n += len(p.tagcode) + n += sizeVarint(uint64(bufSize)) + n += bufSize + return +} + +// Encode a slice of int64s ([]int64). +func (o *Buffer) enc_slice_int64(p *Properties, base structPointer) error { + s := structPointer_Word64Slice(base, p.field) + l := s.Len() + if l == 0 { + return ErrNil + } + for i := 0; i < l; i++ { + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, s.Index(i)) + } + return nil +} + +func size_slice_int64(p *Properties, base structPointer) (n int) { + s := structPointer_Word64Slice(base, p.field) + l := s.Len() + if l == 0 { + return 0 + } + for i := 0; i < l; i++ { + n += len(p.tagcode) + n += p.valSize(s.Index(i)) + } + return +} + +// Encode a slice of int64s ([]int64) in packed format. +func (o *Buffer) enc_slice_packed_int64(p *Properties, base structPointer) error { + s := structPointer_Word64Slice(base, p.field) + l := s.Len() + if l == 0 { + return ErrNil + } + // TODO: Reuse a Buffer. + buf := NewBuffer(nil) + for i := 0; i < l; i++ { + p.valEnc(buf, s.Index(i)) + } + + o.buf = append(o.buf, p.tagcode...) + o.EncodeVarint(uint64(len(buf.buf))) + o.buf = append(o.buf, buf.buf...) + return nil +} + +func size_slice_packed_int64(p *Properties, base structPointer) (n int) { + s := structPointer_Word64Slice(base, p.field) + l := s.Len() + if l == 0 { + return 0 + } + var bufSize int + for i := 0; i < l; i++ { + bufSize += p.valSize(s.Index(i)) + } + + n += len(p.tagcode) + n += sizeVarint(uint64(bufSize)) + n += bufSize + return +} + +// Encode a slice of slice of bytes ([][]byte). +func (o *Buffer) enc_slice_slice_byte(p *Properties, base structPointer) error { + ss := *structPointer_BytesSlice(base, p.field) + l := len(ss) + if l == 0 { + return ErrNil + } + for i := 0; i < l; i++ { + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(ss[i]) + } + return nil +} + +func size_slice_slice_byte(p *Properties, base structPointer) (n int) { + ss := *structPointer_BytesSlice(base, p.field) + l := len(ss) + if l == 0 { + return 0 + } + n += l * len(p.tagcode) + for i := 0; i < l; i++ { + n += sizeRawBytes(ss[i]) + } + return +} + +// Encode a slice of strings ([]string). +func (o *Buffer) enc_slice_string(p *Properties, base structPointer) error { + ss := *structPointer_StringSlice(base, p.field) + l := len(ss) + for i := 0; i < l; i++ { + o.buf = append(o.buf, p.tagcode...) + o.EncodeStringBytes(ss[i]) + } + return nil +} + +func size_slice_string(p *Properties, base structPointer) (n int) { + ss := *structPointer_StringSlice(base, p.field) + l := len(ss) + n += l * len(p.tagcode) + for i := 0; i < l; i++ { + n += sizeStringBytes(ss[i]) + } + return +} + +// Encode a slice of message structs ([]*struct). +func (o *Buffer) enc_slice_struct_message(p *Properties, base structPointer) error { + var state errorState + s := structPointer_StructPointerSlice(base, p.field) + l := s.Len() + + for i := 0; i < l; i++ { + structp := s.Index(i) + if structPointer_IsNil(structp) { + return errRepeatedHasNil + } + + // Can the object marshal itself? + if p.isMarshaler { + m := structPointer_Interface(structp, p.stype).(Marshaler) + data, err := m.Marshal() + if err != nil && !state.shouldContinue(err, nil) { + return err + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(data) + continue + } + + o.buf = append(o.buf, p.tagcode...) + err := o.enc_len_struct(p.sprop, structp, &state) + if err != nil && !state.shouldContinue(err, nil) { + if err == ErrNil { + return errRepeatedHasNil + } + return err + } + } + return state.err +} + +func size_slice_struct_message(p *Properties, base structPointer) (n int) { + s := structPointer_StructPointerSlice(base, p.field) + l := s.Len() + n += l * len(p.tagcode) + for i := 0; i < l; i++ { + structp := s.Index(i) + if structPointer_IsNil(structp) { + return // return the size up to this point + } + + // Can the object marshal itself? + if p.isMarshaler { + m := structPointer_Interface(structp, p.stype).(Marshaler) + data, _ := m.Marshal() + n += len(p.tagcode) + n += sizeRawBytes(data) + continue + } + + n0 := size_struct(p.sprop, structp) + n1 := sizeVarint(uint64(n0)) // size of encoded length + n += n0 + n1 + } + return +} + +// Encode a slice of group structs ([]*struct). +func (o *Buffer) enc_slice_struct_group(p *Properties, base structPointer) error { + var state errorState + s := structPointer_StructPointerSlice(base, p.field) + l := s.Len() + + for i := 0; i < l; i++ { + b := s.Index(i) + if structPointer_IsNil(b) { + return errRepeatedHasNil + } + + o.EncodeVarint(uint64((p.Tag << 3) | WireStartGroup)) + + err := o.enc_struct(p.sprop, b) + + if err != nil && !state.shouldContinue(err, nil) { + if err == ErrNil { + return errRepeatedHasNil + } + return err + } + + o.EncodeVarint(uint64((p.Tag << 3) | WireEndGroup)) + } + return state.err +} + +func size_slice_struct_group(p *Properties, base structPointer) (n int) { + s := structPointer_StructPointerSlice(base, p.field) + l := s.Len() + + n += l * sizeVarint(uint64((p.Tag<<3)|WireStartGroup)) + n += l * sizeVarint(uint64((p.Tag<<3)|WireEndGroup)) + for i := 0; i < l; i++ { + b := s.Index(i) + if structPointer_IsNil(b) { + return // return size up to this point + } + + n += size_struct(p.sprop, b) + } + return +} + +// Encode an extension map. +func (o *Buffer) enc_map(p *Properties, base structPointer) error { + exts := structPointer_ExtMap(base, p.field) + if err := encodeExtensionsMap(*exts); err != nil { + return err + } + + return o.enc_map_body(*exts) +} + +func (o *Buffer) enc_exts(p *Properties, base structPointer) error { + exts := structPointer_Extensions(base, p.field) + if err := encodeExtensions(exts); err != nil { + return err + } + v, _ := exts.extensionsRead() + + return o.enc_map_body(v) +} + +func (o *Buffer) enc_map_body(v map[int32]Extension) error { + // Fast-path for common cases: zero or one extensions. + if len(v) <= 1 { + for _, e := range v { + o.buf = append(o.buf, e.enc...) + } + return nil + } + + // Sort keys to provide a deterministic encoding. + keys := make([]int, 0, len(v)) + for k := range v { + keys = append(keys, int(k)) + } + sort.Ints(keys) + + for _, k := range keys { + o.buf = append(o.buf, v[int32(k)].enc...) + } + return nil +} + +func size_map(p *Properties, base structPointer) int { + v := structPointer_ExtMap(base, p.field) + return extensionsMapSize(*v) +} + +func size_exts(p *Properties, base structPointer) int { + v := structPointer_Extensions(base, p.field) + return extensionsSize(v) +} + +// Encode a map field. +func (o *Buffer) enc_new_map(p *Properties, base structPointer) error { + var state errorState // XXX: or do we need to plumb this through? + + /* + A map defined as + map map_field = N; + is encoded in the same way as + message MapFieldEntry { + key_type key = 1; + value_type value = 2; + } + repeated MapFieldEntry map_field = N; + */ + + v := structPointer_NewAt(base, p.field, p.mtype).Elem() // map[K]V + if v.Len() == 0 { + return nil + } + + keycopy, valcopy, keybase, valbase := mapEncodeScratch(p.mtype) + + enc := func() error { + if err := p.mkeyprop.enc(o, p.mkeyprop, keybase); err != nil { + return err + } + if err := p.mvalprop.enc(o, p.mvalprop, valbase); err != nil && err != ErrNil { + return err + } + return nil + } + + // Don't sort map keys. It is not required by the spec, and C++ doesn't do it. + for _, key := range v.MapKeys() { + val := v.MapIndex(key) + + keycopy.Set(key) + valcopy.Set(val) + + o.buf = append(o.buf, p.tagcode...) + if err := o.enc_len_thing(enc, &state); err != nil { + return err + } + } + return nil +} + +func size_new_map(p *Properties, base structPointer) int { + v := structPointer_NewAt(base, p.field, p.mtype).Elem() // map[K]V + + keycopy, valcopy, keybase, valbase := mapEncodeScratch(p.mtype) + + n := 0 + for _, key := range v.MapKeys() { + val := v.MapIndex(key) + keycopy.Set(key) + valcopy.Set(val) + + // Tag codes for key and val are the responsibility of the sub-sizer. + keysize := p.mkeyprop.size(p.mkeyprop, keybase) + valsize := p.mvalprop.size(p.mvalprop, valbase) + entry := keysize + valsize + // Add on tag code and length of map entry itself. + n += len(p.tagcode) + sizeVarint(uint64(entry)) + entry + } + return n +} + +// mapEncodeScratch returns a new reflect.Value matching the map's value type, +// and a structPointer suitable for passing to an encoder or sizer. +func mapEncodeScratch(mapType reflect.Type) (keycopy, valcopy reflect.Value, keybase, valbase structPointer) { + // Prepare addressable doubly-indirect placeholders for the key and value types. + // This is needed because the element-type encoders expect **T, but the map iteration produces T. + + keycopy = reflect.New(mapType.Key()).Elem() // addressable K + keyptr := reflect.New(reflect.PtrTo(keycopy.Type())).Elem() // addressable *K + keyptr.Set(keycopy.Addr()) // + keybase = toStructPointer(keyptr.Addr()) // **K + + // Value types are more varied and require special handling. + switch mapType.Elem().Kind() { + case reflect.Slice: + // []byte + var dummy []byte + valcopy = reflect.ValueOf(&dummy).Elem() // addressable []byte + valbase = toStructPointer(valcopy.Addr()) + case reflect.Ptr: + // message; the generated field type is map[K]*Msg (so V is *Msg), + // so we only need one level of indirection. + valcopy = reflect.New(mapType.Elem()).Elem() // addressable V + valbase = toStructPointer(valcopy.Addr()) + default: + // everything else + valcopy = reflect.New(mapType.Elem()).Elem() // addressable V + valptr := reflect.New(reflect.PtrTo(valcopy.Type())).Elem() // addressable *V + valptr.Set(valcopy.Addr()) // + valbase = toStructPointer(valptr.Addr()) // **V + } + return +} + +// Encode a struct. +func (o *Buffer) enc_struct(prop *StructProperties, base structPointer) error { + var state errorState + // Encode fields in tag order so that decoders may use optimizations + // that depend on the ordering. + // https://developers.google.com/protocol-buffers/docs/encoding#order + for _, i := range prop.order { + p := prop.Prop[i] + if p.enc != nil { + err := p.enc(o, p, base) + if err != nil { + if err == ErrNil { + if p.Required && state.err == nil { + state.err = &RequiredNotSetError{p.Name} + } + } else if err == errRepeatedHasNil { + // Give more context to nil values in repeated fields. + return errors.New("repeated field " + p.OrigName + " has nil element") + } else if !state.shouldContinue(err, p) { + return err + } + } + if len(o.buf) > maxMarshalSize { + return ErrTooLarge + } + } + } + + // Do oneof fields. + if prop.oneofMarshaler != nil { + m := structPointer_Interface(base, prop.stype).(Message) + if err := prop.oneofMarshaler(m, o); err == ErrNil { + return errOneofHasNil + } else if err != nil { + return err + } + } + + // Add unrecognized fields at the end. + if prop.unrecField.IsValid() { + v := *structPointer_Bytes(base, prop.unrecField) + if len(o.buf)+len(v) > maxMarshalSize { + return ErrTooLarge + } + if len(v) > 0 { + o.buf = append(o.buf, v...) + } + } + + return state.err +} + +func size_struct(prop *StructProperties, base structPointer) (n int) { + for _, i := range prop.order { + p := prop.Prop[i] + if p.size != nil { + n += p.size(p, base) + } + } + + // Add unrecognized fields at the end. + if prop.unrecField.IsValid() { + v := *structPointer_Bytes(base, prop.unrecField) + n += len(v) + } + + // Factor in any oneof fields. + if prop.oneofSizer != nil { + m := structPointer_Interface(base, prop.stype).(Message) + n += prop.oneofSizer(m) + } + + return +} + +var zeroes [20]byte // longer than any conceivable sizeVarint + +// Encode a struct, preceded by its encoded length (as a varint). +func (o *Buffer) enc_len_struct(prop *StructProperties, base structPointer, state *errorState) error { + return o.enc_len_thing(func() error { return o.enc_struct(prop, base) }, state) +} + +// Encode something, preceded by its encoded length (as a varint). +func (o *Buffer) enc_len_thing(enc func() error, state *errorState) error { + iLen := len(o.buf) + o.buf = append(o.buf, 0, 0, 0, 0) // reserve four bytes for length + iMsg := len(o.buf) + err := enc() + if err != nil && !state.shouldContinue(err, nil) { + return err + } + lMsg := len(o.buf) - iMsg + lLen := sizeVarint(uint64(lMsg)) + switch x := lLen - (iMsg - iLen); { + case x > 0: // actual length is x bytes larger than the space we reserved + // Move msg x bytes right. + o.buf = append(o.buf, zeroes[:x]...) + copy(o.buf[iMsg+x:], o.buf[iMsg:iMsg+lMsg]) + case x < 0: // actual length is x bytes smaller than the space we reserved + // Move msg x bytes left. + copy(o.buf[iMsg+x:], o.buf[iMsg:iMsg+lMsg]) + o.buf = o.buf[:len(o.buf)+x] // x is negative + } + // Encode the length in the reserved space. + o.buf = o.buf[:iLen] + o.EncodeVarint(uint64(lMsg)) + o.buf = o.buf[:len(o.buf)+lMsg] + return state.err +} + +// errorState maintains the first error that occurs and updates that error +// with additional context. +type errorState struct { + err error +} + +// shouldContinue reports whether encoding should continue upon encountering the +// given error. If the error is RequiredNotSetError, shouldContinue returns true +// and, if this is the first appearance of that error, remembers it for future +// reporting. +// +// If prop is not nil, it may update any error with additional context about the +// field with the error. +func (s *errorState) shouldContinue(err error, prop *Properties) bool { + // Ignore unset required fields. + reqNotSet, ok := err.(*RequiredNotSetError) + if !ok { + return false + } + if s.err == nil { + if prop != nil { + err = &RequiredNotSetError{prop.Name + "." + reqNotSet.field} + } + s.err = err + } + return true +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/equal.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/equal.go new file mode 100644 index 0000000000000..8b16f951c7127 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/equal.go @@ -0,0 +1,296 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2011 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +// Protocol buffer comparison. + +package proto + +import ( + "bytes" + "log" + "reflect" + "strings" +) + +/* +Equal returns true iff protocol buffers a and b are equal. +The arguments must both be pointers to protocol buffer structs. + +Equality is defined in this way: + - Two messages are equal iff they are the same type, + corresponding fields are equal, unknown field sets + are equal, and extensions sets are equal. + - Two set scalar fields are equal iff their values are equal. + If the fields are of a floating-point type, remember that + NaN != x for all x, including NaN. If the message is defined + in a proto3 .proto file, fields are not "set"; specifically, + zero length proto3 "bytes" fields are equal (nil == {}). + - Two repeated fields are equal iff their lengths are the same, + and their corresponding elements are equal (a "bytes" field, + although represented by []byte, is not a repeated field) + - Two unset fields are equal. + - Two unknown field sets are equal if their current + encoded state is equal. + - Two extension sets are equal iff they have corresponding + elements that are pairwise equal. + - Every other combination of things are not equal. + +The return value is undefined if a and b are not protocol buffers. +*/ +func Equal(a, b Message) bool { + if a == nil || b == nil { + return a == b + } + v1, v2 := reflect.ValueOf(a), reflect.ValueOf(b) + if v1.Type() != v2.Type() { + return false + } + if v1.Kind() == reflect.Ptr { + if v1.IsNil() { + return v2.IsNil() + } + if v2.IsNil() { + return false + } + v1, v2 = v1.Elem(), v2.Elem() + } + if v1.Kind() != reflect.Struct { + return false + } + return equalStruct(v1, v2) +} + +// v1 and v2 are known to have the same type. +func equalStruct(v1, v2 reflect.Value) bool { + sprop := GetProperties(v1.Type()) + for i := 0; i < v1.NumField(); i++ { + f := v1.Type().Field(i) + if strings.HasPrefix(f.Name, "XXX_") { + continue + } + f1, f2 := v1.Field(i), v2.Field(i) + if f.Type.Kind() == reflect.Ptr { + if n1, n2 := f1.IsNil(), f2.IsNil(); n1 && n2 { + // both unset + continue + } else if n1 != n2 { + // set/unset mismatch + return false + } + b1, ok := f1.Interface().(raw) + if ok { + b2 := f2.Interface().(raw) + // RawMessage + if !bytes.Equal(b1.Bytes(), b2.Bytes()) { + return false + } + continue + } + f1, f2 = f1.Elem(), f2.Elem() + } + if !equalAny(f1, f2, sprop.Prop[i]) { + return false + } + } + + if em1 := v1.FieldByName("XXX_InternalExtensions"); em1.IsValid() { + em2 := v2.FieldByName("XXX_InternalExtensions") + if !equalExtensions(v1.Type(), em1.Interface().(XXX_InternalExtensions), em2.Interface().(XXX_InternalExtensions)) { + return false + } + } + + if em1 := v1.FieldByName("XXX_extensions"); em1.IsValid() { + em2 := v2.FieldByName("XXX_extensions") + if !equalExtMap(v1.Type(), em1.Interface().(map[int32]Extension), em2.Interface().(map[int32]Extension)) { + return false + } + } + + uf := v1.FieldByName("XXX_unrecognized") + if !uf.IsValid() { + return true + } + + u1 := uf.Bytes() + u2 := v2.FieldByName("XXX_unrecognized").Bytes() + if !bytes.Equal(u1, u2) { + return false + } + + return true +} + +// v1 and v2 are known to have the same type. +// prop may be nil. +func equalAny(v1, v2 reflect.Value, prop *Properties) bool { + if v1.Type() == protoMessageType { + m1, _ := v1.Interface().(Message) + m2, _ := v2.Interface().(Message) + return Equal(m1, m2) + } + switch v1.Kind() { + case reflect.Bool: + return v1.Bool() == v2.Bool() + case reflect.Float32, reflect.Float64: + return v1.Float() == v2.Float() + case reflect.Int32, reflect.Int64: + return v1.Int() == v2.Int() + case reflect.Interface: + // Probably a oneof field; compare the inner values. + n1, n2 := v1.IsNil(), v2.IsNil() + if n1 || n2 { + return n1 == n2 + } + e1, e2 := v1.Elem(), v2.Elem() + if e1.Type() != e2.Type() { + return false + } + return equalAny(e1, e2, nil) + case reflect.Map: + if v1.Len() != v2.Len() { + return false + } + for _, key := range v1.MapKeys() { + val2 := v2.MapIndex(key) + if !val2.IsValid() { + // This key was not found in the second map. + return false + } + if !equalAny(v1.MapIndex(key), val2, nil) { + return false + } + } + return true + case reflect.Ptr: + // Maps may have nil values in them, so check for nil. + if v1.IsNil() && v2.IsNil() { + return true + } + if v1.IsNil() != v2.IsNil() { + return false + } + return equalAny(v1.Elem(), v2.Elem(), prop) + case reflect.Slice: + if v1.Type().Elem().Kind() == reflect.Uint8 { + // short circuit: []byte + + // Edge case: if this is in a proto3 message, a zero length + // bytes field is considered the zero value. + if prop != nil && prop.proto3 && v1.Len() == 0 && v2.Len() == 0 { + return true + } + if v1.IsNil() != v2.IsNil() { + return false + } + return bytes.Equal(v1.Interface().([]byte), v2.Interface().([]byte)) + } + + if v1.Len() != v2.Len() { + return false + } + for i := 0; i < v1.Len(); i++ { + if !equalAny(v1.Index(i), v2.Index(i), prop) { + return false + } + } + return true + case reflect.String: + return v1.Interface().(string) == v2.Interface().(string) + case reflect.Struct: + return equalStruct(v1, v2) + case reflect.Uint32, reflect.Uint64: + return v1.Uint() == v2.Uint() + } + + // unknown type, so not a protocol buffer + log.Printf("proto: don't know how to compare %v", v1) + return false +} + +// base is the struct type that the extensions are based on. +// x1 and x2 are InternalExtensions. +func equalExtensions(base reflect.Type, x1, x2 XXX_InternalExtensions) bool { + em1, _ := x1.extensionsRead() + em2, _ := x2.extensionsRead() + return equalExtMap(base, em1, em2) +} + +func equalExtMap(base reflect.Type, em1, em2 map[int32]Extension) bool { + if len(em1) != len(em2) { + return false + } + + for extNum, e1 := range em1 { + e2, ok := em2[extNum] + if !ok { + return false + } + + m1, m2 := e1.value, e2.value + + if m1 != nil && m2 != nil { + // Both are unencoded. + if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2), nil) { + return false + } + continue + } + + // At least one is encoded. To do a semantically correct comparison + // we need to unmarshal them first. + var desc *ExtensionDesc + if m := extensionMaps[base]; m != nil { + desc = m[extNum] + } + if desc == nil { + log.Printf("proto: don't know how to compare extension %d of %v", extNum, base) + continue + } + var err error + if m1 == nil { + m1, err = decodeExtension(e1.enc, desc) + } + if m2 == nil && err == nil { + m2, err = decodeExtension(e2.enc, desc) + } + if err != nil { + // The encoded form is invalid. + log.Printf("proto: badly encoded extension %d of %v: %v", extNum, base, err) + return false + } + if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2), nil) { + return false + } + } + + return true +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/extensions.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/extensions.go new file mode 100644 index 0000000000000..9f484f53a3ae8 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/extensions.go @@ -0,0 +1,555 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto + +/* + * Types and routines for supporting protocol buffer extensions. + */ + +import ( + "errors" + "fmt" + "reflect" + "strconv" + "sync" +) + +// ErrMissingExtension is the error returned by GetExtension if the named extension is not in the message. +var ErrMissingExtension = errors.New("proto: missing extension") + +// ExtensionRange represents a range of message extensions for a protocol buffer. +// Used in code generated by the protocol compiler. +type ExtensionRange struct { + Start, End int32 // both inclusive +} + +// extendableProto is an interface implemented by any protocol buffer generated by the current +// proto compiler that may be extended. +type extendableProto interface { + Message + ExtensionRangeArray() []ExtensionRange + extensionsWrite() map[int32]Extension + extensionsRead() (map[int32]Extension, sync.Locker) +} + +// extendableProtoV1 is an interface implemented by a protocol buffer generated by the previous +// version of the proto compiler that may be extended. +type extendableProtoV1 interface { + Message + ExtensionRangeArray() []ExtensionRange + ExtensionMap() map[int32]Extension +} + +// extensionAdapter is a wrapper around extendableProtoV1 that implements extendableProto. +type extensionAdapter struct { + extendableProtoV1 +} + +func (e extensionAdapter) extensionsWrite() map[int32]Extension { + return e.ExtensionMap() +} + +func (e extensionAdapter) extensionsRead() (map[int32]Extension, sync.Locker) { + return e.ExtensionMap(), notLocker{} +} + +// notLocker is a sync.Locker whose Lock and Unlock methods are nops. +type notLocker struct{} + +func (n notLocker) Lock() {} +func (n notLocker) Unlock() {} + +// extendable returns the extendableProto interface for the given generated proto message. +// If the proto message has the old extension format, it returns a wrapper that implements +// the extendableProto interface. +func extendable(p interface{}) (extendableProto, bool) { + if ep, ok := p.(extendableProto); ok { + return ep, ok + } + if ep, ok := p.(extendableProtoV1); ok { + return extensionAdapter{ep}, ok + } + return nil, false +} + +// XXX_InternalExtensions is an internal representation of proto extensions. +// +// Each generated message struct type embeds an anonymous XXX_InternalExtensions field, +// thus gaining the unexported 'extensions' method, which can be called only from the proto package. +// +// The methods of XXX_InternalExtensions are not concurrency safe in general, +// but calls to logically read-only methods such as has and get may be executed concurrently. +type XXX_InternalExtensions struct { + // The struct must be indirect so that if a user inadvertently copies a + // generated message and its embedded XXX_InternalExtensions, they + // avoid the mayhem of a copied mutex. + // + // The mutex serializes all logically read-only operations to p.extensionMap. + // It is up to the client to ensure that write operations to p.extensionMap are + // mutually exclusive with other accesses. + p *struct { + mu sync.Mutex + extensionMap map[int32]Extension + } +} + +// extensionsWrite returns the extension map, creating it on first use. +func (e *XXX_InternalExtensions) extensionsWrite() map[int32]Extension { + if e.p == nil { + e.p = new(struct { + mu sync.Mutex + extensionMap map[int32]Extension + }) + e.p.extensionMap = make(map[int32]Extension) + } + return e.p.extensionMap +} + +// extensionsRead returns the extensions map for read-only use. It may be nil. +// The caller must hold the returned mutex's lock when accessing Elements within the map. +func (e *XXX_InternalExtensions) extensionsRead() (map[int32]Extension, sync.Locker) { + if e.p == nil { + return nil, nil + } + return e.p.extensionMap, &e.p.mu +} + +var extendableProtoType = reflect.TypeOf((*extendableProto)(nil)).Elem() +var extendableProtoV1Type = reflect.TypeOf((*extendableProtoV1)(nil)).Elem() + +// ExtensionDesc represents an extension specification. +// Used in generated code from the protocol compiler. +type ExtensionDesc struct { + ExtendedType Message // nil pointer to the type that is being extended + ExtensionType interface{} // nil pointer to the extension type + Field int32 // field number + Name string // fully-qualified name of extension, for text formatting + Tag string // protobuf tag style +} + +func (ed *ExtensionDesc) repeated() bool { + t := reflect.TypeOf(ed.ExtensionType) + return t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 +} + +// Extension represents an extension in a message. +type Extension struct { + // When an extension is stored in a message using SetExtension + // only desc and value are set. When the message is marshaled + // enc will be set to the encoded form of the message. + // + // When a message is unmarshaled and contains extensions, each + // extension will have only enc set. When such an extension is + // accessed using GetExtension (or GetExtensions) desc and value + // will be set. + desc *ExtensionDesc + value interface{} + enc []byte +} + +// SetRawExtension is for testing only. +func SetRawExtension(base Message, id int32, b []byte) { + epb, ok := extendable(base) + if !ok { + return + } + extmap := epb.extensionsWrite() + extmap[id] = Extension{enc: b} +} + +// isExtensionField returns true iff the given field number is in an extension range. +func isExtensionField(pb extendableProto, field int32) bool { + for _, er := range pb.ExtensionRangeArray() { + if er.Start <= field && field <= er.End { + return true + } + } + return false +} + +// checkExtensionTypes checks that the given extension is valid for pb. +func checkExtensionTypes(pb extendableProto, extension *ExtensionDesc) error { + var pbi interface{} = pb + // Check the extended type. + if ea, ok := pbi.(extensionAdapter); ok { + pbi = ea.extendableProtoV1 + } + if a, b := reflect.TypeOf(pbi), reflect.TypeOf(extension.ExtendedType); a != b { + return errors.New("proto: bad extended type; " + b.String() + " does not extend " + a.String()) + } + // Check the range. + if !isExtensionField(pb, extension.Field) { + return errors.New("proto: bad extension number; not in declared ranges") + } + return nil +} + +// extPropKey is sufficient to uniquely identify an extension. +type extPropKey struct { + base reflect.Type + field int32 +} + +var extProp = struct { + sync.RWMutex + m map[extPropKey]*Properties +}{ + m: make(map[extPropKey]*Properties), +} + +func extensionProperties(ed *ExtensionDesc) *Properties { + key := extPropKey{base: reflect.TypeOf(ed.ExtendedType), field: ed.Field} + + extProp.RLock() + if prop, ok := extProp.m[key]; ok { + extProp.RUnlock() + return prop + } + extProp.RUnlock() + + extProp.Lock() + defer extProp.Unlock() + // Check again. + if prop, ok := extProp.m[key]; ok { + return prop + } + + prop := new(Properties) + prop.Init(reflect.TypeOf(ed.ExtensionType), "unknown_name", ed.Tag, nil) + extProp.m[key] = prop + return prop +} + +// encode encodes any unmarshaled (unencoded) extensions in e. +func encodeExtensions(e *XXX_InternalExtensions) error { + m, mu := e.extensionsRead() + if m == nil { + return nil // fast path + } + mu.Lock() + defer mu.Unlock() + return encodeExtensionsMap(m) +} + +// encode encodes any unmarshaled (unencoded) extensions in e. +func encodeExtensionsMap(m map[int32]Extension) error { + for k, e := range m { + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + et := reflect.TypeOf(e.desc.ExtensionType) + props := extensionProperties(e.desc) + + p := NewBuffer(nil) + // If e.value has type T, the encoder expects a *struct{ X T }. + // Pass a *T with a zero field and hope it all works out. + x := reflect.New(et) + x.Elem().Set(reflect.ValueOf(e.value)) + if err := props.enc(p, props, toStructPointer(x)); err != nil { + return err + } + e.enc = p.buf + m[k] = e + } + return nil +} + +func extensionsSize(e *XXX_InternalExtensions) (n int) { + m, mu := e.extensionsRead() + if m == nil { + return 0 + } + mu.Lock() + defer mu.Unlock() + return extensionsMapSize(m) +} + +func extensionsMapSize(m map[int32]Extension) (n int) { + for _, e := range m { + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + n += len(e.enc) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + et := reflect.TypeOf(e.desc.ExtensionType) + props := extensionProperties(e.desc) + + // If e.value has type T, the encoder expects a *struct{ X T }. + // Pass a *T with a zero field and hope it all works out. + x := reflect.New(et) + x.Elem().Set(reflect.ValueOf(e.value)) + n += props.size(props, toStructPointer(x)) + } + return +} + +// HasExtension returns whether the given extension is present in pb. +func HasExtension(pb Message, extension *ExtensionDesc) bool { + // TODO: Check types, field numbers, etc.? + epb, ok := extendable(pb) + if !ok { + return false + } + extmap, mu := epb.extensionsRead() + if extmap == nil { + return false + } + mu.Lock() + _, ok = extmap[extension.Field] + mu.Unlock() + return ok +} + +// ClearExtension removes the given extension from pb. +func ClearExtension(pb Message, extension *ExtensionDesc) { + epb, ok := extendable(pb) + if !ok { + return + } + // TODO: Check types, field numbers, etc.? + extmap := epb.extensionsWrite() + delete(extmap, extension.Field) +} + +// GetExtension parses and returns the given extension of pb. +// If the extension is not present and has no default value it returns ErrMissingExtension. +func GetExtension(pb Message, extension *ExtensionDesc) (interface{}, error) { + epb, ok := extendable(pb) + if !ok { + return nil, errors.New("proto: not an extendable proto") + } + + if err := checkExtensionTypes(epb, extension); err != nil { + return nil, err + } + + emap, mu := epb.extensionsRead() + if emap == nil { + return defaultExtensionValue(extension) + } + mu.Lock() + defer mu.Unlock() + e, ok := emap[extension.Field] + if !ok { + // defaultExtensionValue returns the default value or + // ErrMissingExtension if there is no default. + return defaultExtensionValue(extension) + } + + if e.value != nil { + // Already decoded. Check the descriptor, though. + if e.desc != extension { + // This shouldn't happen. If it does, it means that + // GetExtension was called twice with two different + // descriptors with the same field number. + return nil, errors.New("proto: descriptor conflict") + } + return e.value, nil + } + + v, err := decodeExtension(e.enc, extension) + if err != nil { + return nil, err + } + + // Remember the decoded version and drop the encoded version. + // That way it is safe to mutate what we return. + e.value = v + e.desc = extension + e.enc = nil + emap[extension.Field] = e + return e.value, nil +} + +// defaultExtensionValue returns the default value for extension. +// If no default for an extension is defined ErrMissingExtension is returned. +func defaultExtensionValue(extension *ExtensionDesc) (interface{}, error) { + t := reflect.TypeOf(extension.ExtensionType) + props := extensionProperties(extension) + + sf, _, err := fieldDefault(t, props) + if err != nil { + return nil, err + } + + if sf == nil || sf.value == nil { + // There is no default value. + return nil, ErrMissingExtension + } + + if t.Kind() != reflect.Ptr { + // We do not need to return a Ptr, we can directly return sf.value. + return sf.value, nil + } + + // We need to return an interface{} that is a pointer to sf.value. + value := reflect.New(t).Elem() + value.Set(reflect.New(value.Type().Elem())) + if sf.kind == reflect.Int32 { + // We may have an int32 or an enum, but the underlying data is int32. + // Since we can't set an int32 into a non int32 reflect.value directly + // set it as a int32. + value.Elem().SetInt(int64(sf.value.(int32))) + } else { + value.Elem().Set(reflect.ValueOf(sf.value)) + } + return value.Interface(), nil +} + +// decodeExtension decodes an extension encoded in b. +func decodeExtension(b []byte, extension *ExtensionDesc) (interface{}, error) { + o := NewBuffer(b) + + t := reflect.TypeOf(extension.ExtensionType) + + props := extensionProperties(extension) + + // t is a pointer to a struct, pointer to basic type or a slice. + // Allocate a "field" to store the pointer/slice itself; the + // pointer/slice will be stored here. We pass + // the address of this field to props.dec. + // This passes a zero field and a *t and lets props.dec + // interpret it as a *struct{ x t }. + value := reflect.New(t).Elem() + + for { + // Discard wire type and field number varint. It isn't needed. + if _, err := o.DecodeVarint(); err != nil { + return nil, err + } + + if err := props.dec(o, props, toStructPointer(value.Addr())); err != nil { + return nil, err + } + + if o.index >= len(o.buf) { + break + } + } + return value.Interface(), nil +} + +// GetExtensions returns a slice of the extensions present in pb that are also listed in es. +// The returned slice has the same length as es; missing extensions will appear as nil elements. +func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, err error) { + epb, ok := extendable(pb) + if !ok { + return nil, errors.New("proto: not an extendable proto") + } + extensions = make([]interface{}, len(es)) + for i, e := range es { + extensions[i], err = GetExtension(epb, e) + if err == ErrMissingExtension { + err = nil + } + if err != nil { + return + } + } + return +} + +// SetExtension sets the specified extension of pb to the specified value. +func SetExtension(pb Message, extension *ExtensionDesc, value interface{}) error { + epb, ok := extendable(pb) + if !ok { + return errors.New("proto: not an extendable proto") + } + if err := checkExtensionTypes(epb, extension); err != nil { + return err + } + typ := reflect.TypeOf(extension.ExtensionType) + if typ != reflect.TypeOf(value) { + return errors.New("proto: bad extension value type") + } + // nil extension values need to be caught early, because the + // encoder can't distinguish an ErrNil due to a nil extension + // from an ErrNil due to a missing field. Extensions are + // always optional, so the encoder would just swallow the error + // and drop all the extensions from the encoded message. + if reflect.ValueOf(value).IsNil() { + return fmt.Errorf("proto: SetExtension called with nil value of type %T", value) + } + + extmap := epb.extensionsWrite() + extmap[extension.Field] = Extension{desc: extension, value: value} + return nil +} + +// ClearAllExtensions clears all extensions from pb. +func ClearAllExtensions(pb Message) { + epb, ok := extendable(pb) + if !ok { + return + } + m := epb.extensionsWrite() + for k := range m { + delete(m, k) + } +} + +// A global registry of extensions. +// The generated code will register the generated descriptors by calling RegisterExtension. + +var extensionMaps = make(map[reflect.Type]map[int32]*ExtensionDesc) + +// RegisterExtension is called from the generated code. +func RegisterExtension(desc *ExtensionDesc) { + st := reflect.TypeOf(desc.ExtendedType).Elem() + m := extensionMaps[st] + if m == nil { + m = make(map[int32]*ExtensionDesc) + extensionMaps[st] = m + } + if _, ok := m[desc.Field]; ok { + panic("proto: duplicate extension registered: " + st.String() + " " + strconv.Itoa(int(desc.Field))) + } + m[desc.Field] = desc +} + +// RegisteredExtensions returns a map of the registered extensions of a +// protocol buffer struct, indexed by the extension number. +// The argument pb should be a nil pointer to the struct type. +func RegisteredExtensions(pb Message) map[int32]*ExtensionDesc { + return extensionMaps[reflect.TypeOf(pb).Elem()] +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/lib.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/lib.go new file mode 100644 index 0000000000000..170b8e87d2e46 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/lib.go @@ -0,0 +1,898 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +/* +Package proto converts data structures to and from the wire format of +protocol buffers. It works in concert with the Go source code generated +for .proto files by the protocol compiler. + +A summary of the properties of the protocol buffer interface +for a protocol buffer variable v: + + - Names are turned from camel_case to CamelCase for export. + - There are no methods on v to set fields; just treat + them as structure fields. + - There are getters that return a field's value if set, + and return the field's default value if unset. + The getters work even if the receiver is a nil message. + - The zero value for a struct is its correct initialization state. + All desired fields must be set before marshaling. + - A Reset() method will restore a protobuf struct to its zero state. + - Non-repeated fields are pointers to the values; nil means unset. + That is, optional or required field int32 f becomes F *int32. + - Repeated fields are slices. + - Helper functions are available to aid the setting of fields. + msg.Foo = proto.String("hello") // set field + - Constants are defined to hold the default values of all fields that + have them. They have the form Default_StructName_FieldName. + Because the getter methods handle defaulted values, + direct use of these constants should be rare. + - Enums are given type names and maps from names to values. + Enum values are prefixed by the enclosing message's name, or by the + enum's type name if it is a top-level enum. Enum types have a String + method, and a Enum method to assist in message construction. + - Nested messages, groups and enums have type names prefixed with the name of + the surrounding message type. + - Extensions are given descriptor names that start with E_, + followed by an underscore-delimited list of the nested messages + that contain it (if any) followed by the CamelCased name of the + extension field itself. HasExtension, ClearExtension, GetExtension + and SetExtension are functions for manipulating extensions. + - Oneof field sets are given a single field in their message, + with distinguished wrapper types for each possible field value. + - Marshal and Unmarshal are functions to encode and decode the wire format. + +When the .proto file specifies `syntax="proto3"`, there are some differences: + + - Non-repeated fields of non-message type are values instead of pointers. + - Getters are only generated for message and oneof fields. + - Enum types do not get an Enum method. + +The simplest way to describe this is to see an example. +Given file test.proto, containing + + package example; + + enum FOO { X = 17; } + + message Test { + required string label = 1; + optional int32 type = 2 [default=77]; + repeated int64 reps = 3; + optional group OptionalGroup = 4 { + required string RequiredField = 5; + } + oneof union { + int32 number = 6; + string name = 7; + } + } + +The resulting file, test.pb.go, is: + + package example + + import proto "github.com/golang/protobuf/proto" + import math "math" + + type FOO int32 + const ( + FOO_X FOO = 17 + ) + var FOO_name = map[int32]string{ + 17: "X", + } + var FOO_value = map[string]int32{ + "X": 17, + } + + func (x FOO) Enum() *FOO { + p := new(FOO) + *p = x + return p + } + func (x FOO) String() string { + return proto.EnumName(FOO_name, int32(x)) + } + func (x *FOO) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FOO_value, data) + if err != nil { + return err + } + *x = FOO(value) + return nil + } + + type Test struct { + Label *string `protobuf:"bytes,1,req,name=label" json:"label,omitempty"` + Type *int32 `protobuf:"varint,2,opt,name=type,def=77" json:"type,omitempty"` + Reps []int64 `protobuf:"varint,3,rep,name=reps" json:"reps,omitempty"` + Optionalgroup *Test_OptionalGroup `protobuf:"group,4,opt,name=OptionalGroup" json:"optionalgroup,omitempty"` + // Types that are valid to be assigned to Union: + // *Test_Number + // *Test_Name + Union isTest_Union `protobuf_oneof:"union"` + XXX_unrecognized []byte `json:"-"` + } + func (m *Test) Reset() { *m = Test{} } + func (m *Test) String() string { return proto.CompactTextString(m) } + func (*Test) ProtoMessage() {} + + type isTest_Union interface { + isTest_Union() + } + + type Test_Number struct { + Number int32 `protobuf:"varint,6,opt,name=number"` + } + type Test_Name struct { + Name string `protobuf:"bytes,7,opt,name=name"` + } + + func (*Test_Number) isTest_Union() {} + func (*Test_Name) isTest_Union() {} + + func (m *Test) GetUnion() isTest_Union { + if m != nil { + return m.Union + } + return nil + } + const Default_Test_Type int32 = 77 + + func (m *Test) GetLabel() string { + if m != nil && m.Label != nil { + return *m.Label + } + return "" + } + + func (m *Test) GetType() int32 { + if m != nil && m.Type != nil { + return *m.Type + } + return Default_Test_Type + } + + func (m *Test) GetOptionalgroup() *Test_OptionalGroup { + if m != nil { + return m.Optionalgroup + } + return nil + } + + type Test_OptionalGroup struct { + RequiredField *string `protobuf:"bytes,5,req" json:"RequiredField,omitempty"` + } + func (m *Test_OptionalGroup) Reset() { *m = Test_OptionalGroup{} } + func (m *Test_OptionalGroup) String() string { return proto.CompactTextString(m) } + + func (m *Test_OptionalGroup) GetRequiredField() string { + if m != nil && m.RequiredField != nil { + return *m.RequiredField + } + return "" + } + + func (m *Test) GetNumber() int32 { + if x, ok := m.GetUnion().(*Test_Number); ok { + return x.Number + } + return 0 + } + + func (m *Test) GetName() string { + if x, ok := m.GetUnion().(*Test_Name); ok { + return x.Name + } + return "" + } + + func init() { + proto.RegisterEnum("example.FOO", FOO_name, FOO_value) + } + +To create and play with a Test object: + + package main + + import ( + "log" + + "github.com/golang/protobuf/proto" + pb "./example.pb" + ) + + func main() { + test := &pb.Test{ + Label: proto.String("hello"), + Type: proto.Int32(17), + Reps: []int64{1, 2, 3}, + Optionalgroup: &pb.Test_OptionalGroup{ + RequiredField: proto.String("good bye"), + }, + Union: &pb.Test_Name{"fred"}, + } + data, err := proto.Marshal(test) + if err != nil { + log.Fatal("marshaling error: ", err) + } + newTest := &pb.Test{} + err = proto.Unmarshal(data, newTest) + if err != nil { + log.Fatal("unmarshaling error: ", err) + } + // Now test and newTest contain the same data. + if test.GetLabel() != newTest.GetLabel() { + log.Fatalf("data mismatch %q != %q", test.GetLabel(), newTest.GetLabel()) + } + // Use a type switch to determine which oneof was set. + switch u := test.Union.(type) { + case *pb.Test_Number: // u.Number contains the number. + case *pb.Test_Name: // u.Name contains the string. + } + // etc. + } +*/ +package proto + +import ( + "encoding/json" + "fmt" + "log" + "reflect" + "sort" + "strconv" + "sync" +) + +// Message is implemented by generated protocol buffer messages. +type Message interface { + Reset() + String() string + ProtoMessage() +} + +// Stats records allocation details about the protocol buffer encoders +// and decoders. Useful for tuning the library itself. +type Stats struct { + Emalloc uint64 // mallocs in encode + Dmalloc uint64 // mallocs in decode + Encode uint64 // number of encodes + Decode uint64 // number of decodes + Chit uint64 // number of cache hits + Cmiss uint64 // number of cache misses + Size uint64 // number of sizes +} + +// Set to true to enable stats collection. +const collectStats = false + +var stats Stats + +// GetStats returns a copy of the global Stats structure. +func GetStats() Stats { return stats } + +// A Buffer is a buffer manager for marshaling and unmarshaling +// protocol buffers. It may be reused between invocations to +// reduce memory usage. It is not necessary to use a Buffer; +// the global functions Marshal and Unmarshal create a +// temporary Buffer and are fine for most applications. +type Buffer struct { + buf []byte // encode/decode byte stream + index int // write point + + // pools of basic types to amortize allocation. + bools []bool + uint32s []uint32 + uint64s []uint64 + + // extra pools, only used with pointer_reflect.go + int32s []int32 + int64s []int64 + float32s []float32 + float64s []float64 +} + +// NewBuffer allocates a new Buffer and initializes its internal data to +// the contents of the argument slice. +func NewBuffer(e []byte) *Buffer { + return &Buffer{buf: e} +} + +// Reset resets the Buffer, ready for marshaling a new protocol buffer. +func (p *Buffer) Reset() { + p.buf = p.buf[0:0] // for reading/writing + p.index = 0 // for reading +} + +// SetBuf replaces the internal buffer with the slice, +// ready for unmarshaling the contents of the slice. +func (p *Buffer) SetBuf(s []byte) { + p.buf = s + p.index = 0 +} + +// Bytes returns the contents of the Buffer. +func (p *Buffer) Bytes() []byte { return p.buf } + +/* + * Helper routines for simplifying the creation of optional fields of basic type. + */ + +// Bool is a helper routine that allocates a new bool value +// to store v and returns a pointer to it. +func Bool(v bool) *bool { + return &v +} + +// Int32 is a helper routine that allocates a new int32 value +// to store v and returns a pointer to it. +func Int32(v int32) *int32 { + return &v +} + +// Int is a helper routine that allocates a new int32 value +// to store v and returns a pointer to it, but unlike Int32 +// its argument value is an int. +func Int(v int) *int32 { + p := new(int32) + *p = int32(v) + return p +} + +// Int64 is a helper routine that allocates a new int64 value +// to store v and returns a pointer to it. +func Int64(v int64) *int64 { + return &v +} + +// Float32 is a helper routine that allocates a new float32 value +// to store v and returns a pointer to it. +func Float32(v float32) *float32 { + return &v +} + +// Float64 is a helper routine that allocates a new float64 value +// to store v and returns a pointer to it. +func Float64(v float64) *float64 { + return &v +} + +// Uint32 is a helper routine that allocates a new uint32 value +// to store v and returns a pointer to it. +func Uint32(v uint32) *uint32 { + return &v +} + +// Uint64 is a helper routine that allocates a new uint64 value +// to store v and returns a pointer to it. +func Uint64(v uint64) *uint64 { + return &v +} + +// String is a helper routine that allocates a new string value +// to store v and returns a pointer to it. +func String(v string) *string { + return &v +} + +// EnumName is a helper function to simplify printing protocol buffer enums +// by name. Given an enum map and a value, it returns a useful string. +func EnumName(m map[int32]string, v int32) string { + s, ok := m[v] + if ok { + return s + } + return strconv.Itoa(int(v)) +} + +// UnmarshalJSONEnum is a helper function to simplify recovering enum int values +// from their JSON-encoded representation. Given a map from the enum's symbolic +// names to its int values, and a byte buffer containing the JSON-encoded +// value, it returns an int32 that can be cast to the enum type by the caller. +// +// The function can deal with both JSON representations, numeric and symbolic. +func UnmarshalJSONEnum(m map[string]int32, data []byte, enumName string) (int32, error) { + if data[0] == '"' { + // New style: enums are strings. + var repr string + if err := json.Unmarshal(data, &repr); err != nil { + return -1, err + } + val, ok := m[repr] + if !ok { + return 0, fmt.Errorf("unrecognized enum %s value %q", enumName, repr) + } + return val, nil + } + // Old style: enums are ints. + var val int32 + if err := json.Unmarshal(data, &val); err != nil { + return 0, fmt.Errorf("cannot unmarshal %#q into enum %s", data, enumName) + } + return val, nil +} + +// DebugPrint dumps the encoded data in b in a debugging format with a header +// including the string s. Used in testing but made available for general debugging. +func (p *Buffer) DebugPrint(s string, b []byte) { + var u uint64 + + obuf := p.buf + index := p.index + p.buf = b + p.index = 0 + depth := 0 + + fmt.Printf("\n--- %s ---\n", s) + +out: + for { + for i := 0; i < depth; i++ { + fmt.Print(" ") + } + + index := p.index + if index == len(p.buf) { + break + } + + op, err := p.DecodeVarint() + if err != nil { + fmt.Printf("%3d: fetching op err %v\n", index, err) + break out + } + tag := op >> 3 + wire := op & 7 + + switch wire { + default: + fmt.Printf("%3d: t=%3d unknown wire=%d\n", + index, tag, wire) + break out + + case WireBytes: + var r []byte + + r, err = p.DecodeRawBytes(false) + if err != nil { + break out + } + fmt.Printf("%3d: t=%3d bytes [%d]", index, tag, len(r)) + if len(r) <= 6 { + for i := 0; i < len(r); i++ { + fmt.Printf(" %.2x", r[i]) + } + } else { + for i := 0; i < 3; i++ { + fmt.Printf(" %.2x", r[i]) + } + fmt.Printf(" ..") + for i := len(r) - 3; i < len(r); i++ { + fmt.Printf(" %.2x", r[i]) + } + } + fmt.Printf("\n") + + case WireFixed32: + u, err = p.DecodeFixed32() + if err != nil { + fmt.Printf("%3d: t=%3d fix32 err %v\n", index, tag, err) + break out + } + fmt.Printf("%3d: t=%3d fix32 %d\n", index, tag, u) + + case WireFixed64: + u, err = p.DecodeFixed64() + if err != nil { + fmt.Printf("%3d: t=%3d fix64 err %v\n", index, tag, err) + break out + } + fmt.Printf("%3d: t=%3d fix64 %d\n", index, tag, u) + + case WireVarint: + u, err = p.DecodeVarint() + if err != nil { + fmt.Printf("%3d: t=%3d varint err %v\n", index, tag, err) + break out + } + fmt.Printf("%3d: t=%3d varint %d\n", index, tag, u) + + case WireStartGroup: + fmt.Printf("%3d: t=%3d start\n", index, tag) + depth++ + + case WireEndGroup: + depth-- + fmt.Printf("%3d: t=%3d end\n", index, tag) + } + } + + if depth != 0 { + fmt.Printf("%3d: start-end not balanced %d\n", p.index, depth) + } + fmt.Printf("\n") + + p.buf = obuf + p.index = index +} + +// SetDefaults sets unset protocol buffer fields to their default values. +// It only modifies fields that are both unset and have defined defaults. +// It recursively sets default values in any non-nil sub-messages. +func SetDefaults(pb Message) { + setDefaults(reflect.ValueOf(pb), true, false) +} + +// v is a pointer to a struct. +func setDefaults(v reflect.Value, recur, zeros bool) { + v = v.Elem() + + defaultMu.RLock() + dm, ok := defaults[v.Type()] + defaultMu.RUnlock() + if !ok { + dm = buildDefaultMessage(v.Type()) + defaultMu.Lock() + defaults[v.Type()] = dm + defaultMu.Unlock() + } + + for _, sf := range dm.scalars { + f := v.Field(sf.index) + if !f.IsNil() { + // field already set + continue + } + dv := sf.value + if dv == nil && !zeros { + // no explicit default, and don't want to set zeros + continue + } + fptr := f.Addr().Interface() // **T + // TODO: Consider batching the allocations we do here. + switch sf.kind { + case reflect.Bool: + b := new(bool) + if dv != nil { + *b = dv.(bool) + } + *(fptr.(**bool)) = b + case reflect.Float32: + f := new(float32) + if dv != nil { + *f = dv.(float32) + } + *(fptr.(**float32)) = f + case reflect.Float64: + f := new(float64) + if dv != nil { + *f = dv.(float64) + } + *(fptr.(**float64)) = f + case reflect.Int32: + // might be an enum + if ft := f.Type(); ft != int32PtrType { + // enum + f.Set(reflect.New(ft.Elem())) + if dv != nil { + f.Elem().SetInt(int64(dv.(int32))) + } + } else { + // int32 field + i := new(int32) + if dv != nil { + *i = dv.(int32) + } + *(fptr.(**int32)) = i + } + case reflect.Int64: + i := new(int64) + if dv != nil { + *i = dv.(int64) + } + *(fptr.(**int64)) = i + case reflect.String: + s := new(string) + if dv != nil { + *s = dv.(string) + } + *(fptr.(**string)) = s + case reflect.Uint8: + // exceptional case: []byte + var b []byte + if dv != nil { + db := dv.([]byte) + b = make([]byte, len(db)) + copy(b, db) + } else { + b = []byte{} + } + *(fptr.(*[]byte)) = b + case reflect.Uint32: + u := new(uint32) + if dv != nil { + *u = dv.(uint32) + } + *(fptr.(**uint32)) = u + case reflect.Uint64: + u := new(uint64) + if dv != nil { + *u = dv.(uint64) + } + *(fptr.(**uint64)) = u + default: + log.Printf("proto: can't set default for field %v (sf.kind=%v)", f, sf.kind) + } + } + + for _, ni := range dm.nested { + f := v.Field(ni) + // f is *T or []*T or map[T]*T + switch f.Kind() { + case reflect.Ptr: + if f.IsNil() { + continue + } + setDefaults(f, recur, zeros) + + case reflect.Slice: + for i := 0; i < f.Len(); i++ { + e := f.Index(i) + if e.IsNil() { + continue + } + setDefaults(e, recur, zeros) + } + + case reflect.Map: + for _, k := range f.MapKeys() { + e := f.MapIndex(k) + if e.IsNil() { + continue + } + setDefaults(e, recur, zeros) + } + } + } +} + +var ( + // defaults maps a protocol buffer struct type to a slice of the fields, + // with its scalar fields set to their proto-declared non-zero default values. + defaultMu sync.RWMutex + defaults = make(map[reflect.Type]defaultMessage) + + int32PtrType = reflect.TypeOf((*int32)(nil)) +) + +// defaultMessage represents information about the default values of a message. +type defaultMessage struct { + scalars []scalarField + nested []int // struct field index of nested messages +} + +type scalarField struct { + index int // struct field index + kind reflect.Kind // element type (the T in *T or []T) + value interface{} // the proto-declared default value, or nil +} + +// t is a struct type. +func buildDefaultMessage(t reflect.Type) (dm defaultMessage) { + sprop := GetProperties(t) + for _, prop := range sprop.Prop { + fi, ok := sprop.decoderTags.get(prop.Tag) + if !ok { + // XXX_unrecognized + continue + } + ft := t.Field(fi).Type + + sf, nested, err := fieldDefault(ft, prop) + switch { + case err != nil: + log.Print(err) + case nested: + dm.nested = append(dm.nested, fi) + case sf != nil: + sf.index = fi + dm.scalars = append(dm.scalars, *sf) + } + } + + return dm +} + +// fieldDefault returns the scalarField for field type ft. +// sf will be nil if the field can not have a default. +// nestedMessage will be true if this is a nested message. +// Note that sf.index is not set on return. +func fieldDefault(ft reflect.Type, prop *Properties) (sf *scalarField, nestedMessage bool, err error) { + var canHaveDefault bool + switch ft.Kind() { + case reflect.Ptr: + if ft.Elem().Kind() == reflect.Struct { + nestedMessage = true + } else { + canHaveDefault = true // proto2 scalar field + } + + case reflect.Slice: + switch ft.Elem().Kind() { + case reflect.Ptr: + nestedMessage = true // repeated message + case reflect.Uint8: + canHaveDefault = true // bytes field + } + + case reflect.Map: + if ft.Elem().Kind() == reflect.Ptr { + nestedMessage = true // map with message values + } + } + + if !canHaveDefault { + if nestedMessage { + return nil, true, nil + } + return nil, false, nil + } + + // We now know that ft is a pointer or slice. + sf = &scalarField{kind: ft.Elem().Kind()} + + // scalar fields without defaults + if !prop.HasDefault { + return sf, false, nil + } + + // a scalar field: either *T or []byte + switch ft.Elem().Kind() { + case reflect.Bool: + x, err := strconv.ParseBool(prop.Default) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default bool %q: %v", prop.Default, err) + } + sf.value = x + case reflect.Float32: + x, err := strconv.ParseFloat(prop.Default, 32) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default float32 %q: %v", prop.Default, err) + } + sf.value = float32(x) + case reflect.Float64: + x, err := strconv.ParseFloat(prop.Default, 64) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default float64 %q: %v", prop.Default, err) + } + sf.value = x + case reflect.Int32: + x, err := strconv.ParseInt(prop.Default, 10, 32) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default int32 %q: %v", prop.Default, err) + } + sf.value = int32(x) + case reflect.Int64: + x, err := strconv.ParseInt(prop.Default, 10, 64) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default int64 %q: %v", prop.Default, err) + } + sf.value = x + case reflect.String: + sf.value = prop.Default + case reflect.Uint8: + // []byte (not *uint8) + sf.value = []byte(prop.Default) + case reflect.Uint32: + x, err := strconv.ParseUint(prop.Default, 10, 32) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default uint32 %q: %v", prop.Default, err) + } + sf.value = uint32(x) + case reflect.Uint64: + x, err := strconv.ParseUint(prop.Default, 10, 64) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default uint64 %q: %v", prop.Default, err) + } + sf.value = x + default: + return nil, false, fmt.Errorf("proto: unhandled def kind %v", ft.Elem().Kind()) + } + + return sf, false, nil +} + +// Map fields may have key types of non-float scalars, strings and enums. +// The easiest way to sort them in some deterministic order is to use fmt. +// If this turns out to be inefficient we can always consider other options, +// such as doing a Schwartzian transform. + +func mapKeys(vs []reflect.Value) sort.Interface { + s := mapKeySorter{ + vs: vs, + // default Less function: textual comparison + less: func(a, b reflect.Value) bool { + return fmt.Sprint(a.Interface()) < fmt.Sprint(b.Interface()) + }, + } + + // Type specialization per https://developers.google.com/protocol-buffers/docs/proto#maps; + // numeric keys are sorted numerically. + if len(vs) == 0 { + return s + } + switch vs[0].Kind() { + case reflect.Int32, reflect.Int64: + s.less = func(a, b reflect.Value) bool { return a.Int() < b.Int() } + case reflect.Uint32, reflect.Uint64: + s.less = func(a, b reflect.Value) bool { return a.Uint() < b.Uint() } + } + + return s +} + +type mapKeySorter struct { + vs []reflect.Value + less func(a, b reflect.Value) bool +} + +func (s mapKeySorter) Len() int { return len(s.vs) } +func (s mapKeySorter) Swap(i, j int) { s.vs[i], s.vs[j] = s.vs[j], s.vs[i] } +func (s mapKeySorter) Less(i, j int) bool { + return s.less(s.vs[i], s.vs[j]) +} + +// isProto3Zero reports whether v is a zero proto3 value. +func isProto3Zero(v reflect.Value) bool { + switch v.Kind() { + case reflect.Bool: + return !v.Bool() + case reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint32, reflect.Uint64: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.String: + return v.String() == "" + } + return false +} + +// ProtoPackageIsVersion2 is referenced from generated protocol buffer files +// to assert that that code is compatible with this version of the proto package. +const ProtoPackageIsVersion2 = true + +// ProtoPackageIsVersion1 is referenced from generated protocol buffer files +// to assert that that code is compatible with this version of the proto package. +const ProtoPackageIsVersion1 = true diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/message_set.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/message_set.go new file mode 100644 index 0000000000000..fd982decd66e4 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/message_set.go @@ -0,0 +1,311 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto + +/* + * Support for message sets. + */ + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "reflect" + "sort" +) + +// errNoMessageTypeID occurs when a protocol buffer does not have a message type ID. +// A message type ID is required for storing a protocol buffer in a message set. +var errNoMessageTypeID = errors.New("proto does not have a message type ID") + +// The first two types (_MessageSet_Item and messageSet) +// model what the protocol compiler produces for the following protocol message: +// message MessageSet { +// repeated group Item = 1 { +// required int32 type_id = 2; +// required string message = 3; +// }; +// } +// That is the MessageSet wire format. We can't use a proto to generate these +// because that would introduce a circular dependency between it and this package. + +type _MessageSet_Item struct { + TypeId *int32 `protobuf:"varint,2,req,name=type_id"` + Message []byte `protobuf:"bytes,3,req,name=message"` +} + +type messageSet struct { + Item []*_MessageSet_Item `protobuf:"group,1,rep"` + XXX_unrecognized []byte + // TODO: caching? +} + +// Make sure messageSet is a Message. +var _ Message = (*messageSet)(nil) + +// messageTypeIder is an interface satisfied by a protocol buffer type +// that may be stored in a MessageSet. +type messageTypeIder interface { + MessageTypeId() int32 +} + +func (ms *messageSet) find(pb Message) *_MessageSet_Item { + mti, ok := pb.(messageTypeIder) + if !ok { + return nil + } + id := mti.MessageTypeId() + for _, item := range ms.Item { + if *item.TypeId == id { + return item + } + } + return nil +} + +func (ms *messageSet) Has(pb Message) bool { + if ms.find(pb) != nil { + return true + } + return false +} + +func (ms *messageSet) Unmarshal(pb Message) error { + if item := ms.find(pb); item != nil { + return Unmarshal(item.Message, pb) + } + if _, ok := pb.(messageTypeIder); !ok { + return errNoMessageTypeID + } + return nil // TODO: return error instead? +} + +func (ms *messageSet) Marshal(pb Message) error { + msg, err := Marshal(pb) + if err != nil { + return err + } + if item := ms.find(pb); item != nil { + // reuse existing item + item.Message = msg + return nil + } + + mti, ok := pb.(messageTypeIder) + if !ok { + return errNoMessageTypeID + } + + mtid := mti.MessageTypeId() + ms.Item = append(ms.Item, &_MessageSet_Item{ + TypeId: &mtid, + Message: msg, + }) + return nil +} + +func (ms *messageSet) Reset() { *ms = messageSet{} } +func (ms *messageSet) String() string { return CompactTextString(ms) } +func (*messageSet) ProtoMessage() {} + +// Support for the message_set_wire_format message option. + +func skipVarint(buf []byte) []byte { + i := 0 + for ; buf[i]&0x80 != 0; i++ { + } + return buf[i+1:] +} + +// MarshalMessageSet encodes the extension map represented by m in the message set wire format. +// It is called by generated Marshal methods on protocol buffer messages with the message_set_wire_format option. +func MarshalMessageSet(exts interface{}) ([]byte, error) { + var m map[int32]Extension + switch exts := exts.(type) { + case *XXX_InternalExtensions: + if err := encodeExtensions(exts); err != nil { + return nil, err + } + m, _ = exts.extensionsRead() + case map[int32]Extension: + if err := encodeExtensionsMap(exts); err != nil { + return nil, err + } + m = exts + default: + return nil, errors.New("proto: not an extension map") + } + + // Sort extension IDs to provide a deterministic encoding. + // See also enc_map in encode.go. + ids := make([]int, 0, len(m)) + for id := range m { + ids = append(ids, int(id)) + } + sort.Ints(ids) + + ms := &messageSet{Item: make([]*_MessageSet_Item, 0, len(m))} + for _, id := range ids { + e := m[int32(id)] + // Remove the wire type and field number varint, as well as the length varint. + msg := skipVarint(skipVarint(e.enc)) + + ms.Item = append(ms.Item, &_MessageSet_Item{ + TypeId: Int32(int32(id)), + Message: msg, + }) + } + return Marshal(ms) +} + +// UnmarshalMessageSet decodes the extension map encoded in buf in the message set wire format. +// It is called by generated Unmarshal methods on protocol buffer messages with the message_set_wire_format option. +func UnmarshalMessageSet(buf []byte, exts interface{}) error { + var m map[int32]Extension + switch exts := exts.(type) { + case *XXX_InternalExtensions: + m = exts.extensionsWrite() + case map[int32]Extension: + m = exts + default: + return errors.New("proto: not an extension map") + } + + ms := new(messageSet) + if err := Unmarshal(buf, ms); err != nil { + return err + } + for _, item := range ms.Item { + id := *item.TypeId + msg := item.Message + + // Restore wire type and field number varint, plus length varint. + // Be careful to preserve duplicate items. + b := EncodeVarint(uint64(id)<<3 | WireBytes) + if ext, ok := m[id]; ok { + // Existing data; rip off the tag and length varint + // so we join the new data correctly. + // We can assume that ext.enc is set because we are unmarshaling. + o := ext.enc[len(b):] // skip wire type and field number + _, n := DecodeVarint(o) // calculate length of length varint + o = o[n:] // skip length varint + msg = append(o, msg...) // join old data and new data + } + b = append(b, EncodeVarint(uint64(len(msg)))...) + b = append(b, msg...) + + m[id] = Extension{enc: b} + } + return nil +} + +// MarshalMessageSetJSON encodes the extension map represented by m in JSON format. +// It is called by generated MarshalJSON methods on protocol buffer messages with the message_set_wire_format option. +func MarshalMessageSetJSON(exts interface{}) ([]byte, error) { + var m map[int32]Extension + switch exts := exts.(type) { + case *XXX_InternalExtensions: + m, _ = exts.extensionsRead() + case map[int32]Extension: + m = exts + default: + return nil, errors.New("proto: not an extension map") + } + var b bytes.Buffer + b.WriteByte('{') + + // Process the map in key order for deterministic output. + ids := make([]int32, 0, len(m)) + for id := range m { + ids = append(ids, id) + } + sort.Sort(int32Slice(ids)) // int32Slice defined in text.go + + for i, id := range ids { + ext := m[id] + if i > 0 { + b.WriteByte(',') + } + + msd, ok := messageSetMap[id] + if !ok { + // Unknown type; we can't render it, so skip it. + continue + } + fmt.Fprintf(&b, `"[%s]":`, msd.name) + + x := ext.value + if x == nil { + x = reflect.New(msd.t.Elem()).Interface() + if err := Unmarshal(ext.enc, x.(Message)); err != nil { + return nil, err + } + } + d, err := json.Marshal(x) + if err != nil { + return nil, err + } + b.Write(d) + } + b.WriteByte('}') + return b.Bytes(), nil +} + +// UnmarshalMessageSetJSON decodes the extension map encoded in buf in JSON format. +// It is called by generated UnmarshalJSON methods on protocol buffer messages with the message_set_wire_format option. +func UnmarshalMessageSetJSON(buf []byte, exts interface{}) error { + // Common-case fast path. + if len(buf) == 0 || bytes.Equal(buf, []byte("{}")) { + return nil + } + + // This is fairly tricky, and it's not clear that it is needed. + return errors.New("TODO: UnmarshalMessageSetJSON not yet implemented") +} + +// A global registry of types that can be used in a MessageSet. + +var messageSetMap = make(map[int32]messageSetDesc) + +type messageSetDesc struct { + t reflect.Type // pointer to struct + name string +} + +// RegisterMessageSetType is called from the generated code. +func RegisterMessageSetType(m Message, fieldNum int32, name string) { + messageSetMap[fieldNum] = messageSetDesc{ + t: reflect.TypeOf(m), + name: name, + } +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/pointer_reflect.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/pointer_reflect.go new file mode 100644 index 0000000000000..fb512e2e16dce --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/pointer_reflect.go @@ -0,0 +1,484 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2012 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +// +build appengine js + +// This file contains an implementation of proto field accesses using package reflect. +// It is slower than the code in pointer_unsafe.go but it avoids package unsafe and can +// be used on App Engine. + +package proto + +import ( + "math" + "reflect" +) + +// A structPointer is a pointer to a struct. +type structPointer struct { + v reflect.Value +} + +// toStructPointer returns a structPointer equivalent to the given reflect value. +// The reflect value must itself be a pointer to a struct. +func toStructPointer(v reflect.Value) structPointer { + return structPointer{v} +} + +// IsNil reports whether p is nil. +func structPointer_IsNil(p structPointer) bool { + return p.v.IsNil() +} + +// Interface returns the struct pointer as an interface value. +func structPointer_Interface(p structPointer, _ reflect.Type) interface{} { + return p.v.Interface() +} + +// A field identifies a field in a struct, accessible from a structPointer. +// In this implementation, a field is identified by the sequence of field indices +// passed to reflect's FieldByIndex. +type field []int + +// toField returns a field equivalent to the given reflect field. +func toField(f *reflect.StructField) field { + return f.Index +} + +// invalidField is an invalid field identifier. +var invalidField = field(nil) + +// IsValid reports whether the field identifier is valid. +func (f field) IsValid() bool { return f != nil } + +// field returns the given field in the struct as a reflect value. +func structPointer_field(p structPointer, f field) reflect.Value { + // Special case: an extension map entry with a value of type T + // passes a *T to the struct-handling code with a zero field, + // expecting that it will be treated as equivalent to *struct{ X T }, + // which has the same memory layout. We have to handle that case + // specially, because reflect will panic if we call FieldByIndex on a + // non-struct. + if f == nil { + return p.v.Elem() + } + + return p.v.Elem().FieldByIndex(f) +} + +// ifield returns the given field in the struct as an interface value. +func structPointer_ifield(p structPointer, f field) interface{} { + return structPointer_field(p, f).Addr().Interface() +} + +// Bytes returns the address of a []byte field in the struct. +func structPointer_Bytes(p structPointer, f field) *[]byte { + return structPointer_ifield(p, f).(*[]byte) +} + +// BytesSlice returns the address of a [][]byte field in the struct. +func structPointer_BytesSlice(p structPointer, f field) *[][]byte { + return structPointer_ifield(p, f).(*[][]byte) +} + +// Bool returns the address of a *bool field in the struct. +func structPointer_Bool(p structPointer, f field) **bool { + return structPointer_ifield(p, f).(**bool) +} + +// BoolVal returns the address of a bool field in the struct. +func structPointer_BoolVal(p structPointer, f field) *bool { + return structPointer_ifield(p, f).(*bool) +} + +// BoolSlice returns the address of a []bool field in the struct. +func structPointer_BoolSlice(p structPointer, f field) *[]bool { + return structPointer_ifield(p, f).(*[]bool) +} + +// String returns the address of a *string field in the struct. +func structPointer_String(p structPointer, f field) **string { + return structPointer_ifield(p, f).(**string) +} + +// StringVal returns the address of a string field in the struct. +func structPointer_StringVal(p structPointer, f field) *string { + return structPointer_ifield(p, f).(*string) +} + +// StringSlice returns the address of a []string field in the struct. +func structPointer_StringSlice(p structPointer, f field) *[]string { + return structPointer_ifield(p, f).(*[]string) +} + +// Extensions returns the address of an extension map field in the struct. +func structPointer_Extensions(p structPointer, f field) *XXX_InternalExtensions { + return structPointer_ifield(p, f).(*XXX_InternalExtensions) +} + +// ExtMap returns the address of an extension map field in the struct. +func structPointer_ExtMap(p structPointer, f field) *map[int32]Extension { + return structPointer_ifield(p, f).(*map[int32]Extension) +} + +// NewAt returns the reflect.Value for a pointer to a field in the struct. +func structPointer_NewAt(p structPointer, f field, typ reflect.Type) reflect.Value { + return structPointer_field(p, f).Addr() +} + +// SetStructPointer writes a *struct field in the struct. +func structPointer_SetStructPointer(p structPointer, f field, q structPointer) { + structPointer_field(p, f).Set(q.v) +} + +// GetStructPointer reads a *struct field in the struct. +func structPointer_GetStructPointer(p structPointer, f field) structPointer { + return structPointer{structPointer_field(p, f)} +} + +// StructPointerSlice the address of a []*struct field in the struct. +func structPointer_StructPointerSlice(p structPointer, f field) structPointerSlice { + return structPointerSlice{structPointer_field(p, f)} +} + +// A structPointerSlice represents the address of a slice of pointers to structs +// (themselves messages or groups). That is, v.Type() is *[]*struct{...}. +type structPointerSlice struct { + v reflect.Value +} + +func (p structPointerSlice) Len() int { return p.v.Len() } +func (p structPointerSlice) Index(i int) structPointer { return structPointer{p.v.Index(i)} } +func (p structPointerSlice) Append(q structPointer) { + p.v.Set(reflect.Append(p.v, q.v)) +} + +var ( + int32Type = reflect.TypeOf(int32(0)) + uint32Type = reflect.TypeOf(uint32(0)) + float32Type = reflect.TypeOf(float32(0)) + int64Type = reflect.TypeOf(int64(0)) + uint64Type = reflect.TypeOf(uint64(0)) + float64Type = reflect.TypeOf(float64(0)) +) + +// A word32 represents a field of type *int32, *uint32, *float32, or *enum. +// That is, v.Type() is *int32, *uint32, *float32, or *enum and v is assignable. +type word32 struct { + v reflect.Value +} + +// IsNil reports whether p is nil. +func word32_IsNil(p word32) bool { + return p.v.IsNil() +} + +// Set sets p to point at a newly allocated word with bits set to x. +func word32_Set(p word32, o *Buffer, x uint32) { + t := p.v.Type().Elem() + switch t { + case int32Type: + if len(o.int32s) == 0 { + o.int32s = make([]int32, uint32PoolSize) + } + o.int32s[0] = int32(x) + p.v.Set(reflect.ValueOf(&o.int32s[0])) + o.int32s = o.int32s[1:] + return + case uint32Type: + if len(o.uint32s) == 0 { + o.uint32s = make([]uint32, uint32PoolSize) + } + o.uint32s[0] = x + p.v.Set(reflect.ValueOf(&o.uint32s[0])) + o.uint32s = o.uint32s[1:] + return + case float32Type: + if len(o.float32s) == 0 { + o.float32s = make([]float32, uint32PoolSize) + } + o.float32s[0] = math.Float32frombits(x) + p.v.Set(reflect.ValueOf(&o.float32s[0])) + o.float32s = o.float32s[1:] + return + } + + // must be enum + p.v.Set(reflect.New(t)) + p.v.Elem().SetInt(int64(int32(x))) +} + +// Get gets the bits pointed at by p, as a uint32. +func word32_Get(p word32) uint32 { + elem := p.v.Elem() + switch elem.Kind() { + case reflect.Int32: + return uint32(elem.Int()) + case reflect.Uint32: + return uint32(elem.Uint()) + case reflect.Float32: + return math.Float32bits(float32(elem.Float())) + } + panic("unreachable") +} + +// Word32 returns a reference to a *int32, *uint32, *float32, or *enum field in the struct. +func structPointer_Word32(p structPointer, f field) word32 { + return word32{structPointer_field(p, f)} +} + +// A word32Val represents a field of type int32, uint32, float32, or enum. +// That is, v.Type() is int32, uint32, float32, or enum and v is assignable. +type word32Val struct { + v reflect.Value +} + +// Set sets *p to x. +func word32Val_Set(p word32Val, x uint32) { + switch p.v.Type() { + case int32Type: + p.v.SetInt(int64(x)) + return + case uint32Type: + p.v.SetUint(uint64(x)) + return + case float32Type: + p.v.SetFloat(float64(math.Float32frombits(x))) + return + } + + // must be enum + p.v.SetInt(int64(int32(x))) +} + +// Get gets the bits pointed at by p, as a uint32. +func word32Val_Get(p word32Val) uint32 { + elem := p.v + switch elem.Kind() { + case reflect.Int32: + return uint32(elem.Int()) + case reflect.Uint32: + return uint32(elem.Uint()) + case reflect.Float32: + return math.Float32bits(float32(elem.Float())) + } + panic("unreachable") +} + +// Word32Val returns a reference to a int32, uint32, float32, or enum field in the struct. +func structPointer_Word32Val(p structPointer, f field) word32Val { + return word32Val{structPointer_field(p, f)} +} + +// A word32Slice is a slice of 32-bit values. +// That is, v.Type() is []int32, []uint32, []float32, or []enum. +type word32Slice struct { + v reflect.Value +} + +func (p word32Slice) Append(x uint32) { + n, m := p.v.Len(), p.v.Cap() + if n < m { + p.v.SetLen(n + 1) + } else { + t := p.v.Type().Elem() + p.v.Set(reflect.Append(p.v, reflect.Zero(t))) + } + elem := p.v.Index(n) + switch elem.Kind() { + case reflect.Int32: + elem.SetInt(int64(int32(x))) + case reflect.Uint32: + elem.SetUint(uint64(x)) + case reflect.Float32: + elem.SetFloat(float64(math.Float32frombits(x))) + } +} + +func (p word32Slice) Len() int { + return p.v.Len() +} + +func (p word32Slice) Index(i int) uint32 { + elem := p.v.Index(i) + switch elem.Kind() { + case reflect.Int32: + return uint32(elem.Int()) + case reflect.Uint32: + return uint32(elem.Uint()) + case reflect.Float32: + return math.Float32bits(float32(elem.Float())) + } + panic("unreachable") +} + +// Word32Slice returns a reference to a []int32, []uint32, []float32, or []enum field in the struct. +func structPointer_Word32Slice(p structPointer, f field) word32Slice { + return word32Slice{structPointer_field(p, f)} +} + +// word64 is like word32 but for 64-bit values. +type word64 struct { + v reflect.Value +} + +func word64_Set(p word64, o *Buffer, x uint64) { + t := p.v.Type().Elem() + switch t { + case int64Type: + if len(o.int64s) == 0 { + o.int64s = make([]int64, uint64PoolSize) + } + o.int64s[0] = int64(x) + p.v.Set(reflect.ValueOf(&o.int64s[0])) + o.int64s = o.int64s[1:] + return + case uint64Type: + if len(o.uint64s) == 0 { + o.uint64s = make([]uint64, uint64PoolSize) + } + o.uint64s[0] = x + p.v.Set(reflect.ValueOf(&o.uint64s[0])) + o.uint64s = o.uint64s[1:] + return + case float64Type: + if len(o.float64s) == 0 { + o.float64s = make([]float64, uint64PoolSize) + } + o.float64s[0] = math.Float64frombits(x) + p.v.Set(reflect.ValueOf(&o.float64s[0])) + o.float64s = o.float64s[1:] + return + } + panic("unreachable") +} + +func word64_IsNil(p word64) bool { + return p.v.IsNil() +} + +func word64_Get(p word64) uint64 { + elem := p.v.Elem() + switch elem.Kind() { + case reflect.Int64: + return uint64(elem.Int()) + case reflect.Uint64: + return elem.Uint() + case reflect.Float64: + return math.Float64bits(elem.Float()) + } + panic("unreachable") +} + +func structPointer_Word64(p structPointer, f field) word64 { + return word64{structPointer_field(p, f)} +} + +// word64Val is like word32Val but for 64-bit values. +type word64Val struct { + v reflect.Value +} + +func word64Val_Set(p word64Val, o *Buffer, x uint64) { + switch p.v.Type() { + case int64Type: + p.v.SetInt(int64(x)) + return + case uint64Type: + p.v.SetUint(x) + return + case float64Type: + p.v.SetFloat(math.Float64frombits(x)) + return + } + panic("unreachable") +} + +func word64Val_Get(p word64Val) uint64 { + elem := p.v + switch elem.Kind() { + case reflect.Int64: + return uint64(elem.Int()) + case reflect.Uint64: + return elem.Uint() + case reflect.Float64: + return math.Float64bits(elem.Float()) + } + panic("unreachable") +} + +func structPointer_Word64Val(p structPointer, f field) word64Val { + return word64Val{structPointer_field(p, f)} +} + +type word64Slice struct { + v reflect.Value +} + +func (p word64Slice) Append(x uint64) { + n, m := p.v.Len(), p.v.Cap() + if n < m { + p.v.SetLen(n + 1) + } else { + t := p.v.Type().Elem() + p.v.Set(reflect.Append(p.v, reflect.Zero(t))) + } + elem := p.v.Index(n) + switch elem.Kind() { + case reflect.Int64: + elem.SetInt(int64(int64(x))) + case reflect.Uint64: + elem.SetUint(uint64(x)) + case reflect.Float64: + elem.SetFloat(float64(math.Float64frombits(x))) + } +} + +func (p word64Slice) Len() int { + return p.v.Len() +} + +func (p word64Slice) Index(i int) uint64 { + elem := p.v.Index(i) + switch elem.Kind() { + case reflect.Int64: + return uint64(elem.Int()) + case reflect.Uint64: + return uint64(elem.Uint()) + case reflect.Float64: + return math.Float64bits(float64(elem.Float())) + } + panic("unreachable") +} + +func structPointer_Word64Slice(p structPointer, f field) word64Slice { + return word64Slice{structPointer_field(p, f)} +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/pointer_unsafe.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/pointer_unsafe.go new file mode 100644 index 0000000000000..6b5567d47cd39 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/pointer_unsafe.go @@ -0,0 +1,270 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2012 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +// +build !appengine,!js + +// This file contains the implementation of the proto field accesses using package unsafe. + +package proto + +import ( + "reflect" + "unsafe" +) + +// NOTE: These type_Foo functions would more idiomatically be methods, +// but Go does not allow methods on pointer types, and we must preserve +// some pointer type for the garbage collector. We use these +// funcs with clunky names as our poor approximation to methods. +// +// An alternative would be +// type structPointer struct { p unsafe.Pointer } +// but that does not registerize as well. + +// A structPointer is a pointer to a struct. +type structPointer unsafe.Pointer + +// toStructPointer returns a structPointer equivalent to the given reflect value. +func toStructPointer(v reflect.Value) structPointer { + return structPointer(unsafe.Pointer(v.Pointer())) +} + +// IsNil reports whether p is nil. +func structPointer_IsNil(p structPointer) bool { + return p == nil +} + +// Interface returns the struct pointer, assumed to have element type t, +// as an interface value. +func structPointer_Interface(p structPointer, t reflect.Type) interface{} { + return reflect.NewAt(t, unsafe.Pointer(p)).Interface() +} + +// A field identifies a field in a struct, accessible from a structPointer. +// In this implementation, a field is identified by its byte offset from the start of the struct. +type field uintptr + +// toField returns a field equivalent to the given reflect field. +func toField(f *reflect.StructField) field { + return field(f.Offset) +} + +// invalidField is an invalid field identifier. +const invalidField = ^field(0) + +// IsValid reports whether the field identifier is valid. +func (f field) IsValid() bool { + return f != ^field(0) +} + +// Bytes returns the address of a []byte field in the struct. +func structPointer_Bytes(p structPointer, f field) *[]byte { + return (*[]byte)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// BytesSlice returns the address of a [][]byte field in the struct. +func structPointer_BytesSlice(p structPointer, f field) *[][]byte { + return (*[][]byte)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// Bool returns the address of a *bool field in the struct. +func structPointer_Bool(p structPointer, f field) **bool { + return (**bool)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// BoolVal returns the address of a bool field in the struct. +func structPointer_BoolVal(p structPointer, f field) *bool { + return (*bool)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// BoolSlice returns the address of a []bool field in the struct. +func structPointer_BoolSlice(p structPointer, f field) *[]bool { + return (*[]bool)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// String returns the address of a *string field in the struct. +func structPointer_String(p structPointer, f field) **string { + return (**string)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// StringVal returns the address of a string field in the struct. +func structPointer_StringVal(p structPointer, f field) *string { + return (*string)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// StringSlice returns the address of a []string field in the struct. +func structPointer_StringSlice(p structPointer, f field) *[]string { + return (*[]string)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// ExtMap returns the address of an extension map field in the struct. +func structPointer_Extensions(p structPointer, f field) *XXX_InternalExtensions { + return (*XXX_InternalExtensions)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +func structPointer_ExtMap(p structPointer, f field) *map[int32]Extension { + return (*map[int32]Extension)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// NewAt returns the reflect.Value for a pointer to a field in the struct. +func structPointer_NewAt(p structPointer, f field, typ reflect.Type) reflect.Value { + return reflect.NewAt(typ, unsafe.Pointer(uintptr(p)+uintptr(f))) +} + +// SetStructPointer writes a *struct field in the struct. +func structPointer_SetStructPointer(p structPointer, f field, q structPointer) { + *(*structPointer)(unsafe.Pointer(uintptr(p) + uintptr(f))) = q +} + +// GetStructPointer reads a *struct field in the struct. +func structPointer_GetStructPointer(p structPointer, f field) structPointer { + return *(*structPointer)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// StructPointerSlice the address of a []*struct field in the struct. +func structPointer_StructPointerSlice(p structPointer, f field) *structPointerSlice { + return (*structPointerSlice)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// A structPointerSlice represents a slice of pointers to structs (themselves submessages or groups). +type structPointerSlice []structPointer + +func (v *structPointerSlice) Len() int { return len(*v) } +func (v *structPointerSlice) Index(i int) structPointer { return (*v)[i] } +func (v *structPointerSlice) Append(p structPointer) { *v = append(*v, p) } + +// A word32 is the address of a "pointer to 32-bit value" field. +type word32 **uint32 + +// IsNil reports whether *v is nil. +func word32_IsNil(p word32) bool { + return *p == nil +} + +// Set sets *v to point at a newly allocated word set to x. +func word32_Set(p word32, o *Buffer, x uint32) { + if len(o.uint32s) == 0 { + o.uint32s = make([]uint32, uint32PoolSize) + } + o.uint32s[0] = x + *p = &o.uint32s[0] + o.uint32s = o.uint32s[1:] +} + +// Get gets the value pointed at by *v. +func word32_Get(p word32) uint32 { + return **p +} + +// Word32 returns the address of a *int32, *uint32, *float32, or *enum field in the struct. +func structPointer_Word32(p structPointer, f field) word32 { + return word32((**uint32)(unsafe.Pointer(uintptr(p) + uintptr(f)))) +} + +// A word32Val is the address of a 32-bit value field. +type word32Val *uint32 + +// Set sets *p to x. +func word32Val_Set(p word32Val, x uint32) { + *p = x +} + +// Get gets the value pointed at by p. +func word32Val_Get(p word32Val) uint32 { + return *p +} + +// Word32Val returns the address of a *int32, *uint32, *float32, or *enum field in the struct. +func structPointer_Word32Val(p structPointer, f field) word32Val { + return word32Val((*uint32)(unsafe.Pointer(uintptr(p) + uintptr(f)))) +} + +// A word32Slice is a slice of 32-bit values. +type word32Slice []uint32 + +func (v *word32Slice) Append(x uint32) { *v = append(*v, x) } +func (v *word32Slice) Len() int { return len(*v) } +func (v *word32Slice) Index(i int) uint32 { return (*v)[i] } + +// Word32Slice returns the address of a []int32, []uint32, []float32, or []enum field in the struct. +func structPointer_Word32Slice(p structPointer, f field) *word32Slice { + return (*word32Slice)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// word64 is like word32 but for 64-bit values. +type word64 **uint64 + +func word64_Set(p word64, o *Buffer, x uint64) { + if len(o.uint64s) == 0 { + o.uint64s = make([]uint64, uint64PoolSize) + } + o.uint64s[0] = x + *p = &o.uint64s[0] + o.uint64s = o.uint64s[1:] +} + +func word64_IsNil(p word64) bool { + return *p == nil +} + +func word64_Get(p word64) uint64 { + return **p +} + +func structPointer_Word64(p structPointer, f field) word64 { + return word64((**uint64)(unsafe.Pointer(uintptr(p) + uintptr(f)))) +} + +// word64Val is like word32Val but for 64-bit values. +type word64Val *uint64 + +func word64Val_Set(p word64Val, o *Buffer, x uint64) { + *p = x +} + +func word64Val_Get(p word64Val) uint64 { + return *p +} + +func structPointer_Word64Val(p structPointer, f field) word64Val { + return word64Val((*uint64)(unsafe.Pointer(uintptr(p) + uintptr(f)))) +} + +// word64Slice is like word32Slice but for 64-bit values. +type word64Slice []uint64 + +func (v *word64Slice) Append(x uint64) { *v = append(*v, x) } +func (v *word64Slice) Len() int { return len(*v) } +func (v *word64Slice) Index(i int) uint64 { return (*v)[i] } + +func structPointer_Word64Slice(p structPointer, f field) *word64Slice { + return (*word64Slice)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/properties.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/properties.go new file mode 100644 index 0000000000000..69ddda8d4ba04 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/properties.go @@ -0,0 +1,864 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto + +/* + * Routines for encoding data into the wire format for protocol buffers. + */ + +import ( + "fmt" + "log" + "os" + "reflect" + "sort" + "strconv" + "strings" + "sync" +) + +const debug bool = false + +// Constants that identify the encoding of a value on the wire. +const ( + WireVarint = 0 + WireFixed64 = 1 + WireBytes = 2 + WireStartGroup = 3 + WireEndGroup = 4 + WireFixed32 = 5 +) + +const startSize = 10 // initial slice/string sizes + +// Encoders are defined in encode.go +// An encoder outputs the full representation of a field, including its +// tag and encoder type. +type encoder func(p *Buffer, prop *Properties, base structPointer) error + +// A valueEncoder encodes a single integer in a particular encoding. +type valueEncoder func(o *Buffer, x uint64) error + +// Sizers are defined in encode.go +// A sizer returns the encoded size of a field, including its tag and encoder +// type. +type sizer func(prop *Properties, base structPointer) int + +// A valueSizer returns the encoded size of a single integer in a particular +// encoding. +type valueSizer func(x uint64) int + +// Decoders are defined in decode.go +// A decoder creates a value from its wire representation. +// Unrecognized subelements are saved in unrec. +type decoder func(p *Buffer, prop *Properties, base structPointer) error + +// A valueDecoder decodes a single integer in a particular encoding. +type valueDecoder func(o *Buffer) (x uint64, err error) + +// A oneofMarshaler does the marshaling for all oneof fields in a message. +type oneofMarshaler func(Message, *Buffer) error + +// A oneofUnmarshaler does the unmarshaling for a oneof field in a message. +type oneofUnmarshaler func(Message, int, int, *Buffer) (bool, error) + +// A oneofSizer does the sizing for all oneof fields in a message. +type oneofSizer func(Message) int + +// tagMap is an optimization over map[int]int for typical protocol buffer +// use-cases. Encoded protocol buffers are often in tag order with small tag +// numbers. +type tagMap struct { + fastTags []int + slowTags map[int]int +} + +// tagMapFastLimit is the upper bound on the tag number that will be stored in +// the tagMap slice rather than its map. +const tagMapFastLimit = 1024 + +func (p *tagMap) get(t int) (int, bool) { + if t > 0 && t < tagMapFastLimit { + if t >= len(p.fastTags) { + return 0, false + } + fi := p.fastTags[t] + return fi, fi >= 0 + } + fi, ok := p.slowTags[t] + return fi, ok +} + +func (p *tagMap) put(t int, fi int) { + if t > 0 && t < tagMapFastLimit { + for len(p.fastTags) < t+1 { + p.fastTags = append(p.fastTags, -1) + } + p.fastTags[t] = fi + return + } + if p.slowTags == nil { + p.slowTags = make(map[int]int) + } + p.slowTags[t] = fi +} + +// StructProperties represents properties for all the fields of a struct. +// decoderTags and decoderOrigNames should only be used by the decoder. +type StructProperties struct { + Prop []*Properties // properties for each field + reqCount int // required count + decoderTags tagMap // map from proto tag to struct field number + decoderOrigNames map[string]int // map from original name to struct field number + order []int // list of struct field numbers in tag order + unrecField field // field id of the XXX_unrecognized []byte field + extendable bool // is this an extendable proto + + oneofMarshaler oneofMarshaler + oneofUnmarshaler oneofUnmarshaler + oneofSizer oneofSizer + stype reflect.Type + + // OneofTypes contains information about the oneof fields in this message. + // It is keyed by the original name of a field. + OneofTypes map[string]*OneofProperties +} + +// OneofProperties represents information about a specific field in a oneof. +type OneofProperties struct { + Type reflect.Type // pointer to generated struct type for this oneof field + Field int // struct field number of the containing oneof in the message + Prop *Properties +} + +// Implement the sorting interface so we can sort the fields in tag order, as recommended by the spec. +// See encode.go, (*Buffer).enc_struct. + +func (sp *StructProperties) Len() int { return len(sp.order) } +func (sp *StructProperties) Less(i, j int) bool { + return sp.Prop[sp.order[i]].Tag < sp.Prop[sp.order[j]].Tag +} +func (sp *StructProperties) Swap(i, j int) { sp.order[i], sp.order[j] = sp.order[j], sp.order[i] } + +// Properties represents the protocol-specific behavior of a single struct field. +type Properties struct { + Name string // name of the field, for error messages + OrigName string // original name before protocol compiler (always set) + JSONName string // name to use for JSON; determined by protoc + Wire string + WireType int + Tag int + Required bool + Optional bool + Repeated bool + Packed bool // relevant for repeated primitives only + Enum string // set for enum types only + proto3 bool // whether this is known to be a proto3 field; set for []byte only + oneof bool // whether this is a oneof field + + Default string // default value + HasDefault bool // whether an explicit default was provided + def_uint64 uint64 + + enc encoder + valEnc valueEncoder // set for bool and numeric types only + field field + tagcode []byte // encoding of EncodeVarint((Tag<<3)|WireType) + tagbuf [8]byte + stype reflect.Type // set for struct types only + sprop *StructProperties // set for struct types only + isMarshaler bool + isUnmarshaler bool + + mtype reflect.Type // set for map types only + mkeyprop *Properties // set for map types only + mvalprop *Properties // set for map types only + + size sizer + valSize valueSizer // set for bool and numeric types only + + dec decoder + valDec valueDecoder // set for bool and numeric types only + + // If this is a packable field, this will be the decoder for the packed version of the field. + packedDec decoder +} + +// String formats the properties in the protobuf struct field tag style. +func (p *Properties) String() string { + s := p.Wire + s = "," + s += strconv.Itoa(p.Tag) + if p.Required { + s += ",req" + } + if p.Optional { + s += ",opt" + } + if p.Repeated { + s += ",rep" + } + if p.Packed { + s += ",packed" + } + s += ",name=" + p.OrigName + if p.JSONName != p.OrigName { + s += ",json=" + p.JSONName + } + if p.proto3 { + s += ",proto3" + } + if p.oneof { + s += ",oneof" + } + if len(p.Enum) > 0 { + s += ",enum=" + p.Enum + } + if p.HasDefault { + s += ",def=" + p.Default + } + return s +} + +// Parse populates p by parsing a string in the protobuf struct field tag style. +func (p *Properties) Parse(s string) { + // "bytes,49,opt,name=foo,def=hello!" + fields := strings.Split(s, ",") // breaks def=, but handled below. + if len(fields) < 2 { + fmt.Fprintf(os.Stderr, "proto: tag has too few fields: %q\n", s) + return + } + + p.Wire = fields[0] + switch p.Wire { + case "varint": + p.WireType = WireVarint + p.valEnc = (*Buffer).EncodeVarint + p.valDec = (*Buffer).DecodeVarint + p.valSize = sizeVarint + case "fixed32": + p.WireType = WireFixed32 + p.valEnc = (*Buffer).EncodeFixed32 + p.valDec = (*Buffer).DecodeFixed32 + p.valSize = sizeFixed32 + case "fixed64": + p.WireType = WireFixed64 + p.valEnc = (*Buffer).EncodeFixed64 + p.valDec = (*Buffer).DecodeFixed64 + p.valSize = sizeFixed64 + case "zigzag32": + p.WireType = WireVarint + p.valEnc = (*Buffer).EncodeZigzag32 + p.valDec = (*Buffer).DecodeZigzag32 + p.valSize = sizeZigzag32 + case "zigzag64": + p.WireType = WireVarint + p.valEnc = (*Buffer).EncodeZigzag64 + p.valDec = (*Buffer).DecodeZigzag64 + p.valSize = sizeZigzag64 + case "bytes", "group": + p.WireType = WireBytes + // no numeric converter for non-numeric types + default: + fmt.Fprintf(os.Stderr, "proto: tag has unknown wire type: %q\n", s) + return + } + + var err error + p.Tag, err = strconv.Atoi(fields[1]) + if err != nil { + return + } + + for i := 2; i < len(fields); i++ { + f := fields[i] + switch { + case f == "req": + p.Required = true + case f == "opt": + p.Optional = true + case f == "rep": + p.Repeated = true + case f == "packed": + p.Packed = true + case strings.HasPrefix(f, "name="): + p.OrigName = f[5:] + case strings.HasPrefix(f, "json="): + p.JSONName = f[5:] + case strings.HasPrefix(f, "enum="): + p.Enum = f[5:] + case f == "proto3": + p.proto3 = true + case f == "oneof": + p.oneof = true + case strings.HasPrefix(f, "def="): + p.HasDefault = true + p.Default = f[4:] // rest of string + if i+1 < len(fields) { + // Commas aren't escaped, and def is always last. + p.Default += "," + strings.Join(fields[i+1:], ",") + break + } + } + } +} + +func logNoSliceEnc(t1, t2 reflect.Type) { + fmt.Fprintf(os.Stderr, "proto: no slice oenc for %T = []%T\n", t1, t2) +} + +var protoMessageType = reflect.TypeOf((*Message)(nil)).Elem() + +// Initialize the fields for encoding and decoding. +func (p *Properties) setEncAndDec(typ reflect.Type, f *reflect.StructField, lockGetProp bool) { + p.enc = nil + p.dec = nil + p.size = nil + + switch t1 := typ; t1.Kind() { + default: + fmt.Fprintf(os.Stderr, "proto: no coders for %v\n", t1) + + // proto3 scalar types + + case reflect.Bool: + p.enc = (*Buffer).enc_proto3_bool + p.dec = (*Buffer).dec_proto3_bool + p.size = size_proto3_bool + case reflect.Int32: + p.enc = (*Buffer).enc_proto3_int32 + p.dec = (*Buffer).dec_proto3_int32 + p.size = size_proto3_int32 + case reflect.Uint32: + p.enc = (*Buffer).enc_proto3_uint32 + p.dec = (*Buffer).dec_proto3_int32 // can reuse + p.size = size_proto3_uint32 + case reflect.Int64, reflect.Uint64: + p.enc = (*Buffer).enc_proto3_int64 + p.dec = (*Buffer).dec_proto3_int64 + p.size = size_proto3_int64 + case reflect.Float32: + p.enc = (*Buffer).enc_proto3_uint32 // can just treat them as bits + p.dec = (*Buffer).dec_proto3_int32 + p.size = size_proto3_uint32 + case reflect.Float64: + p.enc = (*Buffer).enc_proto3_int64 // can just treat them as bits + p.dec = (*Buffer).dec_proto3_int64 + p.size = size_proto3_int64 + case reflect.String: + p.enc = (*Buffer).enc_proto3_string + p.dec = (*Buffer).dec_proto3_string + p.size = size_proto3_string + + case reflect.Ptr: + switch t2 := t1.Elem(); t2.Kind() { + default: + fmt.Fprintf(os.Stderr, "proto: no encoder function for %v -> %v\n", t1, t2) + break + case reflect.Bool: + p.enc = (*Buffer).enc_bool + p.dec = (*Buffer).dec_bool + p.size = size_bool + case reflect.Int32: + p.enc = (*Buffer).enc_int32 + p.dec = (*Buffer).dec_int32 + p.size = size_int32 + case reflect.Uint32: + p.enc = (*Buffer).enc_uint32 + p.dec = (*Buffer).dec_int32 // can reuse + p.size = size_uint32 + case reflect.Int64, reflect.Uint64: + p.enc = (*Buffer).enc_int64 + p.dec = (*Buffer).dec_int64 + p.size = size_int64 + case reflect.Float32: + p.enc = (*Buffer).enc_uint32 // can just treat them as bits + p.dec = (*Buffer).dec_int32 + p.size = size_uint32 + case reflect.Float64: + p.enc = (*Buffer).enc_int64 // can just treat them as bits + p.dec = (*Buffer).dec_int64 + p.size = size_int64 + case reflect.String: + p.enc = (*Buffer).enc_string + p.dec = (*Buffer).dec_string + p.size = size_string + case reflect.Struct: + p.stype = t1.Elem() + p.isMarshaler = isMarshaler(t1) + p.isUnmarshaler = isUnmarshaler(t1) + if p.Wire == "bytes" { + p.enc = (*Buffer).enc_struct_message + p.dec = (*Buffer).dec_struct_message + p.size = size_struct_message + } else { + p.enc = (*Buffer).enc_struct_group + p.dec = (*Buffer).dec_struct_group + p.size = size_struct_group + } + } + + case reflect.Slice: + switch t2 := t1.Elem(); t2.Kind() { + default: + logNoSliceEnc(t1, t2) + break + case reflect.Bool: + if p.Packed { + p.enc = (*Buffer).enc_slice_packed_bool + p.size = size_slice_packed_bool + } else { + p.enc = (*Buffer).enc_slice_bool + p.size = size_slice_bool + } + p.dec = (*Buffer).dec_slice_bool + p.packedDec = (*Buffer).dec_slice_packed_bool + case reflect.Int32: + if p.Packed { + p.enc = (*Buffer).enc_slice_packed_int32 + p.size = size_slice_packed_int32 + } else { + p.enc = (*Buffer).enc_slice_int32 + p.size = size_slice_int32 + } + p.dec = (*Buffer).dec_slice_int32 + p.packedDec = (*Buffer).dec_slice_packed_int32 + case reflect.Uint32: + if p.Packed { + p.enc = (*Buffer).enc_slice_packed_uint32 + p.size = size_slice_packed_uint32 + } else { + p.enc = (*Buffer).enc_slice_uint32 + p.size = size_slice_uint32 + } + p.dec = (*Buffer).dec_slice_int32 + p.packedDec = (*Buffer).dec_slice_packed_int32 + case reflect.Int64, reflect.Uint64: + if p.Packed { + p.enc = (*Buffer).enc_slice_packed_int64 + p.size = size_slice_packed_int64 + } else { + p.enc = (*Buffer).enc_slice_int64 + p.size = size_slice_int64 + } + p.dec = (*Buffer).dec_slice_int64 + p.packedDec = (*Buffer).dec_slice_packed_int64 + case reflect.Uint8: + p.dec = (*Buffer).dec_slice_byte + if p.proto3 { + p.enc = (*Buffer).enc_proto3_slice_byte + p.size = size_proto3_slice_byte + } else { + p.enc = (*Buffer).enc_slice_byte + p.size = size_slice_byte + } + case reflect.Float32, reflect.Float64: + switch t2.Bits() { + case 32: + // can just treat them as bits + if p.Packed { + p.enc = (*Buffer).enc_slice_packed_uint32 + p.size = size_slice_packed_uint32 + } else { + p.enc = (*Buffer).enc_slice_uint32 + p.size = size_slice_uint32 + } + p.dec = (*Buffer).dec_slice_int32 + p.packedDec = (*Buffer).dec_slice_packed_int32 + case 64: + // can just treat them as bits + if p.Packed { + p.enc = (*Buffer).enc_slice_packed_int64 + p.size = size_slice_packed_int64 + } else { + p.enc = (*Buffer).enc_slice_int64 + p.size = size_slice_int64 + } + p.dec = (*Buffer).dec_slice_int64 + p.packedDec = (*Buffer).dec_slice_packed_int64 + default: + logNoSliceEnc(t1, t2) + break + } + case reflect.String: + p.enc = (*Buffer).enc_slice_string + p.dec = (*Buffer).dec_slice_string + p.size = size_slice_string + case reflect.Ptr: + switch t3 := t2.Elem(); t3.Kind() { + default: + fmt.Fprintf(os.Stderr, "proto: no ptr oenc for %T -> %T -> %T\n", t1, t2, t3) + break + case reflect.Struct: + p.stype = t2.Elem() + p.isMarshaler = isMarshaler(t2) + p.isUnmarshaler = isUnmarshaler(t2) + if p.Wire == "bytes" { + p.enc = (*Buffer).enc_slice_struct_message + p.dec = (*Buffer).dec_slice_struct_message + p.size = size_slice_struct_message + } else { + p.enc = (*Buffer).enc_slice_struct_group + p.dec = (*Buffer).dec_slice_struct_group + p.size = size_slice_struct_group + } + } + case reflect.Slice: + switch t2.Elem().Kind() { + default: + fmt.Fprintf(os.Stderr, "proto: no slice elem oenc for %T -> %T -> %T\n", t1, t2, t2.Elem()) + break + case reflect.Uint8: + p.enc = (*Buffer).enc_slice_slice_byte + p.dec = (*Buffer).dec_slice_slice_byte + p.size = size_slice_slice_byte + } + } + + case reflect.Map: + p.enc = (*Buffer).enc_new_map + p.dec = (*Buffer).dec_new_map + p.size = size_new_map + + p.mtype = t1 + p.mkeyprop = &Properties{} + p.mkeyprop.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp) + p.mvalprop = &Properties{} + vtype := p.mtype.Elem() + if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice { + // The value type is not a message (*T) or bytes ([]byte), + // so we need encoders for the pointer to this type. + vtype = reflect.PtrTo(vtype) + } + p.mvalprop.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp) + } + + // precalculate tag code + wire := p.WireType + if p.Packed { + wire = WireBytes + } + x := uint32(p.Tag)<<3 | uint32(wire) + i := 0 + for i = 0; x > 127; i++ { + p.tagbuf[i] = 0x80 | uint8(x&0x7F) + x >>= 7 + } + p.tagbuf[i] = uint8(x) + p.tagcode = p.tagbuf[0 : i+1] + + if p.stype != nil { + if lockGetProp { + p.sprop = GetProperties(p.stype) + } else { + p.sprop = getPropertiesLocked(p.stype) + } + } +} + +var ( + marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem() + unmarshalerType = reflect.TypeOf((*Unmarshaler)(nil)).Elem() +) + +// isMarshaler reports whether type t implements Marshaler. +func isMarshaler(t reflect.Type) bool { + // We're checking for (likely) pointer-receiver methods + // so if t is not a pointer, something is very wrong. + // The calls above only invoke isMarshaler on pointer types. + if t.Kind() != reflect.Ptr { + panic("proto: misuse of isMarshaler") + } + return t.Implements(marshalerType) +} + +// isUnmarshaler reports whether type t implements Unmarshaler. +func isUnmarshaler(t reflect.Type) bool { + // We're checking for (likely) pointer-receiver methods + // so if t is not a pointer, something is very wrong. + // The calls above only invoke isUnmarshaler on pointer types. + if t.Kind() != reflect.Ptr { + panic("proto: misuse of isUnmarshaler") + } + return t.Implements(unmarshalerType) +} + +// Init populates the properties from a protocol buffer struct tag. +func (p *Properties) Init(typ reflect.Type, name, tag string, f *reflect.StructField) { + p.init(typ, name, tag, f, true) +} + +func (p *Properties) init(typ reflect.Type, name, tag string, f *reflect.StructField, lockGetProp bool) { + // "bytes,49,opt,def=hello!" + p.Name = name + p.OrigName = name + if f != nil { + p.field = toField(f) + } + if tag == "" { + return + } + p.Parse(tag) + p.setEncAndDec(typ, f, lockGetProp) +} + +var ( + propertiesMu sync.RWMutex + propertiesMap = make(map[reflect.Type]*StructProperties) +) + +// GetProperties returns the list of properties for the type represented by t. +// t must represent a generated struct type of a protocol message. +func GetProperties(t reflect.Type) *StructProperties { + if t.Kind() != reflect.Struct { + panic("proto: type must have kind struct") + } + + // Most calls to GetProperties in a long-running program will be + // retrieving details for types we have seen before. + propertiesMu.RLock() + sprop, ok := propertiesMap[t] + propertiesMu.RUnlock() + if ok { + if collectStats { + stats.Chit++ + } + return sprop + } + + propertiesMu.Lock() + sprop = getPropertiesLocked(t) + propertiesMu.Unlock() + return sprop +} + +// getPropertiesLocked requires that propertiesMu is held. +func getPropertiesLocked(t reflect.Type) *StructProperties { + if prop, ok := propertiesMap[t]; ok { + if collectStats { + stats.Chit++ + } + return prop + } + if collectStats { + stats.Cmiss++ + } + + prop := new(StructProperties) + // in case of recursive protos, fill this in now. + propertiesMap[t] = prop + + // build properties + prop.extendable = reflect.PtrTo(t).Implements(extendableProtoType) || + reflect.PtrTo(t).Implements(extendableProtoV1Type) + prop.unrecField = invalidField + prop.Prop = make([]*Properties, t.NumField()) + prop.order = make([]int, t.NumField()) + + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + p := new(Properties) + name := f.Name + p.init(f.Type, name, f.Tag.Get("protobuf"), &f, false) + + if f.Name == "XXX_InternalExtensions" { // special case + p.enc = (*Buffer).enc_exts + p.dec = nil // not needed + p.size = size_exts + } else if f.Name == "XXX_extensions" { // special case + p.enc = (*Buffer).enc_map + p.dec = nil // not needed + p.size = size_map + } else if f.Name == "XXX_unrecognized" { // special case + prop.unrecField = toField(&f) + } + oneof := f.Tag.Get("protobuf_oneof") // special case + if oneof != "" { + // Oneof fields don't use the traditional protobuf tag. + p.OrigName = oneof + } + prop.Prop[i] = p + prop.order[i] = i + if debug { + print(i, " ", f.Name, " ", t.String(), " ") + if p.Tag > 0 { + print(p.String()) + } + print("\n") + } + if p.enc == nil && !strings.HasPrefix(f.Name, "XXX_") && oneof == "" { + fmt.Fprintln(os.Stderr, "proto: no encoder for", f.Name, f.Type.String(), "[GetProperties]") + } + } + + // Re-order prop.order. + sort.Sort(prop) + + type oneofMessage interface { + XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{}) + } + if om, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); ok { + var oots []interface{} + prop.oneofMarshaler, prop.oneofUnmarshaler, prop.oneofSizer, oots = om.XXX_OneofFuncs() + prop.stype = t + + // Interpret oneof metadata. + prop.OneofTypes = make(map[string]*OneofProperties) + for _, oot := range oots { + oop := &OneofProperties{ + Type: reflect.ValueOf(oot).Type(), // *T + Prop: new(Properties), + } + sft := oop.Type.Elem().Field(0) + oop.Prop.Name = sft.Name + oop.Prop.Parse(sft.Tag.Get("protobuf")) + // There will be exactly one interface field that + // this new value is assignable to. + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + if f.Type.Kind() != reflect.Interface { + continue + } + if !oop.Type.AssignableTo(f.Type) { + continue + } + oop.Field = i + break + } + prop.OneofTypes[oop.Prop.OrigName] = oop + } + } + + // build required counts + // build tags + reqCount := 0 + prop.decoderOrigNames = make(map[string]int) + for i, p := range prop.Prop { + if strings.HasPrefix(p.Name, "XXX_") { + // Internal fields should not appear in tags/origNames maps. + // They are handled specially when encoding and decoding. + continue + } + if p.Required { + reqCount++ + } + prop.decoderTags.put(p.Tag, i) + prop.decoderOrigNames[p.OrigName] = i + } + prop.reqCount = reqCount + + return prop +} + +// Return the Properties object for the x[0]'th field of the structure. +func propByIndex(t reflect.Type, x []int) *Properties { + if len(x) != 1 { + fmt.Fprintf(os.Stderr, "proto: field index dimension %d (not 1) for type %s\n", len(x), t) + return nil + } + prop := GetProperties(t) + return prop.Prop[x[0]] +} + +// Get the address and type of a pointer to a struct from an interface. +func getbase(pb Message) (t reflect.Type, b structPointer, err error) { + if pb == nil { + err = ErrNil + return + } + // get the reflect type of the pointer to the struct. + t = reflect.TypeOf(pb) + // get the address of the struct. + value := reflect.ValueOf(pb) + b = toStructPointer(value) + return +} + +// A global registry of enum types. +// The generated code will register the generated maps by calling RegisterEnum. + +var enumValueMaps = make(map[string]map[string]int32) + +// RegisterEnum is called from the generated code to install the enum descriptor +// maps into the global table to aid parsing text format protocol buffers. +func RegisterEnum(typeName string, unusedNameMap map[int32]string, valueMap map[string]int32) { + if _, ok := enumValueMaps[typeName]; ok { + panic("proto: duplicate enum registered: " + typeName) + } + enumValueMaps[typeName] = valueMap +} + +// EnumValueMap returns the mapping from names to integers of the +// enum type enumType, or a nil if not found. +func EnumValueMap(enumType string) map[string]int32 { + return enumValueMaps[enumType] +} + +// A registry of all linked message types. +// The string is a fully-qualified proto name ("pkg.Message"). +var ( + protoTypes = make(map[string]reflect.Type) + revProtoTypes = make(map[reflect.Type]string) +) + +// RegisterType is called from generated code and maps from the fully qualified +// proto name to the type (pointer to struct) of the protocol buffer. +func RegisterType(x Message, name string) { + if _, ok := protoTypes[name]; ok { + // TODO: Some day, make this a panic. + log.Printf("proto: duplicate proto type registered: %s", name) + return + } + t := reflect.TypeOf(x) + protoTypes[name] = t + revProtoTypes[t] = name +} + +// MessageName returns the fully-qualified proto name for the given message type. +func MessageName(x Message) string { return revProtoTypes[reflect.TypeOf(x)] } + +// MessageType returns the message type (pointer to struct) for a named message. +func MessageType(name string) reflect.Type { return protoTypes[name] } + +// A registry of all linked proto files. +var ( + protoFiles = make(map[string][]byte) // file name => fileDescriptor +) + +// RegisterFile is called from generated code and maps from the +// full file name of a .proto file to its compressed FileDescriptorProto. +func RegisterFile(filename string, fileDescriptor []byte) { + protoFiles[filename] = fileDescriptor +} + +// FileDescriptor returns the compressed FileDescriptorProto for a .proto file. +func FileDescriptor(filename string) []byte { return protoFiles[filename] } diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/text.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/text.go new file mode 100644 index 0000000000000..8214ce326b54d --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/text.go @@ -0,0 +1,854 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto + +// Functions for writing the text protocol buffer format. + +import ( + "bufio" + "bytes" + "encoding" + "errors" + "fmt" + "io" + "log" + "math" + "reflect" + "sort" + "strings" +) + +var ( + newline = []byte("\n") + spaces = []byte(" ") + gtNewline = []byte(">\n") + endBraceNewline = []byte("}\n") + backslashN = []byte{'\\', 'n'} + backslashR = []byte{'\\', 'r'} + backslashT = []byte{'\\', 't'} + backslashDQ = []byte{'\\', '"'} + backslashBS = []byte{'\\', '\\'} + posInf = []byte("inf") + negInf = []byte("-inf") + nan = []byte("nan") +) + +type writer interface { + io.Writer + WriteByte(byte) error +} + +// textWriter is an io.Writer that tracks its indentation level. +type textWriter struct { + ind int + complete bool // if the current position is a complete line + compact bool // whether to write out as a one-liner + w writer +} + +func (w *textWriter) WriteString(s string) (n int, err error) { + if !strings.Contains(s, "\n") { + if !w.compact && w.complete { + w.writeIndent() + } + w.complete = false + return io.WriteString(w.w, s) + } + // WriteString is typically called without newlines, so this + // codepath and its copy are rare. We copy to avoid + // duplicating all of Write's logic here. + return w.Write([]byte(s)) +} + +func (w *textWriter) Write(p []byte) (n int, err error) { + newlines := bytes.Count(p, newline) + if newlines == 0 { + if !w.compact && w.complete { + w.writeIndent() + } + n, err = w.w.Write(p) + w.complete = false + return n, err + } + + frags := bytes.SplitN(p, newline, newlines+1) + if w.compact { + for i, frag := range frags { + if i > 0 { + if err := w.w.WriteByte(' '); err != nil { + return n, err + } + n++ + } + nn, err := w.w.Write(frag) + n += nn + if err != nil { + return n, err + } + } + return n, nil + } + + for i, frag := range frags { + if w.complete { + w.writeIndent() + } + nn, err := w.w.Write(frag) + n += nn + if err != nil { + return n, err + } + if i+1 < len(frags) { + if err := w.w.WriteByte('\n'); err != nil { + return n, err + } + n++ + } + } + w.complete = len(frags[len(frags)-1]) == 0 + return n, nil +} + +func (w *textWriter) WriteByte(c byte) error { + if w.compact && c == '\n' { + c = ' ' + } + if !w.compact && w.complete { + w.writeIndent() + } + err := w.w.WriteByte(c) + w.complete = c == '\n' + return err +} + +func (w *textWriter) indent() { w.ind++ } + +func (w *textWriter) unindent() { + if w.ind == 0 { + log.Printf("proto: textWriter unindented too far") + return + } + w.ind-- +} + +func writeName(w *textWriter, props *Properties) error { + if _, err := w.WriteString(props.OrigName); err != nil { + return err + } + if props.Wire != "group" { + return w.WriteByte(':') + } + return nil +} + +// raw is the interface satisfied by RawMessage. +type raw interface { + Bytes() []byte +} + +func requiresQuotes(u string) bool { + // When type URL contains any characters except [0-9A-Za-z./\-]*, it must be quoted. + for _, ch := range u { + switch { + case ch == '.' || ch == '/' || ch == '_': + continue + case '0' <= ch && ch <= '9': + continue + case 'A' <= ch && ch <= 'Z': + continue + case 'a' <= ch && ch <= 'z': + continue + default: + return true + } + } + return false +} + +// isAny reports whether sv is a google.protobuf.Any message +func isAny(sv reflect.Value) bool { + type wkt interface { + XXX_WellKnownType() string + } + t, ok := sv.Addr().Interface().(wkt) + return ok && t.XXX_WellKnownType() == "Any" +} + +// writeProto3Any writes an expanded google.protobuf.Any message. +// +// It returns (false, nil) if sv value can't be unmarshaled (e.g. because +// required messages are not linked in). +// +// It returns (true, error) when sv was written in expanded format or an error +// was encountered. +func (tm *TextMarshaler) writeProto3Any(w *textWriter, sv reflect.Value) (bool, error) { + turl := sv.FieldByName("TypeUrl") + val := sv.FieldByName("Value") + if !turl.IsValid() || !val.IsValid() { + return true, errors.New("proto: invalid google.protobuf.Any message") + } + + b, ok := val.Interface().([]byte) + if !ok { + return true, errors.New("proto: invalid google.protobuf.Any message") + } + + parts := strings.Split(turl.String(), "/") + mt := MessageType(parts[len(parts)-1]) + if mt == nil { + return false, nil + } + m := reflect.New(mt.Elem()) + if err := Unmarshal(b, m.Interface().(Message)); err != nil { + return false, nil + } + w.Write([]byte("[")) + u := turl.String() + if requiresQuotes(u) { + writeString(w, u) + } else { + w.Write([]byte(u)) + } + if w.compact { + w.Write([]byte("]:<")) + } else { + w.Write([]byte("]: <\n")) + w.ind++ + } + if err := tm.writeStruct(w, m.Elem()); err != nil { + return true, err + } + if w.compact { + w.Write([]byte("> ")) + } else { + w.ind-- + w.Write([]byte(">\n")) + } + return true, nil +} + +func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { + if tm.ExpandAny && isAny(sv) { + if canExpand, err := tm.writeProto3Any(w, sv); canExpand { + return err + } + } + st := sv.Type() + sprops := GetProperties(st) + for i := 0; i < sv.NumField(); i++ { + fv := sv.Field(i) + props := sprops.Prop[i] + name := st.Field(i).Name + + if strings.HasPrefix(name, "XXX_") { + // There are two XXX_ fields: + // XXX_unrecognized []byte + // XXX_extensions map[int32]proto.Extension + // The first is handled here; + // the second is handled at the bottom of this function. + if name == "XXX_unrecognized" && !fv.IsNil() { + if err := writeUnknownStruct(w, fv.Interface().([]byte)); err != nil { + return err + } + } + continue + } + if fv.Kind() == reflect.Ptr && fv.IsNil() { + // Field not filled in. This could be an optional field or + // a required field that wasn't filled in. Either way, there + // isn't anything we can show for it. + continue + } + if fv.Kind() == reflect.Slice && fv.IsNil() { + // Repeated field that is empty, or a bytes field that is unused. + continue + } + + if props.Repeated && fv.Kind() == reflect.Slice { + // Repeated field. + for j := 0; j < fv.Len(); j++ { + if err := writeName(w, props); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + v := fv.Index(j) + if v.Kind() == reflect.Ptr && v.IsNil() { + // A nil message in a repeated field is not valid, + // but we can handle that more gracefully than panicking. + if _, err := w.Write([]byte("\n")); err != nil { + return err + } + continue + } + if err := tm.writeAny(w, v, props); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + } + continue + } + if fv.Kind() == reflect.Map { + // Map fields are rendered as a repeated struct with key/value fields. + keys := fv.MapKeys() + sort.Sort(mapKeys(keys)) + for _, key := range keys { + val := fv.MapIndex(key) + if err := writeName(w, props); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + // open struct + if err := w.WriteByte('<'); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte('\n'); err != nil { + return err + } + } + w.indent() + // key + if _, err := w.WriteString("key:"); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + if err := tm.writeAny(w, key, props.mkeyprop); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + // nil values aren't legal, but we can avoid panicking because of them. + if val.Kind() != reflect.Ptr || !val.IsNil() { + // value + if _, err := w.WriteString("value:"); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + if err := tm.writeAny(w, val, props.mvalprop); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + } + // close struct + w.unindent() + if err := w.WriteByte('>'); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + } + continue + } + if props.proto3 && fv.Kind() == reflect.Slice && fv.Len() == 0 { + // empty bytes field + continue + } + if fv.Kind() != reflect.Ptr && fv.Kind() != reflect.Slice { + // proto3 non-repeated scalar field; skip if zero value + if isProto3Zero(fv) { + continue + } + } + + if fv.Kind() == reflect.Interface { + // Check if it is a oneof. + if st.Field(i).Tag.Get("protobuf_oneof") != "" { + // fv is nil, or holds a pointer to generated struct. + // That generated struct has exactly one field, + // which has a protobuf struct tag. + if fv.IsNil() { + continue + } + inner := fv.Elem().Elem() // interface -> *T -> T + tag := inner.Type().Field(0).Tag.Get("protobuf") + props = new(Properties) // Overwrite the outer props var, but not its pointee. + props.Parse(tag) + // Write the value in the oneof, not the oneof itself. + fv = inner.Field(0) + + // Special case to cope with malformed messages gracefully: + // If the value in the oneof is a nil pointer, don't panic + // in writeAny. + if fv.Kind() == reflect.Ptr && fv.IsNil() { + // Use errors.New so writeAny won't render quotes. + msg := errors.New("/* nil */") + fv = reflect.ValueOf(&msg).Elem() + } + } + } + + if err := writeName(w, props); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + if b, ok := fv.Interface().(raw); ok { + if err := writeRaw(w, b.Bytes()); err != nil { + return err + } + continue + } + + // Enums have a String method, so writeAny will work fine. + if err := tm.writeAny(w, fv, props); err != nil { + return err + } + + if err := w.WriteByte('\n'); err != nil { + return err + } + } + + // Extensions (the XXX_extensions field). + pv := sv.Addr() + if _, ok := extendable(pv.Interface()); ok { + if err := tm.writeExtensions(w, pv); err != nil { + return err + } + } + + return nil +} + +// writeRaw writes an uninterpreted raw message. +func writeRaw(w *textWriter, b []byte) error { + if err := w.WriteByte('<'); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte('\n'); err != nil { + return err + } + } + w.indent() + if err := writeUnknownStruct(w, b); err != nil { + return err + } + w.unindent() + if err := w.WriteByte('>'); err != nil { + return err + } + return nil +} + +// writeAny writes an arbitrary field. +func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Properties) error { + v = reflect.Indirect(v) + + // Floats have special cases. + if v.Kind() == reflect.Float32 || v.Kind() == reflect.Float64 { + x := v.Float() + var b []byte + switch { + case math.IsInf(x, 1): + b = posInf + case math.IsInf(x, -1): + b = negInf + case math.IsNaN(x): + b = nan + } + if b != nil { + _, err := w.Write(b) + return err + } + // Other values are handled below. + } + + // We don't attempt to serialise every possible value type; only those + // that can occur in protocol buffers. + switch v.Kind() { + case reflect.Slice: + // Should only be a []byte; repeated fields are handled in writeStruct. + if err := writeString(w, string(v.Bytes())); err != nil { + return err + } + case reflect.String: + if err := writeString(w, v.String()); err != nil { + return err + } + case reflect.Struct: + // Required/optional group/message. + var bra, ket byte = '<', '>' + if props != nil && props.Wire == "group" { + bra, ket = '{', '}' + } + if err := w.WriteByte(bra); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte('\n'); err != nil { + return err + } + } + w.indent() + if etm, ok := v.Interface().(encoding.TextMarshaler); ok { + text, err := etm.MarshalText() + if err != nil { + return err + } + if _, err = w.Write(text); err != nil { + return err + } + } else if err := tm.writeStruct(w, v); err != nil { + return err + } + w.unindent() + if err := w.WriteByte(ket); err != nil { + return err + } + default: + _, err := fmt.Fprint(w, v.Interface()) + return err + } + return nil +} + +// equivalent to C's isprint. +func isprint(c byte) bool { + return c >= 0x20 && c < 0x7f +} + +// writeString writes a string in the protocol buffer text format. +// It is similar to strconv.Quote except we don't use Go escape sequences, +// we treat the string as a byte sequence, and we use octal escapes. +// These differences are to maintain interoperability with the other +// languages' implementations of the text format. +func writeString(w *textWriter, s string) error { + // use WriteByte here to get any needed indent + if err := w.WriteByte('"'); err != nil { + return err + } + // Loop over the bytes, not the runes. + for i := 0; i < len(s); i++ { + var err error + // Divergence from C++: we don't escape apostrophes. + // There's no need to escape them, and the C++ parser + // copes with a naked apostrophe. + switch c := s[i]; c { + case '\n': + _, err = w.w.Write(backslashN) + case '\r': + _, err = w.w.Write(backslashR) + case '\t': + _, err = w.w.Write(backslashT) + case '"': + _, err = w.w.Write(backslashDQ) + case '\\': + _, err = w.w.Write(backslashBS) + default: + if isprint(c) { + err = w.w.WriteByte(c) + } else { + _, err = fmt.Fprintf(w.w, "\\%03o", c) + } + } + if err != nil { + return err + } + } + return w.WriteByte('"') +} + +func writeUnknownStruct(w *textWriter, data []byte) (err error) { + if !w.compact { + if _, err := fmt.Fprintf(w, "/* %d unknown bytes */\n", len(data)); err != nil { + return err + } + } + b := NewBuffer(data) + for b.index < len(b.buf) { + x, err := b.DecodeVarint() + if err != nil { + _, err := fmt.Fprintf(w, "/* %v */\n", err) + return err + } + wire, tag := x&7, x>>3 + if wire == WireEndGroup { + w.unindent() + if _, err := w.Write(endBraceNewline); err != nil { + return err + } + continue + } + if _, err := fmt.Fprint(w, tag); err != nil { + return err + } + if wire != WireStartGroup { + if err := w.WriteByte(':'); err != nil { + return err + } + } + if !w.compact || wire == WireStartGroup { + if err := w.WriteByte(' '); err != nil { + return err + } + } + switch wire { + case WireBytes: + buf, e := b.DecodeRawBytes(false) + if e == nil { + _, err = fmt.Fprintf(w, "%q", buf) + } else { + _, err = fmt.Fprintf(w, "/* %v */", e) + } + case WireFixed32: + x, err = b.DecodeFixed32() + err = writeUnknownInt(w, x, err) + case WireFixed64: + x, err = b.DecodeFixed64() + err = writeUnknownInt(w, x, err) + case WireStartGroup: + err = w.WriteByte('{') + w.indent() + case WireVarint: + x, err = b.DecodeVarint() + err = writeUnknownInt(w, x, err) + default: + _, err = fmt.Fprintf(w, "/* unknown wire type %d */", wire) + } + if err != nil { + return err + } + if err = w.WriteByte('\n'); err != nil { + return err + } + } + return nil +} + +func writeUnknownInt(w *textWriter, x uint64, err error) error { + if err == nil { + _, err = fmt.Fprint(w, x) + } else { + _, err = fmt.Fprintf(w, "/* %v */", err) + } + return err +} + +type int32Slice []int32 + +func (s int32Slice) Len() int { return len(s) } +func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] } +func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } + +// writeExtensions writes all the extensions in pv. +// pv is assumed to be a pointer to a protocol message struct that is extendable. +func (tm *TextMarshaler) writeExtensions(w *textWriter, pv reflect.Value) error { + emap := extensionMaps[pv.Type().Elem()] + ep, _ := extendable(pv.Interface()) + + // Order the extensions by ID. + // This isn't strictly necessary, but it will give us + // canonical output, which will also make testing easier. + m, mu := ep.extensionsRead() + if m == nil { + return nil + } + mu.Lock() + ids := make([]int32, 0, len(m)) + for id := range m { + ids = append(ids, id) + } + sort.Sort(int32Slice(ids)) + mu.Unlock() + + for _, extNum := range ids { + ext := m[extNum] + var desc *ExtensionDesc + if emap != nil { + desc = emap[extNum] + } + if desc == nil { + // Unknown extension. + if err := writeUnknownStruct(w, ext.enc); err != nil { + return err + } + continue + } + + pb, err := GetExtension(ep, desc) + if err != nil { + return fmt.Errorf("failed getting extension: %v", err) + } + + // Repeated extensions will appear as a slice. + if !desc.repeated() { + if err := tm.writeExtension(w, desc.Name, pb); err != nil { + return err + } + } else { + v := reflect.ValueOf(pb) + for i := 0; i < v.Len(); i++ { + if err := tm.writeExtension(w, desc.Name, v.Index(i).Interface()); err != nil { + return err + } + } + } + } + return nil +} + +func (tm *TextMarshaler) writeExtension(w *textWriter, name string, pb interface{}) error { + if _, err := fmt.Fprintf(w, "[%s]:", name); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + if err := tm.writeAny(w, reflect.ValueOf(pb), nil); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + return nil +} + +func (w *textWriter) writeIndent() { + if !w.complete { + return + } + remain := w.ind * 2 + for remain > 0 { + n := remain + if n > len(spaces) { + n = len(spaces) + } + w.w.Write(spaces[:n]) + remain -= n + } + w.complete = false +} + +// TextMarshaler is a configurable text format marshaler. +type TextMarshaler struct { + Compact bool // use compact text format (one line). + ExpandAny bool // expand google.protobuf.Any messages of known types +} + +// Marshal writes a given protocol buffer in text format. +// The only errors returned are from w. +func (tm *TextMarshaler) Marshal(w io.Writer, pb Message) error { + val := reflect.ValueOf(pb) + if pb == nil || val.IsNil() { + w.Write([]byte("")) + return nil + } + var bw *bufio.Writer + ww, ok := w.(writer) + if !ok { + bw = bufio.NewWriter(w) + ww = bw + } + aw := &textWriter{ + w: ww, + complete: true, + compact: tm.Compact, + } + + if etm, ok := pb.(encoding.TextMarshaler); ok { + text, err := etm.MarshalText() + if err != nil { + return err + } + if _, err = aw.Write(text); err != nil { + return err + } + if bw != nil { + return bw.Flush() + } + return nil + } + // Dereference the received pointer so we don't have outer < and >. + v := reflect.Indirect(val) + if err := tm.writeStruct(aw, v); err != nil { + return err + } + if bw != nil { + return bw.Flush() + } + return nil +} + +// Text is the same as Marshal, but returns the string directly. +func (tm *TextMarshaler) Text(pb Message) string { + var buf bytes.Buffer + tm.Marshal(&buf, pb) + return buf.String() +} + +var ( + defaultTextMarshaler = TextMarshaler{} + compactTextMarshaler = TextMarshaler{Compact: true} +) + +// TODO: consider removing some of the Marshal functions below. + +// MarshalText writes a given protocol buffer in text format. +// The only errors returned are from w. +func MarshalText(w io.Writer, pb Message) error { return defaultTextMarshaler.Marshal(w, pb) } + +// MarshalTextString is the same as MarshalText, but returns the string directly. +func MarshalTextString(pb Message) string { return defaultTextMarshaler.Text(pb) } + +// CompactText writes a given protocol buffer in compact text format (one line). +func CompactText(w io.Writer, pb Message) error { return compactTextMarshaler.Marshal(w, pb) } + +// CompactTextString is the same as CompactText, but returns the string directly. +func CompactTextString(pb Message) string { return compactTextMarshaler.Text(pb) } diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/text_parser.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/text_parser.go new file mode 100644 index 0000000000000..0b8c59f746eb7 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/golang/protobuf/proto/text_parser.go @@ -0,0 +1,880 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// 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. + +package proto + +// Functions for parsing the Text protocol buffer format. +// TODO: message sets. + +import ( + "encoding" + "errors" + "fmt" + "reflect" + "strconv" + "strings" + "unicode/utf8" +) + +type ParseError struct { + Message string + Line int // 1-based line number + Offset int // 0-based byte offset from start of input +} + +func (p *ParseError) Error() string { + if p.Line == 1 { + // show offset only for first line + return fmt.Sprintf("line 1.%d: %v", p.Offset, p.Message) + } + return fmt.Sprintf("line %d: %v", p.Line, p.Message) +} + +type token struct { + value string + err *ParseError + line int // line number + offset int // byte number from start of input, not start of line + unquoted string // the unquoted version of value, if it was a quoted string +} + +func (t *token) String() string { + if t.err == nil { + return fmt.Sprintf("%q (line=%d, offset=%d)", t.value, t.line, t.offset) + } + return fmt.Sprintf("parse error: %v", t.err) +} + +type textParser struct { + s string // remaining input + done bool // whether the parsing is finished (success or error) + backed bool // whether back() was called + offset, line int + cur token +} + +func newTextParser(s string) *textParser { + p := new(textParser) + p.s = s + p.line = 1 + p.cur.line = 1 + return p +} + +func (p *textParser) errorf(format string, a ...interface{}) *ParseError { + pe := &ParseError{fmt.Sprintf(format, a...), p.cur.line, p.cur.offset} + p.cur.err = pe + p.done = true + return pe +} + +// Numbers and identifiers are matched by [-+._A-Za-z0-9] +func isIdentOrNumberChar(c byte) bool { + switch { + case 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z': + return true + case '0' <= c && c <= '9': + return true + } + switch c { + case '-', '+', '.', '_': + return true + } + return false +} + +func isWhitespace(c byte) bool { + switch c { + case ' ', '\t', '\n', '\r': + return true + } + return false +} + +func isQuote(c byte) bool { + switch c { + case '"', '\'': + return true + } + return false +} + +func (p *textParser) skipWhitespace() { + i := 0 + for i < len(p.s) && (isWhitespace(p.s[i]) || p.s[i] == '#') { + if p.s[i] == '#' { + // comment; skip to end of line or input + for i < len(p.s) && p.s[i] != '\n' { + i++ + } + if i == len(p.s) { + break + } + } + if p.s[i] == '\n' { + p.line++ + } + i++ + } + p.offset += i + p.s = p.s[i:len(p.s)] + if len(p.s) == 0 { + p.done = true + } +} + +func (p *textParser) advance() { + // Skip whitespace + p.skipWhitespace() + if p.done { + return + } + + // Start of non-whitespace + p.cur.err = nil + p.cur.offset, p.cur.line = p.offset, p.line + p.cur.unquoted = "" + switch p.s[0] { + case '<', '>', '{', '}', ':', '[', ']', ';', ',', '/': + // Single symbol + p.cur.value, p.s = p.s[0:1], p.s[1:len(p.s)] + case '"', '\'': + // Quoted string + i := 1 + for i < len(p.s) && p.s[i] != p.s[0] && p.s[i] != '\n' { + if p.s[i] == '\\' && i+1 < len(p.s) { + // skip escaped char + i++ + } + i++ + } + if i >= len(p.s) || p.s[i] != p.s[0] { + p.errorf("unmatched quote") + return + } + unq, err := unquoteC(p.s[1:i], rune(p.s[0])) + if err != nil { + p.errorf("invalid quoted string %s: %v", p.s[0:i+1], err) + return + } + p.cur.value, p.s = p.s[0:i+1], p.s[i+1:len(p.s)] + p.cur.unquoted = unq + default: + i := 0 + for i < len(p.s) && isIdentOrNumberChar(p.s[i]) { + i++ + } + if i == 0 { + p.errorf("unexpected byte %#x", p.s[0]) + return + } + p.cur.value, p.s = p.s[0:i], p.s[i:len(p.s)] + } + p.offset += len(p.cur.value) +} + +var ( + errBadUTF8 = errors.New("proto: bad UTF-8") + errBadHex = errors.New("proto: bad hexadecimal") +) + +func unquoteC(s string, quote rune) (string, error) { + // This is based on C++'s tokenizer.cc. + // Despite its name, this is *not* parsing C syntax. + // For instance, "\0" is an invalid quoted string. + + // Avoid allocation in trivial cases. + simple := true + for _, r := range s { + if r == '\\' || r == quote { + simple = false + break + } + } + if simple { + return s, nil + } + + buf := make([]byte, 0, 3*len(s)/2) + for len(s) > 0 { + r, n := utf8.DecodeRuneInString(s) + if r == utf8.RuneError && n == 1 { + return "", errBadUTF8 + } + s = s[n:] + if r != '\\' { + if r < utf8.RuneSelf { + buf = append(buf, byte(r)) + } else { + buf = append(buf, string(r)...) + } + continue + } + + ch, tail, err := unescape(s) + if err != nil { + return "", err + } + buf = append(buf, ch...) + s = tail + } + return string(buf), nil +} + +func unescape(s string) (ch string, tail string, err error) { + r, n := utf8.DecodeRuneInString(s) + if r == utf8.RuneError && n == 1 { + return "", "", errBadUTF8 + } + s = s[n:] + switch r { + case 'a': + return "\a", s, nil + case 'b': + return "\b", s, nil + case 'f': + return "\f", s, nil + case 'n': + return "\n", s, nil + case 'r': + return "\r", s, nil + case 't': + return "\t", s, nil + case 'v': + return "\v", s, nil + case '?': + return "?", s, nil // trigraph workaround + case '\'', '"', '\\': + return string(r), s, nil + case '0', '1', '2', '3', '4', '5', '6', '7', 'x', 'X': + if len(s) < 2 { + return "", "", fmt.Errorf(`\%c requires 2 following digits`, r) + } + base := 8 + ss := s[:2] + s = s[2:] + if r == 'x' || r == 'X' { + base = 16 + } else { + ss = string(r) + ss + } + i, err := strconv.ParseUint(ss, base, 8) + if err != nil { + return "", "", err + } + return string([]byte{byte(i)}), s, nil + case 'u', 'U': + n := 4 + if r == 'U' { + n = 8 + } + if len(s) < n { + return "", "", fmt.Errorf(`\%c requires %d digits`, r, n) + } + + bs := make([]byte, n/2) + for i := 0; i < n; i += 2 { + a, ok1 := unhex(s[i]) + b, ok2 := unhex(s[i+1]) + if !ok1 || !ok2 { + return "", "", errBadHex + } + bs[i/2] = a<<4 | b + } + s = s[n:] + return string(bs), s, nil + } + return "", "", fmt.Errorf(`unknown escape \%c`, r) +} + +// Adapted from src/pkg/strconv/quote.go. +func unhex(b byte) (v byte, ok bool) { + switch { + case '0' <= b && b <= '9': + return b - '0', true + case 'a' <= b && b <= 'f': + return b - 'a' + 10, true + case 'A' <= b && b <= 'F': + return b - 'A' + 10, true + } + return 0, false +} + +// Back off the parser by one token. Can only be done between calls to next(). +// It makes the next advance() a no-op. +func (p *textParser) back() { p.backed = true } + +// Advances the parser and returns the new current token. +func (p *textParser) next() *token { + if p.backed || p.done { + p.backed = false + return &p.cur + } + p.advance() + if p.done { + p.cur.value = "" + } else if len(p.cur.value) > 0 && isQuote(p.cur.value[0]) { + // Look for multiple quoted strings separated by whitespace, + // and concatenate them. + cat := p.cur + for { + p.skipWhitespace() + if p.done || !isQuote(p.s[0]) { + break + } + p.advance() + if p.cur.err != nil { + return &p.cur + } + cat.value += " " + p.cur.value + cat.unquoted += p.cur.unquoted + } + p.done = false // parser may have seen EOF, but we want to return cat + p.cur = cat + } + return &p.cur +} + +func (p *textParser) consumeToken(s string) error { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value != s { + p.back() + return p.errorf("expected %q, found %q", s, tok.value) + } + return nil +} + +// Return a RequiredNotSetError indicating which required field was not set. +func (p *textParser) missingRequiredFieldError(sv reflect.Value) *RequiredNotSetError { + st := sv.Type() + sprops := GetProperties(st) + for i := 0; i < st.NumField(); i++ { + if !isNil(sv.Field(i)) { + continue + } + + props := sprops.Prop[i] + if props.Required { + return &RequiredNotSetError{fmt.Sprintf("%v.%v", st, props.OrigName)} + } + } + return &RequiredNotSetError{fmt.Sprintf("%v.", st)} // should not happen +} + +// Returns the index in the struct for the named field, as well as the parsed tag properties. +func structFieldByName(sprops *StructProperties, name string) (int, *Properties, bool) { + i, ok := sprops.decoderOrigNames[name] + if ok { + return i, sprops.Prop[i], true + } + return -1, nil, false +} + +// Consume a ':' from the input stream (if the next token is a colon), +// returning an error if a colon is needed but not present. +func (p *textParser) checkForColon(props *Properties, typ reflect.Type) *ParseError { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value != ":" { + // Colon is optional when the field is a group or message. + needColon := true + switch props.Wire { + case "group": + needColon = false + case "bytes": + // A "bytes" field is either a message, a string, or a repeated field; + // those three become *T, *string and []T respectively, so we can check for + // this field being a pointer to a non-string. + if typ.Kind() == reflect.Ptr { + // *T or *string + if typ.Elem().Kind() == reflect.String { + break + } + } else if typ.Kind() == reflect.Slice { + // []T or []*T + if typ.Elem().Kind() != reflect.Ptr { + break + } + } else if typ.Kind() == reflect.String { + // The proto3 exception is for a string field, + // which requires a colon. + break + } + needColon = false + } + if needColon { + return p.errorf("expected ':', found %q", tok.value) + } + p.back() + } + return nil +} + +func (p *textParser) readStruct(sv reflect.Value, terminator string) error { + st := sv.Type() + sprops := GetProperties(st) + reqCount := sprops.reqCount + var reqFieldErr error + fieldSet := make(map[string]bool) + // A struct is a sequence of "name: value", terminated by one of + // '>' or '}', or the end of the input. A name may also be + // "[extension]" or "[type/url]". + // + // The whole struct can also be an expanded Any message, like: + // [type/url] < ... struct contents ... > + for { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value == terminator { + break + } + if tok.value == "[" { + // Looks like an extension or an Any. + // + // TODO: Check whether we need to handle + // namespace rooted names (e.g. ".something.Foo"). + extName, err := p.consumeExtName() + if err != nil { + return err + } + + if s := strings.LastIndex(extName, "/"); s >= 0 { + // If it contains a slash, it's an Any type URL. + messageName := extName[s+1:] + mt := MessageType(messageName) + if mt == nil { + return p.errorf("unrecognized message %q in google.protobuf.Any", messageName) + } + tok = p.next() + if tok.err != nil { + return tok.err + } + // consume an optional colon + if tok.value == ":" { + tok = p.next() + if tok.err != nil { + return tok.err + } + } + var terminator string + switch tok.value { + case "<": + terminator = ">" + case "{": + terminator = "}" + default: + return p.errorf("expected '{' or '<', found %q", tok.value) + } + v := reflect.New(mt.Elem()) + if pe := p.readStruct(v.Elem(), terminator); pe != nil { + return pe + } + b, err := Marshal(v.Interface().(Message)) + if err != nil { + return p.errorf("failed to marshal message of type %q: %v", messageName, err) + } + sv.FieldByName("TypeUrl").SetString(extName) + sv.FieldByName("Value").SetBytes(b) + continue + } + + var desc *ExtensionDesc + // This could be faster, but it's functional. + // TODO: Do something smarter than a linear scan. + for _, d := range RegisteredExtensions(reflect.New(st).Interface().(Message)) { + if d.Name == extName { + desc = d + break + } + } + if desc == nil { + return p.errorf("unrecognized extension %q", extName) + } + + props := &Properties{} + props.Parse(desc.Tag) + + typ := reflect.TypeOf(desc.ExtensionType) + if err := p.checkForColon(props, typ); err != nil { + return err + } + + rep := desc.repeated() + + // Read the extension structure, and set it in + // the value we're constructing. + var ext reflect.Value + if !rep { + ext = reflect.New(typ).Elem() + } else { + ext = reflect.New(typ.Elem()).Elem() + } + if err := p.readAny(ext, props); err != nil { + if _, ok := err.(*RequiredNotSetError); !ok { + return err + } + reqFieldErr = err + } + ep := sv.Addr().Interface().(Message) + if !rep { + SetExtension(ep, desc, ext.Interface()) + } else { + old, err := GetExtension(ep, desc) + var sl reflect.Value + if err == nil { + sl = reflect.ValueOf(old) // existing slice + } else { + sl = reflect.MakeSlice(typ, 0, 1) + } + sl = reflect.Append(sl, ext) + SetExtension(ep, desc, sl.Interface()) + } + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + continue + } + + // This is a normal, non-extension field. + name := tok.value + var dst reflect.Value + fi, props, ok := structFieldByName(sprops, name) + if ok { + dst = sv.Field(fi) + } else if oop, ok := sprops.OneofTypes[name]; ok { + // It is a oneof. + props = oop.Prop + nv := reflect.New(oop.Type.Elem()) + dst = nv.Elem().Field(0) + sv.Field(oop.Field).Set(nv) + } + if !dst.IsValid() { + return p.errorf("unknown field name %q in %v", name, st) + } + + if dst.Kind() == reflect.Map { + // Consume any colon. + if err := p.checkForColon(props, dst.Type()); err != nil { + return err + } + + // Construct the map if it doesn't already exist. + if dst.IsNil() { + dst.Set(reflect.MakeMap(dst.Type())) + } + key := reflect.New(dst.Type().Key()).Elem() + val := reflect.New(dst.Type().Elem()).Elem() + + // The map entry should be this sequence of tokens: + // < key : KEY value : VALUE > + // However, implementations may omit key or value, and technically + // we should support them in any order. See b/28924776 for a time + // this went wrong. + + tok := p.next() + var terminator string + switch tok.value { + case "<": + terminator = ">" + case "{": + terminator = "}" + default: + return p.errorf("expected '{' or '<', found %q", tok.value) + } + for { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value == terminator { + break + } + switch tok.value { + case "key": + if err := p.consumeToken(":"); err != nil { + return err + } + if err := p.readAny(key, props.mkeyprop); err != nil { + return err + } + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + case "value": + if err := p.checkForColon(props.mvalprop, dst.Type().Elem()); err != nil { + return err + } + if err := p.readAny(val, props.mvalprop); err != nil { + return err + } + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + default: + p.back() + return p.errorf(`expected "key", "value", or %q, found %q`, terminator, tok.value) + } + } + + dst.SetMapIndex(key, val) + continue + } + + // Check that it's not already set if it's not a repeated field. + if !props.Repeated && fieldSet[name] { + return p.errorf("non-repeated field %q was repeated", name) + } + + if err := p.checkForColon(props, dst.Type()); err != nil { + return err + } + + // Parse into the field. + fieldSet[name] = true + if err := p.readAny(dst, props); err != nil { + if _, ok := err.(*RequiredNotSetError); !ok { + return err + } + reqFieldErr = err + } + if props.Required { + reqCount-- + } + + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + + } + + if reqCount > 0 { + return p.missingRequiredFieldError(sv) + } + return reqFieldErr +} + +// consumeExtName consumes extension name or expanded Any type URL and the +// following ']'. It returns the name or URL consumed. +func (p *textParser) consumeExtName() (string, error) { + tok := p.next() + if tok.err != nil { + return "", tok.err + } + + // If extension name or type url is quoted, it's a single token. + if len(tok.value) > 2 && isQuote(tok.value[0]) && tok.value[len(tok.value)-1] == tok.value[0] { + name, err := unquoteC(tok.value[1:len(tok.value)-1], rune(tok.value[0])) + if err != nil { + return "", err + } + return name, p.consumeToken("]") + } + + // Consume everything up to "]" + var parts []string + for tok.value != "]" { + parts = append(parts, tok.value) + tok = p.next() + if tok.err != nil { + return "", p.errorf("unrecognized type_url or extension name: %s", tok.err) + } + } + return strings.Join(parts, ""), nil +} + +// consumeOptionalSeparator consumes an optional semicolon or comma. +// It is used in readStruct to provide backward compatibility. +func (p *textParser) consumeOptionalSeparator() error { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value != ";" && tok.value != "," { + p.back() + } + return nil +} + +func (p *textParser) readAny(v reflect.Value, props *Properties) error { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value == "" { + return p.errorf("unexpected EOF") + } + + switch fv := v; fv.Kind() { + case reflect.Slice: + at := v.Type() + if at.Elem().Kind() == reflect.Uint8 { + // Special case for []byte + if tok.value[0] != '"' && tok.value[0] != '\'' { + // Deliberately written out here, as the error after + // this switch statement would write "invalid []byte: ...", + // which is not as user-friendly. + return p.errorf("invalid string: %v", tok.value) + } + bytes := []byte(tok.unquoted) + fv.Set(reflect.ValueOf(bytes)) + return nil + } + // Repeated field. + if tok.value == "[" { + // Repeated field with list notation, like [1,2,3]. + for { + fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem())) + err := p.readAny(fv.Index(fv.Len()-1), props) + if err != nil { + return err + } + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value == "]" { + break + } + if tok.value != "," { + return p.errorf("Expected ']' or ',' found %q", tok.value) + } + } + return nil + } + // One value of the repeated field. + p.back() + fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem())) + return p.readAny(fv.Index(fv.Len()-1), props) + case reflect.Bool: + // Either "true", "false", 1 or 0. + switch tok.value { + case "true", "1": + fv.SetBool(true) + return nil + case "false", "0": + fv.SetBool(false) + return nil + } + case reflect.Float32, reflect.Float64: + v := tok.value + // Ignore 'f' for compatibility with output generated by C++, but don't + // remove 'f' when the value is "-inf" or "inf". + if strings.HasSuffix(v, "f") && tok.value != "-inf" && tok.value != "inf" { + v = v[:len(v)-1] + } + if f, err := strconv.ParseFloat(v, fv.Type().Bits()); err == nil { + fv.SetFloat(f) + return nil + } + case reflect.Int32: + if x, err := strconv.ParseInt(tok.value, 0, 32); err == nil { + fv.SetInt(x) + return nil + } + + if len(props.Enum) == 0 { + break + } + m, ok := enumValueMaps[props.Enum] + if !ok { + break + } + x, ok := m[tok.value] + if !ok { + break + } + fv.SetInt(int64(x)) + return nil + case reflect.Int64: + if x, err := strconv.ParseInt(tok.value, 0, 64); err == nil { + fv.SetInt(x) + return nil + } + + case reflect.Ptr: + // A basic field (indirected through pointer), or a repeated message/group + p.back() + fv.Set(reflect.New(fv.Type().Elem())) + return p.readAny(fv.Elem(), props) + case reflect.String: + if tok.value[0] == '"' || tok.value[0] == '\'' { + fv.SetString(tok.unquoted) + return nil + } + case reflect.Struct: + var terminator string + switch tok.value { + case "{": + terminator = "}" + case "<": + terminator = ">" + default: + return p.errorf("expected '{' or '<', found %q", tok.value) + } + // TODO: Handle nested messages which implement encoding.TextUnmarshaler. + return p.readStruct(fv, terminator) + case reflect.Uint32: + if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil { + fv.SetUint(uint64(x)) + return nil + } + case reflect.Uint64: + if x, err := strconv.ParseUint(tok.value, 0, 64); err == nil { + fv.SetUint(x) + return nil + } + } + return p.errorf("invalid %v: %v", v.Type(), tok.value) +} + +// UnmarshalText reads a protocol buffer in Text format. UnmarshalText resets pb +// before starting to unmarshal, so any existing data in pb is always removed. +// If a required field is not set and no other error occurs, +// UnmarshalText returns *RequiredNotSetError. +func UnmarshalText(s string, pb Message) error { + if um, ok := pb.(encoding.TextUnmarshaler); ok { + err := um.UnmarshalText([]byte(s)) + return err + } + pb.Reset() + v := reflect.ValueOf(pb) + if pe := newTextParser(s).readStruct(v.Elem(), ""); pe != nil { + return pe + } + return nil +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/google/gofuzz/CONTRIBUTING.md b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/google/gofuzz/CONTRIBUTING.md new file mode 100644 index 0000000000000..51cf5cd1adaef --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/google/gofuzz/CONTRIBUTING.md @@ -0,0 +1,67 @@ +# How to contribute # + +We'd love to accept your patches and contributions to this project. There are +a just a few small guidelines you need to follow. + + +## Contributor License Agreement ## + +Contributions to any Google project must be accompanied by a Contributor +License Agreement. This is not a copyright **assignment**, it simply gives +Google permission to use and redistribute your contributions as part of the +project. + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual + CLA][]. + + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA][]. + +You generally only need to submit a CLA once, so if you've already submitted +one (even if it was for a different project), you probably don't need to do it +again. + +[individual CLA]: https://developers.google.com/open-source/cla/individual +[corporate CLA]: https://developers.google.com/open-source/cla/corporate + + +## Submitting a patch ## + + 1. It's generally best to start by opening a new issue describing the bug or + feature you're intending to fix. Even if you think it's relatively minor, + it's helpful to know what people are working on. Mention in the initial + issue that you are planning to work on that bug or feature so that it can + be assigned to you. + + 1. Follow the normal process of [forking][] the project, and setup a new + branch to work in. It's important that each group of changes be done in + separate branches in order to ensure that a pull request only includes the + commits related to that bug or feature. + + 1. Go makes it very simple to ensure properly formatted code, so always run + `go fmt` on your code before committing it. You should also run + [golint][] over your code. As noted in the [golint readme][], it's not + strictly necessary that your code be completely "lint-free", but this will + help you find common style issues. + + 1. Any significant changes should almost always be accompanied by tests. The + project already has good test coverage, so look at some of the existing + tests if you're unsure how to go about it. [gocov][] and [gocov-html][] + are invaluable tools for seeing which parts of your code aren't being + exercised by your tests. + + 1. Do your best to have [well-formed commit messages][] for each change. + This provides consistency throughout the project, and ensures that commit + messages are able to be formatted properly by various git tools. + + 1. Finally, push the commits to your fork and submit a [pull request][]. + +[forking]: https://help.github.com/articles/fork-a-repo +[golint]: https://github.com/golang/lint +[golint readme]: https://github.com/golang/lint/blob/master/README +[gocov]: https://github.com/axw/gocov +[gocov-html]: https://github.com/matm/gocov-html +[well-formed commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html +[squash]: http://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits +[pull request]: https://help.github.com/articles/creating-a-pull-request diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/google/gofuzz/LICENSE b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/google/gofuzz/LICENSE new file mode 100644 index 0000000000000..d645695673349 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/google/gofuzz/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/google/gofuzz/doc.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/google/gofuzz/doc.go new file mode 100644 index 0000000000000..9f9956d4a64fe --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/google/gofuzz/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2014 Google Inc. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package fuzz is a library for populating go objects with random values. +package fuzz diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/google/gofuzz/fuzz.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/google/gofuzz/fuzz.go new file mode 100644 index 0000000000000..42d9a48b3e2b7 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/google/gofuzz/fuzz.go @@ -0,0 +1,446 @@ +/* +Copyright 2014 Google Inc. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fuzz + +import ( + "fmt" + "math/rand" + "reflect" + "time" +) + +// fuzzFuncMap is a map from a type to a fuzzFunc that handles that type. +type fuzzFuncMap map[reflect.Type]reflect.Value + +// Fuzzer knows how to fill any object with random fields. +type Fuzzer struct { + fuzzFuncs fuzzFuncMap + defaultFuzzFuncs fuzzFuncMap + r *rand.Rand + nilChance float64 + minElements int + maxElements int +} + +// New returns a new Fuzzer. Customize your Fuzzer further by calling Funcs, +// RandSource, NilChance, or NumElements in any order. +func New() *Fuzzer { + f := &Fuzzer{ + defaultFuzzFuncs: fuzzFuncMap{ + reflect.TypeOf(&time.Time{}): reflect.ValueOf(fuzzTime), + }, + + fuzzFuncs: fuzzFuncMap{}, + r: rand.New(rand.NewSource(time.Now().UnixNano())), + nilChance: .2, + minElements: 1, + maxElements: 10, + } + return f +} + +// Funcs adds each entry in fuzzFuncs as a custom fuzzing function. +// +// Each entry in fuzzFuncs must be a function taking two parameters. +// The first parameter must be a pointer or map. It is the variable that +// function will fill with random data. The second parameter must be a +// fuzz.Continue, which will provide a source of randomness and a way +// to automatically continue fuzzing smaller pieces of the first parameter. +// +// These functions are called sensibly, e.g., if you wanted custom string +// fuzzing, the function `func(s *string, c fuzz.Continue)` would get +// called and passed the address of strings. Maps and pointers will always +// be made/new'd for you, ignoring the NilChange option. For slices, it +// doesn't make much sense to pre-create them--Fuzzer doesn't know how +// long you want your slice--so take a pointer to a slice, and make it +// yourself. (If you don't want your map/pointer type pre-made, take a +// pointer to it, and make it yourself.) See the examples for a range of +// custom functions. +func (f *Fuzzer) Funcs(fuzzFuncs ...interface{}) *Fuzzer { + for i := range fuzzFuncs { + v := reflect.ValueOf(fuzzFuncs[i]) + if v.Kind() != reflect.Func { + panic("Need only funcs!") + } + t := v.Type() + if t.NumIn() != 2 || t.NumOut() != 0 { + panic("Need 2 in and 0 out params!") + } + argT := t.In(0) + switch argT.Kind() { + case reflect.Ptr, reflect.Map: + default: + panic("fuzzFunc must take pointer or map type") + } + if t.In(1) != reflect.TypeOf(Continue{}) { + panic("fuzzFunc's second parameter must be type fuzz.Continue") + } + f.fuzzFuncs[argT] = v + } + return f +} + +// RandSource causes f to get values from the given source of randomness. +// Use if you want deterministic fuzzing. +func (f *Fuzzer) RandSource(s rand.Source) *Fuzzer { + f.r = rand.New(s) + return f +} + +// NilChance sets the probability of creating a nil pointer, map, or slice to +// 'p'. 'p' should be between 0 (no nils) and 1 (all nils), inclusive. +func (f *Fuzzer) NilChance(p float64) *Fuzzer { + if p < 0 || p > 1 { + panic("p should be between 0 and 1, inclusive.") + } + f.nilChance = p + return f +} + +// NumElements sets the minimum and maximum number of elements that will be +// added to a non-nil map or slice. +func (f *Fuzzer) NumElements(atLeast, atMost int) *Fuzzer { + if atLeast > atMost { + panic("atLeast must be <= atMost") + } + if atLeast < 0 { + panic("atLeast must be >= 0") + } + f.minElements = atLeast + f.maxElements = atMost + return f +} + +func (f *Fuzzer) genElementCount() int { + if f.minElements == f.maxElements { + return f.minElements + } + return f.minElements + f.r.Intn(f.maxElements-f.minElements) +} + +func (f *Fuzzer) genShouldFill() bool { + return f.r.Float64() > f.nilChance +} + +// Fuzz recursively fills all of obj's fields with something random. First +// this tries to find a custom fuzz function (see Funcs). If there is no +// custom function this tests whether the object implements fuzz.Interface and, +// if so, calls Fuzz on it to fuzz itself. If that fails, this will see if +// there is a default fuzz function provided by this package. If all of that +// fails, this will generate random values for all primitive fields and then +// recurse for all non-primitives. +// +// Not safe for cyclic or tree-like structs! +// +// obj must be a pointer. Only exported (public) fields can be set (thanks, golang :/ ) +// Intended for tests, so will panic on bad input or unimplemented fields. +func (f *Fuzzer) Fuzz(obj interface{}) { + v := reflect.ValueOf(obj) + if v.Kind() != reflect.Ptr { + panic("needed ptr!") + } + v = v.Elem() + f.doFuzz(v, 0) +} + +// FuzzNoCustom is just like Fuzz, except that any custom fuzz function for +// obj's type will not be called and obj will not be tested for fuzz.Interface +// conformance. This applies only to obj and not other instances of obj's +// type. +// Not safe for cyclic or tree-like structs! +// obj must be a pointer. Only exported (public) fields can be set (thanks, golang :/ ) +// Intended for tests, so will panic on bad input or unimplemented fields. +func (f *Fuzzer) FuzzNoCustom(obj interface{}) { + v := reflect.ValueOf(obj) + if v.Kind() != reflect.Ptr { + panic("needed ptr!") + } + v = v.Elem() + f.doFuzz(v, flagNoCustomFuzz) +} + +const ( + // Do not try to find a custom fuzz function. Does not apply recursively. + flagNoCustomFuzz uint64 = 1 << iota +) + +func (f *Fuzzer) doFuzz(v reflect.Value, flags uint64) { + if !v.CanSet() { + return + } + + if flags&flagNoCustomFuzz == 0 { + // Check for both pointer and non-pointer custom functions. + if v.CanAddr() && f.tryCustom(v.Addr()) { + return + } + if f.tryCustom(v) { + return + } + } + + if fn, ok := fillFuncMap[v.Kind()]; ok { + fn(v, f.r) + return + } + switch v.Kind() { + case reflect.Map: + if f.genShouldFill() { + v.Set(reflect.MakeMap(v.Type())) + n := f.genElementCount() + for i := 0; i < n; i++ { + key := reflect.New(v.Type().Key()).Elem() + f.doFuzz(key, 0) + val := reflect.New(v.Type().Elem()).Elem() + f.doFuzz(val, 0) + v.SetMapIndex(key, val) + } + return + } + v.Set(reflect.Zero(v.Type())) + case reflect.Ptr: + if f.genShouldFill() { + v.Set(reflect.New(v.Type().Elem())) + f.doFuzz(v.Elem(), 0) + return + } + v.Set(reflect.Zero(v.Type())) + case reflect.Slice: + if f.genShouldFill() { + n := f.genElementCount() + v.Set(reflect.MakeSlice(v.Type(), n, n)) + for i := 0; i < n; i++ { + f.doFuzz(v.Index(i), 0) + } + return + } + v.Set(reflect.Zero(v.Type())) + case reflect.Struct: + for i := 0; i < v.NumField(); i++ { + f.doFuzz(v.Field(i), 0) + } + case reflect.Array: + fallthrough + case reflect.Chan: + fallthrough + case reflect.Func: + fallthrough + case reflect.Interface: + fallthrough + default: + panic(fmt.Sprintf("Can't handle %#v", v.Interface())) + } +} + +// tryCustom searches for custom handlers, and returns true iff it finds a match +// and successfully randomizes v. +func (f *Fuzzer) tryCustom(v reflect.Value) bool { + // First: see if we have a fuzz function for it. + doCustom, ok := f.fuzzFuncs[v.Type()] + if !ok { + // Second: see if it can fuzz itself. + if v.CanInterface() { + intf := v.Interface() + if fuzzable, ok := intf.(Interface); ok { + fuzzable.Fuzz(Continue{f: f, Rand: f.r}) + return true + } + } + // Finally: see if there is a default fuzz function. + doCustom, ok = f.defaultFuzzFuncs[v.Type()] + if !ok { + return false + } + } + + switch v.Kind() { + case reflect.Ptr: + if v.IsNil() { + if !v.CanSet() { + return false + } + v.Set(reflect.New(v.Type().Elem())) + } + case reflect.Map: + if v.IsNil() { + if !v.CanSet() { + return false + } + v.Set(reflect.MakeMap(v.Type())) + } + default: + return false + } + + doCustom.Call([]reflect.Value{v, reflect.ValueOf(Continue{ + f: f, + Rand: f.r, + })}) + return true +} + +// Interface represents an object that knows how to fuzz itself. Any time we +// find a type that implements this interface we will delegate the act of +// fuzzing itself. +type Interface interface { + Fuzz(c Continue) +} + +// Continue can be passed to custom fuzzing functions to allow them to use +// the correct source of randomness and to continue fuzzing their members. +type Continue struct { + f *Fuzzer + + // For convenience, Continue implements rand.Rand via embedding. + // Use this for generating any randomness if you want your fuzzing + // to be repeatable for a given seed. + *rand.Rand +} + +// Fuzz continues fuzzing obj. obj must be a pointer. +func (c Continue) Fuzz(obj interface{}) { + v := reflect.ValueOf(obj) + if v.Kind() != reflect.Ptr { + panic("needed ptr!") + } + v = v.Elem() + c.f.doFuzz(v, 0) +} + +// FuzzNoCustom continues fuzzing obj, except that any custom fuzz function for +// obj's type will not be called and obj will not be tested for fuzz.Interface +// conformance. This applies only to obj and not other instances of obj's +// type. +func (c Continue) FuzzNoCustom(obj interface{}) { + v := reflect.ValueOf(obj) + if v.Kind() != reflect.Ptr { + panic("needed ptr!") + } + v = v.Elem() + c.f.doFuzz(v, flagNoCustomFuzz) +} + +// RandString makes a random string up to 20 characters long. The returned string +// may include a variety of (valid) UTF-8 encodings. +func (c Continue) RandString() string { + return randString(c.Rand) +} + +// RandUint64 makes random 64 bit numbers. +// Weirdly, rand doesn't have a function that gives you 64 random bits. +func (c Continue) RandUint64() uint64 { + return randUint64(c.Rand) +} + +// RandBool returns true or false randomly. +func (c Continue) RandBool() bool { + return randBool(c.Rand) +} + +func fuzzInt(v reflect.Value, r *rand.Rand) { + v.SetInt(int64(randUint64(r))) +} + +func fuzzUint(v reflect.Value, r *rand.Rand) { + v.SetUint(randUint64(r)) +} + +func fuzzTime(t *time.Time, c Continue) { + var sec, nsec int64 + // Allow for about 1000 years of random time values, which keeps things + // like JSON parsing reasonably happy. + sec = c.Rand.Int63n(1000 * 365 * 24 * 60 * 60) + c.Fuzz(&nsec) + *t = time.Unix(sec, nsec) +} + +var fillFuncMap = map[reflect.Kind]func(reflect.Value, *rand.Rand){ + reflect.Bool: func(v reflect.Value, r *rand.Rand) { + v.SetBool(randBool(r)) + }, + reflect.Int: fuzzInt, + reflect.Int8: fuzzInt, + reflect.Int16: fuzzInt, + reflect.Int32: fuzzInt, + reflect.Int64: fuzzInt, + reflect.Uint: fuzzUint, + reflect.Uint8: fuzzUint, + reflect.Uint16: fuzzUint, + reflect.Uint32: fuzzUint, + reflect.Uint64: fuzzUint, + reflect.Uintptr: fuzzUint, + reflect.Float32: func(v reflect.Value, r *rand.Rand) { + v.SetFloat(float64(r.Float32())) + }, + reflect.Float64: func(v reflect.Value, r *rand.Rand) { + v.SetFloat(r.Float64()) + }, + reflect.Complex64: func(v reflect.Value, r *rand.Rand) { + panic("unimplemented") + }, + reflect.Complex128: func(v reflect.Value, r *rand.Rand) { + panic("unimplemented") + }, + reflect.String: func(v reflect.Value, r *rand.Rand) { + v.SetString(randString(r)) + }, + reflect.UnsafePointer: func(v reflect.Value, r *rand.Rand) { + panic("unimplemented") + }, +} + +// randBool returns true or false randomly. +func randBool(r *rand.Rand) bool { + if r.Int()&1 == 1 { + return true + } + return false +} + +type charRange struct { + first, last rune +} + +// choose returns a random unicode character from the given range, using the +// given randomness source. +func (r *charRange) choose(rand *rand.Rand) rune { + count := int64(r.last - r.first) + return r.first + rune(rand.Int63n(count)) +} + +var unicodeRanges = []charRange{ + {' ', '~'}, // ASCII characters + {'\u00a0', '\u02af'}, // Multi-byte encoded characters + {'\u4e00', '\u9fff'}, // Common CJK (even longer encodings) +} + +// randString makes a random string up to 20 characters long. The returned string +// may include a variety of (valid) UTF-8 encodings. +func randString(r *rand.Rand) string { + n := r.Intn(20) + runes := make([]rune, n) + for i := range runes { + runes[i] = unicodeRanges[r.Intn(len(unicodeRanges))].choose(r) + } + return string(runes) +} + +// randUint64 makes random 64 bit numbers. +// Weirdly, rand doesn't have a function that gives you 64 random bits. +func randUint64(r *rand.Rand) uint64 { + return uint64(r.Uint32())<<32 | uint64(r.Uint32()) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/imdario/mergo/LICENSE b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/imdario/mergo/LICENSE new file mode 100644 index 0000000000000..686680298da2f --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/imdario/mergo/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2013 Dario Castañé. All rights reserved. +Copyright (c) 2012 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. diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/imdario/mergo/doc.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/imdario/mergo/doc.go new file mode 100644 index 0000000000000..6e9aa7baf3540 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/imdario/mergo/doc.go @@ -0,0 +1,44 @@ +// Copyright 2013 Dario Castañé. All rights reserved. +// 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. + +/* +Package mergo merges same-type structs and maps by setting default values in zero-value fields. + +Mergo won't merge unexported (private) fields but will do recursively any exported one. It also won't merge structs inside maps (because they are not addressable using Go reflection). + +Usage + +From my own work-in-progress project: + + type networkConfig struct { + Protocol string + Address string + ServerType string `json: "server_type"` + Port uint16 + } + + type FssnConfig struct { + Network networkConfig + } + + var fssnDefault = FssnConfig { + networkConfig { + "tcp", + "127.0.0.1", + "http", + 31560, + }, + } + + // Inside a function [...] + + if err := mergo.Merge(&config, fssnDefault); err != nil { + log.Fatal(err) + } + + // More code [...] + +*/ +package mergo diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/imdario/mergo/map.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/imdario/mergo/map.go new file mode 100644 index 0000000000000..44361e88bebdb --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/imdario/mergo/map.go @@ -0,0 +1,146 @@ +// Copyright 2014 Dario Castañé. All rights reserved. +// 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. + +// Based on src/pkg/reflect/deepequal.go from official +// golang's stdlib. + +package mergo + +import ( + "fmt" + "reflect" + "unicode" + "unicode/utf8" +) + +func changeInitialCase(s string, mapper func(rune) rune) string { + if s == "" { + return s + } + r, n := utf8.DecodeRuneInString(s) + return string(mapper(r)) + s[n:] +} + +func isExported(field reflect.StructField) bool { + r, _ := utf8.DecodeRuneInString(field.Name) + return r >= 'A' && r <= 'Z' +} + +// Traverses recursively both values, assigning src's fields values to dst. +// The map argument tracks comparisons that have already been seen, which allows +// short circuiting on recursive types. +func deepMap(dst, src reflect.Value, visited map[uintptr]*visit, depth int) (err error) { + if dst.CanAddr() { + addr := dst.UnsafeAddr() + h := 17 * addr + seen := visited[h] + typ := dst.Type() + for p := seen; p != nil; p = p.next { + if p.ptr == addr && p.typ == typ { + return nil + } + } + // Remember, remember... + visited[h] = &visit{addr, typ, seen} + } + zeroValue := reflect.Value{} + switch dst.Kind() { + case reflect.Map: + dstMap := dst.Interface().(map[string]interface{}) + for i, n := 0, src.NumField(); i < n; i++ { + srcType := src.Type() + field := srcType.Field(i) + if !isExported(field) { + continue + } + fieldName := field.Name + fieldName = changeInitialCase(fieldName, unicode.ToLower) + if v, ok := dstMap[fieldName]; !ok || isEmptyValue(reflect.ValueOf(v)) { + dstMap[fieldName] = src.Field(i).Interface() + } + } + case reflect.Struct: + srcMap := src.Interface().(map[string]interface{}) + for key := range srcMap { + srcValue := srcMap[key] + fieldName := changeInitialCase(key, unicode.ToUpper) + dstElement := dst.FieldByName(fieldName) + if dstElement == zeroValue { + // We discard it because the field doesn't exist. + continue + } + srcElement := reflect.ValueOf(srcValue) + dstKind := dstElement.Kind() + srcKind := srcElement.Kind() + if srcKind == reflect.Ptr && dstKind != reflect.Ptr { + srcElement = srcElement.Elem() + srcKind = reflect.TypeOf(srcElement.Interface()).Kind() + } else if dstKind == reflect.Ptr { + // Can this work? I guess it can't. + if srcKind != reflect.Ptr && srcElement.CanAddr() { + srcPtr := srcElement.Addr() + srcElement = reflect.ValueOf(srcPtr) + srcKind = reflect.Ptr + } + } + if !srcElement.IsValid() { + continue + } + if srcKind == dstKind { + if err = deepMerge(dstElement, srcElement, visited, depth+1); err != nil { + return + } + } else { + if srcKind == reflect.Map { + if err = deepMap(dstElement, srcElement, visited, depth+1); err != nil { + return + } + } else { + return fmt.Errorf("type mismatch on %s field: found %v, expected %v", fieldName, srcKind, dstKind) + } + } + } + } + return +} + +// Map sets fields' values in dst from src. +// src can be a map with string keys or a struct. dst must be the opposite: +// if src is a map, dst must be a valid pointer to struct. If src is a struct, +// dst must be map[string]interface{}. +// It won't merge unexported (private) fields and will do recursively +// any exported field. +// If dst is a map, keys will be src fields' names in lower camel case. +// Missing key in src that doesn't match a field in dst will be skipped. This +// doesn't apply if dst is a map. +// This is separated method from Merge because it is cleaner and it keeps sane +// semantics: merging equal types, mapping different (restricted) types. +func Map(dst, src interface{}) error { + var ( + vDst, vSrc reflect.Value + err error + ) + if vDst, vSrc, err = resolveValues(dst, src); err != nil { + return err + } + // To be friction-less, we redirect equal-type arguments + // to deepMerge. Only because arguments can be anything. + if vSrc.Kind() == vDst.Kind() { + return deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0) + } + switch vSrc.Kind() { + case reflect.Struct: + if vDst.Kind() != reflect.Map { + return ErrExpectedMapAsDestination + } + case reflect.Map: + if vDst.Kind() != reflect.Struct { + return ErrExpectedStructAsDestination + } + default: + return ErrNotSupported + } + return deepMap(vDst, vSrc, make(map[uintptr]*visit), 0) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/imdario/mergo/merge.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/imdario/mergo/merge.go new file mode 100644 index 0000000000000..5d328b1fe7742 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/imdario/mergo/merge.go @@ -0,0 +1,99 @@ +// Copyright 2013 Dario Castañé. All rights reserved. +// 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. + +// Based on src/pkg/reflect/deepequal.go from official +// golang's stdlib. + +package mergo + +import ( + "reflect" +) + +// Traverses recursively both values, assigning src's fields values to dst. +// The map argument tracks comparisons that have already been seen, which allows +// short circuiting on recursive types. +func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int) (err error) { + if !src.IsValid() { + return + } + if dst.CanAddr() { + addr := dst.UnsafeAddr() + h := 17 * addr + seen := visited[h] + typ := dst.Type() + for p := seen; p != nil; p = p.next { + if p.ptr == addr && p.typ == typ { + return nil + } + } + // Remember, remember... + visited[h] = &visit{addr, typ, seen} + } + switch dst.Kind() { + case reflect.Struct: + for i, n := 0, dst.NumField(); i < n; i++ { + if err = deepMerge(dst.Field(i), src.Field(i), visited, depth+1); err != nil { + return + } + } + case reflect.Map: + for _, key := range src.MapKeys() { + srcElement := src.MapIndex(key) + if !srcElement.IsValid() { + continue + } + dstElement := dst.MapIndex(key) + switch reflect.TypeOf(srcElement.Interface()).Kind() { + case reflect.Struct: + fallthrough + case reflect.Map: + if err = deepMerge(dstElement, srcElement, visited, depth+1); err != nil { + return + } + } + if !dstElement.IsValid() { + dst.SetMapIndex(key, srcElement) + } + } + case reflect.Ptr: + fallthrough + case reflect.Interface: + if src.IsNil() { + break + } else if dst.IsNil() { + if dst.CanSet() && isEmptyValue(dst) { + dst.Set(src) + } + } else if err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1); err != nil { + return + } + default: + if dst.CanSet() && !isEmptyValue(src) { + dst.Set(src) + } + } + return +} + +// Merge sets fields' values in dst from src if they have a zero +// value of their type. +// dst and src must be valid same-type structs and dst must be +// a pointer to struct. +// It won't merge unexported (private) fields and will do recursively +// any exported field. +func Merge(dst, src interface{}) error { + var ( + vDst, vSrc reflect.Value + err error + ) + if vDst, vSrc, err = resolveValues(dst, src); err != nil { + return err + } + if vDst.Type() != vSrc.Type() { + return ErrDifferentArgumentsTypes + } + return deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/imdario/mergo/mergo.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/imdario/mergo/mergo.go new file mode 100644 index 0000000000000..f8a0991ec63e4 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/imdario/mergo/mergo.go @@ -0,0 +1,90 @@ +// Copyright 2013 Dario Castañé. All rights reserved. +// 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. + +// Based on src/pkg/reflect/deepequal.go from official +// golang's stdlib. + +package mergo + +import ( + "errors" + "reflect" +) + +// Errors reported by Mergo when it finds invalid arguments. +var ( + ErrNilArguments = errors.New("src and dst must not be nil") + ErrDifferentArgumentsTypes = errors.New("src and dst must be of same type") + ErrNotSupported = errors.New("only structs and maps are supported") + ErrExpectedMapAsDestination = errors.New("dst was expected to be a map") + ErrExpectedStructAsDestination = errors.New("dst was expected to be a struct") +) + +// During deepMerge, must keep track of checks that are +// in progress. The comparison algorithm assumes that all +// checks in progress are true when it reencounters them. +// Visited are stored in a map indexed by 17 * a1 + a2; +type visit struct { + ptr uintptr + typ reflect.Type + next *visit +} + +// From src/pkg/encoding/json. +func isEmptyValue(v reflect.Value) bool { + switch v.Kind() { + case reflect.Array, reflect.Map, reflect.Slice, reflect.String: + return v.Len() == 0 + case reflect.Bool: + return !v.Bool() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.Interface, reflect.Ptr: + return v.IsNil() + } + return false +} + +func resolveValues(dst, src interface{}) (vDst, vSrc reflect.Value, err error) { + if dst == nil || src == nil { + err = ErrNilArguments + return + } + vDst = reflect.ValueOf(dst).Elem() + if vDst.Kind() != reflect.Struct && vDst.Kind() != reflect.Map { + err = ErrNotSupported + return + } + vSrc = reflect.ValueOf(src) + // We check if vSrc is a pointer to dereference it. + if vSrc.Kind() == reflect.Ptr { + vSrc = vSrc.Elem() + } + return +} + +// Traverses recursively both values, assigning src's fields values to dst. +// The map argument tracks comparisons that have already been seen, which allows +// short circuiting on recursive types. +func deeper(dst, src reflect.Value, visited map[uintptr]*visit, depth int) (err error) { + if dst.CanAddr() { + addr := dst.UnsafeAddr() + h := 17 * addr + seen := visited[h] + typ := dst.Type() + for p := seen; p != nil; p = p.next { + if p.ptr == addr && p.typ == typ { + return nil + } + } + // Remember, remember... + visited[h] = &visit{addr, typ, seen} + } + return // TODO refactor +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/juju/ratelimit/LICENSE b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/juju/ratelimit/LICENSE new file mode 100644 index 0000000000000..ade9307b390c0 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/juju/ratelimit/LICENSE @@ -0,0 +1,191 @@ +All files in this repository are licensed as follows. If you contribute +to this repository, it is assumed that you license your contribution +under the same license unless you state otherwise. + +All files Copyright (C) 2015 Canonical Ltd. unless otherwise specified in the file. + +This software is licensed under the LGPLv3, included below. + +As a special exception to the GNU Lesser General Public License version 3 +("LGPL3"), the copyright holders of this Library give you permission to +convey to a third party a Combined Work that links statically or dynamically +to this Library without providing any Minimal Corresponding Source or +Minimal Application Code as set out in 4d or providing the installation +information set out in section 4e, provided that you comply with the other +provisions of LGPL3 and provided that you meet, for the Application the +terms and conditions of the license(s) which apply to the Application. + +Except as stated in this special exception, the provisions of LGPL3 will +continue to comply in full to this Library. If you modify this Library, you +may apply this exception to your version of this Library, but you are not +obliged to do so. If you do not wish to do so, delete this exception +statement from your version. This exception does not (and cannot) modify any +license terms which apply to the Application, with which you must still +comply. + + + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/juju/ratelimit/ratelimit.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/juju/ratelimit/ratelimit.go new file mode 100644 index 0000000000000..3ef32fbcc0984 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/juju/ratelimit/ratelimit.go @@ -0,0 +1,245 @@ +// Copyright 2014 Canonical Ltd. +// Licensed under the LGPLv3 with static-linking exception. +// See LICENCE file for details. + +// The ratelimit package provides an efficient token bucket implementation +// that can be used to limit the rate of arbitrary things. +// See http://en.wikipedia.org/wiki/Token_bucket. +package ratelimit + +import ( + "math" + "strconv" + "sync" + "time" +) + +// Bucket represents a token bucket that fills at a predetermined rate. +// Methods on Bucket may be called concurrently. +type Bucket struct { + startTime time.Time + capacity int64 + quantum int64 + fillInterval time.Duration + + // The mutex guards the fields following it. + mu sync.Mutex + + // avail holds the number of available tokens + // in the bucket, as of availTick ticks from startTime. + // It will be negative when there are consumers + // waiting for tokens. + avail int64 + availTick int64 +} + +// NewBucket returns a new token bucket that fills at the +// rate of one token every fillInterval, up to the given +// maximum capacity. Both arguments must be +// positive. The bucket is initially full. +func NewBucket(fillInterval time.Duration, capacity int64) *Bucket { + return NewBucketWithQuantum(fillInterval, capacity, 1) +} + +// rateMargin specifes the allowed variance of actual +// rate from specified rate. 1% seems reasonable. +const rateMargin = 0.01 + +// NewBucketWithRate returns a token bucket that fills the bucket +// at the rate of rate tokens per second up to the given +// maximum capacity. Because of limited clock resolution, +// at high rates, the actual rate may be up to 1% different from the +// specified rate. +func NewBucketWithRate(rate float64, capacity int64) *Bucket { + for quantum := int64(1); quantum < 1<<50; quantum = nextQuantum(quantum) { + fillInterval := time.Duration(1e9 * float64(quantum) / rate) + if fillInterval <= 0 { + continue + } + tb := NewBucketWithQuantum(fillInterval, capacity, quantum) + if diff := math.Abs(tb.Rate() - rate); diff/rate <= rateMargin { + return tb + } + } + panic("cannot find suitable quantum for " + strconv.FormatFloat(rate, 'g', -1, 64)) +} + +// nextQuantum returns the next quantum to try after q. +// We grow the quantum exponentially, but slowly, so we +// get a good fit in the lower numbers. +func nextQuantum(q int64) int64 { + q1 := q * 11 / 10 + if q1 == q { + q1++ + } + return q1 +} + +// NewBucketWithQuantum is similar to NewBucket, but allows +// the specification of the quantum size - quantum tokens +// are added every fillInterval. +func NewBucketWithQuantum(fillInterval time.Duration, capacity, quantum int64) *Bucket { + if fillInterval <= 0 { + panic("token bucket fill interval is not > 0") + } + if capacity <= 0 { + panic("token bucket capacity is not > 0") + } + if quantum <= 0 { + panic("token bucket quantum is not > 0") + } + return &Bucket{ + startTime: time.Now(), + capacity: capacity, + quantum: quantum, + avail: capacity, + fillInterval: fillInterval, + } +} + +// Wait takes count tokens from the bucket, waiting until they are +// available. +func (tb *Bucket) Wait(count int64) { + if d := tb.Take(count); d > 0 { + time.Sleep(d) + } +} + +// WaitMaxDuration is like Wait except that it will +// only take tokens from the bucket if it needs to wait +// for no greater than maxWait. It reports whether +// any tokens have been removed from the bucket +// If no tokens have been removed, it returns immediately. +func (tb *Bucket) WaitMaxDuration(count int64, maxWait time.Duration) bool { + d, ok := tb.TakeMaxDuration(count, maxWait) + if d > 0 { + time.Sleep(d) + } + return ok +} + +const infinityDuration time.Duration = 0x7fffffffffffffff + +// Take takes count tokens from the bucket without blocking. It returns +// the time that the caller should wait until the tokens are actually +// available. +// +// Note that if the request is irrevocable - there is no way to return +// tokens to the bucket once this method commits us to taking them. +func (tb *Bucket) Take(count int64) time.Duration { + d, _ := tb.take(time.Now(), count, infinityDuration) + return d +} + +// TakeMaxDuration is like Take, except that +// it will only take tokens from the bucket if the wait +// time for the tokens is no greater than maxWait. +// +// If it would take longer than maxWait for the tokens +// to become available, it does nothing and reports false, +// otherwise it returns the time that the caller should +// wait until the tokens are actually available, and reports +// true. +func (tb *Bucket) TakeMaxDuration(count int64, maxWait time.Duration) (time.Duration, bool) { + return tb.take(time.Now(), count, maxWait) +} + +// TakeAvailable takes up to count immediately available tokens from the +// bucket. It returns the number of tokens removed, or zero if there are +// no available tokens. It does not block. +func (tb *Bucket) TakeAvailable(count int64) int64 { + return tb.takeAvailable(time.Now(), count) +} + +// takeAvailable is the internal version of TakeAvailable - it takes the +// current time as an argument to enable easy testing. +func (tb *Bucket) takeAvailable(now time.Time, count int64) int64 { + if count <= 0 { + return 0 + } + tb.mu.Lock() + defer tb.mu.Unlock() + + tb.adjust(now) + if tb.avail <= 0 { + return 0 + } + if count > tb.avail { + count = tb.avail + } + tb.avail -= count + return count +} + +// Available returns the number of available tokens. It will be negative +// when there are consumers waiting for tokens. Note that if this +// returns greater than zero, it does not guarantee that calls that take +// tokens from the buffer will succeed, as the number of available +// tokens could have changed in the meantime. This method is intended +// primarily for metrics reporting and debugging. +func (tb *Bucket) Available() int64 { + return tb.available(time.Now()) +} + +// available is the internal version of available - it takes the current time as +// an argument to enable easy testing. +func (tb *Bucket) available(now time.Time) int64 { + tb.mu.Lock() + defer tb.mu.Unlock() + tb.adjust(now) + return tb.avail +} + +// Capacity returns the capacity that the bucket was created with. +func (tb *Bucket) Capacity() int64 { + return tb.capacity +} + +// Rate returns the fill rate of the bucket, in tokens per second. +func (tb *Bucket) Rate() float64 { + return 1e9 * float64(tb.quantum) / float64(tb.fillInterval) +} + +// take is the internal version of Take - it takes the current time as +// an argument to enable easy testing. +func (tb *Bucket) take(now time.Time, count int64, maxWait time.Duration) (time.Duration, bool) { + if count <= 0 { + return 0, true + } + tb.mu.Lock() + defer tb.mu.Unlock() + + currentTick := tb.adjust(now) + avail := tb.avail - count + if avail >= 0 { + tb.avail = avail + return 0, true + } + // Round up the missing tokens to the nearest multiple + // of quantum - the tokens won't be available until + // that tick. + endTick := currentTick + (-avail+tb.quantum-1)/tb.quantum + endTime := tb.startTime.Add(time.Duration(endTick) * tb.fillInterval) + waitTime := endTime.Sub(now) + if waitTime > maxWait { + return 0, false + } + tb.avail = avail + return waitTime, true +} + +// adjust adjusts the current bucket capacity based on the current time. +// It returns the current tick. +func (tb *Bucket) adjust(now time.Time) (currentTick int64) { + currentTick = int64(now.Sub(tb.startTime) / tb.fillInterval) + + if tb.avail >= tb.capacity { + return + } + tb.avail += (currentTick - tb.availTick) * tb.quantum + if tb.avail > tb.capacity { + tb.avail = tb.capacity + } + tb.availTick = currentTick + return +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/juju/ratelimit/reader.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/juju/ratelimit/reader.go new file mode 100644 index 0000000000000..6403bf78d4a56 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/juju/ratelimit/reader.go @@ -0,0 +1,51 @@ +// Copyright 2014 Canonical Ltd. +// Licensed under the LGPLv3 with static-linking exception. +// See LICENCE file for details. + +package ratelimit + +import "io" + +type reader struct { + r io.Reader + bucket *Bucket +} + +// Reader returns a reader that is rate limited by +// the given token bucket. Each token in the bucket +// represents one byte. +func Reader(r io.Reader, bucket *Bucket) io.Reader { + return &reader{ + r: r, + bucket: bucket, + } +} + +func (r *reader) Read(buf []byte) (int, error) { + n, err := r.r.Read(buf) + if n <= 0 { + return n, err + } + r.bucket.Wait(int64(n)) + return n, err +} + +type writer struct { + w io.Writer + bucket *Bucket +} + +// Writer returns a reader that is rate limited by +// the given token bucket. Each token in the bucket +// represents one byte. +func Writer(w io.Writer, bucket *Bucket) io.Writer { + return &writer{ + w: w, + bucket: bucket, + } +} + +func (w *writer) Write(buf []byte) (int, error) { + w.bucket.Wait(int64(len(buf))) + return w.w.Write(buf) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/matttproud/golang_protobuf_extensions/LICENSE b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/matttproud/golang_protobuf_extensions/LICENSE new file mode 100644 index 0000000000000..13f15dfce0c54 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/matttproud/golang_protobuf_extensions/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2013 Matt T. Proud + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/decode.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/decode.go new file mode 100644 index 0000000000000..66d9b5458f8ea --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/decode.go @@ -0,0 +1,75 @@ +// Copyright 2013 Matt T. Proud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pbutil + +import ( + "encoding/binary" + "errors" + "io" + + "github.com/golang/protobuf/proto" +) + +var errInvalidVarint = errors.New("invalid varint32 encountered") + +// ReadDelimited decodes a message from the provided length-delimited stream, +// where the length is encoded as 32-bit varint prefix to the message body. +// It returns the total number of bytes read and any applicable error. This is +// roughly equivalent to the companion Java API's +// MessageLite#parseDelimitedFrom. As per the reader contract, this function +// calls r.Read repeatedly as required until exactly one message including its +// prefix is read and decoded (or an error has occurred). The function never +// reads more bytes from the stream than required. The function never returns +// an error if a message has been read and decoded correctly, even if the end +// of the stream has been reached in doing so. In that case, any subsequent +// calls return (0, io.EOF). +func ReadDelimited(r io.Reader, m proto.Message) (n int, err error) { + // Per AbstractParser#parsePartialDelimitedFrom with + // CodedInputStream#readRawVarint32. + headerBuf := make([]byte, binary.MaxVarintLen32) + var bytesRead, varIntBytes int + var messageLength uint64 + for varIntBytes == 0 { // i.e. no varint has been decoded yet. + if bytesRead >= len(headerBuf) { + return bytesRead, errInvalidVarint + } + // We have to read byte by byte here to avoid reading more bytes + // than required. Each read byte is appended to what we have + // read before. + newBytesRead, err := r.Read(headerBuf[bytesRead : bytesRead+1]) + if newBytesRead == 0 { + if err != nil { + return bytesRead, err + } + // A Reader should not return (0, nil), but if it does, + // it should be treated as no-op (according to the + // Reader contract). So let's go on... + continue + } + bytesRead += newBytesRead + // Now present everything read so far to the varint decoder and + // see if a varint can be decoded already. + messageLength, varIntBytes = proto.DecodeVarint(headerBuf[:bytesRead]) + } + + messageBuf := make([]byte, messageLength) + newBytesRead, err := io.ReadFull(r, messageBuf) + bytesRead += newBytesRead + if err != nil { + return bytesRead, err + } + + return bytesRead, proto.Unmarshal(messageBuf, m) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/doc.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/doc.go new file mode 100644 index 0000000000000..c318385cbed0e --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/doc.go @@ -0,0 +1,16 @@ +// Copyright 2013 Matt T. Proud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package pbutil provides record length-delimited Protocol Buffer streaming. +package pbutil diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/encode.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/encode.go new file mode 100644 index 0000000000000..4b76ea9a1d8a1 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/encode.go @@ -0,0 +1,46 @@ +// Copyright 2013 Matt T. Proud +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pbutil + +import ( + "encoding/binary" + "io" + + "github.com/golang/protobuf/proto" +) + +// WriteDelimited encodes and dumps a message to the provided writer prefixed +// with a 32-bit varint indicating the length of the encoded message, producing +// a length-delimited record stream, which can be used to chain together +// encoded messages of the same type together in a file. It returns the total +// number of bytes written and any applicable error. This is roughly +// equivalent to the companion Java API's MessageLite#writeDelimitedTo. +func WriteDelimited(w io.Writer, m proto.Message) (n int, err error) { + buffer, err := proto.Marshal(m) + if err != nil { + return 0, err + } + + buf := make([]byte, binary.MaxVarintLen32) + encodedLength := binary.PutUvarint(buf, uint64(len(buffer))) + + sync, err := w.Write(buf[:encodedLength]) + if err != nil { + return sync, err + } + + n, err = w.Write(buffer) + return n + sync, err +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/CONTRIBUTORS b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/CONTRIBUTORS new file mode 100644 index 0000000000000..b382a04eda9d8 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/CONTRIBUTORS @@ -0,0 +1 @@ +Paul Borman diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/LICENSE b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/LICENSE new file mode 100644 index 0000000000000..5dc68268d9005 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009,2014 Google Inc. 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. diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/dce.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/dce.go new file mode 100755 index 0000000000000..50a0f2d099248 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/dce.go @@ -0,0 +1,84 @@ +// Copyright 2011 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package uuid + +import ( + "encoding/binary" + "fmt" + "os" +) + +// A Domain represents a Version 2 domain +type Domain byte + +// Domain constants for DCE Security (Version 2) UUIDs. +const ( + Person = Domain(0) + Group = Domain(1) + Org = Domain(2) +) + +// NewDCESecurity returns a DCE Security (Version 2) UUID. +// +// The domain should be one of Person, Group or Org. +// On a POSIX system the id should be the users UID for the Person +// domain and the users GID for the Group. The meaning of id for +// the domain Org or on non-POSIX systems is site defined. +// +// For a given domain/id pair the same token may be returned for up to +// 7 minutes and 10 seconds. +func NewDCESecurity(domain Domain, id uint32) UUID { + uuid := NewUUID() + if uuid != nil { + uuid[6] = (uuid[6] & 0x0f) | 0x20 // Version 2 + uuid[9] = byte(domain) + binary.BigEndian.PutUint32(uuid[0:], id) + } + return uuid +} + +// NewDCEPerson returns a DCE Security (Version 2) UUID in the person +// domain with the id returned by os.Getuid. +// +// NewDCEPerson(Person, uint32(os.Getuid())) +func NewDCEPerson() UUID { + return NewDCESecurity(Person, uint32(os.Getuid())) +} + +// NewDCEGroup returns a DCE Security (Version 2) UUID in the group +// domain with the id returned by os.Getgid. +// +// NewDCEGroup(Group, uint32(os.Getgid())) +func NewDCEGroup() UUID { + return NewDCESecurity(Group, uint32(os.Getgid())) +} + +// Domain returns the domain for a Version 2 UUID or false. +func (uuid UUID) Domain() (Domain, bool) { + if v, _ := uuid.Version(); v != 2 { + return 0, false + } + return Domain(uuid[9]), true +} + +// Id returns the id for a Version 2 UUID or false. +func (uuid UUID) Id() (uint32, bool) { + if v, _ := uuid.Version(); v != 2 { + return 0, false + } + return binary.BigEndian.Uint32(uuid[0:4]), true +} + +func (d Domain) String() string { + switch d { + case Person: + return "Person" + case Group: + return "Group" + case Org: + return "Org" + } + return fmt.Sprintf("Domain%d", int(d)) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/doc.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/doc.go new file mode 100755 index 0000000000000..d8bd013e68905 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/doc.go @@ -0,0 +1,8 @@ +// Copyright 2011 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// The uuid package generates and inspects UUIDs. +// +// UUIDs are based on RFC 4122 and DCE 1.1: Authentication and Security Services. +package uuid diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/hash.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/hash.go new file mode 100644 index 0000000000000..cdd4192fd9b9d --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/hash.go @@ -0,0 +1,53 @@ +// Copyright 2011 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package uuid + +import ( + "crypto/md5" + "crypto/sha1" + "hash" +) + +// Well known Name Space IDs and UUIDs +var ( + NameSpace_DNS = Parse("6ba7b810-9dad-11d1-80b4-00c04fd430c8") + NameSpace_URL = Parse("6ba7b811-9dad-11d1-80b4-00c04fd430c8") + NameSpace_OID = Parse("6ba7b812-9dad-11d1-80b4-00c04fd430c8") + NameSpace_X500 = Parse("6ba7b814-9dad-11d1-80b4-00c04fd430c8") + NIL = Parse("00000000-0000-0000-0000-000000000000") +) + +// NewHash returns a new UUID dervied from the hash of space concatenated with +// data generated by h. The hash should be at least 16 byte in length. The +// first 16 bytes of the hash are used to form the UUID. The version of the +// UUID will be the lower 4 bits of version. NewHash is used to implement +// NewMD5 and NewSHA1. +func NewHash(h hash.Hash, space UUID, data []byte, version int) UUID { + h.Reset() + h.Write(space) + h.Write([]byte(data)) + s := h.Sum(nil) + uuid := make([]byte, 16) + copy(uuid, s) + uuid[6] = (uuid[6] & 0x0f) | uint8((version&0xf)<<4) + uuid[8] = (uuid[8] & 0x3f) | 0x80 // RFC 4122 variant + return uuid +} + +// NewMD5 returns a new MD5 (Version 3) UUID based on the +// supplied name space and data. +// +// NewHash(md5.New(), space, data, 3) +func NewMD5(space UUID, data []byte) UUID { + return NewHash(md5.New(), space, data, 3) +} + +// NewSHA1 returns a new SHA1 (Version 5) UUID based on the +// supplied name space and data. +// +// NewHash(sha1.New(), space, data, 5) +func NewSHA1(space UUID, data []byte) UUID { + return NewHash(sha1.New(), space, data, 5) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/json.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/json.go new file mode 100644 index 0000000000000..760580a504f4e --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/json.go @@ -0,0 +1,30 @@ +// Copyright 2014 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package uuid + +import "errors" + +func (u UUID) MarshalJSON() ([]byte, error) { + if len(u) == 0 { + return []byte(`""`), nil + } + return []byte(`"` + u.String() + `"`), nil +} + +func (u *UUID) UnmarshalJSON(data []byte) error { + if len(data) == 0 || string(data) == `""` { + return nil + } + if len(data) < 2 || data[0] != '"' || data[len(data)-1] != '"' { + return errors.New("invalid UUID format") + } + data = data[1 : len(data)-1] + uu := Parse(string(data)) + if uu == nil { + return errors.New("invalid UUID format") + } + *u = uu + return nil +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/node.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/node.go new file mode 100755 index 0000000000000..dd0a8ac189a30 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/node.go @@ -0,0 +1,101 @@ +// Copyright 2011 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package uuid + +import "net" + +var ( + interfaces []net.Interface // cached list of interfaces + ifname string // name of interface being used + nodeID []byte // hardware for version 1 UUIDs +) + +// NodeInterface returns the name of the interface from which the NodeID was +// derived. The interface "user" is returned if the NodeID was set by +// SetNodeID. +func NodeInterface() string { + return ifname +} + +// SetNodeInterface selects the hardware address to be used for Version 1 UUIDs. +// If name is "" then the first usable interface found will be used or a random +// Node ID will be generated. If a named interface cannot be found then false +// is returned. +// +// SetNodeInterface never fails when name is "". +func SetNodeInterface(name string) bool { + if interfaces == nil { + var err error + interfaces, err = net.Interfaces() + if err != nil && name != "" { + return false + } + } + + for _, ifs := range interfaces { + if len(ifs.HardwareAddr) >= 6 && (name == "" || name == ifs.Name) { + if setNodeID(ifs.HardwareAddr) { + ifname = ifs.Name + return true + } + } + } + + // We found no interfaces with a valid hardware address. If name + // does not specify a specific interface generate a random Node ID + // (section 4.1.6) + if name == "" { + if nodeID == nil { + nodeID = make([]byte, 6) + } + randomBits(nodeID) + return true + } + return false +} + +// NodeID returns a slice of a copy of the current Node ID, setting the Node ID +// if not already set. +func NodeID() []byte { + if nodeID == nil { + SetNodeInterface("") + } + nid := make([]byte, 6) + copy(nid, nodeID) + return nid +} + +// SetNodeID sets the Node ID to be used for Version 1 UUIDs. The first 6 bytes +// of id are used. If id is less than 6 bytes then false is returned and the +// Node ID is not set. +func SetNodeID(id []byte) bool { + if setNodeID(id) { + ifname = "user" + return true + } + return false +} + +func setNodeID(id []byte) bool { + if len(id) < 6 { + return false + } + if nodeID == nil { + nodeID = make([]byte, 6) + } + copy(nodeID, id) + return true +} + +// NodeID returns the 6 byte node id encoded in uuid. It returns nil if uuid is +// not valid. The NodeID is only well defined for version 1 and 2 UUIDs. +func (uuid UUID) NodeID() []byte { + if len(uuid) != 16 { + return nil + } + node := make([]byte, 6) + copy(node, uuid[10:]) + return node +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/time.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/time.go new file mode 100755 index 0000000000000..7ebc9bef10906 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/time.go @@ -0,0 +1,132 @@ +// Copyright 2014 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package uuid + +import ( + "encoding/binary" + "sync" + "time" +) + +// A Time represents a time as the number of 100's of nanoseconds since 15 Oct +// 1582. +type Time int64 + +const ( + lillian = 2299160 // Julian day of 15 Oct 1582 + unix = 2440587 // Julian day of 1 Jan 1970 + epoch = unix - lillian // Days between epochs + g1582 = epoch * 86400 // seconds between epochs + g1582ns100 = g1582 * 10000000 // 100s of a nanoseconds between epochs +) + +var ( + mu sync.Mutex + lasttime uint64 // last time we returned + clock_seq uint16 // clock sequence for this run + + timeNow = time.Now // for testing +) + +// UnixTime converts t the number of seconds and nanoseconds using the Unix +// epoch of 1 Jan 1970. +func (t Time) UnixTime() (sec, nsec int64) { + sec = int64(t - g1582ns100) + nsec = (sec % 10000000) * 100 + sec /= 10000000 + return sec, nsec +} + +// GetTime returns the current Time (100s of nanoseconds since 15 Oct 1582) and +// clock sequence as well as adjusting the clock sequence as needed. An error +// is returned if the current time cannot be determined. +func GetTime() (Time, uint16, error) { + defer mu.Unlock() + mu.Lock() + return getTime() +} + +func getTime() (Time, uint16, error) { + t := timeNow() + + // If we don't have a clock sequence already, set one. + if clock_seq == 0 { + setClockSequence(-1) + } + now := uint64(t.UnixNano()/100) + g1582ns100 + + // If time has gone backwards with this clock sequence then we + // increment the clock sequence + if now <= lasttime { + clock_seq = ((clock_seq + 1) & 0x3fff) | 0x8000 + } + lasttime = now + return Time(now), clock_seq, nil +} + +// ClockSequence returns the current clock sequence, generating one if not +// already set. The clock sequence is only used for Version 1 UUIDs. +// +// The uuid package does not use global static storage for the clock sequence or +// the last time a UUID was generated. Unless SetClockSequence a new random +// clock sequence is generated the first time a clock sequence is requested by +// ClockSequence, GetTime, or NewUUID. (section 4.2.1.1) sequence is generated +// for +func ClockSequence() int { + defer mu.Unlock() + mu.Lock() + return clockSequence() +} + +func clockSequence() int { + if clock_seq == 0 { + setClockSequence(-1) + } + return int(clock_seq & 0x3fff) +} + +// SetClockSeq sets the clock sequence to the lower 14 bits of seq. Setting to +// -1 causes a new sequence to be generated. +func SetClockSequence(seq int) { + defer mu.Unlock() + mu.Lock() + setClockSequence(seq) +} + +func setClockSequence(seq int) { + if seq == -1 { + var b [2]byte + randomBits(b[:]) // clock sequence + seq = int(b[0])<<8 | int(b[1]) + } + old_seq := clock_seq + clock_seq = uint16(seq&0x3fff) | 0x8000 // Set our variant + if old_seq != clock_seq { + lasttime = 0 + } +} + +// Time returns the time in 100s of nanoseconds since 15 Oct 1582 encoded in +// uuid. It returns false if uuid is not valid. The time is only well defined +// for version 1 and 2 UUIDs. +func (uuid UUID) Time() (Time, bool) { + if len(uuid) != 16 { + return 0, false + } + time := int64(binary.BigEndian.Uint32(uuid[0:4])) + time |= int64(binary.BigEndian.Uint16(uuid[4:6])) << 32 + time |= int64(binary.BigEndian.Uint16(uuid[6:8])&0xfff) << 48 + return Time(time), true +} + +// ClockSequence returns the clock sequence encoded in uuid. It returns false +// if uuid is not valid. The clock sequence is only well defined for version 1 +// and 2 UUIDs. +func (uuid UUID) ClockSequence() (int, bool) { + if len(uuid) != 16 { + return 0, false + } + return int(binary.BigEndian.Uint16(uuid[8:10])) & 0x3fff, true +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/util.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/util.go new file mode 100644 index 0000000000000..de40b102c4bed --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/util.go @@ -0,0 +1,43 @@ +// Copyright 2011 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package uuid + +import ( + "io" +) + +// randomBits completely fills slice b with random data. +func randomBits(b []byte) { + if _, err := io.ReadFull(rander, b); err != nil { + panic(err.Error()) // rand should never fail + } +} + +// xvalues returns the value of a byte as a hexadecimal digit or 255. +var xvalues = []byte{ + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 255, 255, 255, 255, 255, 255, + 255, 10, 11, 12, 13, 14, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 10, 11, 12, 13, 14, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, +} + +// xtob converts the the first two hex bytes of x into a byte. +func xtob(x string) (byte, bool) { + b1 := xvalues[x[0]] + b2 := xvalues[x[1]] + return (b1 << 4) | b2, b1 != 255 && b2 != 255 +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/uuid.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/uuid.go new file mode 100755 index 0000000000000..2920fae632671 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/uuid.go @@ -0,0 +1,163 @@ +// Copyright 2011 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package uuid + +import ( + "bytes" + "crypto/rand" + "fmt" + "io" + "strings" +) + +// A UUID is a 128 bit (16 byte) Universal Unique IDentifier as defined in RFC +// 4122. +type UUID []byte + +// A Version represents a UUIDs version. +type Version byte + +// A Variant represents a UUIDs variant. +type Variant byte + +// Constants returned by Variant. +const ( + Invalid = Variant(iota) // Invalid UUID + RFC4122 // The variant specified in RFC4122 + Reserved // Reserved, NCS backward compatibility. + Microsoft // Reserved, Microsoft Corporation backward compatibility. + Future // Reserved for future definition. +) + +var rander = rand.Reader // random function + +// New returns a new random (version 4) UUID as a string. It is a convenience +// function for NewRandom().String(). +func New() string { + return NewRandom().String() +} + +// Parse decodes s into a UUID or returns nil. Both the UUID form of +// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx and +// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx are decoded. +func Parse(s string) UUID { + if len(s) == 36+9 { + if strings.ToLower(s[:9]) != "urn:uuid:" { + return nil + } + s = s[9:] + } else if len(s) != 36 { + return nil + } + if s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-' { + return nil + } + uuid := make([]byte, 16) + for i, x := range []int{ + 0, 2, 4, 6, + 9, 11, + 14, 16, + 19, 21, + 24, 26, 28, 30, 32, 34} { + if v, ok := xtob(s[x:]); !ok { + return nil + } else { + uuid[i] = v + } + } + return uuid +} + +// Equal returns true if uuid1 and uuid2 are equal. +func Equal(uuid1, uuid2 UUID) bool { + return bytes.Equal(uuid1, uuid2) +} + +// String returns the string form of uuid, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx +// , or "" if uuid is invalid. +func (uuid UUID) String() string { + if uuid == nil || len(uuid) != 16 { + return "" + } + b := []byte(uuid) + return fmt.Sprintf("%08x-%04x-%04x-%04x-%012x", + b[:4], b[4:6], b[6:8], b[8:10], b[10:]) +} + +// URN returns the RFC 2141 URN form of uuid, +// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, or "" if uuid is invalid. +func (uuid UUID) URN() string { + if uuid == nil || len(uuid) != 16 { + return "" + } + b := []byte(uuid) + return fmt.Sprintf("urn:uuid:%08x-%04x-%04x-%04x-%012x", + b[:4], b[4:6], b[6:8], b[8:10], b[10:]) +} + +// Variant returns the variant encoded in uuid. It returns Invalid if +// uuid is invalid. +func (uuid UUID) Variant() Variant { + if len(uuid) != 16 { + return Invalid + } + switch { + case (uuid[8] & 0xc0) == 0x80: + return RFC4122 + case (uuid[8] & 0xe0) == 0xc0: + return Microsoft + case (uuid[8] & 0xe0) == 0xe0: + return Future + default: + return Reserved + } + panic("unreachable") +} + +// Version returns the verison of uuid. It returns false if uuid is not +// valid. +func (uuid UUID) Version() (Version, bool) { + if len(uuid) != 16 { + return 0, false + } + return Version(uuid[6] >> 4), true +} + +func (v Version) String() string { + if v > 15 { + return fmt.Sprintf("BAD_VERSION_%d", v) + } + return fmt.Sprintf("VERSION_%d", v) +} + +func (v Variant) String() string { + switch v { + case RFC4122: + return "RFC4122" + case Reserved: + return "Reserved" + case Microsoft: + return "Microsoft" + case Future: + return "Future" + case Invalid: + return "Invalid" + } + return fmt.Sprintf("BadVariant%d", int(v)) +} + +// SetRand sets the random number generator to r, which implents io.Reader. +// If r.Read returns an error when the package requests random data then +// a panic will be issued. +// +// Calling SetRand with nil sets the random number generator to the default +// generator. +func SetRand(r io.Reader) { + if r == nil { + rander = rand.Reader + return + } + rander = r +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/version1.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/version1.go new file mode 100644 index 0000000000000..0127eacfab8ac --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/version1.go @@ -0,0 +1,41 @@ +// Copyright 2011 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package uuid + +import ( + "encoding/binary" +) + +// NewUUID returns a Version 1 UUID based on the current NodeID and clock +// sequence, and the current time. If the NodeID has not been set by SetNodeID +// or SetNodeInterface then it will be set automatically. If the NodeID cannot +// be set NewUUID returns nil. If clock sequence has not been set by +// SetClockSequence then it will be set automatically. If GetTime fails to +// return the current NewUUID returns nil. +func NewUUID() UUID { + if nodeID == nil { + SetNodeInterface("") + } + + now, seq, err := GetTime() + if err != nil { + return nil + } + + uuid := make([]byte, 16) + + time_low := uint32(now & 0xffffffff) + time_mid := uint16((now >> 32) & 0xffff) + time_hi := uint16((now >> 48) & 0x0fff) + time_hi |= 0x1000 // Version 1 + + binary.BigEndian.PutUint32(uuid[0:], time_low) + binary.BigEndian.PutUint16(uuid[4:], time_mid) + binary.BigEndian.PutUint16(uuid[6:], time_hi) + binary.BigEndian.PutUint16(uuid[8:], seq) + copy(uuid[10:], nodeID) + + return uuid +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/version4.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/version4.go new file mode 100644 index 0000000000000..b3d4a368dd0e0 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/pborman/uuid/version4.go @@ -0,0 +1,25 @@ +// Copyright 2011 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package uuid + +// Random returns a Random (Version 4) UUID or panics. +// +// The strength of the UUIDs is based on the strength of the crypto/rand +// package. +// +// A note about uniqueness derived from from the UUID Wikipedia entry: +// +// Randomly generated UUIDs have 122 random bits. One's annual risk of being +// hit by a meteorite is estimated to be one chance in 17 billion, that +// means the probability is about 0.00000000006 (6 × 10−11), +// equivalent to the odds of creating a few tens of trillions of UUIDs in a +// year and having one duplicate. +func NewRandom() UUID { + uuid := make([]byte, 16) + randomBits([]byte(uuid)) + uuid[6] = (uuid[6] & 0x0f) | 0x40 // Version 4 + uuid[8] = (uuid[8] & 0x3f) | 0x80 // Variant is 10 + return uuid +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/LICENSE b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/LICENSE new file mode 100644 index 0000000000000..261eeb9e9f8b2 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/NOTICE b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/NOTICE new file mode 100644 index 0000000000000..37e4a7d410e5e --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/NOTICE @@ -0,0 +1,28 @@ +Prometheus instrumentation library for Go applications +Copyright 2012-2015 The Prometheus Authors + +This product includes software developed at +SoundCloud Ltd. (http://soundcloud.com/). + + +The following components are included in this product: + +goautoneg +http://bitbucket.org/ww/goautoneg +Copyright 2011, Open Knowledge Foundation Ltd. +See README.txt for license details. + +perks - a fork of https://github.com/bmizerany/perks +https://github.com/beorn7/perks +Copyright 2013-2015 Blake Mizerany, Björn Rabenstein +See https://github.com/beorn7/perks/blob/master/README.md for license details. + +Go support for Protocol Buffers - Google's data interchange format +http://github.com/golang/protobuf/ +Copyright 2010 The Go Authors +See source code for license details. + +Support for streaming Protocol Buffer messages for the Go language (golang). +https://github.com/matttproud/golang_protobuf_extensions +Copyright 2013 Matt T. Proud +Licensed under the Apache License, Version 2.0 diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/.gitignore b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/.gitignore new file mode 100644 index 0000000000000..3460f0346d95f --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/.gitignore @@ -0,0 +1 @@ +command-line-arguments.test diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/collector.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/collector.go new file mode 100644 index 0000000000000..c04688009f508 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/collector.go @@ -0,0 +1,75 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prometheus + +// Collector is the interface implemented by anything that can be used by +// Prometheus to collect metrics. A Collector has to be registered for +// collection. See Register, MustRegister, RegisterOrGet, and MustRegisterOrGet. +// +// The stock metrics provided by this package (like Gauge, Counter, Summary) are +// also Collectors (which only ever collect one metric, namely itself). An +// implementer of Collector may, however, collect multiple metrics in a +// coordinated fashion and/or create metrics on the fly. Examples for collectors +// already implemented in this library are the metric vectors (i.e. collection +// of multiple instances of the same Metric but with different label values) +// like GaugeVec or SummaryVec, and the ExpvarCollector. +type Collector interface { + // Describe sends the super-set of all possible descriptors of metrics + // collected by this Collector to the provided channel and returns once + // the last descriptor has been sent. The sent descriptors fulfill the + // consistency and uniqueness requirements described in the Desc + // documentation. (It is valid if one and the same Collector sends + // duplicate descriptors. Those duplicates are simply ignored. However, + // two different Collectors must not send duplicate descriptors.) This + // method idempotently sends the same descriptors throughout the + // lifetime of the Collector. If a Collector encounters an error while + // executing this method, it must send an invalid descriptor (created + // with NewInvalidDesc) to signal the error to the registry. + Describe(chan<- *Desc) + // Collect is called by Prometheus when collecting metrics. The + // implementation sends each collected metric via the provided channel + // and returns once the last metric has been sent. The descriptor of + // each sent metric is one of those returned by Describe. Returned + // metrics that share the same descriptor must differ in their variable + // label values. This method may be called concurrently and must + // therefore be implemented in a concurrency safe way. Blocking occurs + // at the expense of total performance of rendering all registered + // metrics. Ideally, Collector implementations support concurrent + // readers. + Collect(chan<- Metric) +} + +// SelfCollector implements Collector for a single Metric so that that the +// Metric collects itself. Add it as an anonymous field to a struct that +// implements Metric, and call Init with the Metric itself as an argument. +type SelfCollector struct { + self Metric +} + +// Init provides the SelfCollector with a reference to the metric it is supposed +// to collect. It is usually called within the factory function to create a +// metric. See example. +func (c *SelfCollector) Init(self Metric) { + c.self = self +} + +// Describe implements Collector. +func (c *SelfCollector) Describe(ch chan<- *Desc) { + ch <- c.self.Desc() +} + +// Collect implements Collector. +func (c *SelfCollector) Collect(ch chan<- Metric) { + ch <- c.self +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/counter.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/counter.go new file mode 100644 index 0000000000000..a2952d1c8819a --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/counter.go @@ -0,0 +1,175 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prometheus + +import ( + "errors" + "hash/fnv" +) + +// Counter is a Metric that represents a single numerical value that only ever +// goes up. That implies that it cannot be used to count items whose number can +// also go down, e.g. the number of currently running goroutines. Those +// "counters" are represented by Gauges. +// +// A Counter is typically used to count requests served, tasks completed, errors +// occurred, etc. +// +// To create Counter instances, use NewCounter. +type Counter interface { + Metric + Collector + + // Set is used to set the Counter to an arbitrary value. It is only used + // if you have to transfer a value from an external counter into this + // Prometheus metric. Do not use it for regular handling of a + // Prometheus counter (as it can be used to break the contract of + // monotonically increasing values). + Set(float64) + // Inc increments the counter by 1. + Inc() + // Add adds the given value to the counter. It panics if the value is < + // 0. + Add(float64) +} + +// CounterOpts is an alias for Opts. See there for doc comments. +type CounterOpts Opts + +// NewCounter creates a new Counter based on the provided CounterOpts. +func NewCounter(opts CounterOpts) Counter { + desc := NewDesc( + BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), + opts.Help, + nil, + opts.ConstLabels, + ) + result := &counter{value: value{desc: desc, valType: CounterValue, labelPairs: desc.constLabelPairs}} + result.Init(result) // Init self-collection. + return result +} + +type counter struct { + value +} + +func (c *counter) Add(v float64) { + if v < 0 { + panic(errors.New("counter cannot decrease in value")) + } + c.value.Add(v) +} + +// CounterVec is a Collector that bundles a set of Counters that all share the +// same Desc, but have different values for their variable labels. This is used +// if you want to count the same thing partitioned by various dimensions +// (e.g. number of HTTP requests, partitioned by response code and +// method). Create instances with NewCounterVec. +// +// CounterVec embeds MetricVec. See there for a full list of methods with +// detailed documentation. +type CounterVec struct { + MetricVec +} + +// NewCounterVec creates a new CounterVec based on the provided CounterOpts and +// partitioned by the given label names. At least one label name must be +// provided. +func NewCounterVec(opts CounterOpts, labelNames []string) *CounterVec { + desc := NewDesc( + BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), + opts.Help, + labelNames, + opts.ConstLabels, + ) + return &CounterVec{ + MetricVec: MetricVec{ + children: map[uint64]Metric{}, + desc: desc, + hash: fnv.New64a(), + newMetric: func(lvs ...string) Metric { + result := &counter{value: value{ + desc: desc, + valType: CounterValue, + labelPairs: makeLabelPairs(desc, lvs), + }} + result.Init(result) // Init self-collection. + return result + }, + }, + } +} + +// GetMetricWithLabelValues replaces the method of the same name in +// MetricVec. The difference is that this method returns a Counter and not a +// Metric so that no type conversion is required. +func (m *CounterVec) GetMetricWithLabelValues(lvs ...string) (Counter, error) { + metric, err := m.MetricVec.GetMetricWithLabelValues(lvs...) + if metric != nil { + return metric.(Counter), err + } + return nil, err +} + +// GetMetricWith replaces the method of the same name in MetricVec. The +// difference is that this method returns a Counter and not a Metric so that no +// type conversion is required. +func (m *CounterVec) GetMetricWith(labels Labels) (Counter, error) { + metric, err := m.MetricVec.GetMetricWith(labels) + if metric != nil { + return metric.(Counter), err + } + return nil, err +} + +// WithLabelValues works as GetMetricWithLabelValues, but panics where +// GetMetricWithLabelValues would have returned an error. By not returning an +// error, WithLabelValues allows shortcuts like +// myVec.WithLabelValues("404", "GET").Add(42) +func (m *CounterVec) WithLabelValues(lvs ...string) Counter { + return m.MetricVec.WithLabelValues(lvs...).(Counter) +} + +// With works as GetMetricWith, but panics where GetMetricWithLabels would have +// returned an error. By not returning an error, With allows shortcuts like +// myVec.With(Labels{"code": "404", "method": "GET"}).Add(42) +func (m *CounterVec) With(labels Labels) Counter { + return m.MetricVec.With(labels).(Counter) +} + +// CounterFunc is a Counter whose value is determined at collect time by calling a +// provided function. +// +// To create CounterFunc instances, use NewCounterFunc. +type CounterFunc interface { + Metric + Collector +} + +// NewCounterFunc creates a new CounterFunc based on the provided +// CounterOpts. The value reported is determined by calling the given function +// from within the Write method. Take into account that metric collection may +// happen concurrently. If that results in concurrent calls to Write, like in +// the case where a CounterFunc is directly registered with Prometheus, the +// provided function must be concurrency-safe. The function should also honor +// the contract for a Counter (values only go up, not down), but compliance will +// not be checked. +func NewCounterFunc(opts CounterOpts, function func() float64) CounterFunc { + return newValueFunc(NewDesc( + BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), + opts.Help, + nil, + opts.ConstLabels, + ), CounterValue, function) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/desc.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/desc.go new file mode 100644 index 0000000000000..fcde784d64053 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/desc.go @@ -0,0 +1,201 @@ +package prometheus + +import ( + "bytes" + "errors" + "fmt" + "hash/fnv" + "regexp" + "sort" + "strings" + + "github.com/golang/protobuf/proto" + + dto "github.com/prometheus/client_model/go" +) + +var ( + metricNameRE = regexp.MustCompile(`^[a-zA-Z_][a-zA-Z0-9_:]*$`) + labelNameRE = regexp.MustCompile("^[a-zA-Z_][a-zA-Z0-9_]*$") +) + +// reservedLabelPrefix is a prefix which is not legal in user-supplied +// label names. +const reservedLabelPrefix = "__" + +// Labels represents a collection of label name -> value mappings. This type is +// commonly used with the With(Labels) and GetMetricWith(Labels) methods of +// metric vector Collectors, e.g.: +// myVec.With(Labels{"code": "404", "method": "GET"}).Add(42) +// +// The other use-case is the specification of constant label pairs in Opts or to +// create a Desc. +type Labels map[string]string + +// Desc is the descriptor used by every Prometheus Metric. It is essentially +// the immutable meta-data of a Metric. The normal Metric implementations +// included in this package manage their Desc under the hood. Users only have to +// deal with Desc if they use advanced features like the ExpvarCollector or +// custom Collectors and Metrics. +// +// Descriptors registered with the same registry have to fulfill certain +// consistency and uniqueness criteria if they share the same fully-qualified +// name: They must have the same help string and the same label names (aka label +// dimensions) in each, constLabels and variableLabels, but they must differ in +// the values of the constLabels. +// +// Descriptors that share the same fully-qualified names and the same label +// values of their constLabels are considered equal. +// +// Use NewDesc to create new Desc instances. +type Desc struct { + // fqName has been built from Namespace, Subsystem, and Name. + fqName string + // help provides some helpful information about this metric. + help string + // constLabelPairs contains precalculated DTO label pairs based on + // the constant labels. + constLabelPairs []*dto.LabelPair + // VariableLabels contains names of labels for which the metric + // maintains variable values. + variableLabels []string + // id is a hash of the values of the ConstLabels and fqName. This + // must be unique among all registered descriptors and can therefore be + // used as an identifier of the descriptor. + id uint64 + // dimHash is a hash of the label names (preset and variable) and the + // Help string. Each Desc with the same fqName must have the same + // dimHash. + dimHash uint64 + // err is an error that occured during construction. It is reported on + // registration time. + err error +} + +// NewDesc allocates and initializes a new Desc. Errors are recorded in the Desc +// and will be reported on registration time. variableLabels and constLabels can +// be nil if no such labels should be set. fqName and help must not be empty. +// +// variableLabels only contain the label names. Their label values are variable +// and therefore not part of the Desc. (They are managed within the Metric.) +// +// For constLabels, the label values are constant. Therefore, they are fully +// specified in the Desc. See the Opts documentation for the implications of +// constant labels. +func NewDesc(fqName, help string, variableLabels []string, constLabels Labels) *Desc { + d := &Desc{ + fqName: fqName, + help: help, + variableLabels: variableLabels, + } + if help == "" { + d.err = errors.New("empty help string") + return d + } + if !metricNameRE.MatchString(fqName) { + d.err = fmt.Errorf("%q is not a valid metric name", fqName) + return d + } + // labelValues contains the label values of const labels (in order of + // their sorted label names) plus the fqName (at position 0). + labelValues := make([]string, 1, len(constLabels)+1) + labelValues[0] = fqName + labelNames := make([]string, 0, len(constLabels)+len(variableLabels)) + labelNameSet := map[string]struct{}{} + // First add only the const label names and sort them... + for labelName := range constLabels { + if !checkLabelName(labelName) { + d.err = fmt.Errorf("%q is not a valid label name", labelName) + return d + } + labelNames = append(labelNames, labelName) + labelNameSet[labelName] = struct{}{} + } + sort.Strings(labelNames) + // ... so that we can now add const label values in the order of their names. + for _, labelName := range labelNames { + labelValues = append(labelValues, constLabels[labelName]) + } + // Now add the variable label names, but prefix them with something that + // cannot be in a regular label name. That prevents matching the label + // dimension with a different mix between preset and variable labels. + for _, labelName := range variableLabels { + if !checkLabelName(labelName) { + d.err = fmt.Errorf("%q is not a valid label name", labelName) + return d + } + labelNames = append(labelNames, "$"+labelName) + labelNameSet[labelName] = struct{}{} + } + if len(labelNames) != len(labelNameSet) { + d.err = errors.New("duplicate label names") + return d + } + h := fnv.New64a() + var b bytes.Buffer // To copy string contents into, avoiding []byte allocations. + for _, val := range labelValues { + b.Reset() + b.WriteString(val) + b.WriteByte(separatorByte) + h.Write(b.Bytes()) + } + d.id = h.Sum64() + // Sort labelNames so that order doesn't matter for the hash. + sort.Strings(labelNames) + // Now hash together (in this order) the help string and the sorted + // label names. + h.Reset() + b.Reset() + b.WriteString(help) + b.WriteByte(separatorByte) + h.Write(b.Bytes()) + for _, labelName := range labelNames { + b.Reset() + b.WriteString(labelName) + b.WriteByte(separatorByte) + h.Write(b.Bytes()) + } + d.dimHash = h.Sum64() + + d.constLabelPairs = make([]*dto.LabelPair, 0, len(constLabels)) + for n, v := range constLabels { + d.constLabelPairs = append(d.constLabelPairs, &dto.LabelPair{ + Name: proto.String(n), + Value: proto.String(v), + }) + } + sort.Sort(LabelPairSorter(d.constLabelPairs)) + return d +} + +// NewInvalidDesc returns an invalid descriptor, i.e. a descriptor with the +// provided error set. If a collector returning such a descriptor is registered, +// registration will fail with the provided error. NewInvalidDesc can be used by +// a Collector to signal inability to describe itself. +func NewInvalidDesc(err error) *Desc { + return &Desc{ + err: err, + } +} + +func (d *Desc) String() string { + lpStrings := make([]string, 0, len(d.constLabelPairs)) + for _, lp := range d.constLabelPairs { + lpStrings = append( + lpStrings, + fmt.Sprintf("%s=%q", lp.GetName(), lp.GetValue()), + ) + } + return fmt.Sprintf( + "Desc{fqName: %q, help: %q, constLabels: {%s}, variableLabels: %v}", + d.fqName, + d.help, + strings.Join(lpStrings, ","), + d.variableLabels, + ) +} + +func checkLabelName(l string) bool { + return labelNameRE.MatchString(l) && + !strings.HasPrefix(l, reservedLabelPrefix) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/doc.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/doc.go new file mode 100644 index 0000000000000..425fe8793cd82 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/doc.go @@ -0,0 +1,109 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package prometheus provides embeddable metric primitives for servers and +// standardized exposition of telemetry through a web services interface. +// +// All exported functions and methods are safe to be used concurrently unless +// specified otherwise. +// +// To expose metrics registered with the Prometheus registry, an HTTP server +// needs to know about the Prometheus handler. The usual endpoint is "/metrics". +// +// http.Handle("/metrics", prometheus.Handler()) +// +// As a starting point a very basic usage example: +// +// package main +// +// import ( +// "net/http" +// +// "github.com/prometheus/client_golang/prometheus" +// ) +// +// var ( +// cpuTemp = prometheus.NewGauge(prometheus.GaugeOpts{ +// Name: "cpu_temperature_celsius", +// Help: "Current temperature of the CPU.", +// }) +// hdFailures = prometheus.NewCounter(prometheus.CounterOpts{ +// Name: "hd_errors_total", +// Help: "Number of hard-disk errors.", +// }) +// ) +// +// func init() { +// prometheus.MustRegister(cpuTemp) +// prometheus.MustRegister(hdFailures) +// } +// +// func main() { +// cpuTemp.Set(65.3) +// hdFailures.Inc() +// +// http.Handle("/metrics", prometheus.Handler()) +// http.ListenAndServe(":8080", nil) +// } +// +// +// This is a complete program that exports two metrics, a Gauge and a Counter. +// It also exports some stats about the HTTP usage of the /metrics +// endpoint. (See the Handler function for more detail.) +// +// Two more advanced metric types are the Summary and Histogram. +// +// In addition to the fundamental metric types Gauge, Counter, Summary, and +// Histogram, a very important part of the Prometheus data model is the +// partitioning of samples along dimensions called labels, which results in +// metric vectors. The fundamental types are GaugeVec, CounterVec, SummaryVec, +// and HistogramVec. +// +// Those are all the parts needed for basic usage. Detailed documentation and +// examples are provided below. +// +// Everything else this package offers is essentially for "power users" only. A +// few pointers to "power user features": +// +// All the various ...Opts structs have a ConstLabels field for labels that +// never change their value (which is only useful under special circumstances, +// see documentation of the Opts type). +// +// The Untyped metric behaves like a Gauge, but signals the Prometheus server +// not to assume anything about its type. +// +// Functions to fine-tune how the metric registry works: EnableCollectChecks, +// PanicOnCollectError, Register, Unregister, SetMetricFamilyInjectionHook. +// +// For custom metric collection, there are two entry points: Custom Metric +// implementations and custom Collector implementations. A Metric is the +// fundamental unit in the Prometheus data model: a sample at a point in time +// together with its meta-data (like its fully-qualified name and any number of +// pairs of label name and label value) that knows how to marshal itself into a +// data transfer object (aka DTO, implemented as a protocol buffer). A Collector +// gets registered with the Prometheus registry and manages the collection of +// one or more Metrics. Many parts of this package are building blocks for +// Metrics and Collectors. Desc is the metric descriptor, actually used by all +// metrics under the hood, and by Collectors to describe the Metrics to be +// collected, but only to be dealt with by users if they implement their own +// Metrics or Collectors. To create a Desc, the BuildFQName function will come +// in handy. Other useful components for Metric and Collector implementation +// include: LabelPairSorter to sort the DTO version of label pairs, +// NewConstMetric and MustNewConstMetric to create "throw away" Metrics at +// collection time, MetricVec to bundle custom Metrics into a metric vector +// Collector, SelfCollector to make a custom Metric collect itself. +// +// A good example for a custom Collector is the ExpVarCollector included in this +// package, which exports variables exported via the "expvar" package as +// Prometheus metrics. +package prometheus diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/expvar.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/expvar.go new file mode 100644 index 0000000000000..0f7630d53f5a7 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/expvar.go @@ -0,0 +1,119 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prometheus + +import ( + "encoding/json" + "expvar" +) + +// ExpvarCollector collects metrics from the expvar interface. It provides a +// quick way to expose numeric values that are already exported via expvar as +// Prometheus metrics. Note that the data models of expvar and Prometheus are +// fundamentally different, and that the ExpvarCollector is inherently +// slow. Thus, the ExpvarCollector is probably great for experiments and +// prototying, but you should seriously consider a more direct implementation of +// Prometheus metrics for monitoring production systems. +// +// Use NewExpvarCollector to create new instances. +type ExpvarCollector struct { + exports map[string]*Desc +} + +// NewExpvarCollector returns a newly allocated ExpvarCollector that still has +// to be registered with the Prometheus registry. +// +// The exports map has the following meaning: +// +// The keys in the map correspond to expvar keys, i.e. for every expvar key you +// want to export as Prometheus metric, you need an entry in the exports +// map. The descriptor mapped to each key describes how to export the expvar +// value. It defines the name and the help string of the Prometheus metric +// proxying the expvar value. The type will always be Untyped. +// +// For descriptors without variable labels, the expvar value must be a number or +// a bool. The number is then directly exported as the Prometheus sample +// value. (For a bool, 'false' translates to 0 and 'true' to 1). Expvar values +// that are not numbers or bools are silently ignored. +// +// If the descriptor has one variable label, the expvar value must be an expvar +// map. The keys in the expvar map become the various values of the one +// Prometheus label. The values in the expvar map must be numbers or bools again +// as above. +// +// For descriptors with more than one variable label, the expvar must be a +// nested expvar map, i.e. where the values of the topmost map are maps again +// etc. until a depth is reached that corresponds to the number of labels. The +// leaves of that structure must be numbers or bools as above to serve as the +// sample values. +// +// Anything that does not fit into the scheme above is silently ignored. +func NewExpvarCollector(exports map[string]*Desc) *ExpvarCollector { + return &ExpvarCollector{ + exports: exports, + } +} + +// Describe implements Collector. +func (e *ExpvarCollector) Describe(ch chan<- *Desc) { + for _, desc := range e.exports { + ch <- desc + } +} + +// Collect implements Collector. +func (e *ExpvarCollector) Collect(ch chan<- Metric) { + for name, desc := range e.exports { + var m Metric + expVar := expvar.Get(name) + if expVar == nil { + continue + } + var v interface{} + labels := make([]string, len(desc.variableLabels)) + if err := json.Unmarshal([]byte(expVar.String()), &v); err != nil { + ch <- NewInvalidMetric(desc, err) + continue + } + var processValue func(v interface{}, i int) + processValue = func(v interface{}, i int) { + if i >= len(labels) { + copiedLabels := append(make([]string, 0, len(labels)), labels...) + switch v := v.(type) { + case float64: + m = MustNewConstMetric(desc, UntypedValue, v, copiedLabels...) + case bool: + if v { + m = MustNewConstMetric(desc, UntypedValue, 1, copiedLabels...) + } else { + m = MustNewConstMetric(desc, UntypedValue, 0, copiedLabels...) + } + default: + return + } + ch <- m + return + } + vm, ok := v.(map[string]interface{}) + if !ok { + return + } + for lv, val := range vm { + labels[i] = lv + processValue(val, i+1) + } + } + processValue(v, 0) + } +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/gauge.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/gauge.go new file mode 100644 index 0000000000000..ba8a402cafc6c --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/gauge.go @@ -0,0 +1,147 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prometheus + +import "hash/fnv" + +// Gauge is a Metric that represents a single numerical value that can +// arbitrarily go up and down. +// +// A Gauge is typically used for measured values like temperatures or current +// memory usage, but also "counts" that can go up and down, like the number of +// running goroutines. +// +// To create Gauge instances, use NewGauge. +type Gauge interface { + Metric + Collector + + // Set sets the Gauge to an arbitrary value. + Set(float64) + // Inc increments the Gauge by 1. + Inc() + // Dec decrements the Gauge by 1. + Dec() + // Add adds the given value to the Gauge. (The value can be + // negative, resulting in a decrease of the Gauge.) + Add(float64) + // Sub subtracts the given value from the Gauge. (The value can be + // negative, resulting in an increase of the Gauge.) + Sub(float64) +} + +// GaugeOpts is an alias for Opts. See there for doc comments. +type GaugeOpts Opts + +// NewGauge creates a new Gauge based on the provided GaugeOpts. +func NewGauge(opts GaugeOpts) Gauge { + return newValue(NewDesc( + BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), + opts.Help, + nil, + opts.ConstLabels, + ), GaugeValue, 0) +} + +// GaugeVec is a Collector that bundles a set of Gauges that all share the same +// Desc, but have different values for their variable labels. This is used if +// you want to count the same thing partitioned by various dimensions +// (e.g. number of operations queued, partitioned by user and operation +// type). Create instances with NewGaugeVec. +type GaugeVec struct { + MetricVec +} + +// NewGaugeVec creates a new GaugeVec based on the provided GaugeOpts and +// partitioned by the given label names. At least one label name must be +// provided. +func NewGaugeVec(opts GaugeOpts, labelNames []string) *GaugeVec { + desc := NewDesc( + BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), + opts.Help, + labelNames, + opts.ConstLabels, + ) + return &GaugeVec{ + MetricVec: MetricVec{ + children: map[uint64]Metric{}, + desc: desc, + hash: fnv.New64a(), + newMetric: func(lvs ...string) Metric { + return newValue(desc, GaugeValue, 0, lvs...) + }, + }, + } +} + +// GetMetricWithLabelValues replaces the method of the same name in +// MetricVec. The difference is that this method returns a Gauge and not a +// Metric so that no type conversion is required. +func (m *GaugeVec) GetMetricWithLabelValues(lvs ...string) (Gauge, error) { + metric, err := m.MetricVec.GetMetricWithLabelValues(lvs...) + if metric != nil { + return metric.(Gauge), err + } + return nil, err +} + +// GetMetricWith replaces the method of the same name in MetricVec. The +// difference is that this method returns a Gauge and not a Metric so that no +// type conversion is required. +func (m *GaugeVec) GetMetricWith(labels Labels) (Gauge, error) { + metric, err := m.MetricVec.GetMetricWith(labels) + if metric != nil { + return metric.(Gauge), err + } + return nil, err +} + +// WithLabelValues works as GetMetricWithLabelValues, but panics where +// GetMetricWithLabelValues would have returned an error. By not returning an +// error, WithLabelValues allows shortcuts like +// myVec.WithLabelValues("404", "GET").Add(42) +func (m *GaugeVec) WithLabelValues(lvs ...string) Gauge { + return m.MetricVec.WithLabelValues(lvs...).(Gauge) +} + +// With works as GetMetricWith, but panics where GetMetricWithLabels would have +// returned an error. By not returning an error, With allows shortcuts like +// myVec.With(Labels{"code": "404", "method": "GET"}).Add(42) +func (m *GaugeVec) With(labels Labels) Gauge { + return m.MetricVec.With(labels).(Gauge) +} + +// GaugeFunc is a Gauge whose value is determined at collect time by calling a +// provided function. +// +// To create GaugeFunc instances, use NewGaugeFunc. +type GaugeFunc interface { + Metric + Collector +} + +// NewGaugeFunc creates a new GaugeFunc based on the provided GaugeOpts. The +// value reported is determined by calling the given function from within the +// Write method. Take into account that metric collection may happen +// concurrently. If that results in concurrent calls to Write, like in the case +// where a GaugeFunc is directly registered with Prometheus, the provided +// function must be concurrency-safe. +func NewGaugeFunc(opts GaugeOpts, function func() float64) GaugeFunc { + return newValueFunc(NewDesc( + BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), + opts.Help, + nil, + opts.ConstLabels, + ), GaugeValue, function) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/go_collector.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/go_collector.go new file mode 100644 index 0000000000000..8be247695182f --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/go_collector.go @@ -0,0 +1,263 @@ +package prometheus + +import ( + "fmt" + "runtime" + "runtime/debug" + "time" +) + +type goCollector struct { + goroutines Gauge + gcDesc *Desc + + // metrics to describe and collect + metrics memStatsMetrics +} + +// NewGoCollector returns a collector which exports metrics about the current +// go process. +func NewGoCollector() *goCollector { + return &goCollector{ + goroutines: NewGauge(GaugeOpts{ + Namespace: "go", + Name: "goroutines", + Help: "Number of goroutines that currently exist.", + }), + gcDesc: NewDesc( + "go_gc_duration_seconds", + "A summary of the GC invocation durations.", + nil, nil), + metrics: memStatsMetrics{ + { + desc: NewDesc( + memstatNamespace("alloc_bytes"), + "Number of bytes allocated and still in use.", + nil, nil, + ), + eval: func(ms *runtime.MemStats) float64 { return float64(ms.Alloc) }, + valType: GaugeValue, + }, { + desc: NewDesc( + memstatNamespace("alloc_bytes_total"), + "Total number of bytes allocated, even if freed.", + nil, nil, + ), + eval: func(ms *runtime.MemStats) float64 { return float64(ms.TotalAlloc) }, + valType: CounterValue, + }, { + desc: NewDesc( + memstatNamespace("sys_bytes"), + "Number of bytes obtained by system. Sum of all system allocations.", + nil, nil, + ), + eval: func(ms *runtime.MemStats) float64 { return float64(ms.Sys) }, + valType: GaugeValue, + }, { + desc: NewDesc( + memstatNamespace("lookups_total"), + "Total number of pointer lookups.", + nil, nil, + ), + eval: func(ms *runtime.MemStats) float64 { return float64(ms.Lookups) }, + valType: CounterValue, + }, { + desc: NewDesc( + memstatNamespace("mallocs_total"), + "Total number of mallocs.", + nil, nil, + ), + eval: func(ms *runtime.MemStats) float64 { return float64(ms.Mallocs) }, + valType: CounterValue, + }, { + desc: NewDesc( + memstatNamespace("frees_total"), + "Total number of frees.", + nil, nil, + ), + eval: func(ms *runtime.MemStats) float64 { return float64(ms.Frees) }, + valType: CounterValue, + }, { + desc: NewDesc( + memstatNamespace("heap_alloc_bytes"), + "Number of heap bytes allocated and still in use.", + nil, nil, + ), + eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapAlloc) }, + valType: GaugeValue, + }, { + desc: NewDesc( + memstatNamespace("heap_sys_bytes"), + "Number of heap bytes obtained from system.", + nil, nil, + ), + eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapSys) }, + valType: GaugeValue, + }, { + desc: NewDesc( + memstatNamespace("heap_idle_bytes"), + "Number of heap bytes waiting to be used.", + nil, nil, + ), + eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapIdle) }, + valType: GaugeValue, + }, { + desc: NewDesc( + memstatNamespace("heap_inuse_bytes"), + "Number of heap bytes that are in use.", + nil, nil, + ), + eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapInuse) }, + valType: GaugeValue, + }, { + desc: NewDesc( + memstatNamespace("heap_released_bytes_total"), + "Total number of heap bytes released to OS.", + nil, nil, + ), + eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapReleased) }, + valType: CounterValue, + }, { + desc: NewDesc( + memstatNamespace("heap_objects"), + "Number of allocated objects.", + nil, nil, + ), + eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapObjects) }, + valType: GaugeValue, + }, { + desc: NewDesc( + memstatNamespace("stack_inuse_bytes"), + "Number of bytes in use by the stack allocator.", + nil, nil, + ), + eval: func(ms *runtime.MemStats) float64 { return float64(ms.StackInuse) }, + valType: GaugeValue, + }, { + desc: NewDesc( + memstatNamespace("stack_sys_bytes"), + "Number of bytes obtained from system for stack allocator.", + nil, nil, + ), + eval: func(ms *runtime.MemStats) float64 { return float64(ms.StackSys) }, + valType: GaugeValue, + }, { + desc: NewDesc( + memstatNamespace("mspan_inuse_bytes"), + "Number of bytes in use by mspan structures.", + nil, nil, + ), + eval: func(ms *runtime.MemStats) float64 { return float64(ms.MSpanInuse) }, + valType: GaugeValue, + }, { + desc: NewDesc( + memstatNamespace("mspan_sys_bytes"), + "Number of bytes used for mspan structures obtained from system.", + nil, nil, + ), + eval: func(ms *runtime.MemStats) float64 { return float64(ms.MSpanSys) }, + valType: GaugeValue, + }, { + desc: NewDesc( + memstatNamespace("mcache_inuse_bytes"), + "Number of bytes in use by mcache structures.", + nil, nil, + ), + eval: func(ms *runtime.MemStats) float64 { return float64(ms.MCacheInuse) }, + valType: GaugeValue, + }, { + desc: NewDesc( + memstatNamespace("mcache_sys_bytes"), + "Number of bytes used for mcache structures obtained from system.", + nil, nil, + ), + eval: func(ms *runtime.MemStats) float64 { return float64(ms.MCacheSys) }, + valType: GaugeValue, + }, { + desc: NewDesc( + memstatNamespace("buck_hash_sys_bytes"), + "Number of bytes used by the profiling bucket hash table.", + nil, nil, + ), + eval: func(ms *runtime.MemStats) float64 { return float64(ms.BuckHashSys) }, + valType: GaugeValue, + }, { + desc: NewDesc( + memstatNamespace("gc_sys_bytes"), + "Number of bytes used for garbage collection system metadata.", + nil, nil, + ), + eval: func(ms *runtime.MemStats) float64 { return float64(ms.GCSys) }, + valType: GaugeValue, + }, { + desc: NewDesc( + memstatNamespace("other_sys_bytes"), + "Number of bytes used for other system allocations.", + nil, nil, + ), + eval: func(ms *runtime.MemStats) float64 { return float64(ms.OtherSys) }, + valType: GaugeValue, + }, { + desc: NewDesc( + memstatNamespace("next_gc_bytes"), + "Number of heap bytes when next garbage collection will take place.", + nil, nil, + ), + eval: func(ms *runtime.MemStats) float64 { return float64(ms.NextGC) }, + valType: GaugeValue, + }, { + desc: NewDesc( + memstatNamespace("last_gc_time_seconds"), + "Number of seconds since 1970 of last garbage collection.", + nil, nil, + ), + eval: func(ms *runtime.MemStats) float64 { return float64(ms.LastGC*10 ^ 9) }, + valType: GaugeValue, + }, + }, + } +} + +func memstatNamespace(s string) string { + return fmt.Sprintf("go_memstats_%s", s) +} + +// Describe returns all descriptions of the collector. +func (c *goCollector) Describe(ch chan<- *Desc) { + ch <- c.goroutines.Desc() + ch <- c.gcDesc + + for _, i := range c.metrics { + ch <- i.desc + } +} + +// Collect returns the current state of all metrics of the collector. +func (c *goCollector) Collect(ch chan<- Metric) { + c.goroutines.Set(float64(runtime.NumGoroutine())) + ch <- c.goroutines + + var stats debug.GCStats + stats.PauseQuantiles = make([]time.Duration, 5) + debug.ReadGCStats(&stats) + + quantiles := make(map[float64]float64) + for idx, pq := range stats.PauseQuantiles[1:] { + quantiles[float64(idx+1)/float64(len(stats.PauseQuantiles)-1)] = pq.Seconds() + } + quantiles[0.0] = stats.PauseQuantiles[0].Seconds() + ch <- MustNewConstSummary(c.gcDesc, uint64(stats.NumGC), float64(stats.PauseTotal.Seconds()), quantiles) + + ms := &runtime.MemStats{} + runtime.ReadMemStats(ms) + for _, i := range c.metrics { + ch <- MustNewConstMetric(i.desc, i.valType, i.eval(ms)) + } +} + +// memStatsMetrics provide description, value, and value type for memstat metrics. +type memStatsMetrics []struct { + desc *Desc + eval func(*runtime.MemStats) float64 + valType ValueType +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/histogram.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/histogram.go new file mode 100644 index 0000000000000..f98a41bc89d68 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/histogram.go @@ -0,0 +1,450 @@ +// Copyright 2015 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prometheus + +import ( + "fmt" + "hash/fnv" + "math" + "sort" + "sync/atomic" + + "github.com/golang/protobuf/proto" + + dto "github.com/prometheus/client_model/go" +) + +// A Histogram counts individual observations from an event or sample stream in +// configurable buckets. Similar to a summary, it also provides a sum of +// observations and an observation count. +// +// On the Prometheus server, quantiles can be calculated from a Histogram using +// the histogram_quantile function in the query language. +// +// Note that Histograms, in contrast to Summaries, can be aggregated with the +// Prometheus query language (see the documentation for detailed +// procedures). However, Histograms require the user to pre-define suitable +// buckets, and they are in general less accurate. The Observe method of a +// Histogram has a very low performance overhead in comparison with the Observe +// method of a Summary. +// +// To create Histogram instances, use NewHistogram. +type Histogram interface { + Metric + Collector + + // Observe adds a single observation to the histogram. + Observe(float64) +} + +// bucketLabel is used for the label that defines the upper bound of a +// bucket of a histogram ("le" -> "less or equal"). +const bucketLabel = "le" + +var ( + // DefBuckets are the default Histogram buckets. The default buckets are + // tailored to broadly measure the response time (in seconds) of a + // network service. Most likely, however, you will be required to define + // buckets customized to your use case. + DefBuckets = []float64{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10} + + errBucketLabelNotAllowed = fmt.Errorf( + "%q is not allowed as label name in histograms", bucketLabel, + ) +) + +// LinearBuckets creates 'count' buckets, each 'width' wide, where the lowest +// bucket has an upper bound of 'start'. The final +Inf bucket is not counted +// and not included in the returned slice. The returned slice is meant to be +// used for the Buckets field of HistogramOpts. +// +// The function panics if 'count' is zero or negative. +func LinearBuckets(start, width float64, count int) []float64 { + if count < 1 { + panic("LinearBuckets needs a positive count") + } + buckets := make([]float64, count) + for i := range buckets { + buckets[i] = start + start += width + } + return buckets +} + +// ExponentialBuckets creates 'count' buckets, where the lowest bucket has an +// upper bound of 'start' and each following bucket's upper bound is 'factor' +// times the previous bucket's upper bound. The final +Inf bucket is not counted +// and not included in the returned slice. The returned slice is meant to be +// used for the Buckets field of HistogramOpts. +// +// The function panics if 'count' is 0 or negative, if 'start' is 0 or negative, +// or if 'factor' is less than or equal 1. +func ExponentialBuckets(start, factor float64, count int) []float64 { + if count < 1 { + panic("ExponentialBuckets needs a positive count") + } + if start <= 0 { + panic("ExponentialBuckets needs a positive start value") + } + if factor <= 1 { + panic("ExponentialBuckets needs a factor greater than 1") + } + buckets := make([]float64, count) + for i := range buckets { + buckets[i] = start + start *= factor + } + return buckets +} + +// HistogramOpts bundles the options for creating a Histogram metric. It is +// mandatory to set Name and Help to a non-empty string. All other fields are +// optional and can safely be left at their zero value. +type HistogramOpts struct { + // Namespace, Subsystem, and Name are components of the fully-qualified + // name of the Histogram (created by joining these components with + // "_"). Only Name is mandatory, the others merely help structuring the + // name. Note that the fully-qualified name of the Histogram must be a + // valid Prometheus metric name. + Namespace string + Subsystem string + Name string + + // Help provides information about this Histogram. Mandatory! + // + // Metrics with the same fully-qualified name must have the same Help + // string. + Help string + + // ConstLabels are used to attach fixed labels to this + // Histogram. Histograms with the same fully-qualified name must have the + // same label names in their ConstLabels. + // + // Note that in most cases, labels have a value that varies during the + // lifetime of a process. Those labels are usually managed with a + // HistogramVec. ConstLabels serve only special purposes. One is for the + // special case where the value of a label does not change during the + // lifetime of a process, e.g. if the revision of the running binary is + // put into a label. Another, more advanced purpose is if more than one + // Collector needs to collect Histograms with the same fully-qualified + // name. In that case, those Summaries must differ in the values of + // their ConstLabels. See the Collector examples. + // + // If the value of a label never changes (not even between binaries), + // that label most likely should not be a label at all (but part of the + // metric name). + ConstLabels Labels + + // Buckets defines the buckets into which observations are counted. Each + // element in the slice is the upper inclusive bound of a bucket. The + // values must be sorted in strictly increasing order. There is no need + // to add a highest bucket with +Inf bound, it will be added + // implicitly. The default value is DefBuckets. + Buckets []float64 +} + +// NewHistogram creates a new Histogram based on the provided HistogramOpts. It +// panics if the buckets in HistogramOpts are not in strictly increasing order. +func NewHistogram(opts HistogramOpts) Histogram { + return newHistogram( + NewDesc( + BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), + opts.Help, + nil, + opts.ConstLabels, + ), + opts, + ) +} + +func newHistogram(desc *Desc, opts HistogramOpts, labelValues ...string) Histogram { + if len(desc.variableLabels) != len(labelValues) { + panic(errInconsistentCardinality) + } + + for _, n := range desc.variableLabels { + if n == bucketLabel { + panic(errBucketLabelNotAllowed) + } + } + for _, lp := range desc.constLabelPairs { + if lp.GetName() == bucketLabel { + panic(errBucketLabelNotAllowed) + } + } + + if len(opts.Buckets) == 0 { + opts.Buckets = DefBuckets + } + + h := &histogram{ + desc: desc, + upperBounds: opts.Buckets, + labelPairs: makeLabelPairs(desc, labelValues), + } + for i, upperBound := range h.upperBounds { + if i < len(h.upperBounds)-1 { + if upperBound >= h.upperBounds[i+1] { + panic(fmt.Errorf( + "histogram buckets must be in increasing order: %f >= %f", + upperBound, h.upperBounds[i+1], + )) + } + } else { + if math.IsInf(upperBound, +1) { + // The +Inf bucket is implicit. Remove it here. + h.upperBounds = h.upperBounds[:i] + } + } + } + // Finally we know the final length of h.upperBounds and can make counts. + h.counts = make([]uint64, len(h.upperBounds)) + + h.Init(h) // Init self-collection. + return h +} + +type histogram struct { + // sumBits contains the bits of the float64 representing the sum of all + // observations. sumBits and count have to go first in the struct to + // guarantee alignment for atomic operations. + // http://golang.org/pkg/sync/atomic/#pkg-note-BUG + sumBits uint64 + count uint64 + + SelfCollector + // Note that there is no mutex required. + + desc *Desc + + upperBounds []float64 + counts []uint64 + + labelPairs []*dto.LabelPair +} + +func (h *histogram) Desc() *Desc { + return h.desc +} + +func (h *histogram) Observe(v float64) { + // TODO(beorn7): For small numbers of buckets (<30), a linear search is + // slightly faster than the binary search. If we really care, we could + // switch from one search strategy to the other depending on the number + // of buckets. + // + // Microbenchmarks (BenchmarkHistogramNoLabels): + // 11 buckets: 38.3 ns/op linear - binary 48.7 ns/op + // 100 buckets: 78.1 ns/op linear - binary 54.9 ns/op + // 300 buckets: 154 ns/op linear - binary 61.6 ns/op + i := sort.SearchFloat64s(h.upperBounds, v) + if i < len(h.counts) { + atomic.AddUint64(&h.counts[i], 1) + } + atomic.AddUint64(&h.count, 1) + for { + oldBits := atomic.LoadUint64(&h.sumBits) + newBits := math.Float64bits(math.Float64frombits(oldBits) + v) + if atomic.CompareAndSwapUint64(&h.sumBits, oldBits, newBits) { + break + } + } +} + +func (h *histogram) Write(out *dto.Metric) error { + his := &dto.Histogram{} + buckets := make([]*dto.Bucket, len(h.upperBounds)) + + his.SampleSum = proto.Float64(math.Float64frombits(atomic.LoadUint64(&h.sumBits))) + his.SampleCount = proto.Uint64(atomic.LoadUint64(&h.count)) + var count uint64 + for i, upperBound := range h.upperBounds { + count += atomic.LoadUint64(&h.counts[i]) + buckets[i] = &dto.Bucket{ + CumulativeCount: proto.Uint64(count), + UpperBound: proto.Float64(upperBound), + } + } + his.Bucket = buckets + out.Histogram = his + out.Label = h.labelPairs + return nil +} + +// HistogramVec is a Collector that bundles a set of Histograms that all share the +// same Desc, but have different values for their variable labels. This is used +// if you want to count the same thing partitioned by various dimensions +// (e.g. HTTP request latencies, partitioned by status code and method). Create +// instances with NewHistogramVec. +type HistogramVec struct { + MetricVec +} + +// NewHistogramVec creates a new HistogramVec based on the provided HistogramOpts and +// partitioned by the given label names. At least one label name must be +// provided. +func NewHistogramVec(opts HistogramOpts, labelNames []string) *HistogramVec { + desc := NewDesc( + BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), + opts.Help, + labelNames, + opts.ConstLabels, + ) + return &HistogramVec{ + MetricVec: MetricVec{ + children: map[uint64]Metric{}, + desc: desc, + hash: fnv.New64a(), + newMetric: func(lvs ...string) Metric { + return newHistogram(desc, opts, lvs...) + }, + }, + } +} + +// GetMetricWithLabelValues replaces the method of the same name in +// MetricVec. The difference is that this method returns a Histogram and not a +// Metric so that no type conversion is required. +func (m *HistogramVec) GetMetricWithLabelValues(lvs ...string) (Histogram, error) { + metric, err := m.MetricVec.GetMetricWithLabelValues(lvs...) + if metric != nil { + return metric.(Histogram), err + } + return nil, err +} + +// GetMetricWith replaces the method of the same name in MetricVec. The +// difference is that this method returns a Histogram and not a Metric so that no +// type conversion is required. +func (m *HistogramVec) GetMetricWith(labels Labels) (Histogram, error) { + metric, err := m.MetricVec.GetMetricWith(labels) + if metric != nil { + return metric.(Histogram), err + } + return nil, err +} + +// WithLabelValues works as GetMetricWithLabelValues, but panics where +// GetMetricWithLabelValues would have returned an error. By not returning an +// error, WithLabelValues allows shortcuts like +// myVec.WithLabelValues("404", "GET").Observe(42.21) +func (m *HistogramVec) WithLabelValues(lvs ...string) Histogram { + return m.MetricVec.WithLabelValues(lvs...).(Histogram) +} + +// With works as GetMetricWith, but panics where GetMetricWithLabels would have +// returned an error. By not returning an error, With allows shortcuts like +// myVec.With(Labels{"code": "404", "method": "GET"}).Observe(42.21) +func (m *HistogramVec) With(labels Labels) Histogram { + return m.MetricVec.With(labels).(Histogram) +} + +type constHistogram struct { + desc *Desc + count uint64 + sum float64 + buckets map[float64]uint64 + labelPairs []*dto.LabelPair +} + +func (h *constHistogram) Desc() *Desc { + return h.desc +} + +func (h *constHistogram) Write(out *dto.Metric) error { + his := &dto.Histogram{} + buckets := make([]*dto.Bucket, 0, len(h.buckets)) + + his.SampleCount = proto.Uint64(h.count) + his.SampleSum = proto.Float64(h.sum) + + for upperBound, count := range h.buckets { + buckets = append(buckets, &dto.Bucket{ + CumulativeCount: proto.Uint64(count), + UpperBound: proto.Float64(upperBound), + }) + } + + if len(buckets) > 0 { + sort.Sort(buckSort(buckets)) + } + his.Bucket = buckets + + out.Histogram = his + out.Label = h.labelPairs + + return nil +} + +// NewConstHistogram returns a metric representing a Prometheus histogram with +// fixed values for the count, sum, and bucket counts. As those parameters +// cannot be changed, the returned value does not implement the Histogram +// interface (but only the Metric interface). Users of this package will not +// have much use for it in regular operations. However, when implementing custom +// Collectors, it is useful as a throw-away metric that is generated on the fly +// to send it to Prometheus in the Collect method. +// +// buckets is a map of upper bounds to cumulative counts, excluding the +Inf +// bucket. +// +// NewConstHistogram returns an error if the length of labelValues is not +// consistent with the variable labels in Desc. +func NewConstHistogram( + desc *Desc, + count uint64, + sum float64, + buckets map[float64]uint64, + labelValues ...string, +) (Metric, error) { + if len(desc.variableLabels) != len(labelValues) { + return nil, errInconsistentCardinality + } + return &constHistogram{ + desc: desc, + count: count, + sum: sum, + buckets: buckets, + labelPairs: makeLabelPairs(desc, labelValues), + }, nil +} + +// MustNewConstHistogram is a version of NewConstHistogram that panics where +// NewConstMetric would have returned an error. +func MustNewConstHistogram( + desc *Desc, + count uint64, + sum float64, + buckets map[float64]uint64, + labelValues ...string, +) Metric { + m, err := NewConstHistogram(desc, count, sum, buckets, labelValues...) + if err != nil { + panic(err) + } + return m +} + +type buckSort []*dto.Bucket + +func (s buckSort) Len() int { + return len(s) +} + +func (s buckSort) Swap(i, j int) { + s[i], s[j] = s[j], s[i] +} + +func (s buckSort) Less(i, j int) bool { + return s[i].GetUpperBound() < s[j].GetUpperBound() +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/http.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/http.go new file mode 100644 index 0000000000000..eabe602468f11 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/http.go @@ -0,0 +1,361 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prometheus + +import ( + "bufio" + "io" + "net" + "net/http" + "strconv" + "strings" + "time" +) + +var instLabels = []string{"method", "code"} + +type nower interface { + Now() time.Time +} + +type nowFunc func() time.Time + +func (n nowFunc) Now() time.Time { + return n() +} + +var now nower = nowFunc(func() time.Time { + return time.Now() +}) + +func nowSeries(t ...time.Time) nower { + return nowFunc(func() time.Time { + defer func() { + t = t[1:] + }() + + return t[0] + }) +} + +// InstrumentHandler wraps the given HTTP handler for instrumentation. It +// registers four metric collectors (if not already done) and reports HTTP +// metrics to the (newly or already) registered collectors: http_requests_total +// (CounterVec), http_request_duration_microseconds (Summary), +// http_request_size_bytes (Summary), http_response_size_bytes (Summary). Each +// has a constant label named "handler" with the provided handlerName as +// value. http_requests_total is a metric vector partitioned by HTTP method +// (label name "method") and HTTP status code (label name "code"). +func InstrumentHandler(handlerName string, handler http.Handler) http.HandlerFunc { + return InstrumentHandlerFunc(handlerName, handler.ServeHTTP) +} + +// InstrumentHandlerFunc wraps the given function for instrumentation. It +// otherwise works in the same way as InstrumentHandler. +func InstrumentHandlerFunc(handlerName string, handlerFunc func(http.ResponseWriter, *http.Request)) http.HandlerFunc { + return InstrumentHandlerFuncWithOpts( + SummaryOpts{ + Subsystem: "http", + ConstLabels: Labels{"handler": handlerName}, + }, + handlerFunc, + ) +} + +// InstrumentHandlerWithOpts works like InstrumentHandler but provides more +// flexibility (at the cost of a more complex call syntax). As +// InstrumentHandler, this function registers four metric collectors, but it +// uses the provided SummaryOpts to create them. However, the fields "Name" and +// "Help" in the SummaryOpts are ignored. "Name" is replaced by +// "requests_total", "request_duration_microseconds", "request_size_bytes", and +// "response_size_bytes", respectively. "Help" is replaced by an appropriate +// help string. The names of the variable labels of the http_requests_total +// CounterVec are "method" (get, post, etc.), and "code" (HTTP status code). +// +// If InstrumentHandlerWithOpts is called as follows, it mimics exactly the +// behavior of InstrumentHandler: +// +// prometheus.InstrumentHandlerWithOpts( +// prometheus.SummaryOpts{ +// Subsystem: "http", +// ConstLabels: prometheus.Labels{"handler": handlerName}, +// }, +// handler, +// ) +// +// Technical detail: "requests_total" is a CounterVec, not a SummaryVec, so it +// cannot use SummaryOpts. Instead, a CounterOpts struct is created internally, +// and all its fields are set to the equally named fields in the provided +// SummaryOpts. +func InstrumentHandlerWithOpts(opts SummaryOpts, handler http.Handler) http.HandlerFunc { + return InstrumentHandlerFuncWithOpts(opts, handler.ServeHTTP) +} + +// InstrumentHandlerFuncWithOpts works like InstrumentHandlerFunc but provides +// more flexibility (at the cost of a more complex call syntax). See +// InstrumentHandlerWithOpts for details how the provided SummaryOpts are used. +func InstrumentHandlerFuncWithOpts(opts SummaryOpts, handlerFunc func(http.ResponseWriter, *http.Request)) http.HandlerFunc { + reqCnt := NewCounterVec( + CounterOpts{ + Namespace: opts.Namespace, + Subsystem: opts.Subsystem, + Name: "requests_total", + Help: "Total number of HTTP requests made.", + ConstLabels: opts.ConstLabels, + }, + instLabels, + ) + + opts.Name = "request_duration_microseconds" + opts.Help = "The HTTP request latencies in microseconds." + reqDur := NewSummary(opts) + + opts.Name = "request_size_bytes" + opts.Help = "The HTTP request sizes in bytes." + reqSz := NewSummary(opts) + + opts.Name = "response_size_bytes" + opts.Help = "The HTTP response sizes in bytes." + resSz := NewSummary(opts) + + regReqCnt := MustRegisterOrGet(reqCnt).(*CounterVec) + regReqDur := MustRegisterOrGet(reqDur).(Summary) + regReqSz := MustRegisterOrGet(reqSz).(Summary) + regResSz := MustRegisterOrGet(resSz).(Summary) + + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + now := time.Now() + + delegate := &responseWriterDelegator{ResponseWriter: w} + out := make(chan int) + urlLen := 0 + if r.URL != nil { + urlLen = len(r.URL.String()) + } + go computeApproximateRequestSize(r, out, urlLen) + + _, cn := w.(http.CloseNotifier) + _, fl := w.(http.Flusher) + _, hj := w.(http.Hijacker) + _, rf := w.(io.ReaderFrom) + var rw http.ResponseWriter + if cn && fl && hj && rf { + rw = &fancyResponseWriterDelegator{delegate} + } else { + rw = delegate + } + handlerFunc(rw, r) + + elapsed := float64(time.Since(now)) / float64(time.Microsecond) + + method := sanitizeMethod(r.Method) + code := sanitizeCode(delegate.status) + regReqCnt.WithLabelValues(method, code).Inc() + regReqDur.Observe(elapsed) + regResSz.Observe(float64(delegate.written)) + regReqSz.Observe(float64(<-out)) + }) +} + +func computeApproximateRequestSize(r *http.Request, out chan int, s int) { + s += len(r.Method) + s += len(r.Proto) + for name, values := range r.Header { + s += len(name) + for _, value := range values { + s += len(value) + } + } + s += len(r.Host) + + // N.B. r.Form and r.MultipartForm are assumed to be included in r.URL. + + if r.ContentLength != -1 { + s += int(r.ContentLength) + } + out <- s +} + +type responseWriterDelegator struct { + http.ResponseWriter + + handler, method string + status int + written int64 + wroteHeader bool +} + +func (r *responseWriterDelegator) WriteHeader(code int) { + r.status = code + r.wroteHeader = true + r.ResponseWriter.WriteHeader(code) +} + +func (r *responseWriterDelegator) Write(b []byte) (int, error) { + if !r.wroteHeader { + r.WriteHeader(http.StatusOK) + } + n, err := r.ResponseWriter.Write(b) + r.written += int64(n) + return n, err +} + +type fancyResponseWriterDelegator struct { + *responseWriterDelegator +} + +func (f *fancyResponseWriterDelegator) CloseNotify() <-chan bool { + return f.ResponseWriter.(http.CloseNotifier).CloseNotify() +} + +func (f *fancyResponseWriterDelegator) Flush() { + f.ResponseWriter.(http.Flusher).Flush() +} + +func (f *fancyResponseWriterDelegator) Hijack() (net.Conn, *bufio.ReadWriter, error) { + return f.ResponseWriter.(http.Hijacker).Hijack() +} + +func (f *fancyResponseWriterDelegator) ReadFrom(r io.Reader) (int64, error) { + if !f.wroteHeader { + f.WriteHeader(http.StatusOK) + } + n, err := f.ResponseWriter.(io.ReaderFrom).ReadFrom(r) + f.written += n + return n, err +} + +func sanitizeMethod(m string) string { + switch m { + case "GET", "get": + return "get" + case "PUT", "put": + return "put" + case "HEAD", "head": + return "head" + case "POST", "post": + return "post" + case "DELETE", "delete": + return "delete" + case "CONNECT", "connect": + return "connect" + case "OPTIONS", "options": + return "options" + case "NOTIFY", "notify": + return "notify" + default: + return strings.ToLower(m) + } +} + +func sanitizeCode(s int) string { + switch s { + case 100: + return "100" + case 101: + return "101" + + case 200: + return "200" + case 201: + return "201" + case 202: + return "202" + case 203: + return "203" + case 204: + return "204" + case 205: + return "205" + case 206: + return "206" + + case 300: + return "300" + case 301: + return "301" + case 302: + return "302" + case 304: + return "304" + case 305: + return "305" + case 307: + return "307" + + case 400: + return "400" + case 401: + return "401" + case 402: + return "402" + case 403: + return "403" + case 404: + return "404" + case 405: + return "405" + case 406: + return "406" + case 407: + return "407" + case 408: + return "408" + case 409: + return "409" + case 410: + return "410" + case 411: + return "411" + case 412: + return "412" + case 413: + return "413" + case 414: + return "414" + case 415: + return "415" + case 416: + return "416" + case 417: + return "417" + case 418: + return "418" + + case 500: + return "500" + case 501: + return "501" + case 502: + return "502" + case 503: + return "503" + case 504: + return "504" + case 505: + return "505" + + case 428: + return "428" + case 429: + return "429" + case 431: + return "431" + case 511: + return "511" + + default: + return strconv.Itoa(s) + } +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/metric.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/metric.go new file mode 100644 index 0000000000000..86fd81c108bde --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/metric.go @@ -0,0 +1,166 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prometheus + +import ( + "strings" + + dto "github.com/prometheus/client_model/go" +) + +const separatorByte byte = 255 + +// A Metric models a single sample value with its meta data being exported to +// Prometheus. Implementers of Metric in this package inclued Gauge, Counter, +// Untyped, and Summary. Users can implement their own Metric types, but that +// should be rarely needed. See the example for SelfCollector, which is also an +// example for a user-implemented Metric. +type Metric interface { + // Desc returns the descriptor for the Metric. This method idempotently + // returns the same descriptor throughout the lifetime of the + // Metric. The returned descriptor is immutable by contract. A Metric + // unable to describe itself must return an invalid descriptor (created + // with NewInvalidDesc). + Desc() *Desc + // Write encodes the Metric into a "Metric" Protocol Buffer data + // transmission object. + // + // Implementers of custom Metric types must observe concurrency safety + // as reads of this metric may occur at any time, and any blocking + // occurs at the expense of total performance of rendering all + // registered metrics. Ideally Metric implementations should support + // concurrent readers. + // + // The Prometheus client library attempts to minimize memory allocations + // and will provide a pre-existing reset dto.Metric pointer. Prometheus + // may recycle the dto.Metric proto message, so Metric implementations + // should just populate the provided dto.Metric and then should not keep + // any reference to it. + // + // While populating dto.Metric, labels must be sorted lexicographically. + // (Implementers may find LabelPairSorter useful for that.) + Write(*dto.Metric) error +} + +// Opts bundles the options for creating most Metric types. Each metric +// implementation XXX has its own XXXOpts type, but in most cases, it is just be +// an alias of this type (which might change when the requirement arises.) +// +// It is mandatory to set Name and Help to a non-empty string. All other fields +// are optional and can safely be left at their zero value. +type Opts struct { + // Namespace, Subsystem, and Name are components of the fully-qualified + // name of the Metric (created by joining these components with + // "_"). Only Name is mandatory, the others merely help structuring the + // name. Note that the fully-qualified name of the metric must be a + // valid Prometheus metric name. + Namespace string + Subsystem string + Name string + + // Help provides information about this metric. Mandatory! + // + // Metrics with the same fully-qualified name must have the same Help + // string. + Help string + + // ConstLabels are used to attach fixed labels to this metric. Metrics + // with the same fully-qualified name must have the same label names in + // their ConstLabels. + // + // Note that in most cases, labels have a value that varies during the + // lifetime of a process. Those labels are usually managed with a metric + // vector collector (like CounterVec, GaugeVec, UntypedVec). ConstLabels + // serve only special purposes. One is for the special case where the + // value of a label does not change during the lifetime of a process, + // e.g. if the revision of the running binary is put into a + // label. Another, more advanced purpose is if more than one Collector + // needs to collect Metrics with the same fully-qualified name. In that + // case, those Metrics must differ in the values of their + // ConstLabels. See the Collector examples. + // + // If the value of a label never changes (not even between binaries), + // that label most likely should not be a label at all (but part of the + // metric name). + ConstLabels Labels +} + +// BuildFQName joins the given three name components by "_". Empty name +// components are ignored. If the name parameter itself is empty, an empty +// string is returned, no matter what. Metric implementations included in this +// library use this function internally to generate the fully-qualified metric +// name from the name component in their Opts. Users of the library will only +// need this function if they implement their own Metric or instantiate a Desc +// (with NewDesc) directly. +func BuildFQName(namespace, subsystem, name string) string { + if name == "" { + return "" + } + switch { + case namespace != "" && subsystem != "": + return strings.Join([]string{namespace, subsystem, name}, "_") + case namespace != "": + return strings.Join([]string{namespace, name}, "_") + case subsystem != "": + return strings.Join([]string{subsystem, name}, "_") + } + return name +} + +// LabelPairSorter implements sort.Interface. It is used to sort a slice of +// dto.LabelPair pointers. This is useful for implementing the Write method of +// custom metrics. +type LabelPairSorter []*dto.LabelPair + +func (s LabelPairSorter) Len() int { + return len(s) +} + +func (s LabelPairSorter) Swap(i, j int) { + s[i], s[j] = s[j], s[i] +} + +func (s LabelPairSorter) Less(i, j int) bool { + return s[i].GetName() < s[j].GetName() +} + +type hashSorter []uint64 + +func (s hashSorter) Len() int { + return len(s) +} + +func (s hashSorter) Swap(i, j int) { + s[i], s[j] = s[j], s[i] +} + +func (s hashSorter) Less(i, j int) bool { + return s[i] < s[j] +} + +type invalidMetric struct { + desc *Desc + err error +} + +// NewInvalidMetric returns a metric whose Write method always returns the +// provided error. It is useful if a Collector finds itself unable to collect +// a metric and wishes to report an error to the registry. +func NewInvalidMetric(desc *Desc, err error) Metric { + return &invalidMetric{desc, err} +} + +func (m *invalidMetric) Desc() *Desc { return m.desc } + +func (m *invalidMetric) Write(*dto.Metric) error { return m.err } diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/process_collector.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/process_collector.go new file mode 100644 index 0000000000000..d8cf0eda347c8 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/process_collector.go @@ -0,0 +1,142 @@ +// Copyright 2015 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prometheus + +import "github.com/prometheus/procfs" + +type processCollector struct { + pid int + collectFn func(chan<- Metric) + pidFn func() (int, error) + cpuTotal Counter + openFDs, maxFDs Gauge + vsize, rss Gauge + startTime Gauge +} + +// NewProcessCollector returns a collector which exports the current state of +// process metrics including cpu, memory and file descriptor usage as well as +// the process start time for the given process id under the given namespace. +func NewProcessCollector(pid int, namespace string) *processCollector { + return NewProcessCollectorPIDFn( + func() (int, error) { return pid, nil }, + namespace, + ) +} + +// NewProcessCollectorPIDFn returns a collector which exports the current state +// of process metrics including cpu, memory and file descriptor usage as well +// as the process start time under the given namespace. The given pidFn is +// called on each collect and is used to determine the process to export +// metrics for. +func NewProcessCollectorPIDFn( + pidFn func() (int, error), + namespace string, +) *processCollector { + c := processCollector{ + pidFn: pidFn, + collectFn: func(chan<- Metric) {}, + + cpuTotal: NewCounter(CounterOpts{ + Namespace: namespace, + Name: "process_cpu_seconds_total", + Help: "Total user and system CPU time spent in seconds.", + }), + openFDs: NewGauge(GaugeOpts{ + Namespace: namespace, + Name: "process_open_fds", + Help: "Number of open file descriptors.", + }), + maxFDs: NewGauge(GaugeOpts{ + Namespace: namespace, + Name: "process_max_fds", + Help: "Maximum number of open file descriptors.", + }), + vsize: NewGauge(GaugeOpts{ + Namespace: namespace, + Name: "process_virtual_memory_bytes", + Help: "Virtual memory size in bytes.", + }), + rss: NewGauge(GaugeOpts{ + Namespace: namespace, + Name: "process_resident_memory_bytes", + Help: "Resident memory size in bytes.", + }), + startTime: NewGauge(GaugeOpts{ + Namespace: namespace, + Name: "process_start_time_seconds", + Help: "Start time of the process since unix epoch in seconds.", + }), + } + + // Set up process metric collection if supported by the runtime. + if _, err := procfs.NewStat(); err == nil { + c.collectFn = c.processCollect + } + + return &c +} + +// Describe returns all descriptions of the collector. +func (c *processCollector) Describe(ch chan<- *Desc) { + ch <- c.cpuTotal.Desc() + ch <- c.openFDs.Desc() + ch <- c.maxFDs.Desc() + ch <- c.vsize.Desc() + ch <- c.rss.Desc() + ch <- c.startTime.Desc() +} + +// Collect returns the current state of all metrics of the collector. +func (c *processCollector) Collect(ch chan<- Metric) { + c.collectFn(ch) +} + +// TODO(ts): Bring back error reporting by reverting 7faf9e7 as soon as the +// client allows users to configure the error behavior. +func (c *processCollector) processCollect(ch chan<- Metric) { + pid, err := c.pidFn() + if err != nil { + return + } + + p, err := procfs.NewProc(pid) + if err != nil { + return + } + + if stat, err := p.NewStat(); err == nil { + c.cpuTotal.Set(stat.CPUTime()) + ch <- c.cpuTotal + c.vsize.Set(float64(stat.VirtualMemory())) + ch <- c.vsize + c.rss.Set(float64(stat.ResidentMemory())) + ch <- c.rss + + if startTime, err := stat.StartTime(); err == nil { + c.startTime.Set(startTime) + ch <- c.startTime + } + } + + if fds, err := p.FileDescriptorsLen(); err == nil { + c.openFDs.Set(float64(fds)) + ch <- c.openFDs + } + + if limits, err := p.NewLimits(); err == nil { + c.maxFDs.Set(float64(limits.OpenFiles)) + ch <- c.maxFDs + } +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/push.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/push.go new file mode 100644 index 0000000000000..1c33848a35383 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/push.go @@ -0,0 +1,65 @@ +// Copyright 2015 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Copyright (c) 2013, The Prometheus Authors +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be found +// in the LICENSE file. + +package prometheus + +// Push triggers a metric collection by the default registry and pushes all +// collected metrics to the Pushgateway specified by addr. See the Pushgateway +// documentation for detailed implications of the job and instance +// parameter. instance can be left empty. You can use just host:port or ip:port +// as url, in which case 'http://' is added automatically. You can also include +// the schema in the URL. However, do not include the '/metrics/jobs/...' part. +// +// Note that all previously pushed metrics with the same job and instance will +// be replaced with the metrics pushed by this call. (It uses HTTP method 'PUT' +// to push to the Pushgateway.) +func Push(job, instance, url string) error { + return defRegistry.Push(job, instance, url, "PUT") +} + +// PushAdd works like Push, but only previously pushed metrics with the same +// name (and the same job and instance) will be replaced. (It uses HTTP method +// 'POST' to push to the Pushgateway.) +func PushAdd(job, instance, url string) error { + return defRegistry.Push(job, instance, url, "POST") +} + +// PushCollectors works like Push, but it does not collect from the default +// registry. Instead, it collects from the provided collectors. It is a +// convenient way to push only a few metrics. +func PushCollectors(job, instance, url string, collectors ...Collector) error { + return pushCollectors(job, instance, url, "PUT", collectors...) +} + +// PushAddCollectors works like PushAdd, but it does not collect from the +// default registry. Instead, it collects from the provided collectors. It is a +// convenient way to push only a few metrics. +func PushAddCollectors(job, instance, url string, collectors ...Collector) error { + return pushCollectors(job, instance, url, "POST", collectors...) +} + +func pushCollectors(job, instance, url, method string, collectors ...Collector) error { + r := newRegistry() + for _, collector := range collectors { + if _, err := r.Register(collector); err != nil { + return err + } + } + return r.Push(job, instance, url, method) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/registry.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/registry.go new file mode 100644 index 0000000000000..5970aaeeba952 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/registry.go @@ -0,0 +1,726 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Copyright (c) 2013, The Prometheus Authors +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be found +// in the LICENSE file. + +package prometheus + +import ( + "bytes" + "compress/gzip" + "errors" + "fmt" + "hash/fnv" + "io" + "net/http" + "net/url" + "os" + "sort" + "strings" + "sync" + + "github.com/golang/protobuf/proto" + "github.com/prometheus/common/expfmt" + + dto "github.com/prometheus/client_model/go" +) + +var ( + defRegistry = newDefaultRegistry() + errAlreadyReg = errors.New("duplicate metrics collector registration attempted") +) + +// Constants relevant to the HTTP interface. +const ( + // APIVersion is the version of the format of the exported data. This + // will match this library's version, which subscribes to the Semantic + // Versioning scheme. + APIVersion = "0.0.4" + + // DelimitedTelemetryContentType is the content type set on telemetry + // data responses in delimited protobuf format. + DelimitedTelemetryContentType = `application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited` + // TextTelemetryContentType is the content type set on telemetry data + // responses in text format. + TextTelemetryContentType = `text/plain; version=` + APIVersion + // ProtoTextTelemetryContentType is the content type set on telemetry + // data responses in protobuf text format. (Only used for debugging.) + ProtoTextTelemetryContentType = `application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=text` + // ProtoCompactTextTelemetryContentType is the content type set on + // telemetry data responses in protobuf compact text format. (Only used + // for debugging.) + ProtoCompactTextTelemetryContentType = `application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=compact-text` + + // Constants for object pools. + numBufs = 4 + numMetricFamilies = 1000 + numMetrics = 10000 + + // Capacity for the channel to collect metrics and descriptors. + capMetricChan = 1000 + capDescChan = 10 + + contentTypeHeader = "Content-Type" + contentLengthHeader = "Content-Length" + contentEncodingHeader = "Content-Encoding" + + acceptEncodingHeader = "Accept-Encoding" + acceptHeader = "Accept" +) + +// Handler returns the HTTP handler for the global Prometheus registry. It is +// already instrumented with InstrumentHandler (using "prometheus" as handler +// name). Usually the handler is used to handle the "/metrics" endpoint. +func Handler() http.Handler { + return InstrumentHandler("prometheus", defRegistry) +} + +// UninstrumentedHandler works in the same way as Handler, but the returned HTTP +// handler is not instrumented. This is useful if no instrumentation is desired +// (for whatever reason) or if the instrumentation has to happen with a +// different handler name (or with a different instrumentation approach +// altogether). See the InstrumentHandler example. +func UninstrumentedHandler() http.Handler { + return defRegistry +} + +// Register registers a new Collector to be included in metrics collection. It +// returns an error if the descriptors provided by the Collector are invalid or +// if they - in combination with descriptors of already registered Collectors - +// do not fulfill the consistency and uniqueness criteria described in the Desc +// documentation. +// +// Do not register the same Collector multiple times concurrently. (Registering +// the same Collector twice would result in an error anyway, but on top of that, +// it is not safe to do so concurrently.) +func Register(m Collector) error { + _, err := defRegistry.Register(m) + return err +} + +// MustRegister works like Register but panics where Register would have +// returned an error. +func MustRegister(m Collector) { + err := Register(m) + if err != nil { + panic(err) + } +} + +// RegisterOrGet works like Register but does not return an error if a Collector +// is registered that equals a previously registered Collector. (Two Collectors +// are considered equal if their Describe method yields the same set of +// descriptors.) Instead, the previously registered Collector is returned (which +// is helpful if the new and previously registered Collectors are equal but not +// identical, i.e. not pointers to the same object). +// +// As for Register, it is still not safe to call RegisterOrGet with the same +// Collector multiple times concurrently. +func RegisterOrGet(m Collector) (Collector, error) { + return defRegistry.RegisterOrGet(m) +} + +// MustRegisterOrGet works like Register but panics where RegisterOrGet would +// have returned an error. +func MustRegisterOrGet(m Collector) Collector { + existing, err := RegisterOrGet(m) + if err != nil { + panic(err) + } + return existing +} + +// Unregister unregisters the Collector that equals the Collector passed in as +// an argument. (Two Collectors are considered equal if their Describe method +// yields the same set of descriptors.) The function returns whether a Collector +// was unregistered. +func Unregister(c Collector) bool { + return defRegistry.Unregister(c) +} + +// SetMetricFamilyInjectionHook sets a function that is called whenever metrics +// are collected. The hook function must be set before metrics collection begins +// (i.e. call SetMetricFamilyInjectionHook before setting the HTTP handler.) The +// MetricFamily protobufs returned by the hook function are merged with the +// metrics collected in the usual way. +// +// This is a way to directly inject MetricFamily protobufs managed and owned by +// the caller. The caller has full responsibility. As no registration of the +// injected metrics has happened, there is no descriptor to check against, and +// there are no registration-time checks. If collect-time checks are disabled +// (see function EnableCollectChecks), no sanity checks are performed on the +// returned protobufs at all. If collect-checks are enabled, type and uniqueness +// checks are performed, but no further consistency checks (which would require +// knowledge of a metric descriptor). +// +// Sorting concerns: The caller is responsible for sorting the label pairs in +// each metric. However, the order of metrics will be sorted by the registry as +// it is required anyway after merging with the metric families collected +// conventionally. +// +// The function must be callable at any time and concurrently. +func SetMetricFamilyInjectionHook(hook func() []*dto.MetricFamily) { + defRegistry.metricFamilyInjectionHook = hook +} + +// PanicOnCollectError sets the behavior whether a panic is caused upon an error +// while metrics are collected and served to the HTTP endpoint. By default, an +// internal server error (status code 500) is served with an error message. +func PanicOnCollectError(b bool) { + defRegistry.panicOnCollectError = b +} + +// EnableCollectChecks enables (or disables) additional consistency checks +// during metrics collection. These additional checks are not enabled by default +// because they inflict a performance penalty and the errors they check for can +// only happen if the used Metric and Collector types have internal programming +// errors. It can be helpful to enable these checks while working with custom +// Collectors or Metrics whose correctness is not well established yet. +func EnableCollectChecks(b bool) { + defRegistry.collectChecksEnabled = b +} + +// encoder is a function that writes a dto.MetricFamily to an io.Writer in a +// certain encoding. It returns the number of bytes written and any error +// encountered. Note that pbutil.WriteDelimited and pbutil.MetricFamilyToText +// are encoders. +type encoder func(io.Writer, *dto.MetricFamily) (int, error) + +type registry struct { + mtx sync.RWMutex + collectorsByID map[uint64]Collector // ID is a hash of the descIDs. + descIDs map[uint64]struct{} + dimHashesByName map[string]uint64 + bufPool chan *bytes.Buffer + metricFamilyPool chan *dto.MetricFamily + metricPool chan *dto.Metric + metricFamilyInjectionHook func() []*dto.MetricFamily + + panicOnCollectError, collectChecksEnabled bool +} + +func (r *registry) Register(c Collector) (Collector, error) { + descChan := make(chan *Desc, capDescChan) + go func() { + c.Describe(descChan) + close(descChan) + }() + + newDescIDs := map[uint64]struct{}{} + newDimHashesByName := map[string]uint64{} + var collectorID uint64 // Just a sum of all desc IDs. + var duplicateDescErr error + + r.mtx.Lock() + defer r.mtx.Unlock() + // Coduct various tests... + for desc := range descChan { + + // Is the descriptor valid at all? + if desc.err != nil { + return c, fmt.Errorf("descriptor %s is invalid: %s", desc, desc.err) + } + + // Is the descID unique? + // (In other words: Is the fqName + constLabel combination unique?) + if _, exists := r.descIDs[desc.id]; exists { + duplicateDescErr = fmt.Errorf("descriptor %s already exists with the same fully-qualified name and const label values", desc) + } + // If it is not a duplicate desc in this collector, add it to + // the collectorID. (We allow duplicate descs within the same + // collector, but their existence must be a no-op.) + if _, exists := newDescIDs[desc.id]; !exists { + newDescIDs[desc.id] = struct{}{} + collectorID += desc.id + } + + // Are all the label names and the help string consistent with + // previous descriptors of the same name? + // First check existing descriptors... + if dimHash, exists := r.dimHashesByName[desc.fqName]; exists { + if dimHash != desc.dimHash { + return nil, fmt.Errorf("a previously registered descriptor with the same fully-qualified name as %s has different label names or a different help string", desc) + } + } else { + // ...then check the new descriptors already seen. + if dimHash, exists := newDimHashesByName[desc.fqName]; exists { + if dimHash != desc.dimHash { + return nil, fmt.Errorf("descriptors reported by collector have inconsistent label names or help strings for the same fully-qualified name, offender is %s", desc) + } + } else { + newDimHashesByName[desc.fqName] = desc.dimHash + } + } + } + // Did anything happen at all? + if len(newDescIDs) == 0 { + return nil, errors.New("collector has no descriptors") + } + if existing, exists := r.collectorsByID[collectorID]; exists { + return existing, errAlreadyReg + } + // If the collectorID is new, but at least one of the descs existed + // before, we are in trouble. + if duplicateDescErr != nil { + return nil, duplicateDescErr + } + + // Only after all tests have passed, actually register. + r.collectorsByID[collectorID] = c + for hash := range newDescIDs { + r.descIDs[hash] = struct{}{} + } + for name, dimHash := range newDimHashesByName { + r.dimHashesByName[name] = dimHash + } + return c, nil +} + +func (r *registry) RegisterOrGet(m Collector) (Collector, error) { + existing, err := r.Register(m) + if err != nil && err != errAlreadyReg { + return nil, err + } + return existing, nil +} + +func (r *registry) Unregister(c Collector) bool { + descChan := make(chan *Desc, capDescChan) + go func() { + c.Describe(descChan) + close(descChan) + }() + + descIDs := map[uint64]struct{}{} + var collectorID uint64 // Just a sum of the desc IDs. + for desc := range descChan { + if _, exists := descIDs[desc.id]; !exists { + collectorID += desc.id + descIDs[desc.id] = struct{}{} + } + } + + r.mtx.RLock() + if _, exists := r.collectorsByID[collectorID]; !exists { + r.mtx.RUnlock() + return false + } + r.mtx.RUnlock() + + r.mtx.Lock() + defer r.mtx.Unlock() + + delete(r.collectorsByID, collectorID) + for id := range descIDs { + delete(r.descIDs, id) + } + // dimHashesByName is left untouched as those must be consistent + // throughout the lifetime of a program. + return true +} + +func (r *registry) Push(job, instance, pushURL, method string) error { + if !strings.Contains(pushURL, "://") { + pushURL = "http://" + pushURL + } + pushURL = fmt.Sprintf("%s/metrics/jobs/%s", pushURL, url.QueryEscape(job)) + if instance != "" { + pushURL += "/instances/" + url.QueryEscape(instance) + } + buf := r.getBuf() + defer r.giveBuf(buf) + if err := r.writePB(expfmt.NewEncoder(buf, expfmt.FmtProtoDelim)); err != nil { + if r.panicOnCollectError { + panic(err) + } + return err + } + req, err := http.NewRequest(method, pushURL, buf) + if err != nil { + return err + } + req.Header.Set(contentTypeHeader, DelimitedTelemetryContentType) + resp, err := http.DefaultClient.Do(req) + if err != nil { + return err + } + defer resp.Body.Close() + if resp.StatusCode != 202 { + return fmt.Errorf("unexpected status code %d while pushing to %s", resp.StatusCode, pushURL) + } + return nil +} + +func (r *registry) ServeHTTP(w http.ResponseWriter, req *http.Request) { + contentType := expfmt.Negotiate(req.Header) + buf := r.getBuf() + defer r.giveBuf(buf) + writer, encoding := decorateWriter(req, buf) + if err := r.writePB(expfmt.NewEncoder(writer, contentType)); err != nil { + if r.panicOnCollectError { + panic(err) + } + http.Error(w, "An error has occurred:\n\n"+err.Error(), http.StatusInternalServerError) + return + } + if closer, ok := writer.(io.Closer); ok { + closer.Close() + } + header := w.Header() + header.Set(contentTypeHeader, string(contentType)) + header.Set(contentLengthHeader, fmt.Sprint(buf.Len())) + if encoding != "" { + header.Set(contentEncodingHeader, encoding) + } + w.Write(buf.Bytes()) +} + +func (r *registry) writePB(encoder expfmt.Encoder) error { + var metricHashes map[uint64]struct{} + if r.collectChecksEnabled { + metricHashes = make(map[uint64]struct{}) + } + metricChan := make(chan Metric, capMetricChan) + wg := sync.WaitGroup{} + + r.mtx.RLock() + metricFamiliesByName := make(map[string]*dto.MetricFamily, len(r.dimHashesByName)) + + // Scatter. + // (Collectors could be complex and slow, so we call them all at once.) + wg.Add(len(r.collectorsByID)) + go func() { + wg.Wait() + close(metricChan) + }() + for _, collector := range r.collectorsByID { + go func(collector Collector) { + defer wg.Done() + collector.Collect(metricChan) + }(collector) + } + r.mtx.RUnlock() + + // Drain metricChan in case of premature return. + defer func() { + for _ = range metricChan { + } + }() + + // Gather. + for metric := range metricChan { + // This could be done concurrently, too, but it required locking + // of metricFamiliesByName (and of metricHashes if checks are + // enabled). Most likely not worth it. + desc := metric.Desc() + metricFamily, ok := metricFamiliesByName[desc.fqName] + if !ok { + metricFamily = r.getMetricFamily() + defer r.giveMetricFamily(metricFamily) + metricFamily.Name = proto.String(desc.fqName) + metricFamily.Help = proto.String(desc.help) + metricFamiliesByName[desc.fqName] = metricFamily + } + dtoMetric := r.getMetric() + defer r.giveMetric(dtoMetric) + if err := metric.Write(dtoMetric); err != nil { + // TODO: Consider different means of error reporting so + // that a single erroneous metric could be skipped + // instead of blowing up the whole collection. + return fmt.Errorf("error collecting metric %v: %s", desc, err) + } + switch { + case metricFamily.Type != nil: + // Type already set. We are good. + case dtoMetric.Gauge != nil: + metricFamily.Type = dto.MetricType_GAUGE.Enum() + case dtoMetric.Counter != nil: + metricFamily.Type = dto.MetricType_COUNTER.Enum() + case dtoMetric.Summary != nil: + metricFamily.Type = dto.MetricType_SUMMARY.Enum() + case dtoMetric.Untyped != nil: + metricFamily.Type = dto.MetricType_UNTYPED.Enum() + case dtoMetric.Histogram != nil: + metricFamily.Type = dto.MetricType_HISTOGRAM.Enum() + default: + return fmt.Errorf("empty metric collected: %s", dtoMetric) + } + if r.collectChecksEnabled { + if err := r.checkConsistency(metricFamily, dtoMetric, desc, metricHashes); err != nil { + return err + } + } + metricFamily.Metric = append(metricFamily.Metric, dtoMetric) + } + + if r.metricFamilyInjectionHook != nil { + for _, mf := range r.metricFamilyInjectionHook() { + existingMF, exists := metricFamiliesByName[mf.GetName()] + if !exists { + metricFamiliesByName[mf.GetName()] = mf + if r.collectChecksEnabled { + for _, m := range mf.Metric { + if err := r.checkConsistency(mf, m, nil, metricHashes); err != nil { + return err + } + } + } + continue + } + for _, m := range mf.Metric { + if r.collectChecksEnabled { + if err := r.checkConsistency(existingMF, m, nil, metricHashes); err != nil { + return err + } + } + existingMF.Metric = append(existingMF.Metric, m) + } + } + } + + // Now that MetricFamilies are all set, sort their Metrics + // lexicographically by their label values. + for _, mf := range metricFamiliesByName { + sort.Sort(metricSorter(mf.Metric)) + } + + // Write out MetricFamilies sorted by their name. + names := make([]string, 0, len(metricFamiliesByName)) + for name := range metricFamiliesByName { + names = append(names, name) + } + sort.Strings(names) + + for _, name := range names { + if err := encoder.Encode(metricFamiliesByName[name]); err != nil { + return err + } + } + return nil +} + +func (r *registry) checkConsistency(metricFamily *dto.MetricFamily, dtoMetric *dto.Metric, desc *Desc, metricHashes map[uint64]struct{}) error { + + // Type consistency with metric family. + if metricFamily.GetType() == dto.MetricType_GAUGE && dtoMetric.Gauge == nil || + metricFamily.GetType() == dto.MetricType_COUNTER && dtoMetric.Counter == nil || + metricFamily.GetType() == dto.MetricType_SUMMARY && dtoMetric.Summary == nil || + metricFamily.GetType() == dto.MetricType_HISTOGRAM && dtoMetric.Histogram == nil || + metricFamily.GetType() == dto.MetricType_UNTYPED && dtoMetric.Untyped == nil { + return fmt.Errorf( + "collected metric %s %s is not a %s", + metricFamily.GetName(), dtoMetric, metricFamily.GetType(), + ) + } + + // Is the metric unique (i.e. no other metric with the same name and the same label values)? + h := fnv.New64a() + var buf bytes.Buffer + buf.WriteString(metricFamily.GetName()) + buf.WriteByte(separatorByte) + h.Write(buf.Bytes()) + // Make sure label pairs are sorted. We depend on it for the consistency + // check. Label pairs must be sorted by contract. But the point of this + // method is to check for contract violations. So we better do the sort + // now. + sort.Sort(LabelPairSorter(dtoMetric.Label)) + for _, lp := range dtoMetric.Label { + buf.Reset() + buf.WriteString(lp.GetValue()) + buf.WriteByte(separatorByte) + h.Write(buf.Bytes()) + } + metricHash := h.Sum64() + if _, exists := metricHashes[metricHash]; exists { + return fmt.Errorf( + "collected metric %s %s was collected before with the same name and label values", + metricFamily.GetName(), dtoMetric, + ) + } + metricHashes[metricHash] = struct{}{} + + if desc == nil { + return nil // Nothing left to check if we have no desc. + } + + // Desc consistency with metric family. + if metricFamily.GetName() != desc.fqName { + return fmt.Errorf( + "collected metric %s %s has name %q but should have %q", + metricFamily.GetName(), dtoMetric, metricFamily.GetName(), desc.fqName, + ) + } + if metricFamily.GetHelp() != desc.help { + return fmt.Errorf( + "collected metric %s %s has help %q but should have %q", + metricFamily.GetName(), dtoMetric, metricFamily.GetHelp(), desc.help, + ) + } + + // Is the desc consistent with the content of the metric? + lpsFromDesc := make([]*dto.LabelPair, 0, len(dtoMetric.Label)) + lpsFromDesc = append(lpsFromDesc, desc.constLabelPairs...) + for _, l := range desc.variableLabels { + lpsFromDesc = append(lpsFromDesc, &dto.LabelPair{ + Name: proto.String(l), + }) + } + if len(lpsFromDesc) != len(dtoMetric.Label) { + return fmt.Errorf( + "labels in collected metric %s %s are inconsistent with descriptor %s", + metricFamily.GetName(), dtoMetric, desc, + ) + } + sort.Sort(LabelPairSorter(lpsFromDesc)) + for i, lpFromDesc := range lpsFromDesc { + lpFromMetric := dtoMetric.Label[i] + if lpFromDesc.GetName() != lpFromMetric.GetName() || + lpFromDesc.Value != nil && lpFromDesc.GetValue() != lpFromMetric.GetValue() { + return fmt.Errorf( + "labels in collected metric %s %s are inconsistent with descriptor %s", + metricFamily.GetName(), dtoMetric, desc, + ) + } + } + + r.mtx.RLock() // Remaining checks need the read lock. + defer r.mtx.RUnlock() + + // Is the desc registered? + if _, exist := r.descIDs[desc.id]; !exist { + return fmt.Errorf( + "collected metric %s %s with unregistered descriptor %s", + metricFamily.GetName(), dtoMetric, desc, + ) + } + + return nil +} + +func (r *registry) getBuf() *bytes.Buffer { + select { + case buf := <-r.bufPool: + return buf + default: + return &bytes.Buffer{} + } +} + +func (r *registry) giveBuf(buf *bytes.Buffer) { + buf.Reset() + select { + case r.bufPool <- buf: + default: + } +} + +func (r *registry) getMetricFamily() *dto.MetricFamily { + select { + case mf := <-r.metricFamilyPool: + return mf + default: + return &dto.MetricFamily{} + } +} + +func (r *registry) giveMetricFamily(mf *dto.MetricFamily) { + mf.Reset() + select { + case r.metricFamilyPool <- mf: + default: + } +} + +func (r *registry) getMetric() *dto.Metric { + select { + case m := <-r.metricPool: + return m + default: + return &dto.Metric{} + } +} + +func (r *registry) giveMetric(m *dto.Metric) { + m.Reset() + select { + case r.metricPool <- m: + default: + } +} + +func newRegistry() *registry { + return ®istry{ + collectorsByID: map[uint64]Collector{}, + descIDs: map[uint64]struct{}{}, + dimHashesByName: map[string]uint64{}, + bufPool: make(chan *bytes.Buffer, numBufs), + metricFamilyPool: make(chan *dto.MetricFamily, numMetricFamilies), + metricPool: make(chan *dto.Metric, numMetrics), + } +} + +func newDefaultRegistry() *registry { + r := newRegistry() + r.Register(NewProcessCollector(os.Getpid(), "")) + r.Register(NewGoCollector()) + return r +} + +// decorateWriter wraps a writer to handle gzip compression if requested. It +// returns the decorated writer and the appropriate "Content-Encoding" header +// (which is empty if no compression is enabled). +func decorateWriter(request *http.Request, writer io.Writer) (io.Writer, string) { + header := request.Header.Get(acceptEncodingHeader) + parts := strings.Split(header, ",") + for _, part := range parts { + part := strings.TrimSpace(part) + if part == "gzip" || strings.HasPrefix(part, "gzip;") { + return gzip.NewWriter(writer), "gzip" + } + } + return writer, "" +} + +type metricSorter []*dto.Metric + +func (s metricSorter) Len() int { + return len(s) +} + +func (s metricSorter) Swap(i, j int) { + s[i], s[j] = s[j], s[i] +} + +func (s metricSorter) Less(i, j int) bool { + if len(s[i].Label) != len(s[j].Label) { + // This should not happen. The metrics are + // inconsistent. However, we have to deal with the fact, as + // people might use custom collectors or metric family injection + // to create inconsistent metrics. So let's simply compare the + // number of labels in this case. That will still yield + // reproducible sorting. + return len(s[i].Label) < len(s[j].Label) + } + for n, lp := range s[i].Label { + vi := lp.GetValue() + vj := s[j].Label[n].GetValue() + if vi != vj { + return vi < vj + } + } + return true +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/summary.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/summary.go new file mode 100644 index 0000000000000..fe81e004f670c --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/summary.go @@ -0,0 +1,540 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prometheus + +import ( + "fmt" + "hash/fnv" + "math" + "sort" + "sync" + "time" + + "github.com/beorn7/perks/quantile" + "github.com/golang/protobuf/proto" + + dto "github.com/prometheus/client_model/go" +) + +// quantileLabel is used for the label that defines the quantile in a +// summary. +const quantileLabel = "quantile" + +// A Summary captures individual observations from an event or sample stream and +// summarizes them in a manner similar to traditional summary statistics: 1. sum +// of observations, 2. observation count, 3. rank estimations. +// +// A typical use-case is the observation of request latencies. By default, a +// Summary provides the median, the 90th and the 99th percentile of the latency +// as rank estimations. +// +// Note that the rank estimations cannot be aggregated in a meaningful way with +// the Prometheus query language (i.e. you cannot average or add them). If you +// need aggregatable quantiles (e.g. you want the 99th percentile latency of all +// queries served across all instances of a service), consider the Histogram +// metric type. See the Prometheus documentation for more details. +// +// To create Summary instances, use NewSummary. +type Summary interface { + Metric + Collector + + // Observe adds a single observation to the summary. + Observe(float64) +} + +var ( + // DefObjectives are the default Summary quantile values. + DefObjectives = map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001} + + errQuantileLabelNotAllowed = fmt.Errorf( + "%q is not allowed as label name in summaries", quantileLabel, + ) +) + +// Default values for SummaryOpts. +const ( + // DefMaxAge is the default duration for which observations stay + // relevant. + DefMaxAge time.Duration = 10 * time.Minute + // DefAgeBuckets is the default number of buckets used to calculate the + // age of observations. + DefAgeBuckets = 5 + // DefBufCap is the standard buffer size for collecting Summary observations. + DefBufCap = 500 +) + +// SummaryOpts bundles the options for creating a Summary metric. It is +// mandatory to set Name and Help to a non-empty string. All other fields are +// optional and can safely be left at their zero value. +type SummaryOpts struct { + // Namespace, Subsystem, and Name are components of the fully-qualified + // name of the Summary (created by joining these components with + // "_"). Only Name is mandatory, the others merely help structuring the + // name. Note that the fully-qualified name of the Summary must be a + // valid Prometheus metric name. + Namespace string + Subsystem string + Name string + + // Help provides information about this Summary. Mandatory! + // + // Metrics with the same fully-qualified name must have the same Help + // string. + Help string + + // ConstLabels are used to attach fixed labels to this + // Summary. Summaries with the same fully-qualified name must have the + // same label names in their ConstLabels. + // + // Note that in most cases, labels have a value that varies during the + // lifetime of a process. Those labels are usually managed with a + // SummaryVec. ConstLabels serve only special purposes. One is for the + // special case where the value of a label does not change during the + // lifetime of a process, e.g. if the revision of the running binary is + // put into a label. Another, more advanced purpose is if more than one + // Collector needs to collect Summaries with the same fully-qualified + // name. In that case, those Summaries must differ in the values of + // their ConstLabels. See the Collector examples. + // + // If the value of a label never changes (not even between binaries), + // that label most likely should not be a label at all (but part of the + // metric name). + ConstLabels Labels + + // Objectives defines the quantile rank estimates with their respective + // absolute error. If Objectives[q] = e, then the value reported + // for q will be the φ-quantile value for some φ between q-e and q+e. + // The default value is DefObjectives. + Objectives map[float64]float64 + + // MaxAge defines the duration for which an observation stays relevant + // for the summary. Must be positive. The default value is DefMaxAge. + MaxAge time.Duration + + // AgeBuckets is the number of buckets used to exclude observations that + // are older than MaxAge from the summary. A higher number has a + // resource penalty, so only increase it if the higher resolution is + // really required. For very high observation rates, you might want to + // reduce the number of age buckets. With only one age bucket, you will + // effectively see a complete reset of the summary each time MaxAge has + // passed. The default value is DefAgeBuckets. + AgeBuckets uint32 + + // BufCap defines the default sample stream buffer size. The default + // value of DefBufCap should suffice for most uses. If there is a need + // to increase the value, a multiple of 500 is recommended (because that + // is the internal buffer size of the underlying package + // "github.com/bmizerany/perks/quantile"). + BufCap uint32 +} + +// TODO: Great fuck-up with the sliding-window decay algorithm... The Merge +// method of perk/quantile is actually not working as advertised - and it might +// be unfixable, as the underlying algorithm is apparently not capable of +// merging summaries in the first place. To avoid using Merge, we are currently +// adding observations to _each_ age bucket, i.e. the effort to add a sample is +// essentially multiplied by the number of age buckets. When rotating age +// buckets, we empty the previous head stream. On scrape time, we simply take +// the quantiles from the head stream (no merging required). Result: More effort +// on observation time, less effort on scrape time, which is exactly the +// opposite of what we try to accomplish, but at least the results are correct. +// +// The quite elegant previous contraption to merge the age buckets efficiently +// on scrape time (see code up commit 6b9530d72ea715f0ba612c0120e6e09fbf1d49d0) +// can't be used anymore. + +// NewSummary creates a new Summary based on the provided SummaryOpts. +func NewSummary(opts SummaryOpts) Summary { + return newSummary( + NewDesc( + BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), + opts.Help, + nil, + opts.ConstLabels, + ), + opts, + ) +} + +func newSummary(desc *Desc, opts SummaryOpts, labelValues ...string) Summary { + if len(desc.variableLabels) != len(labelValues) { + panic(errInconsistentCardinality) + } + + for _, n := range desc.variableLabels { + if n == quantileLabel { + panic(errQuantileLabelNotAllowed) + } + } + for _, lp := range desc.constLabelPairs { + if lp.GetName() == quantileLabel { + panic(errQuantileLabelNotAllowed) + } + } + + if len(opts.Objectives) == 0 { + opts.Objectives = DefObjectives + } + + if opts.MaxAge < 0 { + panic(fmt.Errorf("illegal max age MaxAge=%v", opts.MaxAge)) + } + if opts.MaxAge == 0 { + opts.MaxAge = DefMaxAge + } + + if opts.AgeBuckets == 0 { + opts.AgeBuckets = DefAgeBuckets + } + + if opts.BufCap == 0 { + opts.BufCap = DefBufCap + } + + s := &summary{ + desc: desc, + + objectives: opts.Objectives, + sortedObjectives: make([]float64, 0, len(opts.Objectives)), + + labelPairs: makeLabelPairs(desc, labelValues), + + hotBuf: make([]float64, 0, opts.BufCap), + coldBuf: make([]float64, 0, opts.BufCap), + streamDuration: opts.MaxAge / time.Duration(opts.AgeBuckets), + } + s.headStreamExpTime = time.Now().Add(s.streamDuration) + s.hotBufExpTime = s.headStreamExpTime + + for i := uint32(0); i < opts.AgeBuckets; i++ { + s.streams = append(s.streams, s.newStream()) + } + s.headStream = s.streams[0] + + for qu := range s.objectives { + s.sortedObjectives = append(s.sortedObjectives, qu) + } + sort.Float64s(s.sortedObjectives) + + s.Init(s) // Init self-collection. + return s +} + +type summary struct { + SelfCollector + + bufMtx sync.Mutex // Protects hotBuf and hotBufExpTime. + mtx sync.Mutex // Protects every other moving part. + // Lock bufMtx before mtx if both are needed. + + desc *Desc + + objectives map[float64]float64 + sortedObjectives []float64 + + labelPairs []*dto.LabelPair + + sum float64 + cnt uint64 + + hotBuf, coldBuf []float64 + + streams []*quantile.Stream + streamDuration time.Duration + headStream *quantile.Stream + headStreamIdx int + headStreamExpTime, hotBufExpTime time.Time +} + +func (s *summary) Desc() *Desc { + return s.desc +} + +func (s *summary) Observe(v float64) { + s.bufMtx.Lock() + defer s.bufMtx.Unlock() + + now := time.Now() + if now.After(s.hotBufExpTime) { + s.asyncFlush(now) + } + s.hotBuf = append(s.hotBuf, v) + if len(s.hotBuf) == cap(s.hotBuf) { + s.asyncFlush(now) + } +} + +func (s *summary) Write(out *dto.Metric) error { + sum := &dto.Summary{} + qs := make([]*dto.Quantile, 0, len(s.objectives)) + + s.bufMtx.Lock() + s.mtx.Lock() + // Swap bufs even if hotBuf is empty to set new hotBufExpTime. + s.swapBufs(time.Now()) + s.bufMtx.Unlock() + + s.flushColdBuf() + sum.SampleCount = proto.Uint64(s.cnt) + sum.SampleSum = proto.Float64(s.sum) + + for _, rank := range s.sortedObjectives { + var q float64 + if s.headStream.Count() == 0 { + q = math.NaN() + } else { + q = s.headStream.Query(rank) + } + qs = append(qs, &dto.Quantile{ + Quantile: proto.Float64(rank), + Value: proto.Float64(q), + }) + } + + s.mtx.Unlock() + + if len(qs) > 0 { + sort.Sort(quantSort(qs)) + } + sum.Quantile = qs + + out.Summary = sum + out.Label = s.labelPairs + return nil +} + +func (s *summary) newStream() *quantile.Stream { + return quantile.NewTargeted(s.objectives) +} + +// asyncFlush needs bufMtx locked. +func (s *summary) asyncFlush(now time.Time) { + s.mtx.Lock() + s.swapBufs(now) + + // Unblock the original goroutine that was responsible for the mutation + // that triggered the compaction. But hold onto the global non-buffer + // state mutex until the operation finishes. + go func() { + s.flushColdBuf() + s.mtx.Unlock() + }() +} + +// rotateStreams needs mtx AND bufMtx locked. +func (s *summary) maybeRotateStreams() { + for !s.hotBufExpTime.Equal(s.headStreamExpTime) { + s.headStream.Reset() + s.headStreamIdx++ + if s.headStreamIdx >= len(s.streams) { + s.headStreamIdx = 0 + } + s.headStream = s.streams[s.headStreamIdx] + s.headStreamExpTime = s.headStreamExpTime.Add(s.streamDuration) + } +} + +// flushColdBuf needs mtx locked. +func (s *summary) flushColdBuf() { + for _, v := range s.coldBuf { + for _, stream := range s.streams { + stream.Insert(v) + } + s.cnt++ + s.sum += v + } + s.coldBuf = s.coldBuf[0:0] + s.maybeRotateStreams() +} + +// swapBufs needs mtx AND bufMtx locked, coldBuf must be empty. +func (s *summary) swapBufs(now time.Time) { + if len(s.coldBuf) != 0 { + panic("coldBuf is not empty") + } + s.hotBuf, s.coldBuf = s.coldBuf, s.hotBuf + // hotBuf is now empty and gets new expiration set. + for now.After(s.hotBufExpTime) { + s.hotBufExpTime = s.hotBufExpTime.Add(s.streamDuration) + } +} + +type quantSort []*dto.Quantile + +func (s quantSort) Len() int { + return len(s) +} + +func (s quantSort) Swap(i, j int) { + s[i], s[j] = s[j], s[i] +} + +func (s quantSort) Less(i, j int) bool { + return s[i].GetQuantile() < s[j].GetQuantile() +} + +// SummaryVec is a Collector that bundles a set of Summaries that all share the +// same Desc, but have different values for their variable labels. This is used +// if you want to count the same thing partitioned by various dimensions +// (e.g. HTTP request latencies, partitioned by status code and method). Create +// instances with NewSummaryVec. +type SummaryVec struct { + MetricVec +} + +// NewSummaryVec creates a new SummaryVec based on the provided SummaryOpts and +// partitioned by the given label names. At least one label name must be +// provided. +func NewSummaryVec(opts SummaryOpts, labelNames []string) *SummaryVec { + desc := NewDesc( + BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), + opts.Help, + labelNames, + opts.ConstLabels, + ) + return &SummaryVec{ + MetricVec: MetricVec{ + children: map[uint64]Metric{}, + desc: desc, + hash: fnv.New64a(), + newMetric: func(lvs ...string) Metric { + return newSummary(desc, opts, lvs...) + }, + }, + } +} + +// GetMetricWithLabelValues replaces the method of the same name in +// MetricVec. The difference is that this method returns a Summary and not a +// Metric so that no type conversion is required. +func (m *SummaryVec) GetMetricWithLabelValues(lvs ...string) (Summary, error) { + metric, err := m.MetricVec.GetMetricWithLabelValues(lvs...) + if metric != nil { + return metric.(Summary), err + } + return nil, err +} + +// GetMetricWith replaces the method of the same name in MetricVec. The +// difference is that this method returns a Summary and not a Metric so that no +// type conversion is required. +func (m *SummaryVec) GetMetricWith(labels Labels) (Summary, error) { + metric, err := m.MetricVec.GetMetricWith(labels) + if metric != nil { + return metric.(Summary), err + } + return nil, err +} + +// WithLabelValues works as GetMetricWithLabelValues, but panics where +// GetMetricWithLabelValues would have returned an error. By not returning an +// error, WithLabelValues allows shortcuts like +// myVec.WithLabelValues("404", "GET").Observe(42.21) +func (m *SummaryVec) WithLabelValues(lvs ...string) Summary { + return m.MetricVec.WithLabelValues(lvs...).(Summary) +} + +// With works as GetMetricWith, but panics where GetMetricWithLabels would have +// returned an error. By not returning an error, With allows shortcuts like +// myVec.With(Labels{"code": "404", "method": "GET"}).Observe(42.21) +func (m *SummaryVec) With(labels Labels) Summary { + return m.MetricVec.With(labels).(Summary) +} + +type constSummary struct { + desc *Desc + count uint64 + sum float64 + quantiles map[float64]float64 + labelPairs []*dto.LabelPair +} + +func (s *constSummary) Desc() *Desc { + return s.desc +} + +func (s *constSummary) Write(out *dto.Metric) error { + sum := &dto.Summary{} + qs := make([]*dto.Quantile, 0, len(s.quantiles)) + + sum.SampleCount = proto.Uint64(s.count) + sum.SampleSum = proto.Float64(s.sum) + + for rank, q := range s.quantiles { + qs = append(qs, &dto.Quantile{ + Quantile: proto.Float64(rank), + Value: proto.Float64(q), + }) + } + + if len(qs) > 0 { + sort.Sort(quantSort(qs)) + } + sum.Quantile = qs + + out.Summary = sum + out.Label = s.labelPairs + + return nil +} + +// NewConstSummary returns a metric representing a Prometheus summary with fixed +// values for the count, sum, and quantiles. As those parameters cannot be +// changed, the returned value does not implement the Summary interface (but +// only the Metric interface). Users of this package will not have much use for +// it in regular operations. However, when implementing custom Collectors, it is +// useful as a throw-away metric that is generated on the fly to send it to +// Prometheus in the Collect method. +// +// quantiles maps ranks to quantile values. For example, a median latency of +// 0.23s and a 99th percentile latency of 0.56s would be expressed as: +// map[float64]float64{0.5: 0.23, 0.99: 0.56} +// +// NewConstSummary returns an error if the length of labelValues is not +// consistent with the variable labels in Desc. +func NewConstSummary( + desc *Desc, + count uint64, + sum float64, + quantiles map[float64]float64, + labelValues ...string, +) (Metric, error) { + if len(desc.variableLabels) != len(labelValues) { + return nil, errInconsistentCardinality + } + return &constSummary{ + desc: desc, + count: count, + sum: sum, + quantiles: quantiles, + labelPairs: makeLabelPairs(desc, labelValues), + }, nil +} + +// MustNewConstSummary is a version of NewConstSummary that panics where +// NewConstMetric would have returned an error. +func MustNewConstSummary( + desc *Desc, + count uint64, + sum float64, + quantiles map[float64]float64, + labelValues ...string, +) Metric { + m, err := NewConstSummary(desc, count, sum, quantiles, labelValues...) + if err != nil { + panic(err) + } + return m +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/untyped.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/untyped.go new file mode 100644 index 0000000000000..c65ab1c53126e --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/untyped.go @@ -0,0 +1,145 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prometheus + +import "hash/fnv" + +// Untyped is a Metric that represents a single numerical value that can +// arbitrarily go up and down. +// +// An Untyped metric works the same as a Gauge. The only difference is that to +// no type information is implied. +// +// To create Untyped instances, use NewUntyped. +type Untyped interface { + Metric + Collector + + // Set sets the Untyped metric to an arbitrary value. + Set(float64) + // Inc increments the Untyped metric by 1. + Inc() + // Dec decrements the Untyped metric by 1. + Dec() + // Add adds the given value to the Untyped metric. (The value can be + // negative, resulting in a decrease.) + Add(float64) + // Sub subtracts the given value from the Untyped metric. (The value can + // be negative, resulting in an increase.) + Sub(float64) +} + +// UntypedOpts is an alias for Opts. See there for doc comments. +type UntypedOpts Opts + +// NewUntyped creates a new Untyped metric from the provided UntypedOpts. +func NewUntyped(opts UntypedOpts) Untyped { + return newValue(NewDesc( + BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), + opts.Help, + nil, + opts.ConstLabels, + ), UntypedValue, 0) +} + +// UntypedVec is a Collector that bundles a set of Untyped metrics that all +// share the same Desc, but have different values for their variable +// labels. This is used if you want to count the same thing partitioned by +// various dimensions. Create instances with NewUntypedVec. +type UntypedVec struct { + MetricVec +} + +// NewUntypedVec creates a new UntypedVec based on the provided UntypedOpts and +// partitioned by the given label names. At least one label name must be +// provided. +func NewUntypedVec(opts UntypedOpts, labelNames []string) *UntypedVec { + desc := NewDesc( + BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), + opts.Help, + labelNames, + opts.ConstLabels, + ) + return &UntypedVec{ + MetricVec: MetricVec{ + children: map[uint64]Metric{}, + desc: desc, + hash: fnv.New64a(), + newMetric: func(lvs ...string) Metric { + return newValue(desc, UntypedValue, 0, lvs...) + }, + }, + } +} + +// GetMetricWithLabelValues replaces the method of the same name in +// MetricVec. The difference is that this method returns an Untyped and not a +// Metric so that no type conversion is required. +func (m *UntypedVec) GetMetricWithLabelValues(lvs ...string) (Untyped, error) { + metric, err := m.MetricVec.GetMetricWithLabelValues(lvs...) + if metric != nil { + return metric.(Untyped), err + } + return nil, err +} + +// GetMetricWith replaces the method of the same name in MetricVec. The +// difference is that this method returns an Untyped and not a Metric so that no +// type conversion is required. +func (m *UntypedVec) GetMetricWith(labels Labels) (Untyped, error) { + metric, err := m.MetricVec.GetMetricWith(labels) + if metric != nil { + return metric.(Untyped), err + } + return nil, err +} + +// WithLabelValues works as GetMetricWithLabelValues, but panics where +// GetMetricWithLabelValues would have returned an error. By not returning an +// error, WithLabelValues allows shortcuts like +// myVec.WithLabelValues("404", "GET").Add(42) +func (m *UntypedVec) WithLabelValues(lvs ...string) Untyped { + return m.MetricVec.WithLabelValues(lvs...).(Untyped) +} + +// With works as GetMetricWith, but panics where GetMetricWithLabels would have +// returned an error. By not returning an error, With allows shortcuts like +// myVec.With(Labels{"code": "404", "method": "GET"}).Add(42) +func (m *UntypedVec) With(labels Labels) Untyped { + return m.MetricVec.With(labels).(Untyped) +} + +// UntypedFunc is an Untyped whose value is determined at collect time by +// calling a provided function. +// +// To create UntypedFunc instances, use NewUntypedFunc. +type UntypedFunc interface { + Metric + Collector +} + +// NewUntypedFunc creates a new UntypedFunc based on the provided +// UntypedOpts. The value reported is determined by calling the given function +// from within the Write method. Take into account that metric collection may +// happen concurrently. If that results in concurrent calls to Write, like in +// the case where an UntypedFunc is directly registered with Prometheus, the +// provided function must be concurrency-safe. +func NewUntypedFunc(opts UntypedOpts, function func() float64) UntypedFunc { + return newValueFunc(NewDesc( + BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), + opts.Help, + nil, + opts.ConstLabels, + ), UntypedValue, function) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/value.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/value.go new file mode 100644 index 0000000000000..b54ac11e888ee --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/value.go @@ -0,0 +1,234 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prometheus + +import ( + "errors" + "fmt" + "math" + "sort" + "sync/atomic" + + dto "github.com/prometheus/client_model/go" + + "github.com/golang/protobuf/proto" +) + +// ValueType is an enumeration of metric types that represent a simple value. +type ValueType int + +// Possible values for the ValueType enum. +const ( + _ ValueType = iota + CounterValue + GaugeValue + UntypedValue +) + +var errInconsistentCardinality = errors.New("inconsistent label cardinality") + +// value is a generic metric for simple values. It implements Metric, Collector, +// Counter, Gauge, and Untyped. Its effective type is determined by +// ValueType. This is a low-level building block used by the library to back the +// implementations of Counter, Gauge, and Untyped. +type value struct { + // valBits containst the bits of the represented float64 value. It has + // to go first in the struct to guarantee alignment for atomic + // operations. http://golang.org/pkg/sync/atomic/#pkg-note-BUG + valBits uint64 + + SelfCollector + + desc *Desc + valType ValueType + labelPairs []*dto.LabelPair +} + +// newValue returns a newly allocated value with the given Desc, ValueType, +// sample value and label values. It panics if the number of label +// values is different from the number of variable labels in Desc. +func newValue(desc *Desc, valueType ValueType, val float64, labelValues ...string) *value { + if len(labelValues) != len(desc.variableLabels) { + panic(errInconsistentCardinality) + } + result := &value{ + desc: desc, + valType: valueType, + valBits: math.Float64bits(val), + labelPairs: makeLabelPairs(desc, labelValues), + } + result.Init(result) + return result +} + +func (v *value) Desc() *Desc { + return v.desc +} + +func (v *value) Set(val float64) { + atomic.StoreUint64(&v.valBits, math.Float64bits(val)) +} + +func (v *value) Inc() { + v.Add(1) +} + +func (v *value) Dec() { + v.Add(-1) +} + +func (v *value) Add(val float64) { + for { + oldBits := atomic.LoadUint64(&v.valBits) + newBits := math.Float64bits(math.Float64frombits(oldBits) + val) + if atomic.CompareAndSwapUint64(&v.valBits, oldBits, newBits) { + return + } + } +} + +func (v *value) Sub(val float64) { + v.Add(val * -1) +} + +func (v *value) Write(out *dto.Metric) error { + val := math.Float64frombits(atomic.LoadUint64(&v.valBits)) + return populateMetric(v.valType, val, v.labelPairs, out) +} + +// valueFunc is a generic metric for simple values retrieved on collect time +// from a function. It implements Metric and Collector. Its effective type is +// determined by ValueType. This is a low-level building block used by the +// library to back the implementations of CounterFunc, GaugeFunc, and +// UntypedFunc. +type valueFunc struct { + SelfCollector + + desc *Desc + valType ValueType + function func() float64 + labelPairs []*dto.LabelPair +} + +// newValueFunc returns a newly allocated valueFunc with the given Desc and +// ValueType. The value reported is determined by calling the given function +// from within the Write method. Take into account that metric collection may +// happen concurrently. If that results in concurrent calls to Write, like in +// the case where a valueFunc is directly registered with Prometheus, the +// provided function must be concurrency-safe. +func newValueFunc(desc *Desc, valueType ValueType, function func() float64) *valueFunc { + result := &valueFunc{ + desc: desc, + valType: valueType, + function: function, + labelPairs: makeLabelPairs(desc, nil), + } + result.Init(result) + return result +} + +func (v *valueFunc) Desc() *Desc { + return v.desc +} + +func (v *valueFunc) Write(out *dto.Metric) error { + return populateMetric(v.valType, v.function(), v.labelPairs, out) +} + +// NewConstMetric returns a metric with one fixed value that cannot be +// changed. Users of this package will not have much use for it in regular +// operations. However, when implementing custom Collectors, it is useful as a +// throw-away metric that is generated on the fly to send it to Prometheus in +// the Collect method. NewConstMetric returns an error if the length of +// labelValues is not consistent with the variable labels in Desc. +func NewConstMetric(desc *Desc, valueType ValueType, value float64, labelValues ...string) (Metric, error) { + if len(desc.variableLabels) != len(labelValues) { + return nil, errInconsistentCardinality + } + return &constMetric{ + desc: desc, + valType: valueType, + val: value, + labelPairs: makeLabelPairs(desc, labelValues), + }, nil +} + +// MustNewConstMetric is a version of NewConstMetric that panics where +// NewConstMetric would have returned an error. +func MustNewConstMetric(desc *Desc, valueType ValueType, value float64, labelValues ...string) Metric { + m, err := NewConstMetric(desc, valueType, value, labelValues...) + if err != nil { + panic(err) + } + return m +} + +type constMetric struct { + desc *Desc + valType ValueType + val float64 + labelPairs []*dto.LabelPair +} + +func (m *constMetric) Desc() *Desc { + return m.desc +} + +func (m *constMetric) Write(out *dto.Metric) error { + return populateMetric(m.valType, m.val, m.labelPairs, out) +} + +func populateMetric( + t ValueType, + v float64, + labelPairs []*dto.LabelPair, + m *dto.Metric, +) error { + m.Label = labelPairs + switch t { + case CounterValue: + m.Counter = &dto.Counter{Value: proto.Float64(v)} + case GaugeValue: + m.Gauge = &dto.Gauge{Value: proto.Float64(v)} + case UntypedValue: + m.Untyped = &dto.Untyped{Value: proto.Float64(v)} + default: + return fmt.Errorf("encountered unknown type %v", t) + } + return nil +} + +func makeLabelPairs(desc *Desc, labelValues []string) []*dto.LabelPair { + totalLen := len(desc.variableLabels) + len(desc.constLabelPairs) + if totalLen == 0 { + // Super fast path. + return nil + } + if len(desc.variableLabels) == 0 { + // Moderately fast path. + return desc.constLabelPairs + } + labelPairs := make([]*dto.LabelPair, 0, totalLen) + for i, n := range desc.variableLabels { + labelPairs = append(labelPairs, &dto.LabelPair{ + Name: proto.String(n), + Value: proto.String(labelValues[i]), + }) + } + for _, lp := range desc.constLabelPairs { + labelPairs = append(labelPairs, lp) + } + sort.Sort(LabelPairSorter(labelPairs)) + return labelPairs +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/vec.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/vec.go new file mode 100644 index 0000000000000..a1f3bdf37d832 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_golang/prometheus/vec.go @@ -0,0 +1,247 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prometheus + +import ( + "bytes" + "fmt" + "hash" + "sync" +) + +// MetricVec is a Collector to bundle metrics of the same name that +// differ in their label values. MetricVec is usually not used directly but as a +// building block for implementations of vectors of a given metric +// type. GaugeVec, CounterVec, SummaryVec, and UntypedVec are examples already +// provided in this package. +type MetricVec struct { + mtx sync.RWMutex // Protects not only children, but also hash and buf. + children map[uint64]Metric + desc *Desc + + // hash is our own hash instance to avoid repeated allocations. + hash hash.Hash64 + // buf is used to copy string contents into it for hashing, + // again to avoid allocations. + buf bytes.Buffer + + newMetric func(labelValues ...string) Metric +} + +// Describe implements Collector. The length of the returned slice +// is always one. +func (m *MetricVec) Describe(ch chan<- *Desc) { + ch <- m.desc +} + +// Collect implements Collector. +func (m *MetricVec) Collect(ch chan<- Metric) { + m.mtx.RLock() + defer m.mtx.RUnlock() + + for _, metric := range m.children { + ch <- metric + } +} + +// GetMetricWithLabelValues returns the Metric for the given slice of label +// values (same order as the VariableLabels in Desc). If that combination of +// label values is accessed for the first time, a new Metric is created. +// +// It is possible to call this method without using the returned Metric to only +// create the new Metric but leave it at its start value (e.g. a Summary or +// Histogram without any observations). See also the SummaryVec example. +// +// Keeping the Metric for later use is possible (and should be considered if +// performance is critical), but keep in mind that Reset, DeleteLabelValues and +// Delete can be used to delete the Metric from the MetricVec. In that case, the +// Metric will still exist, but it will not be exported anymore, even if a +// Metric with the same label values is created later. See also the CounterVec +// example. +// +// An error is returned if the number of label values is not the same as the +// number of VariableLabels in Desc. +// +// Note that for more than one label value, this method is prone to mistakes +// caused by an incorrect order of arguments. Consider GetMetricWith(Labels) as +// an alternative to avoid that type of mistake. For higher label numbers, the +// latter has a much more readable (albeit more verbose) syntax, but it comes +// with a performance overhead (for creating and processing the Labels map). +// See also the GaugeVec example. +func (m *MetricVec) GetMetricWithLabelValues(lvs ...string) (Metric, error) { + m.mtx.Lock() + defer m.mtx.Unlock() + + h, err := m.hashLabelValues(lvs) + if err != nil { + return nil, err + } + return m.getOrCreateMetric(h, lvs...), nil +} + +// GetMetricWith returns the Metric for the given Labels map (the label names +// must match those of the VariableLabels in Desc). If that label map is +// accessed for the first time, a new Metric is created. Implications of +// creating a Metric without using it and keeping the Metric for later use are +// the same as for GetMetricWithLabelValues. +// +// An error is returned if the number and names of the Labels are inconsistent +// with those of the VariableLabels in Desc. +// +// This method is used for the same purpose as +// GetMetricWithLabelValues(...string). See there for pros and cons of the two +// methods. +func (m *MetricVec) GetMetricWith(labels Labels) (Metric, error) { + m.mtx.Lock() + defer m.mtx.Unlock() + + h, err := m.hashLabels(labels) + if err != nil { + return nil, err + } + lvs := make([]string, len(labels)) + for i, label := range m.desc.variableLabels { + lvs[i] = labels[label] + } + return m.getOrCreateMetric(h, lvs...), nil +} + +// WithLabelValues works as GetMetricWithLabelValues, but panics if an error +// occurs. The method allows neat syntax like: +// httpReqs.WithLabelValues("404", "POST").Inc() +func (m *MetricVec) WithLabelValues(lvs ...string) Metric { + metric, err := m.GetMetricWithLabelValues(lvs...) + if err != nil { + panic(err) + } + return metric +} + +// With works as GetMetricWith, but panics if an error occurs. The method allows +// neat syntax like: +// httpReqs.With(Labels{"status":"404", "method":"POST"}).Inc() +func (m *MetricVec) With(labels Labels) Metric { + metric, err := m.GetMetricWith(labels) + if err != nil { + panic(err) + } + return metric +} + +// DeleteLabelValues removes the metric where the variable labels are the same +// as those passed in as labels (same order as the VariableLabels in Desc). It +// returns true if a metric was deleted. +// +// It is not an error if the number of label values is not the same as the +// number of VariableLabels in Desc. However, such inconsistent label count can +// never match an actual Metric, so the method will always return false in that +// case. +// +// Note that for more than one label value, this method is prone to mistakes +// caused by an incorrect order of arguments. Consider Delete(Labels) as an +// alternative to avoid that type of mistake. For higher label numbers, the +// latter has a much more readable (albeit more verbose) syntax, but it comes +// with a performance overhead (for creating and processing the Labels map). +// See also the CounterVec example. +func (m *MetricVec) DeleteLabelValues(lvs ...string) bool { + m.mtx.Lock() + defer m.mtx.Unlock() + + h, err := m.hashLabelValues(lvs) + if err != nil { + return false + } + if _, has := m.children[h]; !has { + return false + } + delete(m.children, h) + return true +} + +// Delete deletes the metric where the variable labels are the same as those +// passed in as labels. It returns true if a metric was deleted. +// +// It is not an error if the number and names of the Labels are inconsistent +// with those of the VariableLabels in the Desc of the MetricVec. However, such +// inconsistent Labels can never match an actual Metric, so the method will +// always return false in that case. +// +// This method is used for the same purpose as DeleteLabelValues(...string). See +// there for pros and cons of the two methods. +func (m *MetricVec) Delete(labels Labels) bool { + m.mtx.Lock() + defer m.mtx.Unlock() + + h, err := m.hashLabels(labels) + if err != nil { + return false + } + if _, has := m.children[h]; !has { + return false + } + delete(m.children, h) + return true +} + +// Reset deletes all metrics in this vector. +func (m *MetricVec) Reset() { + m.mtx.Lock() + defer m.mtx.Unlock() + + for h := range m.children { + delete(m.children, h) + } +} + +func (m *MetricVec) hashLabelValues(vals []string) (uint64, error) { + if len(vals) != len(m.desc.variableLabels) { + return 0, errInconsistentCardinality + } + m.hash.Reset() + for _, val := range vals { + m.buf.Reset() + m.buf.WriteString(val) + m.hash.Write(m.buf.Bytes()) + } + return m.hash.Sum64(), nil +} + +func (m *MetricVec) hashLabels(labels Labels) (uint64, error) { + if len(labels) != len(m.desc.variableLabels) { + return 0, errInconsistentCardinality + } + m.hash.Reset() + for _, label := range m.desc.variableLabels { + val, ok := labels[label] + if !ok { + return 0, fmt.Errorf("label name %q missing in label map", label) + } + m.buf.Reset() + m.buf.WriteString(val) + m.hash.Write(m.buf.Bytes()) + } + return m.hash.Sum64(), nil +} + +func (m *MetricVec) getOrCreateMetric(hash uint64, labelValues ...string) Metric { + metric, ok := m.children[hash] + if !ok { + // Copy labelValues. Otherwise, they would be allocated even if we don't go + // down this code path. + copiedLabelValues := append(make([]string, 0, len(labelValues)), labelValues...) + metric = m.newMetric(copiedLabelValues...) + m.children[hash] = metric + } + return metric +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_model/LICENSE b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_model/LICENSE new file mode 100644 index 0000000000000..261eeb9e9f8b2 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_model/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_model/NOTICE b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_model/NOTICE new file mode 100644 index 0000000000000..20110e410e570 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_model/NOTICE @@ -0,0 +1,5 @@ +Data model artifacts for Prometheus. +Copyright 2012-2015 The Prometheus Authors + +This product includes software developed at +SoundCloud Ltd. (http://soundcloud.com/). diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_model/go/metrics.pb.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_model/go/metrics.pb.go new file mode 100644 index 0000000000000..b065f8683f0bd --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/client_model/go/metrics.pb.go @@ -0,0 +1,364 @@ +// Code generated by protoc-gen-go. +// source: metrics.proto +// DO NOT EDIT! + +/* +Package io_prometheus_client is a generated protocol buffer package. + +It is generated from these files: + metrics.proto + +It has these top-level messages: + LabelPair + Gauge + Counter + Quantile + Summary + Untyped + Histogram + Bucket + Metric + MetricFamily +*/ +package io_prometheus_client + +import proto "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = math.Inf + +type MetricType int32 + +const ( + MetricType_COUNTER MetricType = 0 + MetricType_GAUGE MetricType = 1 + MetricType_SUMMARY MetricType = 2 + MetricType_UNTYPED MetricType = 3 + MetricType_HISTOGRAM MetricType = 4 +) + +var MetricType_name = map[int32]string{ + 0: "COUNTER", + 1: "GAUGE", + 2: "SUMMARY", + 3: "UNTYPED", + 4: "HISTOGRAM", +} +var MetricType_value = map[string]int32{ + "COUNTER": 0, + "GAUGE": 1, + "SUMMARY": 2, + "UNTYPED": 3, + "HISTOGRAM": 4, +} + +func (x MetricType) Enum() *MetricType { + p := new(MetricType) + *p = x + return p +} +func (x MetricType) String() string { + return proto.EnumName(MetricType_name, int32(x)) +} +func (x *MetricType) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MetricType_value, data, "MetricType") + if err != nil { + return err + } + *x = MetricType(value) + return nil +} + +type LabelPair struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *LabelPair) Reset() { *m = LabelPair{} } +func (m *LabelPair) String() string { return proto.CompactTextString(m) } +func (*LabelPair) ProtoMessage() {} + +func (m *LabelPair) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *LabelPair) GetValue() string { + if m != nil && m.Value != nil { + return *m.Value + } + return "" +} + +type Gauge struct { + Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Gauge) Reset() { *m = Gauge{} } +func (m *Gauge) String() string { return proto.CompactTextString(m) } +func (*Gauge) ProtoMessage() {} + +func (m *Gauge) GetValue() float64 { + if m != nil && m.Value != nil { + return *m.Value + } + return 0 +} + +type Counter struct { + Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Counter) Reset() { *m = Counter{} } +func (m *Counter) String() string { return proto.CompactTextString(m) } +func (*Counter) ProtoMessage() {} + +func (m *Counter) GetValue() float64 { + if m != nil && m.Value != nil { + return *m.Value + } + return 0 +} + +type Quantile struct { + Quantile *float64 `protobuf:"fixed64,1,opt,name=quantile" json:"quantile,omitempty"` + Value *float64 `protobuf:"fixed64,2,opt,name=value" json:"value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Quantile) Reset() { *m = Quantile{} } +func (m *Quantile) String() string { return proto.CompactTextString(m) } +func (*Quantile) ProtoMessage() {} + +func (m *Quantile) GetQuantile() float64 { + if m != nil && m.Quantile != nil { + return *m.Quantile + } + return 0 +} + +func (m *Quantile) GetValue() float64 { + if m != nil && m.Value != nil { + return *m.Value + } + return 0 +} + +type Summary struct { + SampleCount *uint64 `protobuf:"varint,1,opt,name=sample_count" json:"sample_count,omitempty"` + SampleSum *float64 `protobuf:"fixed64,2,opt,name=sample_sum" json:"sample_sum,omitempty"` + Quantile []*Quantile `protobuf:"bytes,3,rep,name=quantile" json:"quantile,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Summary) Reset() { *m = Summary{} } +func (m *Summary) String() string { return proto.CompactTextString(m) } +func (*Summary) ProtoMessage() {} + +func (m *Summary) GetSampleCount() uint64 { + if m != nil && m.SampleCount != nil { + return *m.SampleCount + } + return 0 +} + +func (m *Summary) GetSampleSum() float64 { + if m != nil && m.SampleSum != nil { + return *m.SampleSum + } + return 0 +} + +func (m *Summary) GetQuantile() []*Quantile { + if m != nil { + return m.Quantile + } + return nil +} + +type Untyped struct { + Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Untyped) Reset() { *m = Untyped{} } +func (m *Untyped) String() string { return proto.CompactTextString(m) } +func (*Untyped) ProtoMessage() {} + +func (m *Untyped) GetValue() float64 { + if m != nil && m.Value != nil { + return *m.Value + } + return 0 +} + +type Histogram struct { + SampleCount *uint64 `protobuf:"varint,1,opt,name=sample_count" json:"sample_count,omitempty"` + SampleSum *float64 `protobuf:"fixed64,2,opt,name=sample_sum" json:"sample_sum,omitempty"` + Bucket []*Bucket `protobuf:"bytes,3,rep,name=bucket" json:"bucket,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Histogram) Reset() { *m = Histogram{} } +func (m *Histogram) String() string { return proto.CompactTextString(m) } +func (*Histogram) ProtoMessage() {} + +func (m *Histogram) GetSampleCount() uint64 { + if m != nil && m.SampleCount != nil { + return *m.SampleCount + } + return 0 +} + +func (m *Histogram) GetSampleSum() float64 { + if m != nil && m.SampleSum != nil { + return *m.SampleSum + } + return 0 +} + +func (m *Histogram) GetBucket() []*Bucket { + if m != nil { + return m.Bucket + } + return nil +} + +type Bucket struct { + CumulativeCount *uint64 `protobuf:"varint,1,opt,name=cumulative_count" json:"cumulative_count,omitempty"` + UpperBound *float64 `protobuf:"fixed64,2,opt,name=upper_bound" json:"upper_bound,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Bucket) Reset() { *m = Bucket{} } +func (m *Bucket) String() string { return proto.CompactTextString(m) } +func (*Bucket) ProtoMessage() {} + +func (m *Bucket) GetCumulativeCount() uint64 { + if m != nil && m.CumulativeCount != nil { + return *m.CumulativeCount + } + return 0 +} + +func (m *Bucket) GetUpperBound() float64 { + if m != nil && m.UpperBound != nil { + return *m.UpperBound + } + return 0 +} + +type Metric struct { + Label []*LabelPair `protobuf:"bytes,1,rep,name=label" json:"label,omitempty"` + Gauge *Gauge `protobuf:"bytes,2,opt,name=gauge" json:"gauge,omitempty"` + Counter *Counter `protobuf:"bytes,3,opt,name=counter" json:"counter,omitempty"` + Summary *Summary `protobuf:"bytes,4,opt,name=summary" json:"summary,omitempty"` + Untyped *Untyped `protobuf:"bytes,5,opt,name=untyped" json:"untyped,omitempty"` + Histogram *Histogram `protobuf:"bytes,7,opt,name=histogram" json:"histogram,omitempty"` + TimestampMs *int64 `protobuf:"varint,6,opt,name=timestamp_ms" json:"timestamp_ms,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Metric) Reset() { *m = Metric{} } +func (m *Metric) String() string { return proto.CompactTextString(m) } +func (*Metric) ProtoMessage() {} + +func (m *Metric) GetLabel() []*LabelPair { + if m != nil { + return m.Label + } + return nil +} + +func (m *Metric) GetGauge() *Gauge { + if m != nil { + return m.Gauge + } + return nil +} + +func (m *Metric) GetCounter() *Counter { + if m != nil { + return m.Counter + } + return nil +} + +func (m *Metric) GetSummary() *Summary { + if m != nil { + return m.Summary + } + return nil +} + +func (m *Metric) GetUntyped() *Untyped { + if m != nil { + return m.Untyped + } + return nil +} + +func (m *Metric) GetHistogram() *Histogram { + if m != nil { + return m.Histogram + } + return nil +} + +func (m *Metric) GetTimestampMs() int64 { + if m != nil && m.TimestampMs != nil { + return *m.TimestampMs + } + return 0 +} + +type MetricFamily struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Help *string `protobuf:"bytes,2,opt,name=help" json:"help,omitempty"` + Type *MetricType `protobuf:"varint,3,opt,name=type,enum=io.prometheus.client.MetricType" json:"type,omitempty"` + Metric []*Metric `protobuf:"bytes,4,rep,name=metric" json:"metric,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MetricFamily) Reset() { *m = MetricFamily{} } +func (m *MetricFamily) String() string { return proto.CompactTextString(m) } +func (*MetricFamily) ProtoMessage() {} + +func (m *MetricFamily) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *MetricFamily) GetHelp() string { + if m != nil && m.Help != nil { + return *m.Help + } + return "" +} + +func (m *MetricFamily) GetType() MetricType { + if m != nil && m.Type != nil { + return *m.Type + } + return MetricType_COUNTER +} + +func (m *MetricFamily) GetMetric() []*Metric { + if m != nil { + return m.Metric + } + return nil +} + +func init() { + proto.RegisterEnum("io.prometheus.client.MetricType", MetricType_name, MetricType_value) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/LICENSE b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/LICENSE new file mode 100644 index 0000000000000..261eeb9e9f8b2 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/NOTICE b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/NOTICE new file mode 100644 index 0000000000000..636a2c1a5e88f --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/NOTICE @@ -0,0 +1,5 @@ +Common libraries shared by Prometheus Go components. +Copyright 2015 The Prometheus Authors + +This product includes software developed at +SoundCloud Ltd. (http://soundcloud.com/). diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/expfmt/decode.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/expfmt/decode.go new file mode 100644 index 0000000000000..b72c9bedefcef --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/expfmt/decode.go @@ -0,0 +1,411 @@ +// Copyright 2015 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package expfmt + +import ( + "fmt" + "io" + "math" + "mime" + "net/http" + + dto "github.com/prometheus/client_model/go" + + "github.com/matttproud/golang_protobuf_extensions/pbutil" + "github.com/prometheus/common/model" +) + +// Decoder types decode an input stream into metric families. +type Decoder interface { + Decode(*dto.MetricFamily) error +} + +type DecodeOptions struct { + // Timestamp is added to each value from the stream that has no explicit timestamp set. + Timestamp model.Time +} + +// ResponseFormat extracts the correct format from a HTTP response header. +// If no matching format can be found FormatUnknown is returned. +func ResponseFormat(h http.Header) Format { + ct := h.Get(hdrContentType) + + mediatype, params, err := mime.ParseMediaType(ct) + if err != nil { + return FmtUnknown + } + + const ( + textType = "text/plain" + jsonType = "application/json" + ) + + switch mediatype { + case ProtoType: + if p, ok := params["proto"]; ok && p != ProtoProtocol { + return FmtUnknown + } + if e, ok := params["encoding"]; ok && e != "delimited" { + return FmtUnknown + } + return FmtProtoDelim + + case textType: + if v, ok := params["version"]; ok && v != TextVersion { + return FmtUnknown + } + return FmtText + + case jsonType: + var prometheusAPIVersion string + + if params["schema"] == "prometheus/telemetry" && params["version"] != "" { + prometheusAPIVersion = params["version"] + } else { + prometheusAPIVersion = h.Get("X-Prometheus-API-Version") + } + + switch prometheusAPIVersion { + case "0.0.2", "": + return fmtJSON2 + default: + return FmtUnknown + } + } + + return FmtUnknown +} + +// NewDecoder returns a new decoder based on the given input format. +// If the input format does not imply otherwise, a text format decoder is returned. +func NewDecoder(r io.Reader, format Format) Decoder { + switch format { + case FmtProtoDelim: + return &protoDecoder{r: r} + case fmtJSON2: + return newJSON2Decoder(r) + } + return &textDecoder{r: r} +} + +// protoDecoder implements the Decoder interface for protocol buffers. +type protoDecoder struct { + r io.Reader +} + +// Decode implements the Decoder interface. +func (d *protoDecoder) Decode(v *dto.MetricFamily) error { + _, err := pbutil.ReadDelimited(d.r, v) + return err +} + +// textDecoder implements the Decoder interface for the text protcol. +type textDecoder struct { + r io.Reader + p TextParser + fams []*dto.MetricFamily +} + +// Decode implements the Decoder interface. +func (d *textDecoder) Decode(v *dto.MetricFamily) error { + // TODO(fabxc): Wrap this as a line reader to make streaming safer. + if len(d.fams) == 0 { + // No cached metric families, read everything and parse metrics. + fams, err := d.p.TextToMetricFamilies(d.r) + if err != nil { + return err + } + if len(fams) == 0 { + return io.EOF + } + d.fams = make([]*dto.MetricFamily, 0, len(fams)) + for _, f := range fams { + d.fams = append(d.fams, f) + } + } + + *v = *d.fams[0] + d.fams = d.fams[1:] + + return nil +} + +type SampleDecoder struct { + Dec Decoder + Opts *DecodeOptions + + f dto.MetricFamily +} + +func (sd *SampleDecoder) Decode(s *model.Vector) error { + if err := sd.Dec.Decode(&sd.f); err != nil { + return err + } + *s = extractSamples(&sd.f, sd.Opts) + return nil +} + +// Extract samples builds a slice of samples from the provided metric families. +func ExtractSamples(o *DecodeOptions, fams ...*dto.MetricFamily) model.Vector { + var all model.Vector + for _, f := range fams { + all = append(all, extractSamples(f, o)...) + } + return all +} + +func extractSamples(f *dto.MetricFamily, o *DecodeOptions) model.Vector { + switch f.GetType() { + case dto.MetricType_COUNTER: + return extractCounter(o, f) + case dto.MetricType_GAUGE: + return extractGauge(o, f) + case dto.MetricType_SUMMARY: + return extractSummary(o, f) + case dto.MetricType_UNTYPED: + return extractUntyped(o, f) + case dto.MetricType_HISTOGRAM: + return extractHistogram(o, f) + } + panic("expfmt.extractSamples: unknown metric family type") +} + +func extractCounter(o *DecodeOptions, f *dto.MetricFamily) model.Vector { + samples := make(model.Vector, 0, len(f.Metric)) + + for _, m := range f.Metric { + if m.Counter == nil { + continue + } + + lset := make(model.LabelSet, len(m.Label)+1) + for _, p := range m.Label { + lset[model.LabelName(p.GetName())] = model.LabelValue(p.GetValue()) + } + lset[model.MetricNameLabel] = model.LabelValue(f.GetName()) + + smpl := &model.Sample{ + Metric: model.Metric(lset), + Value: model.SampleValue(m.Counter.GetValue()), + } + + if m.TimestampMs != nil { + smpl.Timestamp = model.TimeFromUnixNano(*m.TimestampMs * 1000000) + } else { + smpl.Timestamp = o.Timestamp + } + + samples = append(samples, smpl) + } + + return samples +} + +func extractGauge(o *DecodeOptions, f *dto.MetricFamily) model.Vector { + samples := make(model.Vector, 0, len(f.Metric)) + + for _, m := range f.Metric { + if m.Gauge == nil { + continue + } + + lset := make(model.LabelSet, len(m.Label)+1) + for _, p := range m.Label { + lset[model.LabelName(p.GetName())] = model.LabelValue(p.GetValue()) + } + lset[model.MetricNameLabel] = model.LabelValue(f.GetName()) + + smpl := &model.Sample{ + Metric: model.Metric(lset), + Value: model.SampleValue(m.Gauge.GetValue()), + } + + if m.TimestampMs != nil { + smpl.Timestamp = model.TimeFromUnixNano(*m.TimestampMs * 1000000) + } else { + smpl.Timestamp = o.Timestamp + } + + samples = append(samples, smpl) + } + + return samples +} + +func extractUntyped(o *DecodeOptions, f *dto.MetricFamily) model.Vector { + samples := make(model.Vector, 0, len(f.Metric)) + + for _, m := range f.Metric { + if m.Untyped == nil { + continue + } + + lset := make(model.LabelSet, len(m.Label)+1) + for _, p := range m.Label { + lset[model.LabelName(p.GetName())] = model.LabelValue(p.GetValue()) + } + lset[model.MetricNameLabel] = model.LabelValue(f.GetName()) + + smpl := &model.Sample{ + Metric: model.Metric(lset), + Value: model.SampleValue(m.Untyped.GetValue()), + } + + if m.TimestampMs != nil { + smpl.Timestamp = model.TimeFromUnixNano(*m.TimestampMs * 1000000) + } else { + smpl.Timestamp = o.Timestamp + } + + samples = append(samples, smpl) + } + + return samples +} + +func extractSummary(o *DecodeOptions, f *dto.MetricFamily) model.Vector { + samples := make(model.Vector, 0, len(f.Metric)) + + for _, m := range f.Metric { + if m.Summary == nil { + continue + } + + timestamp := o.Timestamp + if m.TimestampMs != nil { + timestamp = model.TimeFromUnixNano(*m.TimestampMs * 1000000) + } + + for _, q := range m.Summary.Quantile { + lset := make(model.LabelSet, len(m.Label)+2) + for _, p := range m.Label { + lset[model.LabelName(p.GetName())] = model.LabelValue(p.GetValue()) + } + // BUG(matt): Update other names to "quantile". + lset[model.LabelName(model.QuantileLabel)] = model.LabelValue(fmt.Sprint(q.GetQuantile())) + lset[model.MetricNameLabel] = model.LabelValue(f.GetName()) + + samples = append(samples, &model.Sample{ + Metric: model.Metric(lset), + Value: model.SampleValue(q.GetValue()), + Timestamp: timestamp, + }) + } + + lset := make(model.LabelSet, len(m.Label)+1) + for _, p := range m.Label { + lset[model.LabelName(p.GetName())] = model.LabelValue(p.GetValue()) + } + lset[model.MetricNameLabel] = model.LabelValue(f.GetName() + "_sum") + + samples = append(samples, &model.Sample{ + Metric: model.Metric(lset), + Value: model.SampleValue(m.Summary.GetSampleSum()), + Timestamp: timestamp, + }) + + lset = make(model.LabelSet, len(m.Label)+1) + for _, p := range m.Label { + lset[model.LabelName(p.GetName())] = model.LabelValue(p.GetValue()) + } + lset[model.MetricNameLabel] = model.LabelValue(f.GetName() + "_count") + + samples = append(samples, &model.Sample{ + Metric: model.Metric(lset), + Value: model.SampleValue(m.Summary.GetSampleCount()), + Timestamp: timestamp, + }) + } + + return samples +} + +func extractHistogram(o *DecodeOptions, f *dto.MetricFamily) model.Vector { + samples := make(model.Vector, 0, len(f.Metric)) + + for _, m := range f.Metric { + if m.Histogram == nil { + continue + } + + timestamp := o.Timestamp + if m.TimestampMs != nil { + timestamp = model.TimeFromUnixNano(*m.TimestampMs * 1000000) + } + + infSeen := false + + for _, q := range m.Histogram.Bucket { + lset := make(model.LabelSet, len(m.Label)+2) + for _, p := range m.Label { + lset[model.LabelName(p.GetName())] = model.LabelValue(p.GetValue()) + } + lset[model.LabelName(model.BucketLabel)] = model.LabelValue(fmt.Sprint(q.GetUpperBound())) + lset[model.MetricNameLabel] = model.LabelValue(f.GetName() + "_bucket") + + if math.IsInf(q.GetUpperBound(), +1) { + infSeen = true + } + + samples = append(samples, &model.Sample{ + Metric: model.Metric(lset), + Value: model.SampleValue(q.GetCumulativeCount()), + Timestamp: timestamp, + }) + } + + lset := make(model.LabelSet, len(m.Label)+1) + for _, p := range m.Label { + lset[model.LabelName(p.GetName())] = model.LabelValue(p.GetValue()) + } + lset[model.MetricNameLabel] = model.LabelValue(f.GetName() + "_sum") + + samples = append(samples, &model.Sample{ + Metric: model.Metric(lset), + Value: model.SampleValue(m.Histogram.GetSampleSum()), + Timestamp: timestamp, + }) + + lset = make(model.LabelSet, len(m.Label)+1) + for _, p := range m.Label { + lset[model.LabelName(p.GetName())] = model.LabelValue(p.GetValue()) + } + lset[model.MetricNameLabel] = model.LabelValue(f.GetName() + "_count") + + count := &model.Sample{ + Metric: model.Metric(lset), + Value: model.SampleValue(m.Histogram.GetSampleCount()), + Timestamp: timestamp, + } + samples = append(samples, count) + + if !infSeen { + // Append an infinity bucket sample. + lset := make(model.LabelSet, len(m.Label)+2) + for _, p := range m.Label { + lset[model.LabelName(p.GetName())] = model.LabelValue(p.GetValue()) + } + lset[model.LabelName(model.BucketLabel)] = model.LabelValue("+Inf") + lset[model.MetricNameLabel] = model.LabelValue(f.GetName() + "_bucket") + + samples = append(samples, &model.Sample{ + Metric: model.Metric(lset), + Value: count.Value, + Timestamp: timestamp, + }) + } + } + + return samples +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/expfmt/encode.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/expfmt/encode.go new file mode 100644 index 0000000000000..392ca90ee2572 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/expfmt/encode.go @@ -0,0 +1,88 @@ +// Copyright 2015 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package expfmt + +import ( + "fmt" + "io" + "net/http" + + "bitbucket.org/ww/goautoneg" + "github.com/golang/protobuf/proto" + "github.com/matttproud/golang_protobuf_extensions/pbutil" + + dto "github.com/prometheus/client_model/go" +) + +// Encoder types encode metric families into an underlying wire protocol. +type Encoder interface { + Encode(*dto.MetricFamily) error +} + +type encoder func(*dto.MetricFamily) error + +func (e encoder) Encode(v *dto.MetricFamily) error { + return e(v) +} + +// Negotiate returns the Content-Type based on the given Accept header. +// If no appropriate accepted type is found, FmtText is returned. +func Negotiate(h http.Header) Format { + for _, ac := range goautoneg.ParseAccept(h.Get(hdrAccept)) { + // Check for protocol buffer + if ac.Type+"/"+ac.SubType == ProtoType && ac.Params["proto"] == ProtoProtocol { + switch ac.Params["encoding"] { + case "delimited": + return FmtProtoDelim + case "text": + return FmtProtoText + case "compact-text": + return FmtProtoCompact + } + } + // Check for text format. + ver := ac.Params["version"] + if ac.Type == "text" && ac.SubType == "plain" && (ver == TextVersion || ver == "") { + return FmtText + } + } + return FmtText +} + +// NewEncoder returns a new encoder based on content type negotiation. +func NewEncoder(w io.Writer, format Format) Encoder { + switch format { + case FmtProtoDelim: + return encoder(func(v *dto.MetricFamily) error { + _, err := pbutil.WriteDelimited(w, v) + return err + }) + case FmtProtoCompact: + return encoder(func(v *dto.MetricFamily) error { + _, err := fmt.Fprintln(w, v.String()) + return err + }) + case FmtProtoText: + return encoder(func(v *dto.MetricFamily) error { + _, err := fmt.Fprintln(w, proto.MarshalTextString(v)) + return err + }) + case FmtText: + return encoder(func(v *dto.MetricFamily) error { + _, err := MetricFamilyToText(w, v) + return err + }) + } + panic("expfmt.NewEncoder: unknown format") +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/expfmt/expfmt.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/expfmt/expfmt.go new file mode 100644 index 0000000000000..366fbde98a154 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/expfmt/expfmt.go @@ -0,0 +1,40 @@ +// Copyright 2015 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// A package for reading and writing Prometheus metrics. +package expfmt + +type Format string + +const ( + TextVersion = "0.0.4" + + ProtoType = `application/vnd.google.protobuf` + ProtoProtocol = `io.prometheus.client.MetricFamily` + ProtoFmt = ProtoType + "; proto=" + ProtoProtocol + ";" + + // The Content-Type values for the different wire protocols. + FmtUnknown Format = `` + FmtText Format = `text/plain; version=` + TextVersion + FmtProtoDelim Format = ProtoFmt + ` encoding=delimited` + FmtProtoText Format = ProtoFmt + ` encoding=text` + FmtProtoCompact Format = ProtoFmt + ` encoding=compact-text` + + // fmtJSON2 is hidden as it is deprecated. + fmtJSON2 Format = `application/json; version=0.0.2` +) + +const ( + hdrContentType = "Content-Type" + hdrAccept = "Accept" +) diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/expfmt/fuzz.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/expfmt/fuzz.go new file mode 100644 index 0000000000000..14f920146921a --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/expfmt/fuzz.go @@ -0,0 +1,36 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Build only when actually fuzzing +// +build gofuzz + +package expfmt + +import "bytes" + +// Fuzz text metric parser with with github.com/dvyukov/go-fuzz: +// +// go-fuzz-build github.com/prometheus/client_golang/text +// go-fuzz -bin text-fuzz.zip -workdir fuzz +// +// Further input samples should go in the folder fuzz/corpus. +func Fuzz(in []byte) int { + parser := TextParser{} + _, err := parser.TextToMetricFamilies(bytes.NewReader(in)) + + if err != nil { + return 0 + } + + return 1 +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/expfmt/json_decode.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/expfmt/json_decode.go new file mode 100644 index 0000000000000..67e3a0d4d65e8 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/expfmt/json_decode.go @@ -0,0 +1,162 @@ +// Copyright 2015 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package expfmt + +import ( + "encoding/json" + "fmt" + "io" + "sort" + + "github.com/golang/protobuf/proto" + dto "github.com/prometheus/client_model/go" + + "github.com/prometheus/common/model" +) + +type json2Decoder struct { + dec *json.Decoder + fams []*dto.MetricFamily +} + +func newJSON2Decoder(r io.Reader) Decoder { + return &json2Decoder{ + dec: json.NewDecoder(r), + } +} + +type histogram002 struct { + Labels model.LabelSet `json:"labels"` + Values map[string]float64 `json:"value"` +} + +type counter002 struct { + Labels model.LabelSet `json:"labels"` + Value float64 `json:"value"` +} + +func protoLabelSet(base, ext model.LabelSet) []*dto.LabelPair { + labels := base.Clone().Merge(ext) + delete(labels, model.MetricNameLabel) + + names := make([]string, 0, len(labels)) + for ln := range labels { + names = append(names, string(ln)) + } + sort.Strings(names) + + pairs := make([]*dto.LabelPair, 0, len(labels)) + + for _, ln := range names { + lv := labels[model.LabelName(ln)] + + pairs = append(pairs, &dto.LabelPair{ + Name: proto.String(ln), + Value: proto.String(string(lv)), + }) + } + + return pairs +} + +func (d *json2Decoder) more() error { + var entities []struct { + BaseLabels model.LabelSet `json:"baseLabels"` + Docstring string `json:"docstring"` + Metric struct { + Type string `json:"type"` + Values json.RawMessage `json:"value"` + } `json:"metric"` + } + + if err := d.dec.Decode(&entities); err != nil { + return err + } + for _, e := range entities { + f := &dto.MetricFamily{ + Name: proto.String(string(e.BaseLabels[model.MetricNameLabel])), + Help: proto.String(e.Docstring), + Type: dto.MetricType_UNTYPED.Enum(), + Metric: []*dto.Metric{}, + } + + d.fams = append(d.fams, f) + + switch e.Metric.Type { + case "counter", "gauge": + var values []counter002 + + if err := json.Unmarshal(e.Metric.Values, &values); err != nil { + return fmt.Errorf("could not extract %s value: %s", e.Metric.Type, err) + } + + for _, ctr := range values { + f.Metric = append(f.Metric, &dto.Metric{ + Label: protoLabelSet(e.BaseLabels, ctr.Labels), + Untyped: &dto.Untyped{ + Value: proto.Float64(ctr.Value), + }, + }) + } + + case "histogram": + var values []histogram002 + + if err := json.Unmarshal(e.Metric.Values, &values); err != nil { + return fmt.Errorf("could not extract %s value: %s", e.Metric.Type, err) + } + + for _, hist := range values { + quants := make([]string, 0, len(values)) + for q := range hist.Values { + quants = append(quants, q) + } + + sort.Strings(quants) + + for _, q := range quants { + value := hist.Values[q] + // The correct label is "quantile" but to not break old expressions + // this remains "percentile" + hist.Labels["percentile"] = model.LabelValue(q) + + f.Metric = append(f.Metric, &dto.Metric{ + Label: protoLabelSet(e.BaseLabels, hist.Labels), + Untyped: &dto.Untyped{ + Value: proto.Float64(value), + }, + }) + } + } + + default: + return fmt.Errorf("unknown metric type %q", e.Metric.Type) + } + } + return nil +} + +// Decode implements the Decoder interface. +func (d *json2Decoder) Decode(v *dto.MetricFamily) error { + if len(d.fams) == 0 { + if err := d.more(); err != nil { + return err + } + } + + *v = *d.fams[0] + d.fams = d.fams[1:] + + return nil +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/expfmt/text_create.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/expfmt/text_create.go new file mode 100644 index 0000000000000..0bb9c14cc2b67 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/expfmt/text_create.go @@ -0,0 +1,305 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package expfmt + +import ( + "bytes" + "fmt" + "io" + "math" + "strings" + + dto "github.com/prometheus/client_model/go" + "github.com/prometheus/common/model" +) + +// MetricFamilyToText converts a MetricFamily proto message into text format and +// writes the resulting lines to 'out'. It returns the number of bytes written +// and any error encountered. This function does not perform checks on the +// content of the metric and label names, i.e. invalid metric or label names +// will result in invalid text format output. +// This method fulfills the type 'prometheus.encoder'. +func MetricFamilyToText(out io.Writer, in *dto.MetricFamily) (int, error) { + var written int + + // Fail-fast checks. + if len(in.Metric) == 0 { + return written, fmt.Errorf("MetricFamily has no metrics: %s", in) + } + name := in.GetName() + if name == "" { + return written, fmt.Errorf("MetricFamily has no name: %s", in) + } + + // Comments, first HELP, then TYPE. + if in.Help != nil { + n, err := fmt.Fprintf( + out, "# HELP %s %s\n", + name, escapeString(*in.Help, false), + ) + written += n + if err != nil { + return written, err + } + } + metricType := in.GetType() + n, err := fmt.Fprintf( + out, "# TYPE %s %s\n", + name, strings.ToLower(metricType.String()), + ) + written += n + if err != nil { + return written, err + } + + // Finally the samples, one line for each. + for _, metric := range in.Metric { + switch metricType { + case dto.MetricType_COUNTER: + if metric.Counter == nil { + return written, fmt.Errorf( + "expected counter in metric %s %s", name, metric, + ) + } + n, err = writeSample( + name, metric, "", "", + metric.Counter.GetValue(), + out, + ) + case dto.MetricType_GAUGE: + if metric.Gauge == nil { + return written, fmt.Errorf( + "expected gauge in metric %s %s", name, metric, + ) + } + n, err = writeSample( + name, metric, "", "", + metric.Gauge.GetValue(), + out, + ) + case dto.MetricType_UNTYPED: + if metric.Untyped == nil { + return written, fmt.Errorf( + "expected untyped in metric %s %s", name, metric, + ) + } + n, err = writeSample( + name, metric, "", "", + metric.Untyped.GetValue(), + out, + ) + case dto.MetricType_SUMMARY: + if metric.Summary == nil { + return written, fmt.Errorf( + "expected summary in metric %s %s", name, metric, + ) + } + for _, q := range metric.Summary.Quantile { + n, err = writeSample( + name, metric, + model.QuantileLabel, fmt.Sprint(q.GetQuantile()), + q.GetValue(), + out, + ) + written += n + if err != nil { + return written, err + } + } + n, err = writeSample( + name+"_sum", metric, "", "", + metric.Summary.GetSampleSum(), + out, + ) + if err != nil { + return written, err + } + written += n + n, err = writeSample( + name+"_count", metric, "", "", + float64(metric.Summary.GetSampleCount()), + out, + ) + case dto.MetricType_HISTOGRAM: + if metric.Histogram == nil { + return written, fmt.Errorf( + "expected histogram in metric %s %s", name, metric, + ) + } + infSeen := false + for _, q := range metric.Histogram.Bucket { + n, err = writeSample( + name+"_bucket", metric, + model.BucketLabel, fmt.Sprint(q.GetUpperBound()), + float64(q.GetCumulativeCount()), + out, + ) + written += n + if err != nil { + return written, err + } + if math.IsInf(q.GetUpperBound(), +1) { + infSeen = true + } + } + if !infSeen { + n, err = writeSample( + name+"_bucket", metric, + model.BucketLabel, "+Inf", + float64(metric.Histogram.GetSampleCount()), + out, + ) + if err != nil { + return written, err + } + written += n + } + n, err = writeSample( + name+"_sum", metric, "", "", + metric.Histogram.GetSampleSum(), + out, + ) + if err != nil { + return written, err + } + written += n + n, err = writeSample( + name+"_count", metric, "", "", + float64(metric.Histogram.GetSampleCount()), + out, + ) + default: + return written, fmt.Errorf( + "unexpected type in metric %s %s", name, metric, + ) + } + written += n + if err != nil { + return written, err + } + } + return written, nil +} + +// writeSample writes a single sample in text format to out, given the metric +// name, the metric proto message itself, optionally an additional label name +// and value (use empty strings if not required), and the value. The function +// returns the number of bytes written and any error encountered. +func writeSample( + name string, + metric *dto.Metric, + additionalLabelName, additionalLabelValue string, + value float64, + out io.Writer, +) (int, error) { + var written int + n, err := fmt.Fprint(out, name) + written += n + if err != nil { + return written, err + } + n, err = labelPairsToText( + metric.Label, + additionalLabelName, additionalLabelValue, + out, + ) + written += n + if err != nil { + return written, err + } + n, err = fmt.Fprintf(out, " %v", value) + written += n + if err != nil { + return written, err + } + if metric.TimestampMs != nil { + n, err = fmt.Fprintf(out, " %v", *metric.TimestampMs) + written += n + if err != nil { + return written, err + } + } + n, err = out.Write([]byte{'\n'}) + written += n + if err != nil { + return written, err + } + return written, nil +} + +// labelPairsToText converts a slice of LabelPair proto messages plus the +// explicitly given additional label pair into text formatted as required by the +// text format and writes it to 'out'. An empty slice in combination with an +// empty string 'additionalLabelName' results in nothing being +// written. Otherwise, the label pairs are written, escaped as required by the +// text format, and enclosed in '{...}'. The function returns the number of +// bytes written and any error encountered. +func labelPairsToText( + in []*dto.LabelPair, + additionalLabelName, additionalLabelValue string, + out io.Writer, +) (int, error) { + if len(in) == 0 && additionalLabelName == "" { + return 0, nil + } + var written int + separator := '{' + for _, lp := range in { + n, err := fmt.Fprintf( + out, `%c%s="%s"`, + separator, lp.GetName(), escapeString(lp.GetValue(), true), + ) + written += n + if err != nil { + return written, err + } + separator = ',' + } + if additionalLabelName != "" { + n, err := fmt.Fprintf( + out, `%c%s="%s"`, + separator, additionalLabelName, + escapeString(additionalLabelValue, true), + ) + written += n + if err != nil { + return written, err + } + } + n, err := out.Write([]byte{'}'}) + written += n + if err != nil { + return written, err + } + return written, nil +} + +// escapeString replaces '\' by '\\', new line character by '\n', and - if +// includeDoubleQuote is true - '"' by '\"'. +func escapeString(v string, includeDoubleQuote bool) string { + result := bytes.NewBuffer(make([]byte, 0, len(v))) + for _, c := range v { + switch { + case c == '\\': + result.WriteString(`\\`) + case includeDoubleQuote && c == '"': + result.WriteString(`\"`) + case c == '\n': + result.WriteString(`\n`) + default: + result.WriteRune(c) + } + } + return result.String() +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/expfmt/text_parse.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/expfmt/text_parse.go new file mode 100644 index 0000000000000..84433bc4f6efd --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/expfmt/text_parse.go @@ -0,0 +1,746 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package expfmt + +import ( + "bufio" + "bytes" + "fmt" + "io" + "math" + "strconv" + "strings" + + dto "github.com/prometheus/client_model/go" + + "github.com/golang/protobuf/proto" + "github.com/prometheus/common/model" +) + +// A stateFn is a function that represents a state in a state machine. By +// executing it, the state is progressed to the next state. The stateFn returns +// another stateFn, which represents the new state. The end state is represented +// by nil. +type stateFn func() stateFn + +// ParseError signals errors while parsing the simple and flat text-based +// exchange format. +type ParseError struct { + Line int + Msg string +} + +// Error implements the error interface. +func (e ParseError) Error() string { + return fmt.Sprintf("text format parsing error in line %d: %s", e.Line, e.Msg) +} + +// TextParser is used to parse the simple and flat text-based exchange format. Its +// nil value is ready to use. +type TextParser struct { + metricFamiliesByName map[string]*dto.MetricFamily + buf *bufio.Reader // Where the parsed input is read through. + err error // Most recent error. + lineCount int // Tracks the line count for error messages. + currentByte byte // The most recent byte read. + currentToken bytes.Buffer // Re-used each time a token has to be gathered from multiple bytes. + currentMF *dto.MetricFamily + currentMetric *dto.Metric + currentLabelPair *dto.LabelPair + + // The remaining member variables are only used for summaries/histograms. + currentLabels map[string]string // All labels including '__name__' but excluding 'quantile'/'le' + // Summary specific. + summaries map[uint64]*dto.Metric // Key is created with LabelsToSignature. + currentQuantile float64 + // Histogram specific. + histograms map[uint64]*dto.Metric // Key is created with LabelsToSignature. + currentBucket float64 + // These tell us if the currently processed line ends on '_count' or + // '_sum' respectively and belong to a summary/histogram, representing the sample + // count and sum of that summary/histogram. + currentIsSummaryCount, currentIsSummarySum bool + currentIsHistogramCount, currentIsHistogramSum bool +} + +// TextToMetricFamilies reads 'in' as the simple and flat text-based exchange +// format and creates MetricFamily proto messages. It returns the MetricFamily +// proto messages in a map where the metric names are the keys, along with any +// error encountered. +// +// If the input contains duplicate metrics (i.e. lines with the same metric name +// and exactly the same label set), the resulting MetricFamily will contain +// duplicate Metric proto messages. Similar is true for duplicate label +// names. Checks for duplicates have to be performed separately, if required. +// Also note that neither the metrics within each MetricFamily are sorted nor +// the label pairs within each Metric. Sorting is not required for the most +// frequent use of this method, which is sample ingestion in the Prometheus +// server. However, for presentation purposes, you might want to sort the +// metrics, and in some cases, you must sort the labels, e.g. for consumption by +// the metric family injection hook of the Prometheus registry. +// +// Summaries and histograms are rather special beasts. You would probably not +// use them in the simple text format anyway. This method can deal with +// summaries and histograms if they are presented in exactly the way the +// text.Create function creates them. +// +// This method must not be called concurrently. If you want to parse different +// input concurrently, instantiate a separate Parser for each goroutine. +func (p *TextParser) TextToMetricFamilies(in io.Reader) (map[string]*dto.MetricFamily, error) { + p.reset(in) + for nextState := p.startOfLine; nextState != nil; nextState = nextState() { + // Magic happens here... + } + // Get rid of empty metric families. + for k, mf := range p.metricFamiliesByName { + if len(mf.GetMetric()) == 0 { + delete(p.metricFamiliesByName, k) + } + } + return p.metricFamiliesByName, p.err +} + +func (p *TextParser) reset(in io.Reader) { + p.metricFamiliesByName = map[string]*dto.MetricFamily{} + if p.buf == nil { + p.buf = bufio.NewReader(in) + } else { + p.buf.Reset(in) + } + p.err = nil + p.lineCount = 0 + if p.summaries == nil || len(p.summaries) > 0 { + p.summaries = map[uint64]*dto.Metric{} + } + if p.histograms == nil || len(p.histograms) > 0 { + p.histograms = map[uint64]*dto.Metric{} + } + p.currentQuantile = math.NaN() + p.currentBucket = math.NaN() +} + +// startOfLine represents the state where the next byte read from p.buf is the +// start of a line (or whitespace leading up to it). +func (p *TextParser) startOfLine() stateFn { + p.lineCount++ + if p.skipBlankTab(); p.err != nil { + // End of input reached. This is the only case where + // that is not an error but a signal that we are done. + p.err = nil + return nil + } + switch p.currentByte { + case '#': + return p.startComment + case '\n': + return p.startOfLine // Empty line, start the next one. + } + return p.readingMetricName +} + +// startComment represents the state where the next byte read from p.buf is the +// start of a comment (or whitespace leading up to it). +func (p *TextParser) startComment() stateFn { + if p.skipBlankTab(); p.err != nil { + return nil // Unexpected end of input. + } + if p.currentByte == '\n' { + return p.startOfLine + } + if p.readTokenUntilWhitespace(); p.err != nil { + return nil // Unexpected end of input. + } + // If we have hit the end of line already, there is nothing left + // to do. This is not considered a syntax error. + if p.currentByte == '\n' { + return p.startOfLine + } + keyword := p.currentToken.String() + if keyword != "HELP" && keyword != "TYPE" { + // Generic comment, ignore by fast forwarding to end of line. + for p.currentByte != '\n' { + if p.currentByte, p.err = p.buf.ReadByte(); p.err != nil { + return nil // Unexpected end of input. + } + } + return p.startOfLine + } + // There is something. Next has to be a metric name. + if p.skipBlankTab(); p.err != nil { + return nil // Unexpected end of input. + } + if p.readTokenAsMetricName(); p.err != nil { + return nil // Unexpected end of input. + } + if p.currentByte == '\n' { + // At the end of the line already. + // Again, this is not considered a syntax error. + return p.startOfLine + } + if !isBlankOrTab(p.currentByte) { + p.parseError("invalid metric name in comment") + return nil + } + p.setOrCreateCurrentMF() + if p.skipBlankTab(); p.err != nil { + return nil // Unexpected end of input. + } + if p.currentByte == '\n' { + // At the end of the line already. + // Again, this is not considered a syntax error. + return p.startOfLine + } + switch keyword { + case "HELP": + return p.readingHelp + case "TYPE": + return p.readingType + } + panic(fmt.Sprintf("code error: unexpected keyword %q", keyword)) +} + +// readingMetricName represents the state where the last byte read (now in +// p.currentByte) is the first byte of a metric name. +func (p *TextParser) readingMetricName() stateFn { + if p.readTokenAsMetricName(); p.err != nil { + return nil + } + if p.currentToken.Len() == 0 { + p.parseError("invalid metric name") + return nil + } + p.setOrCreateCurrentMF() + // Now is the time to fix the type if it hasn't happened yet. + if p.currentMF.Type == nil { + p.currentMF.Type = dto.MetricType_UNTYPED.Enum() + } + p.currentMetric = &dto.Metric{} + // Do not append the newly created currentMetric to + // currentMF.Metric right now. First wait if this is a summary, + // and the metric exists already, which we can only know after + // having read all the labels. + if p.skipBlankTabIfCurrentBlankTab(); p.err != nil { + return nil // Unexpected end of input. + } + return p.readingLabels +} + +// readingLabels represents the state where the last byte read (now in +// p.currentByte) is either the first byte of the label set (i.e. a '{'), or the +// first byte of the value (otherwise). +func (p *TextParser) readingLabels() stateFn { + // Summaries/histograms are special. We have to reset the + // currentLabels map, currentQuantile and currentBucket before starting to + // read labels. + if p.currentMF.GetType() == dto.MetricType_SUMMARY || p.currentMF.GetType() == dto.MetricType_HISTOGRAM { + p.currentLabels = map[string]string{} + p.currentLabels[string(model.MetricNameLabel)] = p.currentMF.GetName() + p.currentQuantile = math.NaN() + p.currentBucket = math.NaN() + } + if p.currentByte != '{' { + return p.readingValue + } + return p.startLabelName +} + +// startLabelName represents the state where the next byte read from p.buf is +// the start of a label name (or whitespace leading up to it). +func (p *TextParser) startLabelName() stateFn { + if p.skipBlankTab(); p.err != nil { + return nil // Unexpected end of input. + } + if p.currentByte == '}' { + if p.skipBlankTab(); p.err != nil { + return nil // Unexpected end of input. + } + return p.readingValue + } + if p.readTokenAsLabelName(); p.err != nil { + return nil // Unexpected end of input. + } + if p.currentToken.Len() == 0 { + p.parseError(fmt.Sprintf("invalid label name for metric %q", p.currentMF.GetName())) + return nil + } + p.currentLabelPair = &dto.LabelPair{Name: proto.String(p.currentToken.String())} + if p.currentLabelPair.GetName() == string(model.MetricNameLabel) { + p.parseError(fmt.Sprintf("label name %q is reserved", model.MetricNameLabel)) + return nil + } + // Special summary/histogram treatment. Don't add 'quantile' and 'le' + // labels to 'real' labels. + if !(p.currentMF.GetType() == dto.MetricType_SUMMARY && p.currentLabelPair.GetName() == model.QuantileLabel) && + !(p.currentMF.GetType() == dto.MetricType_HISTOGRAM && p.currentLabelPair.GetName() == model.BucketLabel) { + p.currentMetric.Label = append(p.currentMetric.Label, p.currentLabelPair) + } + if p.skipBlankTabIfCurrentBlankTab(); p.err != nil { + return nil // Unexpected end of input. + } + if p.currentByte != '=' { + p.parseError(fmt.Sprintf("expected '=' after label name, found %q", p.currentByte)) + return nil + } + return p.startLabelValue +} + +// startLabelValue represents the state where the next byte read from p.buf is +// the start of a (quoted) label value (or whitespace leading up to it). +func (p *TextParser) startLabelValue() stateFn { + if p.skipBlankTab(); p.err != nil { + return nil // Unexpected end of input. + } + if p.currentByte != '"' { + p.parseError(fmt.Sprintf("expected '\"' at start of label value, found %q", p.currentByte)) + return nil + } + if p.readTokenAsLabelValue(); p.err != nil { + return nil + } + p.currentLabelPair.Value = proto.String(p.currentToken.String()) + // Special treatment of summaries: + // - Quantile labels are special, will result in dto.Quantile later. + // - Other labels have to be added to currentLabels for signature calculation. + if p.currentMF.GetType() == dto.MetricType_SUMMARY { + if p.currentLabelPair.GetName() == model.QuantileLabel { + if p.currentQuantile, p.err = strconv.ParseFloat(p.currentLabelPair.GetValue(), 64); p.err != nil { + // Create a more helpful error message. + p.parseError(fmt.Sprintf("expected float as value for 'quantile' label, got %q", p.currentLabelPair.GetValue())) + return nil + } + } else { + p.currentLabels[p.currentLabelPair.GetName()] = p.currentLabelPair.GetValue() + } + } + // Similar special treatment of histograms. + if p.currentMF.GetType() == dto.MetricType_HISTOGRAM { + if p.currentLabelPair.GetName() == model.BucketLabel { + if p.currentBucket, p.err = strconv.ParseFloat(p.currentLabelPair.GetValue(), 64); p.err != nil { + // Create a more helpful error message. + p.parseError(fmt.Sprintf("expected float as value for 'le' label, got %q", p.currentLabelPair.GetValue())) + return nil + } + } else { + p.currentLabels[p.currentLabelPair.GetName()] = p.currentLabelPair.GetValue() + } + } + if p.skipBlankTab(); p.err != nil { + return nil // Unexpected end of input. + } + switch p.currentByte { + case ',': + return p.startLabelName + + case '}': + if p.skipBlankTab(); p.err != nil { + return nil // Unexpected end of input. + } + return p.readingValue + default: + p.parseError(fmt.Sprintf("unexpected end of label value %q", p.currentLabelPair.Value)) + return nil + } +} + +// readingValue represents the state where the last byte read (now in +// p.currentByte) is the first byte of the sample value (i.e. a float). +func (p *TextParser) readingValue() stateFn { + // When we are here, we have read all the labels, so for the + // special case of a summary/histogram, we can finally find out + // if the metric already exists. + if p.currentMF.GetType() == dto.MetricType_SUMMARY { + signature := model.LabelsToSignature(p.currentLabels) + if summary := p.summaries[signature]; summary != nil { + p.currentMetric = summary + } else { + p.summaries[signature] = p.currentMetric + p.currentMF.Metric = append(p.currentMF.Metric, p.currentMetric) + } + } else if p.currentMF.GetType() == dto.MetricType_HISTOGRAM { + signature := model.LabelsToSignature(p.currentLabels) + if histogram := p.histograms[signature]; histogram != nil { + p.currentMetric = histogram + } else { + p.histograms[signature] = p.currentMetric + p.currentMF.Metric = append(p.currentMF.Metric, p.currentMetric) + } + } else { + p.currentMF.Metric = append(p.currentMF.Metric, p.currentMetric) + } + if p.readTokenUntilWhitespace(); p.err != nil { + return nil // Unexpected end of input. + } + value, err := strconv.ParseFloat(p.currentToken.String(), 64) + if err != nil { + // Create a more helpful error message. + p.parseError(fmt.Sprintf("expected float as value, got %q", p.currentToken.String())) + return nil + } + switch p.currentMF.GetType() { + case dto.MetricType_COUNTER: + p.currentMetric.Counter = &dto.Counter{Value: proto.Float64(value)} + case dto.MetricType_GAUGE: + p.currentMetric.Gauge = &dto.Gauge{Value: proto.Float64(value)} + case dto.MetricType_UNTYPED: + p.currentMetric.Untyped = &dto.Untyped{Value: proto.Float64(value)} + case dto.MetricType_SUMMARY: + // *sigh* + if p.currentMetric.Summary == nil { + p.currentMetric.Summary = &dto.Summary{} + } + switch { + case p.currentIsSummaryCount: + p.currentMetric.Summary.SampleCount = proto.Uint64(uint64(value)) + case p.currentIsSummarySum: + p.currentMetric.Summary.SampleSum = proto.Float64(value) + case !math.IsNaN(p.currentQuantile): + p.currentMetric.Summary.Quantile = append( + p.currentMetric.Summary.Quantile, + &dto.Quantile{ + Quantile: proto.Float64(p.currentQuantile), + Value: proto.Float64(value), + }, + ) + } + case dto.MetricType_HISTOGRAM: + // *sigh* + if p.currentMetric.Histogram == nil { + p.currentMetric.Histogram = &dto.Histogram{} + } + switch { + case p.currentIsHistogramCount: + p.currentMetric.Histogram.SampleCount = proto.Uint64(uint64(value)) + case p.currentIsHistogramSum: + p.currentMetric.Histogram.SampleSum = proto.Float64(value) + case !math.IsNaN(p.currentBucket): + p.currentMetric.Histogram.Bucket = append( + p.currentMetric.Histogram.Bucket, + &dto.Bucket{ + UpperBound: proto.Float64(p.currentBucket), + CumulativeCount: proto.Uint64(uint64(value)), + }, + ) + } + default: + p.err = fmt.Errorf("unexpected type for metric name %q", p.currentMF.GetName()) + } + if p.currentByte == '\n' { + return p.startOfLine + } + return p.startTimestamp +} + +// startTimestamp represents the state where the next byte read from p.buf is +// the start of the timestamp (or whitespace leading up to it). +func (p *TextParser) startTimestamp() stateFn { + if p.skipBlankTab(); p.err != nil { + return nil // Unexpected end of input. + } + if p.readTokenUntilWhitespace(); p.err != nil { + return nil // Unexpected end of input. + } + timestamp, err := strconv.ParseInt(p.currentToken.String(), 10, 64) + if err != nil { + // Create a more helpful error message. + p.parseError(fmt.Sprintf("expected integer as timestamp, got %q", p.currentToken.String())) + return nil + } + p.currentMetric.TimestampMs = proto.Int64(timestamp) + if p.readTokenUntilNewline(false); p.err != nil { + return nil // Unexpected end of input. + } + if p.currentToken.Len() > 0 { + p.parseError(fmt.Sprintf("spurious string after timestamp: %q", p.currentToken.String())) + return nil + } + return p.startOfLine +} + +// readingHelp represents the state where the last byte read (now in +// p.currentByte) is the first byte of the docstring after 'HELP'. +func (p *TextParser) readingHelp() stateFn { + if p.currentMF.Help != nil { + p.parseError(fmt.Sprintf("second HELP line for metric name %q", p.currentMF.GetName())) + return nil + } + // Rest of line is the docstring. + if p.readTokenUntilNewline(true); p.err != nil { + return nil // Unexpected end of input. + } + p.currentMF.Help = proto.String(p.currentToken.String()) + return p.startOfLine +} + +// readingType represents the state where the last byte read (now in +// p.currentByte) is the first byte of the type hint after 'HELP'. +func (p *TextParser) readingType() stateFn { + if p.currentMF.Type != nil { + p.parseError(fmt.Sprintf("second TYPE line for metric name %q, or TYPE reported after samples", p.currentMF.GetName())) + return nil + } + // Rest of line is the type. + if p.readTokenUntilNewline(false); p.err != nil { + return nil // Unexpected end of input. + } + metricType, ok := dto.MetricType_value[strings.ToUpper(p.currentToken.String())] + if !ok { + p.parseError(fmt.Sprintf("unknown metric type %q", p.currentToken.String())) + return nil + } + p.currentMF.Type = dto.MetricType(metricType).Enum() + return p.startOfLine +} + +// parseError sets p.err to a ParseError at the current line with the given +// message. +func (p *TextParser) parseError(msg string) { + p.err = ParseError{ + Line: p.lineCount, + Msg: msg, + } +} + +// skipBlankTab reads (and discards) bytes from p.buf until it encounters a byte +// that is neither ' ' nor '\t'. That byte is left in p.currentByte. +func (p *TextParser) skipBlankTab() { + for { + if p.currentByte, p.err = p.buf.ReadByte(); p.err != nil || !isBlankOrTab(p.currentByte) { + return + } + } +} + +// skipBlankTabIfCurrentBlankTab works exactly as skipBlankTab but doesn't do +// anything if p.currentByte is neither ' ' nor '\t'. +func (p *TextParser) skipBlankTabIfCurrentBlankTab() { + if isBlankOrTab(p.currentByte) { + p.skipBlankTab() + } +} + +// readTokenUntilWhitespace copies bytes from p.buf into p.currentToken. The +// first byte considered is the byte already read (now in p.currentByte). The +// first whitespace byte encountered is still copied into p.currentByte, but not +// into p.currentToken. +func (p *TextParser) readTokenUntilWhitespace() { + p.currentToken.Reset() + for p.err == nil && !isBlankOrTab(p.currentByte) && p.currentByte != '\n' { + p.currentToken.WriteByte(p.currentByte) + p.currentByte, p.err = p.buf.ReadByte() + } +} + +// readTokenUntilNewline copies bytes from p.buf into p.currentToken. The first +// byte considered is the byte already read (now in p.currentByte). The first +// newline byte encountered is still copied into p.currentByte, but not into +// p.currentToken. If recognizeEscapeSequence is true, two escape sequences are +// recognized: '\\' tranlates into '\', and '\n' into a line-feed character. All +// other escape sequences are invalid and cause an error. +func (p *TextParser) readTokenUntilNewline(recognizeEscapeSequence bool) { + p.currentToken.Reset() + escaped := false + for p.err == nil { + if recognizeEscapeSequence && escaped { + switch p.currentByte { + case '\\': + p.currentToken.WriteByte(p.currentByte) + case 'n': + p.currentToken.WriteByte('\n') + default: + p.parseError(fmt.Sprintf("invalid escape sequence '\\%c'", p.currentByte)) + return + } + escaped = false + } else { + switch p.currentByte { + case '\n': + return + case '\\': + escaped = true + default: + p.currentToken.WriteByte(p.currentByte) + } + } + p.currentByte, p.err = p.buf.ReadByte() + } +} + +// readTokenAsMetricName copies a metric name from p.buf into p.currentToken. +// The first byte considered is the byte already read (now in p.currentByte). +// The first byte not part of a metric name is still copied into p.currentByte, +// but not into p.currentToken. +func (p *TextParser) readTokenAsMetricName() { + p.currentToken.Reset() + if !isValidMetricNameStart(p.currentByte) { + return + } + for { + p.currentToken.WriteByte(p.currentByte) + p.currentByte, p.err = p.buf.ReadByte() + if p.err != nil || !isValidMetricNameContinuation(p.currentByte) { + return + } + } +} + +// readTokenAsLabelName copies a label name from p.buf into p.currentToken. +// The first byte considered is the byte already read (now in p.currentByte). +// The first byte not part of a label name is still copied into p.currentByte, +// but not into p.currentToken. +func (p *TextParser) readTokenAsLabelName() { + p.currentToken.Reset() + if !isValidLabelNameStart(p.currentByte) { + return + } + for { + p.currentToken.WriteByte(p.currentByte) + p.currentByte, p.err = p.buf.ReadByte() + if p.err != nil || !isValidLabelNameContinuation(p.currentByte) { + return + } + } +} + +// readTokenAsLabelValue copies a label value from p.buf into p.currentToken. +// In contrast to the other 'readTokenAs...' functions, which start with the +// last read byte in p.currentByte, this method ignores p.currentByte and starts +// with reading a new byte from p.buf. The first byte not part of a label value +// is still copied into p.currentByte, but not into p.currentToken. +func (p *TextParser) readTokenAsLabelValue() { + p.currentToken.Reset() + escaped := false + for { + if p.currentByte, p.err = p.buf.ReadByte(); p.err != nil { + return + } + if escaped { + switch p.currentByte { + case '"', '\\': + p.currentToken.WriteByte(p.currentByte) + case 'n': + p.currentToken.WriteByte('\n') + default: + p.parseError(fmt.Sprintf("invalid escape sequence '\\%c'", p.currentByte)) + return + } + escaped = false + continue + } + switch p.currentByte { + case '"': + return + case '\n': + p.parseError(fmt.Sprintf("label value %q contains unescaped new-line", p.currentToken.String())) + return + case '\\': + escaped = true + default: + p.currentToken.WriteByte(p.currentByte) + } + } +} + +func (p *TextParser) setOrCreateCurrentMF() { + p.currentIsSummaryCount = false + p.currentIsSummarySum = false + p.currentIsHistogramCount = false + p.currentIsHistogramSum = false + name := p.currentToken.String() + if p.currentMF = p.metricFamiliesByName[name]; p.currentMF != nil { + return + } + // Try out if this is a _sum or _count for a summary/histogram. + summaryName := summaryMetricName(name) + if p.currentMF = p.metricFamiliesByName[summaryName]; p.currentMF != nil { + if p.currentMF.GetType() == dto.MetricType_SUMMARY { + if isCount(name) { + p.currentIsSummaryCount = true + } + if isSum(name) { + p.currentIsSummarySum = true + } + return + } + } + histogramName := histogramMetricName(name) + if p.currentMF = p.metricFamiliesByName[histogramName]; p.currentMF != nil { + if p.currentMF.GetType() == dto.MetricType_HISTOGRAM { + if isCount(name) { + p.currentIsHistogramCount = true + } + if isSum(name) { + p.currentIsHistogramSum = true + } + return + } + } + p.currentMF = &dto.MetricFamily{Name: proto.String(name)} + p.metricFamiliesByName[name] = p.currentMF +} + +func isValidLabelNameStart(b byte) bool { + return (b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') || b == '_' +} + +func isValidLabelNameContinuation(b byte) bool { + return isValidLabelNameStart(b) || (b >= '0' && b <= '9') +} + +func isValidMetricNameStart(b byte) bool { + return isValidLabelNameStart(b) || b == ':' +} + +func isValidMetricNameContinuation(b byte) bool { + return isValidLabelNameContinuation(b) || b == ':' +} + +func isBlankOrTab(b byte) bool { + return b == ' ' || b == '\t' +} + +func isCount(name string) bool { + return len(name) > 6 && name[len(name)-6:] == "_count" +} + +func isSum(name string) bool { + return len(name) > 4 && name[len(name)-4:] == "_sum" +} + +func isBucket(name string) bool { + return len(name) > 7 && name[len(name)-7:] == "_bucket" +} + +func summaryMetricName(name string) string { + switch { + case isCount(name): + return name[:len(name)-6] + case isSum(name): + return name[:len(name)-4] + default: + return name + } +} + +func histogramMetricName(name string) string { + switch { + case isCount(name): + return name[:len(name)-6] + case isSum(name): + return name[:len(name)-4] + case isBucket(name): + return name[:len(name)-7] + default: + return name + } +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/alert.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/alert.go new file mode 100644 index 0000000000000..b027e9f3db360 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/alert.go @@ -0,0 +1,109 @@ +// Copyright 2013 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package model + +import ( + "fmt" + "time" +) + +type AlertStatus string + +const ( + AlertFiring AlertStatus = "firing" + AlertResolved AlertStatus = "resolved" +) + +// Alert is a generic representation of an alert in the Prometheus eco-system. +type Alert struct { + // Label value pairs for purpose of aggregation, matching, and disposition + // dispatching. This must minimally include an "alertname" label. + Labels LabelSet `json:"labels"` + + // Extra key/value information which does not define alert identity. + Annotations LabelSet `json:"annotations"` + + // The known time range for this alert. Both ends are optional. + StartsAt time.Time `json:"startsAt,omitempty"` + EndsAt time.Time `json:"endsAt,omitempty"` +} + +// Name returns the name of the alert. It is equivalent to the "alertname" label. +func (a *Alert) Name() string { + return string(a.Labels[AlertNameLabel]) +} + +// Fingerprint returns a unique hash for the alert. It is equivalent to +// the fingerprint of the alert's label set. +func (a *Alert) Fingerprint() Fingerprint { + return a.Labels.Fingerprint() +} + +func (a *Alert) String() string { + s := fmt.Sprintf("%s[%s]", a.Name(), a.Fingerprint().String()[:7]) + if a.Resolved() { + return s + "[resolved]" + } + return s + "[active]" +} + +// Resolved returns true iff the activity interval ended in the past. +func (a *Alert) Resolved() bool { + if a.EndsAt.IsZero() { + return false + } + return !a.EndsAt.After(time.Now()) +} + +// Status returns the status of the alert. +func (a *Alert) Status() AlertStatus { + if a.Resolved() { + return AlertResolved + } + return AlertFiring +} + +// Alert is a list of alerts that can be sorted in chronological order. +type Alerts []*Alert + +func (as Alerts) Len() int { return len(as) } +func (as Alerts) Swap(i, j int) { as[i], as[j] = as[j], as[i] } + +func (as Alerts) Less(i, j int) bool { + if as[i].StartsAt.Before(as[j].StartsAt) { + return true + } + if as[i].EndsAt.Before(as[j].EndsAt) { + return true + } + return as[i].Fingerprint() < as[j].Fingerprint() +} + +// HasFiring returns true iff one of the alerts is not resolved. +func (as Alerts) HasFiring() bool { + for _, a := range as { + if !a.Resolved() { + return true + } + } + return false +} + +// Status returns StatusFiring iff at least one of the alerts is firing. +func (as Alerts) Status() AlertStatus { + if as.HasFiring() { + return AlertFiring + } + return AlertResolved +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/fingerprinting.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/fingerprinting.go new file mode 100644 index 0000000000000..fc4de4106e851 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/fingerprinting.go @@ -0,0 +1,105 @@ +// Copyright 2013 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package model + +import ( + "fmt" + "strconv" +) + +// Fingerprint provides a hash-capable representation of a Metric. +// For our purposes, FNV-1A 64-bit is used. +type Fingerprint uint64 + +// FingerprintFromString transforms a string representation into a Fingerprint. +func FingerprintFromString(s string) (Fingerprint, error) { + num, err := strconv.ParseUint(s, 16, 64) + return Fingerprint(num), err +} + +// ParseFingerprint parses the input string into a fingerprint. +func ParseFingerprint(s string) (Fingerprint, error) { + num, err := strconv.ParseUint(s, 16, 64) + if err != nil { + return 0, err + } + return Fingerprint(num), nil +} + +func (f Fingerprint) String() string { + return fmt.Sprintf("%016x", uint64(f)) +} + +// Fingerprints represents a collection of Fingerprint subject to a given +// natural sorting scheme. It implements sort.Interface. +type Fingerprints []Fingerprint + +// Len implements sort.Interface. +func (f Fingerprints) Len() int { + return len(f) +} + +// Less implements sort.Interface. +func (f Fingerprints) Less(i, j int) bool { + return f[i] < f[j] +} + +// Swap implements sort.Interface. +func (f Fingerprints) Swap(i, j int) { + f[i], f[j] = f[j], f[i] +} + +// FingerprintSet is a set of Fingerprints. +type FingerprintSet map[Fingerprint]struct{} + +// Equal returns true if both sets contain the same elements (and not more). +func (s FingerprintSet) Equal(o FingerprintSet) bool { + if len(s) != len(o) { + return false + } + + for k := range s { + if _, ok := o[k]; !ok { + return false + } + } + + return true +} + +// Intersection returns the elements contained in both sets. +func (s FingerprintSet) Intersection(o FingerprintSet) FingerprintSet { + myLength, otherLength := len(s), len(o) + if myLength == 0 || otherLength == 0 { + return FingerprintSet{} + } + + subSet := s + superSet := o + + if otherLength < myLength { + subSet = o + superSet = s + } + + out := FingerprintSet{} + + for k := range subSet { + if _, ok := superSet[k]; ok { + out[k] = struct{}{} + } + } + + return out +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/labels.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/labels.go new file mode 100644 index 0000000000000..6459c8f791b55 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/labels.go @@ -0,0 +1,188 @@ +// Copyright 2013 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package model + +import ( + "encoding/json" + "fmt" + "regexp" + "sort" + "strings" +) + +const ( + // AlertNameLabel is the name of the label containing the an alert's name. + AlertNameLabel = "alertname" + + // ExportedLabelPrefix is the prefix to prepend to the label names present in + // exported metrics if a label of the same name is added by the server. + ExportedLabelPrefix = "exported_" + + // MetricNameLabel is the label name indicating the metric name of a + // timeseries. + MetricNameLabel = "__name__" + + // SchemeLabel is the name of the label that holds the scheme on which to + // scrape a target. + SchemeLabel = "__scheme__" + + // AddressLabel is the name of the label that holds the address of + // a scrape target. + AddressLabel = "__address__" + + // MetricsPathLabel is the name of the label that holds the path on which to + // scrape a target. + MetricsPathLabel = "__metrics_path__" + + // ReservedLabelPrefix is a prefix which is not legal in user-supplied + // label names. + ReservedLabelPrefix = "__" + + // MetaLabelPrefix is a prefix for labels that provide meta information. + // Labels with this prefix are used for intermediate label processing and + // will not be attached to time series. + MetaLabelPrefix = "__meta_" + + // TmpLabelPrefix is a prefix for temporary labels as part of relabelling. + // Labels with this prefix are used for intermediate label processing and + // will not be attached to time series. This is reserved for use in + // Prometheus configuration files by users. + TmpLabelPrefix = "__tmp_" + + // ParamLabelPrefix is a prefix for labels that provide URL parameters + // used to scrape a target. + ParamLabelPrefix = "__param_" + + // JobLabel is the label name indicating the job from which a timeseries + // was scraped. + JobLabel = "job" + + // InstanceLabel is the label name used for the instance label. + InstanceLabel = "instance" + + // BucketLabel is used for the label that defines the upper bound of a + // bucket of a histogram ("le" -> "less or equal"). + BucketLabel = "le" + + // QuantileLabel is used for the label that defines the quantile in a + // summary. + QuantileLabel = "quantile" +) + +// LabelNameRE is a regular expression matching valid label names. +var LabelNameRE = regexp.MustCompile("^[a-zA-Z_][a-zA-Z0-9_]*$") + +// A LabelName is a key for a LabelSet or Metric. It has a value associated +// therewith. +type LabelName string + +// UnmarshalYAML implements the yaml.Unmarshaler interface. +func (ln *LabelName) UnmarshalYAML(unmarshal func(interface{}) error) error { + var s string + if err := unmarshal(&s); err != nil { + return err + } + if !LabelNameRE.MatchString(s) { + return fmt.Errorf("%q is not a valid label name", s) + } + *ln = LabelName(s) + return nil +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (ln *LabelName) UnmarshalJSON(b []byte) error { + var s string + if err := json.Unmarshal(b, &s); err != nil { + return err + } + if !LabelNameRE.MatchString(s) { + return fmt.Errorf("%q is not a valid label name", s) + } + *ln = LabelName(s) + return nil +} + +// LabelNames is a sortable LabelName slice. In implements sort.Interface. +type LabelNames []LabelName + +func (l LabelNames) Len() int { + return len(l) +} + +func (l LabelNames) Less(i, j int) bool { + return l[i] < l[j] +} + +func (l LabelNames) Swap(i, j int) { + l[i], l[j] = l[j], l[i] +} + +func (l LabelNames) String() string { + labelStrings := make([]string, 0, len(l)) + for _, label := range l { + labelStrings = append(labelStrings, string(label)) + } + return strings.Join(labelStrings, ", ") +} + +// A LabelValue is an associated value for a LabelName. +type LabelValue string + +// LabelValues is a sortable LabelValue slice. It implements sort.Interface. +type LabelValues []LabelValue + +func (l LabelValues) Len() int { + return len(l) +} + +func (l LabelValues) Less(i, j int) bool { + return sort.StringsAreSorted([]string{string(l[i]), string(l[j])}) +} + +func (l LabelValues) Swap(i, j int) { + l[i], l[j] = l[j], l[i] +} + +// LabelPair pairs a name with a value. +type LabelPair struct { + Name LabelName + Value LabelValue +} + +// LabelPairs is a sortable slice of LabelPair pointers. It implements +// sort.Interface. +type LabelPairs []*LabelPair + +func (l LabelPairs) Len() int { + return len(l) +} + +func (l LabelPairs) Less(i, j int) bool { + switch { + case l[i].Name > l[j].Name: + return false + case l[i].Name < l[j].Name: + return true + case l[i].Value > l[j].Value: + return false + case l[i].Value < l[j].Value: + return true + default: + return false + } +} + +func (l LabelPairs) Swap(i, j int) { + l[i], l[j] = l[j], l[i] +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/labelset.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/labelset.go new file mode 100644 index 0000000000000..142b9d1e2d3ad --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/labelset.go @@ -0,0 +1,153 @@ +// Copyright 2013 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package model + +import ( + "encoding/json" + "fmt" + "sort" + "strings" +) + +// A LabelSet is a collection of LabelName and LabelValue pairs. The LabelSet +// may be fully-qualified down to the point where it may resolve to a single +// Metric in the data store or not. All operations that occur within the realm +// of a LabelSet can emit a vector of Metric entities to which the LabelSet may +// match. +type LabelSet map[LabelName]LabelValue + +func (ls LabelSet) Equal(o LabelSet) bool { + if len(ls) != len(o) { + return false + } + for ln, lv := range ls { + olv, ok := o[ln] + if !ok { + return false + } + if olv != lv { + return false + } + } + return true +} + +// Before compares the metrics, using the following criteria: +// +// If m has fewer labels than o, it is before o. If it has more, it is not. +// +// If the number of labels is the same, the superset of all label names is +// sorted alphanumerically. The first differing label pair found in that order +// determines the outcome: If the label does not exist at all in m, then m is +// before o, and vice versa. Otherwise the label value is compared +// alphanumerically. +// +// If m and o are equal, the method returns false. +func (ls LabelSet) Before(o LabelSet) bool { + if len(ls) < len(o) { + return true + } + if len(ls) > len(o) { + return false + } + + lns := make(LabelNames, 0, len(ls)+len(o)) + for ln := range ls { + lns = append(lns, ln) + } + for ln := range o { + lns = append(lns, ln) + } + // It's probably not worth it to de-dup lns. + sort.Sort(lns) + for _, ln := range lns { + mlv, ok := ls[ln] + if !ok { + return true + } + olv, ok := o[ln] + if !ok { + return false + } + if mlv < olv { + return true + } + if mlv > olv { + return false + } + } + return false +} + +func (ls LabelSet) Clone() LabelSet { + lsn := make(LabelSet, len(ls)) + for ln, lv := range ls { + lsn[ln] = lv + } + return lsn +} + +// Merge is a helper function to non-destructively merge two label sets. +func (l LabelSet) Merge(other LabelSet) LabelSet { + result := make(LabelSet, len(l)) + + for k, v := range l { + result[k] = v + } + + for k, v := range other { + result[k] = v + } + + return result +} + +func (l LabelSet) String() string { + lstrs := make([]string, 0, len(l)) + for l, v := range l { + lstrs = append(lstrs, fmt.Sprintf("%s=%q", l, v)) + } + + sort.Strings(lstrs) + return fmt.Sprintf("{%s}", strings.Join(lstrs, ", ")) +} + +// Fingerprint returns the LabelSet's fingerprint. +func (ls LabelSet) Fingerprint() Fingerprint { + return labelSetToFingerprint(ls) +} + +// FastFingerprint returns the LabelSet's Fingerprint calculated by a faster hashing +// algorithm, which is, however, more susceptible to hash collisions. +func (ls LabelSet) FastFingerprint() Fingerprint { + return labelSetToFastFingerprint(ls) +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (l *LabelSet) UnmarshalJSON(b []byte) error { + var m map[LabelName]LabelValue + if err := json.Unmarshal(b, &m); err != nil { + return err + } + // encoding/json only unmarshals maps of the form map[string]T. It treats + // LabelName as a string and does not call its UnmarshalJSON method. + // Thus, we have to replicate the behavior here. + for ln := range m { + if !LabelNameRE.MatchString(string(ln)) { + return fmt.Errorf("%q is not a valid label name", ln) + } + } + *l = LabelSet(m) + return nil +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/metric.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/metric.go new file mode 100644 index 0000000000000..25fc3c942585a --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/metric.go @@ -0,0 +1,81 @@ +// Copyright 2013 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package model + +import ( + "fmt" + "sort" + "strings" +) + +var separator = []byte{0} + +// A Metric is similar to a LabelSet, but the key difference is that a Metric is +// a singleton and refers to one and only one stream of samples. +type Metric LabelSet + +// Equal compares the metrics. +func (m Metric) Equal(o Metric) bool { + return LabelSet(m).Equal(LabelSet(o)) +} + +// Before compares the metrics' underlying label sets. +func (m Metric) Before(o Metric) bool { + return LabelSet(m).Before(LabelSet(o)) +} + +// Clone returns a copy of the Metric. +func (m Metric) Clone() Metric { + clone := Metric{} + for k, v := range m { + clone[k] = v + } + return clone +} + +func (m Metric) String() string { + metricName, hasName := m[MetricNameLabel] + numLabels := len(m) - 1 + if !hasName { + numLabels = len(m) + } + labelStrings := make([]string, 0, numLabels) + for label, value := range m { + if label != MetricNameLabel { + labelStrings = append(labelStrings, fmt.Sprintf("%s=%q", label, value)) + } + } + + switch numLabels { + case 0: + if hasName { + return string(metricName) + } + return "{}" + default: + sort.Strings(labelStrings) + return fmt.Sprintf("%s{%s}", metricName, strings.Join(labelStrings, ", ")) + } +} + +// Fingerprint returns a Metric's Fingerprint. +func (m Metric) Fingerprint() Fingerprint { + return LabelSet(m).Fingerprint() +} + +// FastFingerprint returns a Metric's Fingerprint calculated by a faster hashing +// algorithm, which is, however, more susceptible to hash collisions. +func (m Metric) FastFingerprint() Fingerprint { + return LabelSet(m).FastFingerprint() +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/model.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/model.go new file mode 100644 index 0000000000000..88f013a47a41b --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/model.go @@ -0,0 +1,16 @@ +// Copyright 2013 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package model contains common data structures that are shared across +// Prometheus componenets and libraries. +package model diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/signature.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/signature.go new file mode 100644 index 0000000000000..28f370065a9e5 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/signature.go @@ -0,0 +1,190 @@ +// Copyright 2014 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package model + +import ( + "bytes" + "hash" + "hash/fnv" + "sort" + "sync" +) + +// SeparatorByte is a byte that cannot occur in valid UTF-8 sequences and is +// used to separate label names, label values, and other strings from each other +// when calculating their combined hash value (aka signature aka fingerprint). +const SeparatorByte byte = 255 + +var ( + // cache the signature of an empty label set. + emptyLabelSignature = fnv.New64a().Sum64() + + hashAndBufPool sync.Pool +) + +type hashAndBuf struct { + h hash.Hash64 + b bytes.Buffer +} + +func getHashAndBuf() *hashAndBuf { + hb := hashAndBufPool.Get() + if hb == nil { + return &hashAndBuf{h: fnv.New64a()} + } + return hb.(*hashAndBuf) +} + +func putHashAndBuf(hb *hashAndBuf) { + hb.h.Reset() + hb.b.Reset() + hashAndBufPool.Put(hb) +} + +// LabelsToSignature returns a quasi-unique signature (i.e., fingerprint) for a +// given label set. (Collisions are possible but unlikely if the number of label +// sets the function is applied to is small.) +func LabelsToSignature(labels map[string]string) uint64 { + if len(labels) == 0 { + return emptyLabelSignature + } + + labelNames := make([]string, 0, len(labels)) + for labelName := range labels { + labelNames = append(labelNames, labelName) + } + sort.Strings(labelNames) + + hb := getHashAndBuf() + defer putHashAndBuf(hb) + + for _, labelName := range labelNames { + hb.b.WriteString(labelName) + hb.b.WriteByte(SeparatorByte) + hb.b.WriteString(labels[labelName]) + hb.b.WriteByte(SeparatorByte) + hb.h.Write(hb.b.Bytes()) + hb.b.Reset() + } + return hb.h.Sum64() +} + +// labelSetToFingerprint works exactly as LabelsToSignature but takes a LabelSet as +// parameter (rather than a label map) and returns a Fingerprint. +func labelSetToFingerprint(ls LabelSet) Fingerprint { + if len(ls) == 0 { + return Fingerprint(emptyLabelSignature) + } + + labelNames := make(LabelNames, 0, len(ls)) + for labelName := range ls { + labelNames = append(labelNames, labelName) + } + sort.Sort(labelNames) + + hb := getHashAndBuf() + defer putHashAndBuf(hb) + + for _, labelName := range labelNames { + hb.b.WriteString(string(labelName)) + hb.b.WriteByte(SeparatorByte) + hb.b.WriteString(string(ls[labelName])) + hb.b.WriteByte(SeparatorByte) + hb.h.Write(hb.b.Bytes()) + hb.b.Reset() + } + return Fingerprint(hb.h.Sum64()) +} + +// labelSetToFastFingerprint works similar to labelSetToFingerprint but uses a +// faster and less allocation-heavy hash function, which is more susceptible to +// create hash collisions. Therefore, collision detection should be applied. +func labelSetToFastFingerprint(ls LabelSet) Fingerprint { + if len(ls) == 0 { + return Fingerprint(emptyLabelSignature) + } + + var result uint64 + hb := getHashAndBuf() + defer putHashAndBuf(hb) + + for labelName, labelValue := range ls { + hb.b.WriteString(string(labelName)) + hb.b.WriteByte(SeparatorByte) + hb.b.WriteString(string(labelValue)) + hb.h.Write(hb.b.Bytes()) + result ^= hb.h.Sum64() + hb.h.Reset() + hb.b.Reset() + } + return Fingerprint(result) +} + +// SignatureForLabels works like LabelsToSignature but takes a Metric as +// parameter (rather than a label map) and only includes the labels with the +// specified LabelNames into the signature calculation. The labels passed in +// will be sorted by this function. +func SignatureForLabels(m Metric, labels ...LabelName) uint64 { + if len(m) == 0 || len(labels) == 0 { + return emptyLabelSignature + } + + sort.Sort(LabelNames(labels)) + + hb := getHashAndBuf() + defer putHashAndBuf(hb) + + for _, label := range labels { + hb.b.WriteString(string(label)) + hb.b.WriteByte(SeparatorByte) + hb.b.WriteString(string(m[label])) + hb.b.WriteByte(SeparatorByte) + hb.h.Write(hb.b.Bytes()) + hb.b.Reset() + } + return hb.h.Sum64() +} + +// SignatureWithoutLabels works like LabelsToSignature but takes a Metric as +// parameter (rather than a label map) and excludes the labels with any of the +// specified LabelNames from the signature calculation. +func SignatureWithoutLabels(m Metric, labels map[LabelName]struct{}) uint64 { + if len(m) == 0 { + return emptyLabelSignature + } + + labelNames := make(LabelNames, 0, len(m)) + for labelName := range m { + if _, exclude := labels[labelName]; !exclude { + labelNames = append(labelNames, labelName) + } + } + if len(labelNames) == 0 { + return emptyLabelSignature + } + sort.Sort(labelNames) + + hb := getHashAndBuf() + defer putHashAndBuf(hb) + + for _, labelName := range labelNames { + hb.b.WriteString(string(labelName)) + hb.b.WriteByte(SeparatorByte) + hb.b.WriteString(string(m[labelName])) + hb.b.WriteByte(SeparatorByte) + hb.h.Write(hb.b.Bytes()) + hb.b.Reset() + } + return hb.h.Sum64() +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/silence.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/silence.go new file mode 100644 index 0000000000000..b4b96eae9d461 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/silence.go @@ -0,0 +1,60 @@ +// Copyright 2015 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package model + +import ( + "encoding/json" + "fmt" + "regexp" + "time" +) + +// Matcher describes a matches the value of a given label. +type Matcher struct { + Name LabelName `json:"name"` + Value string `json:"value"` + IsRegex bool `json:"isRegex"` +} + +func (m *Matcher) UnmarshalJSON(b []byte) error { + type plain Matcher + if err := json.Unmarshal(b, (*plain)(m)); err != nil { + return err + } + + if len(m.Name) == 0 { + return fmt.Errorf("label name in matcher must not be empty") + } + if m.IsRegex { + if _, err := regexp.Compile(m.Value); err != nil { + return err + } + } + return nil +} + +// Silence defines the representation of a silence definiton +// in the Prometheus eco-system. +type Silence struct { + ID uint64 `json:"id,omitempty"` + + Matchers []*Matcher `json:"matchers"` + + StartsAt time.Time `json:"startsAt"` + EndsAt time.Time `json:"endsAt"` + + CreatedAt time.Time `json:"createdAt,omitempty"` + CreatedBy string `json:"createdBy"` + Comment string `json:"comment,omitempty"` +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/time.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/time.go new file mode 100644 index 0000000000000..ebc8bf6cc841d --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/time.go @@ -0,0 +1,230 @@ +// Copyright 2013 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package model + +import ( + "fmt" + "math" + "regexp" + "strconv" + "strings" + "time" +) + +const ( + // MinimumTick is the minimum supported time resolution. This has to be + // at least time.Second in order for the code below to work. + minimumTick = time.Millisecond + // second is the Time duration equivalent to one second. + second = int64(time.Second / minimumTick) + // The number of nanoseconds per minimum tick. + nanosPerTick = int64(minimumTick / time.Nanosecond) + + // Earliest is the earliest Time representable. Handy for + // initializing a high watermark. + Earliest = Time(math.MinInt64) + // Latest is the latest Time representable. Handy for initializing + // a low watermark. + Latest = Time(math.MaxInt64) +) + +// Time is the number of milliseconds since the epoch +// (1970-01-01 00:00 UTC) excluding leap seconds. +type Time int64 + +// Interval describes and interval between two timestamps. +type Interval struct { + Start, End Time +} + +// Now returns the current time as a Time. +func Now() Time { + return TimeFromUnixNano(time.Now().UnixNano()) +} + +// TimeFromUnix returns the Time equivalent to the Unix Time t +// provided in seconds. +func TimeFromUnix(t int64) Time { + return Time(t * second) +} + +// TimeFromUnixNano returns the Time equivalent to the Unix Time +// t provided in nanoseconds. +func TimeFromUnixNano(t int64) Time { + return Time(t / nanosPerTick) +} + +// Equal reports whether two Times represent the same instant. +func (t Time) Equal(o Time) bool { + return t == o +} + +// Before reports whether the Time t is before o. +func (t Time) Before(o Time) bool { + return t < o +} + +// After reports whether the Time t is after o. +func (t Time) After(o Time) bool { + return t > o +} + +// Add returns the Time t + d. +func (t Time) Add(d time.Duration) Time { + return t + Time(d/minimumTick) +} + +// Sub returns the Duration t - o. +func (t Time) Sub(o Time) time.Duration { + return time.Duration(t-o) * minimumTick +} + +// Time returns the time.Time representation of t. +func (t Time) Time() time.Time { + return time.Unix(int64(t)/second, (int64(t)%second)*nanosPerTick) +} + +// Unix returns t as a Unix time, the number of seconds elapsed +// since January 1, 1970 UTC. +func (t Time) Unix() int64 { + return int64(t) / second +} + +// UnixNano returns t as a Unix time, the number of nanoseconds elapsed +// since January 1, 1970 UTC. +func (t Time) UnixNano() int64 { + return int64(t) * nanosPerTick +} + +// The number of digits after the dot. +var dotPrecision = int(math.Log10(float64(second))) + +// String returns a string representation of the Time. +func (t Time) String() string { + return strconv.FormatFloat(float64(t)/float64(second), 'f', -1, 64) +} + +// MarshalJSON implements the json.Marshaler interface. +func (t Time) MarshalJSON() ([]byte, error) { + return []byte(t.String()), nil +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (t *Time) UnmarshalJSON(b []byte) error { + p := strings.Split(string(b), ".") + switch len(p) { + case 1: + v, err := strconv.ParseInt(string(p[0]), 10, 64) + if err != nil { + return err + } + *t = Time(v * second) + + case 2: + v, err := strconv.ParseInt(string(p[0]), 10, 64) + if err != nil { + return err + } + v *= second + + prec := dotPrecision - len(p[1]) + if prec < 0 { + p[1] = p[1][:dotPrecision] + } else if prec > 0 { + p[1] = p[1] + strings.Repeat("0", prec) + } + + va, err := strconv.ParseInt(p[1], 10, 32) + if err != nil { + return err + } + + *t = Time(v + va) + + default: + return fmt.Errorf("invalid time %q", string(b)) + } + return nil +} + +// Duration wraps time.Duration. It is used to parse the custom duration format +// from YAML. +// This type should not propagate beyond the scope of input/output processing. +type Duration time.Duration + +// StringToDuration parses a string into a time.Duration, assuming that a year +// a day always has 24h. +func ParseDuration(durationStr string) (Duration, error) { + matches := durationRE.FindStringSubmatch(durationStr) + if len(matches) != 3 { + return 0, fmt.Errorf("not a valid duration string: %q", durationStr) + } + durSeconds, _ := strconv.Atoi(matches[1]) + dur := time.Duration(durSeconds) * time.Second + unit := matches[2] + switch unit { + case "d": + dur *= 60 * 60 * 24 + case "h": + dur *= 60 * 60 + case "m": + dur *= 60 + case "s": + dur *= 1 + default: + return 0, fmt.Errorf("invalid time unit in duration string: %q", unit) + } + return Duration(dur), nil +} + +var durationRE = regexp.MustCompile("^([0-9]+)([ywdhms]+)$") + +func (d Duration) String() string { + seconds := int64(time.Duration(d) / time.Second) + factors := map[string]int64{ + "d": 60 * 60 * 24, + "h": 60 * 60, + "m": 60, + "s": 1, + } + unit := "s" + switch int64(0) { + case seconds % factors["d"]: + unit = "d" + case seconds % factors["h"]: + unit = "h" + case seconds % factors["m"]: + unit = "m" + } + return fmt.Sprintf("%v%v", seconds/factors[unit], unit) +} + +// MarshalYAML implements the yaml.Marshaler interface. +func (d Duration) MarshalYAML() (interface{}, error) { + return d.String(), nil +} + +// UnmarshalYAML implements the yaml.Unmarshaler interface. +func (d *Duration) UnmarshalYAML(unmarshal func(interface{}) error) error { + var s string + if err := unmarshal(&s); err != nil { + return err + } + dur, err := ParseDuration(s) + if err != nil { + return err + } + *d = dur + return nil +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/value.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/value.go new file mode 100644 index 0000000000000..10ffb0bd61147 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/common/model/value.go @@ -0,0 +1,395 @@ +// Copyright 2013 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package model + +import ( + "encoding/json" + "fmt" + "sort" + "strconv" + "strings" +) + +// A SampleValue is a representation of a value for a given sample at a given +// time. +type SampleValue float64 + +// MarshalJSON implements json.Marshaler. +func (v SampleValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.String()) +} + +// UnmarshalJSON implements json.Unmarshaler. +func (v *SampleValue) UnmarshalJSON(b []byte) error { + if len(b) < 2 || b[0] != '"' || b[len(b)-1] != '"' { + return fmt.Errorf("sample value must be a quoted string") + } + f, err := strconv.ParseFloat(string(b[1:len(b)-1]), 64) + if err != nil { + return err + } + *v = SampleValue(f) + return nil +} + +func (v SampleValue) Equal(o SampleValue) bool { + return v == o +} + +func (v SampleValue) String() string { + return strconv.FormatFloat(float64(v), 'f', -1, 64) +} + +// SamplePair pairs a SampleValue with a Timestamp. +type SamplePair struct { + Timestamp Time + Value SampleValue +} + +// MarshalJSON implements json.Marshaler. +func (s SamplePair) MarshalJSON() ([]byte, error) { + t, err := json.Marshal(s.Timestamp) + if err != nil { + return nil, err + } + v, err := json.Marshal(s.Value) + if err != nil { + return nil, err + } + return []byte(fmt.Sprintf("[%s,%s]", t, v)), nil +} + +// UnmarshalJSON implements json.Unmarshaler. +func (s *SamplePair) UnmarshalJSON(b []byte) error { + v := [...]json.Unmarshaler{&s.Timestamp, &s.Value} + return json.Unmarshal(b, &v) +} + +// Equal returns true if this SamplePair and o have equal Values and equal +// Timestamps. +func (s *SamplePair) Equal(o *SamplePair) bool { + return s == o || (s.Value == o.Value && s.Timestamp.Equal(o.Timestamp)) +} + +func (s SamplePair) String() string { + return fmt.Sprintf("%s @[%s]", s.Value, s.Timestamp) +} + +// Sample is a sample pair associated with a metric. +type Sample struct { + Metric Metric `json:"metric"` + Value SampleValue `json:"value"` + Timestamp Time `json:"timestamp"` +} + +// Equal compares first the metrics, then the timestamp, then the value. +func (s *Sample) Equal(o *Sample) bool { + if s == o { + return true + } + + if !s.Metric.Equal(o.Metric) { + return false + } + if !s.Timestamp.Equal(o.Timestamp) { + return false + } + if s.Value != o.Value { + return false + } + + return true +} + +func (s Sample) String() string { + return fmt.Sprintf("%s => %s", s.Metric, SamplePair{ + Timestamp: s.Timestamp, + Value: s.Value, + }) +} + +// MarshalJSON implements json.Marshaler. +func (s Sample) MarshalJSON() ([]byte, error) { + v := struct { + Metric Metric `json:"metric"` + Value SamplePair `json:"value"` + }{ + Metric: s.Metric, + Value: SamplePair{ + Timestamp: s.Timestamp, + Value: s.Value, + }, + } + + return json.Marshal(&v) +} + +// UnmarshalJSON implements json.Unmarshaler. +func (s *Sample) UnmarshalJSON(b []byte) error { + v := struct { + Metric Metric `json:"metric"` + Value SamplePair `json:"value"` + }{ + Metric: s.Metric, + Value: SamplePair{ + Timestamp: s.Timestamp, + Value: s.Value, + }, + } + + if err := json.Unmarshal(b, &v); err != nil { + return err + } + + s.Metric = v.Metric + s.Timestamp = v.Value.Timestamp + s.Value = v.Value.Value + + return nil +} + +// Samples is a sortable Sample slice. It implements sort.Interface. +type Samples []*Sample + +func (s Samples) Len() int { + return len(s) +} + +// Less compares first the metrics, then the timestamp. +func (s Samples) Less(i, j int) bool { + switch { + case s[i].Metric.Before(s[j].Metric): + return true + case s[j].Metric.Before(s[i].Metric): + return false + case s[i].Timestamp.Before(s[j].Timestamp): + return true + default: + return false + } +} + +func (s Samples) Swap(i, j int) { + s[i], s[j] = s[j], s[i] +} + +// Equal compares two sets of samples and returns true if they are equal. +func (s Samples) Equal(o Samples) bool { + if len(s) != len(o) { + return false + } + + for i, sample := range s { + if !sample.Equal(o[i]) { + return false + } + } + return true +} + +// SampleStream is a stream of Values belonging to an attached COWMetric. +type SampleStream struct { + Metric Metric `json:"metric"` + Values []SamplePair `json:"values"` +} + +func (ss SampleStream) String() string { + vals := make([]string, len(ss.Values)) + for i, v := range ss.Values { + vals[i] = v.String() + } + return fmt.Sprintf("%s =>\n%s", ss.Metric, strings.Join(vals, "\n")) +} + +// Value is a generic interface for values resulting from a query evaluation. +type Value interface { + Type() ValueType + String() string +} + +func (Matrix) Type() ValueType { return ValMatrix } +func (Vector) Type() ValueType { return ValVector } +func (*Scalar) Type() ValueType { return ValScalar } +func (*String) Type() ValueType { return ValString } + +type ValueType int + +const ( + ValNone ValueType = iota + ValScalar + ValVector + ValMatrix + ValString +) + +// MarshalJSON implements json.Marshaler. +func (et ValueType) MarshalJSON() ([]byte, error) { + return json.Marshal(et.String()) +} + +func (et *ValueType) UnmarshalJSON(b []byte) error { + var s string + if err := json.Unmarshal(b, &s); err != nil { + return err + } + switch s { + case "": + *et = ValNone + case "scalar": + *et = ValScalar + case "vector": + *et = ValVector + case "matrix": + *et = ValMatrix + case "string": + *et = ValString + default: + return fmt.Errorf("unknown value type %q", s) + } + return nil +} + +func (e ValueType) String() string { + switch e { + case ValNone: + return "" + case ValScalar: + return "scalar" + case ValVector: + return "vector" + case ValMatrix: + return "matrix" + case ValString: + return "string" + } + panic("ValueType.String: unhandled value type") +} + +// Scalar is a scalar value evaluated at the set timestamp. +type Scalar struct { + Value SampleValue `json:"value"` + Timestamp Time `json:"timestamp"` +} + +func (s Scalar) String() string { + return fmt.Sprintf("scalar: %v @[%v]", s.Value, s.Timestamp) +} + +// MarshalJSON implements json.Marshaler. +func (s Scalar) MarshalJSON() ([]byte, error) { + v := strconv.FormatFloat(float64(s.Value), 'f', -1, 64) + return json.Marshal([...]interface{}{s.Timestamp, string(v)}) +} + +// UnmarshalJSON implements json.Unmarshaler. +func (s *Scalar) UnmarshalJSON(b []byte) error { + var f string + v := [...]interface{}{&s.Timestamp, &f} + + if err := json.Unmarshal(b, &v); err != nil { + return err + } + + value, err := strconv.ParseFloat(f, 64) + if err != nil { + return fmt.Errorf("error parsing sample value: %s", err) + } + s.Value = SampleValue(value) + return nil +} + +// String is a string value evaluated at the set timestamp. +type String struct { + Value string `json:"value"` + Timestamp Time `json:"timestamp"` +} + +func (s *String) String() string { + return s.Value +} + +// MarshalJSON implements json.Marshaler. +func (s String) MarshalJSON() ([]byte, error) { + return json.Marshal([]interface{}{s.Timestamp, s.Value}) +} + +// UnmarshalJSON implements json.Unmarshaler. +func (s *String) UnmarshalJSON(b []byte) error { + v := [...]interface{}{&s.Timestamp, &s.Value} + return json.Unmarshal(b, &v) +} + +// Vector is basically only an alias for Samples, but the +// contract is that in a Vector, all Samples have the same timestamp. +type Vector []*Sample + +func (vec Vector) String() string { + entries := make([]string, len(vec)) + for i, s := range vec { + entries[i] = s.String() + } + return strings.Join(entries, "\n") +} + +func (vec Vector) Len() int { return len(vec) } +func (vec Vector) Swap(i, j int) { vec[i], vec[j] = vec[j], vec[i] } + +// Less compares first the metrics, then the timestamp. +func (vec Vector) Less(i, j int) bool { + switch { + case vec[i].Metric.Before(vec[j].Metric): + return true + case vec[j].Metric.Before(vec[i].Metric): + return false + case vec[i].Timestamp.Before(vec[j].Timestamp): + return true + default: + return false + } +} + +// Equal compares two sets of samples and returns true if they are equal. +func (vec Vector) Equal(o Vector) bool { + if len(vec) != len(o) { + return false + } + + for i, sample := range vec { + if !sample.Equal(o[i]) { + return false + } + } + return true +} + +// Matrix is a list of time series. +type Matrix []*SampleStream + +func (m Matrix) Len() int { return len(m) } +func (m Matrix) Less(i, j int) bool { return m[i].Metric.Before(m[j].Metric) } +func (m Matrix) Swap(i, j int) { m[i], m[j] = m[j], m[i] } + +func (mat Matrix) String() string { + matCp := make(Matrix, len(mat)) + copy(matCp, mat) + sort.Sort(matCp) + + strs := make([]string, len(matCp)) + + for i, ss := range matCp { + strs[i] = ss.String() + } + + return strings.Join(strs, "\n") +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/AUTHORS.md b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/AUTHORS.md new file mode 100644 index 0000000000000..f1c27ccb01322 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/AUTHORS.md @@ -0,0 +1,20 @@ +The Prometheus project was started by Matt T. Proud (emeritus) and +Julius Volz in 2012. + +Maintainers of this repository: + +* Tobias Schmidt + +The following individuals have contributed code to this repository +(listed in alphabetical order): + +* Armen Baghumian +* Bjoern Rabenstein +* David Cournapeau +* Ji-Hoon, Seol +* Jonas Große Sundrup +* Julius Volz +* Matthias Rampke +* Nicky Gerritsen +* Rémi Audebert +* Tobias Schmidt diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/CONTRIBUTING.md b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/CONTRIBUTING.md new file mode 100644 index 0000000000000..5705f0fbea291 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/CONTRIBUTING.md @@ -0,0 +1,18 @@ +# Contributing + +Prometheus uses GitHub to manage reviews of pull requests. + +* If you have a trivial fix or improvement, go ahead and create a pull + request, addressing (with `@...`) one or more of the maintainers + (see [AUTHORS.md](AUTHORS.md)) in the description of the pull request. + +* If you plan to do something more involved, first discuss your ideas + on our [mailing list](https://groups.google.com/forum/?fromgroups#!forum/prometheus-developers). + This will avoid unnecessary work and surely give you and us a good deal + of inspiration. + +* Relevant coding style guidelines are the [Go Code Review + Comments](https://code.google.com/p/go-wiki/wiki/CodeReviewComments) + and the _Formatting and style_ section of Peter Bourgon's [Go: Best + Practices for Production + Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style). diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/LICENSE b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/LICENSE new file mode 100644 index 0000000000000..261eeb9e9f8b2 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/Makefile b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/Makefile new file mode 100644 index 0000000000000..e8acbbc5ec925 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/Makefile @@ -0,0 +1,6 @@ +ci: + go fmt + go vet + go test -v ./... + go get github.com/golang/lint/golint + golint *.go diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/NOTICE b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/NOTICE new file mode 100644 index 0000000000000..53c5e9aa11124 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/NOTICE @@ -0,0 +1,7 @@ +procfs provides functions to retrieve system, kernel and process +metrics from the pseudo-filesystem proc. + +Copyright 2014-2015 The Prometheus Authors + +This product includes software developed at +SoundCloud Ltd. (http://soundcloud.com/). diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/doc.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/doc.go new file mode 100644 index 0000000000000..e2acd6d40a6bc --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/doc.go @@ -0,0 +1,45 @@ +// Copyright 2014 Prometheus Team +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package procfs provides functions to retrieve system, kernel and process +// metrics from the pseudo-filesystem proc. +// +// Example: +// +// package main +// +// import ( +// "fmt" +// "log" +// +// "github.com/prometheus/procfs" +// ) +// +// func main() { +// p, err := procfs.Self() +// if err != nil { +// log.Fatalf("could not get process: %s", err) +// } +// +// stat, err := p.NewStat() +// if err != nil { +// log.Fatalf("could not get process stat: %s", err) +// } +// +// fmt.Printf("command: %s\n", stat.Comm) +// fmt.Printf("cpu time: %fs\n", stat.CPUTime()) +// fmt.Printf("vsize: %dB\n", stat.VirtualMemory()) +// fmt.Printf("rss: %dB\n", stat.ResidentMemory()) +// } +// +package procfs diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/fs.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/fs.go new file mode 100644 index 0000000000000..6a8d97b11e9f5 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/fs.go @@ -0,0 +1,40 @@ +package procfs + +import ( + "fmt" + "os" + "path" +) + +// FS represents the pseudo-filesystem proc, which provides an interface to +// kernel data structures. +type FS string + +// DefaultMountPoint is the common mount point of the proc filesystem. +const DefaultMountPoint = "/proc" + +// NewFS returns a new FS mounted under the given mountPoint. It will error +// if the mount point can't be read. +func NewFS(mountPoint string) (FS, error) { + info, err := os.Stat(mountPoint) + if err != nil { + return "", fmt.Errorf("could not read %s: %s", mountPoint, err) + } + if !info.IsDir() { + return "", fmt.Errorf("mount point %s is not a directory", mountPoint) + } + + return FS(mountPoint), nil +} + +func (fs FS) stat(p string) (os.FileInfo, error) { + return os.Stat(path.Join(string(fs), p)) +} + +func (fs FS) open(p string) (*os.File, error) { + return os.Open(path.Join(string(fs), p)) +} + +func (fs FS) readlink(p string) (string, error) { + return os.Readlink(path.Join(string(fs), p)) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/ipvs.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/ipvs.go new file mode 100644 index 0000000000000..26da5000e390e --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/ipvs.go @@ -0,0 +1,223 @@ +package procfs + +import ( + "bufio" + "encoding/hex" + "errors" + "fmt" + "io" + "io/ioutil" + "net" + "strconv" + "strings" +) + +// IPVSStats holds IPVS statistics, as exposed by the kernel in `/proc/net/ip_vs_stats`. +type IPVSStats struct { + // Total count of connections. + Connections uint64 + // Total incoming packages processed. + IncomingPackets uint64 + // Total outgoing packages processed. + OutgoingPackets uint64 + // Total incoming traffic. + IncomingBytes uint64 + // Total outgoing traffic. + OutgoingBytes uint64 +} + +// IPVSBackendStatus holds current metrics of one virtual / real address pair. +type IPVSBackendStatus struct { + // The local (virtual) IP address. + LocalAddress net.IP + // The local (virtual) port. + LocalPort uint16 + // The transport protocol (TCP, UDP). + Proto string + // The remote (real) IP address. + RemoteAddress net.IP + // The remote (real) port. + RemotePort uint16 + // The current number of active connections for this virtual/real address pair. + ActiveConn uint64 + // The current number of inactive connections for this virtual/real address pair. + InactConn uint64 + // The current weight of this virtual/real address pair. + Weight uint64 +} + +// NewIPVSStats reads the IPVS statistics. +func NewIPVSStats() (IPVSStats, error) { + fs, err := NewFS(DefaultMountPoint) + if err != nil { + return IPVSStats{}, err + } + + return fs.NewIPVSStats() +} + +// NewIPVSStats reads the IPVS statistics from the specified `proc` filesystem. +func (fs FS) NewIPVSStats() (IPVSStats, error) { + file, err := fs.open("net/ip_vs_stats") + if err != nil { + return IPVSStats{}, err + } + defer file.Close() + + return parseIPVSStats(file) +} + +// parseIPVSStats performs the actual parsing of `ip_vs_stats`. +func parseIPVSStats(file io.Reader) (IPVSStats, error) { + var ( + statContent []byte + statLines []string + statFields []string + stats IPVSStats + ) + + statContent, err := ioutil.ReadAll(file) + if err != nil { + return IPVSStats{}, err + } + + statLines = strings.SplitN(string(statContent), "\n", 4) + if len(statLines) != 4 { + return IPVSStats{}, errors.New("ip_vs_stats corrupt: too short") + } + + statFields = strings.Fields(statLines[2]) + if len(statFields) != 5 { + return IPVSStats{}, errors.New("ip_vs_stats corrupt: unexpected number of fields") + } + + stats.Connections, err = strconv.ParseUint(statFields[0], 16, 64) + if err != nil { + return IPVSStats{}, err + } + stats.IncomingPackets, err = strconv.ParseUint(statFields[1], 16, 64) + if err != nil { + return IPVSStats{}, err + } + stats.OutgoingPackets, err = strconv.ParseUint(statFields[2], 16, 64) + if err != nil { + return IPVSStats{}, err + } + stats.IncomingBytes, err = strconv.ParseUint(statFields[3], 16, 64) + if err != nil { + return IPVSStats{}, err + } + stats.OutgoingBytes, err = strconv.ParseUint(statFields[4], 16, 64) + if err != nil { + return IPVSStats{}, err + } + + return stats, nil +} + +// NewIPVSBackendStatus reads and returns the status of all (virtual,real) server pairs. +func NewIPVSBackendStatus() ([]IPVSBackendStatus, error) { + fs, err := NewFS(DefaultMountPoint) + if err != nil { + return []IPVSBackendStatus{}, err + } + + return fs.NewIPVSBackendStatus() +} + +// NewIPVSBackendStatus reads and returns the status of all (virtual,real) server pairs from the specified `proc` filesystem. +func (fs FS) NewIPVSBackendStatus() ([]IPVSBackendStatus, error) { + file, err := fs.open("net/ip_vs") + if err != nil { + return nil, err + } + defer file.Close() + + return parseIPVSBackendStatus(file) +} + +func parseIPVSBackendStatus(file io.Reader) ([]IPVSBackendStatus, error) { + var ( + status []IPVSBackendStatus + scanner = bufio.NewScanner(file) + proto string + localAddress net.IP + localPort uint16 + err error + ) + + for scanner.Scan() { + fields := strings.Fields(string(scanner.Text())) + if len(fields) == 0 { + continue + } + switch { + case fields[0] == "IP" || fields[0] == "Prot" || fields[1] == "RemoteAddress:Port": + continue + case fields[0] == "TCP" || fields[0] == "UDP": + if len(fields) < 2 { + continue + } + proto = fields[0] + localAddress, localPort, err = parseIPPort(fields[1]) + if err != nil { + return nil, err + } + case fields[0] == "->": + if len(fields) < 6 { + continue + } + remoteAddress, remotePort, err := parseIPPort(fields[1]) + if err != nil { + return nil, err + } + weight, err := strconv.ParseUint(fields[3], 10, 64) + if err != nil { + return nil, err + } + activeConn, err := strconv.ParseUint(fields[4], 10, 64) + if err != nil { + return nil, err + } + inactConn, err := strconv.ParseUint(fields[5], 10, 64) + if err != nil { + return nil, err + } + status = append(status, IPVSBackendStatus{ + LocalAddress: localAddress, + LocalPort: localPort, + RemoteAddress: remoteAddress, + RemotePort: remotePort, + Proto: proto, + Weight: weight, + ActiveConn: activeConn, + InactConn: inactConn, + }) + } + } + return status, nil +} + +func parseIPPort(s string) (net.IP, uint16, error) { + tmp := strings.SplitN(s, ":", 2) + + if len(tmp) != 2 { + return nil, 0, fmt.Errorf("invalid IP:Port: %s", s) + } + + if len(tmp[0]) != 8 && len(tmp[0]) != 32 { + return nil, 0, fmt.Errorf("invalid IP: %s", tmp[0]) + } + + ip, err := hex.DecodeString(tmp[0]) + if err != nil { + return nil, 0, err + } + + port, err := strconv.ParseUint(tmp[1], 16, 16) + if err != nil { + return nil, 0, err + } + + return ip, uint16(port), nil +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/mdstat.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/mdstat.go new file mode 100644 index 0000000000000..09ed6b5ebc17e --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/mdstat.go @@ -0,0 +1,158 @@ +package procfs + +import ( + "fmt" + "io/ioutil" + "path" + "regexp" + "strconv" + "strings" +) + +var ( + statuslineRE = regexp.MustCompile(`(\d+) blocks .*\[(\d+)/(\d+)\] \[[U_]+\]`) + buildlineRE = regexp.MustCompile(`\((\d+)/\d+\)`) +) + +// MDStat holds info parsed from /proc/mdstat. +type MDStat struct { + // Name of the device. + Name string + // activity-state of the device. + ActivityState string + // Number of active disks. + DisksActive int64 + // Total number of disks the device consists of. + DisksTotal int64 + // Number of blocks the device holds. + BlocksTotal int64 + // Number of blocks on the device that are in sync. + BlocksSynced int64 +} + +// ParseMDStat parses an mdstat-file and returns a struct with the relevant infos. +func (fs FS) ParseMDStat() (mdstates []MDStat, err error) { + mdStatusFilePath := path.Join(string(fs), "mdstat") + content, err := ioutil.ReadFile(mdStatusFilePath) + if err != nil { + return []MDStat{}, fmt.Errorf("error parsing %s: %s", mdStatusFilePath, err) + } + + mdStatusFile := string(content) + + lines := strings.Split(mdStatusFile, "\n") + var currentMD string + + // Each md has at least the deviceline, statusline and one empty line afterwards + // so we will have probably something of the order len(lines)/3 devices + // so we use that for preallocation. + estimateMDs := len(lines) / 3 + mdStates := make([]MDStat, 0, estimateMDs) + + for i, l := range lines { + if l == "" { + // Skip entirely empty lines. + continue + } + + if l[0] == ' ' { + // Those lines are not the beginning of a md-section. + continue + } + + if strings.HasPrefix(l, "Personalities") || strings.HasPrefix(l, "unused") { + // We aren't interested in lines with general info. + continue + } + + mainLine := strings.Split(l, " ") + if len(mainLine) < 3 { + return mdStates, fmt.Errorf("error parsing mdline: %s", l) + } + currentMD = mainLine[0] // name of md-device + activityState := mainLine[2] // activity status of said md-device + + if len(lines) <= i+3 { + return mdStates, fmt.Errorf("error parsing %s: entry for %s has fewer lines than expected", mdStatusFilePath, currentMD) + } + + active, total, size, err := evalStatusline(lines[i+1]) // parse statusline, always present + if err != nil { + return mdStates, fmt.Errorf("error parsing %s: %s", mdStatusFilePath, err) + } + + // + // Now get the number of synced blocks. + // + + // Get the line number of the syncing-line. + var j int + if strings.Contains(lines[i+2], "bitmap") { // then skip the bitmap line + j = i + 3 + } else { + j = i + 2 + } + + // If device is syncing at the moment, get the number of currently synced bytes, + // otherwise that number equals the size of the device. + syncedBlocks := size + if strings.Contains(lines[j], "recovery") || strings.Contains(lines[j], "resync") { + syncedBlocks, err = evalBuildline(lines[j]) + if err != nil { + return mdStates, fmt.Errorf("error parsing %s: %s", mdStatusFilePath, err) + } + } + + mdStates = append(mdStates, MDStat{currentMD, activityState, active, total, size, syncedBlocks}) + + } + + return mdStates, nil +} + +func evalStatusline(statusline string) (active, total, size int64, err error) { + matches := statuslineRE.FindStringSubmatch(statusline) + + // +1 to make it more obvious that the whole string containing the info is also returned as matches[0]. + if len(matches) != 3+1 { + return 0, 0, 0, fmt.Errorf("unexpected number matches found in statusline: %s", statusline) + } + + size, err = strconv.ParseInt(matches[1], 10, 64) + if err != nil { + return 0, 0, 0, fmt.Errorf("%s in statusline: %s", err, statusline) + } + + total, err = strconv.ParseInt(matches[2], 10, 64) + if err != nil { + return 0, 0, 0, fmt.Errorf("%s in statusline: %s", err, statusline) + } + + active, err = strconv.ParseInt(matches[3], 10, 64) + if err != nil { + return 0, 0, 0, fmt.Errorf("%s in statusline: %s", err, statusline) + } + + return active, total, size, nil +} + +// Gets the size that has already been synced out of the sync-line. +func evalBuildline(buildline string) (int64, error) { + matches := buildlineRE.FindStringSubmatch(buildline) + + // +1 to make it more obvious that the whole string containing the info is also returned as matches[0]. + if len(matches) < 1+1 { + return 0, fmt.Errorf("too few matches found in buildline: %s", buildline) + } + + if len(matches) > 1+1 { + return 0, fmt.Errorf("too many matches found in buildline: %s", buildline) + } + + syncedSize, err := strconv.ParseInt(matches[1], 10, 64) + if err != nil { + return 0, fmt.Errorf("%s in buildline: %s", err, buildline) + } + + return syncedSize, nil +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/proc.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/proc.go new file mode 100644 index 0000000000000..efc8502789cff --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/proc.go @@ -0,0 +1,202 @@ +package procfs + +import ( + "fmt" + "io/ioutil" + "os" + "path" + "strconv" + "strings" +) + +// Proc provides information about a running process. +type Proc struct { + // The process ID. + PID int + + fs FS +} + +// Procs represents a list of Proc structs. +type Procs []Proc + +func (p Procs) Len() int { return len(p) } +func (p Procs) Swap(i, j int) { p[i], p[j] = p[j], p[i] } +func (p Procs) Less(i, j int) bool { return p[i].PID < p[j].PID } + +// Self returns a process for the current process read via /proc/self. +func Self() (Proc, error) { + fs, err := NewFS(DefaultMountPoint) + if err != nil { + return Proc{}, err + } + return fs.Self() +} + +// NewProc returns a process for the given pid under /proc. +func NewProc(pid int) (Proc, error) { + fs, err := NewFS(DefaultMountPoint) + if err != nil { + return Proc{}, err + } + return fs.NewProc(pid) +} + +// AllProcs returns a list of all currently avaible processes under /proc. +func AllProcs() (Procs, error) { + fs, err := NewFS(DefaultMountPoint) + if err != nil { + return Procs{}, err + } + return fs.AllProcs() +} + +// Self returns a process for the current process. +func (fs FS) Self() (Proc, error) { + p, err := fs.readlink("self") + if err != nil { + return Proc{}, err + } + pid, err := strconv.Atoi(strings.Replace(p, string(fs), "", -1)) + if err != nil { + return Proc{}, err + } + return fs.NewProc(pid) +} + +// NewProc returns a process for the given pid. +func (fs FS) NewProc(pid int) (Proc, error) { + if _, err := fs.stat(strconv.Itoa(pid)); err != nil { + return Proc{}, err + } + return Proc{PID: pid, fs: fs}, nil +} + +// AllProcs returns a list of all currently avaible processes. +func (fs FS) AllProcs() (Procs, error) { + d, err := fs.open("") + if err != nil { + return Procs{}, err + } + defer d.Close() + + names, err := d.Readdirnames(-1) + if err != nil { + return Procs{}, fmt.Errorf("could not read %s: %s", d.Name(), err) + } + + p := Procs{} + for _, n := range names { + pid, err := strconv.ParseInt(n, 10, 64) + if err != nil { + continue + } + p = append(p, Proc{PID: int(pid), fs: fs}) + } + + return p, nil +} + +// CmdLine returns the command line of a process. +func (p Proc) CmdLine() ([]string, error) { + f, err := p.open("cmdline") + if err != nil { + return nil, err + } + defer f.Close() + + data, err := ioutil.ReadAll(f) + if err != nil { + return nil, err + } + + if len(data) < 1 { + return []string{}, nil + } + + return strings.Split(string(data[:len(data)-1]), string(byte(0))), nil +} + +// Executable returns the absolute path of the executable command of a process. +func (p Proc) Executable() (string, error) { + exe, err := p.readlink("exe") + + if os.IsNotExist(err) { + return "", nil + } + + return exe, err +} + +// FileDescriptors returns the currently open file descriptors of a process. +func (p Proc) FileDescriptors() ([]uintptr, error) { + names, err := p.fileDescriptors() + if err != nil { + return nil, err + } + + fds := make([]uintptr, len(names)) + for i, n := range names { + fd, err := strconv.ParseInt(n, 10, 32) + if err != nil { + return nil, fmt.Errorf("could not parse fd %s: %s", n, err) + } + fds[i] = uintptr(fd) + } + + return fds, nil +} + +// FileDescriptorTargets returns the targets of all file descriptors of a process. +// If a file descriptor is not a symlink to a file (like a socket), that value will be the empty string. +func (p Proc) FileDescriptorTargets() ([]string, error) { + names, err := p.fileDescriptors() + if err != nil { + return nil, err + } + + targets := make([]string, len(names)) + + for i, name := range names { + target, err := p.readlink("fd/" + name) + if err == nil { + targets[i] = target + } + } + + return targets, nil +} + +// FileDescriptorsLen returns the number of currently open file descriptors of +// a process. +func (p Proc) FileDescriptorsLen() (int, error) { + fds, err := p.fileDescriptors() + if err != nil { + return 0, err + } + + return len(fds), nil +} + +func (p Proc) fileDescriptors() ([]string, error) { + d, err := p.open("fd") + if err != nil { + return nil, err + } + defer d.Close() + + names, err := d.Readdirnames(-1) + if err != nil { + return nil, fmt.Errorf("could not read %s: %s", d.Name(), err) + } + + return names, nil +} + +func (p Proc) open(pa string) (*os.File, error) { + return p.fs.open(path.Join(strconv.Itoa(p.PID), pa)) +} + +func (p Proc) readlink(pa string) (string, error) { + return p.fs.readlink(path.Join(strconv.Itoa(p.PID), pa)) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/proc_io.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/proc_io.go new file mode 100644 index 0000000000000..7c6dc86970d8a --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/proc_io.go @@ -0,0 +1,54 @@ +package procfs + +import ( + "fmt" + "io/ioutil" +) + +// ProcIO models the content of /proc//io. +type ProcIO struct { + // Chars read. + RChar uint64 + // Chars written. + WChar uint64 + // Read syscalls. + SyscR uint64 + // Write syscalls. + SyscW uint64 + // Bytes read. + ReadBytes uint64 + // Bytes written. + WriteBytes uint64 + // Bytes written, but taking into account truncation. See + // Documentation/filesystems/proc.txt in the kernel sources for + // detailed explanation. + CancelledWriteBytes int64 +} + +// NewIO creates a new ProcIO instance from a given Proc instance. +func (p Proc) NewIO() (ProcIO, error) { + pio := ProcIO{} + + f, err := p.open("io") + if err != nil { + return pio, err + } + defer f.Close() + + data, err := ioutil.ReadAll(f) + if err != nil { + return pio, err + } + + ioFormat := "rchar: %d\nwchar: %d\nsyscr: %d\nsyscw: %d\n" + + "read_bytes: %d\nwrite_bytes: %d\n" + + "cancelled_write_bytes: %d\n" + + _, err = fmt.Sscanf(string(data), ioFormat, &pio.RChar, &pio.WChar, &pio.SyscR, + &pio.SyscW, &pio.ReadBytes, &pio.WriteBytes, &pio.CancelledWriteBytes) + if err != nil { + return pio, err + } + + return pio, nil +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/proc_limits.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/proc_limits.go new file mode 100644 index 0000000000000..9f080b9f62be9 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/proc_limits.go @@ -0,0 +1,111 @@ +package procfs + +import ( + "bufio" + "fmt" + "regexp" + "strconv" +) + +// ProcLimits represents the soft limits for each of the process's resource +// limits. +type ProcLimits struct { + CPUTime int + FileSize int + DataSize int + StackSize int + CoreFileSize int + ResidentSet int + Processes int + OpenFiles int + LockedMemory int + AddressSpace int + FileLocks int + PendingSignals int + MsqqueueSize int + NicePriority int + RealtimePriority int + RealtimeTimeout int +} + +const ( + limitsFields = 3 + limitsUnlimited = "unlimited" +) + +var ( + limitsDelimiter = regexp.MustCompile(" +") +) + +// NewLimits returns the current soft limits of the process. +func (p Proc) NewLimits() (ProcLimits, error) { + f, err := p.open("limits") + if err != nil { + return ProcLimits{}, err + } + defer f.Close() + + var ( + l = ProcLimits{} + s = bufio.NewScanner(f) + ) + for s.Scan() { + fields := limitsDelimiter.Split(s.Text(), limitsFields) + if len(fields) != limitsFields { + return ProcLimits{}, fmt.Errorf( + "couldn't parse %s line %s", f.Name(), s.Text()) + } + + switch fields[0] { + case "Max cpu time": + l.CPUTime, err = parseInt(fields[1]) + case "Max file size": + l.FileLocks, err = parseInt(fields[1]) + case "Max data size": + l.DataSize, err = parseInt(fields[1]) + case "Max stack size": + l.StackSize, err = parseInt(fields[1]) + case "Max core file size": + l.CoreFileSize, err = parseInt(fields[1]) + case "Max resident set": + l.ResidentSet, err = parseInt(fields[1]) + case "Max processes": + l.Processes, err = parseInt(fields[1]) + case "Max open files": + l.OpenFiles, err = parseInt(fields[1]) + case "Max locked memory": + l.LockedMemory, err = parseInt(fields[1]) + case "Max address space": + l.AddressSpace, err = parseInt(fields[1]) + case "Max file locks": + l.FileLocks, err = parseInt(fields[1]) + case "Max pending signals": + l.PendingSignals, err = parseInt(fields[1]) + case "Max msgqueue size": + l.MsqqueueSize, err = parseInt(fields[1]) + case "Max nice priority": + l.NicePriority, err = parseInt(fields[1]) + case "Max realtime priority": + l.RealtimePriority, err = parseInt(fields[1]) + case "Max realtime timeout": + l.RealtimeTimeout, err = parseInt(fields[1]) + } + + if err != nil { + return ProcLimits{}, err + } + } + + return l, s.Err() +} + +func parseInt(s string) (int, error) { + if s == limitsUnlimited { + return -1, nil + } + i, err := strconv.ParseInt(s, 10, 32) + if err != nil { + return 0, fmt.Errorf("couldn't parse value %s: %s", s, err) + } + return int(i), nil +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/proc_stat.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/proc_stat.go new file mode 100644 index 0000000000000..30a403b6c7eca --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/proc_stat.go @@ -0,0 +1,175 @@ +package procfs + +import ( + "bytes" + "fmt" + "io/ioutil" + "os" +) + +// Originally, this USER_HZ value was dynamically retrieved via a sysconf call which +// required cgo. However, that caused a lot of problems regarding +// cross-compilation. Alternatives such as running a binary to determine the +// value, or trying to derive it in some other way were all problematic. +// After much research it was determined that USER_HZ is actually hardcoded to +// 100 on all Go-supported platforms as of the time of this writing. This is +// why we decided to hardcode it here as well. It is not impossible that there +// could be systems with exceptions, but they should be very exotic edge cases, +// and in that case, the worst outcome will be two misreported metrics. +// +// See also the following discussions: +// +// - https://github.com/prometheus/node_exporter/issues/52 +// - https://github.com/prometheus/procfs/pull/2 +// - http://stackoverflow.com/questions/17410841/how-does-user-hz-solve-the-jiffy-scaling-issue +const userHZ = 100 + +// ProcStat provides status information about the process, +// read from /proc/[pid]/stat. +type ProcStat struct { + // The process ID. + PID int + // The filename of the executable. + Comm string + // The process state. + State string + // The PID of the parent of this process. + PPID int + // The process group ID of the process. + PGRP int + // The session ID of the process. + Session int + // The controlling terminal of the process. + TTY int + // The ID of the foreground process group of the controlling terminal of + // the process. + TPGID int + // The kernel flags word of the process. + Flags uint + // The number of minor faults the process has made which have not required + // loading a memory page from disk. + MinFlt uint + // The number of minor faults that the process's waited-for children have + // made. + CMinFlt uint + // The number of major faults the process has made which have required + // loading a memory page from disk. + MajFlt uint + // The number of major faults that the process's waited-for children have + // made. + CMajFlt uint + // Amount of time that this process has been scheduled in user mode, + // measured in clock ticks. + UTime uint + // Amount of time that this process has been scheduled in kernel mode, + // measured in clock ticks. + STime uint + // Amount of time that this process's waited-for children have been + // scheduled in user mode, measured in clock ticks. + CUTime uint + // Amount of time that this process's waited-for children have been + // scheduled in kernel mode, measured in clock ticks. + CSTime uint + // For processes running a real-time scheduling policy, this is the negated + // scheduling priority, minus one. + Priority int + // The nice value, a value in the range 19 (low priority) to -20 (high + // priority). + Nice int + // Number of threads in this process. + NumThreads int + // The time the process started after system boot, the value is expressed + // in clock ticks. + Starttime uint64 + // Virtual memory size in bytes. + VSize int + // Resident set size in pages. + RSS int + + fs FS +} + +// NewStat returns the current status information of the process. +func (p Proc) NewStat() (ProcStat, error) { + f, err := p.open("stat") + if err != nil { + return ProcStat{}, err + } + defer f.Close() + + data, err := ioutil.ReadAll(f) + if err != nil { + return ProcStat{}, err + } + + var ( + ignore int + + s = ProcStat{PID: p.PID, fs: p.fs} + l = bytes.Index(data, []byte("(")) + r = bytes.LastIndex(data, []byte(")")) + ) + + if l < 0 || r < 0 { + return ProcStat{}, fmt.Errorf( + "unexpected format, couldn't extract comm: %s", + data, + ) + } + + s.Comm = string(data[l+1 : r]) + _, err = fmt.Fscan( + bytes.NewBuffer(data[r+2:]), + &s.State, + &s.PPID, + &s.PGRP, + &s.Session, + &s.TTY, + &s.TPGID, + &s.Flags, + &s.MinFlt, + &s.CMinFlt, + &s.MajFlt, + &s.CMajFlt, + &s.UTime, + &s.STime, + &s.CUTime, + &s.CSTime, + &s.Priority, + &s.Nice, + &s.NumThreads, + &ignore, + &s.Starttime, + &s.VSize, + &s.RSS, + ) + if err != nil { + return ProcStat{}, err + } + + return s, nil +} + +// VirtualMemory returns the virtual memory size in bytes. +func (s ProcStat) VirtualMemory() int { + return s.VSize +} + +// ResidentMemory returns the resident memory size in bytes. +func (s ProcStat) ResidentMemory() int { + return s.RSS * os.Getpagesize() +} + +// StartTime returns the unix timestamp of the process in seconds. +func (s ProcStat) StartTime() (float64, error) { + stat, err := s.fs.NewStat() + if err != nil { + return 0, err + } + return float64(stat.BootTime) + (float64(s.Starttime) / userHZ), nil +} + +// CPUTime returns the total CPU user and system time in seconds. +func (s ProcStat) CPUTime() float64 { + return float64(s.UTime+s.STime) / userHZ +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/stat.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/stat.go new file mode 100644 index 0000000000000..26fefb0fa020c --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/prometheus/procfs/stat.go @@ -0,0 +1,55 @@ +package procfs + +import ( + "bufio" + "fmt" + "strconv" + "strings" +) + +// Stat represents kernel/system statistics. +type Stat struct { + // Boot time in seconds since the Epoch. + BootTime int64 +} + +// NewStat returns kernel/system statistics read from /proc/stat. +func NewStat() (Stat, error) { + fs, err := NewFS(DefaultMountPoint) + if err != nil { + return Stat{}, err + } + + return fs.NewStat() +} + +// NewStat returns an information about current kernel/system statistics. +func (fs FS) NewStat() (Stat, error) { + f, err := fs.open("stat") + if err != nil { + return Stat{}, err + } + defer f.Close() + + s := bufio.NewScanner(f) + for s.Scan() { + line := s.Text() + if !strings.HasPrefix(line, "btime") { + continue + } + fields := strings.Fields(line) + if len(fields) != 2 { + return Stat{}, fmt.Errorf("couldn't parse %s line %s", f.Name(), line) + } + i, err := strconv.ParseInt(fields[1], 10, 32) + if err != nil { + return Stat{}, fmt.Errorf("couldn't parse %s: %s", fields[1], err) + } + return Stat{BootTime: i}, nil + } + if err := s.Err(); err != nil { + return Stat{}, fmt.Errorf("couldn't parse %s: %s", f.Name(), err) + } + + return Stat{}, fmt.Errorf("couldn't parse %s, missing btime", f.Name()) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/LICENSE b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/LICENSE new file mode 100644 index 0000000000000..63ed1cfea1fb2 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2012 Alex Ogier. All rights reserved. +Copyright (c) 2012 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. diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/bool.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/bool.go new file mode 100644 index 0000000000000..d272e40bddc15 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/bool.go @@ -0,0 +1,97 @@ +package pflag + +import ( + "fmt" + "strconv" +) + +// optional interface to indicate boolean flags that can be +// supplied without "=value" text +type boolFlag interface { + Value + IsBoolFlag() bool +} + +// -- bool Value +type boolValue bool + +func newBoolValue(val bool, p *bool) *boolValue { + *p = val + return (*boolValue)(p) +} + +func (b *boolValue) Set(s string) error { + v, err := strconv.ParseBool(s) + *b = boolValue(v) + return err +} + +func (b *boolValue) Type() string { + return "bool" +} + +func (b *boolValue) String() string { return fmt.Sprintf("%v", *b) } + +func (b *boolValue) IsBoolFlag() bool { return true } + +func boolConv(sval string) (interface{}, error) { + return strconv.ParseBool(sval) +} + +// GetBool return the bool value of a flag with the given name +func (f *FlagSet) GetBool(name string) (bool, error) { + val, err := f.getFlagType(name, "bool", boolConv) + if err != nil { + return false, err + } + return val.(bool), nil +} + +// BoolVar defines a bool flag with specified name, default value, and usage string. +// The argument p points to a bool variable in which to store the value of the flag. +func (f *FlagSet) BoolVar(p *bool, name string, value bool, usage string) { + f.BoolVarP(p, name, "", value, usage) +} + +// BoolVarP is like BoolVar, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) BoolVarP(p *bool, name, shorthand string, value bool, usage string) { + flag := f.VarPF(newBoolValue(value, p), name, shorthand, usage) + flag.NoOptDefVal = "true" +} + +// BoolVar defines a bool flag with specified name, default value, and usage string. +// The argument p points to a bool variable in which to store the value of the flag. +func BoolVar(p *bool, name string, value bool, usage string) { + BoolVarP(p, name, "", value, usage) +} + +// BoolVarP is like BoolVar, but accepts a shorthand letter that can be used after a single dash. +func BoolVarP(p *bool, name, shorthand string, value bool, usage string) { + flag := CommandLine.VarPF(newBoolValue(value, p), name, shorthand, usage) + flag.NoOptDefVal = "true" +} + +// Bool defines a bool flag with specified name, default value, and usage string. +// The return value is the address of a bool variable that stores the value of the flag. +func (f *FlagSet) Bool(name string, value bool, usage string) *bool { + return f.BoolP(name, "", value, usage) +} + +// BoolP is like Bool, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) BoolP(name, shorthand string, value bool, usage string) *bool { + p := new(bool) + f.BoolVarP(p, name, shorthand, value, usage) + return p +} + +// Bool defines a bool flag with specified name, default value, and usage string. +// The return value is the address of a bool variable that stores the value of the flag. +func Bool(name string, value bool, usage string) *bool { + return BoolP(name, "", value, usage) +} + +// BoolP is like Bool, but accepts a shorthand letter that can be used after a single dash. +func BoolP(name, shorthand string, value bool, usage string) *bool { + b := CommandLine.BoolP(name, shorthand, value, usage) + return b +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/count.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/count.go new file mode 100644 index 0000000000000..7b1f142e78a0e --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/count.go @@ -0,0 +1,97 @@ +package pflag + +import ( + "fmt" + "strconv" +) + +// -- count Value +type countValue int + +func newCountValue(val int, p *int) *countValue { + *p = val + return (*countValue)(p) +} + +func (i *countValue) Set(s string) error { + v, err := strconv.ParseInt(s, 0, 64) + // -1 means that no specific value was passed, so increment + if v == -1 { + *i = countValue(*i + 1) + } else { + *i = countValue(v) + } + return err +} + +func (i *countValue) Type() string { + return "count" +} + +func (i *countValue) String() string { return fmt.Sprintf("%v", *i) } + +func countConv(sval string) (interface{}, error) { + i, err := strconv.Atoi(sval) + if err != nil { + return nil, err + } + return i, nil +} + +// GetCount return the int value of a flag with the given name +func (f *FlagSet) GetCount(name string) (int, error) { + val, err := f.getFlagType(name, "count", countConv) + if err != nil { + return 0, err + } + return val.(int), nil +} + +// CountVar defines a count flag with specified name, default value, and usage string. +// The argument p points to an int variable in which to store the value of the flag. +// A count flag will add 1 to its value evey time it is found on the command line +func (f *FlagSet) CountVar(p *int, name string, usage string) { + f.CountVarP(p, name, "", usage) +} + +// CountVarP is like CountVar only take a shorthand for the flag name. +func (f *FlagSet) CountVarP(p *int, name, shorthand string, usage string) { + flag := f.VarPF(newCountValue(0, p), name, shorthand, usage) + flag.NoOptDefVal = "-1" +} + +// CountVar like CountVar only the flag is placed on the CommandLine instead of a given flag set +func CountVar(p *int, name string, usage string) { + CommandLine.CountVar(p, name, usage) +} + +// CountVarP is like CountVar only take a shorthand for the flag name. +func CountVarP(p *int, name, shorthand string, usage string) { + CommandLine.CountVarP(p, name, shorthand, usage) +} + +// Count defines a count flag with specified name, default value, and usage string. +// The return value is the address of an int variable that stores the value of the flag. +// A count flag will add 1 to its value evey time it is found on the command line +func (f *FlagSet) Count(name string, usage string) *int { + p := new(int) + f.CountVarP(p, name, "", usage) + return p +} + +// CountP is like Count only takes a shorthand for the flag name. +func (f *FlagSet) CountP(name, shorthand string, usage string) *int { + p := new(int) + f.CountVarP(p, name, shorthand, usage) + return p +} + +// Count like Count only the flag is placed on the CommandLine isntead of a given flag set +func Count(name string, usage string) *int { + return CommandLine.CountP(name, "", usage) +} + +// CountP is like Count only takes a shorthand for the flag name. +func CountP(name, shorthand string, usage string) *int { + return CommandLine.CountP(name, shorthand, usage) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/duration.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/duration.go new file mode 100644 index 0000000000000..e9debef88ee08 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/duration.go @@ -0,0 +1,86 @@ +package pflag + +import ( + "time" +) + +// -- time.Duration Value +type durationValue time.Duration + +func newDurationValue(val time.Duration, p *time.Duration) *durationValue { + *p = val + return (*durationValue)(p) +} + +func (d *durationValue) Set(s string) error { + v, err := time.ParseDuration(s) + *d = durationValue(v) + return err +} + +func (d *durationValue) Type() string { + return "duration" +} + +func (d *durationValue) String() string { return (*time.Duration)(d).String() } + +func durationConv(sval string) (interface{}, error) { + return time.ParseDuration(sval) +} + +// GetDuration return the duration value of a flag with the given name +func (f *FlagSet) GetDuration(name string) (time.Duration, error) { + val, err := f.getFlagType(name, "duration", durationConv) + if err != nil { + return 0, err + } + return val.(time.Duration), nil +} + +// DurationVar defines a time.Duration flag with specified name, default value, and usage string. +// The argument p points to a time.Duration variable in which to store the value of the flag. +func (f *FlagSet) DurationVar(p *time.Duration, name string, value time.Duration, usage string) { + f.VarP(newDurationValue(value, p), name, "", usage) +} + +// DurationVarP is like DurationVar, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) DurationVarP(p *time.Duration, name, shorthand string, value time.Duration, usage string) { + f.VarP(newDurationValue(value, p), name, shorthand, usage) +} + +// DurationVar defines a time.Duration flag with specified name, default value, and usage string. +// The argument p points to a time.Duration variable in which to store the value of the flag. +func DurationVar(p *time.Duration, name string, value time.Duration, usage string) { + CommandLine.VarP(newDurationValue(value, p), name, "", usage) +} + +// DurationVarP is like DurationVar, but accepts a shorthand letter that can be used after a single dash. +func DurationVarP(p *time.Duration, name, shorthand string, value time.Duration, usage string) { + CommandLine.VarP(newDurationValue(value, p), name, shorthand, usage) +} + +// Duration defines a time.Duration flag with specified name, default value, and usage string. +// The return value is the address of a time.Duration variable that stores the value of the flag. +func (f *FlagSet) Duration(name string, value time.Duration, usage string) *time.Duration { + p := new(time.Duration) + f.DurationVarP(p, name, "", value, usage) + return p +} + +// DurationP is like Duration, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) DurationP(name, shorthand string, value time.Duration, usage string) *time.Duration { + p := new(time.Duration) + f.DurationVarP(p, name, shorthand, value, usage) + return p +} + +// Duration defines a time.Duration flag with specified name, default value, and usage string. +// The return value is the address of a time.Duration variable that stores the value of the flag. +func Duration(name string, value time.Duration, usage string) *time.Duration { + return CommandLine.DurationP(name, "", value, usage) +} + +// DurationP is like Duration, but accepts a shorthand letter that can be used after a single dash. +func DurationP(name, shorthand string, value time.Duration, usage string) *time.Duration { + return CommandLine.DurationP(name, shorthand, value, usage) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/flag.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/flag.go new file mode 100644 index 0000000000000..965df13797a13 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/flag.go @@ -0,0 +1,934 @@ +// 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. + +/* +Package pflag is a drop-in replacement for Go's flag package, implementing +POSIX/GNU-style --flags. + +pflag is compatible with the GNU extensions to the POSIX recommendations +for command-line options. See +http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html + +Usage: + +pflag is a drop-in replacement of Go's native flag package. If you import +pflag under the name "flag" then all code should continue to function +with no changes. + + import flag "github.com/ogier/pflag" + + There is one exception to this: if you directly instantiate the Flag struct +there is one more field "Shorthand" that you will need to set. +Most code never instantiates this struct directly, and instead uses +functions such as String(), BoolVar(), and Var(), and is therefore +unaffected. + +Define flags using flag.String(), Bool(), Int(), etc. + +This declares an integer flag, -flagname, stored in the pointer ip, with type *int. + var ip = flag.Int("flagname", 1234, "help message for flagname") +If you like, you can bind the flag to a variable using the Var() functions. + var flagvar int + func init() { + flag.IntVar(&flagvar, "flagname", 1234, "help message for flagname") + } +Or you can create custom flags that satisfy the Value interface (with +pointer receivers) and couple them to flag parsing by + flag.Var(&flagVal, "name", "help message for flagname") +For such flags, the default value is just the initial value of the variable. + +After all flags are defined, call + flag.Parse() +to parse the command line into the defined flags. + +Flags may then be used directly. If you're using the flags themselves, +they are all pointers; if you bind to variables, they're values. + fmt.Println("ip has value ", *ip) + fmt.Println("flagvar has value ", flagvar) + +After parsing, the arguments after the flag are available as the +slice flag.Args() or individually as flag.Arg(i). +The arguments are indexed from 0 through flag.NArg()-1. + +The pflag package also defines some new functions that are not in flag, +that give one-letter shorthands for flags. You can use these by appending +'P' to the name of any function that defines a flag. + var ip = flag.IntP("flagname", "f", 1234, "help message") + var flagvar bool + func init() { + flag.BoolVarP("boolname", "b", true, "help message") + } + flag.VarP(&flagVar, "varname", "v", 1234, "help message") +Shorthand letters can be used with single dashes on the command line. +Boolean shorthand flags can be combined with other shorthand flags. + +Command line flag syntax: + --flag // boolean flags only + --flag=x + +Unlike the flag package, a single dash before an option means something +different than a double dash. Single dashes signify a series of shorthand +letters for flags. All but the last shorthand letter must be boolean flags. + // boolean flags + -f + -abc + // non-boolean flags + -n 1234 + -Ifile + // mixed + -abcs "hello" + -abcn1234 + +Flag parsing stops after the terminator "--". Unlike the flag package, +flags can be interspersed with arguments anywhere on the command line +before this terminator. + +Integer flags accept 1234, 0664, 0x1234 and may be negative. +Boolean flags (in their long form) accept 1, 0, t, f, true, false, +TRUE, FALSE, True, False. +Duration flags accept any input valid for time.ParseDuration. + +The default set of command-line flags is controlled by +top-level functions. The FlagSet type allows one to define +independent sets of flags, such as to implement subcommands +in a command-line interface. The methods of FlagSet are +analogous to the top-level functions for the command-line +flag set. +*/ +package pflag + +import ( + "bytes" + "errors" + "fmt" + "io" + "os" + "sort" + "strings" +) + +// ErrHelp is the error returned if the flag -help is invoked but no such flag is defined. +var ErrHelp = errors.New("pflag: help requested") + +// ErrorHandling defines how to handle flag parsing errors. +type ErrorHandling int + +const ( + // ContinueOnError will return an err from Parse() if an error is found + ContinueOnError ErrorHandling = iota + // ExitOnError will call os.Exit(2) if an error is found when parsing + ExitOnError + // PanicOnError will panic() if an error is found when parsing flags + PanicOnError +) + +// NormalizedName is a flag name that has been normalized according to rules +// for the FlagSet (e.g. making '-' and '_' equivalent). +type NormalizedName string + +// A FlagSet represents a set of defined flags. +type FlagSet struct { + // Usage is the function called when an error occurs while parsing flags. + // The field is a function (not a method) that may be changed to point to + // a custom error handler. + Usage func() + + name string + parsed bool + actual map[NormalizedName]*Flag + formal map[NormalizedName]*Flag + shorthands map[byte]*Flag + args []string // arguments after flags + argsLenAtDash int // len(args) when a '--' was located when parsing, or -1 if no -- + exitOnError bool // does the program exit if there's an error? + errorHandling ErrorHandling + output io.Writer // nil means stderr; use out() accessor + interspersed bool // allow interspersed option/non-option args + normalizeNameFunc func(f *FlagSet, name string) NormalizedName +} + +// A Flag represents the state of a flag. +type Flag struct { + Name string // name as it appears on command line + Shorthand string // one-letter abbreviated flag + Usage string // help message + Value Value // value as set + DefValue string // default value (as text); for usage message + Changed bool // If the user set the value (or if left to default) + NoOptDefVal string //default value (as text); if the flag is on the command line without any options + Deprecated string // If this flag is deprecated, this string is the new or now thing to use + Hidden bool // used by cobra.Command to allow flags to be hidden from help/usage text + ShorthandDeprecated string // If the shorthand of this flag is deprecated, this string is the new or now thing to use + Annotations map[string][]string // used by cobra.Command bash autocomple code +} + +// Value is the interface to the dynamic value stored in a flag. +// (The default value is represented as a string.) +type Value interface { + String() string + Set(string) error + Type() string +} + +// sortFlags returns the flags as a slice in lexicographical sorted order. +func sortFlags(flags map[NormalizedName]*Flag) []*Flag { + list := make(sort.StringSlice, len(flags)) + i := 0 + for k := range flags { + list[i] = string(k) + i++ + } + list.Sort() + result := make([]*Flag, len(list)) + for i, name := range list { + result[i] = flags[NormalizedName(name)] + } + return result +} + +// SetNormalizeFunc allows you to add a function which can translate flag names. +// Flags added to the FlagSet will be translated and then when anything tries to +// look up the flag that will also be translated. So it would be possible to create +// a flag named "getURL" and have it translated to "geturl". A user could then pass +// "--getUrl" which may also be translated to "geturl" and everything will work. +func (f *FlagSet) SetNormalizeFunc(n func(f *FlagSet, name string) NormalizedName) { + f.normalizeNameFunc = n + for k, v := range f.formal { + delete(f.formal, k) + nname := f.normalizeFlagName(string(k)) + f.formal[nname] = v + v.Name = string(nname) + } +} + +// GetNormalizeFunc returns the previously set NormalizeFunc of a function which +// does no translation, if not set previously. +func (f *FlagSet) GetNormalizeFunc() func(f *FlagSet, name string) NormalizedName { + if f.normalizeNameFunc != nil { + return f.normalizeNameFunc + } + return func(f *FlagSet, name string) NormalizedName { return NormalizedName(name) } +} + +func (f *FlagSet) normalizeFlagName(name string) NormalizedName { + n := f.GetNormalizeFunc() + return n(f, name) +} + +func (f *FlagSet) out() io.Writer { + if f.output == nil { + return os.Stderr + } + return f.output +} + +// SetOutput sets the destination for usage and error messages. +// If output is nil, os.Stderr is used. +func (f *FlagSet) SetOutput(output io.Writer) { + f.output = output +} + +// VisitAll visits the flags in lexicographical order, calling fn for each. +// It visits all flags, even those not set. +func (f *FlagSet) VisitAll(fn func(*Flag)) { + for _, flag := range sortFlags(f.formal) { + fn(flag) + } +} + +// HasFlags returns a bool to indicate if the FlagSet has any flags definied. +func (f *FlagSet) HasFlags() bool { + return len(f.formal) > 0 +} + +// HasAvailableFlags returns a bool to indicate if the FlagSet has any flags +// definied that are not hidden or deprecated. +func (f *FlagSet) HasAvailableFlags() bool { + for _, flag := range f.formal { + if !flag.Hidden && len(flag.Deprecated) == 0 { + return true + } + } + return false +} + +// VisitAll visits the command-line flags in lexicographical order, calling +// fn for each. It visits all flags, even those not set. +func VisitAll(fn func(*Flag)) { + CommandLine.VisitAll(fn) +} + +// Visit visits the flags in lexicographical order, calling fn for each. +// It visits only those flags that have been set. +func (f *FlagSet) Visit(fn func(*Flag)) { + for _, flag := range sortFlags(f.actual) { + fn(flag) + } +} + +// Visit visits the command-line flags in lexicographical order, calling fn +// for each. It visits only those flags that have been set. +func Visit(fn func(*Flag)) { + CommandLine.Visit(fn) +} + +// Lookup returns the Flag structure of the named flag, returning nil if none exists. +func (f *FlagSet) Lookup(name string) *Flag { + return f.lookup(f.normalizeFlagName(name)) +} + +// lookup returns the Flag structure of the named flag, returning nil if none exists. +func (f *FlagSet) lookup(name NormalizedName) *Flag { + return f.formal[name] +} + +// func to return a given type for a given flag name +func (f *FlagSet) getFlagType(name string, ftype string, convFunc func(sval string) (interface{}, error)) (interface{}, error) { + flag := f.Lookup(name) + if flag == nil { + err := fmt.Errorf("flag accessed but not defined: %s", name) + return nil, err + } + + if flag.Value.Type() != ftype { + err := fmt.Errorf("trying to get %s value of flag of type %s", ftype, flag.Value.Type()) + return nil, err + } + + sval := flag.Value.String() + result, err := convFunc(sval) + if err != nil { + return nil, err + } + return result, nil +} + +// ArgsLenAtDash will return the length of f.Args at the moment when a -- was +// found during arg parsing. This allows your program to know which args were +// before the -- and which came after. +func (f *FlagSet) ArgsLenAtDash() int { + return f.argsLenAtDash +} + +// MarkDeprecated indicated that a flag is deprecated in your program. It will +// continue to function but will not show up in help or usage messages. Using +// this flag will also print the given usageMessage. +func (f *FlagSet) MarkDeprecated(name string, usageMessage string) error { + flag := f.Lookup(name) + if flag == nil { + return fmt.Errorf("flag %q does not exist", name) + } + if len(usageMessage) == 0 { + return fmt.Errorf("deprecated message for flag %q must be set", name) + } + flag.Deprecated = usageMessage + return nil +} + +// MarkShorthandDeprecated will mark the shorthand of a flag deprecated in your +// program. It will continue to function but will not show up in help or usage +// messages. Using this flag will also print the given usageMessage. +func (f *FlagSet) MarkShorthandDeprecated(name string, usageMessage string) error { + flag := f.Lookup(name) + if flag == nil { + return fmt.Errorf("flag %q does not exist", name) + } + if len(usageMessage) == 0 { + return fmt.Errorf("deprecated message for flag %q must be set", name) + } + flag.ShorthandDeprecated = usageMessage + return nil +} + +// MarkHidden sets a flag to 'hidden' in your program. It will continue to +// function but will not show up in help or usage messages. +func (f *FlagSet) MarkHidden(name string) error { + flag := f.Lookup(name) + if flag == nil { + return fmt.Errorf("flag %q does not exist", name) + } + flag.Hidden = true + return nil +} + +// Lookup returns the Flag structure of the named command-line flag, +// returning nil if none exists. +func Lookup(name string) *Flag { + return CommandLine.Lookup(name) +} + +// Set sets the value of the named flag. +func (f *FlagSet) Set(name, value string) error { + normalName := f.normalizeFlagName(name) + flag, ok := f.formal[normalName] + if !ok { + return fmt.Errorf("no such flag -%v", name) + } + err := flag.Value.Set(value) + if err != nil { + return err + } + if f.actual == nil { + f.actual = make(map[NormalizedName]*Flag) + } + f.actual[normalName] = flag + flag.Changed = true + if len(flag.Deprecated) > 0 { + fmt.Fprintf(os.Stderr, "Flag --%s has been deprecated, %s\n", flag.Name, flag.Deprecated) + } + return nil +} + +// SetAnnotation allows one to set arbitrary annotations on a flag in the FlagSet. +// This is sometimes used by spf13/cobra programs which want to generate additional +// bash completion information. +func (f *FlagSet) SetAnnotation(name, key string, values []string) error { + normalName := f.normalizeFlagName(name) + flag, ok := f.formal[normalName] + if !ok { + return fmt.Errorf("no such flag -%v", name) + } + if flag.Annotations == nil { + flag.Annotations = map[string][]string{} + } + flag.Annotations[key] = values + return nil +} + +// Changed returns true if the flag was explicitly set during Parse() and false +// otherwise +func (f *FlagSet) Changed(name string) bool { + flag := f.Lookup(name) + // If a flag doesn't exist, it wasn't changed.... + if flag == nil { + return false + } + return flag.Changed +} + +// Set sets the value of the named command-line flag. +func Set(name, value string) error { + return CommandLine.Set(name, value) +} + +// PrintDefaults prints, to standard error unless configured +// otherwise, the default values of all defined flags in the set. +func (f *FlagSet) PrintDefaults() { + usages := f.FlagUsages() + fmt.Fprintf(f.out(), "%s", usages) +} + +// isZeroValue guesses whether the string represents the zero +// value for a flag. It is not accurate but in practice works OK. +func isZeroValue(value string) bool { + switch value { + case "false": + return true + case "": + return true + case "": + return true + case "0": + return true + } + return false +} + +// UnquoteUsage extracts a back-quoted name from the usage +// string for a flag and returns it and the un-quoted usage. +// Given "a `name` to show" it returns ("name", "a name to show"). +// If there are no back quotes, the name is an educated guess of the +// type of the flag's value, or the empty string if the flag is boolean. +func UnquoteUsage(flag *Flag) (name string, usage string) { + // Look for a back-quoted name, but avoid the strings package. + usage = flag.Usage + for i := 0; i < len(usage); i++ { + if usage[i] == '`' { + for j := i + 1; j < len(usage); j++ { + if usage[j] == '`' { + name = usage[i+1 : j] + usage = usage[:i] + name + usage[j+1:] + return name, usage + } + } + break // Only one back quote; use type name. + } + } + // No explicit name, so use type if we can find one. + name = "value" + switch flag.Value.(type) { + case boolFlag: + name = "" + case *durationValue: + name = "duration" + case *float64Value: + name = "float" + case *intValue, *int64Value: + name = "int" + case *stringValue: + name = "string" + case *uintValue, *uint64Value: + name = "uint" + } + return +} + +// FlagUsages Returns a string containing the usage information for all flags in +// the FlagSet +func (f *FlagSet) FlagUsages() string { + x := new(bytes.Buffer) + + lines := make([]string, 0, len(f.formal)) + + maxlen := 0 + f.VisitAll(func(flag *Flag) { + if len(flag.Deprecated) > 0 || flag.Hidden { + return + } + + line := "" + if len(flag.Shorthand) > 0 && len(flag.ShorthandDeprecated) == 0 { + line = fmt.Sprintf(" -%s, --%s", flag.Shorthand, flag.Name) + } else { + line = fmt.Sprintf(" --%s", flag.Name) + } + + varname, usage := UnquoteUsage(flag) + if len(varname) > 0 { + line += " " + varname + } + if len(flag.NoOptDefVal) > 0 { + switch flag.Value.Type() { + case "string": + line += fmt.Sprintf("[=%q]", flag.NoOptDefVal) + case "bool": + if flag.NoOptDefVal != "true" { + line += fmt.Sprintf("[=%s]", flag.NoOptDefVal) + } + default: + line += fmt.Sprintf("[=%s]", flag.NoOptDefVal) + } + } + + // This special character will be replaced with spacing once the + // correct alignment is calculated + line += "\x00" + if len(line) > maxlen { + maxlen = len(line) + } + + line += usage + if !isZeroValue(flag.DefValue) { + if flag.Value.Type() == "string" { + line += fmt.Sprintf(" (default %q)", flag.DefValue) + } else { + line += fmt.Sprintf(" (default %s)", flag.DefValue) + } + } + + lines = append(lines, line) + }) + + for _, line := range lines { + sidx := strings.Index(line, "\x00") + spacing := strings.Repeat(" ", maxlen-sidx) + fmt.Fprintln(x, line[:sidx], spacing, line[sidx+1:]) + } + + return x.String() +} + +// PrintDefaults prints to standard error the default values of all defined command-line flags. +func PrintDefaults() { + CommandLine.PrintDefaults() +} + +// defaultUsage is the default function to print a usage message. +func defaultUsage(f *FlagSet) { + fmt.Fprintf(f.out(), "Usage of %s:\n", f.name) + f.PrintDefaults() +} + +// NOTE: Usage is not just defaultUsage(CommandLine) +// because it serves (via godoc flag Usage) as the example +// for how to write your own usage function. + +// Usage prints to standard error a usage message documenting all defined command-line flags. +// The function is a variable that may be changed to point to a custom function. +// By default it prints a simple header and calls PrintDefaults; for details about the +// format of the output and how to control it, see the documentation for PrintDefaults. +var Usage = func() { + fmt.Fprintf(os.Stderr, "Usage of %s:\n", os.Args[0]) + PrintDefaults() +} + +// NFlag returns the number of flags that have been set. +func (f *FlagSet) NFlag() int { return len(f.actual) } + +// NFlag returns the number of command-line flags that have been set. +func NFlag() int { return len(CommandLine.actual) } + +// Arg returns the i'th argument. Arg(0) is the first remaining argument +// after flags have been processed. +func (f *FlagSet) Arg(i int) string { + if i < 0 || i >= len(f.args) { + return "" + } + return f.args[i] +} + +// Arg returns the i'th command-line argument. Arg(0) is the first remaining argument +// after flags have been processed. +func Arg(i int) string { + return CommandLine.Arg(i) +} + +// NArg is the number of arguments remaining after flags have been processed. +func (f *FlagSet) NArg() int { return len(f.args) } + +// NArg is the number of arguments remaining after flags have been processed. +func NArg() int { return len(CommandLine.args) } + +// Args returns the non-flag arguments. +func (f *FlagSet) Args() []string { return f.args } + +// Args returns the non-flag command-line arguments. +func Args() []string { return CommandLine.args } + +// Var defines a flag with the specified name and usage string. The type and +// value of the flag are represented by the first argument, of type Value, which +// typically holds a user-defined implementation of Value. For instance, the +// caller could create a flag that turns a comma-separated string into a slice +// of strings by giving the slice the methods of Value; in particular, Set would +// decompose the comma-separated string into the slice. +func (f *FlagSet) Var(value Value, name string, usage string) { + f.VarP(value, name, "", usage) +} + +// VarPF is like VarP, but returns the flag created +func (f *FlagSet) VarPF(value Value, name, shorthand, usage string) *Flag { + // Remember the default value as a string; it won't change. + flag := &Flag{ + Name: name, + Shorthand: shorthand, + Usage: usage, + Value: value, + DefValue: value.String(), + } + f.AddFlag(flag) + return flag +} + +// VarP is like Var, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) VarP(value Value, name, shorthand, usage string) { + _ = f.VarPF(value, name, shorthand, usage) +} + +// AddFlag will add the flag to the FlagSet +func (f *FlagSet) AddFlag(flag *Flag) { + // Call normalizeFlagName function only once + normalizedFlagName := f.normalizeFlagName(flag.Name) + + _, alreadythere := f.formal[normalizedFlagName] + if alreadythere { + msg := fmt.Sprintf("%s flag redefined: %s", f.name, flag.Name) + fmt.Fprintln(f.out(), msg) + panic(msg) // Happens only if flags are declared with identical names + } + if f.formal == nil { + f.formal = make(map[NormalizedName]*Flag) + } + + flag.Name = string(normalizedFlagName) + f.formal[normalizedFlagName] = flag + + if len(flag.Shorthand) == 0 { + return + } + if len(flag.Shorthand) > 1 { + fmt.Fprintf(f.out(), "%s shorthand more than ASCII character: %s\n", f.name, flag.Shorthand) + panic("shorthand is more than one character") + } + if f.shorthands == nil { + f.shorthands = make(map[byte]*Flag) + } + c := flag.Shorthand[0] + old, alreadythere := f.shorthands[c] + if alreadythere { + fmt.Fprintf(f.out(), "%s shorthand reused: %q for %s already used for %s\n", f.name, c, flag.Name, old.Name) + panic("shorthand redefinition") + } + f.shorthands[c] = flag +} + +// AddFlagSet adds one FlagSet to another. If a flag is already present in f +// the flag from newSet will be ignored +func (f *FlagSet) AddFlagSet(newSet *FlagSet) { + if newSet == nil { + return + } + newSet.VisitAll(func(flag *Flag) { + if f.Lookup(flag.Name) == nil { + f.AddFlag(flag) + } + }) +} + +// Var defines a flag with the specified name and usage string. The type and +// value of the flag are represented by the first argument, of type Value, which +// typically holds a user-defined implementation of Value. For instance, the +// caller could create a flag that turns a comma-separated string into a slice +// of strings by giving the slice the methods of Value; in particular, Set would +// decompose the comma-separated string into the slice. +func Var(value Value, name string, usage string) { + CommandLine.VarP(value, name, "", usage) +} + +// VarP is like Var, but accepts a shorthand letter that can be used after a single dash. +func VarP(value Value, name, shorthand, usage string) { + CommandLine.VarP(value, name, shorthand, usage) +} + +// failf prints to standard error a formatted error and usage message and +// returns the error. +func (f *FlagSet) failf(format string, a ...interface{}) error { + err := fmt.Errorf(format, a...) + fmt.Fprintln(f.out(), err) + f.usage() + return err +} + +// usage calls the Usage method for the flag set, or the usage function if +// the flag set is CommandLine. +func (f *FlagSet) usage() { + if f == CommandLine { + Usage() + } else if f.Usage == nil { + defaultUsage(f) + } else { + f.Usage() + } +} + +func (f *FlagSet) setFlag(flag *Flag, value string, origArg string) error { + if err := flag.Value.Set(value); err != nil { + return f.failf("invalid argument %q for %s: %v", value, origArg, err) + } + // mark as visited for Visit() + if f.actual == nil { + f.actual = make(map[NormalizedName]*Flag) + } + f.actual[f.normalizeFlagName(flag.Name)] = flag + flag.Changed = true + if len(flag.Deprecated) > 0 { + fmt.Fprintf(os.Stderr, "Flag --%s has been deprecated, %s\n", flag.Name, flag.Deprecated) + } + if len(flag.ShorthandDeprecated) > 0 && containsShorthand(origArg, flag.Shorthand) { + fmt.Fprintf(os.Stderr, "Flag shorthand -%s has been deprecated, %s\n", flag.Shorthand, flag.ShorthandDeprecated) + } + return nil +} + +func containsShorthand(arg, shorthand string) bool { + // filter out flags -- + if strings.HasPrefix(arg, "-") { + return false + } + arg = strings.SplitN(arg, "=", 2)[0] + return strings.Contains(arg, shorthand) +} + +func (f *FlagSet) parseLongArg(s string, args []string) (a []string, err error) { + a = args + name := s[2:] + if len(name) == 0 || name[0] == '-' || name[0] == '=' { + err = f.failf("bad flag syntax: %s", s) + return + } + split := strings.SplitN(name, "=", 2) + name = split[0] + flag, alreadythere := f.formal[f.normalizeFlagName(name)] + if !alreadythere { + if name == "help" { // special case for nice help message. + f.usage() + return a, ErrHelp + } + err = f.failf("unknown flag: --%s", name) + return + } + var value string + if len(split) == 2 { + // '--flag=arg' + value = split[1] + } else if len(flag.NoOptDefVal) > 0 { + // '--flag' (arg was optional) + value = flag.NoOptDefVal + } else if len(a) > 0 { + // '--flag arg' + value = a[0] + a = a[1:] + } else { + // '--flag' (arg was required) + err = f.failf("flag needs an argument: %s", s) + return + } + err = f.setFlag(flag, value, s) + return +} + +func (f *FlagSet) parseSingleShortArg(shorthands string, args []string) (outShorts string, outArgs []string, err error) { + if strings.HasPrefix(shorthands, "test.") { + return + } + outArgs = args + outShorts = shorthands[1:] + c := shorthands[0] + + flag, alreadythere := f.shorthands[c] + if !alreadythere { + if c == 'h' { // special case for nice help message. + f.usage() + err = ErrHelp + return + } + //TODO continue on error + err = f.failf("unknown shorthand flag: %q in -%s", c, shorthands) + return + } + var value string + if len(shorthands) > 2 && shorthands[1] == '=' { + value = shorthands[2:] + outShorts = "" + } else if len(flag.NoOptDefVal) > 0 { + value = flag.NoOptDefVal + } else if len(shorthands) > 1 { + value = shorthands[1:] + outShorts = "" + } else if len(args) > 0 { + value = args[0] + outArgs = args[1:] + } else { + err = f.failf("flag needs an argument: %q in -%s", c, shorthands) + return + } + err = f.setFlag(flag, value, shorthands) + return +} + +func (f *FlagSet) parseShortArg(s string, args []string) (a []string, err error) { + a = args + shorthands := s[1:] + + for len(shorthands) > 0 { + shorthands, a, err = f.parseSingleShortArg(shorthands, args) + if err != nil { + return + } + } + + return +} + +func (f *FlagSet) parseArgs(args []string) (err error) { + for len(args) > 0 { + s := args[0] + args = args[1:] + if len(s) == 0 || s[0] != '-' || len(s) == 1 { + if !f.interspersed { + f.args = append(f.args, s) + f.args = append(f.args, args...) + return nil + } + f.args = append(f.args, s) + continue + } + + if s[1] == '-' { + if len(s) == 2 { // "--" terminates the flags + f.argsLenAtDash = len(f.args) + f.args = append(f.args, args...) + break + } + args, err = f.parseLongArg(s, args) + } else { + args, err = f.parseShortArg(s, args) + } + if err != nil { + return + } + } + return +} + +// Parse parses flag definitions from the argument list, which should not +// include the command name. Must be called after all flags in the FlagSet +// are defined and before flags are accessed by the program. +// The return value will be ErrHelp if -help was set but not defined. +func (f *FlagSet) Parse(arguments []string) error { + f.parsed = true + f.args = make([]string, 0, len(arguments)) + err := f.parseArgs(arguments) + if err != nil { + switch f.errorHandling { + case ContinueOnError: + return err + case ExitOnError: + os.Exit(2) + case PanicOnError: + panic(err) + } + } + return nil +} + +// Parsed reports whether f.Parse has been called. +func (f *FlagSet) Parsed() bool { + return f.parsed +} + +// Parse parses the command-line flags from os.Args[1:]. Must be called +// after all flags are defined and before flags are accessed by the program. +func Parse() { + // Ignore errors; CommandLine is set for ExitOnError. + CommandLine.Parse(os.Args[1:]) +} + +// SetInterspersed sets whether to support interspersed option/non-option arguments. +func SetInterspersed(interspersed bool) { + CommandLine.SetInterspersed(interspersed) +} + +// Parsed returns true if the command-line flags have been parsed. +func Parsed() bool { + return CommandLine.Parsed() +} + +// CommandLine is the default set of command-line flags, parsed from os.Args. +var CommandLine = NewFlagSet(os.Args[0], ExitOnError) + +// NewFlagSet returns a new, empty flag set with the specified name and +// error handling property. +func NewFlagSet(name string, errorHandling ErrorHandling) *FlagSet { + f := &FlagSet{ + name: name, + errorHandling: errorHandling, + argsLenAtDash: -1, + interspersed: true, + } + return f +} + +// SetInterspersed sets whether to support interspersed option/non-option arguments. +func (f *FlagSet) SetInterspersed(interspersed bool) { + f.interspersed = interspersed +} + +// Init sets the name and error handling property for a flag set. +// By default, the zero FlagSet uses an empty name and the +// ContinueOnError error handling policy. +func (f *FlagSet) Init(name string, errorHandling ErrorHandling) { + f.name = name + f.errorHandling = errorHandling + f.argsLenAtDash = -1 +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/float32.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/float32.go new file mode 100644 index 0000000000000..7683fae1b14ac --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/float32.go @@ -0,0 +1,91 @@ +package pflag + +import ( + "fmt" + "strconv" +) + +// -- float32 Value +type float32Value float32 + +func newFloat32Value(val float32, p *float32) *float32Value { + *p = val + return (*float32Value)(p) +} + +func (f *float32Value) Set(s string) error { + v, err := strconv.ParseFloat(s, 32) + *f = float32Value(v) + return err +} + +func (f *float32Value) Type() string { + return "float32" +} + +func (f *float32Value) String() string { return fmt.Sprintf("%v", *f) } + +func float32Conv(sval string) (interface{}, error) { + v, err := strconv.ParseFloat(sval, 32) + if err != nil { + return 0, err + } + return float32(v), nil +} + +// GetFloat32 return the float32 value of a flag with the given name +func (f *FlagSet) GetFloat32(name string) (float32, error) { + val, err := f.getFlagType(name, "float32", float32Conv) + if err != nil { + return 0, err + } + return val.(float32), nil +} + +// Float32Var defines a float32 flag with specified name, default value, and usage string. +// The argument p points to a float32 variable in which to store the value of the flag. +func (f *FlagSet) Float32Var(p *float32, name string, value float32, usage string) { + f.VarP(newFloat32Value(value, p), name, "", usage) +} + +// Float32VarP is like Float32Var, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Float32VarP(p *float32, name, shorthand string, value float32, usage string) { + f.VarP(newFloat32Value(value, p), name, shorthand, usage) +} + +// Float32Var defines a float32 flag with specified name, default value, and usage string. +// The argument p points to a float32 variable in which to store the value of the flag. +func Float32Var(p *float32, name string, value float32, usage string) { + CommandLine.VarP(newFloat32Value(value, p), name, "", usage) +} + +// Float32VarP is like Float32Var, but accepts a shorthand letter that can be used after a single dash. +func Float32VarP(p *float32, name, shorthand string, value float32, usage string) { + CommandLine.VarP(newFloat32Value(value, p), name, shorthand, usage) +} + +// Float32 defines a float32 flag with specified name, default value, and usage string. +// The return value is the address of a float32 variable that stores the value of the flag. +func (f *FlagSet) Float32(name string, value float32, usage string) *float32 { + p := new(float32) + f.Float32VarP(p, name, "", value, usage) + return p +} + +// Float32P is like Float32, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Float32P(name, shorthand string, value float32, usage string) *float32 { + p := new(float32) + f.Float32VarP(p, name, shorthand, value, usage) + return p +} + +// Float32 defines a float32 flag with specified name, default value, and usage string. +// The return value is the address of a float32 variable that stores the value of the flag. +func Float32(name string, value float32, usage string) *float32 { + return CommandLine.Float32P(name, "", value, usage) +} + +// Float32P is like Float32, but accepts a shorthand letter that can be used after a single dash. +func Float32P(name, shorthand string, value float32, usage string) *float32 { + return CommandLine.Float32P(name, shorthand, value, usage) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/float64.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/float64.go new file mode 100644 index 0000000000000..50fbf8cc1a18f --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/float64.go @@ -0,0 +1,87 @@ +package pflag + +import ( + "fmt" + "strconv" +) + +// -- float64 Value +type float64Value float64 + +func newFloat64Value(val float64, p *float64) *float64Value { + *p = val + return (*float64Value)(p) +} + +func (f *float64Value) Set(s string) error { + v, err := strconv.ParseFloat(s, 64) + *f = float64Value(v) + return err +} + +func (f *float64Value) Type() string { + return "float64" +} + +func (f *float64Value) String() string { return fmt.Sprintf("%v", *f) } + +func float64Conv(sval string) (interface{}, error) { + return strconv.ParseFloat(sval, 64) +} + +// GetFloat64 return the float64 value of a flag with the given name +func (f *FlagSet) GetFloat64(name string) (float64, error) { + val, err := f.getFlagType(name, "float64", float64Conv) + if err != nil { + return 0, err + } + return val.(float64), nil +} + +// Float64Var defines a float64 flag with specified name, default value, and usage string. +// The argument p points to a float64 variable in which to store the value of the flag. +func (f *FlagSet) Float64Var(p *float64, name string, value float64, usage string) { + f.VarP(newFloat64Value(value, p), name, "", usage) +} + +// Float64VarP is like Float64Var, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Float64VarP(p *float64, name, shorthand string, value float64, usage string) { + f.VarP(newFloat64Value(value, p), name, shorthand, usage) +} + +// Float64Var defines a float64 flag with specified name, default value, and usage string. +// The argument p points to a float64 variable in which to store the value of the flag. +func Float64Var(p *float64, name string, value float64, usage string) { + CommandLine.VarP(newFloat64Value(value, p), name, "", usage) +} + +// Float64VarP is like Float64Var, but accepts a shorthand letter that can be used after a single dash. +func Float64VarP(p *float64, name, shorthand string, value float64, usage string) { + CommandLine.VarP(newFloat64Value(value, p), name, shorthand, usage) +} + +// Float64 defines a float64 flag with specified name, default value, and usage string. +// The return value is the address of a float64 variable that stores the value of the flag. +func (f *FlagSet) Float64(name string, value float64, usage string) *float64 { + p := new(float64) + f.Float64VarP(p, name, "", value, usage) + return p +} + +// Float64P is like Float64, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Float64P(name, shorthand string, value float64, usage string) *float64 { + p := new(float64) + f.Float64VarP(p, name, shorthand, value, usage) + return p +} + +// Float64 defines a float64 flag with specified name, default value, and usage string. +// The return value is the address of a float64 variable that stores the value of the flag. +func Float64(name string, value float64, usage string) *float64 { + return CommandLine.Float64P(name, "", value, usage) +} + +// Float64P is like Float64, but accepts a shorthand letter that can be used after a single dash. +func Float64P(name, shorthand string, value float64, usage string) *float64 { + return CommandLine.Float64P(name, shorthand, value, usage) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/golangflag.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/golangflag.go new file mode 100644 index 0000000000000..b056147fd8766 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/golangflag.go @@ -0,0 +1,104 @@ +// 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. + +package pflag + +import ( + goflag "flag" + "fmt" + "reflect" + "strings" +) + +var _ = fmt.Print + +// flagValueWrapper implements pflag.Value around a flag.Value. The main +// difference here is the addition of the Type method that returns a string +// name of the type. As this is generally unknown, we approximate that with +// reflection. +type flagValueWrapper struct { + inner goflag.Value + flagType string +} + +// We are just copying the boolFlag interface out of goflag as that is what +// they use to decide if a flag should get "true" when no arg is given. +type goBoolFlag interface { + goflag.Value + IsBoolFlag() bool +} + +func wrapFlagValue(v goflag.Value) Value { + // If the flag.Value happens to also be a pflag.Value, just use it directly. + if pv, ok := v.(Value); ok { + return pv + } + + pv := &flagValueWrapper{ + inner: v, + } + + t := reflect.TypeOf(v) + if t.Kind() == reflect.Interface || t.Kind() == reflect.Ptr { + t = t.Elem() + } + + pv.flagType = strings.TrimSuffix(t.Name(), "Value") + return pv +} + +func (v *flagValueWrapper) String() string { + return v.inner.String() +} + +func (v *flagValueWrapper) Set(s string) error { + return v.inner.Set(s) +} + +func (v *flagValueWrapper) Type() string { + return v.flagType +} + +// PFlagFromGoFlag will return a *pflag.Flag given a *flag.Flag +// If the *flag.Flag.Name was a single character (ex: `v`) it will be accessiblei +// with both `-v` and `--v` in flags. If the golang flag was more than a single +// character (ex: `verbose`) it will only be accessible via `--verbose` +func PFlagFromGoFlag(goflag *goflag.Flag) *Flag { + // Remember the default value as a string; it won't change. + flag := &Flag{ + Name: goflag.Name, + Usage: goflag.Usage, + Value: wrapFlagValue(goflag.Value), + // Looks like golang flags don't set DefValue correctly :-( + //DefValue: goflag.DefValue, + DefValue: goflag.Value.String(), + } + // Ex: if the golang flag was -v, allow both -v and --v to work + if len(flag.Name) == 1 { + flag.Shorthand = flag.Name + } + if fv, ok := goflag.Value.(goBoolFlag); ok && fv.IsBoolFlag() { + flag.NoOptDefVal = "true" + } + return flag +} + +// AddGoFlag will add the given *flag.Flag to the pflag.FlagSet +func (f *FlagSet) AddGoFlag(goflag *goflag.Flag) { + if f.Lookup(goflag.Name) != nil { + return + } + newflag := PFlagFromGoFlag(goflag) + f.AddFlag(newflag) +} + +// AddGoFlagSet will add the given *flag.FlagSet to the pflag.FlagSet +func (f *FlagSet) AddGoFlagSet(newSet *goflag.FlagSet) { + if newSet == nil { + return + } + newSet.VisitAll(func(goflag *goflag.Flag) { + f.AddGoFlag(goflag) + }) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/int.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/int.go new file mode 100644 index 0000000000000..b6560368a911b --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/int.go @@ -0,0 +1,87 @@ +package pflag + +import ( + "fmt" + "strconv" +) + +// -- int Value +type intValue int + +func newIntValue(val int, p *int) *intValue { + *p = val + return (*intValue)(p) +} + +func (i *intValue) Set(s string) error { + v, err := strconv.ParseInt(s, 0, 64) + *i = intValue(v) + return err +} + +func (i *intValue) Type() string { + return "int" +} + +func (i *intValue) String() string { return fmt.Sprintf("%v", *i) } + +func intConv(sval string) (interface{}, error) { + return strconv.Atoi(sval) +} + +// GetInt return the int value of a flag with the given name +func (f *FlagSet) GetInt(name string) (int, error) { + val, err := f.getFlagType(name, "int", intConv) + if err != nil { + return 0, err + } + return val.(int), nil +} + +// IntVar defines an int flag with specified name, default value, and usage string. +// The argument p points to an int variable in which to store the value of the flag. +func (f *FlagSet) IntVar(p *int, name string, value int, usage string) { + f.VarP(newIntValue(value, p), name, "", usage) +} + +// IntVarP is like IntVar, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) IntVarP(p *int, name, shorthand string, value int, usage string) { + f.VarP(newIntValue(value, p), name, shorthand, usage) +} + +// IntVar defines an int flag with specified name, default value, and usage string. +// The argument p points to an int variable in which to store the value of the flag. +func IntVar(p *int, name string, value int, usage string) { + CommandLine.VarP(newIntValue(value, p), name, "", usage) +} + +// IntVarP is like IntVar, but accepts a shorthand letter that can be used after a single dash. +func IntVarP(p *int, name, shorthand string, value int, usage string) { + CommandLine.VarP(newIntValue(value, p), name, shorthand, usage) +} + +// Int defines an int flag with specified name, default value, and usage string. +// The return value is the address of an int variable that stores the value of the flag. +func (f *FlagSet) Int(name string, value int, usage string) *int { + p := new(int) + f.IntVarP(p, name, "", value, usage) + return p +} + +// IntP is like Int, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) IntP(name, shorthand string, value int, usage string) *int { + p := new(int) + f.IntVarP(p, name, shorthand, value, usage) + return p +} + +// Int defines an int flag with specified name, default value, and usage string. +// The return value is the address of an int variable that stores the value of the flag. +func Int(name string, value int, usage string) *int { + return CommandLine.IntP(name, "", value, usage) +} + +// IntP is like Int, but accepts a shorthand letter that can be used after a single dash. +func IntP(name, shorthand string, value int, usage string) *int { + return CommandLine.IntP(name, shorthand, value, usage) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/int32.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/int32.go new file mode 100644 index 0000000000000..41659a9aff3a7 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/int32.go @@ -0,0 +1,91 @@ +package pflag + +import ( + "fmt" + "strconv" +) + +// -- int32 Value +type int32Value int32 + +func newInt32Value(val int32, p *int32) *int32Value { + *p = val + return (*int32Value)(p) +} + +func (i *int32Value) Set(s string) error { + v, err := strconv.ParseInt(s, 0, 32) + *i = int32Value(v) + return err +} + +func (i *int32Value) Type() string { + return "int32" +} + +func (i *int32Value) String() string { return fmt.Sprintf("%v", *i) } + +func int32Conv(sval string) (interface{}, error) { + v, err := strconv.ParseInt(sval, 0, 32) + if err != nil { + return 0, err + } + return int32(v), nil +} + +// GetInt32 return the int32 value of a flag with the given name +func (f *FlagSet) GetInt32(name string) (int32, error) { + val, err := f.getFlagType(name, "int32", int32Conv) + if err != nil { + return 0, err + } + return val.(int32), nil +} + +// Int32Var defines an int32 flag with specified name, default value, and usage string. +// The argument p points to an int32 variable in which to store the value of the flag. +func (f *FlagSet) Int32Var(p *int32, name string, value int32, usage string) { + f.VarP(newInt32Value(value, p), name, "", usage) +} + +// Int32VarP is like Int32Var, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Int32VarP(p *int32, name, shorthand string, value int32, usage string) { + f.VarP(newInt32Value(value, p), name, shorthand, usage) +} + +// Int32Var defines an int32 flag with specified name, default value, and usage string. +// The argument p points to an int32 variable in which to store the value of the flag. +func Int32Var(p *int32, name string, value int32, usage string) { + CommandLine.VarP(newInt32Value(value, p), name, "", usage) +} + +// Int32VarP is like Int32Var, but accepts a shorthand letter that can be used after a single dash. +func Int32VarP(p *int32, name, shorthand string, value int32, usage string) { + CommandLine.VarP(newInt32Value(value, p), name, shorthand, usage) +} + +// Int32 defines an int32 flag with specified name, default value, and usage string. +// The return value is the address of an int32 variable that stores the value of the flag. +func (f *FlagSet) Int32(name string, value int32, usage string) *int32 { + p := new(int32) + f.Int32VarP(p, name, "", value, usage) + return p +} + +// Int32P is like Int32, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Int32P(name, shorthand string, value int32, usage string) *int32 { + p := new(int32) + f.Int32VarP(p, name, shorthand, value, usage) + return p +} + +// Int32 defines an int32 flag with specified name, default value, and usage string. +// The return value is the address of an int32 variable that stores the value of the flag. +func Int32(name string, value int32, usage string) *int32 { + return CommandLine.Int32P(name, "", value, usage) +} + +// Int32P is like Int32, but accepts a shorthand letter that can be used after a single dash. +func Int32P(name, shorthand string, value int32, usage string) *int32 { + return CommandLine.Int32P(name, shorthand, value, usage) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/int64.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/int64.go new file mode 100644 index 0000000000000..6e67e380f4623 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/int64.go @@ -0,0 +1,87 @@ +package pflag + +import ( + "fmt" + "strconv" +) + +// -- int64 Value +type int64Value int64 + +func newInt64Value(val int64, p *int64) *int64Value { + *p = val + return (*int64Value)(p) +} + +func (i *int64Value) Set(s string) error { + v, err := strconv.ParseInt(s, 0, 64) + *i = int64Value(v) + return err +} + +func (i *int64Value) Type() string { + return "int64" +} + +func (i *int64Value) String() string { return fmt.Sprintf("%v", *i) } + +func int64Conv(sval string) (interface{}, error) { + return strconv.ParseInt(sval, 0, 64) +} + +// GetInt64 return the int64 value of a flag with the given name +func (f *FlagSet) GetInt64(name string) (int64, error) { + val, err := f.getFlagType(name, "int64", int64Conv) + if err != nil { + return 0, err + } + return val.(int64), nil +} + +// Int64Var defines an int64 flag with specified name, default value, and usage string. +// The argument p points to an int64 variable in which to store the value of the flag. +func (f *FlagSet) Int64Var(p *int64, name string, value int64, usage string) { + f.VarP(newInt64Value(value, p), name, "", usage) +} + +// Int64VarP is like Int64Var, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Int64VarP(p *int64, name, shorthand string, value int64, usage string) { + f.VarP(newInt64Value(value, p), name, shorthand, usage) +} + +// Int64Var defines an int64 flag with specified name, default value, and usage string. +// The argument p points to an int64 variable in which to store the value of the flag. +func Int64Var(p *int64, name string, value int64, usage string) { + CommandLine.VarP(newInt64Value(value, p), name, "", usage) +} + +// Int64VarP is like Int64Var, but accepts a shorthand letter that can be used after a single dash. +func Int64VarP(p *int64, name, shorthand string, value int64, usage string) { + CommandLine.VarP(newInt64Value(value, p), name, shorthand, usage) +} + +// Int64 defines an int64 flag with specified name, default value, and usage string. +// The return value is the address of an int64 variable that stores the value of the flag. +func (f *FlagSet) Int64(name string, value int64, usage string) *int64 { + p := new(int64) + f.Int64VarP(p, name, "", value, usage) + return p +} + +// Int64P is like Int64, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Int64P(name, shorthand string, value int64, usage string) *int64 { + p := new(int64) + f.Int64VarP(p, name, shorthand, value, usage) + return p +} + +// Int64 defines an int64 flag with specified name, default value, and usage string. +// The return value is the address of an int64 variable that stores the value of the flag. +func Int64(name string, value int64, usage string) *int64 { + return CommandLine.Int64P(name, "", value, usage) +} + +// Int64P is like Int64, but accepts a shorthand letter that can be used after a single dash. +func Int64P(name, shorthand string, value int64, usage string) *int64 { + return CommandLine.Int64P(name, shorthand, value, usage) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/int8.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/int8.go new file mode 100644 index 0000000000000..400db21f5e932 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/int8.go @@ -0,0 +1,91 @@ +package pflag + +import ( + "fmt" + "strconv" +) + +// -- int8 Value +type int8Value int8 + +func newInt8Value(val int8, p *int8) *int8Value { + *p = val + return (*int8Value)(p) +} + +func (i *int8Value) Set(s string) error { + v, err := strconv.ParseInt(s, 0, 8) + *i = int8Value(v) + return err +} + +func (i *int8Value) Type() string { + return "int8" +} + +func (i *int8Value) String() string { return fmt.Sprintf("%v", *i) } + +func int8Conv(sval string) (interface{}, error) { + v, err := strconv.ParseInt(sval, 0, 8) + if err != nil { + return 0, err + } + return int8(v), nil +} + +// GetInt8 return the int8 value of a flag with the given name +func (f *FlagSet) GetInt8(name string) (int8, error) { + val, err := f.getFlagType(name, "int8", int8Conv) + if err != nil { + return 0, err + } + return val.(int8), nil +} + +// Int8Var defines an int8 flag with specified name, default value, and usage string. +// The argument p points to an int8 variable in which to store the value of the flag. +func (f *FlagSet) Int8Var(p *int8, name string, value int8, usage string) { + f.VarP(newInt8Value(value, p), name, "", usage) +} + +// Int8VarP is like Int8Var, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Int8VarP(p *int8, name, shorthand string, value int8, usage string) { + f.VarP(newInt8Value(value, p), name, shorthand, usage) +} + +// Int8Var defines an int8 flag with specified name, default value, and usage string. +// The argument p points to an int8 variable in which to store the value of the flag. +func Int8Var(p *int8, name string, value int8, usage string) { + CommandLine.VarP(newInt8Value(value, p), name, "", usage) +} + +// Int8VarP is like Int8Var, but accepts a shorthand letter that can be used after a single dash. +func Int8VarP(p *int8, name, shorthand string, value int8, usage string) { + CommandLine.VarP(newInt8Value(value, p), name, shorthand, usage) +} + +// Int8 defines an int8 flag with specified name, default value, and usage string. +// The return value is the address of an int8 variable that stores the value of the flag. +func (f *FlagSet) Int8(name string, value int8, usage string) *int8 { + p := new(int8) + f.Int8VarP(p, name, "", value, usage) + return p +} + +// Int8P is like Int8, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Int8P(name, shorthand string, value int8, usage string) *int8 { + p := new(int8) + f.Int8VarP(p, name, shorthand, value, usage) + return p +} + +// Int8 defines an int8 flag with specified name, default value, and usage string. +// The return value is the address of an int8 variable that stores the value of the flag. +func Int8(name string, value int8, usage string) *int8 { + return CommandLine.Int8P(name, "", value, usage) +} + +// Int8P is like Int8, but accepts a shorthand letter that can be used after a single dash. +func Int8P(name, shorthand string, value int8, usage string) *int8 { + return CommandLine.Int8P(name, shorthand, value, usage) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/int_slice.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/int_slice.go new file mode 100644 index 0000000000000..1e7c9edde955c --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/int_slice.go @@ -0,0 +1,128 @@ +package pflag + +import ( + "fmt" + "strconv" + "strings" +) + +// -- intSlice Value +type intSliceValue struct { + value *[]int + changed bool +} + +func newIntSliceValue(val []int, p *[]int) *intSliceValue { + isv := new(intSliceValue) + isv.value = p + *isv.value = val + return isv +} + +func (s *intSliceValue) Set(val string) error { + ss := strings.Split(val, ",") + out := make([]int, len(ss)) + for i, d := range ss { + var err error + out[i], err = strconv.Atoi(d) + if err != nil { + return err + } + + } + if !s.changed { + *s.value = out + } else { + *s.value = append(*s.value, out...) + } + s.changed = true + return nil +} + +func (s *intSliceValue) Type() string { + return "intSlice" +} + +func (s *intSliceValue) String() string { + out := make([]string, len(*s.value)) + for i, d := range *s.value { + out[i] = fmt.Sprintf("%d", d) + } + return "[" + strings.Join(out, ",") + "]" +} + +func intSliceConv(val string) (interface{}, error) { + val = strings.Trim(val, "[]") + // Empty string would cause a slice with one (empty) entry + if len(val) == 0 { + return []int{}, nil + } + ss := strings.Split(val, ",") + out := make([]int, len(ss)) + for i, d := range ss { + var err error + out[i], err = strconv.Atoi(d) + if err != nil { + return nil, err + } + + } + return out, nil +} + +// GetIntSlice return the []int value of a flag with the given name +func (f *FlagSet) GetIntSlice(name string) ([]int, error) { + val, err := f.getFlagType(name, "intSlice", intSliceConv) + if err != nil { + return []int{}, err + } + return val.([]int), nil +} + +// IntSliceVar defines a intSlice flag with specified name, default value, and usage string. +// The argument p points to a []int variable in which to store the value of the flag. +func (f *FlagSet) IntSliceVar(p *[]int, name string, value []int, usage string) { + f.VarP(newIntSliceValue(value, p), name, "", usage) +} + +// IntSliceVarP is like IntSliceVar, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) IntSliceVarP(p *[]int, name, shorthand string, value []int, usage string) { + f.VarP(newIntSliceValue(value, p), name, shorthand, usage) +} + +// IntSliceVar defines a int[] flag with specified name, default value, and usage string. +// The argument p points to a int[] variable in which to store the value of the flag. +func IntSliceVar(p *[]int, name string, value []int, usage string) { + CommandLine.VarP(newIntSliceValue(value, p), name, "", usage) +} + +// IntSliceVarP is like IntSliceVar, but accepts a shorthand letter that can be used after a single dash. +func IntSliceVarP(p *[]int, name, shorthand string, value []int, usage string) { + CommandLine.VarP(newIntSliceValue(value, p), name, shorthand, usage) +} + +// IntSlice defines a []int flag with specified name, default value, and usage string. +// The return value is the address of a []int variable that stores the value of the flag. +func (f *FlagSet) IntSlice(name string, value []int, usage string) *[]int { + p := []int{} + f.IntSliceVarP(&p, name, "", value, usage) + return &p +} + +// IntSliceP is like IntSlice, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) IntSliceP(name, shorthand string, value []int, usage string) *[]int { + p := []int{} + f.IntSliceVarP(&p, name, shorthand, value, usage) + return &p +} + +// IntSlice defines a []int flag with specified name, default value, and usage string. +// The return value is the address of a []int variable that stores the value of the flag. +func IntSlice(name string, value []int, usage string) *[]int { + return CommandLine.IntSliceP(name, "", value, usage) +} + +// IntSliceP is like IntSlice, but accepts a shorthand letter that can be used after a single dash. +func IntSliceP(name, shorthand string, value []int, usage string) *[]int { + return CommandLine.IntSliceP(name, shorthand, value, usage) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/ip.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/ip.go new file mode 100644 index 0000000000000..88a17430a09b0 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/ip.go @@ -0,0 +1,96 @@ +package pflag + +import ( + "fmt" + "net" + "strings" +) + +var _ = strings.TrimSpace + +// -- net.IP value +type ipValue net.IP + +func newIPValue(val net.IP, p *net.IP) *ipValue { + *p = val + return (*ipValue)(p) +} + +func (i *ipValue) String() string { return net.IP(*i).String() } +func (i *ipValue) Set(s string) error { + ip := net.ParseIP(strings.TrimSpace(s)) + if ip == nil { + return fmt.Errorf("failed to parse IP: %q", s) + } + *i = ipValue(ip) + return nil +} + +func (i *ipValue) Type() string { + return "ip" +} + +func ipConv(sval string) (interface{}, error) { + ip := net.ParseIP(sval) + if ip != nil { + return ip, nil + } + return nil, fmt.Errorf("invalid string being converted to IP address: %s", sval) +} + +// GetIP return the net.IP value of a flag with the given name +func (f *FlagSet) GetIP(name string) (net.IP, error) { + val, err := f.getFlagType(name, "ip", ipConv) + if err != nil { + return nil, err + } + return val.(net.IP), nil +} + +// IPVar defines an net.IP flag with specified name, default value, and usage string. +// The argument p points to an net.IP variable in which to store the value of the flag. +func (f *FlagSet) IPVar(p *net.IP, name string, value net.IP, usage string) { + f.VarP(newIPValue(value, p), name, "", usage) +} + +// IPVarP is like IPVar, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) IPVarP(p *net.IP, name, shorthand string, value net.IP, usage string) { + f.VarP(newIPValue(value, p), name, shorthand, usage) +} + +// IPVar defines an net.IP flag with specified name, default value, and usage string. +// The argument p points to an net.IP variable in which to store the value of the flag. +func IPVar(p *net.IP, name string, value net.IP, usage string) { + CommandLine.VarP(newIPValue(value, p), name, "", usage) +} + +// IPVarP is like IPVar, but accepts a shorthand letter that can be used after a single dash. +func IPVarP(p *net.IP, name, shorthand string, value net.IP, usage string) { + CommandLine.VarP(newIPValue(value, p), name, shorthand, usage) +} + +// IP defines an net.IP flag with specified name, default value, and usage string. +// The return value is the address of an net.IP variable that stores the value of the flag. +func (f *FlagSet) IP(name string, value net.IP, usage string) *net.IP { + p := new(net.IP) + f.IPVarP(p, name, "", value, usage) + return p +} + +// IPP is like IP, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) IPP(name, shorthand string, value net.IP, usage string) *net.IP { + p := new(net.IP) + f.IPVarP(p, name, shorthand, value, usage) + return p +} + +// IP defines an net.IP flag with specified name, default value, and usage string. +// The return value is the address of an net.IP variable that stores the value of the flag. +func IP(name string, value net.IP, usage string) *net.IP { + return CommandLine.IPP(name, "", value, usage) +} + +// IPP is like IP, but accepts a shorthand letter that can be used after a single dash. +func IPP(name, shorthand string, value net.IP, usage string) *net.IP { + return CommandLine.IPP(name, shorthand, value, usage) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/ipmask.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/ipmask.go new file mode 100644 index 0000000000000..5bd44bd21d27e --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/ipmask.go @@ -0,0 +1,122 @@ +package pflag + +import ( + "fmt" + "net" + "strconv" +) + +// -- net.IPMask value +type ipMaskValue net.IPMask + +func newIPMaskValue(val net.IPMask, p *net.IPMask) *ipMaskValue { + *p = val + return (*ipMaskValue)(p) +} + +func (i *ipMaskValue) String() string { return net.IPMask(*i).String() } +func (i *ipMaskValue) Set(s string) error { + ip := ParseIPv4Mask(s) + if ip == nil { + return fmt.Errorf("failed to parse IP mask: %q", s) + } + *i = ipMaskValue(ip) + return nil +} + +func (i *ipMaskValue) Type() string { + return "ipMask" +} + +// ParseIPv4Mask written in IP form (e.g. 255.255.255.0). +// This function should really belong to the net package. +func ParseIPv4Mask(s string) net.IPMask { + mask := net.ParseIP(s) + if mask == nil { + if len(s) != 8 { + return nil + } + // net.IPMask.String() actually outputs things like ffffff00 + // so write a horrible parser for that as well :-( + m := []int{} + for i := 0; i < 4; i++ { + b := "0x" + s[2*i:2*i+2] + d, err := strconv.ParseInt(b, 0, 0) + if err != nil { + return nil + } + m = append(m, int(d)) + } + s := fmt.Sprintf("%d.%d.%d.%d", m[0], m[1], m[2], m[3]) + mask = net.ParseIP(s) + if mask == nil { + return nil + } + } + return net.IPv4Mask(mask[12], mask[13], mask[14], mask[15]) +} + +func parseIPv4Mask(sval string) (interface{}, error) { + mask := ParseIPv4Mask(sval) + if mask == nil { + return nil, fmt.Errorf("unable to parse %s as net.IPMask", sval) + } + return mask, nil +} + +// GetIPv4Mask return the net.IPv4Mask value of a flag with the given name +func (f *FlagSet) GetIPv4Mask(name string) (net.IPMask, error) { + val, err := f.getFlagType(name, "ipMask", parseIPv4Mask) + if err != nil { + return nil, err + } + return val.(net.IPMask), nil +} + +// IPMaskVar defines an net.IPMask flag with specified name, default value, and usage string. +// The argument p points to an net.IPMask variable in which to store the value of the flag. +func (f *FlagSet) IPMaskVar(p *net.IPMask, name string, value net.IPMask, usage string) { + f.VarP(newIPMaskValue(value, p), name, "", usage) +} + +// IPMaskVarP is like IPMaskVar, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) IPMaskVarP(p *net.IPMask, name, shorthand string, value net.IPMask, usage string) { + f.VarP(newIPMaskValue(value, p), name, shorthand, usage) +} + +// IPMaskVar defines an net.IPMask flag with specified name, default value, and usage string. +// The argument p points to an net.IPMask variable in which to store the value of the flag. +func IPMaskVar(p *net.IPMask, name string, value net.IPMask, usage string) { + CommandLine.VarP(newIPMaskValue(value, p), name, "", usage) +} + +// IPMaskVarP is like IPMaskVar, but accepts a shorthand letter that can be used after a single dash. +func IPMaskVarP(p *net.IPMask, name, shorthand string, value net.IPMask, usage string) { + CommandLine.VarP(newIPMaskValue(value, p), name, shorthand, usage) +} + +// IPMask defines an net.IPMask flag with specified name, default value, and usage string. +// The return value is the address of an net.IPMask variable that stores the value of the flag. +func (f *FlagSet) IPMask(name string, value net.IPMask, usage string) *net.IPMask { + p := new(net.IPMask) + f.IPMaskVarP(p, name, "", value, usage) + return p +} + +// IPMaskP is like IPMask, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) IPMaskP(name, shorthand string, value net.IPMask, usage string) *net.IPMask { + p := new(net.IPMask) + f.IPMaskVarP(p, name, shorthand, value, usage) + return p +} + +// IPMask defines an net.IPMask flag with specified name, default value, and usage string. +// The return value is the address of an net.IPMask variable that stores the value of the flag. +func IPMask(name string, value net.IPMask, usage string) *net.IPMask { + return CommandLine.IPMaskP(name, "", value, usage) +} + +// IPMaskP is like IP, but accepts a shorthand letter that can be used after a single dash. +func IPMaskP(name, shorthand string, value net.IPMask, usage string) *net.IPMask { + return CommandLine.IPMaskP(name, shorthand, value, usage) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/ipnet.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/ipnet.go new file mode 100644 index 0000000000000..149b764b1e81f --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/ipnet.go @@ -0,0 +1,100 @@ +package pflag + +import ( + "fmt" + "net" + "strings" +) + +// IPNet adapts net.IPNet for use as a flag. +type ipNetValue net.IPNet + +func (ipnet ipNetValue) String() string { + n := net.IPNet(ipnet) + return n.String() +} + +func (ipnet *ipNetValue) Set(value string) error { + _, n, err := net.ParseCIDR(strings.TrimSpace(value)) + if err != nil { + return err + } + *ipnet = ipNetValue(*n) + return nil +} + +func (*ipNetValue) Type() string { + return "ipNet" +} + +var _ = strings.TrimSpace + +func newIPNetValue(val net.IPNet, p *net.IPNet) *ipNetValue { + *p = val + return (*ipNetValue)(p) +} + +func ipNetConv(sval string) (interface{}, error) { + _, n, err := net.ParseCIDR(strings.TrimSpace(sval)) + if err == nil { + return *n, nil + } + return nil, fmt.Errorf("invalid string being converted to IPNet: %s", sval) +} + +// GetIPNet return the net.IPNet value of a flag with the given name +func (f *FlagSet) GetIPNet(name string) (net.IPNet, error) { + val, err := f.getFlagType(name, "ipNet", ipNetConv) + if err != nil { + return net.IPNet{}, err + } + return val.(net.IPNet), nil +} + +// IPNetVar defines an net.IPNet flag with specified name, default value, and usage string. +// The argument p points to an net.IPNet variable in which to store the value of the flag. +func (f *FlagSet) IPNetVar(p *net.IPNet, name string, value net.IPNet, usage string) { + f.VarP(newIPNetValue(value, p), name, "", usage) +} + +// IPNetVarP is like IPNetVar, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) IPNetVarP(p *net.IPNet, name, shorthand string, value net.IPNet, usage string) { + f.VarP(newIPNetValue(value, p), name, shorthand, usage) +} + +// IPNetVar defines an net.IPNet flag with specified name, default value, and usage string. +// The argument p points to an net.IPNet variable in which to store the value of the flag. +func IPNetVar(p *net.IPNet, name string, value net.IPNet, usage string) { + CommandLine.VarP(newIPNetValue(value, p), name, "", usage) +} + +// IPNetVarP is like IPNetVar, but accepts a shorthand letter that can be used after a single dash. +func IPNetVarP(p *net.IPNet, name, shorthand string, value net.IPNet, usage string) { + CommandLine.VarP(newIPNetValue(value, p), name, shorthand, usage) +} + +// IPNet defines an net.IPNet flag with specified name, default value, and usage string. +// The return value is the address of an net.IPNet variable that stores the value of the flag. +func (f *FlagSet) IPNet(name string, value net.IPNet, usage string) *net.IPNet { + p := new(net.IPNet) + f.IPNetVarP(p, name, "", value, usage) + return p +} + +// IPNetP is like IPNet, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) IPNetP(name, shorthand string, value net.IPNet, usage string) *net.IPNet { + p := new(net.IPNet) + f.IPNetVarP(p, name, shorthand, value, usage) + return p +} + +// IPNet defines an net.IPNet flag with specified name, default value, and usage string. +// The return value is the address of an net.IPNet variable that stores the value of the flag. +func IPNet(name string, value net.IPNet, usage string) *net.IPNet { + return CommandLine.IPNetP(name, "", value, usage) +} + +// IPNetP is like IPNet, but accepts a shorthand letter that can be used after a single dash. +func IPNetP(name, shorthand string, value net.IPNet, usage string) *net.IPNet { + return CommandLine.IPNetP(name, shorthand, value, usage) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/string.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/string.go new file mode 100644 index 0000000000000..e296136e5b8c5 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/string.go @@ -0,0 +1,82 @@ +package pflag + +import "fmt" + +// -- string Value +type stringValue string + +func newStringValue(val string, p *string) *stringValue { + *p = val + return (*stringValue)(p) +} + +func (s *stringValue) Set(val string) error { + *s = stringValue(val) + return nil +} +func (s *stringValue) Type() string { + return "string" +} + +func (s *stringValue) String() string { return fmt.Sprintf("%s", *s) } + +func stringConv(sval string) (interface{}, error) { + return sval, nil +} + +// GetString return the string value of a flag with the given name +func (f *FlagSet) GetString(name string) (string, error) { + val, err := f.getFlagType(name, "string", stringConv) + if err != nil { + return "", err + } + return val.(string), nil +} + +// StringVar defines a string flag with specified name, default value, and usage string. +// The argument p points to a string variable in which to store the value of the flag. +func (f *FlagSet) StringVar(p *string, name string, value string, usage string) { + f.VarP(newStringValue(value, p), name, "", usage) +} + +// StringVarP is like StringVar, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) StringVarP(p *string, name, shorthand string, value string, usage string) { + f.VarP(newStringValue(value, p), name, shorthand, usage) +} + +// StringVar defines a string flag with specified name, default value, and usage string. +// The argument p points to a string variable in which to store the value of the flag. +func StringVar(p *string, name string, value string, usage string) { + CommandLine.VarP(newStringValue(value, p), name, "", usage) +} + +// StringVarP is like StringVar, but accepts a shorthand letter that can be used after a single dash. +func StringVarP(p *string, name, shorthand string, value string, usage string) { + CommandLine.VarP(newStringValue(value, p), name, shorthand, usage) +} + +// String defines a string flag with specified name, default value, and usage string. +// The return value is the address of a string variable that stores the value of the flag. +func (f *FlagSet) String(name string, value string, usage string) *string { + p := new(string) + f.StringVarP(p, name, "", value, usage) + return p +} + +// StringP is like String, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) StringP(name, shorthand string, value string, usage string) *string { + p := new(string) + f.StringVarP(p, name, shorthand, value, usage) + return p +} + +// String defines a string flag with specified name, default value, and usage string. +// The return value is the address of a string variable that stores the value of the flag. +func String(name string, value string, usage string) *string { + return CommandLine.StringP(name, "", value, usage) +} + +// StringP is like String, but accepts a shorthand letter that can be used after a single dash. +func StringP(name, shorthand string, value string, usage string) *string { + return CommandLine.StringP(name, shorthand, value, usage) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/string_slice.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/string_slice.go new file mode 100644 index 0000000000000..b53648b2e5237 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/string_slice.go @@ -0,0 +1,111 @@ +package pflag + +import ( + "encoding/csv" + "fmt" + "strings" +) + +var _ = fmt.Fprint + +// -- stringSlice Value +type stringSliceValue struct { + value *[]string + changed bool +} + +func newStringSliceValue(val []string, p *[]string) *stringSliceValue { + ssv := new(stringSliceValue) + ssv.value = p + *ssv.value = val + return ssv +} + +func (s *stringSliceValue) Set(val string) error { + stringReader := strings.NewReader(val) + csvReader := csv.NewReader(stringReader) + v, err := csvReader.Read() + if err != nil { + return err + } + if !s.changed { + *s.value = v + } else { + *s.value = append(*s.value, v...) + } + s.changed = true + return nil +} + +func (s *stringSliceValue) Type() string { + return "stringSlice" +} + +func (s *stringSliceValue) String() string { return "[" + strings.Join(*s.value, ",") + "]" } + +func stringSliceConv(sval string) (interface{}, error) { + sval = strings.Trim(sval, "[]") + // An empty string would cause a slice with one (empty) string + if len(sval) == 0 { + return []string{}, nil + } + v := strings.Split(sval, ",") + return v, nil +} + +// GetStringSlice return the []string value of a flag with the given name +func (f *FlagSet) GetStringSlice(name string) ([]string, error) { + val, err := f.getFlagType(name, "stringSlice", stringSliceConv) + if err != nil { + return []string{}, err + } + return val.([]string), nil +} + +// StringSliceVar defines a string flag with specified name, default value, and usage string. +// The argument p points to a []string variable in which to store the value of the flag. +func (f *FlagSet) StringSliceVar(p *[]string, name string, value []string, usage string) { + f.VarP(newStringSliceValue(value, p), name, "", usage) +} + +// StringSliceVarP is like StringSliceVar, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) StringSliceVarP(p *[]string, name, shorthand string, value []string, usage string) { + f.VarP(newStringSliceValue(value, p), name, shorthand, usage) +} + +// StringSliceVar defines a string flag with specified name, default value, and usage string. +// The argument p points to a []string variable in which to store the value of the flag. +func StringSliceVar(p *[]string, name string, value []string, usage string) { + CommandLine.VarP(newStringSliceValue(value, p), name, "", usage) +} + +// StringSliceVarP is like StringSliceVar, but accepts a shorthand letter that can be used after a single dash. +func StringSliceVarP(p *[]string, name, shorthand string, value []string, usage string) { + CommandLine.VarP(newStringSliceValue(value, p), name, shorthand, usage) +} + +// StringSlice defines a string flag with specified name, default value, and usage string. +// The return value is the address of a []string variable that stores the value of the flag. +func (f *FlagSet) StringSlice(name string, value []string, usage string) *[]string { + p := []string{} + f.StringSliceVarP(&p, name, "", value, usage) + return &p +} + +// StringSliceP is like StringSlice, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) StringSliceP(name, shorthand string, value []string, usage string) *[]string { + p := []string{} + f.StringSliceVarP(&p, name, shorthand, value, usage) + return &p +} + +// StringSlice defines a string flag with specified name, default value, and usage string. +// The return value is the address of a []string variable that stores the value of the flag. +func StringSlice(name string, value []string, usage string) *[]string { + return CommandLine.StringSliceP(name, "", value, usage) +} + +// StringSliceP is like StringSlice, but accepts a shorthand letter that can be used after a single dash. +func StringSliceP(name, shorthand string, value []string, usage string) *[]string { + return CommandLine.StringSliceP(name, shorthand, value, usage) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/uint.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/uint.go new file mode 100644 index 0000000000000..e142b49964e8a --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/uint.go @@ -0,0 +1,91 @@ +package pflag + +import ( + "fmt" + "strconv" +) + +// -- uint Value +type uintValue uint + +func newUintValue(val uint, p *uint) *uintValue { + *p = val + return (*uintValue)(p) +} + +func (i *uintValue) Set(s string) error { + v, err := strconv.ParseUint(s, 0, 64) + *i = uintValue(v) + return err +} + +func (i *uintValue) Type() string { + return "uint" +} + +func (i *uintValue) String() string { return fmt.Sprintf("%v", *i) } + +func uintConv(sval string) (interface{}, error) { + v, err := strconv.ParseUint(sval, 0, 0) + if err != nil { + return 0, err + } + return uint(v), nil +} + +// GetUint return the uint value of a flag with the given name +func (f *FlagSet) GetUint(name string) (uint, error) { + val, err := f.getFlagType(name, "uint", uintConv) + if err != nil { + return 0, err + } + return val.(uint), nil +} + +// UintVar defines a uint flag with specified name, default value, and usage string. +// The argument p points to a uint variable in which to store the value of the flag. +func (f *FlagSet) UintVar(p *uint, name string, value uint, usage string) { + f.VarP(newUintValue(value, p), name, "", usage) +} + +// UintVarP is like UintVar, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) UintVarP(p *uint, name, shorthand string, value uint, usage string) { + f.VarP(newUintValue(value, p), name, shorthand, usage) +} + +// UintVar defines a uint flag with specified name, default value, and usage string. +// The argument p points to a uint variable in which to store the value of the flag. +func UintVar(p *uint, name string, value uint, usage string) { + CommandLine.VarP(newUintValue(value, p), name, "", usage) +} + +// UintVarP is like UintVar, but accepts a shorthand letter that can be used after a single dash. +func UintVarP(p *uint, name, shorthand string, value uint, usage string) { + CommandLine.VarP(newUintValue(value, p), name, shorthand, usage) +} + +// Uint defines a uint flag with specified name, default value, and usage string. +// The return value is the address of a uint variable that stores the value of the flag. +func (f *FlagSet) Uint(name string, value uint, usage string) *uint { + p := new(uint) + f.UintVarP(p, name, "", value, usage) + return p +} + +// UintP is like Uint, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) UintP(name, shorthand string, value uint, usage string) *uint { + p := new(uint) + f.UintVarP(p, name, shorthand, value, usage) + return p +} + +// Uint defines a uint flag with specified name, default value, and usage string. +// The return value is the address of a uint variable that stores the value of the flag. +func Uint(name string, value uint, usage string) *uint { + return CommandLine.UintP(name, "", value, usage) +} + +// UintP is like Uint, but accepts a shorthand letter that can be used after a single dash. +func UintP(name, shorthand string, value uint, usage string) *uint { + return CommandLine.UintP(name, shorthand, value, usage) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/uint16.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/uint16.go new file mode 100644 index 0000000000000..5c96c19dcf4ea --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/uint16.go @@ -0,0 +1,89 @@ +package pflag + +import ( + "fmt" + "strconv" +) + +// -- uint16 value +type uint16Value uint16 + +func newUint16Value(val uint16, p *uint16) *uint16Value { + *p = val + return (*uint16Value)(p) +} +func (i *uint16Value) String() string { return fmt.Sprintf("%d", *i) } +func (i *uint16Value) Set(s string) error { + v, err := strconv.ParseUint(s, 0, 16) + *i = uint16Value(v) + return err +} + +func (i *uint16Value) Type() string { + return "uint16" +} + +func uint16Conv(sval string) (interface{}, error) { + v, err := strconv.ParseUint(sval, 0, 16) + if err != nil { + return 0, err + } + return uint16(v), nil +} + +// GetUint16 return the uint16 value of a flag with the given name +func (f *FlagSet) GetUint16(name string) (uint16, error) { + val, err := f.getFlagType(name, "uint16", uint16Conv) + if err != nil { + return 0, err + } + return val.(uint16), nil +} + +// Uint16Var defines a uint flag with specified name, default value, and usage string. +// The argument p points to a uint variable in which to store the value of the flag. +func (f *FlagSet) Uint16Var(p *uint16, name string, value uint16, usage string) { + f.VarP(newUint16Value(value, p), name, "", usage) +} + +// Uint16VarP is like Uint16Var, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Uint16VarP(p *uint16, name, shorthand string, value uint16, usage string) { + f.VarP(newUint16Value(value, p), name, shorthand, usage) +} + +// Uint16Var defines a uint flag with specified name, default value, and usage string. +// The argument p points to a uint variable in which to store the value of the flag. +func Uint16Var(p *uint16, name string, value uint16, usage string) { + CommandLine.VarP(newUint16Value(value, p), name, "", usage) +} + +// Uint16VarP is like Uint16Var, but accepts a shorthand letter that can be used after a single dash. +func Uint16VarP(p *uint16, name, shorthand string, value uint16, usage string) { + CommandLine.VarP(newUint16Value(value, p), name, shorthand, usage) +} + +// Uint16 defines a uint flag with specified name, default value, and usage string. +// The return value is the address of a uint variable that stores the value of the flag. +func (f *FlagSet) Uint16(name string, value uint16, usage string) *uint16 { + p := new(uint16) + f.Uint16VarP(p, name, "", value, usage) + return p +} + +// Uint16P is like Uint16, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Uint16P(name, shorthand string, value uint16, usage string) *uint16 { + p := new(uint16) + f.Uint16VarP(p, name, shorthand, value, usage) + return p +} + +// Uint16 defines a uint flag with specified name, default value, and usage string. +// The return value is the address of a uint variable that stores the value of the flag. +func Uint16(name string, value uint16, usage string) *uint16 { + return CommandLine.Uint16P(name, "", value, usage) +} + +// Uint16P is like Uint16, but accepts a shorthand letter that can be used after a single dash. +func Uint16P(name, shorthand string, value uint16, usage string) *uint16 { + return CommandLine.Uint16P(name, shorthand, value, usage) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/uint32.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/uint32.go new file mode 100644 index 0000000000000..294fcaa32dfee --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/uint32.go @@ -0,0 +1,89 @@ +package pflag + +import ( + "fmt" + "strconv" +) + +// -- uint16 value +type uint32Value uint32 + +func newUint32Value(val uint32, p *uint32) *uint32Value { + *p = val + return (*uint32Value)(p) +} +func (i *uint32Value) String() string { return fmt.Sprintf("%d", *i) } +func (i *uint32Value) Set(s string) error { + v, err := strconv.ParseUint(s, 0, 32) + *i = uint32Value(v) + return err +} + +func (i *uint32Value) Type() string { + return "uint32" +} + +func uint32Conv(sval string) (interface{}, error) { + v, err := strconv.ParseUint(sval, 0, 32) + if err != nil { + return 0, err + } + return uint32(v), nil +} + +// GetUint32 return the uint32 value of a flag with the given name +func (f *FlagSet) GetUint32(name string) (uint32, error) { + val, err := f.getFlagType(name, "uint32", uint32Conv) + if err != nil { + return 0, err + } + return val.(uint32), nil +} + +// Uint32Var defines a uint32 flag with specified name, default value, and usage string. +// The argument p points to a uint32 variable in which to store the value of the flag. +func (f *FlagSet) Uint32Var(p *uint32, name string, value uint32, usage string) { + f.VarP(newUint32Value(value, p), name, "", usage) +} + +// Uint32VarP is like Uint32Var, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Uint32VarP(p *uint32, name, shorthand string, value uint32, usage string) { + f.VarP(newUint32Value(value, p), name, shorthand, usage) +} + +// Uint32Var defines a uint32 flag with specified name, default value, and usage string. +// The argument p points to a uint32 variable in which to store the value of the flag. +func Uint32Var(p *uint32, name string, value uint32, usage string) { + CommandLine.VarP(newUint32Value(value, p), name, "", usage) +} + +// Uint32VarP is like Uint32Var, but accepts a shorthand letter that can be used after a single dash. +func Uint32VarP(p *uint32, name, shorthand string, value uint32, usage string) { + CommandLine.VarP(newUint32Value(value, p), name, shorthand, usage) +} + +// Uint32 defines a uint32 flag with specified name, default value, and usage string. +// The return value is the address of a uint32 variable that stores the value of the flag. +func (f *FlagSet) Uint32(name string, value uint32, usage string) *uint32 { + p := new(uint32) + f.Uint32VarP(p, name, "", value, usage) + return p +} + +// Uint32P is like Uint32, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Uint32P(name, shorthand string, value uint32, usage string) *uint32 { + p := new(uint32) + f.Uint32VarP(p, name, shorthand, value, usage) + return p +} + +// Uint32 defines a uint32 flag with specified name, default value, and usage string. +// The return value is the address of a uint32 variable that stores the value of the flag. +func Uint32(name string, value uint32, usage string) *uint32 { + return CommandLine.Uint32P(name, "", value, usage) +} + +// Uint32P is like Uint32, but accepts a shorthand letter that can be used after a single dash. +func Uint32P(name, shorthand string, value uint32, usage string) *uint32 { + return CommandLine.Uint32P(name, shorthand, value, usage) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/uint64.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/uint64.go new file mode 100644 index 0000000000000..c68188505a639 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/uint64.go @@ -0,0 +1,91 @@ +package pflag + +import ( + "fmt" + "strconv" +) + +// -- uint64 Value +type uint64Value uint64 + +func newUint64Value(val uint64, p *uint64) *uint64Value { + *p = val + return (*uint64Value)(p) +} + +func (i *uint64Value) Set(s string) error { + v, err := strconv.ParseUint(s, 0, 64) + *i = uint64Value(v) + return err +} + +func (i *uint64Value) Type() string { + return "uint64" +} + +func (i *uint64Value) String() string { return fmt.Sprintf("%v", *i) } + +func uint64Conv(sval string) (interface{}, error) { + v, err := strconv.ParseUint(sval, 0, 64) + if err != nil { + return 0, err + } + return uint64(v), nil +} + +// GetUint64 return the uint64 value of a flag with the given name +func (f *FlagSet) GetUint64(name string) (uint64, error) { + val, err := f.getFlagType(name, "uint64", uint64Conv) + if err != nil { + return 0, err + } + return val.(uint64), nil +} + +// Uint64Var defines a uint64 flag with specified name, default value, and usage string. +// The argument p points to a uint64 variable in which to store the value of the flag. +func (f *FlagSet) Uint64Var(p *uint64, name string, value uint64, usage string) { + f.VarP(newUint64Value(value, p), name, "", usage) +} + +// Uint64VarP is like Uint64Var, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Uint64VarP(p *uint64, name, shorthand string, value uint64, usage string) { + f.VarP(newUint64Value(value, p), name, shorthand, usage) +} + +// Uint64Var defines a uint64 flag with specified name, default value, and usage string. +// The argument p points to a uint64 variable in which to store the value of the flag. +func Uint64Var(p *uint64, name string, value uint64, usage string) { + CommandLine.VarP(newUint64Value(value, p), name, "", usage) +} + +// Uint64VarP is like Uint64Var, but accepts a shorthand letter that can be used after a single dash. +func Uint64VarP(p *uint64, name, shorthand string, value uint64, usage string) { + CommandLine.VarP(newUint64Value(value, p), name, shorthand, usage) +} + +// Uint64 defines a uint64 flag with specified name, default value, and usage string. +// The return value is the address of a uint64 variable that stores the value of the flag. +func (f *FlagSet) Uint64(name string, value uint64, usage string) *uint64 { + p := new(uint64) + f.Uint64VarP(p, name, "", value, usage) + return p +} + +// Uint64P is like Uint64, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Uint64P(name, shorthand string, value uint64, usage string) *uint64 { + p := new(uint64) + f.Uint64VarP(p, name, shorthand, value, usage) + return p +} + +// Uint64 defines a uint64 flag with specified name, default value, and usage string. +// The return value is the address of a uint64 variable that stores the value of the flag. +func Uint64(name string, value uint64, usage string) *uint64 { + return CommandLine.Uint64P(name, "", value, usage) +} + +// Uint64P is like Uint64, but accepts a shorthand letter that can be used after a single dash. +func Uint64P(name, shorthand string, value uint64, usage string) *uint64 { + return CommandLine.Uint64P(name, shorthand, value, usage) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/uint8.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/uint8.go new file mode 100644 index 0000000000000..26db418adf605 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/spf13/pflag/uint8.go @@ -0,0 +1,91 @@ +package pflag + +import ( + "fmt" + "strconv" +) + +// -- uint8 Value +type uint8Value uint8 + +func newUint8Value(val uint8, p *uint8) *uint8Value { + *p = val + return (*uint8Value)(p) +} + +func (i *uint8Value) Set(s string) error { + v, err := strconv.ParseUint(s, 0, 8) + *i = uint8Value(v) + return err +} + +func (i *uint8Value) Type() string { + return "uint8" +} + +func (i *uint8Value) String() string { return fmt.Sprintf("%v", *i) } + +func uint8Conv(sval string) (interface{}, error) { + v, err := strconv.ParseUint(sval, 0, 8) + if err != nil { + return 0, err + } + return uint8(v), nil +} + +// GetUint8 return the uint8 value of a flag with the given name +func (f *FlagSet) GetUint8(name string) (uint8, error) { + val, err := f.getFlagType(name, "uint8", uint8Conv) + if err != nil { + return 0, err + } + return val.(uint8), nil +} + +// Uint8Var defines a uint8 flag with specified name, default value, and usage string. +// The argument p points to a uint8 variable in which to store the value of the flag. +func (f *FlagSet) Uint8Var(p *uint8, name string, value uint8, usage string) { + f.VarP(newUint8Value(value, p), name, "", usage) +} + +// Uint8VarP is like Uint8Var, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Uint8VarP(p *uint8, name, shorthand string, value uint8, usage string) { + f.VarP(newUint8Value(value, p), name, shorthand, usage) +} + +// Uint8Var defines a uint8 flag with specified name, default value, and usage string. +// The argument p points to a uint8 variable in which to store the value of the flag. +func Uint8Var(p *uint8, name string, value uint8, usage string) { + CommandLine.VarP(newUint8Value(value, p), name, "", usage) +} + +// Uint8VarP is like Uint8Var, but accepts a shorthand letter that can be used after a single dash. +func Uint8VarP(p *uint8, name, shorthand string, value uint8, usage string) { + CommandLine.VarP(newUint8Value(value, p), name, shorthand, usage) +} + +// Uint8 defines a uint8 flag with specified name, default value, and usage string. +// The return value is the address of a uint8 variable that stores the value of the flag. +func (f *FlagSet) Uint8(name string, value uint8, usage string) *uint8 { + p := new(uint8) + f.Uint8VarP(p, name, "", value, usage) + return p +} + +// Uint8P is like Uint8, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Uint8P(name, shorthand string, value uint8, usage string) *uint8 { + p := new(uint8) + f.Uint8VarP(p, name, shorthand, value, usage) + return p +} + +// Uint8 defines a uint8 flag with specified name, default value, and usage string. +// The return value is the address of a uint8 variable that stores the value of the flag. +func Uint8(name string, value uint8, usage string) *uint8 { + return CommandLine.Uint8P(name, "", value, usage) +} + +// Uint8P is like Uint8, but accepts a shorthand letter that can be used after a single dash. +func Uint8P(name, shorthand string, value uint8, usage string) *uint8 { + return CommandLine.Uint8P(name, shorthand, value, usage) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/LICENSE b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/LICENSE new file mode 100644 index 0000000000000..95a0f0541cdaa --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2012-2015 Ugorji Nwoke. +All rights reserved. + +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/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/0doc.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/0doc.go new file mode 100644 index 0000000000000..fd1385b45ad0f --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/0doc.go @@ -0,0 +1,193 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +/* +High Performance, Feature-Rich Idiomatic Go codec/encoding library for +binc, msgpack, cbor, json. + +Supported Serialization formats are: + + - msgpack: https://github.com/msgpack/msgpack + - binc: http://github.com/ugorji/binc + - cbor: http://cbor.io http://tools.ietf.org/html/rfc7049 + - json: http://json.org http://tools.ietf.org/html/rfc7159 + - simple: + +To install: + + go get github.com/ugorji/go/codec + +This package understands the 'unsafe' tag, to allow using unsafe semantics: + + - When decoding into a struct, you need to read the field name as a string + so you can find the struct field it is mapped to. + Using `unsafe` will bypass the allocation and copying overhead of []byte->string conversion. + +To install using unsafe, pass the 'unsafe' tag: + + go get -tags=unsafe github.com/ugorji/go/codec + +For detailed usage information, read the primer at http://ugorji.net/blog/go-codec-primer . + +The idiomatic Go support is as seen in other encoding packages in +the standard library (ie json, xml, gob, etc). + +Rich Feature Set includes: + + - Simple but extremely powerful and feature-rich API + - Very High Performance. + Our extensive benchmarks show us outperforming Gob, Json, Bson, etc by 2-4X. + - Multiple conversions: + Package coerces types where appropriate + e.g. decode an int in the stream into a float, etc. + - Corner Cases: + Overflows, nil maps/slices, nil values in streams are handled correctly + - Standard field renaming via tags + - Support for omitting empty fields during an encoding + - Encoding from any value and decoding into pointer to any value + (struct, slice, map, primitives, pointers, interface{}, etc) + - Extensions to support efficient encoding/decoding of any named types + - Support encoding.(Binary|Text)(M|Unm)arshaler interfaces + - Decoding without a schema (into a interface{}). + Includes Options to configure what specific map or slice type to use + when decoding an encoded list or map into a nil interface{} + - Encode a struct as an array, and decode struct from an array in the data stream + - Comprehensive support for anonymous fields + - Fast (no-reflection) encoding/decoding of common maps and slices + - Code-generation for faster performance. + - Support binary (e.g. messagepack, cbor) and text (e.g. json) formats + - Support indefinite-length formats to enable true streaming + (for formats which support it e.g. json, cbor) + - Support canonical encoding, where a value is ALWAYS encoded as same sequence of bytes. + This mostly applies to maps, where iteration order is non-deterministic. + - NIL in data stream decoded as zero value + - Never silently skip data when decoding. + User decides whether to return an error or silently skip data when keys or indexes + in the data stream do not map to fields in the struct. + - Encode/Decode from/to chan types (for iterative streaming support) + - Drop-in replacement for encoding/json. `json:` key in struct tag supported. + - Provides a RPC Server and Client Codec for net/rpc communication protocol. + - Handle unique idiosynchracies of codecs e.g. + - For messagepack, configure how ambiguities in handling raw bytes are resolved + - For messagepack, provide rpc server/client codec to support + msgpack-rpc protocol defined at: + https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md + +Extension Support + +Users can register a function to handle the encoding or decoding of +their custom types. + +There are no restrictions on what the custom type can be. Some examples: + + type BisSet []int + type BitSet64 uint64 + type UUID string + type MyStructWithUnexportedFields struct { a int; b bool; c []int; } + type GifImage struct { ... } + +As an illustration, MyStructWithUnexportedFields would normally be +encoded as an empty map because it has no exported fields, while UUID +would be encoded as a string. However, with extension support, you can +encode any of these however you like. + +RPC + +RPC Client and Server Codecs are implemented, so the codecs can be used +with the standard net/rpc package. + +Usage + +The Handle is SAFE for concurrent READ, but NOT SAFE for concurrent modification. + +The Encoder and Decoder are NOT safe for concurrent use. + +Consequently, the usage model is basically: + + - Create and initialize the Handle before any use. + Once created, DO NOT modify it. + - Multiple Encoders or Decoders can now use the Handle concurrently. + They only read information off the Handle (never write). + - However, each Encoder or Decoder MUST not be used concurrently + - To re-use an Encoder/Decoder, call Reset(...) on it first. + This allows you use state maintained on the Encoder/Decoder. + +Sample usage model: + + // create and configure Handle + var ( + bh codec.BincHandle + mh codec.MsgpackHandle + ch codec.CborHandle + ) + + mh.MapType = reflect.TypeOf(map[string]interface{}(nil)) + + // configure extensions + // e.g. for msgpack, define functions and enable Time support for tag 1 + // mh.SetExt(reflect.TypeOf(time.Time{}), 1, myExt) + + // create and use decoder/encoder + var ( + r io.Reader + w io.Writer + b []byte + h = &bh // or mh to use msgpack + ) + + dec = codec.NewDecoder(r, h) + dec = codec.NewDecoderBytes(b, h) + err = dec.Decode(&v) + + enc = codec.NewEncoder(w, h) + enc = codec.NewEncoderBytes(&b, h) + err = enc.Encode(v) + + //RPC Server + go func() { + for { + conn, err := listener.Accept() + rpcCodec := codec.GoRpc.ServerCodec(conn, h) + //OR rpcCodec := codec.MsgpackSpecRpc.ServerCodec(conn, h) + rpc.ServeCodec(rpcCodec) + } + }() + + //RPC Communication (client side) + conn, err = net.Dial("tcp", "localhost:5555") + rpcCodec := codec.GoRpc.ClientCodec(conn, h) + //OR rpcCodec := codec.MsgpackSpecRpc.ClientCodec(conn, h) + client := rpc.NewClientWithCodec(rpcCodec) + +*/ +package codec + +// Benefits of go-codec: +// +// - encoding/json always reads whole file into memory first. +// This makes it unsuitable for parsing very large files. +// - encoding/xml cannot parse into a map[string]interface{} +// I found this out on reading https://github.com/clbanning/mxj + +// TODO: +// +// - (En|De)coder should store an error when it occurs. +// Until reset, subsequent calls return that error that was stored. +// This means that free panics must go away. +// All errors must be raised through errorf method. +// - Decoding using a chan is good, but incurs concurrency costs. +// This is because there's no fast way to use a channel without it +// having to switch goroutines constantly. +// Callback pattern is still the best. Maybe cnsider supporting something like: +// type X struct { +// Name string +// Ys []Y +// Ys chan <- Y +// Ys func(interface{}) -> call this interface for each entry in there. +// } +// - Consider adding a isZeroer interface { isZero() bool } +// It is used within isEmpty, for omitEmpty support. +// - Consider making Handle used AS-IS within the encoding/decoding session. +// This means that we don't cache Handle information within the (En|De)coder, +// except we really need it at Reset(...) +// - Handle recursive types during encoding/decoding? diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/binc.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/binc.go new file mode 100644 index 0000000000000..c884d14dce580 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/binc.go @@ -0,0 +1,918 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "math" + "reflect" + "time" +) + +const bincDoPrune = true // No longer needed. Needed before as C lib did not support pruning. + +// vd as low 4 bits (there are 16 slots) +const ( + bincVdSpecial byte = iota + bincVdPosInt + bincVdNegInt + bincVdFloat + + bincVdString + bincVdByteArray + bincVdArray + bincVdMap + + bincVdTimestamp + bincVdSmallInt + bincVdUnicodeOther + bincVdSymbol + + bincVdDecimal + _ // open slot + _ // open slot + bincVdCustomExt = 0x0f +) + +const ( + bincSpNil byte = iota + bincSpFalse + bincSpTrue + bincSpNan + bincSpPosInf + bincSpNegInf + bincSpZeroFloat + bincSpZero + bincSpNegOne +) + +const ( + bincFlBin16 byte = iota + bincFlBin32 + _ // bincFlBin32e + bincFlBin64 + _ // bincFlBin64e + // others not currently supported +) + +type bincEncDriver struct { + e *Encoder + w encWriter + m map[string]uint16 // symbols + b [scratchByteArrayLen]byte + s uint16 // symbols sequencer + encNoSeparator +} + +func (e *bincEncDriver) IsBuiltinType(rt uintptr) bool { + return rt == timeTypId +} + +func (e *bincEncDriver) EncodeBuiltin(rt uintptr, v interface{}) { + if rt == timeTypId { + var bs []byte + switch x := v.(type) { + case time.Time: + bs = encodeTime(x) + case *time.Time: + bs = encodeTime(*x) + default: + e.e.errorf("binc error encoding builtin: expect time.Time, received %T", v) + } + e.w.writen1(bincVdTimestamp<<4 | uint8(len(bs))) + e.w.writeb(bs) + } +} + +func (e *bincEncDriver) EncodeNil() { + e.w.writen1(bincVdSpecial<<4 | bincSpNil) +} + +func (e *bincEncDriver) EncodeBool(b bool) { + if b { + e.w.writen1(bincVdSpecial<<4 | bincSpTrue) + } else { + e.w.writen1(bincVdSpecial<<4 | bincSpFalse) + } +} + +func (e *bincEncDriver) EncodeFloat32(f float32) { + if f == 0 { + e.w.writen1(bincVdSpecial<<4 | bincSpZeroFloat) + return + } + e.w.writen1(bincVdFloat<<4 | bincFlBin32) + bigenHelper{e.b[:4], e.w}.writeUint32(math.Float32bits(f)) +} + +func (e *bincEncDriver) EncodeFloat64(f float64) { + if f == 0 { + e.w.writen1(bincVdSpecial<<4 | bincSpZeroFloat) + return + } + bigen.PutUint64(e.b[:8], math.Float64bits(f)) + if bincDoPrune { + i := 7 + for ; i >= 0 && (e.b[i] == 0); i-- { + } + i++ + if i <= 6 { + e.w.writen1(bincVdFloat<<4 | 0x8 | bincFlBin64) + e.w.writen1(byte(i)) + e.w.writeb(e.b[:i]) + return + } + } + e.w.writen1(bincVdFloat<<4 | bincFlBin64) + e.w.writeb(e.b[:8]) +} + +func (e *bincEncDriver) encIntegerPrune(bd byte, pos bool, v uint64, lim uint8) { + if lim == 4 { + bigen.PutUint32(e.b[:lim], uint32(v)) + } else { + bigen.PutUint64(e.b[:lim], v) + } + if bincDoPrune { + i := pruneSignExt(e.b[:lim], pos) + e.w.writen1(bd | lim - 1 - byte(i)) + e.w.writeb(e.b[i:lim]) + } else { + e.w.writen1(bd | lim - 1) + e.w.writeb(e.b[:lim]) + } +} + +func (e *bincEncDriver) EncodeInt(v int64) { + const nbd byte = bincVdNegInt << 4 + if v >= 0 { + e.encUint(bincVdPosInt<<4, true, uint64(v)) + } else if v == -1 { + e.w.writen1(bincVdSpecial<<4 | bincSpNegOne) + } else { + e.encUint(bincVdNegInt<<4, false, uint64(-v)) + } +} + +func (e *bincEncDriver) EncodeUint(v uint64) { + e.encUint(bincVdPosInt<<4, true, v) +} + +func (e *bincEncDriver) encUint(bd byte, pos bool, v uint64) { + if v == 0 { + e.w.writen1(bincVdSpecial<<4 | bincSpZero) + } else if pos && v >= 1 && v <= 16 { + e.w.writen1(bincVdSmallInt<<4 | byte(v-1)) + } else if v <= math.MaxUint8 { + e.w.writen2(bd|0x0, byte(v)) + } else if v <= math.MaxUint16 { + e.w.writen1(bd | 0x01) + bigenHelper{e.b[:2], e.w}.writeUint16(uint16(v)) + } else if v <= math.MaxUint32 { + e.encIntegerPrune(bd, pos, v, 4) + } else { + e.encIntegerPrune(bd, pos, v, 8) + } +} + +func (e *bincEncDriver) EncodeExt(rv interface{}, xtag uint64, ext Ext, _ *Encoder) { + bs := ext.WriteExt(rv) + if bs == nil { + e.EncodeNil() + return + } + e.encodeExtPreamble(uint8(xtag), len(bs)) + e.w.writeb(bs) +} + +func (e *bincEncDriver) EncodeRawExt(re *RawExt, _ *Encoder) { + e.encodeExtPreamble(uint8(re.Tag), len(re.Data)) + e.w.writeb(re.Data) +} + +func (e *bincEncDriver) encodeExtPreamble(xtag byte, length int) { + e.encLen(bincVdCustomExt<<4, uint64(length)) + e.w.writen1(xtag) +} + +func (e *bincEncDriver) EncodeArrayStart(length int) { + e.encLen(bincVdArray<<4, uint64(length)) +} + +func (e *bincEncDriver) EncodeMapStart(length int) { + e.encLen(bincVdMap<<4, uint64(length)) +} + +func (e *bincEncDriver) EncodeString(c charEncoding, v string) { + l := uint64(len(v)) + e.encBytesLen(c, l) + if l > 0 { + e.w.writestr(v) + } +} + +func (e *bincEncDriver) EncodeSymbol(v string) { + // if WriteSymbolsNoRefs { + // e.encodeString(c_UTF8, v) + // return + // } + + //symbols only offer benefit when string length > 1. + //This is because strings with length 1 take only 2 bytes to store + //(bd with embedded length, and single byte for string val). + + l := len(v) + if l == 0 { + e.encBytesLen(c_UTF8, 0) + return + } else if l == 1 { + e.encBytesLen(c_UTF8, 1) + e.w.writen1(v[0]) + return + } + if e.m == nil { + e.m = make(map[string]uint16, 16) + } + ui, ok := e.m[v] + if ok { + if ui <= math.MaxUint8 { + e.w.writen2(bincVdSymbol<<4, byte(ui)) + } else { + e.w.writen1(bincVdSymbol<<4 | 0x8) + bigenHelper{e.b[:2], e.w}.writeUint16(ui) + } + } else { + e.s++ + ui = e.s + //ui = uint16(atomic.AddUint32(&e.s, 1)) + e.m[v] = ui + var lenprec uint8 + if l <= math.MaxUint8 { + // lenprec = 0 + } else if l <= math.MaxUint16 { + lenprec = 1 + } else if int64(l) <= math.MaxUint32 { + lenprec = 2 + } else { + lenprec = 3 + } + if ui <= math.MaxUint8 { + e.w.writen2(bincVdSymbol<<4|0x0|0x4|lenprec, byte(ui)) + } else { + e.w.writen1(bincVdSymbol<<4 | 0x8 | 0x4 | lenprec) + bigenHelper{e.b[:2], e.w}.writeUint16(ui) + } + if lenprec == 0 { + e.w.writen1(byte(l)) + } else if lenprec == 1 { + bigenHelper{e.b[:2], e.w}.writeUint16(uint16(l)) + } else if lenprec == 2 { + bigenHelper{e.b[:4], e.w}.writeUint32(uint32(l)) + } else { + bigenHelper{e.b[:8], e.w}.writeUint64(uint64(l)) + } + e.w.writestr(v) + } +} + +func (e *bincEncDriver) EncodeStringBytes(c charEncoding, v []byte) { + l := uint64(len(v)) + e.encBytesLen(c, l) + if l > 0 { + e.w.writeb(v) + } +} + +func (e *bincEncDriver) encBytesLen(c charEncoding, length uint64) { + //TODO: support bincUnicodeOther (for now, just use string or bytearray) + if c == c_RAW { + e.encLen(bincVdByteArray<<4, length) + } else { + e.encLen(bincVdString<<4, length) + } +} + +func (e *bincEncDriver) encLen(bd byte, l uint64) { + if l < 12 { + e.w.writen1(bd | uint8(l+4)) + } else { + e.encLenNumber(bd, l) + } +} + +func (e *bincEncDriver) encLenNumber(bd byte, v uint64) { + if v <= math.MaxUint8 { + e.w.writen2(bd, byte(v)) + } else if v <= math.MaxUint16 { + e.w.writen1(bd | 0x01) + bigenHelper{e.b[:2], e.w}.writeUint16(uint16(v)) + } else if v <= math.MaxUint32 { + e.w.writen1(bd | 0x02) + bigenHelper{e.b[:4], e.w}.writeUint32(uint32(v)) + } else { + e.w.writen1(bd | 0x03) + bigenHelper{e.b[:8], e.w}.writeUint64(uint64(v)) + } +} + +//------------------------------------ + +type bincDecSymbol struct { + s string + b []byte + i uint16 +} + +type bincDecDriver struct { + d *Decoder + h *BincHandle + r decReader + br bool // bytes reader + bdRead bool + bd byte + vd byte + vs byte + noStreamingCodec + decNoSeparator + b [scratchByteArrayLen]byte + + // linear searching on this slice is ok, + // because we typically expect < 32 symbols in each stream. + s []bincDecSymbol +} + +func (d *bincDecDriver) readNextBd() { + d.bd = d.r.readn1() + d.vd = d.bd >> 4 + d.vs = d.bd & 0x0f + d.bdRead = true +} + +func (d *bincDecDriver) ContainerType() (vt valueType) { + if d.vd == bincVdSpecial && d.vs == bincSpNil { + return valueTypeNil + } else if d.vd == bincVdByteArray { + return valueTypeBytes + } else if d.vd == bincVdString { + return valueTypeString + } else if d.vd == bincVdArray { + return valueTypeArray + } else if d.vd == bincVdMap { + return valueTypeMap + } else { + // d.d.errorf("isContainerType: unsupported parameter: %v", vt) + } + return valueTypeUnset +} + +func (d *bincDecDriver) TryDecodeAsNil() bool { + if !d.bdRead { + d.readNextBd() + } + if d.bd == bincVdSpecial<<4|bincSpNil { + d.bdRead = false + return true + } + return false +} + +func (d *bincDecDriver) IsBuiltinType(rt uintptr) bool { + return rt == timeTypId +} + +func (d *bincDecDriver) DecodeBuiltin(rt uintptr, v interface{}) { + if !d.bdRead { + d.readNextBd() + } + if rt == timeTypId { + if d.vd != bincVdTimestamp { + d.d.errorf("Invalid d.vd. Expecting 0x%x. Received: 0x%x", bincVdTimestamp, d.vd) + return + } + tt, err := decodeTime(d.r.readx(int(d.vs))) + if err != nil { + panic(err) + } + var vt *time.Time = v.(*time.Time) + *vt = tt + d.bdRead = false + } +} + +func (d *bincDecDriver) decFloatPre(vs, defaultLen byte) { + if vs&0x8 == 0 { + d.r.readb(d.b[0:defaultLen]) + } else { + l := d.r.readn1() + if l > 8 { + d.d.errorf("At most 8 bytes used to represent float. Received: %v bytes", l) + return + } + for i := l; i < 8; i++ { + d.b[i] = 0 + } + d.r.readb(d.b[0:l]) + } +} + +func (d *bincDecDriver) decFloat() (f float64) { + //if true { f = math.Float64frombits(bigen.Uint64(d.r.readx(8))); break; } + if x := d.vs & 0x7; x == bincFlBin32 { + d.decFloatPre(d.vs, 4) + f = float64(math.Float32frombits(bigen.Uint32(d.b[0:4]))) + } else if x == bincFlBin64 { + d.decFloatPre(d.vs, 8) + f = math.Float64frombits(bigen.Uint64(d.b[0:8])) + } else { + d.d.errorf("only float32 and float64 are supported. d.vd: 0x%x, d.vs: 0x%x", d.vd, d.vs) + return + } + return +} + +func (d *bincDecDriver) decUint() (v uint64) { + // need to inline the code (interface conversion and type assertion expensive) + switch d.vs { + case 0: + v = uint64(d.r.readn1()) + case 1: + d.r.readb(d.b[6:8]) + v = uint64(bigen.Uint16(d.b[6:8])) + case 2: + d.b[4] = 0 + d.r.readb(d.b[5:8]) + v = uint64(bigen.Uint32(d.b[4:8])) + case 3: + d.r.readb(d.b[4:8]) + v = uint64(bigen.Uint32(d.b[4:8])) + case 4, 5, 6: + lim := int(7 - d.vs) + d.r.readb(d.b[lim:8]) + for i := 0; i < lim; i++ { + d.b[i] = 0 + } + v = uint64(bigen.Uint64(d.b[:8])) + case 7: + d.r.readb(d.b[:8]) + v = uint64(bigen.Uint64(d.b[:8])) + default: + d.d.errorf("unsigned integers with greater than 64 bits of precision not supported") + return + } + return +} + +func (d *bincDecDriver) decCheckInteger() (ui uint64, neg bool) { + if !d.bdRead { + d.readNextBd() + } + vd, vs := d.vd, d.vs + if vd == bincVdPosInt { + ui = d.decUint() + } else if vd == bincVdNegInt { + ui = d.decUint() + neg = true + } else if vd == bincVdSmallInt { + ui = uint64(d.vs) + 1 + } else if vd == bincVdSpecial { + if vs == bincSpZero { + //i = 0 + } else if vs == bincSpNegOne { + neg = true + ui = 1 + } else { + d.d.errorf("numeric decode fails for special value: d.vs: 0x%x", d.vs) + return + } + } else { + d.d.errorf("number can only be decoded from uint or int values. d.bd: 0x%x, d.vd: 0x%x", d.bd, d.vd) + return + } + return +} + +func (d *bincDecDriver) DecodeInt(bitsize uint8) (i int64) { + ui, neg := d.decCheckInteger() + i, overflow := chkOvf.SignedInt(ui) + if overflow { + d.d.errorf("simple: overflow converting %v to signed integer", ui) + return + } + if neg { + i = -i + } + if chkOvf.Int(i, bitsize) { + d.d.errorf("binc: overflow integer: %v", i) + return + } + d.bdRead = false + return +} + +func (d *bincDecDriver) DecodeUint(bitsize uint8) (ui uint64) { + ui, neg := d.decCheckInteger() + if neg { + d.d.errorf("Assigning negative signed value to unsigned type") + return + } + if chkOvf.Uint(ui, bitsize) { + d.d.errorf("binc: overflow integer: %v", ui) + return + } + d.bdRead = false + return +} + +func (d *bincDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { + if !d.bdRead { + d.readNextBd() + } + vd, vs := d.vd, d.vs + if vd == bincVdSpecial { + d.bdRead = false + if vs == bincSpNan { + return math.NaN() + } else if vs == bincSpPosInf { + return math.Inf(1) + } else if vs == bincSpZeroFloat || vs == bincSpZero { + return + } else if vs == bincSpNegInf { + return math.Inf(-1) + } else { + d.d.errorf("Invalid d.vs decoding float where d.vd=bincVdSpecial: %v", d.vs) + return + } + } else if vd == bincVdFloat { + f = d.decFloat() + } else { + f = float64(d.DecodeInt(64)) + } + if chkOverflow32 && chkOvf.Float32(f) { + d.d.errorf("binc: float32 overflow: %v", f) + return + } + d.bdRead = false + return +} + +// bool can be decoded from bool only (single byte). +func (d *bincDecDriver) DecodeBool() (b bool) { + if !d.bdRead { + d.readNextBd() + } + if bd := d.bd; bd == (bincVdSpecial | bincSpFalse) { + // b = false + } else if bd == (bincVdSpecial | bincSpTrue) { + b = true + } else { + d.d.errorf("Invalid single-byte value for bool: %s: %x", msgBadDesc, d.bd) + return + } + d.bdRead = false + return +} + +func (d *bincDecDriver) ReadMapStart() (length int) { + if d.vd != bincVdMap { + d.d.errorf("Invalid d.vd for map. Expecting 0x%x. Got: 0x%x", bincVdMap, d.vd) + return + } + length = d.decLen() + d.bdRead = false + return +} + +func (d *bincDecDriver) ReadArrayStart() (length int) { + if d.vd != bincVdArray { + d.d.errorf("Invalid d.vd for array. Expecting 0x%x. Got: 0x%x", bincVdArray, d.vd) + return + } + length = d.decLen() + d.bdRead = false + return +} + +func (d *bincDecDriver) decLen() int { + if d.vs > 3 { + return int(d.vs - 4) + } + return int(d.decLenNumber()) +} + +func (d *bincDecDriver) decLenNumber() (v uint64) { + if x := d.vs; x == 0 { + v = uint64(d.r.readn1()) + } else if x == 1 { + d.r.readb(d.b[6:8]) + v = uint64(bigen.Uint16(d.b[6:8])) + } else if x == 2 { + d.r.readb(d.b[4:8]) + v = uint64(bigen.Uint32(d.b[4:8])) + } else { + d.r.readb(d.b[:8]) + v = bigen.Uint64(d.b[:8]) + } + return +} + +func (d *bincDecDriver) decStringAndBytes(bs []byte, withString, zerocopy bool) (bs2 []byte, s string) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == bincVdSpecial<<4|bincSpNil { + d.bdRead = false + return + } + var slen int = -1 + // var ok bool + switch d.vd { + case bincVdString, bincVdByteArray: + slen = d.decLen() + if zerocopy { + if d.br { + bs2 = d.r.readx(slen) + } else if len(bs) == 0 { + bs2 = decByteSlice(d.r, slen, d.b[:]) + } else { + bs2 = decByteSlice(d.r, slen, bs) + } + } else { + bs2 = decByteSlice(d.r, slen, bs) + } + if withString { + s = string(bs2) + } + case bincVdSymbol: + // zerocopy doesn't apply for symbols, + // as the values must be stored in a table for later use. + // + //from vs: extract numSymbolBytes, containsStringVal, strLenPrecision, + //extract symbol + //if containsStringVal, read it and put in map + //else look in map for string value + var symbol uint16 + vs := d.vs + if vs&0x8 == 0 { + symbol = uint16(d.r.readn1()) + } else { + symbol = uint16(bigen.Uint16(d.r.readx(2))) + } + if d.s == nil { + d.s = make([]bincDecSymbol, 0, 16) + } + + if vs&0x4 == 0 { + for i := range d.s { + j := &d.s[i] + if j.i == symbol { + bs2 = j.b + if withString { + if j.s == "" && bs2 != nil { + j.s = string(bs2) + } + s = j.s + } + break + } + } + } else { + switch vs & 0x3 { + case 0: + slen = int(d.r.readn1()) + case 1: + slen = int(bigen.Uint16(d.r.readx(2))) + case 2: + slen = int(bigen.Uint32(d.r.readx(4))) + case 3: + slen = int(bigen.Uint64(d.r.readx(8))) + } + // since using symbols, do not store any part of + // the parameter bs in the map, as it might be a shared buffer. + // bs2 = decByteSlice(d.r, slen, bs) + bs2 = decByteSlice(d.r, slen, nil) + if withString { + s = string(bs2) + } + d.s = append(d.s, bincDecSymbol{i: symbol, s: s, b: bs2}) + } + default: + d.d.errorf("Invalid d.vd. Expecting string:0x%x, bytearray:0x%x or symbol: 0x%x. Got: 0x%x", + bincVdString, bincVdByteArray, bincVdSymbol, d.vd) + return + } + d.bdRead = false + return +} + +func (d *bincDecDriver) DecodeString() (s string) { + // DecodeBytes does not accomodate symbols, whose impl stores string version in map. + // Use decStringAndBytes directly. + // return string(d.DecodeBytes(d.b[:], true, true)) + _, s = d.decStringAndBytes(d.b[:], true, true) + return +} + +func (d *bincDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) { + if isstring { + bsOut, _ = d.decStringAndBytes(bs, false, zerocopy) + return + } + if !d.bdRead { + d.readNextBd() + } + if d.bd == bincVdSpecial<<4|bincSpNil { + d.bdRead = false + return nil + } + var clen int + if d.vd == bincVdString || d.vd == bincVdByteArray { + clen = d.decLen() + } else { + d.d.errorf("Invalid d.vd for bytes. Expecting string:0x%x or bytearray:0x%x. Got: 0x%x", + bincVdString, bincVdByteArray, d.vd) + return + } + d.bdRead = false + if zerocopy { + if d.br { + return d.r.readx(clen) + } else if len(bs) == 0 { + bs = d.b[:] + } + } + return decByteSlice(d.r, clen, bs) +} + +func (d *bincDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) { + if xtag > 0xff { + d.d.errorf("decodeExt: tag must be <= 0xff; got: %v", xtag) + return + } + realxtag1, xbs := d.decodeExtV(ext != nil, uint8(xtag)) + realxtag = uint64(realxtag1) + if ext == nil { + re := rv.(*RawExt) + re.Tag = realxtag + re.Data = detachZeroCopyBytes(d.br, re.Data, xbs) + } else { + ext.ReadExt(rv, xbs) + } + return +} + +func (d *bincDecDriver) decodeExtV(verifyTag bool, tag byte) (xtag byte, xbs []byte) { + if !d.bdRead { + d.readNextBd() + } + if d.vd == bincVdCustomExt { + l := d.decLen() + xtag = d.r.readn1() + if verifyTag && xtag != tag { + d.d.errorf("Wrong extension tag. Got %b. Expecting: %v", xtag, tag) + return + } + xbs = d.r.readx(l) + } else if d.vd == bincVdByteArray { + xbs = d.DecodeBytes(nil, false, true) + } else { + d.d.errorf("Invalid d.vd for extensions (Expecting extensions or byte array). Got: 0x%x", d.vd) + return + } + d.bdRead = false + return +} + +func (d *bincDecDriver) DecodeNaked() { + if !d.bdRead { + d.readNextBd() + } + + n := &d.d.n + var decodeFurther bool + + switch d.vd { + case bincVdSpecial: + switch d.vs { + case bincSpNil: + n.v = valueTypeNil + case bincSpFalse: + n.v = valueTypeBool + n.b = false + case bincSpTrue: + n.v = valueTypeBool + n.b = true + case bincSpNan: + n.v = valueTypeFloat + n.f = math.NaN() + case bincSpPosInf: + n.v = valueTypeFloat + n.f = math.Inf(1) + case bincSpNegInf: + n.v = valueTypeFloat + n.f = math.Inf(-1) + case bincSpZeroFloat: + n.v = valueTypeFloat + n.f = float64(0) + case bincSpZero: + n.v = valueTypeUint + n.u = uint64(0) // int8(0) + case bincSpNegOne: + n.v = valueTypeInt + n.i = int64(-1) // int8(-1) + default: + d.d.errorf("decodeNaked: Unrecognized special value 0x%x", d.vs) + } + case bincVdSmallInt: + n.v = valueTypeUint + n.u = uint64(int8(d.vs)) + 1 // int8(d.vs) + 1 + case bincVdPosInt: + n.v = valueTypeUint + n.u = d.decUint() + case bincVdNegInt: + n.v = valueTypeInt + n.i = -(int64(d.decUint())) + case bincVdFloat: + n.v = valueTypeFloat + n.f = d.decFloat() + case bincVdSymbol: + n.v = valueTypeSymbol + n.s = d.DecodeString() + case bincVdString: + n.v = valueTypeString + n.s = d.DecodeString() + case bincVdByteArray: + n.v = valueTypeBytes + n.l = d.DecodeBytes(nil, false, false) + case bincVdTimestamp: + n.v = valueTypeTimestamp + tt, err := decodeTime(d.r.readx(int(d.vs))) + if err != nil { + panic(err) + } + n.t = tt + case bincVdCustomExt: + n.v = valueTypeExt + l := d.decLen() + n.u = uint64(d.r.readn1()) + n.l = d.r.readx(l) + case bincVdArray: + n.v = valueTypeArray + decodeFurther = true + case bincVdMap: + n.v = valueTypeMap + decodeFurther = true + default: + d.d.errorf("decodeNaked: Unrecognized d.vd: 0x%x", d.vd) + } + + if !decodeFurther { + d.bdRead = false + } + if n.v == valueTypeUint && d.h.SignedInteger { + n.v = valueTypeInt + n.i = int64(n.u) + } + return +} + +//------------------------------------ + +//BincHandle is a Handle for the Binc Schema-Free Encoding Format +//defined at https://github.com/ugorji/binc . +// +//BincHandle currently supports all Binc features with the following EXCEPTIONS: +// - only integers up to 64 bits of precision are supported. +// big integers are unsupported. +// - Only IEEE 754 binary32 and binary64 floats are supported (ie Go float32 and float64 types). +// extended precision and decimal IEEE 754 floats are unsupported. +// - Only UTF-8 strings supported. +// Unicode_Other Binc types (UTF16, UTF32) are currently unsupported. +// +//Note that these EXCEPTIONS are temporary and full support is possible and may happen soon. +type BincHandle struct { + BasicHandle + binaryEncodingType +} + +func (h *BincHandle) SetBytesExt(rt reflect.Type, tag uint64, ext BytesExt) (err error) { + return h.SetExt(rt, tag, &setExtWrapper{b: ext}) +} + +func (h *BincHandle) newEncDriver(e *Encoder) encDriver { + return &bincEncDriver{e: e, w: e.w} +} + +func (h *BincHandle) newDecDriver(d *Decoder) decDriver { + return &bincDecDriver{d: d, r: d.r, h: h, br: d.bytes} +} + +func (e *bincEncDriver) reset() { + e.w = e.e.w +} + +func (d *bincDecDriver) reset() { + d.r = d.d.r +} + +var _ decDriver = (*bincDecDriver)(nil) +var _ encDriver = (*bincEncDriver)(nil) diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/cbor.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/cbor.go new file mode 100644 index 0000000000000..0e5d32b2ea9cf --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/cbor.go @@ -0,0 +1,584 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "math" + "reflect" +) + +const ( + cborMajorUint byte = iota + cborMajorNegInt + cborMajorBytes + cborMajorText + cborMajorArray + cborMajorMap + cborMajorTag + cborMajorOther +) + +const ( + cborBdFalse byte = 0xf4 + iota + cborBdTrue + cborBdNil + cborBdUndefined + cborBdExt + cborBdFloat16 + cborBdFloat32 + cborBdFloat64 +) + +const ( + cborBdIndefiniteBytes byte = 0x5f + cborBdIndefiniteString = 0x7f + cborBdIndefiniteArray = 0x9f + cborBdIndefiniteMap = 0xbf + cborBdBreak = 0xff +) + +const ( + CborStreamBytes byte = 0x5f + CborStreamString = 0x7f + CborStreamArray = 0x9f + CborStreamMap = 0xbf + CborStreamBreak = 0xff +) + +const ( + cborBaseUint byte = 0x00 + cborBaseNegInt = 0x20 + cborBaseBytes = 0x40 + cborBaseString = 0x60 + cborBaseArray = 0x80 + cborBaseMap = 0xa0 + cborBaseTag = 0xc0 + cborBaseSimple = 0xe0 +) + +// ------------------- + +type cborEncDriver struct { + noBuiltInTypes + encNoSeparator + e *Encoder + w encWriter + h *CborHandle + x [8]byte +} + +func (e *cborEncDriver) EncodeNil() { + e.w.writen1(cborBdNil) +} + +func (e *cborEncDriver) EncodeBool(b bool) { + if b { + e.w.writen1(cborBdTrue) + } else { + e.w.writen1(cborBdFalse) + } +} + +func (e *cborEncDriver) EncodeFloat32(f float32) { + e.w.writen1(cborBdFloat32) + bigenHelper{e.x[:4], e.w}.writeUint32(math.Float32bits(f)) +} + +func (e *cborEncDriver) EncodeFloat64(f float64) { + e.w.writen1(cborBdFloat64) + bigenHelper{e.x[:8], e.w}.writeUint64(math.Float64bits(f)) +} + +func (e *cborEncDriver) encUint(v uint64, bd byte) { + if v <= 0x17 { + e.w.writen1(byte(v) + bd) + } else if v <= math.MaxUint8 { + e.w.writen2(bd+0x18, uint8(v)) + } else if v <= math.MaxUint16 { + e.w.writen1(bd + 0x19) + bigenHelper{e.x[:2], e.w}.writeUint16(uint16(v)) + } else if v <= math.MaxUint32 { + e.w.writen1(bd + 0x1a) + bigenHelper{e.x[:4], e.w}.writeUint32(uint32(v)) + } else { // if v <= math.MaxUint64 { + e.w.writen1(bd + 0x1b) + bigenHelper{e.x[:8], e.w}.writeUint64(v) + } +} + +func (e *cborEncDriver) EncodeInt(v int64) { + if v < 0 { + e.encUint(uint64(-1-v), cborBaseNegInt) + } else { + e.encUint(uint64(v), cborBaseUint) + } +} + +func (e *cborEncDriver) EncodeUint(v uint64) { + e.encUint(v, cborBaseUint) +} + +func (e *cborEncDriver) encLen(bd byte, length int) { + e.encUint(uint64(length), bd) +} + +func (e *cborEncDriver) EncodeExt(rv interface{}, xtag uint64, ext Ext, en *Encoder) { + e.encUint(uint64(xtag), cborBaseTag) + if v := ext.ConvertExt(rv); v == nil { + e.EncodeNil() + } else { + en.encode(v) + } +} + +func (e *cborEncDriver) EncodeRawExt(re *RawExt, en *Encoder) { + e.encUint(uint64(re.Tag), cborBaseTag) + if re.Data != nil { + en.encode(re.Data) + } else if re.Value == nil { + e.EncodeNil() + } else { + en.encode(re.Value) + } +} + +func (e *cborEncDriver) EncodeArrayStart(length int) { + e.encLen(cborBaseArray, length) +} + +func (e *cborEncDriver) EncodeMapStart(length int) { + e.encLen(cborBaseMap, length) +} + +func (e *cborEncDriver) EncodeString(c charEncoding, v string) { + e.encLen(cborBaseString, len(v)) + e.w.writestr(v) +} + +func (e *cborEncDriver) EncodeSymbol(v string) { + e.EncodeString(c_UTF8, v) +} + +func (e *cborEncDriver) EncodeStringBytes(c charEncoding, v []byte) { + if c == c_RAW { + e.encLen(cborBaseBytes, len(v)) + } else { + e.encLen(cborBaseString, len(v)) + } + e.w.writeb(v) +} + +// ---------------------- + +type cborDecDriver struct { + d *Decoder + h *CborHandle + r decReader + b [scratchByteArrayLen]byte + br bool // bytes reader + bdRead bool + bd byte + noBuiltInTypes + decNoSeparator +} + +func (d *cborDecDriver) readNextBd() { + d.bd = d.r.readn1() + d.bdRead = true +} + +func (d *cborDecDriver) ContainerType() (vt valueType) { + if d.bd == cborBdNil { + return valueTypeNil + } else if d.bd == cborBdIndefiniteBytes || (d.bd >= cborBaseBytes && d.bd < cborBaseString) { + return valueTypeBytes + } else if d.bd == cborBdIndefiniteString || (d.bd >= cborBaseString && d.bd < cborBaseArray) { + return valueTypeString + } else if d.bd == cborBdIndefiniteArray || (d.bd >= cborBaseArray && d.bd < cborBaseMap) { + return valueTypeArray + } else if d.bd == cborBdIndefiniteMap || (d.bd >= cborBaseMap && d.bd < cborBaseTag) { + return valueTypeMap + } else { + // d.d.errorf("isContainerType: unsupported parameter: %v", vt) + } + return valueTypeUnset +} + +func (d *cborDecDriver) TryDecodeAsNil() bool { + if !d.bdRead { + d.readNextBd() + } + // treat Nil and Undefined as nil values + if d.bd == cborBdNil || d.bd == cborBdUndefined { + d.bdRead = false + return true + } + return false +} + +func (d *cborDecDriver) CheckBreak() bool { + if !d.bdRead { + d.readNextBd() + } + if d.bd == cborBdBreak { + d.bdRead = false + return true + } + return false +} + +func (d *cborDecDriver) decUint() (ui uint64) { + v := d.bd & 0x1f + if v <= 0x17 { + ui = uint64(v) + } else { + if v == 0x18 { + ui = uint64(d.r.readn1()) + } else if v == 0x19 { + ui = uint64(bigen.Uint16(d.r.readx(2))) + } else if v == 0x1a { + ui = uint64(bigen.Uint32(d.r.readx(4))) + } else if v == 0x1b { + ui = uint64(bigen.Uint64(d.r.readx(8))) + } else { + d.d.errorf("decUint: Invalid descriptor: %v", d.bd) + return + } + } + return +} + +func (d *cborDecDriver) decCheckInteger() (neg bool) { + if !d.bdRead { + d.readNextBd() + } + major := d.bd >> 5 + if major == cborMajorUint { + } else if major == cborMajorNegInt { + neg = true + } else { + d.d.errorf("invalid major: %v (bd: %v)", major, d.bd) + return + } + return +} + +func (d *cborDecDriver) DecodeInt(bitsize uint8) (i int64) { + neg := d.decCheckInteger() + ui := d.decUint() + // check if this number can be converted to an int without overflow + var overflow bool + if neg { + if i, overflow = chkOvf.SignedInt(ui + 1); overflow { + d.d.errorf("cbor: overflow converting %v to signed integer", ui+1) + return + } + i = -i + } else { + if i, overflow = chkOvf.SignedInt(ui); overflow { + d.d.errorf("cbor: overflow converting %v to signed integer", ui) + return + } + } + if chkOvf.Int(i, bitsize) { + d.d.errorf("cbor: overflow integer: %v", i) + return + } + d.bdRead = false + return +} + +func (d *cborDecDriver) DecodeUint(bitsize uint8) (ui uint64) { + if d.decCheckInteger() { + d.d.errorf("Assigning negative signed value to unsigned type") + return + } + ui = d.decUint() + if chkOvf.Uint(ui, bitsize) { + d.d.errorf("cbor: overflow integer: %v", ui) + return + } + d.bdRead = false + return +} + +func (d *cborDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { + if !d.bdRead { + d.readNextBd() + } + if bd := d.bd; bd == cborBdFloat16 { + f = float64(math.Float32frombits(halfFloatToFloatBits(bigen.Uint16(d.r.readx(2))))) + } else if bd == cborBdFloat32 { + f = float64(math.Float32frombits(bigen.Uint32(d.r.readx(4)))) + } else if bd == cborBdFloat64 { + f = math.Float64frombits(bigen.Uint64(d.r.readx(8))) + } else if bd >= cborBaseUint && bd < cborBaseBytes { + f = float64(d.DecodeInt(64)) + } else { + d.d.errorf("Float only valid from float16/32/64: Invalid descriptor: %v", bd) + return + } + if chkOverflow32 && chkOvf.Float32(f) { + d.d.errorf("cbor: float32 overflow: %v", f) + return + } + d.bdRead = false + return +} + +// bool can be decoded from bool only (single byte). +func (d *cborDecDriver) DecodeBool() (b bool) { + if !d.bdRead { + d.readNextBd() + } + if bd := d.bd; bd == cborBdTrue { + b = true + } else if bd == cborBdFalse { + } else { + d.d.errorf("Invalid single-byte value for bool: %s: %x", msgBadDesc, d.bd) + return + } + d.bdRead = false + return +} + +func (d *cborDecDriver) ReadMapStart() (length int) { + d.bdRead = false + if d.bd == cborBdIndefiniteMap { + return -1 + } + return d.decLen() +} + +func (d *cborDecDriver) ReadArrayStart() (length int) { + d.bdRead = false + if d.bd == cborBdIndefiniteArray { + return -1 + } + return d.decLen() +} + +func (d *cborDecDriver) decLen() int { + return int(d.decUint()) +} + +func (d *cborDecDriver) decAppendIndefiniteBytes(bs []byte) []byte { + d.bdRead = false + for { + if d.CheckBreak() { + break + } + if major := d.bd >> 5; major != cborMajorBytes && major != cborMajorText { + d.d.errorf("cbor: expect bytes or string major type in indefinite string/bytes; got: %v, byte: %v", major, d.bd) + return nil + } + n := d.decLen() + oldLen := len(bs) + newLen := oldLen + n + if newLen > cap(bs) { + bs2 := make([]byte, newLen, 2*cap(bs)+n) + copy(bs2, bs) + bs = bs2 + } else { + bs = bs[:newLen] + } + d.r.readb(bs[oldLen:newLen]) + // bs = append(bs, d.r.readn()...) + d.bdRead = false + } + d.bdRead = false + return bs +} + +func (d *cborDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == cborBdNil || d.bd == cborBdUndefined { + d.bdRead = false + return nil + } + if d.bd == cborBdIndefiniteBytes || d.bd == cborBdIndefiniteString { + if bs == nil { + return d.decAppendIndefiniteBytes(nil) + } + return d.decAppendIndefiniteBytes(bs[:0]) + } + clen := d.decLen() + d.bdRead = false + if zerocopy { + if d.br { + return d.r.readx(clen) + } else if len(bs) == 0 { + bs = d.b[:] + } + } + return decByteSlice(d.r, clen, bs) +} + +func (d *cborDecDriver) DecodeString() (s string) { + return string(d.DecodeBytes(d.b[:], true, true)) +} + +func (d *cborDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) { + if !d.bdRead { + d.readNextBd() + } + u := d.decUint() + d.bdRead = false + realxtag = u + if ext == nil { + re := rv.(*RawExt) + re.Tag = realxtag + d.d.decode(&re.Value) + } else if xtag != realxtag { + d.d.errorf("Wrong extension tag. Got %b. Expecting: %v", realxtag, xtag) + return + } else { + var v interface{} + d.d.decode(&v) + ext.UpdateExt(rv, v) + } + d.bdRead = false + return +} + +func (d *cborDecDriver) DecodeNaked() { + if !d.bdRead { + d.readNextBd() + } + + n := &d.d.n + var decodeFurther bool + + switch d.bd { + case cborBdNil: + n.v = valueTypeNil + case cborBdFalse: + n.v = valueTypeBool + n.b = false + case cborBdTrue: + n.v = valueTypeBool + n.b = true + case cborBdFloat16, cborBdFloat32: + n.v = valueTypeFloat + n.f = d.DecodeFloat(true) + case cborBdFloat64: + n.v = valueTypeFloat + n.f = d.DecodeFloat(false) + case cborBdIndefiniteBytes: + n.v = valueTypeBytes + n.l = d.DecodeBytes(nil, false, false) + case cborBdIndefiniteString: + n.v = valueTypeString + n.s = d.DecodeString() + case cborBdIndefiniteArray: + n.v = valueTypeArray + decodeFurther = true + case cborBdIndefiniteMap: + n.v = valueTypeMap + decodeFurther = true + default: + switch { + case d.bd >= cborBaseUint && d.bd < cborBaseNegInt: + if d.h.SignedInteger { + n.v = valueTypeInt + n.i = d.DecodeInt(64) + } else { + n.v = valueTypeUint + n.u = d.DecodeUint(64) + } + case d.bd >= cborBaseNegInt && d.bd < cborBaseBytes: + n.v = valueTypeInt + n.i = d.DecodeInt(64) + case d.bd >= cborBaseBytes && d.bd < cborBaseString: + n.v = valueTypeBytes + n.l = d.DecodeBytes(nil, false, false) + case d.bd >= cborBaseString && d.bd < cborBaseArray: + n.v = valueTypeString + n.s = d.DecodeString() + case d.bd >= cborBaseArray && d.bd < cborBaseMap: + n.v = valueTypeArray + decodeFurther = true + case d.bd >= cborBaseMap && d.bd < cborBaseTag: + n.v = valueTypeMap + decodeFurther = true + case d.bd >= cborBaseTag && d.bd < cborBaseSimple: + n.v = valueTypeExt + n.u = d.decUint() + n.l = nil + d.bdRead = false + // d.d.decode(&re.Value) // handled by decode itself. + // decodeFurther = true + default: + d.d.errorf("decodeNaked: Unrecognized d.bd: 0x%x", d.bd) + return + } + } + + if !decodeFurther { + d.bdRead = false + } + return +} + +// ------------------------- + +// CborHandle is a Handle for the CBOR encoding format, +// defined at http://tools.ietf.org/html/rfc7049 and documented further at http://cbor.io . +// +// CBOR is comprehensively supported, including support for: +// - indefinite-length arrays/maps/bytes/strings +// - (extension) tags in range 0..0xffff (0 .. 65535) +// - half, single and double-precision floats +// - all numbers (1, 2, 4 and 8-byte signed and unsigned integers) +// - nil, true, false, ... +// - arrays and maps, bytes and text strings +// +// None of the optional extensions (with tags) defined in the spec are supported out-of-the-box. +// Users can implement them as needed (using SetExt), including spec-documented ones: +// - timestamp, BigNum, BigFloat, Decimals, Encoded Text (e.g. URL, regexp, base64, MIME Message), etc. +// +// To encode with indefinite lengths (streaming), users will use +// (Must)Encode methods of *Encoder, along with writing CborStreamXXX constants. +// +// For example, to encode "one-byte" as an indefinite length string: +// var buf bytes.Buffer +// e := NewEncoder(&buf, new(CborHandle)) +// buf.WriteByte(CborStreamString) +// e.MustEncode("one-") +// e.MustEncode("byte") +// buf.WriteByte(CborStreamBreak) +// encodedBytes := buf.Bytes() +// var vv interface{} +// NewDecoderBytes(buf.Bytes(), new(CborHandle)).MustDecode(&vv) +// // Now, vv contains the same string "one-byte" +// +type CborHandle struct { + binaryEncodingType + BasicHandle +} + +func (h *CborHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceExt) (err error) { + return h.SetExt(rt, tag, &setExtWrapper{i: ext}) +} + +func (h *CborHandle) newEncDriver(e *Encoder) encDriver { + return &cborEncDriver{e: e, w: e.w, h: h} +} + +func (h *CborHandle) newDecDriver(d *Decoder) decDriver { + return &cborDecDriver{d: d, r: d.r, h: h, br: d.bytes} +} + +func (e *cborEncDriver) reset() { + e.w = e.e.w +} + +func (d *cborDecDriver) reset() { + d.r = d.d.r +} + +var _ decDriver = (*cborDecDriver)(nil) +var _ encDriver = (*cborEncDriver)(nil) diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/decode.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/decode.go new file mode 100644 index 0000000000000..b3b99f036706d --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/decode.go @@ -0,0 +1,2015 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "encoding" + "errors" + "fmt" + "io" + "reflect" + "time" +) + +// Some tagging information for error messages. +const ( + msgBadDesc = "Unrecognized descriptor byte" + msgDecCannotExpandArr = "cannot expand go array from %v to stream length: %v" +) + +var ( + onlyMapOrArrayCanDecodeIntoStructErr = errors.New("only encoded map or array can be decoded into a struct") + cannotDecodeIntoNilErr = errors.New("cannot decode into nil") +) + +// decReader abstracts the reading source, allowing implementations that can +// read from an io.Reader or directly off a byte slice with zero-copying. +type decReader interface { + unreadn1() + + // readx will use the implementation scratch buffer if possible i.e. n < len(scratchbuf), OR + // just return a view of the []byte being decoded from. + // Ensure you call detachZeroCopyBytes later if this needs to be sent outside codec control. + readx(n int) []byte + readb([]byte) + readn1() uint8 + readn1eof() (v uint8, eof bool) + numread() int // number of bytes read + track() + stopTrack() []byte +} + +type decReaderByteScanner interface { + io.Reader + io.ByteScanner +} + +type decDriver interface { + // this will check if the next token is a break. + CheckBreak() bool + TryDecodeAsNil() bool + // vt is one of: Bytes, String, Nil, Slice or Map. Return unSet if not known. + ContainerType() (vt valueType) + IsBuiltinType(rt uintptr) bool + DecodeBuiltin(rt uintptr, v interface{}) + + // DecodeNaked will decode primitives (number, bool, string, []byte) and RawExt. + // For maps and arrays, it will not do the decoding in-band, but will signal + // the decoder, so that is done later, by setting the decNaked.valueType field. + // + // Note: Numbers are decoded as int64, uint64, float64 only (no smaller sized number types). + // for extensions, DecodeNaked must read the tag and the []byte if it exists. + // if the []byte is not read, then kInterfaceNaked will treat it as a Handle + // that stores the subsequent value in-band, and complete reading the RawExt. + // + // extensions should also use readx to decode them, for efficiency. + // kInterface will extract the detached byte slice if it has to pass it outside its realm. + DecodeNaked() + DecodeInt(bitsize uint8) (i int64) + DecodeUint(bitsize uint8) (ui uint64) + DecodeFloat(chkOverflow32 bool) (f float64) + DecodeBool() (b bool) + // DecodeString can also decode symbols. + // It looks redundant as DecodeBytes is available. + // However, some codecs (e.g. binc) support symbols and can + // return a pre-stored string value, meaning that it can bypass + // the cost of []byte->string conversion. + DecodeString() (s string) + + // DecodeBytes may be called directly, without going through reflection. + // Consequently, it must be designed to handle possible nil. + DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) + + // decodeExt will decode into a *RawExt or into an extension. + DecodeExt(v interface{}, xtag uint64, ext Ext) (realxtag uint64) + // decodeExt(verifyTag bool, tag byte) (xtag byte, xbs []byte) + ReadMapStart() int + ReadArrayStart() int + + reset() + uncacheRead() +} + +type decNoSeparator struct{} + +func (_ decNoSeparator) ReadEnd() {} +func (_ decNoSeparator) uncacheRead() {} + +type DecodeOptions struct { + // MapType specifies type to use during schema-less decoding of a map in the stream. + // If nil, we use map[interface{}]interface{} + MapType reflect.Type + + // SliceType specifies type to use during schema-less decoding of an array in the stream. + // If nil, we use []interface{} + SliceType reflect.Type + + // MaxInitLen defines the initial length that we "make" a collection (slice, chan or map) with. + // If 0 or negative, we default to a sensible value based on the size of an element in the collection. + // + // For example, when decoding, a stream may say that it has MAX_UINT elements. + // We should not auto-matically provision a slice of that length, to prevent Out-Of-Memory crash. + // Instead, we provision up to MaxInitLen, fill that up, and start appending after that. + MaxInitLen int + + // If ErrorIfNoField, return an error when decoding a map + // from a codec stream into a struct, and no matching struct field is found. + ErrorIfNoField bool + + // If ErrorIfNoArrayExpand, return an error when decoding a slice/array that cannot be expanded. + // For example, the stream contains an array of 8 items, but you are decoding into a [4]T array, + // or you are decoding into a slice of length 4 which is non-addressable (and so cannot be set). + ErrorIfNoArrayExpand bool + + // If SignedInteger, use the int64 during schema-less decoding of unsigned values (not uint64). + SignedInteger bool + + // MapValueReset controls how we decode into a map value. + // + // By default, we MAY retrieve the mapping for a key, and then decode into that. + // However, especially with big maps, that retrieval may be expensive and unnecessary + // if the stream already contains all that is necessary to recreate the value. + // + // If true, we will never retrieve the previous mapping, + // but rather decode into a new value and set that in the map. + // + // If false, we will retrieve the previous mapping if necessary e.g. + // the previous mapping is a pointer, or is a struct or array with pre-set state, + // or is an interface. + MapValueReset bool + + // InterfaceReset controls how we decode into an interface. + // + // By default, when we see a field that is an interface{...}, + // or a map with interface{...} value, we will attempt decoding into the + // "contained" value. + // + // However, this prevents us from reading a string into an interface{} + // that formerly contained a number. + // + // If true, we will decode into a new "blank" value, and set that in the interface. + // If false, we will decode into whatever is contained in the interface. + InterfaceReset bool + + // InternString controls interning of strings during decoding. + // + // Some handles, e.g. json, typically will read map keys as strings. + // If the set of keys are finite, it may help reduce allocation to + // look them up from a map (than to allocate them afresh). + // + // Note: Handles will be smart when using the intern functionality. + // So everything will not be interned. + InternString bool +} + +// ------------------------------------ + +// ioDecByteScanner implements Read(), ReadByte(...), UnreadByte(...) methods +// of io.Reader, io.ByteScanner. +type ioDecByteScanner struct { + r io.Reader + l byte // last byte + ls byte // last byte status. 0: init-canDoNothing, 1: canRead, 2: canUnread + b [1]byte // tiny buffer for reading single bytes +} + +func (z *ioDecByteScanner) Read(p []byte) (n int, err error) { + var firstByte bool + if z.ls == 1 { + z.ls = 2 + p[0] = z.l + if len(p) == 1 { + n = 1 + return + } + firstByte = true + p = p[1:] + } + n, err = z.r.Read(p) + if n > 0 { + if err == io.EOF && n == len(p) { + err = nil // read was successful, so postpone EOF (till next time) + } + z.l = p[n-1] + z.ls = 2 + } + if firstByte { + n++ + } + return +} + +func (z *ioDecByteScanner) ReadByte() (c byte, err error) { + n, err := z.Read(z.b[:]) + if n == 1 { + c = z.b[0] + if err == io.EOF { + err = nil // read was successful, so postpone EOF (till next time) + } + } + return +} + +func (z *ioDecByteScanner) UnreadByte() (err error) { + x := z.ls + if x == 0 { + err = errors.New("cannot unread - nothing has been read") + } else if x == 1 { + err = errors.New("cannot unread - last byte has not been read") + } else if x == 2 { + z.ls = 1 + } + return +} + +// ioDecReader is a decReader that reads off an io.Reader +type ioDecReader struct { + br decReaderByteScanner + // temp byte array re-used internally for efficiency during read. + // shares buffer with Decoder, so we keep size of struct within 8 words. + x *[scratchByteArrayLen]byte + bs ioDecByteScanner + n int // num read + tr []byte // tracking bytes read + trb bool +} + +func (z *ioDecReader) numread() int { + return z.n +} + +func (z *ioDecReader) readx(n int) (bs []byte) { + if n <= 0 { + return + } + if n < len(z.x) { + bs = z.x[:n] + } else { + bs = make([]byte, n) + } + if _, err := io.ReadAtLeast(z.br, bs, n); err != nil { + panic(err) + } + z.n += len(bs) + if z.trb { + z.tr = append(z.tr, bs...) + } + return +} + +func (z *ioDecReader) readb(bs []byte) { + if len(bs) == 0 { + return + } + n, err := io.ReadAtLeast(z.br, bs, len(bs)) + z.n += n + if err != nil { + panic(err) + } + if z.trb { + z.tr = append(z.tr, bs...) + } +} + +func (z *ioDecReader) readn1() (b uint8) { + b, err := z.br.ReadByte() + if err != nil { + panic(err) + } + z.n++ + if z.trb { + z.tr = append(z.tr, b) + } + return b +} + +func (z *ioDecReader) readn1eof() (b uint8, eof bool) { + b, err := z.br.ReadByte() + if err == nil { + z.n++ + if z.trb { + z.tr = append(z.tr, b) + } + } else if err == io.EOF { + eof = true + } else { + panic(err) + } + return +} + +func (z *ioDecReader) unreadn1() { + err := z.br.UnreadByte() + if err != nil { + panic(err) + } + z.n-- + if z.trb { + if l := len(z.tr) - 1; l >= 0 { + z.tr = z.tr[:l] + } + } +} + +func (z *ioDecReader) track() { + if z.tr != nil { + z.tr = z.tr[:0] + } + z.trb = true +} + +func (z *ioDecReader) stopTrack() (bs []byte) { + z.trb = false + return z.tr +} + +// ------------------------------------ + +var bytesDecReaderCannotUnreadErr = errors.New("cannot unread last byte read") + +// bytesDecReader is a decReader that reads off a byte slice with zero copying +type bytesDecReader struct { + b []byte // data + c int // cursor + a int // available + t int // track start +} + +func (z *bytesDecReader) reset(in []byte) { + z.b = in + z.a = len(in) + z.c = 0 + z.t = 0 +} + +func (z *bytesDecReader) numread() int { + return z.c +} + +func (z *bytesDecReader) unreadn1() { + if z.c == 0 || len(z.b) == 0 { + panic(bytesDecReaderCannotUnreadErr) + } + z.c-- + z.a++ + return +} + +func (z *bytesDecReader) readx(n int) (bs []byte) { + // slicing from a non-constant start position is more expensive, + // as more computation is required to decipher the pointer start position. + // However, we do it only once, and it's better than reslicing both z.b and return value. + + if n <= 0 { + } else if z.a == 0 { + panic(io.EOF) + } else if n > z.a { + panic(io.ErrUnexpectedEOF) + } else { + c0 := z.c + z.c = c0 + n + z.a = z.a - n + bs = z.b[c0:z.c] + } + return +} + +func (z *bytesDecReader) readn1() (v uint8) { + if z.a == 0 { + panic(io.EOF) + } + v = z.b[z.c] + z.c++ + z.a-- + return +} + +func (z *bytesDecReader) readn1eof() (v uint8, eof bool) { + if z.a == 0 { + eof = true + return + } + v = z.b[z.c] + z.c++ + z.a-- + return +} + +func (z *bytesDecReader) readb(bs []byte) { + copy(bs, z.readx(len(bs))) +} + +func (z *bytesDecReader) track() { + z.t = z.c +} + +func (z *bytesDecReader) stopTrack() (bs []byte) { + return z.b[z.t:z.c] +} + +// ------------------------------------ + +type decFnInfo struct { + d *Decoder + ti *typeInfo + xfFn Ext + xfTag uint64 + seq seqType +} + +// ---------------------------------------- + +type decFn struct { + i decFnInfo + f func(*decFnInfo, reflect.Value) +} + +func (f *decFnInfo) builtin(rv reflect.Value) { + f.d.d.DecodeBuiltin(f.ti.rtid, rv.Addr().Interface()) +} + +func (f *decFnInfo) rawExt(rv reflect.Value) { + f.d.d.DecodeExt(rv.Addr().Interface(), 0, nil) +} + +func (f *decFnInfo) ext(rv reflect.Value) { + f.d.d.DecodeExt(rv.Addr().Interface(), f.xfTag, f.xfFn) +} + +func (f *decFnInfo) getValueForUnmarshalInterface(rv reflect.Value, indir int8) (v interface{}) { + if indir == -1 { + v = rv.Addr().Interface() + } else if indir == 0 { + v = rv.Interface() + } else { + for j := int8(0); j < indir; j++ { + if rv.IsNil() { + rv.Set(reflect.New(rv.Type().Elem())) + } + rv = rv.Elem() + } + v = rv.Interface() + } + return +} + +func (f *decFnInfo) selferUnmarshal(rv reflect.Value) { + f.getValueForUnmarshalInterface(rv, f.ti.csIndir).(Selfer).CodecDecodeSelf(f.d) +} + +func (f *decFnInfo) binaryUnmarshal(rv reflect.Value) { + bm := f.getValueForUnmarshalInterface(rv, f.ti.bunmIndir).(encoding.BinaryUnmarshaler) + xbs := f.d.d.DecodeBytes(nil, false, true) + if fnerr := bm.UnmarshalBinary(xbs); fnerr != nil { + panic(fnerr) + } +} + +func (f *decFnInfo) textUnmarshal(rv reflect.Value) { + tm := f.getValueForUnmarshalInterface(rv, f.ti.tunmIndir).(encoding.TextUnmarshaler) + fnerr := tm.UnmarshalText(f.d.d.DecodeBytes(f.d.b[:], true, true)) + if fnerr != nil { + panic(fnerr) + } +} + +func (f *decFnInfo) jsonUnmarshal(rv reflect.Value) { + tm := f.getValueForUnmarshalInterface(rv, f.ti.junmIndir).(jsonUnmarshaler) + // bs := f.d.d.DecodeBytes(f.d.b[:], true, true) + // grab the bytes to be read, as UnmarshalJSON needs the full JSON so as to unmarshal it itself. + fnerr := tm.UnmarshalJSON(f.d.nextValueBytes()) + if fnerr != nil { + panic(fnerr) + } +} + +func (f *decFnInfo) kErr(rv reflect.Value) { + f.d.errorf("no decoding function defined for kind %v", rv.Kind()) +} + +func (f *decFnInfo) kString(rv reflect.Value) { + rv.SetString(f.d.d.DecodeString()) +} + +func (f *decFnInfo) kBool(rv reflect.Value) { + rv.SetBool(f.d.d.DecodeBool()) +} + +func (f *decFnInfo) kInt(rv reflect.Value) { + rv.SetInt(f.d.d.DecodeInt(intBitsize)) +} + +func (f *decFnInfo) kInt64(rv reflect.Value) { + rv.SetInt(f.d.d.DecodeInt(64)) +} + +func (f *decFnInfo) kInt32(rv reflect.Value) { + rv.SetInt(f.d.d.DecodeInt(32)) +} + +func (f *decFnInfo) kInt8(rv reflect.Value) { + rv.SetInt(f.d.d.DecodeInt(8)) +} + +func (f *decFnInfo) kInt16(rv reflect.Value) { + rv.SetInt(f.d.d.DecodeInt(16)) +} + +func (f *decFnInfo) kFloat32(rv reflect.Value) { + rv.SetFloat(f.d.d.DecodeFloat(true)) +} + +func (f *decFnInfo) kFloat64(rv reflect.Value) { + rv.SetFloat(f.d.d.DecodeFloat(false)) +} + +func (f *decFnInfo) kUint8(rv reflect.Value) { + rv.SetUint(f.d.d.DecodeUint(8)) +} + +func (f *decFnInfo) kUint64(rv reflect.Value) { + rv.SetUint(f.d.d.DecodeUint(64)) +} + +func (f *decFnInfo) kUint(rv reflect.Value) { + rv.SetUint(f.d.d.DecodeUint(uintBitsize)) +} + +func (f *decFnInfo) kUintptr(rv reflect.Value) { + rv.SetUint(f.d.d.DecodeUint(uintBitsize)) +} + +func (f *decFnInfo) kUint32(rv reflect.Value) { + rv.SetUint(f.d.d.DecodeUint(32)) +} + +func (f *decFnInfo) kUint16(rv reflect.Value) { + rv.SetUint(f.d.d.DecodeUint(16)) +} + +// func (f *decFnInfo) kPtr(rv reflect.Value) { +// debugf(">>>>>>> ??? decode kPtr called - shouldn't get called") +// if rv.IsNil() { +// rv.Set(reflect.New(rv.Type().Elem())) +// } +// f.d.decodeValue(rv.Elem()) +// } + +// var kIntfCtr uint64 + +func (f *decFnInfo) kInterfaceNaked() (rvn reflect.Value) { + // nil interface: + // use some hieristics to decode it appropriately + // based on the detected next value in the stream. + d := f.d + d.d.DecodeNaked() + n := &d.n + if n.v == valueTypeNil { + return + } + // We cannot decode non-nil stream value into nil interface with methods (e.g. io.Reader). + // if num := f.ti.rt.NumMethod(); num > 0 { + if f.ti.numMeth > 0 { + d.errorf("cannot decode non-nil codec value into nil %v (%v methods)", f.ti.rt, f.ti.numMeth) + return + } + // var useRvn bool + switch n.v { + case valueTypeMap: + // if d.h.MapType == nil || d.h.MapType == mapIntfIntfTyp { + // } else if d.h.MapType == mapStrIntfTyp { // for json performance + // } + if d.mtid == 0 || d.mtid == mapIntfIntfTypId { + l := len(n.ms) + n.ms = append(n.ms, nil) + d.decode(&n.ms[l]) + rvn = reflect.ValueOf(&n.ms[l]).Elem() + n.ms = n.ms[:l] + } else if d.mtid == mapStrIntfTypId { // for json performance + l := len(n.ns) + n.ns = append(n.ns, nil) + d.decode(&n.ns[l]) + rvn = reflect.ValueOf(&n.ns[l]).Elem() + n.ns = n.ns[:l] + } else { + rvn = reflect.New(d.h.MapType).Elem() + d.decodeValue(rvn, nil) + } + case valueTypeArray: + // if d.h.SliceType == nil || d.h.SliceType == intfSliceTyp { + if d.stid == 0 || d.stid == intfSliceTypId { + l := len(n.ss) + n.ss = append(n.ss, nil) + d.decode(&n.ss[l]) + rvn = reflect.ValueOf(&n.ss[l]).Elem() + n.ss = n.ss[:l] + } else { + rvn = reflect.New(d.h.SliceType).Elem() + d.decodeValue(rvn, nil) + } + case valueTypeExt: + var v interface{} + tag, bytes := n.u, n.l // calling decode below might taint the values + if bytes == nil { + l := len(n.is) + n.is = append(n.is, nil) + v2 := &n.is[l] + n.is = n.is[:l] + d.decode(v2) + v = *v2 + } + bfn := d.h.getExtForTag(tag) + if bfn == nil { + var re RawExt + re.Tag = tag + re.Data = detachZeroCopyBytes(d.bytes, nil, bytes) + rvn = reflect.ValueOf(re) + } else { + rvnA := reflect.New(bfn.rt) + rvn = rvnA.Elem() + if bytes != nil { + bfn.ext.ReadExt(rvnA.Interface(), bytes) + } else { + bfn.ext.UpdateExt(rvnA.Interface(), v) + } + } + case valueTypeNil: + // no-op + case valueTypeInt: + rvn = reflect.ValueOf(&n.i).Elem() + case valueTypeUint: + rvn = reflect.ValueOf(&n.u).Elem() + case valueTypeFloat: + rvn = reflect.ValueOf(&n.f).Elem() + case valueTypeBool: + rvn = reflect.ValueOf(&n.b).Elem() + case valueTypeString, valueTypeSymbol: + rvn = reflect.ValueOf(&n.s).Elem() + case valueTypeBytes: + rvn = reflect.ValueOf(&n.l).Elem() + case valueTypeTimestamp: + rvn = reflect.ValueOf(&n.t).Elem() + default: + panic(fmt.Errorf("kInterfaceNaked: unexpected valueType: %d", n.v)) + } + return +} + +func (f *decFnInfo) kInterface(rv reflect.Value) { + // debugf("\t===> kInterface") + + // Note: + // A consequence of how kInterface works, is that + // if an interface already contains something, we try + // to decode into what was there before. + // We do not replace with a generic value (as got from decodeNaked). + + var rvn reflect.Value + if rv.IsNil() { + rvn = f.kInterfaceNaked() + if rvn.IsValid() { + rv.Set(rvn) + } + } else if f.d.h.InterfaceReset { + rvn = f.kInterfaceNaked() + if rvn.IsValid() { + rv.Set(rvn) + } else { + // reset to zero value based on current type in there. + rv.Set(reflect.Zero(rv.Elem().Type())) + } + } else { + rvn = rv.Elem() + // Note: interface{} is settable, but underlying type may not be. + // Consequently, we have to set the reflect.Value directly. + // if underlying type is settable (e.g. ptr or interface), + // we just decode into it. + // Else we create a settable value, decode into it, and set on the interface. + if rvn.CanSet() { + f.d.decodeValue(rvn, nil) + } else { + rvn2 := reflect.New(rvn.Type()).Elem() + rvn2.Set(rvn) + f.d.decodeValue(rvn2, nil) + rv.Set(rvn2) + } + } +} + +func (f *decFnInfo) kStruct(rv reflect.Value) { + fti := f.ti + d := f.d + dd := d.d + cr := d.cr + ctyp := dd.ContainerType() + if ctyp == valueTypeMap { + containerLen := dd.ReadMapStart() + if containerLen == 0 { + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return + } + tisfi := fti.sfi + hasLen := containerLen >= 0 + if hasLen { + for j := 0; j < containerLen; j++ { + // rvkencname := dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + rvkencname := stringView(dd.DecodeBytes(f.d.b[:], true, true)) + // rvksi := ti.getForEncName(rvkencname) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if k := fti.indexForEncName(rvkencname); k > -1 { + si := tisfi[k] + if dd.TryDecodeAsNil() { + si.setToZeroValue(rv) + } else { + d.decodeValue(si.field(rv, true), nil) + } + } else { + d.structFieldNotFound(-1, rvkencname) + } + } + } else { + for j := 0; !dd.CheckBreak(); j++ { + // rvkencname := dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + rvkencname := stringView(dd.DecodeBytes(f.d.b[:], true, true)) + // rvksi := ti.getForEncName(rvkencname) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if k := fti.indexForEncName(rvkencname); k > -1 { + si := tisfi[k] + if dd.TryDecodeAsNil() { + si.setToZeroValue(rv) + } else { + d.decodeValue(si.field(rv, true), nil) + } + } else { + d.structFieldNotFound(-1, rvkencname) + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + } else if ctyp == valueTypeArray { + containerLen := dd.ReadArrayStart() + if containerLen == 0 { + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } + return + } + // Not much gain from doing it two ways for array. + // Arrays are not used as much for structs. + hasLen := containerLen >= 0 + for j, si := range fti.sfip { + if hasLen { + if j == containerLen { + break + } + } else if dd.CheckBreak() { + break + } + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + if dd.TryDecodeAsNil() { + si.setToZeroValue(rv) + } else { + d.decodeValue(si.field(rv, true), nil) + } + } + if containerLen > len(fti.sfip) { + // read remaining values and throw away + for j := len(fti.sfip); j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + d.structFieldNotFound(j, "") + } + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } + } else { + f.d.error(onlyMapOrArrayCanDecodeIntoStructErr) + return + } +} + +func (f *decFnInfo) kSlice(rv reflect.Value) { + // A slice can be set from a map or array in stream. + // This way, the order can be kept (as order is lost with map). + ti := f.ti + d := f.d + dd := d.d + rtelem0 := ti.rt.Elem() + ctyp := dd.ContainerType() + if ctyp == valueTypeBytes || ctyp == valueTypeString { + // you can only decode bytes or string in the stream into a slice or array of bytes + if !(ti.rtid == uint8SliceTypId || rtelem0.Kind() == reflect.Uint8) { + f.d.errorf("bytes or string in the stream must be decoded into a slice or array of bytes, not %v", ti.rt) + } + if f.seq == seqTypeChan { + bs2 := dd.DecodeBytes(nil, false, true) + ch := rv.Interface().(chan<- byte) + for _, b := range bs2 { + ch <- b + } + } else { + rvbs := rv.Bytes() + bs2 := dd.DecodeBytes(rvbs, false, false) + if rvbs == nil && bs2 != nil || rvbs != nil && bs2 == nil || len(bs2) != len(rvbs) { + if rv.CanSet() { + rv.SetBytes(bs2) + } else { + copy(rvbs, bs2) + } + } + } + return + } + + // array := f.seq == seqTypeChan + + slh, containerLenS := d.decSliceHelperStart() // only expects valueType(Array|Map) + + // // an array can never return a nil slice. so no need to check f.array here. + if containerLenS == 0 { + if f.seq == seqTypeSlice { + if rv.IsNil() { + rv.Set(reflect.MakeSlice(ti.rt, 0, 0)) + } else { + rv.SetLen(0) + } + } else if f.seq == seqTypeChan { + if rv.IsNil() { + rv.Set(reflect.MakeChan(ti.rt, 0)) + } + } + slh.End() + return + } + + rtelem := rtelem0 + for rtelem.Kind() == reflect.Ptr { + rtelem = rtelem.Elem() + } + fn := d.getDecFn(rtelem, true, true) + + var rv0, rv9 reflect.Value + rv0 = rv + rvChanged := false + + // for j := 0; j < containerLenS; j++ { + var rvlen int + if containerLenS > 0 { // hasLen + if f.seq == seqTypeChan { + if rv.IsNil() { + rvlen, _ = decInferLen(containerLenS, f.d.h.MaxInitLen, int(rtelem0.Size())) + rv.Set(reflect.MakeChan(ti.rt, rvlen)) + } + // handle chan specially: + for j := 0; j < containerLenS; j++ { + rv9 = reflect.New(rtelem0).Elem() + slh.ElemContainerState(j) + d.decodeValue(rv9, fn) + rv.Send(rv9) + } + } else { // slice or array + var truncated bool // says len of sequence is not same as expected number of elements + numToRead := containerLenS // if truncated, reset numToRead + + rvcap := rv.Cap() + rvlen = rv.Len() + if containerLenS > rvcap { + if f.seq == seqTypeArray { + d.arrayCannotExpand(rvlen, containerLenS) + } else { + oldRvlenGtZero := rvlen > 0 + rvlen, truncated = decInferLen(containerLenS, f.d.h.MaxInitLen, int(rtelem0.Size())) + if truncated { + if rvlen <= rvcap { + rv.SetLen(rvlen) + } else { + rv = reflect.MakeSlice(ti.rt, rvlen, rvlen) + rvChanged = true + } + } else { + rv = reflect.MakeSlice(ti.rt, rvlen, rvlen) + rvChanged = true + } + if rvChanged && oldRvlenGtZero && !isImmutableKind(rtelem0.Kind()) { + reflect.Copy(rv, rv0) // only copy up to length NOT cap i.e. rv0.Slice(0, rvcap) + } + rvcap = rvlen + } + numToRead = rvlen + } else if containerLenS != rvlen { + if f.seq == seqTypeSlice { + rv.SetLen(containerLenS) + rvlen = containerLenS + } + } + j := 0 + // we read up to the numToRead + for ; j < numToRead; j++ { + slh.ElemContainerState(j) + d.decodeValue(rv.Index(j), fn) + } + + // if slice, expand and read up to containerLenS (or EOF) iff truncated + // if array, swallow all the rest. + + if f.seq == seqTypeArray { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } else if truncated { // slice was truncated, as chan NOT in this block + for ; j < containerLenS; j++ { + rv = expandSliceValue(rv, 1) + rv9 = rv.Index(j) + if resetSliceElemToZeroValue { + rv9.Set(reflect.Zero(rtelem0)) + } + slh.ElemContainerState(j) + d.decodeValue(rv9, fn) + } + } + } + } else { + rvlen = rv.Len() + j := 0 + for ; !dd.CheckBreak(); j++ { + if f.seq == seqTypeChan { + slh.ElemContainerState(j) + rv9 = reflect.New(rtelem0).Elem() + d.decodeValue(rv9, fn) + rv.Send(rv9) + } else { + // if indefinite, etc, then expand the slice if necessary + var decodeIntoBlank bool + if j >= rvlen { + if f.seq == seqTypeArray { + d.arrayCannotExpand(rvlen, j+1) + decodeIntoBlank = true + } else { // if f.seq == seqTypeSlice + // rv = reflect.Append(rv, reflect.Zero(rtelem0)) // uses append logic, plus varargs + rv = expandSliceValue(rv, 1) + rv9 = rv.Index(j) + // rv.Index(rv.Len() - 1).Set(reflect.Zero(rtelem0)) + if resetSliceElemToZeroValue { + rv9.Set(reflect.Zero(rtelem0)) + } + rvlen++ + rvChanged = true + } + } else { // slice or array + rv9 = rv.Index(j) + } + slh.ElemContainerState(j) + if decodeIntoBlank { + d.swallow() + } else { // seqTypeSlice + d.decodeValue(rv9, fn) + } + } + } + if f.seq == seqTypeSlice { + if j < rvlen { + rv.SetLen(j) + } else if j == 0 && rv.IsNil() { + rv = reflect.MakeSlice(ti.rt, 0, 0) + rvChanged = true + } + } + } + slh.End() + + if rvChanged { + rv0.Set(rv) + } +} + +func (f *decFnInfo) kArray(rv reflect.Value) { + // f.d.decodeValue(rv.Slice(0, rv.Len())) + f.kSlice(rv.Slice(0, rv.Len())) +} + +func (f *decFnInfo) kMap(rv reflect.Value) { + d := f.d + dd := d.d + containerLen := dd.ReadMapStart() + cr := d.cr + ti := f.ti + if rv.IsNil() { + rv.Set(reflect.MakeMap(ti.rt)) + } + + if containerLen == 0 { + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return + } + + ktype, vtype := ti.rt.Key(), ti.rt.Elem() + ktypeId := reflect.ValueOf(ktype).Pointer() + vtypeKind := vtype.Kind() + var keyFn, valFn *decFn + var xtyp reflect.Type + for xtyp = ktype; xtyp.Kind() == reflect.Ptr; xtyp = xtyp.Elem() { + } + keyFn = d.getDecFn(xtyp, true, true) + for xtyp = vtype; xtyp.Kind() == reflect.Ptr; xtyp = xtyp.Elem() { + } + valFn = d.getDecFn(xtyp, true, true) + var mapGet, mapSet bool + if !f.d.h.MapValueReset { + // if pointer, mapGet = true + // if interface, mapGet = true if !DecodeNakedAlways (else false) + // if builtin, mapGet = false + // else mapGet = true + if vtypeKind == reflect.Ptr { + mapGet = true + } else if vtypeKind == reflect.Interface { + if !f.d.h.InterfaceReset { + mapGet = true + } + } else if !isImmutableKind(vtypeKind) { + mapGet = true + } + } + + var rvk, rvv, rvz reflect.Value + + // for j := 0; j < containerLen; j++ { + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + rvk = reflect.New(ktype).Elem() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + d.decodeValue(rvk, keyFn) + + // special case if a byte array. + if ktypeId == intfTypId { + rvk = rvk.Elem() + if rvk.Type() == uint8SliceTyp { + rvk = reflect.ValueOf(d.string(rvk.Bytes())) + } + } + mapSet = true // set to false if u do a get, and its a pointer, and exists + if mapGet { + rvv = rv.MapIndex(rvk) + if rvv.IsValid() { + if vtypeKind == reflect.Ptr { + mapSet = false + } + } else { + if rvz.IsValid() { + rvz.Set(reflect.Zero(vtype)) + } else { + rvz = reflect.New(vtype).Elem() + } + rvv = rvz + } + } else { + if rvz.IsValid() { + rvz.Set(reflect.Zero(vtype)) + } else { + rvz = reflect.New(vtype).Elem() + } + rvv = rvz + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + d.decodeValue(rvv, valFn) + if mapSet { + rv.SetMapIndex(rvk, rvv) + } + } + } else { + for j := 0; !dd.CheckBreak(); j++ { + rvk = reflect.New(ktype).Elem() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + d.decodeValue(rvk, keyFn) + + // special case if a byte array. + if ktypeId == intfTypId { + rvk = rvk.Elem() + if rvk.Type() == uint8SliceTyp { + rvk = reflect.ValueOf(d.string(rvk.Bytes())) + } + } + mapSet = true // set to false if u do a get, and its a pointer, and exists + if mapGet { + rvv = rv.MapIndex(rvk) + if rvv.IsValid() { + if vtypeKind == reflect.Ptr { + mapSet = false + } + } else { + if rvz.IsValid() { + rvz.Set(reflect.Zero(vtype)) + } else { + rvz = reflect.New(vtype).Elem() + } + rvv = rvz + } + } else { + if rvz.IsValid() { + rvz.Set(reflect.Zero(vtype)) + } else { + rvz = reflect.New(vtype).Elem() + } + rvv = rvz + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + d.decodeValue(rvv, valFn) + if mapSet { + rv.SetMapIndex(rvk, rvv) + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +type decRtidFn struct { + rtid uintptr + fn decFn +} + +// decNaked is used to keep track of the primitives decoded. +// Without it, we would have to decode each primitive and wrap it +// in an interface{}, causing an allocation. +// In this model, the primitives are decoded in a "pseudo-atomic" fashion, +// so we can rest assured that no other decoding happens while these +// primitives are being decoded. +// +// maps and arrays are not handled by this mechanism. +// However, RawExt is, and we accomodate for extensions that decode +// RawExt from DecodeNaked, but need to decode the value subsequently. +// kInterfaceNaked and swallow, which call DecodeNaked, handle this caveat. +// +// However, decNaked also keeps some arrays of default maps and slices +// used in DecodeNaked. This way, we can get a pointer to it +// without causing a new heap allocation. +// +// kInterfaceNaked will ensure that there is no allocation for the common +// uses. +type decNaked struct { + // r RawExt // used for RawExt, uint, []byte. + u uint64 + i int64 + f float64 + l []byte + s string + t time.Time + b bool + v valueType + + // stacks for reducing allocation + is []interface{} + ms []map[interface{}]interface{} + ns []map[string]interface{} + ss [][]interface{} + // rs []RawExt + + // keep arrays at the bottom? Chance is that they are not used much. + ia [4]interface{} + ma [4]map[interface{}]interface{} + na [4]map[string]interface{} + sa [4][]interface{} + // ra [2]RawExt +} + +func (n *decNaked) reset() { + if n.ss != nil { + n.ss = n.ss[:0] + } + if n.is != nil { + n.is = n.is[:0] + } + if n.ms != nil { + n.ms = n.ms[:0] + } + if n.ns != nil { + n.ns = n.ns[:0] + } +} + +// A Decoder reads and decodes an object from an input stream in the codec format. +type Decoder struct { + // hopefully, reduce derefencing cost by laying the decReader inside the Decoder. + // Try to put things that go together to fit within a cache line (8 words). + + d decDriver + // NOTE: Decoder shouldn't call it's read methods, + // as the handler MAY need to do some coordination. + r decReader + // sa [initCollectionCap]decRtidFn + h *BasicHandle + hh Handle + + be bool // is binary encoding + bytes bool // is bytes reader + js bool // is json handle + + rb bytesDecReader + ri ioDecReader + cr containerStateRecv + + s []decRtidFn + f map[uintptr]*decFn + + // _ uintptr // for alignment purposes, so next one starts from a cache line + + // cache the mapTypeId and sliceTypeId for faster comparisons + mtid uintptr + stid uintptr + + n decNaked + b [scratchByteArrayLen]byte + is map[string]string // used for interning strings +} + +// NewDecoder returns a Decoder for decoding a stream of bytes from an io.Reader. +// +// For efficiency, Users are encouraged to pass in a memory buffered reader +// (eg bufio.Reader, bytes.Buffer). +func NewDecoder(r io.Reader, h Handle) *Decoder { + d := newDecoder(h) + d.Reset(r) + return d +} + +// NewDecoderBytes returns a Decoder which efficiently decodes directly +// from a byte slice with zero copying. +func NewDecoderBytes(in []byte, h Handle) *Decoder { + d := newDecoder(h) + d.ResetBytes(in) + return d +} + +func newDecoder(h Handle) *Decoder { + d := &Decoder{hh: h, h: h.getBasicHandle(), be: h.isBinary()} + n := &d.n + // n.rs = n.ra[:0] + n.ms = n.ma[:0] + n.is = n.ia[:0] + n.ns = n.na[:0] + n.ss = n.sa[:0] + _, d.js = h.(*JsonHandle) + if d.h.InternString { + d.is = make(map[string]string, 32) + } + d.d = h.newDecDriver(d) + d.cr, _ = d.d.(containerStateRecv) + // d.d = h.newDecDriver(decReaderT{true, &d.rb, &d.ri}) + return d +} + +func (d *Decoder) resetCommon() { + d.n.reset() + d.d.reset() + // reset all things which were cached from the Handle, + // but could be changed. + d.mtid, d.stid = 0, 0 + if d.h.MapType != nil { + d.mtid = reflect.ValueOf(d.h.MapType).Pointer() + } + if d.h.SliceType != nil { + d.stid = reflect.ValueOf(d.h.SliceType).Pointer() + } +} + +func (d *Decoder) Reset(r io.Reader) { + d.ri.x = &d.b + // d.s = d.sa[:0] + d.ri.bs.r = r + var ok bool + d.ri.br, ok = r.(decReaderByteScanner) + if !ok { + d.ri.br = &d.ri.bs + } + d.r = &d.ri + d.resetCommon() +} + +func (d *Decoder) ResetBytes(in []byte) { + // d.s = d.sa[:0] + d.rb.reset(in) + d.r = &d.rb + d.resetCommon() +} + +// func (d *Decoder) sendContainerState(c containerState) { +// if d.cr != nil { +// d.cr.sendContainerState(c) +// } +// } + +// Decode decodes the stream from reader and stores the result in the +// value pointed to by v. v cannot be a nil pointer. v can also be +// a reflect.Value of a pointer. +// +// Note that a pointer to a nil interface is not a nil pointer. +// If you do not know what type of stream it is, pass in a pointer to a nil interface. +// We will decode and store a value in that nil interface. +// +// Sample usages: +// // Decoding into a non-nil typed value +// var f float32 +// err = codec.NewDecoder(r, handle).Decode(&f) +// +// // Decoding into nil interface +// var v interface{} +// dec := codec.NewDecoder(r, handle) +// err = dec.Decode(&v) +// +// When decoding into a nil interface{}, we will decode into an appropriate value based +// on the contents of the stream: +// - Numbers are decoded as float64, int64 or uint64. +// - Other values are decoded appropriately depending on the type: +// bool, string, []byte, time.Time, etc +// - Extensions are decoded as RawExt (if no ext function registered for the tag) +// Configurations exist on the Handle to override defaults +// (e.g. for MapType, SliceType and how to decode raw bytes). +// +// When decoding into a non-nil interface{} value, the mode of encoding is based on the +// type of the value. When a value is seen: +// - If an extension is registered for it, call that extension function +// - If it implements BinaryUnmarshaler, call its UnmarshalBinary(data []byte) error +// - Else decode it based on its reflect.Kind +// +// There are some special rules when decoding into containers (slice/array/map/struct). +// Decode will typically use the stream contents to UPDATE the container. +// - A map can be decoded from a stream map, by updating matching keys. +// - A slice can be decoded from a stream array, +// by updating the first n elements, where n is length of the stream. +// - A slice can be decoded from a stream map, by decoding as if +// it contains a sequence of key-value pairs. +// - A struct can be decoded from a stream map, by updating matching fields. +// - A struct can be decoded from a stream array, +// by updating fields as they occur in the struct (by index). +// +// When decoding a stream map or array with length of 0 into a nil map or slice, +// we reset the destination map or slice to a zero-length value. +// +// However, when decoding a stream nil, we reset the destination container +// to its "zero" value (e.g. nil for slice/map, etc). +// +func (d *Decoder) Decode(v interface{}) (err error) { + defer panicToErr(&err) + d.decode(v) + return +} + +// this is not a smart swallow, as it allocates objects and does unnecessary work. +func (d *Decoder) swallowViaHammer() { + var blank interface{} + d.decodeValue(reflect.ValueOf(&blank).Elem(), nil) +} + +func (d *Decoder) swallow() { + // smarter decode that just swallows the content + dd := d.d + if dd.TryDecodeAsNil() { + return + } + cr := d.cr + switch dd.ContainerType() { + case valueTypeMap: + containerLen := dd.ReadMapStart() + clenGtEqualZero := containerLen >= 0 + for j := 0; ; j++ { + if clenGtEqualZero { + if j >= containerLen { + break + } + } else if dd.CheckBreak() { + break + } + if cr != nil { + cr.sendContainerState(containerMapKey) + } + d.swallow() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + d.swallow() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + case valueTypeArray: + containerLenS := dd.ReadArrayStart() + clenGtEqualZero := containerLenS >= 0 + for j := 0; ; j++ { + if clenGtEqualZero { + if j >= containerLenS { + break + } + } else if dd.CheckBreak() { + break + } + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + d.swallow() + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } + case valueTypeBytes: + dd.DecodeBytes(d.b[:], false, true) + case valueTypeString: + dd.DecodeBytes(d.b[:], true, true) + // dd.DecodeStringAsBytes(d.b[:]) + default: + // these are all primitives, which we can get from decodeNaked + // if RawExt using Value, complete the processing. + dd.DecodeNaked() + if n := &d.n; n.v == valueTypeExt && n.l == nil { + l := len(n.is) + n.is = append(n.is, nil) + v2 := &n.is[l] + n.is = n.is[:l] + d.decode(v2) + } + } +} + +// MustDecode is like Decode, but panics if unable to Decode. +// This provides insight to the code location that triggered the error. +func (d *Decoder) MustDecode(v interface{}) { + d.decode(v) +} + +func (d *Decoder) decode(iv interface{}) { + // if ics, ok := iv.(Selfer); ok { + // ics.CodecDecodeSelf(d) + // return + // } + + if d.d.TryDecodeAsNil() { + switch v := iv.(type) { + case nil: + case *string: + *v = "" + case *bool: + *v = false + case *int: + *v = 0 + case *int8: + *v = 0 + case *int16: + *v = 0 + case *int32: + *v = 0 + case *int64: + *v = 0 + case *uint: + *v = 0 + case *uint8: + *v = 0 + case *uint16: + *v = 0 + case *uint32: + *v = 0 + case *uint64: + *v = 0 + case *float32: + *v = 0 + case *float64: + *v = 0 + case *[]uint8: + *v = nil + case reflect.Value: + if v.Kind() != reflect.Ptr || v.IsNil() { + d.errNotValidPtrValue(v) + } + // d.chkPtrValue(v) + v = v.Elem() + if v.IsValid() { + v.Set(reflect.Zero(v.Type())) + } + default: + rv := reflect.ValueOf(iv) + if rv.Kind() != reflect.Ptr || rv.IsNil() { + d.errNotValidPtrValue(rv) + } + // d.chkPtrValue(rv) + rv = rv.Elem() + if rv.IsValid() { + rv.Set(reflect.Zero(rv.Type())) + } + } + return + } + + switch v := iv.(type) { + case nil: + d.error(cannotDecodeIntoNilErr) + return + + case Selfer: + v.CodecDecodeSelf(d) + + case reflect.Value: + if v.Kind() != reflect.Ptr || v.IsNil() { + d.errNotValidPtrValue(v) + } + // d.chkPtrValue(v) + d.decodeValueNotNil(v.Elem(), nil) + + case *string: + + *v = d.d.DecodeString() + case *bool: + *v = d.d.DecodeBool() + case *int: + *v = int(d.d.DecodeInt(intBitsize)) + case *int8: + *v = int8(d.d.DecodeInt(8)) + case *int16: + *v = int16(d.d.DecodeInt(16)) + case *int32: + *v = int32(d.d.DecodeInt(32)) + case *int64: + *v = d.d.DecodeInt(64) + case *uint: + *v = uint(d.d.DecodeUint(uintBitsize)) + case *uint8: + *v = uint8(d.d.DecodeUint(8)) + case *uint16: + *v = uint16(d.d.DecodeUint(16)) + case *uint32: + *v = uint32(d.d.DecodeUint(32)) + case *uint64: + *v = d.d.DecodeUint(64) + case *float32: + *v = float32(d.d.DecodeFloat(true)) + case *float64: + *v = d.d.DecodeFloat(false) + case *[]uint8: + *v = d.d.DecodeBytes(*v, false, false) + + case *interface{}: + d.decodeValueNotNil(reflect.ValueOf(iv).Elem(), nil) + + default: + if !fastpathDecodeTypeSwitch(iv, d) { + d.decodeI(iv, true, false, false, false) + } + } +} + +func (d *Decoder) preDecodeValue(rv reflect.Value, tryNil bool) (rv2 reflect.Value, proceed bool) { + if tryNil && d.d.TryDecodeAsNil() { + // No need to check if a ptr, recursively, to determine + // whether to set value to nil. + // Just always set value to its zero type. + if rv.IsValid() { // rv.CanSet() // always settable, except it's invalid + rv.Set(reflect.Zero(rv.Type())) + } + return + } + + // If stream is not containing a nil value, then we can deref to the base + // non-pointer value, and decode into that. + for rv.Kind() == reflect.Ptr { + if rv.IsNil() { + rv.Set(reflect.New(rv.Type().Elem())) + } + rv = rv.Elem() + } + return rv, true +} + +func (d *Decoder) decodeI(iv interface{}, checkPtr, tryNil, checkFastpath, checkCodecSelfer bool) { + rv := reflect.ValueOf(iv) + if checkPtr { + if rv.Kind() != reflect.Ptr || rv.IsNil() { + d.errNotValidPtrValue(rv) + } + // d.chkPtrValue(rv) + } + rv, proceed := d.preDecodeValue(rv, tryNil) + if proceed { + fn := d.getDecFn(rv.Type(), checkFastpath, checkCodecSelfer) + fn.f(&fn.i, rv) + } +} + +func (d *Decoder) decodeValue(rv reflect.Value, fn *decFn) { + if rv, proceed := d.preDecodeValue(rv, true); proceed { + if fn == nil { + fn = d.getDecFn(rv.Type(), true, true) + } + fn.f(&fn.i, rv) + } +} + +func (d *Decoder) decodeValueNotNil(rv reflect.Value, fn *decFn) { + if rv, proceed := d.preDecodeValue(rv, false); proceed { + if fn == nil { + fn = d.getDecFn(rv.Type(), true, true) + } + fn.f(&fn.i, rv) + } +} + +func (d *Decoder) getDecFn(rt reflect.Type, checkFastpath, checkCodecSelfer bool) (fn *decFn) { + rtid := reflect.ValueOf(rt).Pointer() + + // retrieve or register a focus'ed function for this type + // to eliminate need to do the retrieval multiple times + + // if d.f == nil && d.s == nil { debugf("---->Creating new dec f map for type: %v\n", rt) } + var ok bool + if useMapForCodecCache { + fn, ok = d.f[rtid] + } else { + for i := range d.s { + v := &(d.s[i]) + if v.rtid == rtid { + fn, ok = &(v.fn), true + break + } + } + } + if ok { + return + } + + if useMapForCodecCache { + if d.f == nil { + d.f = make(map[uintptr]*decFn, initCollectionCap) + } + fn = new(decFn) + d.f[rtid] = fn + } else { + if d.s == nil { + d.s = make([]decRtidFn, 0, initCollectionCap) + } + d.s = append(d.s, decRtidFn{rtid: rtid}) + fn = &(d.s[len(d.s)-1]).fn + } + + // debugf("\tCreating new dec fn for type: %v\n", rt) + ti := d.h.getTypeInfo(rtid, rt) + fi := &(fn.i) + fi.d = d + fi.ti = ti + + // An extension can be registered for any type, regardless of the Kind + // (e.g. type BitSet int64, type MyStruct { / * unexported fields * / }, type X []int, etc. + // + // We can't check if it's an extension byte here first, because the user may have + // registered a pointer or non-pointer type, meaning we may have to recurse first + // before matching a mapped type, even though the extension byte is already detected. + // + // NOTE: if decoding into a nil interface{}, we return a non-nil + // value except even if the container registers a length of 0. + if checkCodecSelfer && ti.cs { + fn.f = (*decFnInfo).selferUnmarshal + } else if rtid == rawExtTypId { + fn.f = (*decFnInfo).rawExt + } else if d.d.IsBuiltinType(rtid) { + fn.f = (*decFnInfo).builtin + } else if xfFn := d.h.getExt(rtid); xfFn != nil { + fi.xfTag, fi.xfFn = xfFn.tag, xfFn.ext + fn.f = (*decFnInfo).ext + } else if supportMarshalInterfaces && d.be && ti.bunm { + fn.f = (*decFnInfo).binaryUnmarshal + } else if supportMarshalInterfaces && !d.be && d.js && ti.junm { + //If JSON, we should check JSONUnmarshal before textUnmarshal + fn.f = (*decFnInfo).jsonUnmarshal + } else if supportMarshalInterfaces && !d.be && ti.tunm { + fn.f = (*decFnInfo).textUnmarshal + } else { + rk := rt.Kind() + if fastpathEnabled && checkFastpath && (rk == reflect.Map || rk == reflect.Slice) { + if rt.PkgPath() == "" { + if idx := fastpathAV.index(rtid); idx != -1 { + fn.f = fastpathAV[idx].decfn + } + } else { + // use mapping for underlying type if there + ok = false + var rtu reflect.Type + if rk == reflect.Map { + rtu = reflect.MapOf(rt.Key(), rt.Elem()) + } else { + rtu = reflect.SliceOf(rt.Elem()) + } + rtuid := reflect.ValueOf(rtu).Pointer() + if idx := fastpathAV.index(rtuid); idx != -1 { + xfnf := fastpathAV[idx].decfn + xrt := fastpathAV[idx].rt + fn.f = func(xf *decFnInfo, xrv reflect.Value) { + // xfnf(xf, xrv.Convert(xrt)) + xfnf(xf, xrv.Addr().Convert(reflect.PtrTo(xrt)).Elem()) + } + } + } + } + if fn.f == nil { + switch rk { + case reflect.String: + fn.f = (*decFnInfo).kString + case reflect.Bool: + fn.f = (*decFnInfo).kBool + case reflect.Int: + fn.f = (*decFnInfo).kInt + case reflect.Int64: + fn.f = (*decFnInfo).kInt64 + case reflect.Int32: + fn.f = (*decFnInfo).kInt32 + case reflect.Int8: + fn.f = (*decFnInfo).kInt8 + case reflect.Int16: + fn.f = (*decFnInfo).kInt16 + case reflect.Float32: + fn.f = (*decFnInfo).kFloat32 + case reflect.Float64: + fn.f = (*decFnInfo).kFloat64 + case reflect.Uint8: + fn.f = (*decFnInfo).kUint8 + case reflect.Uint64: + fn.f = (*decFnInfo).kUint64 + case reflect.Uint: + fn.f = (*decFnInfo).kUint + case reflect.Uint32: + fn.f = (*decFnInfo).kUint32 + case reflect.Uint16: + fn.f = (*decFnInfo).kUint16 + // case reflect.Ptr: + // fn.f = (*decFnInfo).kPtr + case reflect.Uintptr: + fn.f = (*decFnInfo).kUintptr + case reflect.Interface: + fn.f = (*decFnInfo).kInterface + case reflect.Struct: + fn.f = (*decFnInfo).kStruct + case reflect.Chan: + fi.seq = seqTypeChan + fn.f = (*decFnInfo).kSlice + case reflect.Slice: + fi.seq = seqTypeSlice + fn.f = (*decFnInfo).kSlice + case reflect.Array: + fi.seq = seqTypeArray + fn.f = (*decFnInfo).kArray + case reflect.Map: + fn.f = (*decFnInfo).kMap + default: + fn.f = (*decFnInfo).kErr + } + } + } + + return +} + +func (d *Decoder) structFieldNotFound(index int, rvkencname string) { + if d.h.ErrorIfNoField { + if index >= 0 { + d.errorf("no matching struct field found when decoding stream array at index %v", index) + return + } else if rvkencname != "" { + d.errorf("no matching struct field found when decoding stream map with key %s", rvkencname) + return + } + } + d.swallow() +} + +func (d *Decoder) arrayCannotExpand(sliceLen, streamLen int) { + if d.h.ErrorIfNoArrayExpand { + d.errorf("cannot expand array len during decode from %v to %v", sliceLen, streamLen) + } +} + +func (d *Decoder) chkPtrValue(rv reflect.Value) { + // We can only decode into a non-nil pointer + if rv.Kind() == reflect.Ptr && !rv.IsNil() { + return + } + d.errNotValidPtrValue(rv) +} + +func (d *Decoder) errNotValidPtrValue(rv reflect.Value) { + if !rv.IsValid() { + d.error(cannotDecodeIntoNilErr) + return + } + if !rv.CanInterface() { + d.errorf("cannot decode into a value without an interface: %v", rv) + return + } + rvi := rv.Interface() + d.errorf("cannot decode into non-pointer or nil pointer. Got: %v, %T, %v", rv.Kind(), rvi, rvi) +} + +func (d *Decoder) error(err error) { + panic(err) +} + +func (d *Decoder) errorf(format string, params ...interface{}) { + params2 := make([]interface{}, len(params)+1) + params2[0] = d.r.numread() + copy(params2[1:], params) + err := fmt.Errorf("[pos %d]: "+format, params2...) + panic(err) +} + +func (d *Decoder) string(v []byte) (s string) { + if d.is != nil { + s, ok := d.is[string(v)] // no allocation here. + if !ok { + s = string(v) + d.is[s] = s + } + return s + } + return string(v) // don't return stringView, as we need a real string here. +} + +func (d *Decoder) intern(s string) { + if d.is != nil { + d.is[s] = s + } +} + +func (d *Decoder) nextValueBytes() []byte { + d.d.uncacheRead() + d.r.track() + d.swallow() + return d.r.stopTrack() +} + +// -------------------------------------------------- + +// decSliceHelper assists when decoding into a slice, from a map or an array in the stream. +// A slice can be set from a map or array in stream. This supports the MapBySlice interface. +type decSliceHelper struct { + d *Decoder + // ct valueType + array bool +} + +func (d *Decoder) decSliceHelperStart() (x decSliceHelper, clen int) { + dd := d.d + ctyp := dd.ContainerType() + if ctyp == valueTypeArray { + x.array = true + clen = dd.ReadArrayStart() + } else if ctyp == valueTypeMap { + clen = dd.ReadMapStart() * 2 + } else { + d.errorf("only encoded map or array can be decoded into a slice (%d)", ctyp) + } + // x.ct = ctyp + x.d = d + return +} + +func (x decSliceHelper) End() { + cr := x.d.cr + if cr == nil { + return + } + if x.array { + cr.sendContainerState(containerArrayEnd) + } else { + cr.sendContainerState(containerMapEnd) + } +} + +func (x decSliceHelper) ElemContainerState(index int) { + cr := x.d.cr + if cr == nil { + return + } + if x.array { + cr.sendContainerState(containerArrayElem) + } else { + if index%2 == 0 { + cr.sendContainerState(containerMapKey) + } else { + cr.sendContainerState(containerMapValue) + } + } +} + +func decByteSlice(r decReader, clen int, bs []byte) (bsOut []byte) { + if clen == 0 { + return zeroByteSlice + } + if len(bs) == clen { + bsOut = bs + } else if cap(bs) >= clen { + bsOut = bs[:clen] + } else { + bsOut = make([]byte, clen) + } + r.readb(bsOut) + return +} + +func detachZeroCopyBytes(isBytesReader bool, dest []byte, in []byte) (out []byte) { + if xlen := len(in); xlen > 0 { + if isBytesReader || xlen <= scratchByteArrayLen { + if cap(dest) >= xlen { + out = dest[:xlen] + } else { + out = make([]byte, xlen) + } + copy(out, in) + return + } + } + return in +} + +// decInferLen will infer a sensible length, given the following: +// - clen: length wanted. +// - maxlen: max length to be returned. +// if <= 0, it is unset, and we infer it based on the unit size +// - unit: number of bytes for each element of the collection +func decInferLen(clen, maxlen, unit int) (rvlen int, truncated bool) { + // handle when maxlen is not set i.e. <= 0 + if clen <= 0 { + return + } + if maxlen <= 0 { + // no maxlen defined. Use maximum of 256K memory, with a floor of 4K items. + // maxlen = 256 * 1024 / unit + // if maxlen < (4 * 1024) { + // maxlen = 4 * 1024 + // } + if unit < (256 / 4) { + maxlen = 256 * 1024 / unit + } else { + maxlen = 4 * 1024 + } + } + if clen > maxlen { + rvlen = maxlen + truncated = true + } else { + rvlen = clen + } + return + // if clen <= 0 { + // rvlen = 0 + // } else if maxlen > 0 && clen > maxlen { + // rvlen = maxlen + // truncated = true + // } else { + // rvlen = clen + // } + // return +} + +// // implement overall decReader wrapping both, for possible use inline: +// type decReaderT struct { +// bytes bool +// rb *bytesDecReader +// ri *ioDecReader +// } +// +// // implement *Decoder as a decReader. +// // Using decReaderT (defined just above) caused performance degradation +// // possibly because of constant copying the value, +// // and some value->interface conversion causing allocation. +// func (d *Decoder) unreadn1() { +// if d.bytes { +// d.rb.unreadn1() +// } else { +// d.ri.unreadn1() +// } +// } +// ... for other methods of decReader. +// Testing showed that performance improvement was negligible. diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/encode.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/encode.go new file mode 100644 index 0000000000000..99af6fa555a4b --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/encode.go @@ -0,0 +1,1405 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "encoding" + "fmt" + "io" + "reflect" + "sort" + "sync" +) + +const ( + defEncByteBufSize = 1 << 6 // 4:16, 6:64, 8:256, 10:1024 +) + +// AsSymbolFlag defines what should be encoded as symbols. +type AsSymbolFlag uint8 + +const ( + // AsSymbolDefault is default. + // Currently, this means only encode struct field names as symbols. + // The default is subject to change. + AsSymbolDefault AsSymbolFlag = iota + + // AsSymbolAll means encode anything which could be a symbol as a symbol. + AsSymbolAll = 0xfe + + // AsSymbolNone means do not encode anything as a symbol. + AsSymbolNone = 1 << iota + + // AsSymbolMapStringKeys means encode keys in map[string]XXX as symbols. + AsSymbolMapStringKeysFlag + + // AsSymbolStructFieldName means encode struct field names as symbols. + AsSymbolStructFieldNameFlag +) + +// encWriter abstracts writing to a byte array or to an io.Writer. +type encWriter interface { + writeb([]byte) + writestr(string) + writen1(byte) + writen2(byte, byte) + atEndOfEncode() +} + +// encDriver abstracts the actual codec (binc vs msgpack, etc) +type encDriver interface { + IsBuiltinType(rt uintptr) bool + EncodeBuiltin(rt uintptr, v interface{}) + EncodeNil() + EncodeInt(i int64) + EncodeUint(i uint64) + EncodeBool(b bool) + EncodeFloat32(f float32) + EncodeFloat64(f float64) + // encodeExtPreamble(xtag byte, length int) + EncodeRawExt(re *RawExt, e *Encoder) + EncodeExt(v interface{}, xtag uint64, ext Ext, e *Encoder) + EncodeArrayStart(length int) + EncodeMapStart(length int) + EncodeString(c charEncoding, v string) + EncodeSymbol(v string) + EncodeStringBytes(c charEncoding, v []byte) + //TODO + //encBignum(f *big.Int) + //encStringRunes(c charEncoding, v []rune) + + reset() +} + +type encDriverAsis interface { + EncodeAsis(v []byte) +} + +type encNoSeparator struct{} + +func (_ encNoSeparator) EncodeEnd() {} + +type ioEncWriterWriter interface { + WriteByte(c byte) error + WriteString(s string) (n int, err error) + Write(p []byte) (n int, err error) +} + +type ioEncStringWriter interface { + WriteString(s string) (n int, err error) +} + +type EncodeOptions struct { + // Encode a struct as an array, and not as a map + StructToArray bool + + // Canonical representation means that encoding a value will always result in the same + // sequence of bytes. + // + // This only affects maps, as the iteration order for maps is random. + // + // The implementation MAY use the natural sort order for the map keys if possible: + // + // - If there is a natural sort order (ie for number, bool, string or []byte keys), + // then the map keys are first sorted in natural order and then written + // with corresponding map values to the strema. + // - If there is no natural sort order, then the map keys will first be + // encoded into []byte, and then sorted, + // before writing the sorted keys and the corresponding map values to the stream. + // + Canonical bool + + // AsSymbols defines what should be encoded as symbols. + // + // Encoding as symbols can reduce the encoded size significantly. + // + // However, during decoding, each string to be encoded as a symbol must + // be checked to see if it has been seen before. Consequently, encoding time + // will increase if using symbols, because string comparisons has a clear cost. + // + // Sample values: + // AsSymbolNone + // AsSymbolAll + // AsSymbolMapStringKeys + // AsSymbolMapStringKeysFlag | AsSymbolStructFieldNameFlag + AsSymbols AsSymbolFlag +} + +// --------------------------------------------- + +type simpleIoEncWriterWriter struct { + w io.Writer + bw io.ByteWriter + sw ioEncStringWriter +} + +func (o *simpleIoEncWriterWriter) WriteByte(c byte) (err error) { + if o.bw != nil { + return o.bw.WriteByte(c) + } + _, err = o.w.Write([]byte{c}) + return +} + +func (o *simpleIoEncWriterWriter) WriteString(s string) (n int, err error) { + if o.sw != nil { + return o.sw.WriteString(s) + } + // return o.w.Write([]byte(s)) + return o.w.Write(bytesView(s)) +} + +func (o *simpleIoEncWriterWriter) Write(p []byte) (n int, err error) { + return o.w.Write(p) +} + +// ---------------------------------------- + +// ioEncWriter implements encWriter and can write to an io.Writer implementation +type ioEncWriter struct { + w ioEncWriterWriter + s simpleIoEncWriterWriter + // x [8]byte // temp byte array re-used internally for efficiency +} + +func (z *ioEncWriter) writeb(bs []byte) { + if len(bs) == 0 { + return + } + n, err := z.w.Write(bs) + if err != nil { + panic(err) + } + if n != len(bs) { + panic(fmt.Errorf("incorrect num bytes written. Expecting: %v, Wrote: %v", len(bs), n)) + } +} + +func (z *ioEncWriter) writestr(s string) { + n, err := z.w.WriteString(s) + if err != nil { + panic(err) + } + if n != len(s) { + panic(fmt.Errorf("incorrect num bytes written. Expecting: %v, Wrote: %v", len(s), n)) + } +} + +func (z *ioEncWriter) writen1(b byte) { + if err := z.w.WriteByte(b); err != nil { + panic(err) + } +} + +func (z *ioEncWriter) writen2(b1 byte, b2 byte) { + z.writen1(b1) + z.writen1(b2) +} + +func (z *ioEncWriter) atEndOfEncode() {} + +// ---------------------------------------- + +// bytesEncWriter implements encWriter and can write to an byte slice. +// It is used by Marshal function. +type bytesEncWriter struct { + b []byte + c int // cursor + out *[]byte // write out on atEndOfEncode +} + +func (z *bytesEncWriter) writeb(s []byte) { + if len(s) > 0 { + c := z.grow(len(s)) + copy(z.b[c:], s) + } +} + +func (z *bytesEncWriter) writestr(s string) { + if len(s) > 0 { + c := z.grow(len(s)) + copy(z.b[c:], s) + } +} + +func (z *bytesEncWriter) writen1(b1 byte) { + c := z.grow(1) + z.b[c] = b1 +} + +func (z *bytesEncWriter) writen2(b1 byte, b2 byte) { + c := z.grow(2) + z.b[c] = b1 + z.b[c+1] = b2 +} + +func (z *bytesEncWriter) atEndOfEncode() { + *(z.out) = z.b[:z.c] +} + +func (z *bytesEncWriter) grow(n int) (oldcursor int) { + oldcursor = z.c + z.c = oldcursor + n + if z.c > len(z.b) { + if z.c > cap(z.b) { + // appendslice logic (if cap < 1024, *2, else *1.25): more expensive. many copy calls. + // bytes.Buffer model (2*cap + n): much better + // bs := make([]byte, 2*cap(z.b)+n) + bs := make([]byte, growCap(cap(z.b), 1, n)) + copy(bs, z.b[:oldcursor]) + z.b = bs + } else { + z.b = z.b[:cap(z.b)] + } + } + return +} + +// --------------------------------------------- + +type encFnInfo struct { + e *Encoder + ti *typeInfo + xfFn Ext + xfTag uint64 + seq seqType +} + +func (f *encFnInfo) builtin(rv reflect.Value) { + f.e.e.EncodeBuiltin(f.ti.rtid, rv.Interface()) +} + +func (f *encFnInfo) rawExt(rv reflect.Value) { + // rev := rv.Interface().(RawExt) + // f.e.e.EncodeRawExt(&rev, f.e) + var re *RawExt + if rv.CanAddr() { + re = rv.Addr().Interface().(*RawExt) + } else { + rev := rv.Interface().(RawExt) + re = &rev + } + f.e.e.EncodeRawExt(re, f.e) +} + +func (f *encFnInfo) ext(rv reflect.Value) { + // if this is a struct|array and it was addressable, then pass the address directly (not the value) + if k := rv.Kind(); (k == reflect.Struct || k == reflect.Array) && rv.CanAddr() { + rv = rv.Addr() + } + f.e.e.EncodeExt(rv.Interface(), f.xfTag, f.xfFn, f.e) +} + +func (f *encFnInfo) getValueForMarshalInterface(rv reflect.Value, indir int8) (v interface{}, proceed bool) { + if indir == 0 { + v = rv.Interface() + } else if indir == -1 { + // If a non-pointer was passed to Encode(), then that value is not addressable. + // Take addr if addresable, else copy value to an addressable value. + if rv.CanAddr() { + v = rv.Addr().Interface() + } else { + rv2 := reflect.New(rv.Type()) + rv2.Elem().Set(rv) + v = rv2.Interface() + // fmt.Printf("rv.Type: %v, rv2.Type: %v, v: %v\n", rv.Type(), rv2.Type(), v) + } + } else { + for j := int8(0); j < indir; j++ { + if rv.IsNil() { + f.e.e.EncodeNil() + return + } + rv = rv.Elem() + } + v = rv.Interface() + } + return v, true +} + +func (f *encFnInfo) selferMarshal(rv reflect.Value) { + if v, proceed := f.getValueForMarshalInterface(rv, f.ti.csIndir); proceed { + v.(Selfer).CodecEncodeSelf(f.e) + } +} + +func (f *encFnInfo) binaryMarshal(rv reflect.Value) { + if v, proceed := f.getValueForMarshalInterface(rv, f.ti.bmIndir); proceed { + bs, fnerr := v.(encoding.BinaryMarshaler).MarshalBinary() + f.e.marshal(bs, fnerr, false, c_RAW) + } +} + +func (f *encFnInfo) textMarshal(rv reflect.Value) { + if v, proceed := f.getValueForMarshalInterface(rv, f.ti.tmIndir); proceed { + // debugf(">>>> encoding.TextMarshaler: %T", rv.Interface()) + bs, fnerr := v.(encoding.TextMarshaler).MarshalText() + f.e.marshal(bs, fnerr, false, c_UTF8) + } +} + +func (f *encFnInfo) jsonMarshal(rv reflect.Value) { + if v, proceed := f.getValueForMarshalInterface(rv, f.ti.jmIndir); proceed { + bs, fnerr := v.(jsonMarshaler).MarshalJSON() + f.e.marshal(bs, fnerr, true, c_UTF8) + } +} + +func (f *encFnInfo) kBool(rv reflect.Value) { + f.e.e.EncodeBool(rv.Bool()) +} + +func (f *encFnInfo) kString(rv reflect.Value) { + f.e.e.EncodeString(c_UTF8, rv.String()) +} + +func (f *encFnInfo) kFloat64(rv reflect.Value) { + f.e.e.EncodeFloat64(rv.Float()) +} + +func (f *encFnInfo) kFloat32(rv reflect.Value) { + f.e.e.EncodeFloat32(float32(rv.Float())) +} + +func (f *encFnInfo) kInt(rv reflect.Value) { + f.e.e.EncodeInt(rv.Int()) +} + +func (f *encFnInfo) kUint(rv reflect.Value) { + f.e.e.EncodeUint(rv.Uint()) +} + +func (f *encFnInfo) kInvalid(rv reflect.Value) { + f.e.e.EncodeNil() +} + +func (f *encFnInfo) kErr(rv reflect.Value) { + f.e.errorf("unsupported kind %s, for %#v", rv.Kind(), rv) +} + +func (f *encFnInfo) kSlice(rv reflect.Value) { + ti := f.ti + // array may be non-addressable, so we have to manage with care + // (don't call rv.Bytes, rv.Slice, etc). + // E.g. type struct S{B [2]byte}; + // Encode(S{}) will bomb on "panic: slice of unaddressable array". + e := f.e + if f.seq != seqTypeArray { + if rv.IsNil() { + e.e.EncodeNil() + return + } + // If in this method, then there was no extension function defined. + // So it's okay to treat as []byte. + if ti.rtid == uint8SliceTypId { + e.e.EncodeStringBytes(c_RAW, rv.Bytes()) + return + } + } + cr := e.cr + rtelem := ti.rt.Elem() + l := rv.Len() + if ti.rtid == uint8SliceTypId || rtelem.Kind() == reflect.Uint8 { + switch f.seq { + case seqTypeArray: + // if l == 0 { e.e.encodeStringBytes(c_RAW, nil) } else + if rv.CanAddr() { + e.e.EncodeStringBytes(c_RAW, rv.Slice(0, l).Bytes()) + } else { + var bs []byte + if l <= cap(e.b) { + bs = e.b[:l] + } else { + bs = make([]byte, l) + } + reflect.Copy(reflect.ValueOf(bs), rv) + // TODO: Test that reflect.Copy works instead of manual one-by-one + // for i := 0; i < l; i++ { + // bs[i] = byte(rv.Index(i).Uint()) + // } + e.e.EncodeStringBytes(c_RAW, bs) + } + case seqTypeSlice: + e.e.EncodeStringBytes(c_RAW, rv.Bytes()) + case seqTypeChan: + bs := e.b[:0] + // do not use range, so that the number of elements encoded + // does not change, and encoding does not hang waiting on someone to close chan. + // for b := range rv.Interface().(<-chan byte) { + // bs = append(bs, b) + // } + ch := rv.Interface().(<-chan byte) + for i := 0; i < l; i++ { + bs = append(bs, <-ch) + } + e.e.EncodeStringBytes(c_RAW, bs) + } + return + } + + if ti.mbs { + if l%2 == 1 { + e.errorf("mapBySlice requires even slice length, but got %v", l) + return + } + e.e.EncodeMapStart(l / 2) + } else { + e.e.EncodeArrayStart(l) + } + + if l > 0 { + for rtelem.Kind() == reflect.Ptr { + rtelem = rtelem.Elem() + } + // if kind is reflect.Interface, do not pre-determine the + // encoding type, because preEncodeValue may break it down to + // a concrete type and kInterface will bomb. + var fn *encFn + if rtelem.Kind() != reflect.Interface { + rtelemid := reflect.ValueOf(rtelem).Pointer() + fn = e.getEncFn(rtelemid, rtelem, true, true) + } + // TODO: Consider perf implication of encoding odd index values as symbols if type is string + for j := 0; j < l; j++ { + if cr != nil { + if ti.mbs { + if l%2 == 0 { + cr.sendContainerState(containerMapKey) + } else { + cr.sendContainerState(containerMapValue) + } + } else { + cr.sendContainerState(containerArrayElem) + } + } + if f.seq == seqTypeChan { + if rv2, ok2 := rv.Recv(); ok2 { + e.encodeValue(rv2, fn) + } else { + e.encode(nil) // WE HAVE TO DO SOMETHING, so nil if nothing received. + } + } else { + e.encodeValue(rv.Index(j), fn) + } + } + } + + if cr != nil { + if ti.mbs { + cr.sendContainerState(containerMapEnd) + } else { + cr.sendContainerState(containerArrayEnd) + } + } +} + +func (f *encFnInfo) kStruct(rv reflect.Value) { + fti := f.ti + e := f.e + cr := e.cr + tisfi := fti.sfip + toMap := !(fti.toArray || e.h.StructToArray) + newlen := len(fti.sfi) + + // Use sync.Pool to reduce allocating slices unnecessarily. + // The cost of the occasional locking is less than the cost of new allocation. + pool, poolv, fkvs := encStructPoolGet(newlen) + + // if toMap, use the sorted array. If toArray, use unsorted array (to match sequence in struct) + if toMap { + tisfi = fti.sfi + } + newlen = 0 + var kv stringRv + for _, si := range tisfi { + kv.r = si.field(rv, false) + // if si.i != -1 { + // rvals[newlen] = rv.Field(int(si.i)) + // } else { + // rvals[newlen] = rv.FieldByIndex(si.is) + // } + if toMap { + if si.omitEmpty && isEmptyValue(kv.r) { + continue + } + kv.v = si.encName + } else { + // use the zero value. + // if a reference or struct, set to nil (so you do not output too much) + if si.omitEmpty && isEmptyValue(kv.r) { + switch kv.r.Kind() { + case reflect.Struct, reflect.Interface, reflect.Ptr, reflect.Array, + reflect.Map, reflect.Slice: + kv.r = reflect.Value{} //encode as nil + } + } + } + fkvs[newlen] = kv + newlen++ + } + + // debugf(">>>> kStruct: newlen: %v", newlen) + // sep := !e.be + ee := e.e //don't dereference everytime + + if toMap { + ee.EncodeMapStart(newlen) + // asSymbols := e.h.AsSymbols&AsSymbolStructFieldNameFlag != 0 + asSymbols := e.h.AsSymbols == AsSymbolDefault || e.h.AsSymbols&AsSymbolStructFieldNameFlag != 0 + for j := 0; j < newlen; j++ { + kv = fkvs[j] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(kv.v) + } else { + ee.EncodeString(c_UTF8, kv.v) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(kv.r, nil) + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + } else { + ee.EncodeArrayStart(newlen) + for j := 0; j < newlen; j++ { + kv = fkvs[j] + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + e.encodeValue(kv.r, nil) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } + } + + // do not use defer. Instead, use explicit pool return at end of function. + // defer has a cost we are trying to avoid. + // If there is a panic and these slices are not returned, it is ok. + if pool != nil { + pool.Put(poolv) + } +} + +// func (f *encFnInfo) kPtr(rv reflect.Value) { +// debugf(">>>>>>> ??? encode kPtr called - shouldn't get called") +// if rv.IsNil() { +// f.e.e.encodeNil() +// return +// } +// f.e.encodeValue(rv.Elem()) +// } + +func (f *encFnInfo) kInterface(rv reflect.Value) { + if rv.IsNil() { + f.e.e.EncodeNil() + return + } + f.e.encodeValue(rv.Elem(), nil) +} + +func (f *encFnInfo) kMap(rv reflect.Value) { + ee := f.e.e + if rv.IsNil() { + ee.EncodeNil() + return + } + + l := rv.Len() + ee.EncodeMapStart(l) + e := f.e + cr := e.cr + if l == 0 { + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return + } + var asSymbols bool + // determine the underlying key and val encFn's for the map. + // This eliminates some work which is done for each loop iteration i.e. + // rv.Type(), ref.ValueOf(rt).Pointer(), then check map/list for fn. + // + // However, if kind is reflect.Interface, do not pre-determine the + // encoding type, because preEncodeValue may break it down to + // a concrete type and kInterface will bomb. + var keyFn, valFn *encFn + ti := f.ti + rtkey := ti.rt.Key() + rtval := ti.rt.Elem() + rtkeyid := reflect.ValueOf(rtkey).Pointer() + // keyTypeIsString := f.ti.rt.Key().Kind() == reflect.String + var keyTypeIsString = rtkeyid == stringTypId + if keyTypeIsString { + asSymbols = e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + } else { + for rtkey.Kind() == reflect.Ptr { + rtkey = rtkey.Elem() + } + if rtkey.Kind() != reflect.Interface { + rtkeyid = reflect.ValueOf(rtkey).Pointer() + keyFn = e.getEncFn(rtkeyid, rtkey, true, true) + } + } + for rtval.Kind() == reflect.Ptr { + rtval = rtval.Elem() + } + if rtval.Kind() != reflect.Interface { + rtvalid := reflect.ValueOf(rtval).Pointer() + valFn = e.getEncFn(rtvalid, rtval, true, true) + } + mks := rv.MapKeys() + // for j, lmks := 0, len(mks); j < lmks; j++ { + + if e.h.Canonical { + e.kMapCanonical(rtkeyid, rtkey, rv, mks, valFn, asSymbols) + } else { + for j := range mks { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if keyTypeIsString { + if asSymbols { + ee.EncodeSymbol(mks[j].String()) + } else { + ee.EncodeString(c_UTF8, mks[j].String()) + } + } else { + e.encodeValue(mks[j], keyFn) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mks[j]), valFn) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (e *Encoder) kMapCanonical(rtkeyid uintptr, rtkey reflect.Type, rv reflect.Value, mks []reflect.Value, valFn *encFn, asSymbols bool) { + ee := e.e + cr := e.cr + // we previously did out-of-band if an extension was registered. + // This is not necessary, as the natural kind is sufficient for ordering. + + if rtkeyid == uint8SliceTypId { + mksv := make([]bytesRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.Bytes() + } + sort.Sort(bytesRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeStringBytes(c_RAW, mksv[i].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + } + } else { + switch rtkey.Kind() { + case reflect.Bool: + mksv := make([]boolRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.Bool() + } + sort.Sort(boolRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(mksv[i].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + } + case reflect.String: + mksv := make([]stringRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.String() + } + sort.Sort(stringRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(mksv[i].v) + } else { + ee.EncodeString(c_UTF8, mksv[i].v) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + } + case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint, reflect.Uintptr: + mksv := make([]uintRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.Uint() + } + sort.Sort(uintRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(mksv[i].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + } + case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: + mksv := make([]intRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.Int() + } + sort.Sort(intRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(mksv[i].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + } + case reflect.Float32: + mksv := make([]floatRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.Float() + } + sort.Sort(floatRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(mksv[i].v)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + } + case reflect.Float64: + mksv := make([]floatRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.Float() + } + sort.Sort(floatRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(mksv[i].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + } + default: + // out-of-band + // first encode each key to a []byte first, then sort them, then record + var mksv []byte = make([]byte, 0, len(mks)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + mksbv := make([]bytesRv, len(mks)) + for i, k := range mks { + v := &mksbv[i] + l := len(mksv) + e2.MustEncode(k) + v.r = k + v.v = mksv[l:] + // fmt.Printf(">>>>> %s\n", mksv[l:]) + } + sort.Sort(bytesRvSlice(mksbv)) + for j := range mksbv { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(mksbv[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mksbv[j].r), valFn) + } + } + } +} + +// -------------------------------------------------- + +// encFn encapsulates the captured variables and the encode function. +// This way, we only do some calculations one times, and pass to the +// code block that should be called (encapsulated in a function) +// instead of executing the checks every time. +type encFn struct { + i encFnInfo + f func(*encFnInfo, reflect.Value) +} + +// -------------------------------------------------- + +type encRtidFn struct { + rtid uintptr + fn encFn +} + +// An Encoder writes an object to an output stream in the codec format. +type Encoder struct { + // hopefully, reduce derefencing cost by laying the encWriter inside the Encoder + e encDriver + // NOTE: Encoder shouldn't call it's write methods, + // as the handler MAY need to do some coordination. + w encWriter + s []encRtidFn + be bool // is binary encoding + js bool // is json handle + + wi ioEncWriter + wb bytesEncWriter + + h *BasicHandle + hh Handle + + cr containerStateRecv + as encDriverAsis + + f map[uintptr]*encFn + b [scratchByteArrayLen]byte +} + +// NewEncoder returns an Encoder for encoding into an io.Writer. +// +// For efficiency, Users are encouraged to pass in a memory buffered writer +// (eg bufio.Writer, bytes.Buffer). +func NewEncoder(w io.Writer, h Handle) *Encoder { + e := newEncoder(h) + e.Reset(w) + return e +} + +// NewEncoderBytes returns an encoder for encoding directly and efficiently +// into a byte slice, using zero-copying to temporary slices. +// +// It will potentially replace the output byte slice pointed to. +// After encoding, the out parameter contains the encoded contents. +func NewEncoderBytes(out *[]byte, h Handle) *Encoder { + e := newEncoder(h) + e.ResetBytes(out) + return e +} + +func newEncoder(h Handle) *Encoder { + e := &Encoder{hh: h, h: h.getBasicHandle(), be: h.isBinary()} + _, e.js = h.(*JsonHandle) + e.e = h.newEncDriver(e) + e.as, _ = e.e.(encDriverAsis) + e.cr, _ = e.e.(containerStateRecv) + return e +} + +// Reset the Encoder with a new output stream. +// +// This accomodates using the state of the Encoder, +// where it has "cached" information about sub-engines. +func (e *Encoder) Reset(w io.Writer) { + ww, ok := w.(ioEncWriterWriter) + if ok { + e.wi.w = ww + } else { + sww := &e.wi.s + sww.w = w + sww.bw, _ = w.(io.ByteWriter) + sww.sw, _ = w.(ioEncStringWriter) + e.wi.w = sww + //ww = bufio.NewWriterSize(w, defEncByteBufSize) + } + e.w = &e.wi + e.e.reset() +} + +func (e *Encoder) ResetBytes(out *[]byte) { + in := *out + if in == nil { + in = make([]byte, defEncByteBufSize) + } + e.wb.b, e.wb.out, e.wb.c = in, out, 0 + e.w = &e.wb + e.e.reset() +} + +// func (e *Encoder) sendContainerState(c containerState) { +// if e.cr != nil { +// e.cr.sendContainerState(c) +// } +// } + +// Encode writes an object into a stream. +// +// Encoding can be configured via the struct tag for the fields. +// The "codec" key in struct field's tag value is the key name, +// followed by an optional comma and options. +// Note that the "json" key is used in the absence of the "codec" key. +// +// To set an option on all fields (e.g. omitempty on all fields), you +// can create a field called _struct, and set flags on it. +// +// Struct values "usually" encode as maps. Each exported struct field is encoded unless: +// - the field's tag is "-", OR +// - the field is empty (empty or the zero value) and its tag specifies the "omitempty" option. +// +// When encoding as a map, the first string in the tag (before the comma) +// is the map key string to use when encoding. +// +// However, struct values may encode as arrays. This happens when: +// - StructToArray Encode option is set, OR +// - the tag on the _struct field sets the "toarray" option +// +// Values with types that implement MapBySlice are encoded as stream maps. +// +// The empty values (for omitempty option) are false, 0, any nil pointer +// or interface value, and any array, slice, map, or string of length zero. +// +// Anonymous fields are encoded inline except: +// - the struct tag specifies a replacement name (first value) +// - the field is of an interface type +// +// Examples: +// +// // NOTE: 'json:' can be used as struct tag key, in place 'codec:' below. +// type MyStruct struct { +// _struct bool `codec:",omitempty"` //set omitempty for every field +// Field1 string `codec:"-"` //skip this field +// Field2 int `codec:"myName"` //Use key "myName" in encode stream +// Field3 int32 `codec:",omitempty"` //use key "Field3". Omit if empty. +// Field4 bool `codec:"f4,omitempty"` //use key "f4". Omit if empty. +// io.Reader //use key "Reader". +// MyStruct `codec:"my1" //use key "my1". +// MyStruct //inline it +// ... +// } +// +// type MyStruct struct { +// _struct bool `codec:",omitempty,toarray"` //set omitempty for every field +// //and encode struct as an array +// } +// +// The mode of encoding is based on the type of the value. When a value is seen: +// - If a Selfer, call its CodecEncodeSelf method +// - If an extension is registered for it, call that extension function +// - If it implements encoding.(Binary|Text|JSON)Marshaler, call its Marshal(Binary|Text|JSON) method +// - Else encode it based on its reflect.Kind +// +// Note that struct field names and keys in map[string]XXX will be treated as symbols. +// Some formats support symbols (e.g. binc) and will properly encode the string +// only once in the stream, and use a tag to refer to it thereafter. +func (e *Encoder) Encode(v interface{}) (err error) { + defer panicToErr(&err) + e.encode(v) + e.w.atEndOfEncode() + return +} + +// MustEncode is like Encode, but panics if unable to Encode. +// This provides insight to the code location that triggered the error. +func (e *Encoder) MustEncode(v interface{}) { + e.encode(v) + e.w.atEndOfEncode() +} + +// comment out these (Must)Write methods. They were only put there to support cbor. +// However, users already have access to the streams, and can write directly. +// +// // Write allows users write to the Encoder stream directly. +// func (e *Encoder) Write(bs []byte) (err error) { +// defer panicToErr(&err) +// e.w.writeb(bs) +// return +// } +// // MustWrite is like write, but panics if unable to Write. +// func (e *Encoder) MustWrite(bs []byte) { +// e.w.writeb(bs) +// } + +func (e *Encoder) encode(iv interface{}) { + // if ics, ok := iv.(Selfer); ok { + // ics.CodecEncodeSelf(e) + // return + // } + + switch v := iv.(type) { + case nil: + e.e.EncodeNil() + case Selfer: + v.CodecEncodeSelf(e) + + case reflect.Value: + e.encodeValue(v, nil) + + case string: + e.e.EncodeString(c_UTF8, v) + case bool: + e.e.EncodeBool(v) + case int: + e.e.EncodeInt(int64(v)) + case int8: + e.e.EncodeInt(int64(v)) + case int16: + e.e.EncodeInt(int64(v)) + case int32: + e.e.EncodeInt(int64(v)) + case int64: + e.e.EncodeInt(v) + case uint: + e.e.EncodeUint(uint64(v)) + case uint8: + e.e.EncodeUint(uint64(v)) + case uint16: + e.e.EncodeUint(uint64(v)) + case uint32: + e.e.EncodeUint(uint64(v)) + case uint64: + e.e.EncodeUint(v) + case float32: + e.e.EncodeFloat32(v) + case float64: + e.e.EncodeFloat64(v) + + case []uint8: + e.e.EncodeStringBytes(c_RAW, v) + + case *string: + e.e.EncodeString(c_UTF8, *v) + case *bool: + e.e.EncodeBool(*v) + case *int: + e.e.EncodeInt(int64(*v)) + case *int8: + e.e.EncodeInt(int64(*v)) + case *int16: + e.e.EncodeInt(int64(*v)) + case *int32: + e.e.EncodeInt(int64(*v)) + case *int64: + e.e.EncodeInt(*v) + case *uint: + e.e.EncodeUint(uint64(*v)) + case *uint8: + e.e.EncodeUint(uint64(*v)) + case *uint16: + e.e.EncodeUint(uint64(*v)) + case *uint32: + e.e.EncodeUint(uint64(*v)) + case *uint64: + e.e.EncodeUint(*v) + case *float32: + e.e.EncodeFloat32(*v) + case *float64: + e.e.EncodeFloat64(*v) + + case *[]uint8: + e.e.EncodeStringBytes(c_RAW, *v) + + default: + const checkCodecSelfer1 = true // in case T is passed, where *T is a Selfer, still checkCodecSelfer + if !fastpathEncodeTypeSwitch(iv, e) { + e.encodeI(iv, false, checkCodecSelfer1) + } + } +} + +func (e *Encoder) encodeI(iv interface{}, checkFastpath, checkCodecSelfer bool) { + if rv, proceed := e.preEncodeValue(reflect.ValueOf(iv)); proceed { + rt := rv.Type() + rtid := reflect.ValueOf(rt).Pointer() + fn := e.getEncFn(rtid, rt, checkFastpath, checkCodecSelfer) + fn.f(&fn.i, rv) + } +} + +func (e *Encoder) preEncodeValue(rv reflect.Value) (rv2 reflect.Value, proceed bool) { + // use a goto statement instead of a recursive function for ptr/interface. +TOP: + switch rv.Kind() { + case reflect.Ptr, reflect.Interface: + if rv.IsNil() { + e.e.EncodeNil() + return + } + rv = rv.Elem() + goto TOP + case reflect.Slice, reflect.Map: + if rv.IsNil() { + e.e.EncodeNil() + return + } + case reflect.Invalid, reflect.Func: + e.e.EncodeNil() + return + } + + return rv, true +} + +func (e *Encoder) encodeValue(rv reflect.Value, fn *encFn) { + // if a valid fn is passed, it MUST BE for the dereferenced type of rv + if rv, proceed := e.preEncodeValue(rv); proceed { + if fn == nil { + rt := rv.Type() + rtid := reflect.ValueOf(rt).Pointer() + fn = e.getEncFn(rtid, rt, true, true) + } + fn.f(&fn.i, rv) + } +} + +func (e *Encoder) getEncFn(rtid uintptr, rt reflect.Type, checkFastpath, checkCodecSelfer bool) (fn *encFn) { + // rtid := reflect.ValueOf(rt).Pointer() + var ok bool + if useMapForCodecCache { + fn, ok = e.f[rtid] + } else { + for i := range e.s { + v := &(e.s[i]) + if v.rtid == rtid { + fn, ok = &(v.fn), true + break + } + } + } + if ok { + return + } + + if useMapForCodecCache { + if e.f == nil { + e.f = make(map[uintptr]*encFn, initCollectionCap) + } + fn = new(encFn) + e.f[rtid] = fn + } else { + if e.s == nil { + e.s = make([]encRtidFn, 0, initCollectionCap) + } + e.s = append(e.s, encRtidFn{rtid: rtid}) + fn = &(e.s[len(e.s)-1]).fn + } + + ti := e.h.getTypeInfo(rtid, rt) + fi := &(fn.i) + fi.e = e + fi.ti = ti + + if checkCodecSelfer && ti.cs { + fn.f = (*encFnInfo).selferMarshal + } else if rtid == rawExtTypId { + fn.f = (*encFnInfo).rawExt + } else if e.e.IsBuiltinType(rtid) { + fn.f = (*encFnInfo).builtin + } else if xfFn := e.h.getExt(rtid); xfFn != nil { + fi.xfTag, fi.xfFn = xfFn.tag, xfFn.ext + fn.f = (*encFnInfo).ext + } else if supportMarshalInterfaces && e.be && ti.bm { + fn.f = (*encFnInfo).binaryMarshal + } else if supportMarshalInterfaces && !e.be && e.js && ti.jm { + //If JSON, we should check JSONMarshal before textMarshal + fn.f = (*encFnInfo).jsonMarshal + } else if supportMarshalInterfaces && !e.be && ti.tm { + fn.f = (*encFnInfo).textMarshal + } else { + rk := rt.Kind() + if fastpathEnabled && checkFastpath && (rk == reflect.Map || rk == reflect.Slice) { + if rt.PkgPath() == "" { + if idx := fastpathAV.index(rtid); idx != -1 { + fn.f = fastpathAV[idx].encfn + } + } else { + ok = false + // use mapping for underlying type if there + var rtu reflect.Type + if rk == reflect.Map { + rtu = reflect.MapOf(rt.Key(), rt.Elem()) + } else { + rtu = reflect.SliceOf(rt.Elem()) + } + rtuid := reflect.ValueOf(rtu).Pointer() + if idx := fastpathAV.index(rtuid); idx != -1 { + xfnf := fastpathAV[idx].encfn + xrt := fastpathAV[idx].rt + fn.f = func(xf *encFnInfo, xrv reflect.Value) { + xfnf(xf, xrv.Convert(xrt)) + } + } + } + } + if fn.f == nil { + switch rk { + case reflect.Bool: + fn.f = (*encFnInfo).kBool + case reflect.String: + fn.f = (*encFnInfo).kString + case reflect.Float64: + fn.f = (*encFnInfo).kFloat64 + case reflect.Float32: + fn.f = (*encFnInfo).kFloat32 + case reflect.Int, reflect.Int8, reflect.Int64, reflect.Int32, reflect.Int16: + fn.f = (*encFnInfo).kInt + case reflect.Uint8, reflect.Uint64, reflect.Uint, reflect.Uint32, reflect.Uint16, reflect.Uintptr: + fn.f = (*encFnInfo).kUint + case reflect.Invalid: + fn.f = (*encFnInfo).kInvalid + case reflect.Chan: + fi.seq = seqTypeChan + fn.f = (*encFnInfo).kSlice + case reflect.Slice: + fi.seq = seqTypeSlice + fn.f = (*encFnInfo).kSlice + case reflect.Array: + fi.seq = seqTypeArray + fn.f = (*encFnInfo).kSlice + case reflect.Struct: + fn.f = (*encFnInfo).kStruct + // case reflect.Ptr: + // fn.f = (*encFnInfo).kPtr + case reflect.Interface: + fn.f = (*encFnInfo).kInterface + case reflect.Map: + fn.f = (*encFnInfo).kMap + default: + fn.f = (*encFnInfo).kErr + } + } + } + + return +} + +func (e *Encoder) marshal(bs []byte, fnerr error, asis bool, c charEncoding) { + if fnerr != nil { + panic(fnerr) + } + if bs == nil { + e.e.EncodeNil() + } else if asis { + e.asis(bs) + } else { + e.e.EncodeStringBytes(c, bs) + } +} + +func (e *Encoder) asis(v []byte) { + if e.as == nil { + e.w.writeb(v) + } else { + e.as.EncodeAsis(v) + } +} + +func (e *Encoder) errorf(format string, params ...interface{}) { + err := fmt.Errorf(format, params...) + panic(err) +} + +// ---------------------------------------- + +const encStructPoolLen = 5 + +// encStructPool is an array of sync.Pool. +// Each element of the array pools one of encStructPool(8|16|32|64). +// It allows the re-use of slices up to 64 in length. +// A performance cost of encoding structs was collecting +// which values were empty and should be omitted. +// We needed slices of reflect.Value and string to collect them. +// This shared pool reduces the amount of unnecessary creation we do. +// The cost is that of locking sometimes, but sync.Pool is efficient +// enough to reduce thread contention. +var encStructPool [encStructPoolLen]sync.Pool + +func init() { + encStructPool[0].New = func() interface{} { return new([8]stringRv) } + encStructPool[1].New = func() interface{} { return new([16]stringRv) } + encStructPool[2].New = func() interface{} { return new([32]stringRv) } + encStructPool[3].New = func() interface{} { return new([64]stringRv) } + encStructPool[4].New = func() interface{} { return new([128]stringRv) } +} + +func encStructPoolGet(newlen int) (p *sync.Pool, v interface{}, s []stringRv) { + // if encStructPoolLen != 5 { // constant chec, so removed at build time. + // panic(errors.New("encStructPoolLen must be equal to 4")) // defensive, in case it is changed + // } + // idxpool := newlen / 8 + + // if pool == nil { + // fkvs = make([]stringRv, newlen) + // } else { + // poolv = pool.Get() + // switch vv := poolv.(type) { + // case *[8]stringRv: + // fkvs = vv[:newlen] + // case *[16]stringRv: + // fkvs = vv[:newlen] + // case *[32]stringRv: + // fkvs = vv[:newlen] + // case *[64]stringRv: + // fkvs = vv[:newlen] + // case *[128]stringRv: + // fkvs = vv[:newlen] + // } + // } + + if newlen <= 8 { + p = &encStructPool[0] + v = p.Get() + s = v.(*[8]stringRv)[:newlen] + } else if newlen <= 16 { + p = &encStructPool[1] + v = p.Get() + s = v.(*[16]stringRv)[:newlen] + } else if newlen <= 32 { + p = &encStructPool[2] + v = p.Get() + s = v.(*[32]stringRv)[:newlen] + } else if newlen <= 64 { + p = &encStructPool[3] + v = p.Get() + s = v.(*[64]stringRv)[:newlen] + } else if newlen <= 128 { + p = &encStructPool[4] + v = p.Get() + s = v.(*[128]stringRv)[:newlen] + } else { + s = make([]stringRv, newlen) + } + return +} + +// ---------------------------------------- + +// func encErr(format string, params ...interface{}) { +// doPanic(msgTagEnc, format, params...) +// } diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/fast-path.generated.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/fast-path.generated.go new file mode 100644 index 0000000000000..d968a500fde57 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/fast-path.generated.go @@ -0,0 +1,38900 @@ +// +build !notfastpath + +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED from fast-path.go.tmpl +// ************************************************************ + +package codec + +// Fast path functions try to create a fast path encode or decode implementation +// for common maps and slices. +// +// We define the functions and register then in this single file +// so as not to pollute the encode.go and decode.go, and create a dependency in there. +// This file can be omitted without causing a build failure. +// +// The advantage of fast paths is: +// - Many calls bypass reflection altogether +// +// Currently support +// - slice of all builtin types, +// - map of all builtin types to string or interface value +// - symetrical maps of all builtin types (e.g. str-str, uint8-uint8) +// This should provide adequate "typical" implementations. +// +// Note that fast track decode functions must handle values for which an address cannot be obtained. +// For example: +// m2 := map[string]int{} +// p2 := []interface{}{m2} +// // decoding into p2 will bomb if fast track functions do not treat like unaddressable. +// + +import ( + "reflect" + "sort" +) + +const fastpathCheckNilFalse = false // for reflect +const fastpathCheckNilTrue = true // for type switch + +type fastpathT struct{} + +var fastpathTV fastpathT + +type fastpathE struct { + rtid uintptr + rt reflect.Type + encfn func(*encFnInfo, reflect.Value) + decfn func(*decFnInfo, reflect.Value) +} + +type fastpathA [271]fastpathE + +func (x *fastpathA) index(rtid uintptr) int { + // use binary search to grab the index (adapted from sort/search.go) + h, i, j := 0, 0, 271 // len(x) + for i < j { + h = i + (j-i)/2 + if x[h].rtid < rtid { + i = h + 1 + } else { + j = h + } + } + if i < 271 && x[i].rtid == rtid { + return i + } + return -1 +} + +type fastpathAslice []fastpathE + +func (x fastpathAslice) Len() int { return len(x) } +func (x fastpathAslice) Less(i, j int) bool { return x[i].rtid < x[j].rtid } +func (x fastpathAslice) Swap(i, j int) { x[i], x[j] = x[j], x[i] } + +var fastpathAV fastpathA + +// due to possible initialization loop error, make fastpath in an init() +func init() { + if !fastpathEnabled { + return + } + i := 0 + fn := func(v interface{}, fe func(*encFnInfo, reflect.Value), fd func(*decFnInfo, reflect.Value)) (f fastpathE) { + xrt := reflect.TypeOf(v) + xptr := reflect.ValueOf(xrt).Pointer() + fastpathAV[i] = fastpathE{xptr, xrt, fe, fd} + i++ + return + } + + fn([]interface{}(nil), (*encFnInfo).fastpathEncSliceIntfR, (*decFnInfo).fastpathDecSliceIntfR) + fn([]string(nil), (*encFnInfo).fastpathEncSliceStringR, (*decFnInfo).fastpathDecSliceStringR) + fn([]float32(nil), (*encFnInfo).fastpathEncSliceFloat32R, (*decFnInfo).fastpathDecSliceFloat32R) + fn([]float64(nil), (*encFnInfo).fastpathEncSliceFloat64R, (*decFnInfo).fastpathDecSliceFloat64R) + fn([]uint(nil), (*encFnInfo).fastpathEncSliceUintR, (*decFnInfo).fastpathDecSliceUintR) + fn([]uint16(nil), (*encFnInfo).fastpathEncSliceUint16R, (*decFnInfo).fastpathDecSliceUint16R) + fn([]uint32(nil), (*encFnInfo).fastpathEncSliceUint32R, (*decFnInfo).fastpathDecSliceUint32R) + fn([]uint64(nil), (*encFnInfo).fastpathEncSliceUint64R, (*decFnInfo).fastpathDecSliceUint64R) + fn([]uintptr(nil), (*encFnInfo).fastpathEncSliceUintptrR, (*decFnInfo).fastpathDecSliceUintptrR) + fn([]int(nil), (*encFnInfo).fastpathEncSliceIntR, (*decFnInfo).fastpathDecSliceIntR) + fn([]int8(nil), (*encFnInfo).fastpathEncSliceInt8R, (*decFnInfo).fastpathDecSliceInt8R) + fn([]int16(nil), (*encFnInfo).fastpathEncSliceInt16R, (*decFnInfo).fastpathDecSliceInt16R) + fn([]int32(nil), (*encFnInfo).fastpathEncSliceInt32R, (*decFnInfo).fastpathDecSliceInt32R) + fn([]int64(nil), (*encFnInfo).fastpathEncSliceInt64R, (*decFnInfo).fastpathDecSliceInt64R) + fn([]bool(nil), (*encFnInfo).fastpathEncSliceBoolR, (*decFnInfo).fastpathDecSliceBoolR) + + fn(map[interface{}]interface{}(nil), (*encFnInfo).fastpathEncMapIntfIntfR, (*decFnInfo).fastpathDecMapIntfIntfR) + fn(map[interface{}]string(nil), (*encFnInfo).fastpathEncMapIntfStringR, (*decFnInfo).fastpathDecMapIntfStringR) + fn(map[interface{}]uint(nil), (*encFnInfo).fastpathEncMapIntfUintR, (*decFnInfo).fastpathDecMapIntfUintR) + fn(map[interface{}]uint8(nil), (*encFnInfo).fastpathEncMapIntfUint8R, (*decFnInfo).fastpathDecMapIntfUint8R) + fn(map[interface{}]uint16(nil), (*encFnInfo).fastpathEncMapIntfUint16R, (*decFnInfo).fastpathDecMapIntfUint16R) + fn(map[interface{}]uint32(nil), (*encFnInfo).fastpathEncMapIntfUint32R, (*decFnInfo).fastpathDecMapIntfUint32R) + fn(map[interface{}]uint64(nil), (*encFnInfo).fastpathEncMapIntfUint64R, (*decFnInfo).fastpathDecMapIntfUint64R) + fn(map[interface{}]uintptr(nil), (*encFnInfo).fastpathEncMapIntfUintptrR, (*decFnInfo).fastpathDecMapIntfUintptrR) + fn(map[interface{}]int(nil), (*encFnInfo).fastpathEncMapIntfIntR, (*decFnInfo).fastpathDecMapIntfIntR) + fn(map[interface{}]int8(nil), (*encFnInfo).fastpathEncMapIntfInt8R, (*decFnInfo).fastpathDecMapIntfInt8R) + fn(map[interface{}]int16(nil), (*encFnInfo).fastpathEncMapIntfInt16R, (*decFnInfo).fastpathDecMapIntfInt16R) + fn(map[interface{}]int32(nil), (*encFnInfo).fastpathEncMapIntfInt32R, (*decFnInfo).fastpathDecMapIntfInt32R) + fn(map[interface{}]int64(nil), (*encFnInfo).fastpathEncMapIntfInt64R, (*decFnInfo).fastpathDecMapIntfInt64R) + fn(map[interface{}]float32(nil), (*encFnInfo).fastpathEncMapIntfFloat32R, (*decFnInfo).fastpathDecMapIntfFloat32R) + fn(map[interface{}]float64(nil), (*encFnInfo).fastpathEncMapIntfFloat64R, (*decFnInfo).fastpathDecMapIntfFloat64R) + fn(map[interface{}]bool(nil), (*encFnInfo).fastpathEncMapIntfBoolR, (*decFnInfo).fastpathDecMapIntfBoolR) + fn(map[string]interface{}(nil), (*encFnInfo).fastpathEncMapStringIntfR, (*decFnInfo).fastpathDecMapStringIntfR) + fn(map[string]string(nil), (*encFnInfo).fastpathEncMapStringStringR, (*decFnInfo).fastpathDecMapStringStringR) + fn(map[string]uint(nil), (*encFnInfo).fastpathEncMapStringUintR, (*decFnInfo).fastpathDecMapStringUintR) + fn(map[string]uint8(nil), (*encFnInfo).fastpathEncMapStringUint8R, (*decFnInfo).fastpathDecMapStringUint8R) + fn(map[string]uint16(nil), (*encFnInfo).fastpathEncMapStringUint16R, (*decFnInfo).fastpathDecMapStringUint16R) + fn(map[string]uint32(nil), (*encFnInfo).fastpathEncMapStringUint32R, (*decFnInfo).fastpathDecMapStringUint32R) + fn(map[string]uint64(nil), (*encFnInfo).fastpathEncMapStringUint64R, (*decFnInfo).fastpathDecMapStringUint64R) + fn(map[string]uintptr(nil), (*encFnInfo).fastpathEncMapStringUintptrR, (*decFnInfo).fastpathDecMapStringUintptrR) + fn(map[string]int(nil), (*encFnInfo).fastpathEncMapStringIntR, (*decFnInfo).fastpathDecMapStringIntR) + fn(map[string]int8(nil), (*encFnInfo).fastpathEncMapStringInt8R, (*decFnInfo).fastpathDecMapStringInt8R) + fn(map[string]int16(nil), (*encFnInfo).fastpathEncMapStringInt16R, (*decFnInfo).fastpathDecMapStringInt16R) + fn(map[string]int32(nil), (*encFnInfo).fastpathEncMapStringInt32R, (*decFnInfo).fastpathDecMapStringInt32R) + fn(map[string]int64(nil), (*encFnInfo).fastpathEncMapStringInt64R, (*decFnInfo).fastpathDecMapStringInt64R) + fn(map[string]float32(nil), (*encFnInfo).fastpathEncMapStringFloat32R, (*decFnInfo).fastpathDecMapStringFloat32R) + fn(map[string]float64(nil), (*encFnInfo).fastpathEncMapStringFloat64R, (*decFnInfo).fastpathDecMapStringFloat64R) + fn(map[string]bool(nil), (*encFnInfo).fastpathEncMapStringBoolR, (*decFnInfo).fastpathDecMapStringBoolR) + fn(map[float32]interface{}(nil), (*encFnInfo).fastpathEncMapFloat32IntfR, (*decFnInfo).fastpathDecMapFloat32IntfR) + fn(map[float32]string(nil), (*encFnInfo).fastpathEncMapFloat32StringR, (*decFnInfo).fastpathDecMapFloat32StringR) + fn(map[float32]uint(nil), (*encFnInfo).fastpathEncMapFloat32UintR, (*decFnInfo).fastpathDecMapFloat32UintR) + fn(map[float32]uint8(nil), (*encFnInfo).fastpathEncMapFloat32Uint8R, (*decFnInfo).fastpathDecMapFloat32Uint8R) + fn(map[float32]uint16(nil), (*encFnInfo).fastpathEncMapFloat32Uint16R, (*decFnInfo).fastpathDecMapFloat32Uint16R) + fn(map[float32]uint32(nil), (*encFnInfo).fastpathEncMapFloat32Uint32R, (*decFnInfo).fastpathDecMapFloat32Uint32R) + fn(map[float32]uint64(nil), (*encFnInfo).fastpathEncMapFloat32Uint64R, (*decFnInfo).fastpathDecMapFloat32Uint64R) + fn(map[float32]uintptr(nil), (*encFnInfo).fastpathEncMapFloat32UintptrR, (*decFnInfo).fastpathDecMapFloat32UintptrR) + fn(map[float32]int(nil), (*encFnInfo).fastpathEncMapFloat32IntR, (*decFnInfo).fastpathDecMapFloat32IntR) + fn(map[float32]int8(nil), (*encFnInfo).fastpathEncMapFloat32Int8R, (*decFnInfo).fastpathDecMapFloat32Int8R) + fn(map[float32]int16(nil), (*encFnInfo).fastpathEncMapFloat32Int16R, (*decFnInfo).fastpathDecMapFloat32Int16R) + fn(map[float32]int32(nil), (*encFnInfo).fastpathEncMapFloat32Int32R, (*decFnInfo).fastpathDecMapFloat32Int32R) + fn(map[float32]int64(nil), (*encFnInfo).fastpathEncMapFloat32Int64R, (*decFnInfo).fastpathDecMapFloat32Int64R) + fn(map[float32]float32(nil), (*encFnInfo).fastpathEncMapFloat32Float32R, (*decFnInfo).fastpathDecMapFloat32Float32R) + fn(map[float32]float64(nil), (*encFnInfo).fastpathEncMapFloat32Float64R, (*decFnInfo).fastpathDecMapFloat32Float64R) + fn(map[float32]bool(nil), (*encFnInfo).fastpathEncMapFloat32BoolR, (*decFnInfo).fastpathDecMapFloat32BoolR) + fn(map[float64]interface{}(nil), (*encFnInfo).fastpathEncMapFloat64IntfR, (*decFnInfo).fastpathDecMapFloat64IntfR) + fn(map[float64]string(nil), (*encFnInfo).fastpathEncMapFloat64StringR, (*decFnInfo).fastpathDecMapFloat64StringR) + fn(map[float64]uint(nil), (*encFnInfo).fastpathEncMapFloat64UintR, (*decFnInfo).fastpathDecMapFloat64UintR) + fn(map[float64]uint8(nil), (*encFnInfo).fastpathEncMapFloat64Uint8R, (*decFnInfo).fastpathDecMapFloat64Uint8R) + fn(map[float64]uint16(nil), (*encFnInfo).fastpathEncMapFloat64Uint16R, (*decFnInfo).fastpathDecMapFloat64Uint16R) + fn(map[float64]uint32(nil), (*encFnInfo).fastpathEncMapFloat64Uint32R, (*decFnInfo).fastpathDecMapFloat64Uint32R) + fn(map[float64]uint64(nil), (*encFnInfo).fastpathEncMapFloat64Uint64R, (*decFnInfo).fastpathDecMapFloat64Uint64R) + fn(map[float64]uintptr(nil), (*encFnInfo).fastpathEncMapFloat64UintptrR, (*decFnInfo).fastpathDecMapFloat64UintptrR) + fn(map[float64]int(nil), (*encFnInfo).fastpathEncMapFloat64IntR, (*decFnInfo).fastpathDecMapFloat64IntR) + fn(map[float64]int8(nil), (*encFnInfo).fastpathEncMapFloat64Int8R, (*decFnInfo).fastpathDecMapFloat64Int8R) + fn(map[float64]int16(nil), (*encFnInfo).fastpathEncMapFloat64Int16R, (*decFnInfo).fastpathDecMapFloat64Int16R) + fn(map[float64]int32(nil), (*encFnInfo).fastpathEncMapFloat64Int32R, (*decFnInfo).fastpathDecMapFloat64Int32R) + fn(map[float64]int64(nil), (*encFnInfo).fastpathEncMapFloat64Int64R, (*decFnInfo).fastpathDecMapFloat64Int64R) + fn(map[float64]float32(nil), (*encFnInfo).fastpathEncMapFloat64Float32R, (*decFnInfo).fastpathDecMapFloat64Float32R) + fn(map[float64]float64(nil), (*encFnInfo).fastpathEncMapFloat64Float64R, (*decFnInfo).fastpathDecMapFloat64Float64R) + fn(map[float64]bool(nil), (*encFnInfo).fastpathEncMapFloat64BoolR, (*decFnInfo).fastpathDecMapFloat64BoolR) + fn(map[uint]interface{}(nil), (*encFnInfo).fastpathEncMapUintIntfR, (*decFnInfo).fastpathDecMapUintIntfR) + fn(map[uint]string(nil), (*encFnInfo).fastpathEncMapUintStringR, (*decFnInfo).fastpathDecMapUintStringR) + fn(map[uint]uint(nil), (*encFnInfo).fastpathEncMapUintUintR, (*decFnInfo).fastpathDecMapUintUintR) + fn(map[uint]uint8(nil), (*encFnInfo).fastpathEncMapUintUint8R, (*decFnInfo).fastpathDecMapUintUint8R) + fn(map[uint]uint16(nil), (*encFnInfo).fastpathEncMapUintUint16R, (*decFnInfo).fastpathDecMapUintUint16R) + fn(map[uint]uint32(nil), (*encFnInfo).fastpathEncMapUintUint32R, (*decFnInfo).fastpathDecMapUintUint32R) + fn(map[uint]uint64(nil), (*encFnInfo).fastpathEncMapUintUint64R, (*decFnInfo).fastpathDecMapUintUint64R) + fn(map[uint]uintptr(nil), (*encFnInfo).fastpathEncMapUintUintptrR, (*decFnInfo).fastpathDecMapUintUintptrR) + fn(map[uint]int(nil), (*encFnInfo).fastpathEncMapUintIntR, (*decFnInfo).fastpathDecMapUintIntR) + fn(map[uint]int8(nil), (*encFnInfo).fastpathEncMapUintInt8R, (*decFnInfo).fastpathDecMapUintInt8R) + fn(map[uint]int16(nil), (*encFnInfo).fastpathEncMapUintInt16R, (*decFnInfo).fastpathDecMapUintInt16R) + fn(map[uint]int32(nil), (*encFnInfo).fastpathEncMapUintInt32R, (*decFnInfo).fastpathDecMapUintInt32R) + fn(map[uint]int64(nil), (*encFnInfo).fastpathEncMapUintInt64R, (*decFnInfo).fastpathDecMapUintInt64R) + fn(map[uint]float32(nil), (*encFnInfo).fastpathEncMapUintFloat32R, (*decFnInfo).fastpathDecMapUintFloat32R) + fn(map[uint]float64(nil), (*encFnInfo).fastpathEncMapUintFloat64R, (*decFnInfo).fastpathDecMapUintFloat64R) + fn(map[uint]bool(nil), (*encFnInfo).fastpathEncMapUintBoolR, (*decFnInfo).fastpathDecMapUintBoolR) + fn(map[uint8]interface{}(nil), (*encFnInfo).fastpathEncMapUint8IntfR, (*decFnInfo).fastpathDecMapUint8IntfR) + fn(map[uint8]string(nil), (*encFnInfo).fastpathEncMapUint8StringR, (*decFnInfo).fastpathDecMapUint8StringR) + fn(map[uint8]uint(nil), (*encFnInfo).fastpathEncMapUint8UintR, (*decFnInfo).fastpathDecMapUint8UintR) + fn(map[uint8]uint8(nil), (*encFnInfo).fastpathEncMapUint8Uint8R, (*decFnInfo).fastpathDecMapUint8Uint8R) + fn(map[uint8]uint16(nil), (*encFnInfo).fastpathEncMapUint8Uint16R, (*decFnInfo).fastpathDecMapUint8Uint16R) + fn(map[uint8]uint32(nil), (*encFnInfo).fastpathEncMapUint8Uint32R, (*decFnInfo).fastpathDecMapUint8Uint32R) + fn(map[uint8]uint64(nil), (*encFnInfo).fastpathEncMapUint8Uint64R, (*decFnInfo).fastpathDecMapUint8Uint64R) + fn(map[uint8]uintptr(nil), (*encFnInfo).fastpathEncMapUint8UintptrR, (*decFnInfo).fastpathDecMapUint8UintptrR) + fn(map[uint8]int(nil), (*encFnInfo).fastpathEncMapUint8IntR, (*decFnInfo).fastpathDecMapUint8IntR) + fn(map[uint8]int8(nil), (*encFnInfo).fastpathEncMapUint8Int8R, (*decFnInfo).fastpathDecMapUint8Int8R) + fn(map[uint8]int16(nil), (*encFnInfo).fastpathEncMapUint8Int16R, (*decFnInfo).fastpathDecMapUint8Int16R) + fn(map[uint8]int32(nil), (*encFnInfo).fastpathEncMapUint8Int32R, (*decFnInfo).fastpathDecMapUint8Int32R) + fn(map[uint8]int64(nil), (*encFnInfo).fastpathEncMapUint8Int64R, (*decFnInfo).fastpathDecMapUint8Int64R) + fn(map[uint8]float32(nil), (*encFnInfo).fastpathEncMapUint8Float32R, (*decFnInfo).fastpathDecMapUint8Float32R) + fn(map[uint8]float64(nil), (*encFnInfo).fastpathEncMapUint8Float64R, (*decFnInfo).fastpathDecMapUint8Float64R) + fn(map[uint8]bool(nil), (*encFnInfo).fastpathEncMapUint8BoolR, (*decFnInfo).fastpathDecMapUint8BoolR) + fn(map[uint16]interface{}(nil), (*encFnInfo).fastpathEncMapUint16IntfR, (*decFnInfo).fastpathDecMapUint16IntfR) + fn(map[uint16]string(nil), (*encFnInfo).fastpathEncMapUint16StringR, (*decFnInfo).fastpathDecMapUint16StringR) + fn(map[uint16]uint(nil), (*encFnInfo).fastpathEncMapUint16UintR, (*decFnInfo).fastpathDecMapUint16UintR) + fn(map[uint16]uint8(nil), (*encFnInfo).fastpathEncMapUint16Uint8R, (*decFnInfo).fastpathDecMapUint16Uint8R) + fn(map[uint16]uint16(nil), (*encFnInfo).fastpathEncMapUint16Uint16R, (*decFnInfo).fastpathDecMapUint16Uint16R) + fn(map[uint16]uint32(nil), (*encFnInfo).fastpathEncMapUint16Uint32R, (*decFnInfo).fastpathDecMapUint16Uint32R) + fn(map[uint16]uint64(nil), (*encFnInfo).fastpathEncMapUint16Uint64R, (*decFnInfo).fastpathDecMapUint16Uint64R) + fn(map[uint16]uintptr(nil), (*encFnInfo).fastpathEncMapUint16UintptrR, (*decFnInfo).fastpathDecMapUint16UintptrR) + fn(map[uint16]int(nil), (*encFnInfo).fastpathEncMapUint16IntR, (*decFnInfo).fastpathDecMapUint16IntR) + fn(map[uint16]int8(nil), (*encFnInfo).fastpathEncMapUint16Int8R, (*decFnInfo).fastpathDecMapUint16Int8R) + fn(map[uint16]int16(nil), (*encFnInfo).fastpathEncMapUint16Int16R, (*decFnInfo).fastpathDecMapUint16Int16R) + fn(map[uint16]int32(nil), (*encFnInfo).fastpathEncMapUint16Int32R, (*decFnInfo).fastpathDecMapUint16Int32R) + fn(map[uint16]int64(nil), (*encFnInfo).fastpathEncMapUint16Int64R, (*decFnInfo).fastpathDecMapUint16Int64R) + fn(map[uint16]float32(nil), (*encFnInfo).fastpathEncMapUint16Float32R, (*decFnInfo).fastpathDecMapUint16Float32R) + fn(map[uint16]float64(nil), (*encFnInfo).fastpathEncMapUint16Float64R, (*decFnInfo).fastpathDecMapUint16Float64R) + fn(map[uint16]bool(nil), (*encFnInfo).fastpathEncMapUint16BoolR, (*decFnInfo).fastpathDecMapUint16BoolR) + fn(map[uint32]interface{}(nil), (*encFnInfo).fastpathEncMapUint32IntfR, (*decFnInfo).fastpathDecMapUint32IntfR) + fn(map[uint32]string(nil), (*encFnInfo).fastpathEncMapUint32StringR, (*decFnInfo).fastpathDecMapUint32StringR) + fn(map[uint32]uint(nil), (*encFnInfo).fastpathEncMapUint32UintR, (*decFnInfo).fastpathDecMapUint32UintR) + fn(map[uint32]uint8(nil), (*encFnInfo).fastpathEncMapUint32Uint8R, (*decFnInfo).fastpathDecMapUint32Uint8R) + fn(map[uint32]uint16(nil), (*encFnInfo).fastpathEncMapUint32Uint16R, (*decFnInfo).fastpathDecMapUint32Uint16R) + fn(map[uint32]uint32(nil), (*encFnInfo).fastpathEncMapUint32Uint32R, (*decFnInfo).fastpathDecMapUint32Uint32R) + fn(map[uint32]uint64(nil), (*encFnInfo).fastpathEncMapUint32Uint64R, (*decFnInfo).fastpathDecMapUint32Uint64R) + fn(map[uint32]uintptr(nil), (*encFnInfo).fastpathEncMapUint32UintptrR, (*decFnInfo).fastpathDecMapUint32UintptrR) + fn(map[uint32]int(nil), (*encFnInfo).fastpathEncMapUint32IntR, (*decFnInfo).fastpathDecMapUint32IntR) + fn(map[uint32]int8(nil), (*encFnInfo).fastpathEncMapUint32Int8R, (*decFnInfo).fastpathDecMapUint32Int8R) + fn(map[uint32]int16(nil), (*encFnInfo).fastpathEncMapUint32Int16R, (*decFnInfo).fastpathDecMapUint32Int16R) + fn(map[uint32]int32(nil), (*encFnInfo).fastpathEncMapUint32Int32R, (*decFnInfo).fastpathDecMapUint32Int32R) + fn(map[uint32]int64(nil), (*encFnInfo).fastpathEncMapUint32Int64R, (*decFnInfo).fastpathDecMapUint32Int64R) + fn(map[uint32]float32(nil), (*encFnInfo).fastpathEncMapUint32Float32R, (*decFnInfo).fastpathDecMapUint32Float32R) + fn(map[uint32]float64(nil), (*encFnInfo).fastpathEncMapUint32Float64R, (*decFnInfo).fastpathDecMapUint32Float64R) + fn(map[uint32]bool(nil), (*encFnInfo).fastpathEncMapUint32BoolR, (*decFnInfo).fastpathDecMapUint32BoolR) + fn(map[uint64]interface{}(nil), (*encFnInfo).fastpathEncMapUint64IntfR, (*decFnInfo).fastpathDecMapUint64IntfR) + fn(map[uint64]string(nil), (*encFnInfo).fastpathEncMapUint64StringR, (*decFnInfo).fastpathDecMapUint64StringR) + fn(map[uint64]uint(nil), (*encFnInfo).fastpathEncMapUint64UintR, (*decFnInfo).fastpathDecMapUint64UintR) + fn(map[uint64]uint8(nil), (*encFnInfo).fastpathEncMapUint64Uint8R, (*decFnInfo).fastpathDecMapUint64Uint8R) + fn(map[uint64]uint16(nil), (*encFnInfo).fastpathEncMapUint64Uint16R, (*decFnInfo).fastpathDecMapUint64Uint16R) + fn(map[uint64]uint32(nil), (*encFnInfo).fastpathEncMapUint64Uint32R, (*decFnInfo).fastpathDecMapUint64Uint32R) + fn(map[uint64]uint64(nil), (*encFnInfo).fastpathEncMapUint64Uint64R, (*decFnInfo).fastpathDecMapUint64Uint64R) + fn(map[uint64]uintptr(nil), (*encFnInfo).fastpathEncMapUint64UintptrR, (*decFnInfo).fastpathDecMapUint64UintptrR) + fn(map[uint64]int(nil), (*encFnInfo).fastpathEncMapUint64IntR, (*decFnInfo).fastpathDecMapUint64IntR) + fn(map[uint64]int8(nil), (*encFnInfo).fastpathEncMapUint64Int8R, (*decFnInfo).fastpathDecMapUint64Int8R) + fn(map[uint64]int16(nil), (*encFnInfo).fastpathEncMapUint64Int16R, (*decFnInfo).fastpathDecMapUint64Int16R) + fn(map[uint64]int32(nil), (*encFnInfo).fastpathEncMapUint64Int32R, (*decFnInfo).fastpathDecMapUint64Int32R) + fn(map[uint64]int64(nil), (*encFnInfo).fastpathEncMapUint64Int64R, (*decFnInfo).fastpathDecMapUint64Int64R) + fn(map[uint64]float32(nil), (*encFnInfo).fastpathEncMapUint64Float32R, (*decFnInfo).fastpathDecMapUint64Float32R) + fn(map[uint64]float64(nil), (*encFnInfo).fastpathEncMapUint64Float64R, (*decFnInfo).fastpathDecMapUint64Float64R) + fn(map[uint64]bool(nil), (*encFnInfo).fastpathEncMapUint64BoolR, (*decFnInfo).fastpathDecMapUint64BoolR) + fn(map[uintptr]interface{}(nil), (*encFnInfo).fastpathEncMapUintptrIntfR, (*decFnInfo).fastpathDecMapUintptrIntfR) + fn(map[uintptr]string(nil), (*encFnInfo).fastpathEncMapUintptrStringR, (*decFnInfo).fastpathDecMapUintptrStringR) + fn(map[uintptr]uint(nil), (*encFnInfo).fastpathEncMapUintptrUintR, (*decFnInfo).fastpathDecMapUintptrUintR) + fn(map[uintptr]uint8(nil), (*encFnInfo).fastpathEncMapUintptrUint8R, (*decFnInfo).fastpathDecMapUintptrUint8R) + fn(map[uintptr]uint16(nil), (*encFnInfo).fastpathEncMapUintptrUint16R, (*decFnInfo).fastpathDecMapUintptrUint16R) + fn(map[uintptr]uint32(nil), (*encFnInfo).fastpathEncMapUintptrUint32R, (*decFnInfo).fastpathDecMapUintptrUint32R) + fn(map[uintptr]uint64(nil), (*encFnInfo).fastpathEncMapUintptrUint64R, (*decFnInfo).fastpathDecMapUintptrUint64R) + fn(map[uintptr]uintptr(nil), (*encFnInfo).fastpathEncMapUintptrUintptrR, (*decFnInfo).fastpathDecMapUintptrUintptrR) + fn(map[uintptr]int(nil), (*encFnInfo).fastpathEncMapUintptrIntR, (*decFnInfo).fastpathDecMapUintptrIntR) + fn(map[uintptr]int8(nil), (*encFnInfo).fastpathEncMapUintptrInt8R, (*decFnInfo).fastpathDecMapUintptrInt8R) + fn(map[uintptr]int16(nil), (*encFnInfo).fastpathEncMapUintptrInt16R, (*decFnInfo).fastpathDecMapUintptrInt16R) + fn(map[uintptr]int32(nil), (*encFnInfo).fastpathEncMapUintptrInt32R, (*decFnInfo).fastpathDecMapUintptrInt32R) + fn(map[uintptr]int64(nil), (*encFnInfo).fastpathEncMapUintptrInt64R, (*decFnInfo).fastpathDecMapUintptrInt64R) + fn(map[uintptr]float32(nil), (*encFnInfo).fastpathEncMapUintptrFloat32R, (*decFnInfo).fastpathDecMapUintptrFloat32R) + fn(map[uintptr]float64(nil), (*encFnInfo).fastpathEncMapUintptrFloat64R, (*decFnInfo).fastpathDecMapUintptrFloat64R) + fn(map[uintptr]bool(nil), (*encFnInfo).fastpathEncMapUintptrBoolR, (*decFnInfo).fastpathDecMapUintptrBoolR) + fn(map[int]interface{}(nil), (*encFnInfo).fastpathEncMapIntIntfR, (*decFnInfo).fastpathDecMapIntIntfR) + fn(map[int]string(nil), (*encFnInfo).fastpathEncMapIntStringR, (*decFnInfo).fastpathDecMapIntStringR) + fn(map[int]uint(nil), (*encFnInfo).fastpathEncMapIntUintR, (*decFnInfo).fastpathDecMapIntUintR) + fn(map[int]uint8(nil), (*encFnInfo).fastpathEncMapIntUint8R, (*decFnInfo).fastpathDecMapIntUint8R) + fn(map[int]uint16(nil), (*encFnInfo).fastpathEncMapIntUint16R, (*decFnInfo).fastpathDecMapIntUint16R) + fn(map[int]uint32(nil), (*encFnInfo).fastpathEncMapIntUint32R, (*decFnInfo).fastpathDecMapIntUint32R) + fn(map[int]uint64(nil), (*encFnInfo).fastpathEncMapIntUint64R, (*decFnInfo).fastpathDecMapIntUint64R) + fn(map[int]uintptr(nil), (*encFnInfo).fastpathEncMapIntUintptrR, (*decFnInfo).fastpathDecMapIntUintptrR) + fn(map[int]int(nil), (*encFnInfo).fastpathEncMapIntIntR, (*decFnInfo).fastpathDecMapIntIntR) + fn(map[int]int8(nil), (*encFnInfo).fastpathEncMapIntInt8R, (*decFnInfo).fastpathDecMapIntInt8R) + fn(map[int]int16(nil), (*encFnInfo).fastpathEncMapIntInt16R, (*decFnInfo).fastpathDecMapIntInt16R) + fn(map[int]int32(nil), (*encFnInfo).fastpathEncMapIntInt32R, (*decFnInfo).fastpathDecMapIntInt32R) + fn(map[int]int64(nil), (*encFnInfo).fastpathEncMapIntInt64R, (*decFnInfo).fastpathDecMapIntInt64R) + fn(map[int]float32(nil), (*encFnInfo).fastpathEncMapIntFloat32R, (*decFnInfo).fastpathDecMapIntFloat32R) + fn(map[int]float64(nil), (*encFnInfo).fastpathEncMapIntFloat64R, (*decFnInfo).fastpathDecMapIntFloat64R) + fn(map[int]bool(nil), (*encFnInfo).fastpathEncMapIntBoolR, (*decFnInfo).fastpathDecMapIntBoolR) + fn(map[int8]interface{}(nil), (*encFnInfo).fastpathEncMapInt8IntfR, (*decFnInfo).fastpathDecMapInt8IntfR) + fn(map[int8]string(nil), (*encFnInfo).fastpathEncMapInt8StringR, (*decFnInfo).fastpathDecMapInt8StringR) + fn(map[int8]uint(nil), (*encFnInfo).fastpathEncMapInt8UintR, (*decFnInfo).fastpathDecMapInt8UintR) + fn(map[int8]uint8(nil), (*encFnInfo).fastpathEncMapInt8Uint8R, (*decFnInfo).fastpathDecMapInt8Uint8R) + fn(map[int8]uint16(nil), (*encFnInfo).fastpathEncMapInt8Uint16R, (*decFnInfo).fastpathDecMapInt8Uint16R) + fn(map[int8]uint32(nil), (*encFnInfo).fastpathEncMapInt8Uint32R, (*decFnInfo).fastpathDecMapInt8Uint32R) + fn(map[int8]uint64(nil), (*encFnInfo).fastpathEncMapInt8Uint64R, (*decFnInfo).fastpathDecMapInt8Uint64R) + fn(map[int8]uintptr(nil), (*encFnInfo).fastpathEncMapInt8UintptrR, (*decFnInfo).fastpathDecMapInt8UintptrR) + fn(map[int8]int(nil), (*encFnInfo).fastpathEncMapInt8IntR, (*decFnInfo).fastpathDecMapInt8IntR) + fn(map[int8]int8(nil), (*encFnInfo).fastpathEncMapInt8Int8R, (*decFnInfo).fastpathDecMapInt8Int8R) + fn(map[int8]int16(nil), (*encFnInfo).fastpathEncMapInt8Int16R, (*decFnInfo).fastpathDecMapInt8Int16R) + fn(map[int8]int32(nil), (*encFnInfo).fastpathEncMapInt8Int32R, (*decFnInfo).fastpathDecMapInt8Int32R) + fn(map[int8]int64(nil), (*encFnInfo).fastpathEncMapInt8Int64R, (*decFnInfo).fastpathDecMapInt8Int64R) + fn(map[int8]float32(nil), (*encFnInfo).fastpathEncMapInt8Float32R, (*decFnInfo).fastpathDecMapInt8Float32R) + fn(map[int8]float64(nil), (*encFnInfo).fastpathEncMapInt8Float64R, (*decFnInfo).fastpathDecMapInt8Float64R) + fn(map[int8]bool(nil), (*encFnInfo).fastpathEncMapInt8BoolR, (*decFnInfo).fastpathDecMapInt8BoolR) + fn(map[int16]interface{}(nil), (*encFnInfo).fastpathEncMapInt16IntfR, (*decFnInfo).fastpathDecMapInt16IntfR) + fn(map[int16]string(nil), (*encFnInfo).fastpathEncMapInt16StringR, (*decFnInfo).fastpathDecMapInt16StringR) + fn(map[int16]uint(nil), (*encFnInfo).fastpathEncMapInt16UintR, (*decFnInfo).fastpathDecMapInt16UintR) + fn(map[int16]uint8(nil), (*encFnInfo).fastpathEncMapInt16Uint8R, (*decFnInfo).fastpathDecMapInt16Uint8R) + fn(map[int16]uint16(nil), (*encFnInfo).fastpathEncMapInt16Uint16R, (*decFnInfo).fastpathDecMapInt16Uint16R) + fn(map[int16]uint32(nil), (*encFnInfo).fastpathEncMapInt16Uint32R, (*decFnInfo).fastpathDecMapInt16Uint32R) + fn(map[int16]uint64(nil), (*encFnInfo).fastpathEncMapInt16Uint64R, (*decFnInfo).fastpathDecMapInt16Uint64R) + fn(map[int16]uintptr(nil), (*encFnInfo).fastpathEncMapInt16UintptrR, (*decFnInfo).fastpathDecMapInt16UintptrR) + fn(map[int16]int(nil), (*encFnInfo).fastpathEncMapInt16IntR, (*decFnInfo).fastpathDecMapInt16IntR) + fn(map[int16]int8(nil), (*encFnInfo).fastpathEncMapInt16Int8R, (*decFnInfo).fastpathDecMapInt16Int8R) + fn(map[int16]int16(nil), (*encFnInfo).fastpathEncMapInt16Int16R, (*decFnInfo).fastpathDecMapInt16Int16R) + fn(map[int16]int32(nil), (*encFnInfo).fastpathEncMapInt16Int32R, (*decFnInfo).fastpathDecMapInt16Int32R) + fn(map[int16]int64(nil), (*encFnInfo).fastpathEncMapInt16Int64R, (*decFnInfo).fastpathDecMapInt16Int64R) + fn(map[int16]float32(nil), (*encFnInfo).fastpathEncMapInt16Float32R, (*decFnInfo).fastpathDecMapInt16Float32R) + fn(map[int16]float64(nil), (*encFnInfo).fastpathEncMapInt16Float64R, (*decFnInfo).fastpathDecMapInt16Float64R) + fn(map[int16]bool(nil), (*encFnInfo).fastpathEncMapInt16BoolR, (*decFnInfo).fastpathDecMapInt16BoolR) + fn(map[int32]interface{}(nil), (*encFnInfo).fastpathEncMapInt32IntfR, (*decFnInfo).fastpathDecMapInt32IntfR) + fn(map[int32]string(nil), (*encFnInfo).fastpathEncMapInt32StringR, (*decFnInfo).fastpathDecMapInt32StringR) + fn(map[int32]uint(nil), (*encFnInfo).fastpathEncMapInt32UintR, (*decFnInfo).fastpathDecMapInt32UintR) + fn(map[int32]uint8(nil), (*encFnInfo).fastpathEncMapInt32Uint8R, (*decFnInfo).fastpathDecMapInt32Uint8R) + fn(map[int32]uint16(nil), (*encFnInfo).fastpathEncMapInt32Uint16R, (*decFnInfo).fastpathDecMapInt32Uint16R) + fn(map[int32]uint32(nil), (*encFnInfo).fastpathEncMapInt32Uint32R, (*decFnInfo).fastpathDecMapInt32Uint32R) + fn(map[int32]uint64(nil), (*encFnInfo).fastpathEncMapInt32Uint64R, (*decFnInfo).fastpathDecMapInt32Uint64R) + fn(map[int32]uintptr(nil), (*encFnInfo).fastpathEncMapInt32UintptrR, (*decFnInfo).fastpathDecMapInt32UintptrR) + fn(map[int32]int(nil), (*encFnInfo).fastpathEncMapInt32IntR, (*decFnInfo).fastpathDecMapInt32IntR) + fn(map[int32]int8(nil), (*encFnInfo).fastpathEncMapInt32Int8R, (*decFnInfo).fastpathDecMapInt32Int8R) + fn(map[int32]int16(nil), (*encFnInfo).fastpathEncMapInt32Int16R, (*decFnInfo).fastpathDecMapInt32Int16R) + fn(map[int32]int32(nil), (*encFnInfo).fastpathEncMapInt32Int32R, (*decFnInfo).fastpathDecMapInt32Int32R) + fn(map[int32]int64(nil), (*encFnInfo).fastpathEncMapInt32Int64R, (*decFnInfo).fastpathDecMapInt32Int64R) + fn(map[int32]float32(nil), (*encFnInfo).fastpathEncMapInt32Float32R, (*decFnInfo).fastpathDecMapInt32Float32R) + fn(map[int32]float64(nil), (*encFnInfo).fastpathEncMapInt32Float64R, (*decFnInfo).fastpathDecMapInt32Float64R) + fn(map[int32]bool(nil), (*encFnInfo).fastpathEncMapInt32BoolR, (*decFnInfo).fastpathDecMapInt32BoolR) + fn(map[int64]interface{}(nil), (*encFnInfo).fastpathEncMapInt64IntfR, (*decFnInfo).fastpathDecMapInt64IntfR) + fn(map[int64]string(nil), (*encFnInfo).fastpathEncMapInt64StringR, (*decFnInfo).fastpathDecMapInt64StringR) + fn(map[int64]uint(nil), (*encFnInfo).fastpathEncMapInt64UintR, (*decFnInfo).fastpathDecMapInt64UintR) + fn(map[int64]uint8(nil), (*encFnInfo).fastpathEncMapInt64Uint8R, (*decFnInfo).fastpathDecMapInt64Uint8R) + fn(map[int64]uint16(nil), (*encFnInfo).fastpathEncMapInt64Uint16R, (*decFnInfo).fastpathDecMapInt64Uint16R) + fn(map[int64]uint32(nil), (*encFnInfo).fastpathEncMapInt64Uint32R, (*decFnInfo).fastpathDecMapInt64Uint32R) + fn(map[int64]uint64(nil), (*encFnInfo).fastpathEncMapInt64Uint64R, (*decFnInfo).fastpathDecMapInt64Uint64R) + fn(map[int64]uintptr(nil), (*encFnInfo).fastpathEncMapInt64UintptrR, (*decFnInfo).fastpathDecMapInt64UintptrR) + fn(map[int64]int(nil), (*encFnInfo).fastpathEncMapInt64IntR, (*decFnInfo).fastpathDecMapInt64IntR) + fn(map[int64]int8(nil), (*encFnInfo).fastpathEncMapInt64Int8R, (*decFnInfo).fastpathDecMapInt64Int8R) + fn(map[int64]int16(nil), (*encFnInfo).fastpathEncMapInt64Int16R, (*decFnInfo).fastpathDecMapInt64Int16R) + fn(map[int64]int32(nil), (*encFnInfo).fastpathEncMapInt64Int32R, (*decFnInfo).fastpathDecMapInt64Int32R) + fn(map[int64]int64(nil), (*encFnInfo).fastpathEncMapInt64Int64R, (*decFnInfo).fastpathDecMapInt64Int64R) + fn(map[int64]float32(nil), (*encFnInfo).fastpathEncMapInt64Float32R, (*decFnInfo).fastpathDecMapInt64Float32R) + fn(map[int64]float64(nil), (*encFnInfo).fastpathEncMapInt64Float64R, (*decFnInfo).fastpathDecMapInt64Float64R) + fn(map[int64]bool(nil), (*encFnInfo).fastpathEncMapInt64BoolR, (*decFnInfo).fastpathDecMapInt64BoolR) + fn(map[bool]interface{}(nil), (*encFnInfo).fastpathEncMapBoolIntfR, (*decFnInfo).fastpathDecMapBoolIntfR) + fn(map[bool]string(nil), (*encFnInfo).fastpathEncMapBoolStringR, (*decFnInfo).fastpathDecMapBoolStringR) + fn(map[bool]uint(nil), (*encFnInfo).fastpathEncMapBoolUintR, (*decFnInfo).fastpathDecMapBoolUintR) + fn(map[bool]uint8(nil), (*encFnInfo).fastpathEncMapBoolUint8R, (*decFnInfo).fastpathDecMapBoolUint8R) + fn(map[bool]uint16(nil), (*encFnInfo).fastpathEncMapBoolUint16R, (*decFnInfo).fastpathDecMapBoolUint16R) + fn(map[bool]uint32(nil), (*encFnInfo).fastpathEncMapBoolUint32R, (*decFnInfo).fastpathDecMapBoolUint32R) + fn(map[bool]uint64(nil), (*encFnInfo).fastpathEncMapBoolUint64R, (*decFnInfo).fastpathDecMapBoolUint64R) + fn(map[bool]uintptr(nil), (*encFnInfo).fastpathEncMapBoolUintptrR, (*decFnInfo).fastpathDecMapBoolUintptrR) + fn(map[bool]int(nil), (*encFnInfo).fastpathEncMapBoolIntR, (*decFnInfo).fastpathDecMapBoolIntR) + fn(map[bool]int8(nil), (*encFnInfo).fastpathEncMapBoolInt8R, (*decFnInfo).fastpathDecMapBoolInt8R) + fn(map[bool]int16(nil), (*encFnInfo).fastpathEncMapBoolInt16R, (*decFnInfo).fastpathDecMapBoolInt16R) + fn(map[bool]int32(nil), (*encFnInfo).fastpathEncMapBoolInt32R, (*decFnInfo).fastpathDecMapBoolInt32R) + fn(map[bool]int64(nil), (*encFnInfo).fastpathEncMapBoolInt64R, (*decFnInfo).fastpathDecMapBoolInt64R) + fn(map[bool]float32(nil), (*encFnInfo).fastpathEncMapBoolFloat32R, (*decFnInfo).fastpathDecMapBoolFloat32R) + fn(map[bool]float64(nil), (*encFnInfo).fastpathEncMapBoolFloat64R, (*decFnInfo).fastpathDecMapBoolFloat64R) + fn(map[bool]bool(nil), (*encFnInfo).fastpathEncMapBoolBoolR, (*decFnInfo).fastpathDecMapBoolBoolR) + + sort.Sort(fastpathAslice(fastpathAV[:])) +} + +// -- encode + +// -- -- fast path type switch +func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { + if !fastpathEnabled { + return false + } + switch v := iv.(type) { + + case []interface{}: + fastpathTV.EncSliceIntfV(v, fastpathCheckNilTrue, e) + case *[]interface{}: + fastpathTV.EncSliceIntfV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]interface{}: + fastpathTV.EncMapIntfIntfV(v, fastpathCheckNilTrue, e) + case *map[interface{}]interface{}: + fastpathTV.EncMapIntfIntfV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]string: + fastpathTV.EncMapIntfStringV(v, fastpathCheckNilTrue, e) + case *map[interface{}]string: + fastpathTV.EncMapIntfStringV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint: + fastpathTV.EncMapIntfUintV(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint: + fastpathTV.EncMapIntfUintV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint8: + fastpathTV.EncMapIntfUint8V(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint8: + fastpathTV.EncMapIntfUint8V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint16: + fastpathTV.EncMapIntfUint16V(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint16: + fastpathTV.EncMapIntfUint16V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint32: + fastpathTV.EncMapIntfUint32V(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint32: + fastpathTV.EncMapIntfUint32V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint64: + fastpathTV.EncMapIntfUint64V(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint64: + fastpathTV.EncMapIntfUint64V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uintptr: + fastpathTV.EncMapIntfUintptrV(v, fastpathCheckNilTrue, e) + case *map[interface{}]uintptr: + fastpathTV.EncMapIntfUintptrV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int: + fastpathTV.EncMapIntfIntV(v, fastpathCheckNilTrue, e) + case *map[interface{}]int: + fastpathTV.EncMapIntfIntV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int8: + fastpathTV.EncMapIntfInt8V(v, fastpathCheckNilTrue, e) + case *map[interface{}]int8: + fastpathTV.EncMapIntfInt8V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int16: + fastpathTV.EncMapIntfInt16V(v, fastpathCheckNilTrue, e) + case *map[interface{}]int16: + fastpathTV.EncMapIntfInt16V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int32: + fastpathTV.EncMapIntfInt32V(v, fastpathCheckNilTrue, e) + case *map[interface{}]int32: + fastpathTV.EncMapIntfInt32V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int64: + fastpathTV.EncMapIntfInt64V(v, fastpathCheckNilTrue, e) + case *map[interface{}]int64: + fastpathTV.EncMapIntfInt64V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]float32: + fastpathTV.EncMapIntfFloat32V(v, fastpathCheckNilTrue, e) + case *map[interface{}]float32: + fastpathTV.EncMapIntfFloat32V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]float64: + fastpathTV.EncMapIntfFloat64V(v, fastpathCheckNilTrue, e) + case *map[interface{}]float64: + fastpathTV.EncMapIntfFloat64V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]bool: + fastpathTV.EncMapIntfBoolV(v, fastpathCheckNilTrue, e) + case *map[interface{}]bool: + fastpathTV.EncMapIntfBoolV(*v, fastpathCheckNilTrue, e) + + case []string: + fastpathTV.EncSliceStringV(v, fastpathCheckNilTrue, e) + case *[]string: + fastpathTV.EncSliceStringV(*v, fastpathCheckNilTrue, e) + + case map[string]interface{}: + fastpathTV.EncMapStringIntfV(v, fastpathCheckNilTrue, e) + case *map[string]interface{}: + fastpathTV.EncMapStringIntfV(*v, fastpathCheckNilTrue, e) + + case map[string]string: + fastpathTV.EncMapStringStringV(v, fastpathCheckNilTrue, e) + case *map[string]string: + fastpathTV.EncMapStringStringV(*v, fastpathCheckNilTrue, e) + + case map[string]uint: + fastpathTV.EncMapStringUintV(v, fastpathCheckNilTrue, e) + case *map[string]uint: + fastpathTV.EncMapStringUintV(*v, fastpathCheckNilTrue, e) + + case map[string]uint8: + fastpathTV.EncMapStringUint8V(v, fastpathCheckNilTrue, e) + case *map[string]uint8: + fastpathTV.EncMapStringUint8V(*v, fastpathCheckNilTrue, e) + + case map[string]uint16: + fastpathTV.EncMapStringUint16V(v, fastpathCheckNilTrue, e) + case *map[string]uint16: + fastpathTV.EncMapStringUint16V(*v, fastpathCheckNilTrue, e) + + case map[string]uint32: + fastpathTV.EncMapStringUint32V(v, fastpathCheckNilTrue, e) + case *map[string]uint32: + fastpathTV.EncMapStringUint32V(*v, fastpathCheckNilTrue, e) + + case map[string]uint64: + fastpathTV.EncMapStringUint64V(v, fastpathCheckNilTrue, e) + case *map[string]uint64: + fastpathTV.EncMapStringUint64V(*v, fastpathCheckNilTrue, e) + + case map[string]uintptr: + fastpathTV.EncMapStringUintptrV(v, fastpathCheckNilTrue, e) + case *map[string]uintptr: + fastpathTV.EncMapStringUintptrV(*v, fastpathCheckNilTrue, e) + + case map[string]int: + fastpathTV.EncMapStringIntV(v, fastpathCheckNilTrue, e) + case *map[string]int: + fastpathTV.EncMapStringIntV(*v, fastpathCheckNilTrue, e) + + case map[string]int8: + fastpathTV.EncMapStringInt8V(v, fastpathCheckNilTrue, e) + case *map[string]int8: + fastpathTV.EncMapStringInt8V(*v, fastpathCheckNilTrue, e) + + case map[string]int16: + fastpathTV.EncMapStringInt16V(v, fastpathCheckNilTrue, e) + case *map[string]int16: + fastpathTV.EncMapStringInt16V(*v, fastpathCheckNilTrue, e) + + case map[string]int32: + fastpathTV.EncMapStringInt32V(v, fastpathCheckNilTrue, e) + case *map[string]int32: + fastpathTV.EncMapStringInt32V(*v, fastpathCheckNilTrue, e) + + case map[string]int64: + fastpathTV.EncMapStringInt64V(v, fastpathCheckNilTrue, e) + case *map[string]int64: + fastpathTV.EncMapStringInt64V(*v, fastpathCheckNilTrue, e) + + case map[string]float32: + fastpathTV.EncMapStringFloat32V(v, fastpathCheckNilTrue, e) + case *map[string]float32: + fastpathTV.EncMapStringFloat32V(*v, fastpathCheckNilTrue, e) + + case map[string]float64: + fastpathTV.EncMapStringFloat64V(v, fastpathCheckNilTrue, e) + case *map[string]float64: + fastpathTV.EncMapStringFloat64V(*v, fastpathCheckNilTrue, e) + + case map[string]bool: + fastpathTV.EncMapStringBoolV(v, fastpathCheckNilTrue, e) + case *map[string]bool: + fastpathTV.EncMapStringBoolV(*v, fastpathCheckNilTrue, e) + + case []float32: + fastpathTV.EncSliceFloat32V(v, fastpathCheckNilTrue, e) + case *[]float32: + fastpathTV.EncSliceFloat32V(*v, fastpathCheckNilTrue, e) + + case map[float32]interface{}: + fastpathTV.EncMapFloat32IntfV(v, fastpathCheckNilTrue, e) + case *map[float32]interface{}: + fastpathTV.EncMapFloat32IntfV(*v, fastpathCheckNilTrue, e) + + case map[float32]string: + fastpathTV.EncMapFloat32StringV(v, fastpathCheckNilTrue, e) + case *map[float32]string: + fastpathTV.EncMapFloat32StringV(*v, fastpathCheckNilTrue, e) + + case map[float32]uint: + fastpathTV.EncMapFloat32UintV(v, fastpathCheckNilTrue, e) + case *map[float32]uint: + fastpathTV.EncMapFloat32UintV(*v, fastpathCheckNilTrue, e) + + case map[float32]uint8: + fastpathTV.EncMapFloat32Uint8V(v, fastpathCheckNilTrue, e) + case *map[float32]uint8: + fastpathTV.EncMapFloat32Uint8V(*v, fastpathCheckNilTrue, e) + + case map[float32]uint16: + fastpathTV.EncMapFloat32Uint16V(v, fastpathCheckNilTrue, e) + case *map[float32]uint16: + fastpathTV.EncMapFloat32Uint16V(*v, fastpathCheckNilTrue, e) + + case map[float32]uint32: + fastpathTV.EncMapFloat32Uint32V(v, fastpathCheckNilTrue, e) + case *map[float32]uint32: + fastpathTV.EncMapFloat32Uint32V(*v, fastpathCheckNilTrue, e) + + case map[float32]uint64: + fastpathTV.EncMapFloat32Uint64V(v, fastpathCheckNilTrue, e) + case *map[float32]uint64: + fastpathTV.EncMapFloat32Uint64V(*v, fastpathCheckNilTrue, e) + + case map[float32]uintptr: + fastpathTV.EncMapFloat32UintptrV(v, fastpathCheckNilTrue, e) + case *map[float32]uintptr: + fastpathTV.EncMapFloat32UintptrV(*v, fastpathCheckNilTrue, e) + + case map[float32]int: + fastpathTV.EncMapFloat32IntV(v, fastpathCheckNilTrue, e) + case *map[float32]int: + fastpathTV.EncMapFloat32IntV(*v, fastpathCheckNilTrue, e) + + case map[float32]int8: + fastpathTV.EncMapFloat32Int8V(v, fastpathCheckNilTrue, e) + case *map[float32]int8: + fastpathTV.EncMapFloat32Int8V(*v, fastpathCheckNilTrue, e) + + case map[float32]int16: + fastpathTV.EncMapFloat32Int16V(v, fastpathCheckNilTrue, e) + case *map[float32]int16: + fastpathTV.EncMapFloat32Int16V(*v, fastpathCheckNilTrue, e) + + case map[float32]int32: + fastpathTV.EncMapFloat32Int32V(v, fastpathCheckNilTrue, e) + case *map[float32]int32: + fastpathTV.EncMapFloat32Int32V(*v, fastpathCheckNilTrue, e) + + case map[float32]int64: + fastpathTV.EncMapFloat32Int64V(v, fastpathCheckNilTrue, e) + case *map[float32]int64: + fastpathTV.EncMapFloat32Int64V(*v, fastpathCheckNilTrue, e) + + case map[float32]float32: + fastpathTV.EncMapFloat32Float32V(v, fastpathCheckNilTrue, e) + case *map[float32]float32: + fastpathTV.EncMapFloat32Float32V(*v, fastpathCheckNilTrue, e) + + case map[float32]float64: + fastpathTV.EncMapFloat32Float64V(v, fastpathCheckNilTrue, e) + case *map[float32]float64: + fastpathTV.EncMapFloat32Float64V(*v, fastpathCheckNilTrue, e) + + case map[float32]bool: + fastpathTV.EncMapFloat32BoolV(v, fastpathCheckNilTrue, e) + case *map[float32]bool: + fastpathTV.EncMapFloat32BoolV(*v, fastpathCheckNilTrue, e) + + case []float64: + fastpathTV.EncSliceFloat64V(v, fastpathCheckNilTrue, e) + case *[]float64: + fastpathTV.EncSliceFloat64V(*v, fastpathCheckNilTrue, e) + + case map[float64]interface{}: + fastpathTV.EncMapFloat64IntfV(v, fastpathCheckNilTrue, e) + case *map[float64]interface{}: + fastpathTV.EncMapFloat64IntfV(*v, fastpathCheckNilTrue, e) + + case map[float64]string: + fastpathTV.EncMapFloat64StringV(v, fastpathCheckNilTrue, e) + case *map[float64]string: + fastpathTV.EncMapFloat64StringV(*v, fastpathCheckNilTrue, e) + + case map[float64]uint: + fastpathTV.EncMapFloat64UintV(v, fastpathCheckNilTrue, e) + case *map[float64]uint: + fastpathTV.EncMapFloat64UintV(*v, fastpathCheckNilTrue, e) + + case map[float64]uint8: + fastpathTV.EncMapFloat64Uint8V(v, fastpathCheckNilTrue, e) + case *map[float64]uint8: + fastpathTV.EncMapFloat64Uint8V(*v, fastpathCheckNilTrue, e) + + case map[float64]uint16: + fastpathTV.EncMapFloat64Uint16V(v, fastpathCheckNilTrue, e) + case *map[float64]uint16: + fastpathTV.EncMapFloat64Uint16V(*v, fastpathCheckNilTrue, e) + + case map[float64]uint32: + fastpathTV.EncMapFloat64Uint32V(v, fastpathCheckNilTrue, e) + case *map[float64]uint32: + fastpathTV.EncMapFloat64Uint32V(*v, fastpathCheckNilTrue, e) + + case map[float64]uint64: + fastpathTV.EncMapFloat64Uint64V(v, fastpathCheckNilTrue, e) + case *map[float64]uint64: + fastpathTV.EncMapFloat64Uint64V(*v, fastpathCheckNilTrue, e) + + case map[float64]uintptr: + fastpathTV.EncMapFloat64UintptrV(v, fastpathCheckNilTrue, e) + case *map[float64]uintptr: + fastpathTV.EncMapFloat64UintptrV(*v, fastpathCheckNilTrue, e) + + case map[float64]int: + fastpathTV.EncMapFloat64IntV(v, fastpathCheckNilTrue, e) + case *map[float64]int: + fastpathTV.EncMapFloat64IntV(*v, fastpathCheckNilTrue, e) + + case map[float64]int8: + fastpathTV.EncMapFloat64Int8V(v, fastpathCheckNilTrue, e) + case *map[float64]int8: + fastpathTV.EncMapFloat64Int8V(*v, fastpathCheckNilTrue, e) + + case map[float64]int16: + fastpathTV.EncMapFloat64Int16V(v, fastpathCheckNilTrue, e) + case *map[float64]int16: + fastpathTV.EncMapFloat64Int16V(*v, fastpathCheckNilTrue, e) + + case map[float64]int32: + fastpathTV.EncMapFloat64Int32V(v, fastpathCheckNilTrue, e) + case *map[float64]int32: + fastpathTV.EncMapFloat64Int32V(*v, fastpathCheckNilTrue, e) + + case map[float64]int64: + fastpathTV.EncMapFloat64Int64V(v, fastpathCheckNilTrue, e) + case *map[float64]int64: + fastpathTV.EncMapFloat64Int64V(*v, fastpathCheckNilTrue, e) + + case map[float64]float32: + fastpathTV.EncMapFloat64Float32V(v, fastpathCheckNilTrue, e) + case *map[float64]float32: + fastpathTV.EncMapFloat64Float32V(*v, fastpathCheckNilTrue, e) + + case map[float64]float64: + fastpathTV.EncMapFloat64Float64V(v, fastpathCheckNilTrue, e) + case *map[float64]float64: + fastpathTV.EncMapFloat64Float64V(*v, fastpathCheckNilTrue, e) + + case map[float64]bool: + fastpathTV.EncMapFloat64BoolV(v, fastpathCheckNilTrue, e) + case *map[float64]bool: + fastpathTV.EncMapFloat64BoolV(*v, fastpathCheckNilTrue, e) + + case []uint: + fastpathTV.EncSliceUintV(v, fastpathCheckNilTrue, e) + case *[]uint: + fastpathTV.EncSliceUintV(*v, fastpathCheckNilTrue, e) + + case map[uint]interface{}: + fastpathTV.EncMapUintIntfV(v, fastpathCheckNilTrue, e) + case *map[uint]interface{}: + fastpathTV.EncMapUintIntfV(*v, fastpathCheckNilTrue, e) + + case map[uint]string: + fastpathTV.EncMapUintStringV(v, fastpathCheckNilTrue, e) + case *map[uint]string: + fastpathTV.EncMapUintStringV(*v, fastpathCheckNilTrue, e) + + case map[uint]uint: + fastpathTV.EncMapUintUintV(v, fastpathCheckNilTrue, e) + case *map[uint]uint: + fastpathTV.EncMapUintUintV(*v, fastpathCheckNilTrue, e) + + case map[uint]uint8: + fastpathTV.EncMapUintUint8V(v, fastpathCheckNilTrue, e) + case *map[uint]uint8: + fastpathTV.EncMapUintUint8V(*v, fastpathCheckNilTrue, e) + + case map[uint]uint16: + fastpathTV.EncMapUintUint16V(v, fastpathCheckNilTrue, e) + case *map[uint]uint16: + fastpathTV.EncMapUintUint16V(*v, fastpathCheckNilTrue, e) + + case map[uint]uint32: + fastpathTV.EncMapUintUint32V(v, fastpathCheckNilTrue, e) + case *map[uint]uint32: + fastpathTV.EncMapUintUint32V(*v, fastpathCheckNilTrue, e) + + case map[uint]uint64: + fastpathTV.EncMapUintUint64V(v, fastpathCheckNilTrue, e) + case *map[uint]uint64: + fastpathTV.EncMapUintUint64V(*v, fastpathCheckNilTrue, e) + + case map[uint]uintptr: + fastpathTV.EncMapUintUintptrV(v, fastpathCheckNilTrue, e) + case *map[uint]uintptr: + fastpathTV.EncMapUintUintptrV(*v, fastpathCheckNilTrue, e) + + case map[uint]int: + fastpathTV.EncMapUintIntV(v, fastpathCheckNilTrue, e) + case *map[uint]int: + fastpathTV.EncMapUintIntV(*v, fastpathCheckNilTrue, e) + + case map[uint]int8: + fastpathTV.EncMapUintInt8V(v, fastpathCheckNilTrue, e) + case *map[uint]int8: + fastpathTV.EncMapUintInt8V(*v, fastpathCheckNilTrue, e) + + case map[uint]int16: + fastpathTV.EncMapUintInt16V(v, fastpathCheckNilTrue, e) + case *map[uint]int16: + fastpathTV.EncMapUintInt16V(*v, fastpathCheckNilTrue, e) + + case map[uint]int32: + fastpathTV.EncMapUintInt32V(v, fastpathCheckNilTrue, e) + case *map[uint]int32: + fastpathTV.EncMapUintInt32V(*v, fastpathCheckNilTrue, e) + + case map[uint]int64: + fastpathTV.EncMapUintInt64V(v, fastpathCheckNilTrue, e) + case *map[uint]int64: + fastpathTV.EncMapUintInt64V(*v, fastpathCheckNilTrue, e) + + case map[uint]float32: + fastpathTV.EncMapUintFloat32V(v, fastpathCheckNilTrue, e) + case *map[uint]float32: + fastpathTV.EncMapUintFloat32V(*v, fastpathCheckNilTrue, e) + + case map[uint]float64: + fastpathTV.EncMapUintFloat64V(v, fastpathCheckNilTrue, e) + case *map[uint]float64: + fastpathTV.EncMapUintFloat64V(*v, fastpathCheckNilTrue, e) + + case map[uint]bool: + fastpathTV.EncMapUintBoolV(v, fastpathCheckNilTrue, e) + case *map[uint]bool: + fastpathTV.EncMapUintBoolV(*v, fastpathCheckNilTrue, e) + + case map[uint8]interface{}: + fastpathTV.EncMapUint8IntfV(v, fastpathCheckNilTrue, e) + case *map[uint8]interface{}: + fastpathTV.EncMapUint8IntfV(*v, fastpathCheckNilTrue, e) + + case map[uint8]string: + fastpathTV.EncMapUint8StringV(v, fastpathCheckNilTrue, e) + case *map[uint8]string: + fastpathTV.EncMapUint8StringV(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint: + fastpathTV.EncMapUint8UintV(v, fastpathCheckNilTrue, e) + case *map[uint8]uint: + fastpathTV.EncMapUint8UintV(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint8: + fastpathTV.EncMapUint8Uint8V(v, fastpathCheckNilTrue, e) + case *map[uint8]uint8: + fastpathTV.EncMapUint8Uint8V(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint16: + fastpathTV.EncMapUint8Uint16V(v, fastpathCheckNilTrue, e) + case *map[uint8]uint16: + fastpathTV.EncMapUint8Uint16V(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint32: + fastpathTV.EncMapUint8Uint32V(v, fastpathCheckNilTrue, e) + case *map[uint8]uint32: + fastpathTV.EncMapUint8Uint32V(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint64: + fastpathTV.EncMapUint8Uint64V(v, fastpathCheckNilTrue, e) + case *map[uint8]uint64: + fastpathTV.EncMapUint8Uint64V(*v, fastpathCheckNilTrue, e) + + case map[uint8]uintptr: + fastpathTV.EncMapUint8UintptrV(v, fastpathCheckNilTrue, e) + case *map[uint8]uintptr: + fastpathTV.EncMapUint8UintptrV(*v, fastpathCheckNilTrue, e) + + case map[uint8]int: + fastpathTV.EncMapUint8IntV(v, fastpathCheckNilTrue, e) + case *map[uint8]int: + fastpathTV.EncMapUint8IntV(*v, fastpathCheckNilTrue, e) + + case map[uint8]int8: + fastpathTV.EncMapUint8Int8V(v, fastpathCheckNilTrue, e) + case *map[uint8]int8: + fastpathTV.EncMapUint8Int8V(*v, fastpathCheckNilTrue, e) + + case map[uint8]int16: + fastpathTV.EncMapUint8Int16V(v, fastpathCheckNilTrue, e) + case *map[uint8]int16: + fastpathTV.EncMapUint8Int16V(*v, fastpathCheckNilTrue, e) + + case map[uint8]int32: + fastpathTV.EncMapUint8Int32V(v, fastpathCheckNilTrue, e) + case *map[uint8]int32: + fastpathTV.EncMapUint8Int32V(*v, fastpathCheckNilTrue, e) + + case map[uint8]int64: + fastpathTV.EncMapUint8Int64V(v, fastpathCheckNilTrue, e) + case *map[uint8]int64: + fastpathTV.EncMapUint8Int64V(*v, fastpathCheckNilTrue, e) + + case map[uint8]float32: + fastpathTV.EncMapUint8Float32V(v, fastpathCheckNilTrue, e) + case *map[uint8]float32: + fastpathTV.EncMapUint8Float32V(*v, fastpathCheckNilTrue, e) + + case map[uint8]float64: + fastpathTV.EncMapUint8Float64V(v, fastpathCheckNilTrue, e) + case *map[uint8]float64: + fastpathTV.EncMapUint8Float64V(*v, fastpathCheckNilTrue, e) + + case map[uint8]bool: + fastpathTV.EncMapUint8BoolV(v, fastpathCheckNilTrue, e) + case *map[uint8]bool: + fastpathTV.EncMapUint8BoolV(*v, fastpathCheckNilTrue, e) + + case []uint16: + fastpathTV.EncSliceUint16V(v, fastpathCheckNilTrue, e) + case *[]uint16: + fastpathTV.EncSliceUint16V(*v, fastpathCheckNilTrue, e) + + case map[uint16]interface{}: + fastpathTV.EncMapUint16IntfV(v, fastpathCheckNilTrue, e) + case *map[uint16]interface{}: + fastpathTV.EncMapUint16IntfV(*v, fastpathCheckNilTrue, e) + + case map[uint16]string: + fastpathTV.EncMapUint16StringV(v, fastpathCheckNilTrue, e) + case *map[uint16]string: + fastpathTV.EncMapUint16StringV(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint: + fastpathTV.EncMapUint16UintV(v, fastpathCheckNilTrue, e) + case *map[uint16]uint: + fastpathTV.EncMapUint16UintV(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint8: + fastpathTV.EncMapUint16Uint8V(v, fastpathCheckNilTrue, e) + case *map[uint16]uint8: + fastpathTV.EncMapUint16Uint8V(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint16: + fastpathTV.EncMapUint16Uint16V(v, fastpathCheckNilTrue, e) + case *map[uint16]uint16: + fastpathTV.EncMapUint16Uint16V(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint32: + fastpathTV.EncMapUint16Uint32V(v, fastpathCheckNilTrue, e) + case *map[uint16]uint32: + fastpathTV.EncMapUint16Uint32V(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint64: + fastpathTV.EncMapUint16Uint64V(v, fastpathCheckNilTrue, e) + case *map[uint16]uint64: + fastpathTV.EncMapUint16Uint64V(*v, fastpathCheckNilTrue, e) + + case map[uint16]uintptr: + fastpathTV.EncMapUint16UintptrV(v, fastpathCheckNilTrue, e) + case *map[uint16]uintptr: + fastpathTV.EncMapUint16UintptrV(*v, fastpathCheckNilTrue, e) + + case map[uint16]int: + fastpathTV.EncMapUint16IntV(v, fastpathCheckNilTrue, e) + case *map[uint16]int: + fastpathTV.EncMapUint16IntV(*v, fastpathCheckNilTrue, e) + + case map[uint16]int8: + fastpathTV.EncMapUint16Int8V(v, fastpathCheckNilTrue, e) + case *map[uint16]int8: + fastpathTV.EncMapUint16Int8V(*v, fastpathCheckNilTrue, e) + + case map[uint16]int16: + fastpathTV.EncMapUint16Int16V(v, fastpathCheckNilTrue, e) + case *map[uint16]int16: + fastpathTV.EncMapUint16Int16V(*v, fastpathCheckNilTrue, e) + + case map[uint16]int32: + fastpathTV.EncMapUint16Int32V(v, fastpathCheckNilTrue, e) + case *map[uint16]int32: + fastpathTV.EncMapUint16Int32V(*v, fastpathCheckNilTrue, e) + + case map[uint16]int64: + fastpathTV.EncMapUint16Int64V(v, fastpathCheckNilTrue, e) + case *map[uint16]int64: + fastpathTV.EncMapUint16Int64V(*v, fastpathCheckNilTrue, e) + + case map[uint16]float32: + fastpathTV.EncMapUint16Float32V(v, fastpathCheckNilTrue, e) + case *map[uint16]float32: + fastpathTV.EncMapUint16Float32V(*v, fastpathCheckNilTrue, e) + + case map[uint16]float64: + fastpathTV.EncMapUint16Float64V(v, fastpathCheckNilTrue, e) + case *map[uint16]float64: + fastpathTV.EncMapUint16Float64V(*v, fastpathCheckNilTrue, e) + + case map[uint16]bool: + fastpathTV.EncMapUint16BoolV(v, fastpathCheckNilTrue, e) + case *map[uint16]bool: + fastpathTV.EncMapUint16BoolV(*v, fastpathCheckNilTrue, e) + + case []uint32: + fastpathTV.EncSliceUint32V(v, fastpathCheckNilTrue, e) + case *[]uint32: + fastpathTV.EncSliceUint32V(*v, fastpathCheckNilTrue, e) + + case map[uint32]interface{}: + fastpathTV.EncMapUint32IntfV(v, fastpathCheckNilTrue, e) + case *map[uint32]interface{}: + fastpathTV.EncMapUint32IntfV(*v, fastpathCheckNilTrue, e) + + case map[uint32]string: + fastpathTV.EncMapUint32StringV(v, fastpathCheckNilTrue, e) + case *map[uint32]string: + fastpathTV.EncMapUint32StringV(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint: + fastpathTV.EncMapUint32UintV(v, fastpathCheckNilTrue, e) + case *map[uint32]uint: + fastpathTV.EncMapUint32UintV(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint8: + fastpathTV.EncMapUint32Uint8V(v, fastpathCheckNilTrue, e) + case *map[uint32]uint8: + fastpathTV.EncMapUint32Uint8V(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint16: + fastpathTV.EncMapUint32Uint16V(v, fastpathCheckNilTrue, e) + case *map[uint32]uint16: + fastpathTV.EncMapUint32Uint16V(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint32: + fastpathTV.EncMapUint32Uint32V(v, fastpathCheckNilTrue, e) + case *map[uint32]uint32: + fastpathTV.EncMapUint32Uint32V(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint64: + fastpathTV.EncMapUint32Uint64V(v, fastpathCheckNilTrue, e) + case *map[uint32]uint64: + fastpathTV.EncMapUint32Uint64V(*v, fastpathCheckNilTrue, e) + + case map[uint32]uintptr: + fastpathTV.EncMapUint32UintptrV(v, fastpathCheckNilTrue, e) + case *map[uint32]uintptr: + fastpathTV.EncMapUint32UintptrV(*v, fastpathCheckNilTrue, e) + + case map[uint32]int: + fastpathTV.EncMapUint32IntV(v, fastpathCheckNilTrue, e) + case *map[uint32]int: + fastpathTV.EncMapUint32IntV(*v, fastpathCheckNilTrue, e) + + case map[uint32]int8: + fastpathTV.EncMapUint32Int8V(v, fastpathCheckNilTrue, e) + case *map[uint32]int8: + fastpathTV.EncMapUint32Int8V(*v, fastpathCheckNilTrue, e) + + case map[uint32]int16: + fastpathTV.EncMapUint32Int16V(v, fastpathCheckNilTrue, e) + case *map[uint32]int16: + fastpathTV.EncMapUint32Int16V(*v, fastpathCheckNilTrue, e) + + case map[uint32]int32: + fastpathTV.EncMapUint32Int32V(v, fastpathCheckNilTrue, e) + case *map[uint32]int32: + fastpathTV.EncMapUint32Int32V(*v, fastpathCheckNilTrue, e) + + case map[uint32]int64: + fastpathTV.EncMapUint32Int64V(v, fastpathCheckNilTrue, e) + case *map[uint32]int64: + fastpathTV.EncMapUint32Int64V(*v, fastpathCheckNilTrue, e) + + case map[uint32]float32: + fastpathTV.EncMapUint32Float32V(v, fastpathCheckNilTrue, e) + case *map[uint32]float32: + fastpathTV.EncMapUint32Float32V(*v, fastpathCheckNilTrue, e) + + case map[uint32]float64: + fastpathTV.EncMapUint32Float64V(v, fastpathCheckNilTrue, e) + case *map[uint32]float64: + fastpathTV.EncMapUint32Float64V(*v, fastpathCheckNilTrue, e) + + case map[uint32]bool: + fastpathTV.EncMapUint32BoolV(v, fastpathCheckNilTrue, e) + case *map[uint32]bool: + fastpathTV.EncMapUint32BoolV(*v, fastpathCheckNilTrue, e) + + case []uint64: + fastpathTV.EncSliceUint64V(v, fastpathCheckNilTrue, e) + case *[]uint64: + fastpathTV.EncSliceUint64V(*v, fastpathCheckNilTrue, e) + + case map[uint64]interface{}: + fastpathTV.EncMapUint64IntfV(v, fastpathCheckNilTrue, e) + case *map[uint64]interface{}: + fastpathTV.EncMapUint64IntfV(*v, fastpathCheckNilTrue, e) + + case map[uint64]string: + fastpathTV.EncMapUint64StringV(v, fastpathCheckNilTrue, e) + case *map[uint64]string: + fastpathTV.EncMapUint64StringV(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint: + fastpathTV.EncMapUint64UintV(v, fastpathCheckNilTrue, e) + case *map[uint64]uint: + fastpathTV.EncMapUint64UintV(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint8: + fastpathTV.EncMapUint64Uint8V(v, fastpathCheckNilTrue, e) + case *map[uint64]uint8: + fastpathTV.EncMapUint64Uint8V(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint16: + fastpathTV.EncMapUint64Uint16V(v, fastpathCheckNilTrue, e) + case *map[uint64]uint16: + fastpathTV.EncMapUint64Uint16V(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint32: + fastpathTV.EncMapUint64Uint32V(v, fastpathCheckNilTrue, e) + case *map[uint64]uint32: + fastpathTV.EncMapUint64Uint32V(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint64: + fastpathTV.EncMapUint64Uint64V(v, fastpathCheckNilTrue, e) + case *map[uint64]uint64: + fastpathTV.EncMapUint64Uint64V(*v, fastpathCheckNilTrue, e) + + case map[uint64]uintptr: + fastpathTV.EncMapUint64UintptrV(v, fastpathCheckNilTrue, e) + case *map[uint64]uintptr: + fastpathTV.EncMapUint64UintptrV(*v, fastpathCheckNilTrue, e) + + case map[uint64]int: + fastpathTV.EncMapUint64IntV(v, fastpathCheckNilTrue, e) + case *map[uint64]int: + fastpathTV.EncMapUint64IntV(*v, fastpathCheckNilTrue, e) + + case map[uint64]int8: + fastpathTV.EncMapUint64Int8V(v, fastpathCheckNilTrue, e) + case *map[uint64]int8: + fastpathTV.EncMapUint64Int8V(*v, fastpathCheckNilTrue, e) + + case map[uint64]int16: + fastpathTV.EncMapUint64Int16V(v, fastpathCheckNilTrue, e) + case *map[uint64]int16: + fastpathTV.EncMapUint64Int16V(*v, fastpathCheckNilTrue, e) + + case map[uint64]int32: + fastpathTV.EncMapUint64Int32V(v, fastpathCheckNilTrue, e) + case *map[uint64]int32: + fastpathTV.EncMapUint64Int32V(*v, fastpathCheckNilTrue, e) + + case map[uint64]int64: + fastpathTV.EncMapUint64Int64V(v, fastpathCheckNilTrue, e) + case *map[uint64]int64: + fastpathTV.EncMapUint64Int64V(*v, fastpathCheckNilTrue, e) + + case map[uint64]float32: + fastpathTV.EncMapUint64Float32V(v, fastpathCheckNilTrue, e) + case *map[uint64]float32: + fastpathTV.EncMapUint64Float32V(*v, fastpathCheckNilTrue, e) + + case map[uint64]float64: + fastpathTV.EncMapUint64Float64V(v, fastpathCheckNilTrue, e) + case *map[uint64]float64: + fastpathTV.EncMapUint64Float64V(*v, fastpathCheckNilTrue, e) + + case map[uint64]bool: + fastpathTV.EncMapUint64BoolV(v, fastpathCheckNilTrue, e) + case *map[uint64]bool: + fastpathTV.EncMapUint64BoolV(*v, fastpathCheckNilTrue, e) + + case []uintptr: + fastpathTV.EncSliceUintptrV(v, fastpathCheckNilTrue, e) + case *[]uintptr: + fastpathTV.EncSliceUintptrV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]interface{}: + fastpathTV.EncMapUintptrIntfV(v, fastpathCheckNilTrue, e) + case *map[uintptr]interface{}: + fastpathTV.EncMapUintptrIntfV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]string: + fastpathTV.EncMapUintptrStringV(v, fastpathCheckNilTrue, e) + case *map[uintptr]string: + fastpathTV.EncMapUintptrStringV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint: + fastpathTV.EncMapUintptrUintV(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint: + fastpathTV.EncMapUintptrUintV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint8: + fastpathTV.EncMapUintptrUint8V(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint8: + fastpathTV.EncMapUintptrUint8V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint16: + fastpathTV.EncMapUintptrUint16V(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint16: + fastpathTV.EncMapUintptrUint16V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint32: + fastpathTV.EncMapUintptrUint32V(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint32: + fastpathTV.EncMapUintptrUint32V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint64: + fastpathTV.EncMapUintptrUint64V(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint64: + fastpathTV.EncMapUintptrUint64V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uintptr: + fastpathTV.EncMapUintptrUintptrV(v, fastpathCheckNilTrue, e) + case *map[uintptr]uintptr: + fastpathTV.EncMapUintptrUintptrV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int: + fastpathTV.EncMapUintptrIntV(v, fastpathCheckNilTrue, e) + case *map[uintptr]int: + fastpathTV.EncMapUintptrIntV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int8: + fastpathTV.EncMapUintptrInt8V(v, fastpathCheckNilTrue, e) + case *map[uintptr]int8: + fastpathTV.EncMapUintptrInt8V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int16: + fastpathTV.EncMapUintptrInt16V(v, fastpathCheckNilTrue, e) + case *map[uintptr]int16: + fastpathTV.EncMapUintptrInt16V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int32: + fastpathTV.EncMapUintptrInt32V(v, fastpathCheckNilTrue, e) + case *map[uintptr]int32: + fastpathTV.EncMapUintptrInt32V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int64: + fastpathTV.EncMapUintptrInt64V(v, fastpathCheckNilTrue, e) + case *map[uintptr]int64: + fastpathTV.EncMapUintptrInt64V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]float32: + fastpathTV.EncMapUintptrFloat32V(v, fastpathCheckNilTrue, e) + case *map[uintptr]float32: + fastpathTV.EncMapUintptrFloat32V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]float64: + fastpathTV.EncMapUintptrFloat64V(v, fastpathCheckNilTrue, e) + case *map[uintptr]float64: + fastpathTV.EncMapUintptrFloat64V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]bool: + fastpathTV.EncMapUintptrBoolV(v, fastpathCheckNilTrue, e) + case *map[uintptr]bool: + fastpathTV.EncMapUintptrBoolV(*v, fastpathCheckNilTrue, e) + + case []int: + fastpathTV.EncSliceIntV(v, fastpathCheckNilTrue, e) + case *[]int: + fastpathTV.EncSliceIntV(*v, fastpathCheckNilTrue, e) + + case map[int]interface{}: + fastpathTV.EncMapIntIntfV(v, fastpathCheckNilTrue, e) + case *map[int]interface{}: + fastpathTV.EncMapIntIntfV(*v, fastpathCheckNilTrue, e) + + case map[int]string: + fastpathTV.EncMapIntStringV(v, fastpathCheckNilTrue, e) + case *map[int]string: + fastpathTV.EncMapIntStringV(*v, fastpathCheckNilTrue, e) + + case map[int]uint: + fastpathTV.EncMapIntUintV(v, fastpathCheckNilTrue, e) + case *map[int]uint: + fastpathTV.EncMapIntUintV(*v, fastpathCheckNilTrue, e) + + case map[int]uint8: + fastpathTV.EncMapIntUint8V(v, fastpathCheckNilTrue, e) + case *map[int]uint8: + fastpathTV.EncMapIntUint8V(*v, fastpathCheckNilTrue, e) + + case map[int]uint16: + fastpathTV.EncMapIntUint16V(v, fastpathCheckNilTrue, e) + case *map[int]uint16: + fastpathTV.EncMapIntUint16V(*v, fastpathCheckNilTrue, e) + + case map[int]uint32: + fastpathTV.EncMapIntUint32V(v, fastpathCheckNilTrue, e) + case *map[int]uint32: + fastpathTV.EncMapIntUint32V(*v, fastpathCheckNilTrue, e) + + case map[int]uint64: + fastpathTV.EncMapIntUint64V(v, fastpathCheckNilTrue, e) + case *map[int]uint64: + fastpathTV.EncMapIntUint64V(*v, fastpathCheckNilTrue, e) + + case map[int]uintptr: + fastpathTV.EncMapIntUintptrV(v, fastpathCheckNilTrue, e) + case *map[int]uintptr: + fastpathTV.EncMapIntUintptrV(*v, fastpathCheckNilTrue, e) + + case map[int]int: + fastpathTV.EncMapIntIntV(v, fastpathCheckNilTrue, e) + case *map[int]int: + fastpathTV.EncMapIntIntV(*v, fastpathCheckNilTrue, e) + + case map[int]int8: + fastpathTV.EncMapIntInt8V(v, fastpathCheckNilTrue, e) + case *map[int]int8: + fastpathTV.EncMapIntInt8V(*v, fastpathCheckNilTrue, e) + + case map[int]int16: + fastpathTV.EncMapIntInt16V(v, fastpathCheckNilTrue, e) + case *map[int]int16: + fastpathTV.EncMapIntInt16V(*v, fastpathCheckNilTrue, e) + + case map[int]int32: + fastpathTV.EncMapIntInt32V(v, fastpathCheckNilTrue, e) + case *map[int]int32: + fastpathTV.EncMapIntInt32V(*v, fastpathCheckNilTrue, e) + + case map[int]int64: + fastpathTV.EncMapIntInt64V(v, fastpathCheckNilTrue, e) + case *map[int]int64: + fastpathTV.EncMapIntInt64V(*v, fastpathCheckNilTrue, e) + + case map[int]float32: + fastpathTV.EncMapIntFloat32V(v, fastpathCheckNilTrue, e) + case *map[int]float32: + fastpathTV.EncMapIntFloat32V(*v, fastpathCheckNilTrue, e) + + case map[int]float64: + fastpathTV.EncMapIntFloat64V(v, fastpathCheckNilTrue, e) + case *map[int]float64: + fastpathTV.EncMapIntFloat64V(*v, fastpathCheckNilTrue, e) + + case map[int]bool: + fastpathTV.EncMapIntBoolV(v, fastpathCheckNilTrue, e) + case *map[int]bool: + fastpathTV.EncMapIntBoolV(*v, fastpathCheckNilTrue, e) + + case []int8: + fastpathTV.EncSliceInt8V(v, fastpathCheckNilTrue, e) + case *[]int8: + fastpathTV.EncSliceInt8V(*v, fastpathCheckNilTrue, e) + + case map[int8]interface{}: + fastpathTV.EncMapInt8IntfV(v, fastpathCheckNilTrue, e) + case *map[int8]interface{}: + fastpathTV.EncMapInt8IntfV(*v, fastpathCheckNilTrue, e) + + case map[int8]string: + fastpathTV.EncMapInt8StringV(v, fastpathCheckNilTrue, e) + case *map[int8]string: + fastpathTV.EncMapInt8StringV(*v, fastpathCheckNilTrue, e) + + case map[int8]uint: + fastpathTV.EncMapInt8UintV(v, fastpathCheckNilTrue, e) + case *map[int8]uint: + fastpathTV.EncMapInt8UintV(*v, fastpathCheckNilTrue, e) + + case map[int8]uint8: + fastpathTV.EncMapInt8Uint8V(v, fastpathCheckNilTrue, e) + case *map[int8]uint8: + fastpathTV.EncMapInt8Uint8V(*v, fastpathCheckNilTrue, e) + + case map[int8]uint16: + fastpathTV.EncMapInt8Uint16V(v, fastpathCheckNilTrue, e) + case *map[int8]uint16: + fastpathTV.EncMapInt8Uint16V(*v, fastpathCheckNilTrue, e) + + case map[int8]uint32: + fastpathTV.EncMapInt8Uint32V(v, fastpathCheckNilTrue, e) + case *map[int8]uint32: + fastpathTV.EncMapInt8Uint32V(*v, fastpathCheckNilTrue, e) + + case map[int8]uint64: + fastpathTV.EncMapInt8Uint64V(v, fastpathCheckNilTrue, e) + case *map[int8]uint64: + fastpathTV.EncMapInt8Uint64V(*v, fastpathCheckNilTrue, e) + + case map[int8]uintptr: + fastpathTV.EncMapInt8UintptrV(v, fastpathCheckNilTrue, e) + case *map[int8]uintptr: + fastpathTV.EncMapInt8UintptrV(*v, fastpathCheckNilTrue, e) + + case map[int8]int: + fastpathTV.EncMapInt8IntV(v, fastpathCheckNilTrue, e) + case *map[int8]int: + fastpathTV.EncMapInt8IntV(*v, fastpathCheckNilTrue, e) + + case map[int8]int8: + fastpathTV.EncMapInt8Int8V(v, fastpathCheckNilTrue, e) + case *map[int8]int8: + fastpathTV.EncMapInt8Int8V(*v, fastpathCheckNilTrue, e) + + case map[int8]int16: + fastpathTV.EncMapInt8Int16V(v, fastpathCheckNilTrue, e) + case *map[int8]int16: + fastpathTV.EncMapInt8Int16V(*v, fastpathCheckNilTrue, e) + + case map[int8]int32: + fastpathTV.EncMapInt8Int32V(v, fastpathCheckNilTrue, e) + case *map[int8]int32: + fastpathTV.EncMapInt8Int32V(*v, fastpathCheckNilTrue, e) + + case map[int8]int64: + fastpathTV.EncMapInt8Int64V(v, fastpathCheckNilTrue, e) + case *map[int8]int64: + fastpathTV.EncMapInt8Int64V(*v, fastpathCheckNilTrue, e) + + case map[int8]float32: + fastpathTV.EncMapInt8Float32V(v, fastpathCheckNilTrue, e) + case *map[int8]float32: + fastpathTV.EncMapInt8Float32V(*v, fastpathCheckNilTrue, e) + + case map[int8]float64: + fastpathTV.EncMapInt8Float64V(v, fastpathCheckNilTrue, e) + case *map[int8]float64: + fastpathTV.EncMapInt8Float64V(*v, fastpathCheckNilTrue, e) + + case map[int8]bool: + fastpathTV.EncMapInt8BoolV(v, fastpathCheckNilTrue, e) + case *map[int8]bool: + fastpathTV.EncMapInt8BoolV(*v, fastpathCheckNilTrue, e) + + case []int16: + fastpathTV.EncSliceInt16V(v, fastpathCheckNilTrue, e) + case *[]int16: + fastpathTV.EncSliceInt16V(*v, fastpathCheckNilTrue, e) + + case map[int16]interface{}: + fastpathTV.EncMapInt16IntfV(v, fastpathCheckNilTrue, e) + case *map[int16]interface{}: + fastpathTV.EncMapInt16IntfV(*v, fastpathCheckNilTrue, e) + + case map[int16]string: + fastpathTV.EncMapInt16StringV(v, fastpathCheckNilTrue, e) + case *map[int16]string: + fastpathTV.EncMapInt16StringV(*v, fastpathCheckNilTrue, e) + + case map[int16]uint: + fastpathTV.EncMapInt16UintV(v, fastpathCheckNilTrue, e) + case *map[int16]uint: + fastpathTV.EncMapInt16UintV(*v, fastpathCheckNilTrue, e) + + case map[int16]uint8: + fastpathTV.EncMapInt16Uint8V(v, fastpathCheckNilTrue, e) + case *map[int16]uint8: + fastpathTV.EncMapInt16Uint8V(*v, fastpathCheckNilTrue, e) + + case map[int16]uint16: + fastpathTV.EncMapInt16Uint16V(v, fastpathCheckNilTrue, e) + case *map[int16]uint16: + fastpathTV.EncMapInt16Uint16V(*v, fastpathCheckNilTrue, e) + + case map[int16]uint32: + fastpathTV.EncMapInt16Uint32V(v, fastpathCheckNilTrue, e) + case *map[int16]uint32: + fastpathTV.EncMapInt16Uint32V(*v, fastpathCheckNilTrue, e) + + case map[int16]uint64: + fastpathTV.EncMapInt16Uint64V(v, fastpathCheckNilTrue, e) + case *map[int16]uint64: + fastpathTV.EncMapInt16Uint64V(*v, fastpathCheckNilTrue, e) + + case map[int16]uintptr: + fastpathTV.EncMapInt16UintptrV(v, fastpathCheckNilTrue, e) + case *map[int16]uintptr: + fastpathTV.EncMapInt16UintptrV(*v, fastpathCheckNilTrue, e) + + case map[int16]int: + fastpathTV.EncMapInt16IntV(v, fastpathCheckNilTrue, e) + case *map[int16]int: + fastpathTV.EncMapInt16IntV(*v, fastpathCheckNilTrue, e) + + case map[int16]int8: + fastpathTV.EncMapInt16Int8V(v, fastpathCheckNilTrue, e) + case *map[int16]int8: + fastpathTV.EncMapInt16Int8V(*v, fastpathCheckNilTrue, e) + + case map[int16]int16: + fastpathTV.EncMapInt16Int16V(v, fastpathCheckNilTrue, e) + case *map[int16]int16: + fastpathTV.EncMapInt16Int16V(*v, fastpathCheckNilTrue, e) + + case map[int16]int32: + fastpathTV.EncMapInt16Int32V(v, fastpathCheckNilTrue, e) + case *map[int16]int32: + fastpathTV.EncMapInt16Int32V(*v, fastpathCheckNilTrue, e) + + case map[int16]int64: + fastpathTV.EncMapInt16Int64V(v, fastpathCheckNilTrue, e) + case *map[int16]int64: + fastpathTV.EncMapInt16Int64V(*v, fastpathCheckNilTrue, e) + + case map[int16]float32: + fastpathTV.EncMapInt16Float32V(v, fastpathCheckNilTrue, e) + case *map[int16]float32: + fastpathTV.EncMapInt16Float32V(*v, fastpathCheckNilTrue, e) + + case map[int16]float64: + fastpathTV.EncMapInt16Float64V(v, fastpathCheckNilTrue, e) + case *map[int16]float64: + fastpathTV.EncMapInt16Float64V(*v, fastpathCheckNilTrue, e) + + case map[int16]bool: + fastpathTV.EncMapInt16BoolV(v, fastpathCheckNilTrue, e) + case *map[int16]bool: + fastpathTV.EncMapInt16BoolV(*v, fastpathCheckNilTrue, e) + + case []int32: + fastpathTV.EncSliceInt32V(v, fastpathCheckNilTrue, e) + case *[]int32: + fastpathTV.EncSliceInt32V(*v, fastpathCheckNilTrue, e) + + case map[int32]interface{}: + fastpathTV.EncMapInt32IntfV(v, fastpathCheckNilTrue, e) + case *map[int32]interface{}: + fastpathTV.EncMapInt32IntfV(*v, fastpathCheckNilTrue, e) + + case map[int32]string: + fastpathTV.EncMapInt32StringV(v, fastpathCheckNilTrue, e) + case *map[int32]string: + fastpathTV.EncMapInt32StringV(*v, fastpathCheckNilTrue, e) + + case map[int32]uint: + fastpathTV.EncMapInt32UintV(v, fastpathCheckNilTrue, e) + case *map[int32]uint: + fastpathTV.EncMapInt32UintV(*v, fastpathCheckNilTrue, e) + + case map[int32]uint8: + fastpathTV.EncMapInt32Uint8V(v, fastpathCheckNilTrue, e) + case *map[int32]uint8: + fastpathTV.EncMapInt32Uint8V(*v, fastpathCheckNilTrue, e) + + case map[int32]uint16: + fastpathTV.EncMapInt32Uint16V(v, fastpathCheckNilTrue, e) + case *map[int32]uint16: + fastpathTV.EncMapInt32Uint16V(*v, fastpathCheckNilTrue, e) + + case map[int32]uint32: + fastpathTV.EncMapInt32Uint32V(v, fastpathCheckNilTrue, e) + case *map[int32]uint32: + fastpathTV.EncMapInt32Uint32V(*v, fastpathCheckNilTrue, e) + + case map[int32]uint64: + fastpathTV.EncMapInt32Uint64V(v, fastpathCheckNilTrue, e) + case *map[int32]uint64: + fastpathTV.EncMapInt32Uint64V(*v, fastpathCheckNilTrue, e) + + case map[int32]uintptr: + fastpathTV.EncMapInt32UintptrV(v, fastpathCheckNilTrue, e) + case *map[int32]uintptr: + fastpathTV.EncMapInt32UintptrV(*v, fastpathCheckNilTrue, e) + + case map[int32]int: + fastpathTV.EncMapInt32IntV(v, fastpathCheckNilTrue, e) + case *map[int32]int: + fastpathTV.EncMapInt32IntV(*v, fastpathCheckNilTrue, e) + + case map[int32]int8: + fastpathTV.EncMapInt32Int8V(v, fastpathCheckNilTrue, e) + case *map[int32]int8: + fastpathTV.EncMapInt32Int8V(*v, fastpathCheckNilTrue, e) + + case map[int32]int16: + fastpathTV.EncMapInt32Int16V(v, fastpathCheckNilTrue, e) + case *map[int32]int16: + fastpathTV.EncMapInt32Int16V(*v, fastpathCheckNilTrue, e) + + case map[int32]int32: + fastpathTV.EncMapInt32Int32V(v, fastpathCheckNilTrue, e) + case *map[int32]int32: + fastpathTV.EncMapInt32Int32V(*v, fastpathCheckNilTrue, e) + + case map[int32]int64: + fastpathTV.EncMapInt32Int64V(v, fastpathCheckNilTrue, e) + case *map[int32]int64: + fastpathTV.EncMapInt32Int64V(*v, fastpathCheckNilTrue, e) + + case map[int32]float32: + fastpathTV.EncMapInt32Float32V(v, fastpathCheckNilTrue, e) + case *map[int32]float32: + fastpathTV.EncMapInt32Float32V(*v, fastpathCheckNilTrue, e) + + case map[int32]float64: + fastpathTV.EncMapInt32Float64V(v, fastpathCheckNilTrue, e) + case *map[int32]float64: + fastpathTV.EncMapInt32Float64V(*v, fastpathCheckNilTrue, e) + + case map[int32]bool: + fastpathTV.EncMapInt32BoolV(v, fastpathCheckNilTrue, e) + case *map[int32]bool: + fastpathTV.EncMapInt32BoolV(*v, fastpathCheckNilTrue, e) + + case []int64: + fastpathTV.EncSliceInt64V(v, fastpathCheckNilTrue, e) + case *[]int64: + fastpathTV.EncSliceInt64V(*v, fastpathCheckNilTrue, e) + + case map[int64]interface{}: + fastpathTV.EncMapInt64IntfV(v, fastpathCheckNilTrue, e) + case *map[int64]interface{}: + fastpathTV.EncMapInt64IntfV(*v, fastpathCheckNilTrue, e) + + case map[int64]string: + fastpathTV.EncMapInt64StringV(v, fastpathCheckNilTrue, e) + case *map[int64]string: + fastpathTV.EncMapInt64StringV(*v, fastpathCheckNilTrue, e) + + case map[int64]uint: + fastpathTV.EncMapInt64UintV(v, fastpathCheckNilTrue, e) + case *map[int64]uint: + fastpathTV.EncMapInt64UintV(*v, fastpathCheckNilTrue, e) + + case map[int64]uint8: + fastpathTV.EncMapInt64Uint8V(v, fastpathCheckNilTrue, e) + case *map[int64]uint8: + fastpathTV.EncMapInt64Uint8V(*v, fastpathCheckNilTrue, e) + + case map[int64]uint16: + fastpathTV.EncMapInt64Uint16V(v, fastpathCheckNilTrue, e) + case *map[int64]uint16: + fastpathTV.EncMapInt64Uint16V(*v, fastpathCheckNilTrue, e) + + case map[int64]uint32: + fastpathTV.EncMapInt64Uint32V(v, fastpathCheckNilTrue, e) + case *map[int64]uint32: + fastpathTV.EncMapInt64Uint32V(*v, fastpathCheckNilTrue, e) + + case map[int64]uint64: + fastpathTV.EncMapInt64Uint64V(v, fastpathCheckNilTrue, e) + case *map[int64]uint64: + fastpathTV.EncMapInt64Uint64V(*v, fastpathCheckNilTrue, e) + + case map[int64]uintptr: + fastpathTV.EncMapInt64UintptrV(v, fastpathCheckNilTrue, e) + case *map[int64]uintptr: + fastpathTV.EncMapInt64UintptrV(*v, fastpathCheckNilTrue, e) + + case map[int64]int: + fastpathTV.EncMapInt64IntV(v, fastpathCheckNilTrue, e) + case *map[int64]int: + fastpathTV.EncMapInt64IntV(*v, fastpathCheckNilTrue, e) + + case map[int64]int8: + fastpathTV.EncMapInt64Int8V(v, fastpathCheckNilTrue, e) + case *map[int64]int8: + fastpathTV.EncMapInt64Int8V(*v, fastpathCheckNilTrue, e) + + case map[int64]int16: + fastpathTV.EncMapInt64Int16V(v, fastpathCheckNilTrue, e) + case *map[int64]int16: + fastpathTV.EncMapInt64Int16V(*v, fastpathCheckNilTrue, e) + + case map[int64]int32: + fastpathTV.EncMapInt64Int32V(v, fastpathCheckNilTrue, e) + case *map[int64]int32: + fastpathTV.EncMapInt64Int32V(*v, fastpathCheckNilTrue, e) + + case map[int64]int64: + fastpathTV.EncMapInt64Int64V(v, fastpathCheckNilTrue, e) + case *map[int64]int64: + fastpathTV.EncMapInt64Int64V(*v, fastpathCheckNilTrue, e) + + case map[int64]float32: + fastpathTV.EncMapInt64Float32V(v, fastpathCheckNilTrue, e) + case *map[int64]float32: + fastpathTV.EncMapInt64Float32V(*v, fastpathCheckNilTrue, e) + + case map[int64]float64: + fastpathTV.EncMapInt64Float64V(v, fastpathCheckNilTrue, e) + case *map[int64]float64: + fastpathTV.EncMapInt64Float64V(*v, fastpathCheckNilTrue, e) + + case map[int64]bool: + fastpathTV.EncMapInt64BoolV(v, fastpathCheckNilTrue, e) + case *map[int64]bool: + fastpathTV.EncMapInt64BoolV(*v, fastpathCheckNilTrue, e) + + case []bool: + fastpathTV.EncSliceBoolV(v, fastpathCheckNilTrue, e) + case *[]bool: + fastpathTV.EncSliceBoolV(*v, fastpathCheckNilTrue, e) + + case map[bool]interface{}: + fastpathTV.EncMapBoolIntfV(v, fastpathCheckNilTrue, e) + case *map[bool]interface{}: + fastpathTV.EncMapBoolIntfV(*v, fastpathCheckNilTrue, e) + + case map[bool]string: + fastpathTV.EncMapBoolStringV(v, fastpathCheckNilTrue, e) + case *map[bool]string: + fastpathTV.EncMapBoolStringV(*v, fastpathCheckNilTrue, e) + + case map[bool]uint: + fastpathTV.EncMapBoolUintV(v, fastpathCheckNilTrue, e) + case *map[bool]uint: + fastpathTV.EncMapBoolUintV(*v, fastpathCheckNilTrue, e) + + case map[bool]uint8: + fastpathTV.EncMapBoolUint8V(v, fastpathCheckNilTrue, e) + case *map[bool]uint8: + fastpathTV.EncMapBoolUint8V(*v, fastpathCheckNilTrue, e) + + case map[bool]uint16: + fastpathTV.EncMapBoolUint16V(v, fastpathCheckNilTrue, e) + case *map[bool]uint16: + fastpathTV.EncMapBoolUint16V(*v, fastpathCheckNilTrue, e) + + case map[bool]uint32: + fastpathTV.EncMapBoolUint32V(v, fastpathCheckNilTrue, e) + case *map[bool]uint32: + fastpathTV.EncMapBoolUint32V(*v, fastpathCheckNilTrue, e) + + case map[bool]uint64: + fastpathTV.EncMapBoolUint64V(v, fastpathCheckNilTrue, e) + case *map[bool]uint64: + fastpathTV.EncMapBoolUint64V(*v, fastpathCheckNilTrue, e) + + case map[bool]uintptr: + fastpathTV.EncMapBoolUintptrV(v, fastpathCheckNilTrue, e) + case *map[bool]uintptr: + fastpathTV.EncMapBoolUintptrV(*v, fastpathCheckNilTrue, e) + + case map[bool]int: + fastpathTV.EncMapBoolIntV(v, fastpathCheckNilTrue, e) + case *map[bool]int: + fastpathTV.EncMapBoolIntV(*v, fastpathCheckNilTrue, e) + + case map[bool]int8: + fastpathTV.EncMapBoolInt8V(v, fastpathCheckNilTrue, e) + case *map[bool]int8: + fastpathTV.EncMapBoolInt8V(*v, fastpathCheckNilTrue, e) + + case map[bool]int16: + fastpathTV.EncMapBoolInt16V(v, fastpathCheckNilTrue, e) + case *map[bool]int16: + fastpathTV.EncMapBoolInt16V(*v, fastpathCheckNilTrue, e) + + case map[bool]int32: + fastpathTV.EncMapBoolInt32V(v, fastpathCheckNilTrue, e) + case *map[bool]int32: + fastpathTV.EncMapBoolInt32V(*v, fastpathCheckNilTrue, e) + + case map[bool]int64: + fastpathTV.EncMapBoolInt64V(v, fastpathCheckNilTrue, e) + case *map[bool]int64: + fastpathTV.EncMapBoolInt64V(*v, fastpathCheckNilTrue, e) + + case map[bool]float32: + fastpathTV.EncMapBoolFloat32V(v, fastpathCheckNilTrue, e) + case *map[bool]float32: + fastpathTV.EncMapBoolFloat32V(*v, fastpathCheckNilTrue, e) + + case map[bool]float64: + fastpathTV.EncMapBoolFloat64V(v, fastpathCheckNilTrue, e) + case *map[bool]float64: + fastpathTV.EncMapBoolFloat64V(*v, fastpathCheckNilTrue, e) + + case map[bool]bool: + fastpathTV.EncMapBoolBoolV(v, fastpathCheckNilTrue, e) + case *map[bool]bool: + fastpathTV.EncMapBoolBoolV(*v, fastpathCheckNilTrue, e) + + default: + _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + return false + } + return true +} + +func fastpathEncodeTypeSwitchSlice(iv interface{}, e *Encoder) bool { + if !fastpathEnabled { + return false + } + switch v := iv.(type) { + + case []interface{}: + fastpathTV.EncSliceIntfV(v, fastpathCheckNilTrue, e) + case *[]interface{}: + fastpathTV.EncSliceIntfV(*v, fastpathCheckNilTrue, e) + + case []string: + fastpathTV.EncSliceStringV(v, fastpathCheckNilTrue, e) + case *[]string: + fastpathTV.EncSliceStringV(*v, fastpathCheckNilTrue, e) + + case []float32: + fastpathTV.EncSliceFloat32V(v, fastpathCheckNilTrue, e) + case *[]float32: + fastpathTV.EncSliceFloat32V(*v, fastpathCheckNilTrue, e) + + case []float64: + fastpathTV.EncSliceFloat64V(v, fastpathCheckNilTrue, e) + case *[]float64: + fastpathTV.EncSliceFloat64V(*v, fastpathCheckNilTrue, e) + + case []uint: + fastpathTV.EncSliceUintV(v, fastpathCheckNilTrue, e) + case *[]uint: + fastpathTV.EncSliceUintV(*v, fastpathCheckNilTrue, e) + + case []uint16: + fastpathTV.EncSliceUint16V(v, fastpathCheckNilTrue, e) + case *[]uint16: + fastpathTV.EncSliceUint16V(*v, fastpathCheckNilTrue, e) + + case []uint32: + fastpathTV.EncSliceUint32V(v, fastpathCheckNilTrue, e) + case *[]uint32: + fastpathTV.EncSliceUint32V(*v, fastpathCheckNilTrue, e) + + case []uint64: + fastpathTV.EncSliceUint64V(v, fastpathCheckNilTrue, e) + case *[]uint64: + fastpathTV.EncSliceUint64V(*v, fastpathCheckNilTrue, e) + + case []uintptr: + fastpathTV.EncSliceUintptrV(v, fastpathCheckNilTrue, e) + case *[]uintptr: + fastpathTV.EncSliceUintptrV(*v, fastpathCheckNilTrue, e) + + case []int: + fastpathTV.EncSliceIntV(v, fastpathCheckNilTrue, e) + case *[]int: + fastpathTV.EncSliceIntV(*v, fastpathCheckNilTrue, e) + + case []int8: + fastpathTV.EncSliceInt8V(v, fastpathCheckNilTrue, e) + case *[]int8: + fastpathTV.EncSliceInt8V(*v, fastpathCheckNilTrue, e) + + case []int16: + fastpathTV.EncSliceInt16V(v, fastpathCheckNilTrue, e) + case *[]int16: + fastpathTV.EncSliceInt16V(*v, fastpathCheckNilTrue, e) + + case []int32: + fastpathTV.EncSliceInt32V(v, fastpathCheckNilTrue, e) + case *[]int32: + fastpathTV.EncSliceInt32V(*v, fastpathCheckNilTrue, e) + + case []int64: + fastpathTV.EncSliceInt64V(v, fastpathCheckNilTrue, e) + case *[]int64: + fastpathTV.EncSliceInt64V(*v, fastpathCheckNilTrue, e) + + case []bool: + fastpathTV.EncSliceBoolV(v, fastpathCheckNilTrue, e) + case *[]bool: + fastpathTV.EncSliceBoolV(*v, fastpathCheckNilTrue, e) + + default: + _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + return false + } + return true +} + +func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { + if !fastpathEnabled { + return false + } + switch v := iv.(type) { + + case map[interface{}]interface{}: + fastpathTV.EncMapIntfIntfV(v, fastpathCheckNilTrue, e) + case *map[interface{}]interface{}: + fastpathTV.EncMapIntfIntfV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]string: + fastpathTV.EncMapIntfStringV(v, fastpathCheckNilTrue, e) + case *map[interface{}]string: + fastpathTV.EncMapIntfStringV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint: + fastpathTV.EncMapIntfUintV(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint: + fastpathTV.EncMapIntfUintV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint8: + fastpathTV.EncMapIntfUint8V(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint8: + fastpathTV.EncMapIntfUint8V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint16: + fastpathTV.EncMapIntfUint16V(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint16: + fastpathTV.EncMapIntfUint16V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint32: + fastpathTV.EncMapIntfUint32V(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint32: + fastpathTV.EncMapIntfUint32V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint64: + fastpathTV.EncMapIntfUint64V(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint64: + fastpathTV.EncMapIntfUint64V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uintptr: + fastpathTV.EncMapIntfUintptrV(v, fastpathCheckNilTrue, e) + case *map[interface{}]uintptr: + fastpathTV.EncMapIntfUintptrV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int: + fastpathTV.EncMapIntfIntV(v, fastpathCheckNilTrue, e) + case *map[interface{}]int: + fastpathTV.EncMapIntfIntV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int8: + fastpathTV.EncMapIntfInt8V(v, fastpathCheckNilTrue, e) + case *map[interface{}]int8: + fastpathTV.EncMapIntfInt8V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int16: + fastpathTV.EncMapIntfInt16V(v, fastpathCheckNilTrue, e) + case *map[interface{}]int16: + fastpathTV.EncMapIntfInt16V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int32: + fastpathTV.EncMapIntfInt32V(v, fastpathCheckNilTrue, e) + case *map[interface{}]int32: + fastpathTV.EncMapIntfInt32V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int64: + fastpathTV.EncMapIntfInt64V(v, fastpathCheckNilTrue, e) + case *map[interface{}]int64: + fastpathTV.EncMapIntfInt64V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]float32: + fastpathTV.EncMapIntfFloat32V(v, fastpathCheckNilTrue, e) + case *map[interface{}]float32: + fastpathTV.EncMapIntfFloat32V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]float64: + fastpathTV.EncMapIntfFloat64V(v, fastpathCheckNilTrue, e) + case *map[interface{}]float64: + fastpathTV.EncMapIntfFloat64V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]bool: + fastpathTV.EncMapIntfBoolV(v, fastpathCheckNilTrue, e) + case *map[interface{}]bool: + fastpathTV.EncMapIntfBoolV(*v, fastpathCheckNilTrue, e) + + case map[string]interface{}: + fastpathTV.EncMapStringIntfV(v, fastpathCheckNilTrue, e) + case *map[string]interface{}: + fastpathTV.EncMapStringIntfV(*v, fastpathCheckNilTrue, e) + + case map[string]string: + fastpathTV.EncMapStringStringV(v, fastpathCheckNilTrue, e) + case *map[string]string: + fastpathTV.EncMapStringStringV(*v, fastpathCheckNilTrue, e) + + case map[string]uint: + fastpathTV.EncMapStringUintV(v, fastpathCheckNilTrue, e) + case *map[string]uint: + fastpathTV.EncMapStringUintV(*v, fastpathCheckNilTrue, e) + + case map[string]uint8: + fastpathTV.EncMapStringUint8V(v, fastpathCheckNilTrue, e) + case *map[string]uint8: + fastpathTV.EncMapStringUint8V(*v, fastpathCheckNilTrue, e) + + case map[string]uint16: + fastpathTV.EncMapStringUint16V(v, fastpathCheckNilTrue, e) + case *map[string]uint16: + fastpathTV.EncMapStringUint16V(*v, fastpathCheckNilTrue, e) + + case map[string]uint32: + fastpathTV.EncMapStringUint32V(v, fastpathCheckNilTrue, e) + case *map[string]uint32: + fastpathTV.EncMapStringUint32V(*v, fastpathCheckNilTrue, e) + + case map[string]uint64: + fastpathTV.EncMapStringUint64V(v, fastpathCheckNilTrue, e) + case *map[string]uint64: + fastpathTV.EncMapStringUint64V(*v, fastpathCheckNilTrue, e) + + case map[string]uintptr: + fastpathTV.EncMapStringUintptrV(v, fastpathCheckNilTrue, e) + case *map[string]uintptr: + fastpathTV.EncMapStringUintptrV(*v, fastpathCheckNilTrue, e) + + case map[string]int: + fastpathTV.EncMapStringIntV(v, fastpathCheckNilTrue, e) + case *map[string]int: + fastpathTV.EncMapStringIntV(*v, fastpathCheckNilTrue, e) + + case map[string]int8: + fastpathTV.EncMapStringInt8V(v, fastpathCheckNilTrue, e) + case *map[string]int8: + fastpathTV.EncMapStringInt8V(*v, fastpathCheckNilTrue, e) + + case map[string]int16: + fastpathTV.EncMapStringInt16V(v, fastpathCheckNilTrue, e) + case *map[string]int16: + fastpathTV.EncMapStringInt16V(*v, fastpathCheckNilTrue, e) + + case map[string]int32: + fastpathTV.EncMapStringInt32V(v, fastpathCheckNilTrue, e) + case *map[string]int32: + fastpathTV.EncMapStringInt32V(*v, fastpathCheckNilTrue, e) + + case map[string]int64: + fastpathTV.EncMapStringInt64V(v, fastpathCheckNilTrue, e) + case *map[string]int64: + fastpathTV.EncMapStringInt64V(*v, fastpathCheckNilTrue, e) + + case map[string]float32: + fastpathTV.EncMapStringFloat32V(v, fastpathCheckNilTrue, e) + case *map[string]float32: + fastpathTV.EncMapStringFloat32V(*v, fastpathCheckNilTrue, e) + + case map[string]float64: + fastpathTV.EncMapStringFloat64V(v, fastpathCheckNilTrue, e) + case *map[string]float64: + fastpathTV.EncMapStringFloat64V(*v, fastpathCheckNilTrue, e) + + case map[string]bool: + fastpathTV.EncMapStringBoolV(v, fastpathCheckNilTrue, e) + case *map[string]bool: + fastpathTV.EncMapStringBoolV(*v, fastpathCheckNilTrue, e) + + case map[float32]interface{}: + fastpathTV.EncMapFloat32IntfV(v, fastpathCheckNilTrue, e) + case *map[float32]interface{}: + fastpathTV.EncMapFloat32IntfV(*v, fastpathCheckNilTrue, e) + + case map[float32]string: + fastpathTV.EncMapFloat32StringV(v, fastpathCheckNilTrue, e) + case *map[float32]string: + fastpathTV.EncMapFloat32StringV(*v, fastpathCheckNilTrue, e) + + case map[float32]uint: + fastpathTV.EncMapFloat32UintV(v, fastpathCheckNilTrue, e) + case *map[float32]uint: + fastpathTV.EncMapFloat32UintV(*v, fastpathCheckNilTrue, e) + + case map[float32]uint8: + fastpathTV.EncMapFloat32Uint8V(v, fastpathCheckNilTrue, e) + case *map[float32]uint8: + fastpathTV.EncMapFloat32Uint8V(*v, fastpathCheckNilTrue, e) + + case map[float32]uint16: + fastpathTV.EncMapFloat32Uint16V(v, fastpathCheckNilTrue, e) + case *map[float32]uint16: + fastpathTV.EncMapFloat32Uint16V(*v, fastpathCheckNilTrue, e) + + case map[float32]uint32: + fastpathTV.EncMapFloat32Uint32V(v, fastpathCheckNilTrue, e) + case *map[float32]uint32: + fastpathTV.EncMapFloat32Uint32V(*v, fastpathCheckNilTrue, e) + + case map[float32]uint64: + fastpathTV.EncMapFloat32Uint64V(v, fastpathCheckNilTrue, e) + case *map[float32]uint64: + fastpathTV.EncMapFloat32Uint64V(*v, fastpathCheckNilTrue, e) + + case map[float32]uintptr: + fastpathTV.EncMapFloat32UintptrV(v, fastpathCheckNilTrue, e) + case *map[float32]uintptr: + fastpathTV.EncMapFloat32UintptrV(*v, fastpathCheckNilTrue, e) + + case map[float32]int: + fastpathTV.EncMapFloat32IntV(v, fastpathCheckNilTrue, e) + case *map[float32]int: + fastpathTV.EncMapFloat32IntV(*v, fastpathCheckNilTrue, e) + + case map[float32]int8: + fastpathTV.EncMapFloat32Int8V(v, fastpathCheckNilTrue, e) + case *map[float32]int8: + fastpathTV.EncMapFloat32Int8V(*v, fastpathCheckNilTrue, e) + + case map[float32]int16: + fastpathTV.EncMapFloat32Int16V(v, fastpathCheckNilTrue, e) + case *map[float32]int16: + fastpathTV.EncMapFloat32Int16V(*v, fastpathCheckNilTrue, e) + + case map[float32]int32: + fastpathTV.EncMapFloat32Int32V(v, fastpathCheckNilTrue, e) + case *map[float32]int32: + fastpathTV.EncMapFloat32Int32V(*v, fastpathCheckNilTrue, e) + + case map[float32]int64: + fastpathTV.EncMapFloat32Int64V(v, fastpathCheckNilTrue, e) + case *map[float32]int64: + fastpathTV.EncMapFloat32Int64V(*v, fastpathCheckNilTrue, e) + + case map[float32]float32: + fastpathTV.EncMapFloat32Float32V(v, fastpathCheckNilTrue, e) + case *map[float32]float32: + fastpathTV.EncMapFloat32Float32V(*v, fastpathCheckNilTrue, e) + + case map[float32]float64: + fastpathTV.EncMapFloat32Float64V(v, fastpathCheckNilTrue, e) + case *map[float32]float64: + fastpathTV.EncMapFloat32Float64V(*v, fastpathCheckNilTrue, e) + + case map[float32]bool: + fastpathTV.EncMapFloat32BoolV(v, fastpathCheckNilTrue, e) + case *map[float32]bool: + fastpathTV.EncMapFloat32BoolV(*v, fastpathCheckNilTrue, e) + + case map[float64]interface{}: + fastpathTV.EncMapFloat64IntfV(v, fastpathCheckNilTrue, e) + case *map[float64]interface{}: + fastpathTV.EncMapFloat64IntfV(*v, fastpathCheckNilTrue, e) + + case map[float64]string: + fastpathTV.EncMapFloat64StringV(v, fastpathCheckNilTrue, e) + case *map[float64]string: + fastpathTV.EncMapFloat64StringV(*v, fastpathCheckNilTrue, e) + + case map[float64]uint: + fastpathTV.EncMapFloat64UintV(v, fastpathCheckNilTrue, e) + case *map[float64]uint: + fastpathTV.EncMapFloat64UintV(*v, fastpathCheckNilTrue, e) + + case map[float64]uint8: + fastpathTV.EncMapFloat64Uint8V(v, fastpathCheckNilTrue, e) + case *map[float64]uint8: + fastpathTV.EncMapFloat64Uint8V(*v, fastpathCheckNilTrue, e) + + case map[float64]uint16: + fastpathTV.EncMapFloat64Uint16V(v, fastpathCheckNilTrue, e) + case *map[float64]uint16: + fastpathTV.EncMapFloat64Uint16V(*v, fastpathCheckNilTrue, e) + + case map[float64]uint32: + fastpathTV.EncMapFloat64Uint32V(v, fastpathCheckNilTrue, e) + case *map[float64]uint32: + fastpathTV.EncMapFloat64Uint32V(*v, fastpathCheckNilTrue, e) + + case map[float64]uint64: + fastpathTV.EncMapFloat64Uint64V(v, fastpathCheckNilTrue, e) + case *map[float64]uint64: + fastpathTV.EncMapFloat64Uint64V(*v, fastpathCheckNilTrue, e) + + case map[float64]uintptr: + fastpathTV.EncMapFloat64UintptrV(v, fastpathCheckNilTrue, e) + case *map[float64]uintptr: + fastpathTV.EncMapFloat64UintptrV(*v, fastpathCheckNilTrue, e) + + case map[float64]int: + fastpathTV.EncMapFloat64IntV(v, fastpathCheckNilTrue, e) + case *map[float64]int: + fastpathTV.EncMapFloat64IntV(*v, fastpathCheckNilTrue, e) + + case map[float64]int8: + fastpathTV.EncMapFloat64Int8V(v, fastpathCheckNilTrue, e) + case *map[float64]int8: + fastpathTV.EncMapFloat64Int8V(*v, fastpathCheckNilTrue, e) + + case map[float64]int16: + fastpathTV.EncMapFloat64Int16V(v, fastpathCheckNilTrue, e) + case *map[float64]int16: + fastpathTV.EncMapFloat64Int16V(*v, fastpathCheckNilTrue, e) + + case map[float64]int32: + fastpathTV.EncMapFloat64Int32V(v, fastpathCheckNilTrue, e) + case *map[float64]int32: + fastpathTV.EncMapFloat64Int32V(*v, fastpathCheckNilTrue, e) + + case map[float64]int64: + fastpathTV.EncMapFloat64Int64V(v, fastpathCheckNilTrue, e) + case *map[float64]int64: + fastpathTV.EncMapFloat64Int64V(*v, fastpathCheckNilTrue, e) + + case map[float64]float32: + fastpathTV.EncMapFloat64Float32V(v, fastpathCheckNilTrue, e) + case *map[float64]float32: + fastpathTV.EncMapFloat64Float32V(*v, fastpathCheckNilTrue, e) + + case map[float64]float64: + fastpathTV.EncMapFloat64Float64V(v, fastpathCheckNilTrue, e) + case *map[float64]float64: + fastpathTV.EncMapFloat64Float64V(*v, fastpathCheckNilTrue, e) + + case map[float64]bool: + fastpathTV.EncMapFloat64BoolV(v, fastpathCheckNilTrue, e) + case *map[float64]bool: + fastpathTV.EncMapFloat64BoolV(*v, fastpathCheckNilTrue, e) + + case map[uint]interface{}: + fastpathTV.EncMapUintIntfV(v, fastpathCheckNilTrue, e) + case *map[uint]interface{}: + fastpathTV.EncMapUintIntfV(*v, fastpathCheckNilTrue, e) + + case map[uint]string: + fastpathTV.EncMapUintStringV(v, fastpathCheckNilTrue, e) + case *map[uint]string: + fastpathTV.EncMapUintStringV(*v, fastpathCheckNilTrue, e) + + case map[uint]uint: + fastpathTV.EncMapUintUintV(v, fastpathCheckNilTrue, e) + case *map[uint]uint: + fastpathTV.EncMapUintUintV(*v, fastpathCheckNilTrue, e) + + case map[uint]uint8: + fastpathTV.EncMapUintUint8V(v, fastpathCheckNilTrue, e) + case *map[uint]uint8: + fastpathTV.EncMapUintUint8V(*v, fastpathCheckNilTrue, e) + + case map[uint]uint16: + fastpathTV.EncMapUintUint16V(v, fastpathCheckNilTrue, e) + case *map[uint]uint16: + fastpathTV.EncMapUintUint16V(*v, fastpathCheckNilTrue, e) + + case map[uint]uint32: + fastpathTV.EncMapUintUint32V(v, fastpathCheckNilTrue, e) + case *map[uint]uint32: + fastpathTV.EncMapUintUint32V(*v, fastpathCheckNilTrue, e) + + case map[uint]uint64: + fastpathTV.EncMapUintUint64V(v, fastpathCheckNilTrue, e) + case *map[uint]uint64: + fastpathTV.EncMapUintUint64V(*v, fastpathCheckNilTrue, e) + + case map[uint]uintptr: + fastpathTV.EncMapUintUintptrV(v, fastpathCheckNilTrue, e) + case *map[uint]uintptr: + fastpathTV.EncMapUintUintptrV(*v, fastpathCheckNilTrue, e) + + case map[uint]int: + fastpathTV.EncMapUintIntV(v, fastpathCheckNilTrue, e) + case *map[uint]int: + fastpathTV.EncMapUintIntV(*v, fastpathCheckNilTrue, e) + + case map[uint]int8: + fastpathTV.EncMapUintInt8V(v, fastpathCheckNilTrue, e) + case *map[uint]int8: + fastpathTV.EncMapUintInt8V(*v, fastpathCheckNilTrue, e) + + case map[uint]int16: + fastpathTV.EncMapUintInt16V(v, fastpathCheckNilTrue, e) + case *map[uint]int16: + fastpathTV.EncMapUintInt16V(*v, fastpathCheckNilTrue, e) + + case map[uint]int32: + fastpathTV.EncMapUintInt32V(v, fastpathCheckNilTrue, e) + case *map[uint]int32: + fastpathTV.EncMapUintInt32V(*v, fastpathCheckNilTrue, e) + + case map[uint]int64: + fastpathTV.EncMapUintInt64V(v, fastpathCheckNilTrue, e) + case *map[uint]int64: + fastpathTV.EncMapUintInt64V(*v, fastpathCheckNilTrue, e) + + case map[uint]float32: + fastpathTV.EncMapUintFloat32V(v, fastpathCheckNilTrue, e) + case *map[uint]float32: + fastpathTV.EncMapUintFloat32V(*v, fastpathCheckNilTrue, e) + + case map[uint]float64: + fastpathTV.EncMapUintFloat64V(v, fastpathCheckNilTrue, e) + case *map[uint]float64: + fastpathTV.EncMapUintFloat64V(*v, fastpathCheckNilTrue, e) + + case map[uint]bool: + fastpathTV.EncMapUintBoolV(v, fastpathCheckNilTrue, e) + case *map[uint]bool: + fastpathTV.EncMapUintBoolV(*v, fastpathCheckNilTrue, e) + + case map[uint8]interface{}: + fastpathTV.EncMapUint8IntfV(v, fastpathCheckNilTrue, e) + case *map[uint8]interface{}: + fastpathTV.EncMapUint8IntfV(*v, fastpathCheckNilTrue, e) + + case map[uint8]string: + fastpathTV.EncMapUint8StringV(v, fastpathCheckNilTrue, e) + case *map[uint8]string: + fastpathTV.EncMapUint8StringV(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint: + fastpathTV.EncMapUint8UintV(v, fastpathCheckNilTrue, e) + case *map[uint8]uint: + fastpathTV.EncMapUint8UintV(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint8: + fastpathTV.EncMapUint8Uint8V(v, fastpathCheckNilTrue, e) + case *map[uint8]uint8: + fastpathTV.EncMapUint8Uint8V(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint16: + fastpathTV.EncMapUint8Uint16V(v, fastpathCheckNilTrue, e) + case *map[uint8]uint16: + fastpathTV.EncMapUint8Uint16V(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint32: + fastpathTV.EncMapUint8Uint32V(v, fastpathCheckNilTrue, e) + case *map[uint8]uint32: + fastpathTV.EncMapUint8Uint32V(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint64: + fastpathTV.EncMapUint8Uint64V(v, fastpathCheckNilTrue, e) + case *map[uint8]uint64: + fastpathTV.EncMapUint8Uint64V(*v, fastpathCheckNilTrue, e) + + case map[uint8]uintptr: + fastpathTV.EncMapUint8UintptrV(v, fastpathCheckNilTrue, e) + case *map[uint8]uintptr: + fastpathTV.EncMapUint8UintptrV(*v, fastpathCheckNilTrue, e) + + case map[uint8]int: + fastpathTV.EncMapUint8IntV(v, fastpathCheckNilTrue, e) + case *map[uint8]int: + fastpathTV.EncMapUint8IntV(*v, fastpathCheckNilTrue, e) + + case map[uint8]int8: + fastpathTV.EncMapUint8Int8V(v, fastpathCheckNilTrue, e) + case *map[uint8]int8: + fastpathTV.EncMapUint8Int8V(*v, fastpathCheckNilTrue, e) + + case map[uint8]int16: + fastpathTV.EncMapUint8Int16V(v, fastpathCheckNilTrue, e) + case *map[uint8]int16: + fastpathTV.EncMapUint8Int16V(*v, fastpathCheckNilTrue, e) + + case map[uint8]int32: + fastpathTV.EncMapUint8Int32V(v, fastpathCheckNilTrue, e) + case *map[uint8]int32: + fastpathTV.EncMapUint8Int32V(*v, fastpathCheckNilTrue, e) + + case map[uint8]int64: + fastpathTV.EncMapUint8Int64V(v, fastpathCheckNilTrue, e) + case *map[uint8]int64: + fastpathTV.EncMapUint8Int64V(*v, fastpathCheckNilTrue, e) + + case map[uint8]float32: + fastpathTV.EncMapUint8Float32V(v, fastpathCheckNilTrue, e) + case *map[uint8]float32: + fastpathTV.EncMapUint8Float32V(*v, fastpathCheckNilTrue, e) + + case map[uint8]float64: + fastpathTV.EncMapUint8Float64V(v, fastpathCheckNilTrue, e) + case *map[uint8]float64: + fastpathTV.EncMapUint8Float64V(*v, fastpathCheckNilTrue, e) + + case map[uint8]bool: + fastpathTV.EncMapUint8BoolV(v, fastpathCheckNilTrue, e) + case *map[uint8]bool: + fastpathTV.EncMapUint8BoolV(*v, fastpathCheckNilTrue, e) + + case map[uint16]interface{}: + fastpathTV.EncMapUint16IntfV(v, fastpathCheckNilTrue, e) + case *map[uint16]interface{}: + fastpathTV.EncMapUint16IntfV(*v, fastpathCheckNilTrue, e) + + case map[uint16]string: + fastpathTV.EncMapUint16StringV(v, fastpathCheckNilTrue, e) + case *map[uint16]string: + fastpathTV.EncMapUint16StringV(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint: + fastpathTV.EncMapUint16UintV(v, fastpathCheckNilTrue, e) + case *map[uint16]uint: + fastpathTV.EncMapUint16UintV(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint8: + fastpathTV.EncMapUint16Uint8V(v, fastpathCheckNilTrue, e) + case *map[uint16]uint8: + fastpathTV.EncMapUint16Uint8V(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint16: + fastpathTV.EncMapUint16Uint16V(v, fastpathCheckNilTrue, e) + case *map[uint16]uint16: + fastpathTV.EncMapUint16Uint16V(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint32: + fastpathTV.EncMapUint16Uint32V(v, fastpathCheckNilTrue, e) + case *map[uint16]uint32: + fastpathTV.EncMapUint16Uint32V(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint64: + fastpathTV.EncMapUint16Uint64V(v, fastpathCheckNilTrue, e) + case *map[uint16]uint64: + fastpathTV.EncMapUint16Uint64V(*v, fastpathCheckNilTrue, e) + + case map[uint16]uintptr: + fastpathTV.EncMapUint16UintptrV(v, fastpathCheckNilTrue, e) + case *map[uint16]uintptr: + fastpathTV.EncMapUint16UintptrV(*v, fastpathCheckNilTrue, e) + + case map[uint16]int: + fastpathTV.EncMapUint16IntV(v, fastpathCheckNilTrue, e) + case *map[uint16]int: + fastpathTV.EncMapUint16IntV(*v, fastpathCheckNilTrue, e) + + case map[uint16]int8: + fastpathTV.EncMapUint16Int8V(v, fastpathCheckNilTrue, e) + case *map[uint16]int8: + fastpathTV.EncMapUint16Int8V(*v, fastpathCheckNilTrue, e) + + case map[uint16]int16: + fastpathTV.EncMapUint16Int16V(v, fastpathCheckNilTrue, e) + case *map[uint16]int16: + fastpathTV.EncMapUint16Int16V(*v, fastpathCheckNilTrue, e) + + case map[uint16]int32: + fastpathTV.EncMapUint16Int32V(v, fastpathCheckNilTrue, e) + case *map[uint16]int32: + fastpathTV.EncMapUint16Int32V(*v, fastpathCheckNilTrue, e) + + case map[uint16]int64: + fastpathTV.EncMapUint16Int64V(v, fastpathCheckNilTrue, e) + case *map[uint16]int64: + fastpathTV.EncMapUint16Int64V(*v, fastpathCheckNilTrue, e) + + case map[uint16]float32: + fastpathTV.EncMapUint16Float32V(v, fastpathCheckNilTrue, e) + case *map[uint16]float32: + fastpathTV.EncMapUint16Float32V(*v, fastpathCheckNilTrue, e) + + case map[uint16]float64: + fastpathTV.EncMapUint16Float64V(v, fastpathCheckNilTrue, e) + case *map[uint16]float64: + fastpathTV.EncMapUint16Float64V(*v, fastpathCheckNilTrue, e) + + case map[uint16]bool: + fastpathTV.EncMapUint16BoolV(v, fastpathCheckNilTrue, e) + case *map[uint16]bool: + fastpathTV.EncMapUint16BoolV(*v, fastpathCheckNilTrue, e) + + case map[uint32]interface{}: + fastpathTV.EncMapUint32IntfV(v, fastpathCheckNilTrue, e) + case *map[uint32]interface{}: + fastpathTV.EncMapUint32IntfV(*v, fastpathCheckNilTrue, e) + + case map[uint32]string: + fastpathTV.EncMapUint32StringV(v, fastpathCheckNilTrue, e) + case *map[uint32]string: + fastpathTV.EncMapUint32StringV(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint: + fastpathTV.EncMapUint32UintV(v, fastpathCheckNilTrue, e) + case *map[uint32]uint: + fastpathTV.EncMapUint32UintV(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint8: + fastpathTV.EncMapUint32Uint8V(v, fastpathCheckNilTrue, e) + case *map[uint32]uint8: + fastpathTV.EncMapUint32Uint8V(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint16: + fastpathTV.EncMapUint32Uint16V(v, fastpathCheckNilTrue, e) + case *map[uint32]uint16: + fastpathTV.EncMapUint32Uint16V(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint32: + fastpathTV.EncMapUint32Uint32V(v, fastpathCheckNilTrue, e) + case *map[uint32]uint32: + fastpathTV.EncMapUint32Uint32V(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint64: + fastpathTV.EncMapUint32Uint64V(v, fastpathCheckNilTrue, e) + case *map[uint32]uint64: + fastpathTV.EncMapUint32Uint64V(*v, fastpathCheckNilTrue, e) + + case map[uint32]uintptr: + fastpathTV.EncMapUint32UintptrV(v, fastpathCheckNilTrue, e) + case *map[uint32]uintptr: + fastpathTV.EncMapUint32UintptrV(*v, fastpathCheckNilTrue, e) + + case map[uint32]int: + fastpathTV.EncMapUint32IntV(v, fastpathCheckNilTrue, e) + case *map[uint32]int: + fastpathTV.EncMapUint32IntV(*v, fastpathCheckNilTrue, e) + + case map[uint32]int8: + fastpathTV.EncMapUint32Int8V(v, fastpathCheckNilTrue, e) + case *map[uint32]int8: + fastpathTV.EncMapUint32Int8V(*v, fastpathCheckNilTrue, e) + + case map[uint32]int16: + fastpathTV.EncMapUint32Int16V(v, fastpathCheckNilTrue, e) + case *map[uint32]int16: + fastpathTV.EncMapUint32Int16V(*v, fastpathCheckNilTrue, e) + + case map[uint32]int32: + fastpathTV.EncMapUint32Int32V(v, fastpathCheckNilTrue, e) + case *map[uint32]int32: + fastpathTV.EncMapUint32Int32V(*v, fastpathCheckNilTrue, e) + + case map[uint32]int64: + fastpathTV.EncMapUint32Int64V(v, fastpathCheckNilTrue, e) + case *map[uint32]int64: + fastpathTV.EncMapUint32Int64V(*v, fastpathCheckNilTrue, e) + + case map[uint32]float32: + fastpathTV.EncMapUint32Float32V(v, fastpathCheckNilTrue, e) + case *map[uint32]float32: + fastpathTV.EncMapUint32Float32V(*v, fastpathCheckNilTrue, e) + + case map[uint32]float64: + fastpathTV.EncMapUint32Float64V(v, fastpathCheckNilTrue, e) + case *map[uint32]float64: + fastpathTV.EncMapUint32Float64V(*v, fastpathCheckNilTrue, e) + + case map[uint32]bool: + fastpathTV.EncMapUint32BoolV(v, fastpathCheckNilTrue, e) + case *map[uint32]bool: + fastpathTV.EncMapUint32BoolV(*v, fastpathCheckNilTrue, e) + + case map[uint64]interface{}: + fastpathTV.EncMapUint64IntfV(v, fastpathCheckNilTrue, e) + case *map[uint64]interface{}: + fastpathTV.EncMapUint64IntfV(*v, fastpathCheckNilTrue, e) + + case map[uint64]string: + fastpathTV.EncMapUint64StringV(v, fastpathCheckNilTrue, e) + case *map[uint64]string: + fastpathTV.EncMapUint64StringV(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint: + fastpathTV.EncMapUint64UintV(v, fastpathCheckNilTrue, e) + case *map[uint64]uint: + fastpathTV.EncMapUint64UintV(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint8: + fastpathTV.EncMapUint64Uint8V(v, fastpathCheckNilTrue, e) + case *map[uint64]uint8: + fastpathTV.EncMapUint64Uint8V(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint16: + fastpathTV.EncMapUint64Uint16V(v, fastpathCheckNilTrue, e) + case *map[uint64]uint16: + fastpathTV.EncMapUint64Uint16V(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint32: + fastpathTV.EncMapUint64Uint32V(v, fastpathCheckNilTrue, e) + case *map[uint64]uint32: + fastpathTV.EncMapUint64Uint32V(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint64: + fastpathTV.EncMapUint64Uint64V(v, fastpathCheckNilTrue, e) + case *map[uint64]uint64: + fastpathTV.EncMapUint64Uint64V(*v, fastpathCheckNilTrue, e) + + case map[uint64]uintptr: + fastpathTV.EncMapUint64UintptrV(v, fastpathCheckNilTrue, e) + case *map[uint64]uintptr: + fastpathTV.EncMapUint64UintptrV(*v, fastpathCheckNilTrue, e) + + case map[uint64]int: + fastpathTV.EncMapUint64IntV(v, fastpathCheckNilTrue, e) + case *map[uint64]int: + fastpathTV.EncMapUint64IntV(*v, fastpathCheckNilTrue, e) + + case map[uint64]int8: + fastpathTV.EncMapUint64Int8V(v, fastpathCheckNilTrue, e) + case *map[uint64]int8: + fastpathTV.EncMapUint64Int8V(*v, fastpathCheckNilTrue, e) + + case map[uint64]int16: + fastpathTV.EncMapUint64Int16V(v, fastpathCheckNilTrue, e) + case *map[uint64]int16: + fastpathTV.EncMapUint64Int16V(*v, fastpathCheckNilTrue, e) + + case map[uint64]int32: + fastpathTV.EncMapUint64Int32V(v, fastpathCheckNilTrue, e) + case *map[uint64]int32: + fastpathTV.EncMapUint64Int32V(*v, fastpathCheckNilTrue, e) + + case map[uint64]int64: + fastpathTV.EncMapUint64Int64V(v, fastpathCheckNilTrue, e) + case *map[uint64]int64: + fastpathTV.EncMapUint64Int64V(*v, fastpathCheckNilTrue, e) + + case map[uint64]float32: + fastpathTV.EncMapUint64Float32V(v, fastpathCheckNilTrue, e) + case *map[uint64]float32: + fastpathTV.EncMapUint64Float32V(*v, fastpathCheckNilTrue, e) + + case map[uint64]float64: + fastpathTV.EncMapUint64Float64V(v, fastpathCheckNilTrue, e) + case *map[uint64]float64: + fastpathTV.EncMapUint64Float64V(*v, fastpathCheckNilTrue, e) + + case map[uint64]bool: + fastpathTV.EncMapUint64BoolV(v, fastpathCheckNilTrue, e) + case *map[uint64]bool: + fastpathTV.EncMapUint64BoolV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]interface{}: + fastpathTV.EncMapUintptrIntfV(v, fastpathCheckNilTrue, e) + case *map[uintptr]interface{}: + fastpathTV.EncMapUintptrIntfV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]string: + fastpathTV.EncMapUintptrStringV(v, fastpathCheckNilTrue, e) + case *map[uintptr]string: + fastpathTV.EncMapUintptrStringV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint: + fastpathTV.EncMapUintptrUintV(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint: + fastpathTV.EncMapUintptrUintV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint8: + fastpathTV.EncMapUintptrUint8V(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint8: + fastpathTV.EncMapUintptrUint8V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint16: + fastpathTV.EncMapUintptrUint16V(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint16: + fastpathTV.EncMapUintptrUint16V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint32: + fastpathTV.EncMapUintptrUint32V(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint32: + fastpathTV.EncMapUintptrUint32V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint64: + fastpathTV.EncMapUintptrUint64V(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint64: + fastpathTV.EncMapUintptrUint64V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uintptr: + fastpathTV.EncMapUintptrUintptrV(v, fastpathCheckNilTrue, e) + case *map[uintptr]uintptr: + fastpathTV.EncMapUintptrUintptrV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int: + fastpathTV.EncMapUintptrIntV(v, fastpathCheckNilTrue, e) + case *map[uintptr]int: + fastpathTV.EncMapUintptrIntV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int8: + fastpathTV.EncMapUintptrInt8V(v, fastpathCheckNilTrue, e) + case *map[uintptr]int8: + fastpathTV.EncMapUintptrInt8V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int16: + fastpathTV.EncMapUintptrInt16V(v, fastpathCheckNilTrue, e) + case *map[uintptr]int16: + fastpathTV.EncMapUintptrInt16V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int32: + fastpathTV.EncMapUintptrInt32V(v, fastpathCheckNilTrue, e) + case *map[uintptr]int32: + fastpathTV.EncMapUintptrInt32V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int64: + fastpathTV.EncMapUintptrInt64V(v, fastpathCheckNilTrue, e) + case *map[uintptr]int64: + fastpathTV.EncMapUintptrInt64V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]float32: + fastpathTV.EncMapUintptrFloat32V(v, fastpathCheckNilTrue, e) + case *map[uintptr]float32: + fastpathTV.EncMapUintptrFloat32V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]float64: + fastpathTV.EncMapUintptrFloat64V(v, fastpathCheckNilTrue, e) + case *map[uintptr]float64: + fastpathTV.EncMapUintptrFloat64V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]bool: + fastpathTV.EncMapUintptrBoolV(v, fastpathCheckNilTrue, e) + case *map[uintptr]bool: + fastpathTV.EncMapUintptrBoolV(*v, fastpathCheckNilTrue, e) + + case map[int]interface{}: + fastpathTV.EncMapIntIntfV(v, fastpathCheckNilTrue, e) + case *map[int]interface{}: + fastpathTV.EncMapIntIntfV(*v, fastpathCheckNilTrue, e) + + case map[int]string: + fastpathTV.EncMapIntStringV(v, fastpathCheckNilTrue, e) + case *map[int]string: + fastpathTV.EncMapIntStringV(*v, fastpathCheckNilTrue, e) + + case map[int]uint: + fastpathTV.EncMapIntUintV(v, fastpathCheckNilTrue, e) + case *map[int]uint: + fastpathTV.EncMapIntUintV(*v, fastpathCheckNilTrue, e) + + case map[int]uint8: + fastpathTV.EncMapIntUint8V(v, fastpathCheckNilTrue, e) + case *map[int]uint8: + fastpathTV.EncMapIntUint8V(*v, fastpathCheckNilTrue, e) + + case map[int]uint16: + fastpathTV.EncMapIntUint16V(v, fastpathCheckNilTrue, e) + case *map[int]uint16: + fastpathTV.EncMapIntUint16V(*v, fastpathCheckNilTrue, e) + + case map[int]uint32: + fastpathTV.EncMapIntUint32V(v, fastpathCheckNilTrue, e) + case *map[int]uint32: + fastpathTV.EncMapIntUint32V(*v, fastpathCheckNilTrue, e) + + case map[int]uint64: + fastpathTV.EncMapIntUint64V(v, fastpathCheckNilTrue, e) + case *map[int]uint64: + fastpathTV.EncMapIntUint64V(*v, fastpathCheckNilTrue, e) + + case map[int]uintptr: + fastpathTV.EncMapIntUintptrV(v, fastpathCheckNilTrue, e) + case *map[int]uintptr: + fastpathTV.EncMapIntUintptrV(*v, fastpathCheckNilTrue, e) + + case map[int]int: + fastpathTV.EncMapIntIntV(v, fastpathCheckNilTrue, e) + case *map[int]int: + fastpathTV.EncMapIntIntV(*v, fastpathCheckNilTrue, e) + + case map[int]int8: + fastpathTV.EncMapIntInt8V(v, fastpathCheckNilTrue, e) + case *map[int]int8: + fastpathTV.EncMapIntInt8V(*v, fastpathCheckNilTrue, e) + + case map[int]int16: + fastpathTV.EncMapIntInt16V(v, fastpathCheckNilTrue, e) + case *map[int]int16: + fastpathTV.EncMapIntInt16V(*v, fastpathCheckNilTrue, e) + + case map[int]int32: + fastpathTV.EncMapIntInt32V(v, fastpathCheckNilTrue, e) + case *map[int]int32: + fastpathTV.EncMapIntInt32V(*v, fastpathCheckNilTrue, e) + + case map[int]int64: + fastpathTV.EncMapIntInt64V(v, fastpathCheckNilTrue, e) + case *map[int]int64: + fastpathTV.EncMapIntInt64V(*v, fastpathCheckNilTrue, e) + + case map[int]float32: + fastpathTV.EncMapIntFloat32V(v, fastpathCheckNilTrue, e) + case *map[int]float32: + fastpathTV.EncMapIntFloat32V(*v, fastpathCheckNilTrue, e) + + case map[int]float64: + fastpathTV.EncMapIntFloat64V(v, fastpathCheckNilTrue, e) + case *map[int]float64: + fastpathTV.EncMapIntFloat64V(*v, fastpathCheckNilTrue, e) + + case map[int]bool: + fastpathTV.EncMapIntBoolV(v, fastpathCheckNilTrue, e) + case *map[int]bool: + fastpathTV.EncMapIntBoolV(*v, fastpathCheckNilTrue, e) + + case map[int8]interface{}: + fastpathTV.EncMapInt8IntfV(v, fastpathCheckNilTrue, e) + case *map[int8]interface{}: + fastpathTV.EncMapInt8IntfV(*v, fastpathCheckNilTrue, e) + + case map[int8]string: + fastpathTV.EncMapInt8StringV(v, fastpathCheckNilTrue, e) + case *map[int8]string: + fastpathTV.EncMapInt8StringV(*v, fastpathCheckNilTrue, e) + + case map[int8]uint: + fastpathTV.EncMapInt8UintV(v, fastpathCheckNilTrue, e) + case *map[int8]uint: + fastpathTV.EncMapInt8UintV(*v, fastpathCheckNilTrue, e) + + case map[int8]uint8: + fastpathTV.EncMapInt8Uint8V(v, fastpathCheckNilTrue, e) + case *map[int8]uint8: + fastpathTV.EncMapInt8Uint8V(*v, fastpathCheckNilTrue, e) + + case map[int8]uint16: + fastpathTV.EncMapInt8Uint16V(v, fastpathCheckNilTrue, e) + case *map[int8]uint16: + fastpathTV.EncMapInt8Uint16V(*v, fastpathCheckNilTrue, e) + + case map[int8]uint32: + fastpathTV.EncMapInt8Uint32V(v, fastpathCheckNilTrue, e) + case *map[int8]uint32: + fastpathTV.EncMapInt8Uint32V(*v, fastpathCheckNilTrue, e) + + case map[int8]uint64: + fastpathTV.EncMapInt8Uint64V(v, fastpathCheckNilTrue, e) + case *map[int8]uint64: + fastpathTV.EncMapInt8Uint64V(*v, fastpathCheckNilTrue, e) + + case map[int8]uintptr: + fastpathTV.EncMapInt8UintptrV(v, fastpathCheckNilTrue, e) + case *map[int8]uintptr: + fastpathTV.EncMapInt8UintptrV(*v, fastpathCheckNilTrue, e) + + case map[int8]int: + fastpathTV.EncMapInt8IntV(v, fastpathCheckNilTrue, e) + case *map[int8]int: + fastpathTV.EncMapInt8IntV(*v, fastpathCheckNilTrue, e) + + case map[int8]int8: + fastpathTV.EncMapInt8Int8V(v, fastpathCheckNilTrue, e) + case *map[int8]int8: + fastpathTV.EncMapInt8Int8V(*v, fastpathCheckNilTrue, e) + + case map[int8]int16: + fastpathTV.EncMapInt8Int16V(v, fastpathCheckNilTrue, e) + case *map[int8]int16: + fastpathTV.EncMapInt8Int16V(*v, fastpathCheckNilTrue, e) + + case map[int8]int32: + fastpathTV.EncMapInt8Int32V(v, fastpathCheckNilTrue, e) + case *map[int8]int32: + fastpathTV.EncMapInt8Int32V(*v, fastpathCheckNilTrue, e) + + case map[int8]int64: + fastpathTV.EncMapInt8Int64V(v, fastpathCheckNilTrue, e) + case *map[int8]int64: + fastpathTV.EncMapInt8Int64V(*v, fastpathCheckNilTrue, e) + + case map[int8]float32: + fastpathTV.EncMapInt8Float32V(v, fastpathCheckNilTrue, e) + case *map[int8]float32: + fastpathTV.EncMapInt8Float32V(*v, fastpathCheckNilTrue, e) + + case map[int8]float64: + fastpathTV.EncMapInt8Float64V(v, fastpathCheckNilTrue, e) + case *map[int8]float64: + fastpathTV.EncMapInt8Float64V(*v, fastpathCheckNilTrue, e) + + case map[int8]bool: + fastpathTV.EncMapInt8BoolV(v, fastpathCheckNilTrue, e) + case *map[int8]bool: + fastpathTV.EncMapInt8BoolV(*v, fastpathCheckNilTrue, e) + + case map[int16]interface{}: + fastpathTV.EncMapInt16IntfV(v, fastpathCheckNilTrue, e) + case *map[int16]interface{}: + fastpathTV.EncMapInt16IntfV(*v, fastpathCheckNilTrue, e) + + case map[int16]string: + fastpathTV.EncMapInt16StringV(v, fastpathCheckNilTrue, e) + case *map[int16]string: + fastpathTV.EncMapInt16StringV(*v, fastpathCheckNilTrue, e) + + case map[int16]uint: + fastpathTV.EncMapInt16UintV(v, fastpathCheckNilTrue, e) + case *map[int16]uint: + fastpathTV.EncMapInt16UintV(*v, fastpathCheckNilTrue, e) + + case map[int16]uint8: + fastpathTV.EncMapInt16Uint8V(v, fastpathCheckNilTrue, e) + case *map[int16]uint8: + fastpathTV.EncMapInt16Uint8V(*v, fastpathCheckNilTrue, e) + + case map[int16]uint16: + fastpathTV.EncMapInt16Uint16V(v, fastpathCheckNilTrue, e) + case *map[int16]uint16: + fastpathTV.EncMapInt16Uint16V(*v, fastpathCheckNilTrue, e) + + case map[int16]uint32: + fastpathTV.EncMapInt16Uint32V(v, fastpathCheckNilTrue, e) + case *map[int16]uint32: + fastpathTV.EncMapInt16Uint32V(*v, fastpathCheckNilTrue, e) + + case map[int16]uint64: + fastpathTV.EncMapInt16Uint64V(v, fastpathCheckNilTrue, e) + case *map[int16]uint64: + fastpathTV.EncMapInt16Uint64V(*v, fastpathCheckNilTrue, e) + + case map[int16]uintptr: + fastpathTV.EncMapInt16UintptrV(v, fastpathCheckNilTrue, e) + case *map[int16]uintptr: + fastpathTV.EncMapInt16UintptrV(*v, fastpathCheckNilTrue, e) + + case map[int16]int: + fastpathTV.EncMapInt16IntV(v, fastpathCheckNilTrue, e) + case *map[int16]int: + fastpathTV.EncMapInt16IntV(*v, fastpathCheckNilTrue, e) + + case map[int16]int8: + fastpathTV.EncMapInt16Int8V(v, fastpathCheckNilTrue, e) + case *map[int16]int8: + fastpathTV.EncMapInt16Int8V(*v, fastpathCheckNilTrue, e) + + case map[int16]int16: + fastpathTV.EncMapInt16Int16V(v, fastpathCheckNilTrue, e) + case *map[int16]int16: + fastpathTV.EncMapInt16Int16V(*v, fastpathCheckNilTrue, e) + + case map[int16]int32: + fastpathTV.EncMapInt16Int32V(v, fastpathCheckNilTrue, e) + case *map[int16]int32: + fastpathTV.EncMapInt16Int32V(*v, fastpathCheckNilTrue, e) + + case map[int16]int64: + fastpathTV.EncMapInt16Int64V(v, fastpathCheckNilTrue, e) + case *map[int16]int64: + fastpathTV.EncMapInt16Int64V(*v, fastpathCheckNilTrue, e) + + case map[int16]float32: + fastpathTV.EncMapInt16Float32V(v, fastpathCheckNilTrue, e) + case *map[int16]float32: + fastpathTV.EncMapInt16Float32V(*v, fastpathCheckNilTrue, e) + + case map[int16]float64: + fastpathTV.EncMapInt16Float64V(v, fastpathCheckNilTrue, e) + case *map[int16]float64: + fastpathTV.EncMapInt16Float64V(*v, fastpathCheckNilTrue, e) + + case map[int16]bool: + fastpathTV.EncMapInt16BoolV(v, fastpathCheckNilTrue, e) + case *map[int16]bool: + fastpathTV.EncMapInt16BoolV(*v, fastpathCheckNilTrue, e) + + case map[int32]interface{}: + fastpathTV.EncMapInt32IntfV(v, fastpathCheckNilTrue, e) + case *map[int32]interface{}: + fastpathTV.EncMapInt32IntfV(*v, fastpathCheckNilTrue, e) + + case map[int32]string: + fastpathTV.EncMapInt32StringV(v, fastpathCheckNilTrue, e) + case *map[int32]string: + fastpathTV.EncMapInt32StringV(*v, fastpathCheckNilTrue, e) + + case map[int32]uint: + fastpathTV.EncMapInt32UintV(v, fastpathCheckNilTrue, e) + case *map[int32]uint: + fastpathTV.EncMapInt32UintV(*v, fastpathCheckNilTrue, e) + + case map[int32]uint8: + fastpathTV.EncMapInt32Uint8V(v, fastpathCheckNilTrue, e) + case *map[int32]uint8: + fastpathTV.EncMapInt32Uint8V(*v, fastpathCheckNilTrue, e) + + case map[int32]uint16: + fastpathTV.EncMapInt32Uint16V(v, fastpathCheckNilTrue, e) + case *map[int32]uint16: + fastpathTV.EncMapInt32Uint16V(*v, fastpathCheckNilTrue, e) + + case map[int32]uint32: + fastpathTV.EncMapInt32Uint32V(v, fastpathCheckNilTrue, e) + case *map[int32]uint32: + fastpathTV.EncMapInt32Uint32V(*v, fastpathCheckNilTrue, e) + + case map[int32]uint64: + fastpathTV.EncMapInt32Uint64V(v, fastpathCheckNilTrue, e) + case *map[int32]uint64: + fastpathTV.EncMapInt32Uint64V(*v, fastpathCheckNilTrue, e) + + case map[int32]uintptr: + fastpathTV.EncMapInt32UintptrV(v, fastpathCheckNilTrue, e) + case *map[int32]uintptr: + fastpathTV.EncMapInt32UintptrV(*v, fastpathCheckNilTrue, e) + + case map[int32]int: + fastpathTV.EncMapInt32IntV(v, fastpathCheckNilTrue, e) + case *map[int32]int: + fastpathTV.EncMapInt32IntV(*v, fastpathCheckNilTrue, e) + + case map[int32]int8: + fastpathTV.EncMapInt32Int8V(v, fastpathCheckNilTrue, e) + case *map[int32]int8: + fastpathTV.EncMapInt32Int8V(*v, fastpathCheckNilTrue, e) + + case map[int32]int16: + fastpathTV.EncMapInt32Int16V(v, fastpathCheckNilTrue, e) + case *map[int32]int16: + fastpathTV.EncMapInt32Int16V(*v, fastpathCheckNilTrue, e) + + case map[int32]int32: + fastpathTV.EncMapInt32Int32V(v, fastpathCheckNilTrue, e) + case *map[int32]int32: + fastpathTV.EncMapInt32Int32V(*v, fastpathCheckNilTrue, e) + + case map[int32]int64: + fastpathTV.EncMapInt32Int64V(v, fastpathCheckNilTrue, e) + case *map[int32]int64: + fastpathTV.EncMapInt32Int64V(*v, fastpathCheckNilTrue, e) + + case map[int32]float32: + fastpathTV.EncMapInt32Float32V(v, fastpathCheckNilTrue, e) + case *map[int32]float32: + fastpathTV.EncMapInt32Float32V(*v, fastpathCheckNilTrue, e) + + case map[int32]float64: + fastpathTV.EncMapInt32Float64V(v, fastpathCheckNilTrue, e) + case *map[int32]float64: + fastpathTV.EncMapInt32Float64V(*v, fastpathCheckNilTrue, e) + + case map[int32]bool: + fastpathTV.EncMapInt32BoolV(v, fastpathCheckNilTrue, e) + case *map[int32]bool: + fastpathTV.EncMapInt32BoolV(*v, fastpathCheckNilTrue, e) + + case map[int64]interface{}: + fastpathTV.EncMapInt64IntfV(v, fastpathCheckNilTrue, e) + case *map[int64]interface{}: + fastpathTV.EncMapInt64IntfV(*v, fastpathCheckNilTrue, e) + + case map[int64]string: + fastpathTV.EncMapInt64StringV(v, fastpathCheckNilTrue, e) + case *map[int64]string: + fastpathTV.EncMapInt64StringV(*v, fastpathCheckNilTrue, e) + + case map[int64]uint: + fastpathTV.EncMapInt64UintV(v, fastpathCheckNilTrue, e) + case *map[int64]uint: + fastpathTV.EncMapInt64UintV(*v, fastpathCheckNilTrue, e) + + case map[int64]uint8: + fastpathTV.EncMapInt64Uint8V(v, fastpathCheckNilTrue, e) + case *map[int64]uint8: + fastpathTV.EncMapInt64Uint8V(*v, fastpathCheckNilTrue, e) + + case map[int64]uint16: + fastpathTV.EncMapInt64Uint16V(v, fastpathCheckNilTrue, e) + case *map[int64]uint16: + fastpathTV.EncMapInt64Uint16V(*v, fastpathCheckNilTrue, e) + + case map[int64]uint32: + fastpathTV.EncMapInt64Uint32V(v, fastpathCheckNilTrue, e) + case *map[int64]uint32: + fastpathTV.EncMapInt64Uint32V(*v, fastpathCheckNilTrue, e) + + case map[int64]uint64: + fastpathTV.EncMapInt64Uint64V(v, fastpathCheckNilTrue, e) + case *map[int64]uint64: + fastpathTV.EncMapInt64Uint64V(*v, fastpathCheckNilTrue, e) + + case map[int64]uintptr: + fastpathTV.EncMapInt64UintptrV(v, fastpathCheckNilTrue, e) + case *map[int64]uintptr: + fastpathTV.EncMapInt64UintptrV(*v, fastpathCheckNilTrue, e) + + case map[int64]int: + fastpathTV.EncMapInt64IntV(v, fastpathCheckNilTrue, e) + case *map[int64]int: + fastpathTV.EncMapInt64IntV(*v, fastpathCheckNilTrue, e) + + case map[int64]int8: + fastpathTV.EncMapInt64Int8V(v, fastpathCheckNilTrue, e) + case *map[int64]int8: + fastpathTV.EncMapInt64Int8V(*v, fastpathCheckNilTrue, e) + + case map[int64]int16: + fastpathTV.EncMapInt64Int16V(v, fastpathCheckNilTrue, e) + case *map[int64]int16: + fastpathTV.EncMapInt64Int16V(*v, fastpathCheckNilTrue, e) + + case map[int64]int32: + fastpathTV.EncMapInt64Int32V(v, fastpathCheckNilTrue, e) + case *map[int64]int32: + fastpathTV.EncMapInt64Int32V(*v, fastpathCheckNilTrue, e) + + case map[int64]int64: + fastpathTV.EncMapInt64Int64V(v, fastpathCheckNilTrue, e) + case *map[int64]int64: + fastpathTV.EncMapInt64Int64V(*v, fastpathCheckNilTrue, e) + + case map[int64]float32: + fastpathTV.EncMapInt64Float32V(v, fastpathCheckNilTrue, e) + case *map[int64]float32: + fastpathTV.EncMapInt64Float32V(*v, fastpathCheckNilTrue, e) + + case map[int64]float64: + fastpathTV.EncMapInt64Float64V(v, fastpathCheckNilTrue, e) + case *map[int64]float64: + fastpathTV.EncMapInt64Float64V(*v, fastpathCheckNilTrue, e) + + case map[int64]bool: + fastpathTV.EncMapInt64BoolV(v, fastpathCheckNilTrue, e) + case *map[int64]bool: + fastpathTV.EncMapInt64BoolV(*v, fastpathCheckNilTrue, e) + + case map[bool]interface{}: + fastpathTV.EncMapBoolIntfV(v, fastpathCheckNilTrue, e) + case *map[bool]interface{}: + fastpathTV.EncMapBoolIntfV(*v, fastpathCheckNilTrue, e) + + case map[bool]string: + fastpathTV.EncMapBoolStringV(v, fastpathCheckNilTrue, e) + case *map[bool]string: + fastpathTV.EncMapBoolStringV(*v, fastpathCheckNilTrue, e) + + case map[bool]uint: + fastpathTV.EncMapBoolUintV(v, fastpathCheckNilTrue, e) + case *map[bool]uint: + fastpathTV.EncMapBoolUintV(*v, fastpathCheckNilTrue, e) + + case map[bool]uint8: + fastpathTV.EncMapBoolUint8V(v, fastpathCheckNilTrue, e) + case *map[bool]uint8: + fastpathTV.EncMapBoolUint8V(*v, fastpathCheckNilTrue, e) + + case map[bool]uint16: + fastpathTV.EncMapBoolUint16V(v, fastpathCheckNilTrue, e) + case *map[bool]uint16: + fastpathTV.EncMapBoolUint16V(*v, fastpathCheckNilTrue, e) + + case map[bool]uint32: + fastpathTV.EncMapBoolUint32V(v, fastpathCheckNilTrue, e) + case *map[bool]uint32: + fastpathTV.EncMapBoolUint32V(*v, fastpathCheckNilTrue, e) + + case map[bool]uint64: + fastpathTV.EncMapBoolUint64V(v, fastpathCheckNilTrue, e) + case *map[bool]uint64: + fastpathTV.EncMapBoolUint64V(*v, fastpathCheckNilTrue, e) + + case map[bool]uintptr: + fastpathTV.EncMapBoolUintptrV(v, fastpathCheckNilTrue, e) + case *map[bool]uintptr: + fastpathTV.EncMapBoolUintptrV(*v, fastpathCheckNilTrue, e) + + case map[bool]int: + fastpathTV.EncMapBoolIntV(v, fastpathCheckNilTrue, e) + case *map[bool]int: + fastpathTV.EncMapBoolIntV(*v, fastpathCheckNilTrue, e) + + case map[bool]int8: + fastpathTV.EncMapBoolInt8V(v, fastpathCheckNilTrue, e) + case *map[bool]int8: + fastpathTV.EncMapBoolInt8V(*v, fastpathCheckNilTrue, e) + + case map[bool]int16: + fastpathTV.EncMapBoolInt16V(v, fastpathCheckNilTrue, e) + case *map[bool]int16: + fastpathTV.EncMapBoolInt16V(*v, fastpathCheckNilTrue, e) + + case map[bool]int32: + fastpathTV.EncMapBoolInt32V(v, fastpathCheckNilTrue, e) + case *map[bool]int32: + fastpathTV.EncMapBoolInt32V(*v, fastpathCheckNilTrue, e) + + case map[bool]int64: + fastpathTV.EncMapBoolInt64V(v, fastpathCheckNilTrue, e) + case *map[bool]int64: + fastpathTV.EncMapBoolInt64V(*v, fastpathCheckNilTrue, e) + + case map[bool]float32: + fastpathTV.EncMapBoolFloat32V(v, fastpathCheckNilTrue, e) + case *map[bool]float32: + fastpathTV.EncMapBoolFloat32V(*v, fastpathCheckNilTrue, e) + + case map[bool]float64: + fastpathTV.EncMapBoolFloat64V(v, fastpathCheckNilTrue, e) + case *map[bool]float64: + fastpathTV.EncMapBoolFloat64V(*v, fastpathCheckNilTrue, e) + + case map[bool]bool: + fastpathTV.EncMapBoolBoolV(v, fastpathCheckNilTrue, e) + case *map[bool]bool: + fastpathTV.EncMapBoolBoolV(*v, fastpathCheckNilTrue, e) + + default: + _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + return false + } + return true +} + +// -- -- fast path functions + +func (f *encFnInfo) fastpathEncSliceIntfR(rv reflect.Value) { + fastpathTV.EncSliceIntfV(rv.Interface().([]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceIntfV(v []interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + e.encode(v2) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceStringR(rv reflect.Value) { + fastpathTV.EncSliceStringV(rv.Interface().([]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceStringV(v []string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeString(c_UTF8, v2) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceFloat32R(rv reflect.Value) { + fastpathTV.EncSliceFloat32V(rv.Interface().([]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceFloat32V(v []float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeFloat32(v2) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceFloat64R(rv reflect.Value) { + fastpathTV.EncSliceFloat64V(rv.Interface().([]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceFloat64V(v []float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeFloat64(v2) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceUintR(rv reflect.Value) { + fastpathTV.EncSliceUintV(rv.Interface().([]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceUintV(v []uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeUint(uint64(v2)) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceUint16R(rv reflect.Value) { + fastpathTV.EncSliceUint16V(rv.Interface().([]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceUint16V(v []uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeUint(uint64(v2)) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceUint32R(rv reflect.Value) { + fastpathTV.EncSliceUint32V(rv.Interface().([]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceUint32V(v []uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeUint(uint64(v2)) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceUint64R(rv reflect.Value) { + fastpathTV.EncSliceUint64V(rv.Interface().([]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceUint64V(v []uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeUint(uint64(v2)) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceUintptrR(rv reflect.Value) { + fastpathTV.EncSliceUintptrV(rv.Interface().([]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceUintptrV(v []uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + e.encode(v2) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceIntR(rv reflect.Value) { + fastpathTV.EncSliceIntV(rv.Interface().([]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceIntV(v []int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeInt(int64(v2)) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceInt8R(rv reflect.Value) { + fastpathTV.EncSliceInt8V(rv.Interface().([]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceInt8V(v []int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeInt(int64(v2)) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceInt16R(rv reflect.Value) { + fastpathTV.EncSliceInt16V(rv.Interface().([]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceInt16V(v []int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeInt(int64(v2)) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceInt32R(rv reflect.Value) { + fastpathTV.EncSliceInt32V(rv.Interface().([]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceInt32V(v []int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeInt(int64(v2)) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceInt64R(rv reflect.Value) { + fastpathTV.EncSliceInt64V(rv.Interface().([]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceInt64V(v []int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeInt(int64(v2)) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceBoolR(rv reflect.Value) { + fastpathTV.EncSliceBoolV(rv.Interface().([]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceBoolV(v []bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeBool(v2) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfIntfR(rv reflect.Value) { + fastpathTV.EncMapIntfIntfV(rv.Interface().(map[interface{}]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfIntfV(v map[interface{}]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfStringR(rv reflect.Value) { + fastpathTV.EncMapIntfStringV(rv.Interface().(map[interface{}]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfStringV(v map[interface{}]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfUintR(rv reflect.Value) { + fastpathTV.EncMapIntfUintV(rv.Interface().(map[interface{}]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfUintV(v map[interface{}]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfUint8R(rv reflect.Value) { + fastpathTV.EncMapIntfUint8V(rv.Interface().(map[interface{}]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfUint8V(v map[interface{}]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfUint16R(rv reflect.Value) { + fastpathTV.EncMapIntfUint16V(rv.Interface().(map[interface{}]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfUint16V(v map[interface{}]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfUint32R(rv reflect.Value) { + fastpathTV.EncMapIntfUint32V(rv.Interface().(map[interface{}]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfUint32V(v map[interface{}]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfUint64R(rv reflect.Value) { + fastpathTV.EncMapIntfUint64V(rv.Interface().(map[interface{}]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfUint64V(v map[interface{}]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfUintptrR(rv reflect.Value) { + fastpathTV.EncMapIntfUintptrV(rv.Interface().(map[interface{}]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfUintptrV(v map[interface{}]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfIntR(rv reflect.Value) { + fastpathTV.EncMapIntfIntV(rv.Interface().(map[interface{}]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfIntV(v map[interface{}]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfInt8R(rv reflect.Value) { + fastpathTV.EncMapIntfInt8V(rv.Interface().(map[interface{}]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfInt8V(v map[interface{}]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfInt16R(rv reflect.Value) { + fastpathTV.EncMapIntfInt16V(rv.Interface().(map[interface{}]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfInt16V(v map[interface{}]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfInt32R(rv reflect.Value) { + fastpathTV.EncMapIntfInt32V(rv.Interface().(map[interface{}]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfInt32V(v map[interface{}]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfInt64R(rv reflect.Value) { + fastpathTV.EncMapIntfInt64V(rv.Interface().(map[interface{}]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfInt64V(v map[interface{}]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfFloat32R(rv reflect.Value) { + fastpathTV.EncMapIntfFloat32V(rv.Interface().(map[interface{}]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfFloat32V(v map[interface{}]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfFloat64R(rv reflect.Value) { + fastpathTV.EncMapIntfFloat64V(rv.Interface().(map[interface{}]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfFloat64V(v map[interface{}]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfBoolR(rv reflect.Value) { + fastpathTV.EncMapIntfBoolV(rv.Interface().(map[interface{}]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfBoolV(v map[interface{}]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringIntfR(rv reflect.Value) { + fastpathTV.EncMapStringIntfV(rv.Interface().(map[string]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringIntfV(v map[string]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[string(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringStringR(rv reflect.Value) { + fastpathTV.EncMapStringStringV(rv.Interface().(map[string]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringStringV(v map[string]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[string(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringUintR(rv reflect.Value) { + fastpathTV.EncMapStringUintV(rv.Interface().(map[string]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringUintV(v map[string]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[string(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringUint8R(rv reflect.Value) { + fastpathTV.EncMapStringUint8V(rv.Interface().(map[string]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringUint8V(v map[string]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[string(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringUint16R(rv reflect.Value) { + fastpathTV.EncMapStringUint16V(rv.Interface().(map[string]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringUint16V(v map[string]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[string(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringUint32R(rv reflect.Value) { + fastpathTV.EncMapStringUint32V(rv.Interface().(map[string]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringUint32V(v map[string]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[string(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringUint64R(rv reflect.Value) { + fastpathTV.EncMapStringUint64V(rv.Interface().(map[string]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringUint64V(v map[string]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[string(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringUintptrR(rv reflect.Value) { + fastpathTV.EncMapStringUintptrV(rv.Interface().(map[string]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringUintptrV(v map[string]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[string(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringIntR(rv reflect.Value) { + fastpathTV.EncMapStringIntV(rv.Interface().(map[string]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringIntV(v map[string]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[string(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringInt8R(rv reflect.Value) { + fastpathTV.EncMapStringInt8V(rv.Interface().(map[string]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringInt8V(v map[string]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[string(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringInt16R(rv reflect.Value) { + fastpathTV.EncMapStringInt16V(rv.Interface().(map[string]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringInt16V(v map[string]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[string(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringInt32R(rv reflect.Value) { + fastpathTV.EncMapStringInt32V(rv.Interface().(map[string]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringInt32V(v map[string]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[string(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringInt64R(rv reflect.Value) { + fastpathTV.EncMapStringInt64V(rv.Interface().(map[string]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringInt64V(v map[string]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[string(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringFloat32R(rv reflect.Value) { + fastpathTV.EncMapStringFloat32V(rv.Interface().(map[string]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringFloat32V(v map[string]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[string(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringFloat64R(rv reflect.Value) { + fastpathTV.EncMapStringFloat64V(rv.Interface().(map[string]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringFloat64V(v map[string]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[string(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringBoolR(rv reflect.Value) { + fastpathTV.EncMapStringBoolV(rv.Interface().(map[string]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringBoolV(v map[string]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[string(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32IntfR(rv reflect.Value) { + fastpathTV.EncMapFloat32IntfV(rv.Interface().(map[float32]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32IntfV(v map[float32]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[float32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32StringR(rv reflect.Value) { + fastpathTV.EncMapFloat32StringV(rv.Interface().(map[float32]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32StringV(v map[float32]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[float32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32UintR(rv reflect.Value) { + fastpathTV.EncMapFloat32UintV(rv.Interface().(map[float32]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32UintV(v map[float32]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32Uint8R(rv reflect.Value) { + fastpathTV.EncMapFloat32Uint8V(rv.Interface().(map[float32]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Uint8V(v map[float32]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32Uint16R(rv reflect.Value) { + fastpathTV.EncMapFloat32Uint16V(rv.Interface().(map[float32]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Uint16V(v map[float32]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32Uint32R(rv reflect.Value) { + fastpathTV.EncMapFloat32Uint32V(rv.Interface().(map[float32]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Uint32V(v map[float32]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32Uint64R(rv reflect.Value) { + fastpathTV.EncMapFloat32Uint64V(rv.Interface().(map[float32]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Uint64V(v map[float32]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32UintptrR(rv reflect.Value) { + fastpathTV.EncMapFloat32UintptrV(rv.Interface().(map[float32]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32UintptrV(v map[float32]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[float32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32IntR(rv reflect.Value) { + fastpathTV.EncMapFloat32IntV(rv.Interface().(map[float32]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32IntV(v map[float32]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32Int8R(rv reflect.Value) { + fastpathTV.EncMapFloat32Int8V(rv.Interface().(map[float32]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Int8V(v map[float32]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32Int16R(rv reflect.Value) { + fastpathTV.EncMapFloat32Int16V(rv.Interface().(map[float32]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Int16V(v map[float32]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32Int32R(rv reflect.Value) { + fastpathTV.EncMapFloat32Int32V(rv.Interface().(map[float32]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Int32V(v map[float32]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32Int64R(rv reflect.Value) { + fastpathTV.EncMapFloat32Int64V(rv.Interface().(map[float32]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Int64V(v map[float32]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32Float32R(rv reflect.Value) { + fastpathTV.EncMapFloat32Float32V(rv.Interface().(map[float32]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Float32V(v map[float32]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[float32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32Float64R(rv reflect.Value) { + fastpathTV.EncMapFloat32Float64V(rv.Interface().(map[float32]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Float64V(v map[float32]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[float32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32BoolR(rv reflect.Value) { + fastpathTV.EncMapFloat32BoolV(rv.Interface().(map[float32]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32BoolV(v map[float32]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[float32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64IntfR(rv reflect.Value) { + fastpathTV.EncMapFloat64IntfV(rv.Interface().(map[float64]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64IntfV(v map[float64]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[float64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64StringR(rv reflect.Value) { + fastpathTV.EncMapFloat64StringV(rv.Interface().(map[float64]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64StringV(v map[float64]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[float64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64UintR(rv reflect.Value) { + fastpathTV.EncMapFloat64UintV(rv.Interface().(map[float64]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64UintV(v map[float64]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64Uint8R(rv reflect.Value) { + fastpathTV.EncMapFloat64Uint8V(rv.Interface().(map[float64]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Uint8V(v map[float64]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64Uint16R(rv reflect.Value) { + fastpathTV.EncMapFloat64Uint16V(rv.Interface().(map[float64]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Uint16V(v map[float64]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64Uint32R(rv reflect.Value) { + fastpathTV.EncMapFloat64Uint32V(rv.Interface().(map[float64]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Uint32V(v map[float64]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64Uint64R(rv reflect.Value) { + fastpathTV.EncMapFloat64Uint64V(rv.Interface().(map[float64]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Uint64V(v map[float64]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64UintptrR(rv reflect.Value) { + fastpathTV.EncMapFloat64UintptrV(rv.Interface().(map[float64]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64UintptrV(v map[float64]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[float64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64IntR(rv reflect.Value) { + fastpathTV.EncMapFloat64IntV(rv.Interface().(map[float64]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64IntV(v map[float64]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64Int8R(rv reflect.Value) { + fastpathTV.EncMapFloat64Int8V(rv.Interface().(map[float64]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Int8V(v map[float64]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64Int16R(rv reflect.Value) { + fastpathTV.EncMapFloat64Int16V(rv.Interface().(map[float64]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Int16V(v map[float64]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64Int32R(rv reflect.Value) { + fastpathTV.EncMapFloat64Int32V(rv.Interface().(map[float64]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Int32V(v map[float64]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64Int64R(rv reflect.Value) { + fastpathTV.EncMapFloat64Int64V(rv.Interface().(map[float64]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Int64V(v map[float64]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64Float32R(rv reflect.Value) { + fastpathTV.EncMapFloat64Float32V(rv.Interface().(map[float64]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Float32V(v map[float64]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[float64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64Float64R(rv reflect.Value) { + fastpathTV.EncMapFloat64Float64V(rv.Interface().(map[float64]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Float64V(v map[float64]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[float64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64BoolR(rv reflect.Value) { + fastpathTV.EncMapFloat64BoolV(rv.Interface().(map[float64]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64BoolV(v map[float64]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[float64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintIntfR(rv reflect.Value) { + fastpathTV.EncMapUintIntfV(rv.Interface().(map[uint]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintIntfV(v map[uint]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintStringR(rv reflect.Value) { + fastpathTV.EncMapUintStringV(rv.Interface().(map[uint]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintStringV(v map[uint]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[uint(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintUintR(rv reflect.Value) { + fastpathTV.EncMapUintUintV(rv.Interface().(map[uint]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintUintV(v map[uint]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintUint8R(rv reflect.Value) { + fastpathTV.EncMapUintUint8V(rv.Interface().(map[uint]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintUint8V(v map[uint]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintUint16R(rv reflect.Value) { + fastpathTV.EncMapUintUint16V(rv.Interface().(map[uint]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintUint16V(v map[uint]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintUint32R(rv reflect.Value) { + fastpathTV.EncMapUintUint32V(rv.Interface().(map[uint]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintUint32V(v map[uint]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintUint64R(rv reflect.Value) { + fastpathTV.EncMapUintUint64V(rv.Interface().(map[uint]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintUint64V(v map[uint]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintUintptrR(rv reflect.Value) { + fastpathTV.EncMapUintUintptrV(rv.Interface().(map[uint]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintUintptrV(v map[uint]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintIntR(rv reflect.Value) { + fastpathTV.EncMapUintIntV(rv.Interface().(map[uint]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintIntV(v map[uint]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintInt8R(rv reflect.Value) { + fastpathTV.EncMapUintInt8V(rv.Interface().(map[uint]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintInt8V(v map[uint]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintInt16R(rv reflect.Value) { + fastpathTV.EncMapUintInt16V(rv.Interface().(map[uint]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintInt16V(v map[uint]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintInt32R(rv reflect.Value) { + fastpathTV.EncMapUintInt32V(rv.Interface().(map[uint]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintInt32V(v map[uint]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintInt64R(rv reflect.Value) { + fastpathTV.EncMapUintInt64V(rv.Interface().(map[uint]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintInt64V(v map[uint]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintFloat32R(rv reflect.Value) { + fastpathTV.EncMapUintFloat32V(rv.Interface().(map[uint]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintFloat32V(v map[uint]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[uint(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintFloat64R(rv reflect.Value) { + fastpathTV.EncMapUintFloat64V(rv.Interface().(map[uint]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintFloat64V(v map[uint]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[uint(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintBoolR(rv reflect.Value) { + fastpathTV.EncMapUintBoolV(rv.Interface().(map[uint]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintBoolV(v map[uint]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[uint(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8IntfR(rv reflect.Value) { + fastpathTV.EncMapUint8IntfV(rv.Interface().(map[uint8]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8IntfV(v map[uint8]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8StringR(rv reflect.Value) { + fastpathTV.EncMapUint8StringV(rv.Interface().(map[uint8]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8StringV(v map[uint8]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[uint8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8UintR(rv reflect.Value) { + fastpathTV.EncMapUint8UintV(rv.Interface().(map[uint8]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8UintV(v map[uint8]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8Uint8R(rv reflect.Value) { + fastpathTV.EncMapUint8Uint8V(rv.Interface().(map[uint8]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Uint8V(v map[uint8]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8Uint16R(rv reflect.Value) { + fastpathTV.EncMapUint8Uint16V(rv.Interface().(map[uint8]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Uint16V(v map[uint8]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8Uint32R(rv reflect.Value) { + fastpathTV.EncMapUint8Uint32V(rv.Interface().(map[uint8]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Uint32V(v map[uint8]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8Uint64R(rv reflect.Value) { + fastpathTV.EncMapUint8Uint64V(rv.Interface().(map[uint8]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Uint64V(v map[uint8]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8UintptrR(rv reflect.Value) { + fastpathTV.EncMapUint8UintptrV(rv.Interface().(map[uint8]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8UintptrV(v map[uint8]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8IntR(rv reflect.Value) { + fastpathTV.EncMapUint8IntV(rv.Interface().(map[uint8]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8IntV(v map[uint8]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8Int8R(rv reflect.Value) { + fastpathTV.EncMapUint8Int8V(rv.Interface().(map[uint8]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Int8V(v map[uint8]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8Int16R(rv reflect.Value) { + fastpathTV.EncMapUint8Int16V(rv.Interface().(map[uint8]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Int16V(v map[uint8]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8Int32R(rv reflect.Value) { + fastpathTV.EncMapUint8Int32V(rv.Interface().(map[uint8]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Int32V(v map[uint8]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8Int64R(rv reflect.Value) { + fastpathTV.EncMapUint8Int64V(rv.Interface().(map[uint8]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Int64V(v map[uint8]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8Float32R(rv reflect.Value) { + fastpathTV.EncMapUint8Float32V(rv.Interface().(map[uint8]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Float32V(v map[uint8]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[uint8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8Float64R(rv reflect.Value) { + fastpathTV.EncMapUint8Float64V(rv.Interface().(map[uint8]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Float64V(v map[uint8]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[uint8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8BoolR(rv reflect.Value) { + fastpathTV.EncMapUint8BoolV(rv.Interface().(map[uint8]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8BoolV(v map[uint8]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[uint8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16IntfR(rv reflect.Value) { + fastpathTV.EncMapUint16IntfV(rv.Interface().(map[uint16]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16IntfV(v map[uint16]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16StringR(rv reflect.Value) { + fastpathTV.EncMapUint16StringV(rv.Interface().(map[uint16]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16StringV(v map[uint16]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[uint16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16UintR(rv reflect.Value) { + fastpathTV.EncMapUint16UintV(rv.Interface().(map[uint16]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16UintV(v map[uint16]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16Uint8R(rv reflect.Value) { + fastpathTV.EncMapUint16Uint8V(rv.Interface().(map[uint16]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Uint8V(v map[uint16]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16Uint16R(rv reflect.Value) { + fastpathTV.EncMapUint16Uint16V(rv.Interface().(map[uint16]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Uint16V(v map[uint16]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16Uint32R(rv reflect.Value) { + fastpathTV.EncMapUint16Uint32V(rv.Interface().(map[uint16]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Uint32V(v map[uint16]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16Uint64R(rv reflect.Value) { + fastpathTV.EncMapUint16Uint64V(rv.Interface().(map[uint16]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Uint64V(v map[uint16]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16UintptrR(rv reflect.Value) { + fastpathTV.EncMapUint16UintptrV(rv.Interface().(map[uint16]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16UintptrV(v map[uint16]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16IntR(rv reflect.Value) { + fastpathTV.EncMapUint16IntV(rv.Interface().(map[uint16]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16IntV(v map[uint16]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16Int8R(rv reflect.Value) { + fastpathTV.EncMapUint16Int8V(rv.Interface().(map[uint16]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Int8V(v map[uint16]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16Int16R(rv reflect.Value) { + fastpathTV.EncMapUint16Int16V(rv.Interface().(map[uint16]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Int16V(v map[uint16]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16Int32R(rv reflect.Value) { + fastpathTV.EncMapUint16Int32V(rv.Interface().(map[uint16]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Int32V(v map[uint16]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16Int64R(rv reflect.Value) { + fastpathTV.EncMapUint16Int64V(rv.Interface().(map[uint16]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Int64V(v map[uint16]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16Float32R(rv reflect.Value) { + fastpathTV.EncMapUint16Float32V(rv.Interface().(map[uint16]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Float32V(v map[uint16]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[uint16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16Float64R(rv reflect.Value) { + fastpathTV.EncMapUint16Float64V(rv.Interface().(map[uint16]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Float64V(v map[uint16]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[uint16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16BoolR(rv reflect.Value) { + fastpathTV.EncMapUint16BoolV(rv.Interface().(map[uint16]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16BoolV(v map[uint16]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[uint16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32IntfR(rv reflect.Value) { + fastpathTV.EncMapUint32IntfV(rv.Interface().(map[uint32]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32IntfV(v map[uint32]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32StringR(rv reflect.Value) { + fastpathTV.EncMapUint32StringV(rv.Interface().(map[uint32]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32StringV(v map[uint32]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[uint32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32UintR(rv reflect.Value) { + fastpathTV.EncMapUint32UintV(rv.Interface().(map[uint32]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32UintV(v map[uint32]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32Uint8R(rv reflect.Value) { + fastpathTV.EncMapUint32Uint8V(rv.Interface().(map[uint32]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Uint8V(v map[uint32]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32Uint16R(rv reflect.Value) { + fastpathTV.EncMapUint32Uint16V(rv.Interface().(map[uint32]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Uint16V(v map[uint32]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32Uint32R(rv reflect.Value) { + fastpathTV.EncMapUint32Uint32V(rv.Interface().(map[uint32]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Uint32V(v map[uint32]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32Uint64R(rv reflect.Value) { + fastpathTV.EncMapUint32Uint64V(rv.Interface().(map[uint32]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Uint64V(v map[uint32]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32UintptrR(rv reflect.Value) { + fastpathTV.EncMapUint32UintptrV(rv.Interface().(map[uint32]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32UintptrV(v map[uint32]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32IntR(rv reflect.Value) { + fastpathTV.EncMapUint32IntV(rv.Interface().(map[uint32]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32IntV(v map[uint32]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32Int8R(rv reflect.Value) { + fastpathTV.EncMapUint32Int8V(rv.Interface().(map[uint32]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Int8V(v map[uint32]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32Int16R(rv reflect.Value) { + fastpathTV.EncMapUint32Int16V(rv.Interface().(map[uint32]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Int16V(v map[uint32]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32Int32R(rv reflect.Value) { + fastpathTV.EncMapUint32Int32V(rv.Interface().(map[uint32]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Int32V(v map[uint32]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32Int64R(rv reflect.Value) { + fastpathTV.EncMapUint32Int64V(rv.Interface().(map[uint32]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Int64V(v map[uint32]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32Float32R(rv reflect.Value) { + fastpathTV.EncMapUint32Float32V(rv.Interface().(map[uint32]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Float32V(v map[uint32]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[uint32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32Float64R(rv reflect.Value) { + fastpathTV.EncMapUint32Float64V(rv.Interface().(map[uint32]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Float64V(v map[uint32]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[uint32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32BoolR(rv reflect.Value) { + fastpathTV.EncMapUint32BoolV(rv.Interface().(map[uint32]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32BoolV(v map[uint32]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[uint32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64IntfR(rv reflect.Value) { + fastpathTV.EncMapUint64IntfV(rv.Interface().(map[uint64]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64IntfV(v map[uint64]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64StringR(rv reflect.Value) { + fastpathTV.EncMapUint64StringV(rv.Interface().(map[uint64]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64StringV(v map[uint64]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[uint64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64UintR(rv reflect.Value) { + fastpathTV.EncMapUint64UintV(rv.Interface().(map[uint64]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64UintV(v map[uint64]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64Uint8R(rv reflect.Value) { + fastpathTV.EncMapUint64Uint8V(rv.Interface().(map[uint64]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Uint8V(v map[uint64]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64Uint16R(rv reflect.Value) { + fastpathTV.EncMapUint64Uint16V(rv.Interface().(map[uint64]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Uint16V(v map[uint64]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64Uint32R(rv reflect.Value) { + fastpathTV.EncMapUint64Uint32V(rv.Interface().(map[uint64]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Uint32V(v map[uint64]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64Uint64R(rv reflect.Value) { + fastpathTV.EncMapUint64Uint64V(rv.Interface().(map[uint64]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Uint64V(v map[uint64]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64UintptrR(rv reflect.Value) { + fastpathTV.EncMapUint64UintptrV(rv.Interface().(map[uint64]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64UintptrV(v map[uint64]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64IntR(rv reflect.Value) { + fastpathTV.EncMapUint64IntV(rv.Interface().(map[uint64]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64IntV(v map[uint64]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64Int8R(rv reflect.Value) { + fastpathTV.EncMapUint64Int8V(rv.Interface().(map[uint64]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Int8V(v map[uint64]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64Int16R(rv reflect.Value) { + fastpathTV.EncMapUint64Int16V(rv.Interface().(map[uint64]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Int16V(v map[uint64]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64Int32R(rv reflect.Value) { + fastpathTV.EncMapUint64Int32V(rv.Interface().(map[uint64]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Int32V(v map[uint64]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64Int64R(rv reflect.Value) { + fastpathTV.EncMapUint64Int64V(rv.Interface().(map[uint64]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Int64V(v map[uint64]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64Float32R(rv reflect.Value) { + fastpathTV.EncMapUint64Float32V(rv.Interface().(map[uint64]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Float32V(v map[uint64]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[uint64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64Float64R(rv reflect.Value) { + fastpathTV.EncMapUint64Float64V(rv.Interface().(map[uint64]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Float64V(v map[uint64]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[uint64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64BoolR(rv reflect.Value) { + fastpathTV.EncMapUint64BoolV(rv.Interface().(map[uint64]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64BoolV(v map[uint64]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[uint64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrIntfR(rv reflect.Value) { + fastpathTV.EncMapUintptrIntfV(rv.Interface().(map[uintptr]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrIntfV(v map[uintptr]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uintptr(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrStringR(rv reflect.Value) { + fastpathTV.EncMapUintptrStringV(rv.Interface().(map[uintptr]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrStringV(v map[uintptr]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[uintptr(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrUintR(rv reflect.Value) { + fastpathTV.EncMapUintptrUintV(rv.Interface().(map[uintptr]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrUintV(v map[uintptr]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrUint8R(rv reflect.Value) { + fastpathTV.EncMapUintptrUint8V(rv.Interface().(map[uintptr]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrUint8V(v map[uintptr]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrUint16R(rv reflect.Value) { + fastpathTV.EncMapUintptrUint16V(rv.Interface().(map[uintptr]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrUint16V(v map[uintptr]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrUint32R(rv reflect.Value) { + fastpathTV.EncMapUintptrUint32V(rv.Interface().(map[uintptr]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrUint32V(v map[uintptr]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrUint64R(rv reflect.Value) { + fastpathTV.EncMapUintptrUint64V(rv.Interface().(map[uintptr]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrUint64V(v map[uintptr]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrUintptrR(rv reflect.Value) { + fastpathTV.EncMapUintptrUintptrV(rv.Interface().(map[uintptr]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrUintptrV(v map[uintptr]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uintptr(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrIntR(rv reflect.Value) { + fastpathTV.EncMapUintptrIntV(rv.Interface().(map[uintptr]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrIntV(v map[uintptr]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrInt8R(rv reflect.Value) { + fastpathTV.EncMapUintptrInt8V(rv.Interface().(map[uintptr]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrInt8V(v map[uintptr]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrInt16R(rv reflect.Value) { + fastpathTV.EncMapUintptrInt16V(rv.Interface().(map[uintptr]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrInt16V(v map[uintptr]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrInt32R(rv reflect.Value) { + fastpathTV.EncMapUintptrInt32V(rv.Interface().(map[uintptr]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrInt32V(v map[uintptr]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrInt64R(rv reflect.Value) { + fastpathTV.EncMapUintptrInt64V(rv.Interface().(map[uintptr]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrInt64V(v map[uintptr]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrFloat32R(rv reflect.Value) { + fastpathTV.EncMapUintptrFloat32V(rv.Interface().(map[uintptr]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrFloat32V(v map[uintptr]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[uintptr(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrFloat64R(rv reflect.Value) { + fastpathTV.EncMapUintptrFloat64V(rv.Interface().(map[uintptr]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrFloat64V(v map[uintptr]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[uintptr(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrBoolR(rv reflect.Value) { + fastpathTV.EncMapUintptrBoolV(rv.Interface().(map[uintptr]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrBoolV(v map[uintptr]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[uintptr(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntIntfR(rv reflect.Value) { + fastpathTV.EncMapIntIntfV(rv.Interface().(map[int]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntIntfV(v map[int]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntStringR(rv reflect.Value) { + fastpathTV.EncMapIntStringV(rv.Interface().(map[int]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntStringV(v map[int]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[int(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntUintR(rv reflect.Value) { + fastpathTV.EncMapIntUintV(rv.Interface().(map[int]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntUintV(v map[int]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntUint8R(rv reflect.Value) { + fastpathTV.EncMapIntUint8V(rv.Interface().(map[int]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntUint8V(v map[int]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntUint16R(rv reflect.Value) { + fastpathTV.EncMapIntUint16V(rv.Interface().(map[int]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntUint16V(v map[int]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntUint32R(rv reflect.Value) { + fastpathTV.EncMapIntUint32V(rv.Interface().(map[int]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntUint32V(v map[int]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntUint64R(rv reflect.Value) { + fastpathTV.EncMapIntUint64V(rv.Interface().(map[int]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntUint64V(v map[int]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntUintptrR(rv reflect.Value) { + fastpathTV.EncMapIntUintptrV(rv.Interface().(map[int]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntUintptrV(v map[int]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntIntR(rv reflect.Value) { + fastpathTV.EncMapIntIntV(rv.Interface().(map[int]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntIntV(v map[int]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntInt8R(rv reflect.Value) { + fastpathTV.EncMapIntInt8V(rv.Interface().(map[int]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntInt8V(v map[int]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntInt16R(rv reflect.Value) { + fastpathTV.EncMapIntInt16V(rv.Interface().(map[int]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntInt16V(v map[int]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntInt32R(rv reflect.Value) { + fastpathTV.EncMapIntInt32V(rv.Interface().(map[int]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntInt32V(v map[int]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntInt64R(rv reflect.Value) { + fastpathTV.EncMapIntInt64V(rv.Interface().(map[int]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntInt64V(v map[int]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntFloat32R(rv reflect.Value) { + fastpathTV.EncMapIntFloat32V(rv.Interface().(map[int]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntFloat32V(v map[int]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[int(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntFloat64R(rv reflect.Value) { + fastpathTV.EncMapIntFloat64V(rv.Interface().(map[int]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntFloat64V(v map[int]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[int(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntBoolR(rv reflect.Value) { + fastpathTV.EncMapIntBoolV(rv.Interface().(map[int]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntBoolV(v map[int]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[int(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8IntfR(rv reflect.Value) { + fastpathTV.EncMapInt8IntfV(rv.Interface().(map[int8]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8IntfV(v map[int8]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8StringR(rv reflect.Value) { + fastpathTV.EncMapInt8StringV(rv.Interface().(map[int8]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8StringV(v map[int8]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[int8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8UintR(rv reflect.Value) { + fastpathTV.EncMapInt8UintV(rv.Interface().(map[int8]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8UintV(v map[int8]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8Uint8R(rv reflect.Value) { + fastpathTV.EncMapInt8Uint8V(rv.Interface().(map[int8]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Uint8V(v map[int8]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8Uint16R(rv reflect.Value) { + fastpathTV.EncMapInt8Uint16V(rv.Interface().(map[int8]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Uint16V(v map[int8]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8Uint32R(rv reflect.Value) { + fastpathTV.EncMapInt8Uint32V(rv.Interface().(map[int8]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Uint32V(v map[int8]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8Uint64R(rv reflect.Value) { + fastpathTV.EncMapInt8Uint64V(rv.Interface().(map[int8]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Uint64V(v map[int8]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8UintptrR(rv reflect.Value) { + fastpathTV.EncMapInt8UintptrV(rv.Interface().(map[int8]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8UintptrV(v map[int8]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8IntR(rv reflect.Value) { + fastpathTV.EncMapInt8IntV(rv.Interface().(map[int8]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8IntV(v map[int8]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8Int8R(rv reflect.Value) { + fastpathTV.EncMapInt8Int8V(rv.Interface().(map[int8]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Int8V(v map[int8]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8Int16R(rv reflect.Value) { + fastpathTV.EncMapInt8Int16V(rv.Interface().(map[int8]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Int16V(v map[int8]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8Int32R(rv reflect.Value) { + fastpathTV.EncMapInt8Int32V(rv.Interface().(map[int8]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Int32V(v map[int8]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8Int64R(rv reflect.Value) { + fastpathTV.EncMapInt8Int64V(rv.Interface().(map[int8]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Int64V(v map[int8]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8Float32R(rv reflect.Value) { + fastpathTV.EncMapInt8Float32V(rv.Interface().(map[int8]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Float32V(v map[int8]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[int8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8Float64R(rv reflect.Value) { + fastpathTV.EncMapInt8Float64V(rv.Interface().(map[int8]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Float64V(v map[int8]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[int8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8BoolR(rv reflect.Value) { + fastpathTV.EncMapInt8BoolV(rv.Interface().(map[int8]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8BoolV(v map[int8]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[int8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16IntfR(rv reflect.Value) { + fastpathTV.EncMapInt16IntfV(rv.Interface().(map[int16]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16IntfV(v map[int16]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16StringR(rv reflect.Value) { + fastpathTV.EncMapInt16StringV(rv.Interface().(map[int16]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16StringV(v map[int16]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[int16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16UintR(rv reflect.Value) { + fastpathTV.EncMapInt16UintV(rv.Interface().(map[int16]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16UintV(v map[int16]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16Uint8R(rv reflect.Value) { + fastpathTV.EncMapInt16Uint8V(rv.Interface().(map[int16]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Uint8V(v map[int16]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16Uint16R(rv reflect.Value) { + fastpathTV.EncMapInt16Uint16V(rv.Interface().(map[int16]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Uint16V(v map[int16]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16Uint32R(rv reflect.Value) { + fastpathTV.EncMapInt16Uint32V(rv.Interface().(map[int16]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Uint32V(v map[int16]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16Uint64R(rv reflect.Value) { + fastpathTV.EncMapInt16Uint64V(rv.Interface().(map[int16]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Uint64V(v map[int16]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16UintptrR(rv reflect.Value) { + fastpathTV.EncMapInt16UintptrV(rv.Interface().(map[int16]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16UintptrV(v map[int16]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16IntR(rv reflect.Value) { + fastpathTV.EncMapInt16IntV(rv.Interface().(map[int16]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16IntV(v map[int16]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16Int8R(rv reflect.Value) { + fastpathTV.EncMapInt16Int8V(rv.Interface().(map[int16]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Int8V(v map[int16]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16Int16R(rv reflect.Value) { + fastpathTV.EncMapInt16Int16V(rv.Interface().(map[int16]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Int16V(v map[int16]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16Int32R(rv reflect.Value) { + fastpathTV.EncMapInt16Int32V(rv.Interface().(map[int16]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Int32V(v map[int16]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16Int64R(rv reflect.Value) { + fastpathTV.EncMapInt16Int64V(rv.Interface().(map[int16]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Int64V(v map[int16]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16Float32R(rv reflect.Value) { + fastpathTV.EncMapInt16Float32V(rv.Interface().(map[int16]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Float32V(v map[int16]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[int16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16Float64R(rv reflect.Value) { + fastpathTV.EncMapInt16Float64V(rv.Interface().(map[int16]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Float64V(v map[int16]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[int16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16BoolR(rv reflect.Value) { + fastpathTV.EncMapInt16BoolV(rv.Interface().(map[int16]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16BoolV(v map[int16]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[int16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32IntfR(rv reflect.Value) { + fastpathTV.EncMapInt32IntfV(rv.Interface().(map[int32]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32IntfV(v map[int32]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32StringR(rv reflect.Value) { + fastpathTV.EncMapInt32StringV(rv.Interface().(map[int32]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32StringV(v map[int32]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[int32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32UintR(rv reflect.Value) { + fastpathTV.EncMapInt32UintV(rv.Interface().(map[int32]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32UintV(v map[int32]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32Uint8R(rv reflect.Value) { + fastpathTV.EncMapInt32Uint8V(rv.Interface().(map[int32]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Uint8V(v map[int32]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32Uint16R(rv reflect.Value) { + fastpathTV.EncMapInt32Uint16V(rv.Interface().(map[int32]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Uint16V(v map[int32]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32Uint32R(rv reflect.Value) { + fastpathTV.EncMapInt32Uint32V(rv.Interface().(map[int32]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Uint32V(v map[int32]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32Uint64R(rv reflect.Value) { + fastpathTV.EncMapInt32Uint64V(rv.Interface().(map[int32]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Uint64V(v map[int32]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32UintptrR(rv reflect.Value) { + fastpathTV.EncMapInt32UintptrV(rv.Interface().(map[int32]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32UintptrV(v map[int32]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32IntR(rv reflect.Value) { + fastpathTV.EncMapInt32IntV(rv.Interface().(map[int32]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32IntV(v map[int32]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32Int8R(rv reflect.Value) { + fastpathTV.EncMapInt32Int8V(rv.Interface().(map[int32]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Int8V(v map[int32]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32Int16R(rv reflect.Value) { + fastpathTV.EncMapInt32Int16V(rv.Interface().(map[int32]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Int16V(v map[int32]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32Int32R(rv reflect.Value) { + fastpathTV.EncMapInt32Int32V(rv.Interface().(map[int32]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Int32V(v map[int32]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32Int64R(rv reflect.Value) { + fastpathTV.EncMapInt32Int64V(rv.Interface().(map[int32]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Int64V(v map[int32]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32Float32R(rv reflect.Value) { + fastpathTV.EncMapInt32Float32V(rv.Interface().(map[int32]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Float32V(v map[int32]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[int32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32Float64R(rv reflect.Value) { + fastpathTV.EncMapInt32Float64V(rv.Interface().(map[int32]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Float64V(v map[int32]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[int32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32BoolR(rv reflect.Value) { + fastpathTV.EncMapInt32BoolV(rv.Interface().(map[int32]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32BoolV(v map[int32]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[int32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64IntfR(rv reflect.Value) { + fastpathTV.EncMapInt64IntfV(rv.Interface().(map[int64]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64IntfV(v map[int64]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64StringR(rv reflect.Value) { + fastpathTV.EncMapInt64StringV(rv.Interface().(map[int64]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64StringV(v map[int64]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[int64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64UintR(rv reflect.Value) { + fastpathTV.EncMapInt64UintV(rv.Interface().(map[int64]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64UintV(v map[int64]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64Uint8R(rv reflect.Value) { + fastpathTV.EncMapInt64Uint8V(rv.Interface().(map[int64]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Uint8V(v map[int64]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64Uint16R(rv reflect.Value) { + fastpathTV.EncMapInt64Uint16V(rv.Interface().(map[int64]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Uint16V(v map[int64]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64Uint32R(rv reflect.Value) { + fastpathTV.EncMapInt64Uint32V(rv.Interface().(map[int64]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Uint32V(v map[int64]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64Uint64R(rv reflect.Value) { + fastpathTV.EncMapInt64Uint64V(rv.Interface().(map[int64]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Uint64V(v map[int64]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64UintptrR(rv reflect.Value) { + fastpathTV.EncMapInt64UintptrV(rv.Interface().(map[int64]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64UintptrV(v map[int64]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64IntR(rv reflect.Value) { + fastpathTV.EncMapInt64IntV(rv.Interface().(map[int64]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64IntV(v map[int64]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64Int8R(rv reflect.Value) { + fastpathTV.EncMapInt64Int8V(rv.Interface().(map[int64]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Int8V(v map[int64]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64Int16R(rv reflect.Value) { + fastpathTV.EncMapInt64Int16V(rv.Interface().(map[int64]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Int16V(v map[int64]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64Int32R(rv reflect.Value) { + fastpathTV.EncMapInt64Int32V(rv.Interface().(map[int64]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Int32V(v map[int64]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64Int64R(rv reflect.Value) { + fastpathTV.EncMapInt64Int64V(rv.Interface().(map[int64]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Int64V(v map[int64]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64Float32R(rv reflect.Value) { + fastpathTV.EncMapInt64Float32V(rv.Interface().(map[int64]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Float32V(v map[int64]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[int64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64Float64R(rv reflect.Value) { + fastpathTV.EncMapInt64Float64V(rv.Interface().(map[int64]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Float64V(v map[int64]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[int64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64BoolR(rv reflect.Value) { + fastpathTV.EncMapInt64BoolV(rv.Interface().(map[int64]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64BoolV(v map[int64]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[int64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolIntfR(rv reflect.Value) { + fastpathTV.EncMapBoolIntfV(rv.Interface().(map[bool]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolIntfV(v map[bool]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[bool(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolStringR(rv reflect.Value) { + fastpathTV.EncMapBoolStringV(rv.Interface().(map[bool]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolStringV(v map[bool]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[bool(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolUintR(rv reflect.Value) { + fastpathTV.EncMapBoolUintV(rv.Interface().(map[bool]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolUintV(v map[bool]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[bool(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolUint8R(rv reflect.Value) { + fastpathTV.EncMapBoolUint8V(rv.Interface().(map[bool]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolUint8V(v map[bool]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[bool(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolUint16R(rv reflect.Value) { + fastpathTV.EncMapBoolUint16V(rv.Interface().(map[bool]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolUint16V(v map[bool]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[bool(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolUint32R(rv reflect.Value) { + fastpathTV.EncMapBoolUint32V(rv.Interface().(map[bool]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolUint32V(v map[bool]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[bool(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolUint64R(rv reflect.Value) { + fastpathTV.EncMapBoolUint64V(rv.Interface().(map[bool]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolUint64V(v map[bool]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[bool(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolUintptrR(rv reflect.Value) { + fastpathTV.EncMapBoolUintptrV(rv.Interface().(map[bool]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolUintptrV(v map[bool]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[bool(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolIntR(rv reflect.Value) { + fastpathTV.EncMapBoolIntV(rv.Interface().(map[bool]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolIntV(v map[bool]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[bool(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolInt8R(rv reflect.Value) { + fastpathTV.EncMapBoolInt8V(rv.Interface().(map[bool]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolInt8V(v map[bool]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[bool(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolInt16R(rv reflect.Value) { + fastpathTV.EncMapBoolInt16V(rv.Interface().(map[bool]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolInt16V(v map[bool]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[bool(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolInt32R(rv reflect.Value) { + fastpathTV.EncMapBoolInt32V(rv.Interface().(map[bool]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolInt32V(v map[bool]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[bool(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolInt64R(rv reflect.Value) { + fastpathTV.EncMapBoolInt64V(rv.Interface().(map[bool]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolInt64V(v map[bool]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[bool(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolFloat32R(rv reflect.Value) { + fastpathTV.EncMapBoolFloat32V(rv.Interface().(map[bool]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolFloat32V(v map[bool]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[bool(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolFloat64R(rv reflect.Value) { + fastpathTV.EncMapBoolFloat64V(rv.Interface().(map[bool]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolFloat64V(v map[bool]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[bool(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolBoolR(rv reflect.Value) { + fastpathTV.EncMapBoolBoolV(rv.Interface().(map[bool]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolBoolV(v map[bool]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[bool(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +// -- decode + +// -- -- fast path type switch +func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { + if !fastpathEnabled { + return false + } + switch v := iv.(type) { + + case []interface{}: + fastpathTV.DecSliceIntfV(v, fastpathCheckNilFalse, false, d) + case *[]interface{}: + v2, changed2 := fastpathTV.DecSliceIntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]interface{}: + fastpathTV.DecMapIntfIntfV(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]interface{}: + v2, changed2 := fastpathTV.DecMapIntfIntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]string: + fastpathTV.DecMapIntfStringV(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]string: + v2, changed2 := fastpathTV.DecMapIntfStringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]uint: + fastpathTV.DecMapIntfUintV(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]uint: + v2, changed2 := fastpathTV.DecMapIntfUintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]uint8: + fastpathTV.DecMapIntfUint8V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]uint8: + v2, changed2 := fastpathTV.DecMapIntfUint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]uint16: + fastpathTV.DecMapIntfUint16V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]uint16: + v2, changed2 := fastpathTV.DecMapIntfUint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]uint32: + fastpathTV.DecMapIntfUint32V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]uint32: + v2, changed2 := fastpathTV.DecMapIntfUint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]uint64: + fastpathTV.DecMapIntfUint64V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]uint64: + v2, changed2 := fastpathTV.DecMapIntfUint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]uintptr: + fastpathTV.DecMapIntfUintptrV(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]uintptr: + v2, changed2 := fastpathTV.DecMapIntfUintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]int: + fastpathTV.DecMapIntfIntV(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]int: + v2, changed2 := fastpathTV.DecMapIntfIntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]int8: + fastpathTV.DecMapIntfInt8V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]int8: + v2, changed2 := fastpathTV.DecMapIntfInt8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]int16: + fastpathTV.DecMapIntfInt16V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]int16: + v2, changed2 := fastpathTV.DecMapIntfInt16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]int32: + fastpathTV.DecMapIntfInt32V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]int32: + v2, changed2 := fastpathTV.DecMapIntfInt32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]int64: + fastpathTV.DecMapIntfInt64V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]int64: + v2, changed2 := fastpathTV.DecMapIntfInt64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]float32: + fastpathTV.DecMapIntfFloat32V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]float32: + v2, changed2 := fastpathTV.DecMapIntfFloat32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]float64: + fastpathTV.DecMapIntfFloat64V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]float64: + v2, changed2 := fastpathTV.DecMapIntfFloat64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]bool: + fastpathTV.DecMapIntfBoolV(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]bool: + v2, changed2 := fastpathTV.DecMapIntfBoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []string: + fastpathTV.DecSliceStringV(v, fastpathCheckNilFalse, false, d) + case *[]string: + v2, changed2 := fastpathTV.DecSliceStringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]interface{}: + fastpathTV.DecMapStringIntfV(v, fastpathCheckNilFalse, false, d) + case *map[string]interface{}: + v2, changed2 := fastpathTV.DecMapStringIntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]string: + fastpathTV.DecMapStringStringV(v, fastpathCheckNilFalse, false, d) + case *map[string]string: + v2, changed2 := fastpathTV.DecMapStringStringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]uint: + fastpathTV.DecMapStringUintV(v, fastpathCheckNilFalse, false, d) + case *map[string]uint: + v2, changed2 := fastpathTV.DecMapStringUintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]uint8: + fastpathTV.DecMapStringUint8V(v, fastpathCheckNilFalse, false, d) + case *map[string]uint8: + v2, changed2 := fastpathTV.DecMapStringUint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]uint16: + fastpathTV.DecMapStringUint16V(v, fastpathCheckNilFalse, false, d) + case *map[string]uint16: + v2, changed2 := fastpathTV.DecMapStringUint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]uint32: + fastpathTV.DecMapStringUint32V(v, fastpathCheckNilFalse, false, d) + case *map[string]uint32: + v2, changed2 := fastpathTV.DecMapStringUint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]uint64: + fastpathTV.DecMapStringUint64V(v, fastpathCheckNilFalse, false, d) + case *map[string]uint64: + v2, changed2 := fastpathTV.DecMapStringUint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]uintptr: + fastpathTV.DecMapStringUintptrV(v, fastpathCheckNilFalse, false, d) + case *map[string]uintptr: + v2, changed2 := fastpathTV.DecMapStringUintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]int: + fastpathTV.DecMapStringIntV(v, fastpathCheckNilFalse, false, d) + case *map[string]int: + v2, changed2 := fastpathTV.DecMapStringIntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]int8: + fastpathTV.DecMapStringInt8V(v, fastpathCheckNilFalse, false, d) + case *map[string]int8: + v2, changed2 := fastpathTV.DecMapStringInt8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]int16: + fastpathTV.DecMapStringInt16V(v, fastpathCheckNilFalse, false, d) + case *map[string]int16: + v2, changed2 := fastpathTV.DecMapStringInt16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]int32: + fastpathTV.DecMapStringInt32V(v, fastpathCheckNilFalse, false, d) + case *map[string]int32: + v2, changed2 := fastpathTV.DecMapStringInt32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]int64: + fastpathTV.DecMapStringInt64V(v, fastpathCheckNilFalse, false, d) + case *map[string]int64: + v2, changed2 := fastpathTV.DecMapStringInt64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]float32: + fastpathTV.DecMapStringFloat32V(v, fastpathCheckNilFalse, false, d) + case *map[string]float32: + v2, changed2 := fastpathTV.DecMapStringFloat32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]float64: + fastpathTV.DecMapStringFloat64V(v, fastpathCheckNilFalse, false, d) + case *map[string]float64: + v2, changed2 := fastpathTV.DecMapStringFloat64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]bool: + fastpathTV.DecMapStringBoolV(v, fastpathCheckNilFalse, false, d) + case *map[string]bool: + v2, changed2 := fastpathTV.DecMapStringBoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []float32: + fastpathTV.DecSliceFloat32V(v, fastpathCheckNilFalse, false, d) + case *[]float32: + v2, changed2 := fastpathTV.DecSliceFloat32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]interface{}: + fastpathTV.DecMapFloat32IntfV(v, fastpathCheckNilFalse, false, d) + case *map[float32]interface{}: + v2, changed2 := fastpathTV.DecMapFloat32IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]string: + fastpathTV.DecMapFloat32StringV(v, fastpathCheckNilFalse, false, d) + case *map[float32]string: + v2, changed2 := fastpathTV.DecMapFloat32StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]uint: + fastpathTV.DecMapFloat32UintV(v, fastpathCheckNilFalse, false, d) + case *map[float32]uint: + v2, changed2 := fastpathTV.DecMapFloat32UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]uint8: + fastpathTV.DecMapFloat32Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[float32]uint8: + v2, changed2 := fastpathTV.DecMapFloat32Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]uint16: + fastpathTV.DecMapFloat32Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[float32]uint16: + v2, changed2 := fastpathTV.DecMapFloat32Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]uint32: + fastpathTV.DecMapFloat32Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[float32]uint32: + v2, changed2 := fastpathTV.DecMapFloat32Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]uint64: + fastpathTV.DecMapFloat32Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[float32]uint64: + v2, changed2 := fastpathTV.DecMapFloat32Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]uintptr: + fastpathTV.DecMapFloat32UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[float32]uintptr: + v2, changed2 := fastpathTV.DecMapFloat32UintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]int: + fastpathTV.DecMapFloat32IntV(v, fastpathCheckNilFalse, false, d) + case *map[float32]int: + v2, changed2 := fastpathTV.DecMapFloat32IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]int8: + fastpathTV.DecMapFloat32Int8V(v, fastpathCheckNilFalse, false, d) + case *map[float32]int8: + v2, changed2 := fastpathTV.DecMapFloat32Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]int16: + fastpathTV.DecMapFloat32Int16V(v, fastpathCheckNilFalse, false, d) + case *map[float32]int16: + v2, changed2 := fastpathTV.DecMapFloat32Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]int32: + fastpathTV.DecMapFloat32Int32V(v, fastpathCheckNilFalse, false, d) + case *map[float32]int32: + v2, changed2 := fastpathTV.DecMapFloat32Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]int64: + fastpathTV.DecMapFloat32Int64V(v, fastpathCheckNilFalse, false, d) + case *map[float32]int64: + v2, changed2 := fastpathTV.DecMapFloat32Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]float32: + fastpathTV.DecMapFloat32Float32V(v, fastpathCheckNilFalse, false, d) + case *map[float32]float32: + v2, changed2 := fastpathTV.DecMapFloat32Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]float64: + fastpathTV.DecMapFloat32Float64V(v, fastpathCheckNilFalse, false, d) + case *map[float32]float64: + v2, changed2 := fastpathTV.DecMapFloat32Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]bool: + fastpathTV.DecMapFloat32BoolV(v, fastpathCheckNilFalse, false, d) + case *map[float32]bool: + v2, changed2 := fastpathTV.DecMapFloat32BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []float64: + fastpathTV.DecSliceFloat64V(v, fastpathCheckNilFalse, false, d) + case *[]float64: + v2, changed2 := fastpathTV.DecSliceFloat64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]interface{}: + fastpathTV.DecMapFloat64IntfV(v, fastpathCheckNilFalse, false, d) + case *map[float64]interface{}: + v2, changed2 := fastpathTV.DecMapFloat64IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]string: + fastpathTV.DecMapFloat64StringV(v, fastpathCheckNilFalse, false, d) + case *map[float64]string: + v2, changed2 := fastpathTV.DecMapFloat64StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]uint: + fastpathTV.DecMapFloat64UintV(v, fastpathCheckNilFalse, false, d) + case *map[float64]uint: + v2, changed2 := fastpathTV.DecMapFloat64UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]uint8: + fastpathTV.DecMapFloat64Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[float64]uint8: + v2, changed2 := fastpathTV.DecMapFloat64Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]uint16: + fastpathTV.DecMapFloat64Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[float64]uint16: + v2, changed2 := fastpathTV.DecMapFloat64Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]uint32: + fastpathTV.DecMapFloat64Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[float64]uint32: + v2, changed2 := fastpathTV.DecMapFloat64Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]uint64: + fastpathTV.DecMapFloat64Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[float64]uint64: + v2, changed2 := fastpathTV.DecMapFloat64Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]uintptr: + fastpathTV.DecMapFloat64UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[float64]uintptr: + v2, changed2 := fastpathTV.DecMapFloat64UintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]int: + fastpathTV.DecMapFloat64IntV(v, fastpathCheckNilFalse, false, d) + case *map[float64]int: + v2, changed2 := fastpathTV.DecMapFloat64IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]int8: + fastpathTV.DecMapFloat64Int8V(v, fastpathCheckNilFalse, false, d) + case *map[float64]int8: + v2, changed2 := fastpathTV.DecMapFloat64Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]int16: + fastpathTV.DecMapFloat64Int16V(v, fastpathCheckNilFalse, false, d) + case *map[float64]int16: + v2, changed2 := fastpathTV.DecMapFloat64Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]int32: + fastpathTV.DecMapFloat64Int32V(v, fastpathCheckNilFalse, false, d) + case *map[float64]int32: + v2, changed2 := fastpathTV.DecMapFloat64Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]int64: + fastpathTV.DecMapFloat64Int64V(v, fastpathCheckNilFalse, false, d) + case *map[float64]int64: + v2, changed2 := fastpathTV.DecMapFloat64Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]float32: + fastpathTV.DecMapFloat64Float32V(v, fastpathCheckNilFalse, false, d) + case *map[float64]float32: + v2, changed2 := fastpathTV.DecMapFloat64Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]float64: + fastpathTV.DecMapFloat64Float64V(v, fastpathCheckNilFalse, false, d) + case *map[float64]float64: + v2, changed2 := fastpathTV.DecMapFloat64Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]bool: + fastpathTV.DecMapFloat64BoolV(v, fastpathCheckNilFalse, false, d) + case *map[float64]bool: + v2, changed2 := fastpathTV.DecMapFloat64BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []uint: + fastpathTV.DecSliceUintV(v, fastpathCheckNilFalse, false, d) + case *[]uint: + v2, changed2 := fastpathTV.DecSliceUintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]interface{}: + fastpathTV.DecMapUintIntfV(v, fastpathCheckNilFalse, false, d) + case *map[uint]interface{}: + v2, changed2 := fastpathTV.DecMapUintIntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]string: + fastpathTV.DecMapUintStringV(v, fastpathCheckNilFalse, false, d) + case *map[uint]string: + v2, changed2 := fastpathTV.DecMapUintStringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]uint: + fastpathTV.DecMapUintUintV(v, fastpathCheckNilFalse, false, d) + case *map[uint]uint: + v2, changed2 := fastpathTV.DecMapUintUintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]uint8: + fastpathTV.DecMapUintUint8V(v, fastpathCheckNilFalse, false, d) + case *map[uint]uint8: + v2, changed2 := fastpathTV.DecMapUintUint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]uint16: + fastpathTV.DecMapUintUint16V(v, fastpathCheckNilFalse, false, d) + case *map[uint]uint16: + v2, changed2 := fastpathTV.DecMapUintUint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]uint32: + fastpathTV.DecMapUintUint32V(v, fastpathCheckNilFalse, false, d) + case *map[uint]uint32: + v2, changed2 := fastpathTV.DecMapUintUint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]uint64: + fastpathTV.DecMapUintUint64V(v, fastpathCheckNilFalse, false, d) + case *map[uint]uint64: + v2, changed2 := fastpathTV.DecMapUintUint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]uintptr: + fastpathTV.DecMapUintUintptrV(v, fastpathCheckNilFalse, false, d) + case *map[uint]uintptr: + v2, changed2 := fastpathTV.DecMapUintUintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]int: + fastpathTV.DecMapUintIntV(v, fastpathCheckNilFalse, false, d) + case *map[uint]int: + v2, changed2 := fastpathTV.DecMapUintIntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]int8: + fastpathTV.DecMapUintInt8V(v, fastpathCheckNilFalse, false, d) + case *map[uint]int8: + v2, changed2 := fastpathTV.DecMapUintInt8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]int16: + fastpathTV.DecMapUintInt16V(v, fastpathCheckNilFalse, false, d) + case *map[uint]int16: + v2, changed2 := fastpathTV.DecMapUintInt16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]int32: + fastpathTV.DecMapUintInt32V(v, fastpathCheckNilFalse, false, d) + case *map[uint]int32: + v2, changed2 := fastpathTV.DecMapUintInt32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]int64: + fastpathTV.DecMapUintInt64V(v, fastpathCheckNilFalse, false, d) + case *map[uint]int64: + v2, changed2 := fastpathTV.DecMapUintInt64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]float32: + fastpathTV.DecMapUintFloat32V(v, fastpathCheckNilFalse, false, d) + case *map[uint]float32: + v2, changed2 := fastpathTV.DecMapUintFloat32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]float64: + fastpathTV.DecMapUintFloat64V(v, fastpathCheckNilFalse, false, d) + case *map[uint]float64: + v2, changed2 := fastpathTV.DecMapUintFloat64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]bool: + fastpathTV.DecMapUintBoolV(v, fastpathCheckNilFalse, false, d) + case *map[uint]bool: + v2, changed2 := fastpathTV.DecMapUintBoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]interface{}: + fastpathTV.DecMapUint8IntfV(v, fastpathCheckNilFalse, false, d) + case *map[uint8]interface{}: + v2, changed2 := fastpathTV.DecMapUint8IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]string: + fastpathTV.DecMapUint8StringV(v, fastpathCheckNilFalse, false, d) + case *map[uint8]string: + v2, changed2 := fastpathTV.DecMapUint8StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]uint: + fastpathTV.DecMapUint8UintV(v, fastpathCheckNilFalse, false, d) + case *map[uint8]uint: + v2, changed2 := fastpathTV.DecMapUint8UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]uint8: + fastpathTV.DecMapUint8Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]uint8: + v2, changed2 := fastpathTV.DecMapUint8Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]uint16: + fastpathTV.DecMapUint8Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]uint16: + v2, changed2 := fastpathTV.DecMapUint8Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]uint32: + fastpathTV.DecMapUint8Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]uint32: + v2, changed2 := fastpathTV.DecMapUint8Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]uint64: + fastpathTV.DecMapUint8Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]uint64: + v2, changed2 := fastpathTV.DecMapUint8Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]uintptr: + fastpathTV.DecMapUint8UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[uint8]uintptr: + v2, changed2 := fastpathTV.DecMapUint8UintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]int: + fastpathTV.DecMapUint8IntV(v, fastpathCheckNilFalse, false, d) + case *map[uint8]int: + v2, changed2 := fastpathTV.DecMapUint8IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]int8: + fastpathTV.DecMapUint8Int8V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]int8: + v2, changed2 := fastpathTV.DecMapUint8Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]int16: + fastpathTV.DecMapUint8Int16V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]int16: + v2, changed2 := fastpathTV.DecMapUint8Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]int32: + fastpathTV.DecMapUint8Int32V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]int32: + v2, changed2 := fastpathTV.DecMapUint8Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]int64: + fastpathTV.DecMapUint8Int64V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]int64: + v2, changed2 := fastpathTV.DecMapUint8Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]float32: + fastpathTV.DecMapUint8Float32V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]float32: + v2, changed2 := fastpathTV.DecMapUint8Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]float64: + fastpathTV.DecMapUint8Float64V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]float64: + v2, changed2 := fastpathTV.DecMapUint8Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]bool: + fastpathTV.DecMapUint8BoolV(v, fastpathCheckNilFalse, false, d) + case *map[uint8]bool: + v2, changed2 := fastpathTV.DecMapUint8BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []uint16: + fastpathTV.DecSliceUint16V(v, fastpathCheckNilFalse, false, d) + case *[]uint16: + v2, changed2 := fastpathTV.DecSliceUint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]interface{}: + fastpathTV.DecMapUint16IntfV(v, fastpathCheckNilFalse, false, d) + case *map[uint16]interface{}: + v2, changed2 := fastpathTV.DecMapUint16IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]string: + fastpathTV.DecMapUint16StringV(v, fastpathCheckNilFalse, false, d) + case *map[uint16]string: + v2, changed2 := fastpathTV.DecMapUint16StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]uint: + fastpathTV.DecMapUint16UintV(v, fastpathCheckNilFalse, false, d) + case *map[uint16]uint: + v2, changed2 := fastpathTV.DecMapUint16UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]uint8: + fastpathTV.DecMapUint16Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]uint8: + v2, changed2 := fastpathTV.DecMapUint16Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]uint16: + fastpathTV.DecMapUint16Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]uint16: + v2, changed2 := fastpathTV.DecMapUint16Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]uint32: + fastpathTV.DecMapUint16Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]uint32: + v2, changed2 := fastpathTV.DecMapUint16Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]uint64: + fastpathTV.DecMapUint16Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]uint64: + v2, changed2 := fastpathTV.DecMapUint16Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]uintptr: + fastpathTV.DecMapUint16UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[uint16]uintptr: + v2, changed2 := fastpathTV.DecMapUint16UintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]int: + fastpathTV.DecMapUint16IntV(v, fastpathCheckNilFalse, false, d) + case *map[uint16]int: + v2, changed2 := fastpathTV.DecMapUint16IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]int8: + fastpathTV.DecMapUint16Int8V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]int8: + v2, changed2 := fastpathTV.DecMapUint16Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]int16: + fastpathTV.DecMapUint16Int16V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]int16: + v2, changed2 := fastpathTV.DecMapUint16Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]int32: + fastpathTV.DecMapUint16Int32V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]int32: + v2, changed2 := fastpathTV.DecMapUint16Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]int64: + fastpathTV.DecMapUint16Int64V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]int64: + v2, changed2 := fastpathTV.DecMapUint16Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]float32: + fastpathTV.DecMapUint16Float32V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]float32: + v2, changed2 := fastpathTV.DecMapUint16Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]float64: + fastpathTV.DecMapUint16Float64V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]float64: + v2, changed2 := fastpathTV.DecMapUint16Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]bool: + fastpathTV.DecMapUint16BoolV(v, fastpathCheckNilFalse, false, d) + case *map[uint16]bool: + v2, changed2 := fastpathTV.DecMapUint16BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []uint32: + fastpathTV.DecSliceUint32V(v, fastpathCheckNilFalse, false, d) + case *[]uint32: + v2, changed2 := fastpathTV.DecSliceUint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]interface{}: + fastpathTV.DecMapUint32IntfV(v, fastpathCheckNilFalse, false, d) + case *map[uint32]interface{}: + v2, changed2 := fastpathTV.DecMapUint32IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]string: + fastpathTV.DecMapUint32StringV(v, fastpathCheckNilFalse, false, d) + case *map[uint32]string: + v2, changed2 := fastpathTV.DecMapUint32StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]uint: + fastpathTV.DecMapUint32UintV(v, fastpathCheckNilFalse, false, d) + case *map[uint32]uint: + v2, changed2 := fastpathTV.DecMapUint32UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]uint8: + fastpathTV.DecMapUint32Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]uint8: + v2, changed2 := fastpathTV.DecMapUint32Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]uint16: + fastpathTV.DecMapUint32Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]uint16: + v2, changed2 := fastpathTV.DecMapUint32Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]uint32: + fastpathTV.DecMapUint32Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]uint32: + v2, changed2 := fastpathTV.DecMapUint32Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]uint64: + fastpathTV.DecMapUint32Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]uint64: + v2, changed2 := fastpathTV.DecMapUint32Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]uintptr: + fastpathTV.DecMapUint32UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[uint32]uintptr: + v2, changed2 := fastpathTV.DecMapUint32UintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]int: + fastpathTV.DecMapUint32IntV(v, fastpathCheckNilFalse, false, d) + case *map[uint32]int: + v2, changed2 := fastpathTV.DecMapUint32IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]int8: + fastpathTV.DecMapUint32Int8V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]int8: + v2, changed2 := fastpathTV.DecMapUint32Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]int16: + fastpathTV.DecMapUint32Int16V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]int16: + v2, changed2 := fastpathTV.DecMapUint32Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]int32: + fastpathTV.DecMapUint32Int32V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]int32: + v2, changed2 := fastpathTV.DecMapUint32Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]int64: + fastpathTV.DecMapUint32Int64V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]int64: + v2, changed2 := fastpathTV.DecMapUint32Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]float32: + fastpathTV.DecMapUint32Float32V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]float32: + v2, changed2 := fastpathTV.DecMapUint32Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]float64: + fastpathTV.DecMapUint32Float64V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]float64: + v2, changed2 := fastpathTV.DecMapUint32Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]bool: + fastpathTV.DecMapUint32BoolV(v, fastpathCheckNilFalse, false, d) + case *map[uint32]bool: + v2, changed2 := fastpathTV.DecMapUint32BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []uint64: + fastpathTV.DecSliceUint64V(v, fastpathCheckNilFalse, false, d) + case *[]uint64: + v2, changed2 := fastpathTV.DecSliceUint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]interface{}: + fastpathTV.DecMapUint64IntfV(v, fastpathCheckNilFalse, false, d) + case *map[uint64]interface{}: + v2, changed2 := fastpathTV.DecMapUint64IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]string: + fastpathTV.DecMapUint64StringV(v, fastpathCheckNilFalse, false, d) + case *map[uint64]string: + v2, changed2 := fastpathTV.DecMapUint64StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]uint: + fastpathTV.DecMapUint64UintV(v, fastpathCheckNilFalse, false, d) + case *map[uint64]uint: + v2, changed2 := fastpathTV.DecMapUint64UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]uint8: + fastpathTV.DecMapUint64Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]uint8: + v2, changed2 := fastpathTV.DecMapUint64Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]uint16: + fastpathTV.DecMapUint64Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]uint16: + v2, changed2 := fastpathTV.DecMapUint64Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]uint32: + fastpathTV.DecMapUint64Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]uint32: + v2, changed2 := fastpathTV.DecMapUint64Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]uint64: + fastpathTV.DecMapUint64Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]uint64: + v2, changed2 := fastpathTV.DecMapUint64Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]uintptr: + fastpathTV.DecMapUint64UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[uint64]uintptr: + v2, changed2 := fastpathTV.DecMapUint64UintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]int: + fastpathTV.DecMapUint64IntV(v, fastpathCheckNilFalse, false, d) + case *map[uint64]int: + v2, changed2 := fastpathTV.DecMapUint64IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]int8: + fastpathTV.DecMapUint64Int8V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]int8: + v2, changed2 := fastpathTV.DecMapUint64Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]int16: + fastpathTV.DecMapUint64Int16V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]int16: + v2, changed2 := fastpathTV.DecMapUint64Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]int32: + fastpathTV.DecMapUint64Int32V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]int32: + v2, changed2 := fastpathTV.DecMapUint64Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]int64: + fastpathTV.DecMapUint64Int64V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]int64: + v2, changed2 := fastpathTV.DecMapUint64Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]float32: + fastpathTV.DecMapUint64Float32V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]float32: + v2, changed2 := fastpathTV.DecMapUint64Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]float64: + fastpathTV.DecMapUint64Float64V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]float64: + v2, changed2 := fastpathTV.DecMapUint64Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]bool: + fastpathTV.DecMapUint64BoolV(v, fastpathCheckNilFalse, false, d) + case *map[uint64]bool: + v2, changed2 := fastpathTV.DecMapUint64BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []uintptr: + fastpathTV.DecSliceUintptrV(v, fastpathCheckNilFalse, false, d) + case *[]uintptr: + v2, changed2 := fastpathTV.DecSliceUintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]interface{}: + fastpathTV.DecMapUintptrIntfV(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]interface{}: + v2, changed2 := fastpathTV.DecMapUintptrIntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]string: + fastpathTV.DecMapUintptrStringV(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]string: + v2, changed2 := fastpathTV.DecMapUintptrStringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]uint: + fastpathTV.DecMapUintptrUintV(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]uint: + v2, changed2 := fastpathTV.DecMapUintptrUintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]uint8: + fastpathTV.DecMapUintptrUint8V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]uint8: + v2, changed2 := fastpathTV.DecMapUintptrUint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]uint16: + fastpathTV.DecMapUintptrUint16V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]uint16: + v2, changed2 := fastpathTV.DecMapUintptrUint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]uint32: + fastpathTV.DecMapUintptrUint32V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]uint32: + v2, changed2 := fastpathTV.DecMapUintptrUint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]uint64: + fastpathTV.DecMapUintptrUint64V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]uint64: + v2, changed2 := fastpathTV.DecMapUintptrUint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]uintptr: + fastpathTV.DecMapUintptrUintptrV(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]uintptr: + v2, changed2 := fastpathTV.DecMapUintptrUintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]int: + fastpathTV.DecMapUintptrIntV(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]int: + v2, changed2 := fastpathTV.DecMapUintptrIntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]int8: + fastpathTV.DecMapUintptrInt8V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]int8: + v2, changed2 := fastpathTV.DecMapUintptrInt8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]int16: + fastpathTV.DecMapUintptrInt16V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]int16: + v2, changed2 := fastpathTV.DecMapUintptrInt16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]int32: + fastpathTV.DecMapUintptrInt32V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]int32: + v2, changed2 := fastpathTV.DecMapUintptrInt32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]int64: + fastpathTV.DecMapUintptrInt64V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]int64: + v2, changed2 := fastpathTV.DecMapUintptrInt64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]float32: + fastpathTV.DecMapUintptrFloat32V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]float32: + v2, changed2 := fastpathTV.DecMapUintptrFloat32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]float64: + fastpathTV.DecMapUintptrFloat64V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]float64: + v2, changed2 := fastpathTV.DecMapUintptrFloat64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]bool: + fastpathTV.DecMapUintptrBoolV(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]bool: + v2, changed2 := fastpathTV.DecMapUintptrBoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []int: + fastpathTV.DecSliceIntV(v, fastpathCheckNilFalse, false, d) + case *[]int: + v2, changed2 := fastpathTV.DecSliceIntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]interface{}: + fastpathTV.DecMapIntIntfV(v, fastpathCheckNilFalse, false, d) + case *map[int]interface{}: + v2, changed2 := fastpathTV.DecMapIntIntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]string: + fastpathTV.DecMapIntStringV(v, fastpathCheckNilFalse, false, d) + case *map[int]string: + v2, changed2 := fastpathTV.DecMapIntStringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]uint: + fastpathTV.DecMapIntUintV(v, fastpathCheckNilFalse, false, d) + case *map[int]uint: + v2, changed2 := fastpathTV.DecMapIntUintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]uint8: + fastpathTV.DecMapIntUint8V(v, fastpathCheckNilFalse, false, d) + case *map[int]uint8: + v2, changed2 := fastpathTV.DecMapIntUint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]uint16: + fastpathTV.DecMapIntUint16V(v, fastpathCheckNilFalse, false, d) + case *map[int]uint16: + v2, changed2 := fastpathTV.DecMapIntUint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]uint32: + fastpathTV.DecMapIntUint32V(v, fastpathCheckNilFalse, false, d) + case *map[int]uint32: + v2, changed2 := fastpathTV.DecMapIntUint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]uint64: + fastpathTV.DecMapIntUint64V(v, fastpathCheckNilFalse, false, d) + case *map[int]uint64: + v2, changed2 := fastpathTV.DecMapIntUint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]uintptr: + fastpathTV.DecMapIntUintptrV(v, fastpathCheckNilFalse, false, d) + case *map[int]uintptr: + v2, changed2 := fastpathTV.DecMapIntUintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]int: + fastpathTV.DecMapIntIntV(v, fastpathCheckNilFalse, false, d) + case *map[int]int: + v2, changed2 := fastpathTV.DecMapIntIntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]int8: + fastpathTV.DecMapIntInt8V(v, fastpathCheckNilFalse, false, d) + case *map[int]int8: + v2, changed2 := fastpathTV.DecMapIntInt8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]int16: + fastpathTV.DecMapIntInt16V(v, fastpathCheckNilFalse, false, d) + case *map[int]int16: + v2, changed2 := fastpathTV.DecMapIntInt16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]int32: + fastpathTV.DecMapIntInt32V(v, fastpathCheckNilFalse, false, d) + case *map[int]int32: + v2, changed2 := fastpathTV.DecMapIntInt32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]int64: + fastpathTV.DecMapIntInt64V(v, fastpathCheckNilFalse, false, d) + case *map[int]int64: + v2, changed2 := fastpathTV.DecMapIntInt64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]float32: + fastpathTV.DecMapIntFloat32V(v, fastpathCheckNilFalse, false, d) + case *map[int]float32: + v2, changed2 := fastpathTV.DecMapIntFloat32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]float64: + fastpathTV.DecMapIntFloat64V(v, fastpathCheckNilFalse, false, d) + case *map[int]float64: + v2, changed2 := fastpathTV.DecMapIntFloat64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]bool: + fastpathTV.DecMapIntBoolV(v, fastpathCheckNilFalse, false, d) + case *map[int]bool: + v2, changed2 := fastpathTV.DecMapIntBoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []int8: + fastpathTV.DecSliceInt8V(v, fastpathCheckNilFalse, false, d) + case *[]int8: + v2, changed2 := fastpathTV.DecSliceInt8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]interface{}: + fastpathTV.DecMapInt8IntfV(v, fastpathCheckNilFalse, false, d) + case *map[int8]interface{}: + v2, changed2 := fastpathTV.DecMapInt8IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]string: + fastpathTV.DecMapInt8StringV(v, fastpathCheckNilFalse, false, d) + case *map[int8]string: + v2, changed2 := fastpathTV.DecMapInt8StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]uint: + fastpathTV.DecMapInt8UintV(v, fastpathCheckNilFalse, false, d) + case *map[int8]uint: + v2, changed2 := fastpathTV.DecMapInt8UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]uint8: + fastpathTV.DecMapInt8Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[int8]uint8: + v2, changed2 := fastpathTV.DecMapInt8Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]uint16: + fastpathTV.DecMapInt8Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[int8]uint16: + v2, changed2 := fastpathTV.DecMapInt8Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]uint32: + fastpathTV.DecMapInt8Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[int8]uint32: + v2, changed2 := fastpathTV.DecMapInt8Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]uint64: + fastpathTV.DecMapInt8Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[int8]uint64: + v2, changed2 := fastpathTV.DecMapInt8Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]uintptr: + fastpathTV.DecMapInt8UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[int8]uintptr: + v2, changed2 := fastpathTV.DecMapInt8UintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]int: + fastpathTV.DecMapInt8IntV(v, fastpathCheckNilFalse, false, d) + case *map[int8]int: + v2, changed2 := fastpathTV.DecMapInt8IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]int8: + fastpathTV.DecMapInt8Int8V(v, fastpathCheckNilFalse, false, d) + case *map[int8]int8: + v2, changed2 := fastpathTV.DecMapInt8Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]int16: + fastpathTV.DecMapInt8Int16V(v, fastpathCheckNilFalse, false, d) + case *map[int8]int16: + v2, changed2 := fastpathTV.DecMapInt8Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]int32: + fastpathTV.DecMapInt8Int32V(v, fastpathCheckNilFalse, false, d) + case *map[int8]int32: + v2, changed2 := fastpathTV.DecMapInt8Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]int64: + fastpathTV.DecMapInt8Int64V(v, fastpathCheckNilFalse, false, d) + case *map[int8]int64: + v2, changed2 := fastpathTV.DecMapInt8Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]float32: + fastpathTV.DecMapInt8Float32V(v, fastpathCheckNilFalse, false, d) + case *map[int8]float32: + v2, changed2 := fastpathTV.DecMapInt8Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]float64: + fastpathTV.DecMapInt8Float64V(v, fastpathCheckNilFalse, false, d) + case *map[int8]float64: + v2, changed2 := fastpathTV.DecMapInt8Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]bool: + fastpathTV.DecMapInt8BoolV(v, fastpathCheckNilFalse, false, d) + case *map[int8]bool: + v2, changed2 := fastpathTV.DecMapInt8BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []int16: + fastpathTV.DecSliceInt16V(v, fastpathCheckNilFalse, false, d) + case *[]int16: + v2, changed2 := fastpathTV.DecSliceInt16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]interface{}: + fastpathTV.DecMapInt16IntfV(v, fastpathCheckNilFalse, false, d) + case *map[int16]interface{}: + v2, changed2 := fastpathTV.DecMapInt16IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]string: + fastpathTV.DecMapInt16StringV(v, fastpathCheckNilFalse, false, d) + case *map[int16]string: + v2, changed2 := fastpathTV.DecMapInt16StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]uint: + fastpathTV.DecMapInt16UintV(v, fastpathCheckNilFalse, false, d) + case *map[int16]uint: + v2, changed2 := fastpathTV.DecMapInt16UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]uint8: + fastpathTV.DecMapInt16Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[int16]uint8: + v2, changed2 := fastpathTV.DecMapInt16Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]uint16: + fastpathTV.DecMapInt16Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[int16]uint16: + v2, changed2 := fastpathTV.DecMapInt16Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]uint32: + fastpathTV.DecMapInt16Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[int16]uint32: + v2, changed2 := fastpathTV.DecMapInt16Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]uint64: + fastpathTV.DecMapInt16Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[int16]uint64: + v2, changed2 := fastpathTV.DecMapInt16Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]uintptr: + fastpathTV.DecMapInt16UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[int16]uintptr: + v2, changed2 := fastpathTV.DecMapInt16UintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]int: + fastpathTV.DecMapInt16IntV(v, fastpathCheckNilFalse, false, d) + case *map[int16]int: + v2, changed2 := fastpathTV.DecMapInt16IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]int8: + fastpathTV.DecMapInt16Int8V(v, fastpathCheckNilFalse, false, d) + case *map[int16]int8: + v2, changed2 := fastpathTV.DecMapInt16Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]int16: + fastpathTV.DecMapInt16Int16V(v, fastpathCheckNilFalse, false, d) + case *map[int16]int16: + v2, changed2 := fastpathTV.DecMapInt16Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]int32: + fastpathTV.DecMapInt16Int32V(v, fastpathCheckNilFalse, false, d) + case *map[int16]int32: + v2, changed2 := fastpathTV.DecMapInt16Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]int64: + fastpathTV.DecMapInt16Int64V(v, fastpathCheckNilFalse, false, d) + case *map[int16]int64: + v2, changed2 := fastpathTV.DecMapInt16Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]float32: + fastpathTV.DecMapInt16Float32V(v, fastpathCheckNilFalse, false, d) + case *map[int16]float32: + v2, changed2 := fastpathTV.DecMapInt16Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]float64: + fastpathTV.DecMapInt16Float64V(v, fastpathCheckNilFalse, false, d) + case *map[int16]float64: + v2, changed2 := fastpathTV.DecMapInt16Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]bool: + fastpathTV.DecMapInt16BoolV(v, fastpathCheckNilFalse, false, d) + case *map[int16]bool: + v2, changed2 := fastpathTV.DecMapInt16BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []int32: + fastpathTV.DecSliceInt32V(v, fastpathCheckNilFalse, false, d) + case *[]int32: + v2, changed2 := fastpathTV.DecSliceInt32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]interface{}: + fastpathTV.DecMapInt32IntfV(v, fastpathCheckNilFalse, false, d) + case *map[int32]interface{}: + v2, changed2 := fastpathTV.DecMapInt32IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]string: + fastpathTV.DecMapInt32StringV(v, fastpathCheckNilFalse, false, d) + case *map[int32]string: + v2, changed2 := fastpathTV.DecMapInt32StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]uint: + fastpathTV.DecMapInt32UintV(v, fastpathCheckNilFalse, false, d) + case *map[int32]uint: + v2, changed2 := fastpathTV.DecMapInt32UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]uint8: + fastpathTV.DecMapInt32Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[int32]uint8: + v2, changed2 := fastpathTV.DecMapInt32Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]uint16: + fastpathTV.DecMapInt32Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[int32]uint16: + v2, changed2 := fastpathTV.DecMapInt32Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]uint32: + fastpathTV.DecMapInt32Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[int32]uint32: + v2, changed2 := fastpathTV.DecMapInt32Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]uint64: + fastpathTV.DecMapInt32Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[int32]uint64: + v2, changed2 := fastpathTV.DecMapInt32Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]uintptr: + fastpathTV.DecMapInt32UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[int32]uintptr: + v2, changed2 := fastpathTV.DecMapInt32UintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]int: + fastpathTV.DecMapInt32IntV(v, fastpathCheckNilFalse, false, d) + case *map[int32]int: + v2, changed2 := fastpathTV.DecMapInt32IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]int8: + fastpathTV.DecMapInt32Int8V(v, fastpathCheckNilFalse, false, d) + case *map[int32]int8: + v2, changed2 := fastpathTV.DecMapInt32Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]int16: + fastpathTV.DecMapInt32Int16V(v, fastpathCheckNilFalse, false, d) + case *map[int32]int16: + v2, changed2 := fastpathTV.DecMapInt32Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]int32: + fastpathTV.DecMapInt32Int32V(v, fastpathCheckNilFalse, false, d) + case *map[int32]int32: + v2, changed2 := fastpathTV.DecMapInt32Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]int64: + fastpathTV.DecMapInt32Int64V(v, fastpathCheckNilFalse, false, d) + case *map[int32]int64: + v2, changed2 := fastpathTV.DecMapInt32Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]float32: + fastpathTV.DecMapInt32Float32V(v, fastpathCheckNilFalse, false, d) + case *map[int32]float32: + v2, changed2 := fastpathTV.DecMapInt32Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]float64: + fastpathTV.DecMapInt32Float64V(v, fastpathCheckNilFalse, false, d) + case *map[int32]float64: + v2, changed2 := fastpathTV.DecMapInt32Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]bool: + fastpathTV.DecMapInt32BoolV(v, fastpathCheckNilFalse, false, d) + case *map[int32]bool: + v2, changed2 := fastpathTV.DecMapInt32BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []int64: + fastpathTV.DecSliceInt64V(v, fastpathCheckNilFalse, false, d) + case *[]int64: + v2, changed2 := fastpathTV.DecSliceInt64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]interface{}: + fastpathTV.DecMapInt64IntfV(v, fastpathCheckNilFalse, false, d) + case *map[int64]interface{}: + v2, changed2 := fastpathTV.DecMapInt64IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]string: + fastpathTV.DecMapInt64StringV(v, fastpathCheckNilFalse, false, d) + case *map[int64]string: + v2, changed2 := fastpathTV.DecMapInt64StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]uint: + fastpathTV.DecMapInt64UintV(v, fastpathCheckNilFalse, false, d) + case *map[int64]uint: + v2, changed2 := fastpathTV.DecMapInt64UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]uint8: + fastpathTV.DecMapInt64Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[int64]uint8: + v2, changed2 := fastpathTV.DecMapInt64Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]uint16: + fastpathTV.DecMapInt64Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[int64]uint16: + v2, changed2 := fastpathTV.DecMapInt64Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]uint32: + fastpathTV.DecMapInt64Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[int64]uint32: + v2, changed2 := fastpathTV.DecMapInt64Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]uint64: + fastpathTV.DecMapInt64Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[int64]uint64: + v2, changed2 := fastpathTV.DecMapInt64Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]uintptr: + fastpathTV.DecMapInt64UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[int64]uintptr: + v2, changed2 := fastpathTV.DecMapInt64UintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]int: + fastpathTV.DecMapInt64IntV(v, fastpathCheckNilFalse, false, d) + case *map[int64]int: + v2, changed2 := fastpathTV.DecMapInt64IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]int8: + fastpathTV.DecMapInt64Int8V(v, fastpathCheckNilFalse, false, d) + case *map[int64]int8: + v2, changed2 := fastpathTV.DecMapInt64Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]int16: + fastpathTV.DecMapInt64Int16V(v, fastpathCheckNilFalse, false, d) + case *map[int64]int16: + v2, changed2 := fastpathTV.DecMapInt64Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]int32: + fastpathTV.DecMapInt64Int32V(v, fastpathCheckNilFalse, false, d) + case *map[int64]int32: + v2, changed2 := fastpathTV.DecMapInt64Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]int64: + fastpathTV.DecMapInt64Int64V(v, fastpathCheckNilFalse, false, d) + case *map[int64]int64: + v2, changed2 := fastpathTV.DecMapInt64Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]float32: + fastpathTV.DecMapInt64Float32V(v, fastpathCheckNilFalse, false, d) + case *map[int64]float32: + v2, changed2 := fastpathTV.DecMapInt64Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]float64: + fastpathTV.DecMapInt64Float64V(v, fastpathCheckNilFalse, false, d) + case *map[int64]float64: + v2, changed2 := fastpathTV.DecMapInt64Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]bool: + fastpathTV.DecMapInt64BoolV(v, fastpathCheckNilFalse, false, d) + case *map[int64]bool: + v2, changed2 := fastpathTV.DecMapInt64BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []bool: + fastpathTV.DecSliceBoolV(v, fastpathCheckNilFalse, false, d) + case *[]bool: + v2, changed2 := fastpathTV.DecSliceBoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]interface{}: + fastpathTV.DecMapBoolIntfV(v, fastpathCheckNilFalse, false, d) + case *map[bool]interface{}: + v2, changed2 := fastpathTV.DecMapBoolIntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]string: + fastpathTV.DecMapBoolStringV(v, fastpathCheckNilFalse, false, d) + case *map[bool]string: + v2, changed2 := fastpathTV.DecMapBoolStringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]uint: + fastpathTV.DecMapBoolUintV(v, fastpathCheckNilFalse, false, d) + case *map[bool]uint: + v2, changed2 := fastpathTV.DecMapBoolUintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]uint8: + fastpathTV.DecMapBoolUint8V(v, fastpathCheckNilFalse, false, d) + case *map[bool]uint8: + v2, changed2 := fastpathTV.DecMapBoolUint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]uint16: + fastpathTV.DecMapBoolUint16V(v, fastpathCheckNilFalse, false, d) + case *map[bool]uint16: + v2, changed2 := fastpathTV.DecMapBoolUint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]uint32: + fastpathTV.DecMapBoolUint32V(v, fastpathCheckNilFalse, false, d) + case *map[bool]uint32: + v2, changed2 := fastpathTV.DecMapBoolUint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]uint64: + fastpathTV.DecMapBoolUint64V(v, fastpathCheckNilFalse, false, d) + case *map[bool]uint64: + v2, changed2 := fastpathTV.DecMapBoolUint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]uintptr: + fastpathTV.DecMapBoolUintptrV(v, fastpathCheckNilFalse, false, d) + case *map[bool]uintptr: + v2, changed2 := fastpathTV.DecMapBoolUintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]int: + fastpathTV.DecMapBoolIntV(v, fastpathCheckNilFalse, false, d) + case *map[bool]int: + v2, changed2 := fastpathTV.DecMapBoolIntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]int8: + fastpathTV.DecMapBoolInt8V(v, fastpathCheckNilFalse, false, d) + case *map[bool]int8: + v2, changed2 := fastpathTV.DecMapBoolInt8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]int16: + fastpathTV.DecMapBoolInt16V(v, fastpathCheckNilFalse, false, d) + case *map[bool]int16: + v2, changed2 := fastpathTV.DecMapBoolInt16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]int32: + fastpathTV.DecMapBoolInt32V(v, fastpathCheckNilFalse, false, d) + case *map[bool]int32: + v2, changed2 := fastpathTV.DecMapBoolInt32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]int64: + fastpathTV.DecMapBoolInt64V(v, fastpathCheckNilFalse, false, d) + case *map[bool]int64: + v2, changed2 := fastpathTV.DecMapBoolInt64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]float32: + fastpathTV.DecMapBoolFloat32V(v, fastpathCheckNilFalse, false, d) + case *map[bool]float32: + v2, changed2 := fastpathTV.DecMapBoolFloat32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]float64: + fastpathTV.DecMapBoolFloat64V(v, fastpathCheckNilFalse, false, d) + case *map[bool]float64: + v2, changed2 := fastpathTV.DecMapBoolFloat64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]bool: + fastpathTV.DecMapBoolBoolV(v, fastpathCheckNilFalse, false, d) + case *map[bool]bool: + v2, changed2 := fastpathTV.DecMapBoolBoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + default: + _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + return false + } + return true +} + +// -- -- fast path functions + +func (f *decFnInfo) fastpathDecSliceIntfR(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]interface{}) + v, changed := fastpathTV.DecSliceIntfV(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]interface{}) + fastpathTV.DecSliceIntfV(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceIntfX(vp *[]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecSliceIntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceIntfV(v []interface{}, checkNil bool, canChange bool, d *Decoder) (_ []interface{}, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []interface{}{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 16) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]interface{}, xlen) + } + } else { + v = make([]interface{}, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + d.decode(&v[j]) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, nil) + slh.ElemContainerState(j) + d.decode(&v[j]) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []interface{}{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]interface{}, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, nil) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + d.decode(&v[j]) + + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceStringR(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]string) + v, changed := fastpathTV.DecSliceStringV(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]string) + fastpathTV.DecSliceStringV(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceStringX(vp *[]string, checkNil bool, d *Decoder) { + v, changed := f.DecSliceStringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceStringV(v []string, checkNil bool, canChange bool, d *Decoder) (_ []string, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []string{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 16) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]string, xlen) + } + } else { + v = make([]string, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = dd.DecodeString() + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, "") + slh.ElemContainerState(j) + v[j] = dd.DecodeString() + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []string{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]string, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, "") + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = dd.DecodeString() + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceFloat32R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]float32) + v, changed := fastpathTV.DecSliceFloat32V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]float32) + fastpathTV.DecSliceFloat32V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceFloat32X(vp *[]float32, checkNil bool, d *Decoder) { + v, changed := f.DecSliceFloat32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceFloat32V(v []float32, checkNil bool, canChange bool, d *Decoder) (_ []float32, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []float32{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 4) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]float32, xlen) + } + } else { + v = make([]float32, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = float32(dd.DecodeFloat(true)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = float32(dd.DecodeFloat(true)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []float32{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]float32, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = float32(dd.DecodeFloat(true)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceFloat64R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]float64) + v, changed := fastpathTV.DecSliceFloat64V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]float64) + fastpathTV.DecSliceFloat64V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceFloat64X(vp *[]float64, checkNil bool, d *Decoder) { + v, changed := f.DecSliceFloat64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceFloat64V(v []float64, checkNil bool, canChange bool, d *Decoder) (_ []float64, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []float64{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 8) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]float64, xlen) + } + } else { + v = make([]float64, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = dd.DecodeFloat(false) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = dd.DecodeFloat(false) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []float64{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]float64, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = dd.DecodeFloat(false) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceUintR(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]uint) + v, changed := fastpathTV.DecSliceUintV(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]uint) + fastpathTV.DecSliceUintV(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceUintX(vp *[]uint, checkNil bool, d *Decoder) { + v, changed := f.DecSliceUintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceUintV(v []uint, checkNil bool, canChange bool, d *Decoder) (_ []uint, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []uint{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 8) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]uint, xlen) + } + } else { + v = make([]uint, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = uint(dd.DecodeUint(uintBitsize)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = uint(dd.DecodeUint(uintBitsize)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []uint{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]uint, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = uint(dd.DecodeUint(uintBitsize)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceUint16R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]uint16) + v, changed := fastpathTV.DecSliceUint16V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]uint16) + fastpathTV.DecSliceUint16V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceUint16X(vp *[]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecSliceUint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceUint16V(v []uint16, checkNil bool, canChange bool, d *Decoder) (_ []uint16, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []uint16{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 2) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]uint16, xlen) + } + } else { + v = make([]uint16, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = uint16(dd.DecodeUint(16)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = uint16(dd.DecodeUint(16)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []uint16{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]uint16, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = uint16(dd.DecodeUint(16)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceUint32R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]uint32) + v, changed := fastpathTV.DecSliceUint32V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]uint32) + fastpathTV.DecSliceUint32V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceUint32X(vp *[]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecSliceUint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceUint32V(v []uint32, checkNil bool, canChange bool, d *Decoder) (_ []uint32, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []uint32{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 4) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]uint32, xlen) + } + } else { + v = make([]uint32, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = uint32(dd.DecodeUint(32)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = uint32(dd.DecodeUint(32)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []uint32{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]uint32, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = uint32(dd.DecodeUint(32)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceUint64R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]uint64) + v, changed := fastpathTV.DecSliceUint64V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]uint64) + fastpathTV.DecSliceUint64V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceUint64X(vp *[]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecSliceUint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceUint64V(v []uint64, checkNil bool, canChange bool, d *Decoder) (_ []uint64, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []uint64{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 8) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]uint64, xlen) + } + } else { + v = make([]uint64, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = dd.DecodeUint(64) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = dd.DecodeUint(64) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []uint64{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]uint64, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = dd.DecodeUint(64) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceUintptrR(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]uintptr) + v, changed := fastpathTV.DecSliceUintptrV(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]uintptr) + fastpathTV.DecSliceUintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceUintptrX(vp *[]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecSliceUintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceUintptrV(v []uintptr, checkNil bool, canChange bool, d *Decoder) (_ []uintptr, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []uintptr{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 8) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]uintptr, xlen) + } + } else { + v = make([]uintptr, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = uintptr(dd.DecodeUint(uintBitsize)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = uintptr(dd.DecodeUint(uintBitsize)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []uintptr{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]uintptr, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = uintptr(dd.DecodeUint(uintBitsize)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceIntR(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]int) + v, changed := fastpathTV.DecSliceIntV(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]int) + fastpathTV.DecSliceIntV(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceIntX(vp *[]int, checkNil bool, d *Decoder) { + v, changed := f.DecSliceIntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceIntV(v []int, checkNil bool, canChange bool, d *Decoder) (_ []int, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []int{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 8) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]int, xlen) + } + } else { + v = make([]int, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = int(dd.DecodeInt(intBitsize)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = int(dd.DecodeInt(intBitsize)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []int{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]int, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = int(dd.DecodeInt(intBitsize)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceInt8R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]int8) + v, changed := fastpathTV.DecSliceInt8V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]int8) + fastpathTV.DecSliceInt8V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceInt8X(vp *[]int8, checkNil bool, d *Decoder) { + v, changed := f.DecSliceInt8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceInt8V(v []int8, checkNil bool, canChange bool, d *Decoder) (_ []int8, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []int8{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 1) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]int8, xlen) + } + } else { + v = make([]int8, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = int8(dd.DecodeInt(8)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = int8(dd.DecodeInt(8)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []int8{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]int8, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = int8(dd.DecodeInt(8)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceInt16R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]int16) + v, changed := fastpathTV.DecSliceInt16V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]int16) + fastpathTV.DecSliceInt16V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceInt16X(vp *[]int16, checkNil bool, d *Decoder) { + v, changed := f.DecSliceInt16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceInt16V(v []int16, checkNil bool, canChange bool, d *Decoder) (_ []int16, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []int16{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 2) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]int16, xlen) + } + } else { + v = make([]int16, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = int16(dd.DecodeInt(16)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = int16(dd.DecodeInt(16)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []int16{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]int16, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = int16(dd.DecodeInt(16)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceInt32R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]int32) + v, changed := fastpathTV.DecSliceInt32V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]int32) + fastpathTV.DecSliceInt32V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceInt32X(vp *[]int32, checkNil bool, d *Decoder) { + v, changed := f.DecSliceInt32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceInt32V(v []int32, checkNil bool, canChange bool, d *Decoder) (_ []int32, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []int32{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 4) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]int32, xlen) + } + } else { + v = make([]int32, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = int32(dd.DecodeInt(32)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = int32(dd.DecodeInt(32)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []int32{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]int32, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = int32(dd.DecodeInt(32)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceInt64R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]int64) + v, changed := fastpathTV.DecSliceInt64V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]int64) + fastpathTV.DecSliceInt64V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceInt64X(vp *[]int64, checkNil bool, d *Decoder) { + v, changed := f.DecSliceInt64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceInt64V(v []int64, checkNil bool, canChange bool, d *Decoder) (_ []int64, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []int64{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 8) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]int64, xlen) + } + } else { + v = make([]int64, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = dd.DecodeInt(64) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = dd.DecodeInt(64) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []int64{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]int64, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = dd.DecodeInt(64) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceBoolR(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]bool) + v, changed := fastpathTV.DecSliceBoolV(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]bool) + fastpathTV.DecSliceBoolV(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceBoolX(vp *[]bool, checkNil bool, d *Decoder) { + v, changed := f.DecSliceBoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceBoolV(v []bool, checkNil bool, canChange bool, d *Decoder) (_ []bool, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []bool{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 1) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]bool, xlen) + } + } else { + v = make([]bool, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = dd.DecodeBool() + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, false) + slh.ElemContainerState(j) + v[j] = dd.DecodeBool() + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []bool{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]bool, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, false) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = dd.DecodeBool() + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfIntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]interface{}) + v, changed := fastpathTV.DecMapIntfIntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]interface{}) + fastpathTV.DecMapIntfIntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfIntfX(vp *map[interface{}]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfIntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfIntfV(v map[interface{}]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 32) + v = make(map[interface{}]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk interface{} + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfStringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]string) + v, changed := fastpathTV.DecMapIntfStringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]string) + fastpathTV.DecMapIntfStringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfStringX(vp *map[interface{}]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfStringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfStringV(v map[interface{}]string, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 32) + v = make(map[interface{}]string, xlen) + changed = true + } + + var mk interface{} + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfUintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]uint) + v, changed := fastpathTV.DecMapIntfUintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]uint) + fastpathTV.DecMapIntfUintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfUintX(vp *map[interface{}]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfUintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfUintV(v map[interface{}]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[interface{}]uint, xlen) + changed = true + } + + var mk interface{} + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfUint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]uint8) + v, changed := fastpathTV.DecMapIntfUint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]uint8) + fastpathTV.DecMapIntfUint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfUint8X(vp *map[interface{}]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfUint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfUint8V(v map[interface{}]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[interface{}]uint8, xlen) + changed = true + } + + var mk interface{} + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfUint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]uint16) + v, changed := fastpathTV.DecMapIntfUint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]uint16) + fastpathTV.DecMapIntfUint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfUint16X(vp *map[interface{}]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfUint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfUint16V(v map[interface{}]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18) + v = make(map[interface{}]uint16, xlen) + changed = true + } + + var mk interface{} + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfUint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]uint32) + v, changed := fastpathTV.DecMapIntfUint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]uint32) + fastpathTV.DecMapIntfUint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfUint32X(vp *map[interface{}]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfUint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfUint32V(v map[interface{}]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[interface{}]uint32, xlen) + changed = true + } + + var mk interface{} + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfUint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]uint64) + v, changed := fastpathTV.DecMapIntfUint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]uint64) + fastpathTV.DecMapIntfUint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfUint64X(vp *map[interface{}]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfUint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfUint64V(v map[interface{}]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[interface{}]uint64, xlen) + changed = true + } + + var mk interface{} + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfUintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]uintptr) + v, changed := fastpathTV.DecMapIntfUintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]uintptr) + fastpathTV.DecMapIntfUintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfUintptrX(vp *map[interface{}]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfUintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfUintptrV(v map[interface{}]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[interface{}]uintptr, xlen) + changed = true + } + + var mk interface{} + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfIntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]int) + v, changed := fastpathTV.DecMapIntfIntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]int) + fastpathTV.DecMapIntfIntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfIntX(vp *map[interface{}]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfIntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfIntV(v map[interface{}]int, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[interface{}]int, xlen) + changed = true + } + + var mk interface{} + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfInt8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]int8) + v, changed := fastpathTV.DecMapIntfInt8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]int8) + fastpathTV.DecMapIntfInt8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfInt8X(vp *map[interface{}]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfInt8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfInt8V(v map[interface{}]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[interface{}]int8, xlen) + changed = true + } + + var mk interface{} + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfInt16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]int16) + v, changed := fastpathTV.DecMapIntfInt16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]int16) + fastpathTV.DecMapIntfInt16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfInt16X(vp *map[interface{}]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfInt16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfInt16V(v map[interface{}]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18) + v = make(map[interface{}]int16, xlen) + changed = true + } + + var mk interface{} + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfInt32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]int32) + v, changed := fastpathTV.DecMapIntfInt32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]int32) + fastpathTV.DecMapIntfInt32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfInt32X(vp *map[interface{}]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfInt32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfInt32V(v map[interface{}]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[interface{}]int32, xlen) + changed = true + } + + var mk interface{} + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfInt64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]int64) + v, changed := fastpathTV.DecMapIntfInt64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]int64) + fastpathTV.DecMapIntfInt64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfInt64X(vp *map[interface{}]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfInt64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfInt64V(v map[interface{}]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[interface{}]int64, xlen) + changed = true + } + + var mk interface{} + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfFloat32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]float32) + v, changed := fastpathTV.DecMapIntfFloat32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]float32) + fastpathTV.DecMapIntfFloat32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfFloat32X(vp *map[interface{}]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfFloat32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfFloat32V(v map[interface{}]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[interface{}]float32, xlen) + changed = true + } + + var mk interface{} + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfFloat64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]float64) + v, changed := fastpathTV.DecMapIntfFloat64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]float64) + fastpathTV.DecMapIntfFloat64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfFloat64X(vp *map[interface{}]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfFloat64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfFloat64V(v map[interface{}]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[interface{}]float64, xlen) + changed = true + } + + var mk interface{} + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfBoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]bool) + v, changed := fastpathTV.DecMapIntfBoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]bool) + fastpathTV.DecMapIntfBoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfBoolX(vp *map[interface{}]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfBoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfBoolV(v map[interface{}]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[interface{}]bool, xlen) + changed = true + } + + var mk interface{} + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringIntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]interface{}) + v, changed := fastpathTV.DecMapStringIntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]interface{}) + fastpathTV.DecMapStringIntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringIntfX(vp *map[string]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringIntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringIntfV(v map[string]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[string]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 32) + v = make(map[string]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk string + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringStringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]string) + v, changed := fastpathTV.DecMapStringStringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]string) + fastpathTV.DecMapStringStringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringStringX(vp *map[string]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringStringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringStringV(v map[string]string, checkNil bool, canChange bool, + d *Decoder) (_ map[string]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 32) + v = make(map[string]string, xlen) + changed = true + } + + var mk string + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringUintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]uint) + v, changed := fastpathTV.DecMapStringUintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]uint) + fastpathTV.DecMapStringUintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringUintX(vp *map[string]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringUintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringUintV(v map[string]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[string]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[string]uint, xlen) + changed = true + } + + var mk string + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringUint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]uint8) + v, changed := fastpathTV.DecMapStringUint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]uint8) + fastpathTV.DecMapStringUint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringUint8X(vp *map[string]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringUint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringUint8V(v map[string]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[string]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[string]uint8, xlen) + changed = true + } + + var mk string + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringUint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]uint16) + v, changed := fastpathTV.DecMapStringUint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]uint16) + fastpathTV.DecMapStringUint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringUint16X(vp *map[string]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringUint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringUint16V(v map[string]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[string]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18) + v = make(map[string]uint16, xlen) + changed = true + } + + var mk string + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringUint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]uint32) + v, changed := fastpathTV.DecMapStringUint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]uint32) + fastpathTV.DecMapStringUint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringUint32X(vp *map[string]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringUint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringUint32V(v map[string]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[string]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[string]uint32, xlen) + changed = true + } + + var mk string + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringUint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]uint64) + v, changed := fastpathTV.DecMapStringUint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]uint64) + fastpathTV.DecMapStringUint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringUint64X(vp *map[string]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringUint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringUint64V(v map[string]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[string]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[string]uint64, xlen) + changed = true + } + + var mk string + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringUintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]uintptr) + v, changed := fastpathTV.DecMapStringUintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]uintptr) + fastpathTV.DecMapStringUintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringUintptrX(vp *map[string]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringUintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringUintptrV(v map[string]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[string]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[string]uintptr, xlen) + changed = true + } + + var mk string + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringIntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]int) + v, changed := fastpathTV.DecMapStringIntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]int) + fastpathTV.DecMapStringIntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringIntX(vp *map[string]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringIntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringIntV(v map[string]int, checkNil bool, canChange bool, + d *Decoder) (_ map[string]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[string]int, xlen) + changed = true + } + + var mk string + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringInt8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]int8) + v, changed := fastpathTV.DecMapStringInt8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]int8) + fastpathTV.DecMapStringInt8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringInt8X(vp *map[string]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringInt8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringInt8V(v map[string]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[string]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[string]int8, xlen) + changed = true + } + + var mk string + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringInt16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]int16) + v, changed := fastpathTV.DecMapStringInt16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]int16) + fastpathTV.DecMapStringInt16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringInt16X(vp *map[string]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringInt16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringInt16V(v map[string]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[string]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18) + v = make(map[string]int16, xlen) + changed = true + } + + var mk string + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringInt32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]int32) + v, changed := fastpathTV.DecMapStringInt32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]int32) + fastpathTV.DecMapStringInt32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringInt32X(vp *map[string]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringInt32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringInt32V(v map[string]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[string]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[string]int32, xlen) + changed = true + } + + var mk string + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringInt64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]int64) + v, changed := fastpathTV.DecMapStringInt64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]int64) + fastpathTV.DecMapStringInt64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringInt64X(vp *map[string]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringInt64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringInt64V(v map[string]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[string]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[string]int64, xlen) + changed = true + } + + var mk string + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringFloat32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]float32) + v, changed := fastpathTV.DecMapStringFloat32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]float32) + fastpathTV.DecMapStringFloat32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringFloat32X(vp *map[string]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringFloat32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringFloat32V(v map[string]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[string]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[string]float32, xlen) + changed = true + } + + var mk string + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringFloat64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]float64) + v, changed := fastpathTV.DecMapStringFloat64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]float64) + fastpathTV.DecMapStringFloat64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringFloat64X(vp *map[string]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringFloat64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringFloat64V(v map[string]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[string]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[string]float64, xlen) + changed = true + } + + var mk string + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringBoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]bool) + v, changed := fastpathTV.DecMapStringBoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]bool) + fastpathTV.DecMapStringBoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringBoolX(vp *map[string]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringBoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringBoolV(v map[string]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[string]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[string]bool, xlen) + changed = true + } + + var mk string + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]interface{}) + v, changed := fastpathTV.DecMapFloat32IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]interface{}) + fastpathTV.DecMapFloat32IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32IntfX(vp *map[float32]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32IntfV(v map[float32]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[float32]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk float32 + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]string) + v, changed := fastpathTV.DecMapFloat32StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]string) + fastpathTV.DecMapFloat32StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32StringX(vp *map[float32]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32StringV(v map[float32]string, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[float32]string, xlen) + changed = true + } + + var mk float32 + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]uint) + v, changed := fastpathTV.DecMapFloat32UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]uint) + fastpathTV.DecMapFloat32UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32UintX(vp *map[float32]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32UintV(v map[float32]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float32]uint, xlen) + changed = true + } + + var mk float32 + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]uint8) + v, changed := fastpathTV.DecMapFloat32Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]uint8) + fastpathTV.DecMapFloat32Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Uint8X(vp *map[float32]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Uint8V(v map[float32]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[float32]uint8, xlen) + changed = true + } + + var mk float32 + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]uint16) + v, changed := fastpathTV.DecMapFloat32Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]uint16) + fastpathTV.DecMapFloat32Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Uint16X(vp *map[float32]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Uint16V(v map[float32]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[float32]uint16, xlen) + changed = true + } + + var mk float32 + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]uint32) + v, changed := fastpathTV.DecMapFloat32Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]uint32) + fastpathTV.DecMapFloat32Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Uint32X(vp *map[float32]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Uint32V(v map[float32]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[float32]uint32, xlen) + changed = true + } + + var mk float32 + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]uint64) + v, changed := fastpathTV.DecMapFloat32Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]uint64) + fastpathTV.DecMapFloat32Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Uint64X(vp *map[float32]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Uint64V(v map[float32]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float32]uint64, xlen) + changed = true + } + + var mk float32 + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32UintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]uintptr) + v, changed := fastpathTV.DecMapFloat32UintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]uintptr) + fastpathTV.DecMapFloat32UintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32UintptrX(vp *map[float32]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32UintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32UintptrV(v map[float32]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float32]uintptr, xlen) + changed = true + } + + var mk float32 + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]int) + v, changed := fastpathTV.DecMapFloat32IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]int) + fastpathTV.DecMapFloat32IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32IntX(vp *map[float32]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32IntV(v map[float32]int, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float32]int, xlen) + changed = true + } + + var mk float32 + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]int8) + v, changed := fastpathTV.DecMapFloat32Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]int8) + fastpathTV.DecMapFloat32Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Int8X(vp *map[float32]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Int8V(v map[float32]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[float32]int8, xlen) + changed = true + } + + var mk float32 + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]int16) + v, changed := fastpathTV.DecMapFloat32Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]int16) + fastpathTV.DecMapFloat32Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Int16X(vp *map[float32]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Int16V(v map[float32]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[float32]int16, xlen) + changed = true + } + + var mk float32 + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]int32) + v, changed := fastpathTV.DecMapFloat32Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]int32) + fastpathTV.DecMapFloat32Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Int32X(vp *map[float32]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Int32V(v map[float32]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[float32]int32, xlen) + changed = true + } + + var mk float32 + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]int64) + v, changed := fastpathTV.DecMapFloat32Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]int64) + fastpathTV.DecMapFloat32Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Int64X(vp *map[float32]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Int64V(v map[float32]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float32]int64, xlen) + changed = true + } + + var mk float32 + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]float32) + v, changed := fastpathTV.DecMapFloat32Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]float32) + fastpathTV.DecMapFloat32Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Float32X(vp *map[float32]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Float32V(v map[float32]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[float32]float32, xlen) + changed = true + } + + var mk float32 + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]float64) + v, changed := fastpathTV.DecMapFloat32Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]float64) + fastpathTV.DecMapFloat32Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Float64X(vp *map[float32]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Float64V(v map[float32]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float32]float64, xlen) + changed = true + } + + var mk float32 + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]bool) + v, changed := fastpathTV.DecMapFloat32BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]bool) + fastpathTV.DecMapFloat32BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32BoolX(vp *map[float32]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32BoolV(v map[float32]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[float32]bool, xlen) + changed = true + } + + var mk float32 + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]interface{}) + v, changed := fastpathTV.DecMapFloat64IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]interface{}) + fastpathTV.DecMapFloat64IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64IntfX(vp *map[float64]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64IntfV(v map[float64]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[float64]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk float64 + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]string) + v, changed := fastpathTV.DecMapFloat64StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]string) + fastpathTV.DecMapFloat64StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64StringX(vp *map[float64]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64StringV(v map[float64]string, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[float64]string, xlen) + changed = true + } + + var mk float64 + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]uint) + v, changed := fastpathTV.DecMapFloat64UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]uint) + fastpathTV.DecMapFloat64UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64UintX(vp *map[float64]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64UintV(v map[float64]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[float64]uint, xlen) + changed = true + } + + var mk float64 + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]uint8) + v, changed := fastpathTV.DecMapFloat64Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]uint8) + fastpathTV.DecMapFloat64Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Uint8X(vp *map[float64]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Uint8V(v map[float64]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[float64]uint8, xlen) + changed = true + } + + var mk float64 + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]uint16) + v, changed := fastpathTV.DecMapFloat64Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]uint16) + fastpathTV.DecMapFloat64Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Uint16X(vp *map[float64]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Uint16V(v map[float64]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[float64]uint16, xlen) + changed = true + } + + var mk float64 + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]uint32) + v, changed := fastpathTV.DecMapFloat64Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]uint32) + fastpathTV.DecMapFloat64Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Uint32X(vp *map[float64]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Uint32V(v map[float64]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float64]uint32, xlen) + changed = true + } + + var mk float64 + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]uint64) + v, changed := fastpathTV.DecMapFloat64Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]uint64) + fastpathTV.DecMapFloat64Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Uint64X(vp *map[float64]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Uint64V(v map[float64]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[float64]uint64, xlen) + changed = true + } + + var mk float64 + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64UintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]uintptr) + v, changed := fastpathTV.DecMapFloat64UintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]uintptr) + fastpathTV.DecMapFloat64UintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64UintptrX(vp *map[float64]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64UintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64UintptrV(v map[float64]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[float64]uintptr, xlen) + changed = true + } + + var mk float64 + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]int) + v, changed := fastpathTV.DecMapFloat64IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]int) + fastpathTV.DecMapFloat64IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64IntX(vp *map[float64]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64IntV(v map[float64]int, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[float64]int, xlen) + changed = true + } + + var mk float64 + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]int8) + v, changed := fastpathTV.DecMapFloat64Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]int8) + fastpathTV.DecMapFloat64Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Int8X(vp *map[float64]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Int8V(v map[float64]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[float64]int8, xlen) + changed = true + } + + var mk float64 + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]int16) + v, changed := fastpathTV.DecMapFloat64Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]int16) + fastpathTV.DecMapFloat64Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Int16X(vp *map[float64]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Int16V(v map[float64]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[float64]int16, xlen) + changed = true + } + + var mk float64 + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]int32) + v, changed := fastpathTV.DecMapFloat64Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]int32) + fastpathTV.DecMapFloat64Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Int32X(vp *map[float64]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Int32V(v map[float64]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float64]int32, xlen) + changed = true + } + + var mk float64 + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]int64) + v, changed := fastpathTV.DecMapFloat64Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]int64) + fastpathTV.DecMapFloat64Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Int64X(vp *map[float64]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Int64V(v map[float64]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[float64]int64, xlen) + changed = true + } + + var mk float64 + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]float32) + v, changed := fastpathTV.DecMapFloat64Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]float32) + fastpathTV.DecMapFloat64Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Float32X(vp *map[float64]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Float32V(v map[float64]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float64]float32, xlen) + changed = true + } + + var mk float64 + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]float64) + v, changed := fastpathTV.DecMapFloat64Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]float64) + fastpathTV.DecMapFloat64Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Float64X(vp *map[float64]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Float64V(v map[float64]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[float64]float64, xlen) + changed = true + } + + var mk float64 + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]bool) + v, changed := fastpathTV.DecMapFloat64BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]bool) + fastpathTV.DecMapFloat64BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64BoolX(vp *map[float64]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64BoolV(v map[float64]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[float64]bool, xlen) + changed = true + } + + var mk float64 + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintIntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]interface{}) + v, changed := fastpathTV.DecMapUintIntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]interface{}) + fastpathTV.DecMapUintIntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintIntfX(vp *map[uint]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintIntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintIntfV(v map[uint]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[uint]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk uint + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintStringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]string) + v, changed := fastpathTV.DecMapUintStringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]string) + fastpathTV.DecMapUintStringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintStringX(vp *map[uint]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintStringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintStringV(v map[uint]string, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[uint]string, xlen) + changed = true + } + + var mk uint + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintUintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]uint) + v, changed := fastpathTV.DecMapUintUintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]uint) + fastpathTV.DecMapUintUintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintUintX(vp *map[uint]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintUintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintUintV(v map[uint]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint]uint, xlen) + changed = true + } + + var mk uint + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintUint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]uint8) + v, changed := fastpathTV.DecMapUintUint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]uint8) + fastpathTV.DecMapUintUint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintUint8X(vp *map[uint]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintUint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintUint8V(v map[uint]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint]uint8, xlen) + changed = true + } + + var mk uint + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintUint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]uint16) + v, changed := fastpathTV.DecMapUintUint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]uint16) + fastpathTV.DecMapUintUint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintUint16X(vp *map[uint]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintUint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintUint16V(v map[uint]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint]uint16, xlen) + changed = true + } + + var mk uint + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintUint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]uint32) + v, changed := fastpathTV.DecMapUintUint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]uint32) + fastpathTV.DecMapUintUint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintUint32X(vp *map[uint]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintUint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintUint32V(v map[uint]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint]uint32, xlen) + changed = true + } + + var mk uint + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintUint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]uint64) + v, changed := fastpathTV.DecMapUintUint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]uint64) + fastpathTV.DecMapUintUint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintUint64X(vp *map[uint]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintUint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintUint64V(v map[uint]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint]uint64, xlen) + changed = true + } + + var mk uint + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintUintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]uintptr) + v, changed := fastpathTV.DecMapUintUintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]uintptr) + fastpathTV.DecMapUintUintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintUintptrX(vp *map[uint]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintUintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintUintptrV(v map[uint]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint]uintptr, xlen) + changed = true + } + + var mk uint + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintIntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]int) + v, changed := fastpathTV.DecMapUintIntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]int) + fastpathTV.DecMapUintIntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintIntX(vp *map[uint]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintIntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintIntV(v map[uint]int, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint]int, xlen) + changed = true + } + + var mk uint + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintInt8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]int8) + v, changed := fastpathTV.DecMapUintInt8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]int8) + fastpathTV.DecMapUintInt8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintInt8X(vp *map[uint]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintInt8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintInt8V(v map[uint]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint]int8, xlen) + changed = true + } + + var mk uint + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintInt16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]int16) + v, changed := fastpathTV.DecMapUintInt16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]int16) + fastpathTV.DecMapUintInt16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintInt16X(vp *map[uint]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintInt16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintInt16V(v map[uint]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint]int16, xlen) + changed = true + } + + var mk uint + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintInt32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]int32) + v, changed := fastpathTV.DecMapUintInt32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]int32) + fastpathTV.DecMapUintInt32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintInt32X(vp *map[uint]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintInt32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintInt32V(v map[uint]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint]int32, xlen) + changed = true + } + + var mk uint + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintInt64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]int64) + v, changed := fastpathTV.DecMapUintInt64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]int64) + fastpathTV.DecMapUintInt64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintInt64X(vp *map[uint]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintInt64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintInt64V(v map[uint]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint]int64, xlen) + changed = true + } + + var mk uint + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintFloat32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]float32) + v, changed := fastpathTV.DecMapUintFloat32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]float32) + fastpathTV.DecMapUintFloat32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintFloat32X(vp *map[uint]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintFloat32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintFloat32V(v map[uint]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint]float32, xlen) + changed = true + } + + var mk uint + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintFloat64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]float64) + v, changed := fastpathTV.DecMapUintFloat64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]float64) + fastpathTV.DecMapUintFloat64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintFloat64X(vp *map[uint]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintFloat64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintFloat64V(v map[uint]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint]float64, xlen) + changed = true + } + + var mk uint + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintBoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]bool) + v, changed := fastpathTV.DecMapUintBoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]bool) + fastpathTV.DecMapUintBoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintBoolX(vp *map[uint]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintBoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintBoolV(v map[uint]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint]bool, xlen) + changed = true + } + + var mk uint + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]interface{}) + v, changed := fastpathTV.DecMapUint8IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]interface{}) + fastpathTV.DecMapUint8IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8IntfX(vp *map[uint8]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8IntfV(v map[uint8]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[uint8]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk uint8 + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]string) + v, changed := fastpathTV.DecMapUint8StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]string) + fastpathTV.DecMapUint8StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8StringX(vp *map[uint8]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8StringV(v map[uint8]string, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[uint8]string, xlen) + changed = true + } + + var mk uint8 + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]uint) + v, changed := fastpathTV.DecMapUint8UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]uint) + fastpathTV.DecMapUint8UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8UintX(vp *map[uint8]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8UintV(v map[uint8]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint8]uint, xlen) + changed = true + } + + var mk uint8 + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]uint8) + v, changed := fastpathTV.DecMapUint8Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]uint8) + fastpathTV.DecMapUint8Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Uint8X(vp *map[uint8]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Uint8V(v map[uint8]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[uint8]uint8, xlen) + changed = true + } + + var mk uint8 + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]uint16) + v, changed := fastpathTV.DecMapUint8Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]uint16) + fastpathTV.DecMapUint8Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Uint16X(vp *map[uint8]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Uint16V(v map[uint8]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[uint8]uint16, xlen) + changed = true + } + + var mk uint8 + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]uint32) + v, changed := fastpathTV.DecMapUint8Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]uint32) + fastpathTV.DecMapUint8Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Uint32X(vp *map[uint8]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Uint32V(v map[uint8]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[uint8]uint32, xlen) + changed = true + } + + var mk uint8 + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]uint64) + v, changed := fastpathTV.DecMapUint8Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]uint64) + fastpathTV.DecMapUint8Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Uint64X(vp *map[uint8]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Uint64V(v map[uint8]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint8]uint64, xlen) + changed = true + } + + var mk uint8 + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8UintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]uintptr) + v, changed := fastpathTV.DecMapUint8UintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]uintptr) + fastpathTV.DecMapUint8UintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8UintptrX(vp *map[uint8]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8UintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8UintptrV(v map[uint8]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint8]uintptr, xlen) + changed = true + } + + var mk uint8 + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]int) + v, changed := fastpathTV.DecMapUint8IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]int) + fastpathTV.DecMapUint8IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8IntX(vp *map[uint8]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8IntV(v map[uint8]int, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint8]int, xlen) + changed = true + } + + var mk uint8 + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]int8) + v, changed := fastpathTV.DecMapUint8Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]int8) + fastpathTV.DecMapUint8Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Int8X(vp *map[uint8]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Int8V(v map[uint8]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[uint8]int8, xlen) + changed = true + } + + var mk uint8 + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]int16) + v, changed := fastpathTV.DecMapUint8Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]int16) + fastpathTV.DecMapUint8Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Int16X(vp *map[uint8]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Int16V(v map[uint8]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[uint8]int16, xlen) + changed = true + } + + var mk uint8 + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]int32) + v, changed := fastpathTV.DecMapUint8Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]int32) + fastpathTV.DecMapUint8Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Int32X(vp *map[uint8]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Int32V(v map[uint8]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[uint8]int32, xlen) + changed = true + } + + var mk uint8 + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]int64) + v, changed := fastpathTV.DecMapUint8Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]int64) + fastpathTV.DecMapUint8Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Int64X(vp *map[uint8]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Int64V(v map[uint8]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint8]int64, xlen) + changed = true + } + + var mk uint8 + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]float32) + v, changed := fastpathTV.DecMapUint8Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]float32) + fastpathTV.DecMapUint8Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Float32X(vp *map[uint8]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Float32V(v map[uint8]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[uint8]float32, xlen) + changed = true + } + + var mk uint8 + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]float64) + v, changed := fastpathTV.DecMapUint8Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]float64) + fastpathTV.DecMapUint8Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Float64X(vp *map[uint8]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Float64V(v map[uint8]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint8]float64, xlen) + changed = true + } + + var mk uint8 + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]bool) + v, changed := fastpathTV.DecMapUint8BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]bool) + fastpathTV.DecMapUint8BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8BoolX(vp *map[uint8]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8BoolV(v map[uint8]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[uint8]bool, xlen) + changed = true + } + + var mk uint8 + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]interface{}) + v, changed := fastpathTV.DecMapUint16IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]interface{}) + fastpathTV.DecMapUint16IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16IntfX(vp *map[uint16]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16IntfV(v map[uint16]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18) + v = make(map[uint16]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk uint16 + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]string) + v, changed := fastpathTV.DecMapUint16StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]string) + fastpathTV.DecMapUint16StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16StringX(vp *map[uint16]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16StringV(v map[uint16]string, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18) + v = make(map[uint16]string, xlen) + changed = true + } + + var mk uint16 + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]uint) + v, changed := fastpathTV.DecMapUint16UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]uint) + fastpathTV.DecMapUint16UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16UintX(vp *map[uint16]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16UintV(v map[uint16]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint16]uint, xlen) + changed = true + } + + var mk uint16 + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]uint8) + v, changed := fastpathTV.DecMapUint16Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]uint8) + fastpathTV.DecMapUint16Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Uint8X(vp *map[uint16]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Uint8V(v map[uint16]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[uint16]uint8, xlen) + changed = true + } + + var mk uint16 + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]uint16) + v, changed := fastpathTV.DecMapUint16Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]uint16) + fastpathTV.DecMapUint16Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Uint16X(vp *map[uint16]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Uint16V(v map[uint16]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 4) + v = make(map[uint16]uint16, xlen) + changed = true + } + + var mk uint16 + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]uint32) + v, changed := fastpathTV.DecMapUint16Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]uint32) + fastpathTV.DecMapUint16Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Uint32X(vp *map[uint16]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Uint32V(v map[uint16]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[uint16]uint32, xlen) + changed = true + } + + var mk uint16 + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]uint64) + v, changed := fastpathTV.DecMapUint16Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]uint64) + fastpathTV.DecMapUint16Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Uint64X(vp *map[uint16]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Uint64V(v map[uint16]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint16]uint64, xlen) + changed = true + } + + var mk uint16 + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16UintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]uintptr) + v, changed := fastpathTV.DecMapUint16UintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]uintptr) + fastpathTV.DecMapUint16UintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16UintptrX(vp *map[uint16]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16UintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16UintptrV(v map[uint16]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint16]uintptr, xlen) + changed = true + } + + var mk uint16 + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]int) + v, changed := fastpathTV.DecMapUint16IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]int) + fastpathTV.DecMapUint16IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16IntX(vp *map[uint16]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16IntV(v map[uint16]int, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint16]int, xlen) + changed = true + } + + var mk uint16 + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]int8) + v, changed := fastpathTV.DecMapUint16Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]int8) + fastpathTV.DecMapUint16Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Int8X(vp *map[uint16]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Int8V(v map[uint16]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[uint16]int8, xlen) + changed = true + } + + var mk uint16 + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]int16) + v, changed := fastpathTV.DecMapUint16Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]int16) + fastpathTV.DecMapUint16Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Int16X(vp *map[uint16]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Int16V(v map[uint16]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 4) + v = make(map[uint16]int16, xlen) + changed = true + } + + var mk uint16 + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]int32) + v, changed := fastpathTV.DecMapUint16Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]int32) + fastpathTV.DecMapUint16Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Int32X(vp *map[uint16]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Int32V(v map[uint16]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[uint16]int32, xlen) + changed = true + } + + var mk uint16 + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]int64) + v, changed := fastpathTV.DecMapUint16Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]int64) + fastpathTV.DecMapUint16Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Int64X(vp *map[uint16]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Int64V(v map[uint16]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint16]int64, xlen) + changed = true + } + + var mk uint16 + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]float32) + v, changed := fastpathTV.DecMapUint16Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]float32) + fastpathTV.DecMapUint16Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Float32X(vp *map[uint16]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Float32V(v map[uint16]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[uint16]float32, xlen) + changed = true + } + + var mk uint16 + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]float64) + v, changed := fastpathTV.DecMapUint16Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]float64) + fastpathTV.DecMapUint16Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Float64X(vp *map[uint16]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Float64V(v map[uint16]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint16]float64, xlen) + changed = true + } + + var mk uint16 + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]bool) + v, changed := fastpathTV.DecMapUint16BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]bool) + fastpathTV.DecMapUint16BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16BoolX(vp *map[uint16]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16BoolV(v map[uint16]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[uint16]bool, xlen) + changed = true + } + + var mk uint16 + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]interface{}) + v, changed := fastpathTV.DecMapUint32IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]interface{}) + fastpathTV.DecMapUint32IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32IntfX(vp *map[uint32]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32IntfV(v map[uint32]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[uint32]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk uint32 + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]string) + v, changed := fastpathTV.DecMapUint32StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]string) + fastpathTV.DecMapUint32StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32StringX(vp *map[uint32]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32StringV(v map[uint32]string, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[uint32]string, xlen) + changed = true + } + + var mk uint32 + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]uint) + v, changed := fastpathTV.DecMapUint32UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]uint) + fastpathTV.DecMapUint32UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32UintX(vp *map[uint32]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32UintV(v map[uint32]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint32]uint, xlen) + changed = true + } + + var mk uint32 + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]uint8) + v, changed := fastpathTV.DecMapUint32Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]uint8) + fastpathTV.DecMapUint32Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Uint8X(vp *map[uint32]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Uint8V(v map[uint32]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[uint32]uint8, xlen) + changed = true + } + + var mk uint32 + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]uint16) + v, changed := fastpathTV.DecMapUint32Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]uint16) + fastpathTV.DecMapUint32Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Uint16X(vp *map[uint32]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Uint16V(v map[uint32]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[uint32]uint16, xlen) + changed = true + } + + var mk uint32 + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]uint32) + v, changed := fastpathTV.DecMapUint32Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]uint32) + fastpathTV.DecMapUint32Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Uint32X(vp *map[uint32]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Uint32V(v map[uint32]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[uint32]uint32, xlen) + changed = true + } + + var mk uint32 + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]uint64) + v, changed := fastpathTV.DecMapUint32Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]uint64) + fastpathTV.DecMapUint32Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Uint64X(vp *map[uint32]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Uint64V(v map[uint32]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint32]uint64, xlen) + changed = true + } + + var mk uint32 + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32UintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]uintptr) + v, changed := fastpathTV.DecMapUint32UintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]uintptr) + fastpathTV.DecMapUint32UintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32UintptrX(vp *map[uint32]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32UintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32UintptrV(v map[uint32]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint32]uintptr, xlen) + changed = true + } + + var mk uint32 + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]int) + v, changed := fastpathTV.DecMapUint32IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]int) + fastpathTV.DecMapUint32IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32IntX(vp *map[uint32]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32IntV(v map[uint32]int, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint32]int, xlen) + changed = true + } + + var mk uint32 + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]int8) + v, changed := fastpathTV.DecMapUint32Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]int8) + fastpathTV.DecMapUint32Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Int8X(vp *map[uint32]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Int8V(v map[uint32]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[uint32]int8, xlen) + changed = true + } + + var mk uint32 + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]int16) + v, changed := fastpathTV.DecMapUint32Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]int16) + fastpathTV.DecMapUint32Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Int16X(vp *map[uint32]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Int16V(v map[uint32]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[uint32]int16, xlen) + changed = true + } + + var mk uint32 + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]int32) + v, changed := fastpathTV.DecMapUint32Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]int32) + fastpathTV.DecMapUint32Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Int32X(vp *map[uint32]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Int32V(v map[uint32]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[uint32]int32, xlen) + changed = true + } + + var mk uint32 + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]int64) + v, changed := fastpathTV.DecMapUint32Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]int64) + fastpathTV.DecMapUint32Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Int64X(vp *map[uint32]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Int64V(v map[uint32]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint32]int64, xlen) + changed = true + } + + var mk uint32 + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]float32) + v, changed := fastpathTV.DecMapUint32Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]float32) + fastpathTV.DecMapUint32Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Float32X(vp *map[uint32]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Float32V(v map[uint32]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[uint32]float32, xlen) + changed = true + } + + var mk uint32 + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]float64) + v, changed := fastpathTV.DecMapUint32Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]float64) + fastpathTV.DecMapUint32Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Float64X(vp *map[uint32]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Float64V(v map[uint32]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint32]float64, xlen) + changed = true + } + + var mk uint32 + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]bool) + v, changed := fastpathTV.DecMapUint32BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]bool) + fastpathTV.DecMapUint32BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32BoolX(vp *map[uint32]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32BoolV(v map[uint32]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[uint32]bool, xlen) + changed = true + } + + var mk uint32 + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]interface{}) + v, changed := fastpathTV.DecMapUint64IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]interface{}) + fastpathTV.DecMapUint64IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64IntfX(vp *map[uint64]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64IntfV(v map[uint64]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[uint64]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk uint64 + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]string) + v, changed := fastpathTV.DecMapUint64StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]string) + fastpathTV.DecMapUint64StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64StringX(vp *map[uint64]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64StringV(v map[uint64]string, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[uint64]string, xlen) + changed = true + } + + var mk uint64 + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]uint) + v, changed := fastpathTV.DecMapUint64UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]uint) + fastpathTV.DecMapUint64UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64UintX(vp *map[uint64]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64UintV(v map[uint64]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint64]uint, xlen) + changed = true + } + + var mk uint64 + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]uint8) + v, changed := fastpathTV.DecMapUint64Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]uint8) + fastpathTV.DecMapUint64Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Uint8X(vp *map[uint64]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Uint8V(v map[uint64]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint64]uint8, xlen) + changed = true + } + + var mk uint64 + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]uint16) + v, changed := fastpathTV.DecMapUint64Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]uint16) + fastpathTV.DecMapUint64Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Uint16X(vp *map[uint64]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Uint16V(v map[uint64]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint64]uint16, xlen) + changed = true + } + + var mk uint64 + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]uint32) + v, changed := fastpathTV.DecMapUint64Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]uint32) + fastpathTV.DecMapUint64Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Uint32X(vp *map[uint64]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Uint32V(v map[uint64]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint64]uint32, xlen) + changed = true + } + + var mk uint64 + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]uint64) + v, changed := fastpathTV.DecMapUint64Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]uint64) + fastpathTV.DecMapUint64Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Uint64X(vp *map[uint64]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Uint64V(v map[uint64]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint64]uint64, xlen) + changed = true + } + + var mk uint64 + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64UintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]uintptr) + v, changed := fastpathTV.DecMapUint64UintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]uintptr) + fastpathTV.DecMapUint64UintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64UintptrX(vp *map[uint64]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64UintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64UintptrV(v map[uint64]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint64]uintptr, xlen) + changed = true + } + + var mk uint64 + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]int) + v, changed := fastpathTV.DecMapUint64IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]int) + fastpathTV.DecMapUint64IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64IntX(vp *map[uint64]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64IntV(v map[uint64]int, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint64]int, xlen) + changed = true + } + + var mk uint64 + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]int8) + v, changed := fastpathTV.DecMapUint64Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]int8) + fastpathTV.DecMapUint64Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Int8X(vp *map[uint64]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Int8V(v map[uint64]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint64]int8, xlen) + changed = true + } + + var mk uint64 + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]int16) + v, changed := fastpathTV.DecMapUint64Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]int16) + fastpathTV.DecMapUint64Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Int16X(vp *map[uint64]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Int16V(v map[uint64]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint64]int16, xlen) + changed = true + } + + var mk uint64 + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]int32) + v, changed := fastpathTV.DecMapUint64Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]int32) + fastpathTV.DecMapUint64Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Int32X(vp *map[uint64]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Int32V(v map[uint64]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint64]int32, xlen) + changed = true + } + + var mk uint64 + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]int64) + v, changed := fastpathTV.DecMapUint64Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]int64) + fastpathTV.DecMapUint64Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Int64X(vp *map[uint64]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Int64V(v map[uint64]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint64]int64, xlen) + changed = true + } + + var mk uint64 + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]float32) + v, changed := fastpathTV.DecMapUint64Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]float32) + fastpathTV.DecMapUint64Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Float32X(vp *map[uint64]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Float32V(v map[uint64]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint64]float32, xlen) + changed = true + } + + var mk uint64 + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]float64) + v, changed := fastpathTV.DecMapUint64Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]float64) + fastpathTV.DecMapUint64Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Float64X(vp *map[uint64]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Float64V(v map[uint64]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint64]float64, xlen) + changed = true + } + + var mk uint64 + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]bool) + v, changed := fastpathTV.DecMapUint64BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]bool) + fastpathTV.DecMapUint64BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64BoolX(vp *map[uint64]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64BoolV(v map[uint64]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint64]bool, xlen) + changed = true + } + + var mk uint64 + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrIntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]interface{}) + v, changed := fastpathTV.DecMapUintptrIntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]interface{}) + fastpathTV.DecMapUintptrIntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrIntfX(vp *map[uintptr]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrIntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrIntfV(v map[uintptr]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[uintptr]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk uintptr + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrStringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]string) + v, changed := fastpathTV.DecMapUintptrStringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]string) + fastpathTV.DecMapUintptrStringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrStringX(vp *map[uintptr]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrStringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrStringV(v map[uintptr]string, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[uintptr]string, xlen) + changed = true + } + + var mk uintptr + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrUintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]uint) + v, changed := fastpathTV.DecMapUintptrUintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]uint) + fastpathTV.DecMapUintptrUintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrUintX(vp *map[uintptr]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrUintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrUintV(v map[uintptr]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uintptr]uint, xlen) + changed = true + } + + var mk uintptr + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrUint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]uint8) + v, changed := fastpathTV.DecMapUintptrUint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]uint8) + fastpathTV.DecMapUintptrUint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrUint8X(vp *map[uintptr]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrUint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrUint8V(v map[uintptr]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uintptr]uint8, xlen) + changed = true + } + + var mk uintptr + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrUint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]uint16) + v, changed := fastpathTV.DecMapUintptrUint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]uint16) + fastpathTV.DecMapUintptrUint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrUint16X(vp *map[uintptr]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrUint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrUint16V(v map[uintptr]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uintptr]uint16, xlen) + changed = true + } + + var mk uintptr + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrUint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]uint32) + v, changed := fastpathTV.DecMapUintptrUint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]uint32) + fastpathTV.DecMapUintptrUint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrUint32X(vp *map[uintptr]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrUint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrUint32V(v map[uintptr]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uintptr]uint32, xlen) + changed = true + } + + var mk uintptr + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrUint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]uint64) + v, changed := fastpathTV.DecMapUintptrUint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]uint64) + fastpathTV.DecMapUintptrUint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrUint64X(vp *map[uintptr]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrUint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrUint64V(v map[uintptr]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uintptr]uint64, xlen) + changed = true + } + + var mk uintptr + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrUintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]uintptr) + v, changed := fastpathTV.DecMapUintptrUintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]uintptr) + fastpathTV.DecMapUintptrUintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrUintptrX(vp *map[uintptr]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrUintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrUintptrV(v map[uintptr]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uintptr]uintptr, xlen) + changed = true + } + + var mk uintptr + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrIntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]int) + v, changed := fastpathTV.DecMapUintptrIntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]int) + fastpathTV.DecMapUintptrIntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrIntX(vp *map[uintptr]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrIntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrIntV(v map[uintptr]int, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uintptr]int, xlen) + changed = true + } + + var mk uintptr + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrInt8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]int8) + v, changed := fastpathTV.DecMapUintptrInt8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]int8) + fastpathTV.DecMapUintptrInt8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrInt8X(vp *map[uintptr]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrInt8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrInt8V(v map[uintptr]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uintptr]int8, xlen) + changed = true + } + + var mk uintptr + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrInt16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]int16) + v, changed := fastpathTV.DecMapUintptrInt16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]int16) + fastpathTV.DecMapUintptrInt16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrInt16X(vp *map[uintptr]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrInt16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrInt16V(v map[uintptr]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uintptr]int16, xlen) + changed = true + } + + var mk uintptr + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrInt32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]int32) + v, changed := fastpathTV.DecMapUintptrInt32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]int32) + fastpathTV.DecMapUintptrInt32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrInt32X(vp *map[uintptr]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrInt32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrInt32V(v map[uintptr]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uintptr]int32, xlen) + changed = true + } + + var mk uintptr + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrInt64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]int64) + v, changed := fastpathTV.DecMapUintptrInt64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]int64) + fastpathTV.DecMapUintptrInt64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrInt64X(vp *map[uintptr]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrInt64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrInt64V(v map[uintptr]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uintptr]int64, xlen) + changed = true + } + + var mk uintptr + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrFloat32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]float32) + v, changed := fastpathTV.DecMapUintptrFloat32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]float32) + fastpathTV.DecMapUintptrFloat32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrFloat32X(vp *map[uintptr]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrFloat32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrFloat32V(v map[uintptr]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uintptr]float32, xlen) + changed = true + } + + var mk uintptr + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrFloat64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]float64) + v, changed := fastpathTV.DecMapUintptrFloat64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]float64) + fastpathTV.DecMapUintptrFloat64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrFloat64X(vp *map[uintptr]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrFloat64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrFloat64V(v map[uintptr]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uintptr]float64, xlen) + changed = true + } + + var mk uintptr + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrBoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]bool) + v, changed := fastpathTV.DecMapUintptrBoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]bool) + fastpathTV.DecMapUintptrBoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrBoolX(vp *map[uintptr]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrBoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrBoolV(v map[uintptr]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uintptr]bool, xlen) + changed = true + } + + var mk uintptr + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntIntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]interface{}) + v, changed := fastpathTV.DecMapIntIntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]interface{}) + fastpathTV.DecMapIntIntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntIntfX(vp *map[int]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntIntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntIntfV(v map[int]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[int]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[int]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk int + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntStringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]string) + v, changed := fastpathTV.DecMapIntStringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]string) + fastpathTV.DecMapIntStringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntStringX(vp *map[int]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntStringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntStringV(v map[int]string, checkNil bool, canChange bool, + d *Decoder) (_ map[int]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[int]string, xlen) + changed = true + } + + var mk int + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntUintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]uint) + v, changed := fastpathTV.DecMapIntUintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]uint) + fastpathTV.DecMapIntUintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntUintX(vp *map[int]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntUintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntUintV(v map[int]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[int]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int]uint, xlen) + changed = true + } + + var mk int + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntUint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]uint8) + v, changed := fastpathTV.DecMapIntUint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]uint8) + fastpathTV.DecMapIntUint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntUint8X(vp *map[int]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntUint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntUint8V(v map[int]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[int]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int]uint8, xlen) + changed = true + } + + var mk int + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntUint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]uint16) + v, changed := fastpathTV.DecMapIntUint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]uint16) + fastpathTV.DecMapIntUint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntUint16X(vp *map[int]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntUint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntUint16V(v map[int]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[int]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int]uint16, xlen) + changed = true + } + + var mk int + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntUint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]uint32) + v, changed := fastpathTV.DecMapIntUint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]uint32) + fastpathTV.DecMapIntUint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntUint32X(vp *map[int]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntUint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntUint32V(v map[int]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[int]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int]uint32, xlen) + changed = true + } + + var mk int + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntUint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]uint64) + v, changed := fastpathTV.DecMapIntUint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]uint64) + fastpathTV.DecMapIntUint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntUint64X(vp *map[int]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntUint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntUint64V(v map[int]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[int]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int]uint64, xlen) + changed = true + } + + var mk int + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntUintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]uintptr) + v, changed := fastpathTV.DecMapIntUintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]uintptr) + fastpathTV.DecMapIntUintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntUintptrX(vp *map[int]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntUintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntUintptrV(v map[int]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[int]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int]uintptr, xlen) + changed = true + } + + var mk int + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntIntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]int) + v, changed := fastpathTV.DecMapIntIntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]int) + fastpathTV.DecMapIntIntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntIntX(vp *map[int]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntIntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntIntV(v map[int]int, checkNil bool, canChange bool, + d *Decoder) (_ map[int]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int]int, xlen) + changed = true + } + + var mk int + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntInt8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]int8) + v, changed := fastpathTV.DecMapIntInt8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]int8) + fastpathTV.DecMapIntInt8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntInt8X(vp *map[int]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntInt8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntInt8V(v map[int]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[int]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int]int8, xlen) + changed = true + } + + var mk int + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntInt16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]int16) + v, changed := fastpathTV.DecMapIntInt16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]int16) + fastpathTV.DecMapIntInt16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntInt16X(vp *map[int]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntInt16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntInt16V(v map[int]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[int]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int]int16, xlen) + changed = true + } + + var mk int + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntInt32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]int32) + v, changed := fastpathTV.DecMapIntInt32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]int32) + fastpathTV.DecMapIntInt32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntInt32X(vp *map[int]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntInt32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntInt32V(v map[int]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[int]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int]int32, xlen) + changed = true + } + + var mk int + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntInt64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]int64) + v, changed := fastpathTV.DecMapIntInt64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]int64) + fastpathTV.DecMapIntInt64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntInt64X(vp *map[int]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntInt64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntInt64V(v map[int]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[int]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int]int64, xlen) + changed = true + } + + var mk int + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntFloat32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]float32) + v, changed := fastpathTV.DecMapIntFloat32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]float32) + fastpathTV.DecMapIntFloat32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntFloat32X(vp *map[int]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntFloat32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntFloat32V(v map[int]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[int]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int]float32, xlen) + changed = true + } + + var mk int + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntFloat64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]float64) + v, changed := fastpathTV.DecMapIntFloat64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]float64) + fastpathTV.DecMapIntFloat64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntFloat64X(vp *map[int]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntFloat64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntFloat64V(v map[int]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[int]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int]float64, xlen) + changed = true + } + + var mk int + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntBoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]bool) + v, changed := fastpathTV.DecMapIntBoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]bool) + fastpathTV.DecMapIntBoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntBoolX(vp *map[int]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntBoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntBoolV(v map[int]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[int]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int]bool, xlen) + changed = true + } + + var mk int + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]interface{}) + v, changed := fastpathTV.DecMapInt8IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]interface{}) + fastpathTV.DecMapInt8IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8IntfX(vp *map[int8]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8IntfV(v map[int8]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[int8]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk int8 + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]string) + v, changed := fastpathTV.DecMapInt8StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]string) + fastpathTV.DecMapInt8StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8StringX(vp *map[int8]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8StringV(v map[int8]string, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[int8]string, xlen) + changed = true + } + + var mk int8 + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]uint) + v, changed := fastpathTV.DecMapInt8UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]uint) + fastpathTV.DecMapInt8UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8UintX(vp *map[int8]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8UintV(v map[int8]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int8]uint, xlen) + changed = true + } + + var mk int8 + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]uint8) + v, changed := fastpathTV.DecMapInt8Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]uint8) + fastpathTV.DecMapInt8Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Uint8X(vp *map[int8]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Uint8V(v map[int8]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[int8]uint8, xlen) + changed = true + } + + var mk int8 + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]uint16) + v, changed := fastpathTV.DecMapInt8Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]uint16) + fastpathTV.DecMapInt8Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Uint16X(vp *map[int8]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Uint16V(v map[int8]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[int8]uint16, xlen) + changed = true + } + + var mk int8 + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]uint32) + v, changed := fastpathTV.DecMapInt8Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]uint32) + fastpathTV.DecMapInt8Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Uint32X(vp *map[int8]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Uint32V(v map[int8]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[int8]uint32, xlen) + changed = true + } + + var mk int8 + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]uint64) + v, changed := fastpathTV.DecMapInt8Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]uint64) + fastpathTV.DecMapInt8Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Uint64X(vp *map[int8]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Uint64V(v map[int8]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int8]uint64, xlen) + changed = true + } + + var mk int8 + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8UintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]uintptr) + v, changed := fastpathTV.DecMapInt8UintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]uintptr) + fastpathTV.DecMapInt8UintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8UintptrX(vp *map[int8]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8UintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8UintptrV(v map[int8]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int8]uintptr, xlen) + changed = true + } + + var mk int8 + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]int) + v, changed := fastpathTV.DecMapInt8IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]int) + fastpathTV.DecMapInt8IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8IntX(vp *map[int8]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8IntV(v map[int8]int, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int8]int, xlen) + changed = true + } + + var mk int8 + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]int8) + v, changed := fastpathTV.DecMapInt8Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]int8) + fastpathTV.DecMapInt8Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Int8X(vp *map[int8]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Int8V(v map[int8]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[int8]int8, xlen) + changed = true + } + + var mk int8 + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]int16) + v, changed := fastpathTV.DecMapInt8Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]int16) + fastpathTV.DecMapInt8Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Int16X(vp *map[int8]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Int16V(v map[int8]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[int8]int16, xlen) + changed = true + } + + var mk int8 + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]int32) + v, changed := fastpathTV.DecMapInt8Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]int32) + fastpathTV.DecMapInt8Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Int32X(vp *map[int8]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Int32V(v map[int8]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[int8]int32, xlen) + changed = true + } + + var mk int8 + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]int64) + v, changed := fastpathTV.DecMapInt8Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]int64) + fastpathTV.DecMapInt8Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Int64X(vp *map[int8]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Int64V(v map[int8]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int8]int64, xlen) + changed = true + } + + var mk int8 + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]float32) + v, changed := fastpathTV.DecMapInt8Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]float32) + fastpathTV.DecMapInt8Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Float32X(vp *map[int8]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Float32V(v map[int8]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[int8]float32, xlen) + changed = true + } + + var mk int8 + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]float64) + v, changed := fastpathTV.DecMapInt8Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]float64) + fastpathTV.DecMapInt8Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Float64X(vp *map[int8]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Float64V(v map[int8]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int8]float64, xlen) + changed = true + } + + var mk int8 + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]bool) + v, changed := fastpathTV.DecMapInt8BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]bool) + fastpathTV.DecMapInt8BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8BoolX(vp *map[int8]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8BoolV(v map[int8]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[int8]bool, xlen) + changed = true + } + + var mk int8 + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]interface{}) + v, changed := fastpathTV.DecMapInt16IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]interface{}) + fastpathTV.DecMapInt16IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16IntfX(vp *map[int16]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16IntfV(v map[int16]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18) + v = make(map[int16]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk int16 + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]string) + v, changed := fastpathTV.DecMapInt16StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]string) + fastpathTV.DecMapInt16StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16StringX(vp *map[int16]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16StringV(v map[int16]string, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18) + v = make(map[int16]string, xlen) + changed = true + } + + var mk int16 + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]uint) + v, changed := fastpathTV.DecMapInt16UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]uint) + fastpathTV.DecMapInt16UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16UintX(vp *map[int16]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16UintV(v map[int16]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int16]uint, xlen) + changed = true + } + + var mk int16 + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]uint8) + v, changed := fastpathTV.DecMapInt16Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]uint8) + fastpathTV.DecMapInt16Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Uint8X(vp *map[int16]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Uint8V(v map[int16]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[int16]uint8, xlen) + changed = true + } + + var mk int16 + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]uint16) + v, changed := fastpathTV.DecMapInt16Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]uint16) + fastpathTV.DecMapInt16Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Uint16X(vp *map[int16]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Uint16V(v map[int16]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 4) + v = make(map[int16]uint16, xlen) + changed = true + } + + var mk int16 + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]uint32) + v, changed := fastpathTV.DecMapInt16Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]uint32) + fastpathTV.DecMapInt16Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Uint32X(vp *map[int16]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Uint32V(v map[int16]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[int16]uint32, xlen) + changed = true + } + + var mk int16 + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]uint64) + v, changed := fastpathTV.DecMapInt16Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]uint64) + fastpathTV.DecMapInt16Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Uint64X(vp *map[int16]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Uint64V(v map[int16]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int16]uint64, xlen) + changed = true + } + + var mk int16 + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16UintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]uintptr) + v, changed := fastpathTV.DecMapInt16UintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]uintptr) + fastpathTV.DecMapInt16UintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16UintptrX(vp *map[int16]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16UintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16UintptrV(v map[int16]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int16]uintptr, xlen) + changed = true + } + + var mk int16 + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]int) + v, changed := fastpathTV.DecMapInt16IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]int) + fastpathTV.DecMapInt16IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16IntX(vp *map[int16]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16IntV(v map[int16]int, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int16]int, xlen) + changed = true + } + + var mk int16 + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]int8) + v, changed := fastpathTV.DecMapInt16Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]int8) + fastpathTV.DecMapInt16Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Int8X(vp *map[int16]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Int8V(v map[int16]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[int16]int8, xlen) + changed = true + } + + var mk int16 + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]int16) + v, changed := fastpathTV.DecMapInt16Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]int16) + fastpathTV.DecMapInt16Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Int16X(vp *map[int16]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Int16V(v map[int16]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 4) + v = make(map[int16]int16, xlen) + changed = true + } + + var mk int16 + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]int32) + v, changed := fastpathTV.DecMapInt16Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]int32) + fastpathTV.DecMapInt16Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Int32X(vp *map[int16]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Int32V(v map[int16]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[int16]int32, xlen) + changed = true + } + + var mk int16 + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]int64) + v, changed := fastpathTV.DecMapInt16Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]int64) + fastpathTV.DecMapInt16Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Int64X(vp *map[int16]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Int64V(v map[int16]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int16]int64, xlen) + changed = true + } + + var mk int16 + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]float32) + v, changed := fastpathTV.DecMapInt16Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]float32) + fastpathTV.DecMapInt16Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Float32X(vp *map[int16]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Float32V(v map[int16]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[int16]float32, xlen) + changed = true + } + + var mk int16 + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]float64) + v, changed := fastpathTV.DecMapInt16Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]float64) + fastpathTV.DecMapInt16Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Float64X(vp *map[int16]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Float64V(v map[int16]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int16]float64, xlen) + changed = true + } + + var mk int16 + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]bool) + v, changed := fastpathTV.DecMapInt16BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]bool) + fastpathTV.DecMapInt16BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16BoolX(vp *map[int16]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16BoolV(v map[int16]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[int16]bool, xlen) + changed = true + } + + var mk int16 + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]interface{}) + v, changed := fastpathTV.DecMapInt32IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]interface{}) + fastpathTV.DecMapInt32IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32IntfX(vp *map[int32]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32IntfV(v map[int32]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[int32]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk int32 + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]string) + v, changed := fastpathTV.DecMapInt32StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]string) + fastpathTV.DecMapInt32StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32StringX(vp *map[int32]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32StringV(v map[int32]string, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[int32]string, xlen) + changed = true + } + + var mk int32 + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]uint) + v, changed := fastpathTV.DecMapInt32UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]uint) + fastpathTV.DecMapInt32UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32UintX(vp *map[int32]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32UintV(v map[int32]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int32]uint, xlen) + changed = true + } + + var mk int32 + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]uint8) + v, changed := fastpathTV.DecMapInt32Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]uint8) + fastpathTV.DecMapInt32Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Uint8X(vp *map[int32]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Uint8V(v map[int32]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[int32]uint8, xlen) + changed = true + } + + var mk int32 + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]uint16) + v, changed := fastpathTV.DecMapInt32Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]uint16) + fastpathTV.DecMapInt32Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Uint16X(vp *map[int32]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Uint16V(v map[int32]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[int32]uint16, xlen) + changed = true + } + + var mk int32 + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]uint32) + v, changed := fastpathTV.DecMapInt32Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]uint32) + fastpathTV.DecMapInt32Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Uint32X(vp *map[int32]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Uint32V(v map[int32]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[int32]uint32, xlen) + changed = true + } + + var mk int32 + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]uint64) + v, changed := fastpathTV.DecMapInt32Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]uint64) + fastpathTV.DecMapInt32Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Uint64X(vp *map[int32]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Uint64V(v map[int32]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int32]uint64, xlen) + changed = true + } + + var mk int32 + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32UintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]uintptr) + v, changed := fastpathTV.DecMapInt32UintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]uintptr) + fastpathTV.DecMapInt32UintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32UintptrX(vp *map[int32]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32UintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32UintptrV(v map[int32]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int32]uintptr, xlen) + changed = true + } + + var mk int32 + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]int) + v, changed := fastpathTV.DecMapInt32IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]int) + fastpathTV.DecMapInt32IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32IntX(vp *map[int32]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32IntV(v map[int32]int, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int32]int, xlen) + changed = true + } + + var mk int32 + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]int8) + v, changed := fastpathTV.DecMapInt32Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]int8) + fastpathTV.DecMapInt32Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Int8X(vp *map[int32]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Int8V(v map[int32]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[int32]int8, xlen) + changed = true + } + + var mk int32 + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]int16) + v, changed := fastpathTV.DecMapInt32Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]int16) + fastpathTV.DecMapInt32Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Int16X(vp *map[int32]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Int16V(v map[int32]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[int32]int16, xlen) + changed = true + } + + var mk int32 + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]int32) + v, changed := fastpathTV.DecMapInt32Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]int32) + fastpathTV.DecMapInt32Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Int32X(vp *map[int32]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Int32V(v map[int32]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[int32]int32, xlen) + changed = true + } + + var mk int32 + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]int64) + v, changed := fastpathTV.DecMapInt32Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]int64) + fastpathTV.DecMapInt32Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Int64X(vp *map[int32]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Int64V(v map[int32]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int32]int64, xlen) + changed = true + } + + var mk int32 + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]float32) + v, changed := fastpathTV.DecMapInt32Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]float32) + fastpathTV.DecMapInt32Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Float32X(vp *map[int32]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Float32V(v map[int32]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[int32]float32, xlen) + changed = true + } + + var mk int32 + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]float64) + v, changed := fastpathTV.DecMapInt32Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]float64) + fastpathTV.DecMapInt32Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Float64X(vp *map[int32]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Float64V(v map[int32]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int32]float64, xlen) + changed = true + } + + var mk int32 + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]bool) + v, changed := fastpathTV.DecMapInt32BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]bool) + fastpathTV.DecMapInt32BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32BoolX(vp *map[int32]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32BoolV(v map[int32]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[int32]bool, xlen) + changed = true + } + + var mk int32 + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]interface{}) + v, changed := fastpathTV.DecMapInt64IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]interface{}) + fastpathTV.DecMapInt64IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64IntfX(vp *map[int64]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64IntfV(v map[int64]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[int64]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk int64 + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]string) + v, changed := fastpathTV.DecMapInt64StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]string) + fastpathTV.DecMapInt64StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64StringX(vp *map[int64]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64StringV(v map[int64]string, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[int64]string, xlen) + changed = true + } + + var mk int64 + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]uint) + v, changed := fastpathTV.DecMapInt64UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]uint) + fastpathTV.DecMapInt64UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64UintX(vp *map[int64]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64UintV(v map[int64]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int64]uint, xlen) + changed = true + } + + var mk int64 + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]uint8) + v, changed := fastpathTV.DecMapInt64Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]uint8) + fastpathTV.DecMapInt64Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Uint8X(vp *map[int64]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Uint8V(v map[int64]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int64]uint8, xlen) + changed = true + } + + var mk int64 + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]uint16) + v, changed := fastpathTV.DecMapInt64Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]uint16) + fastpathTV.DecMapInt64Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Uint16X(vp *map[int64]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Uint16V(v map[int64]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int64]uint16, xlen) + changed = true + } + + var mk int64 + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]uint32) + v, changed := fastpathTV.DecMapInt64Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]uint32) + fastpathTV.DecMapInt64Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Uint32X(vp *map[int64]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Uint32V(v map[int64]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int64]uint32, xlen) + changed = true + } + + var mk int64 + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]uint64) + v, changed := fastpathTV.DecMapInt64Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]uint64) + fastpathTV.DecMapInt64Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Uint64X(vp *map[int64]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Uint64V(v map[int64]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int64]uint64, xlen) + changed = true + } + + var mk int64 + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64UintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]uintptr) + v, changed := fastpathTV.DecMapInt64UintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]uintptr) + fastpathTV.DecMapInt64UintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64UintptrX(vp *map[int64]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64UintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64UintptrV(v map[int64]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int64]uintptr, xlen) + changed = true + } + + var mk int64 + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]int) + v, changed := fastpathTV.DecMapInt64IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]int) + fastpathTV.DecMapInt64IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64IntX(vp *map[int64]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64IntV(v map[int64]int, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int64]int, xlen) + changed = true + } + + var mk int64 + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]int8) + v, changed := fastpathTV.DecMapInt64Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]int8) + fastpathTV.DecMapInt64Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Int8X(vp *map[int64]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Int8V(v map[int64]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int64]int8, xlen) + changed = true + } + + var mk int64 + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]int16) + v, changed := fastpathTV.DecMapInt64Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]int16) + fastpathTV.DecMapInt64Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Int16X(vp *map[int64]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Int16V(v map[int64]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int64]int16, xlen) + changed = true + } + + var mk int64 + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]int32) + v, changed := fastpathTV.DecMapInt64Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]int32) + fastpathTV.DecMapInt64Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Int32X(vp *map[int64]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Int32V(v map[int64]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int64]int32, xlen) + changed = true + } + + var mk int64 + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]int64) + v, changed := fastpathTV.DecMapInt64Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]int64) + fastpathTV.DecMapInt64Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Int64X(vp *map[int64]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Int64V(v map[int64]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int64]int64, xlen) + changed = true + } + + var mk int64 + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]float32) + v, changed := fastpathTV.DecMapInt64Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]float32) + fastpathTV.DecMapInt64Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Float32X(vp *map[int64]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Float32V(v map[int64]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int64]float32, xlen) + changed = true + } + + var mk int64 + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]float64) + v, changed := fastpathTV.DecMapInt64Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]float64) + fastpathTV.DecMapInt64Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Float64X(vp *map[int64]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Float64V(v map[int64]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int64]float64, xlen) + changed = true + } + + var mk int64 + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]bool) + v, changed := fastpathTV.DecMapInt64BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]bool) + fastpathTV.DecMapInt64BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64BoolX(vp *map[int64]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64BoolV(v map[int64]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int64]bool, xlen) + changed = true + } + + var mk int64 + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolIntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]interface{}) + v, changed := fastpathTV.DecMapBoolIntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]interface{}) + fastpathTV.DecMapBoolIntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolIntfX(vp *map[bool]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolIntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolIntfV(v map[bool]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[bool]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk bool + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolStringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]string) + v, changed := fastpathTV.DecMapBoolStringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]string) + fastpathTV.DecMapBoolStringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolStringX(vp *map[bool]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolStringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolStringV(v map[bool]string, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[bool]string, xlen) + changed = true + } + + var mk bool + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolUintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]uint) + v, changed := fastpathTV.DecMapBoolUintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]uint) + fastpathTV.DecMapBoolUintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolUintX(vp *map[bool]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolUintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolUintV(v map[bool]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[bool]uint, xlen) + changed = true + } + + var mk bool + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolUint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]uint8) + v, changed := fastpathTV.DecMapBoolUint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]uint8) + fastpathTV.DecMapBoolUint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolUint8X(vp *map[bool]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolUint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolUint8V(v map[bool]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[bool]uint8, xlen) + changed = true + } + + var mk bool + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolUint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]uint16) + v, changed := fastpathTV.DecMapBoolUint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]uint16) + fastpathTV.DecMapBoolUint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolUint16X(vp *map[bool]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolUint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolUint16V(v map[bool]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[bool]uint16, xlen) + changed = true + } + + var mk bool + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolUint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]uint32) + v, changed := fastpathTV.DecMapBoolUint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]uint32) + fastpathTV.DecMapBoolUint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolUint32X(vp *map[bool]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolUint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolUint32V(v map[bool]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[bool]uint32, xlen) + changed = true + } + + var mk bool + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolUint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]uint64) + v, changed := fastpathTV.DecMapBoolUint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]uint64) + fastpathTV.DecMapBoolUint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolUint64X(vp *map[bool]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolUint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolUint64V(v map[bool]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[bool]uint64, xlen) + changed = true + } + + var mk bool + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolUintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]uintptr) + v, changed := fastpathTV.DecMapBoolUintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]uintptr) + fastpathTV.DecMapBoolUintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolUintptrX(vp *map[bool]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolUintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolUintptrV(v map[bool]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[bool]uintptr, xlen) + changed = true + } + + var mk bool + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolIntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]int) + v, changed := fastpathTV.DecMapBoolIntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]int) + fastpathTV.DecMapBoolIntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolIntX(vp *map[bool]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolIntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolIntV(v map[bool]int, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[bool]int, xlen) + changed = true + } + + var mk bool + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolInt8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]int8) + v, changed := fastpathTV.DecMapBoolInt8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]int8) + fastpathTV.DecMapBoolInt8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolInt8X(vp *map[bool]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolInt8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolInt8V(v map[bool]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[bool]int8, xlen) + changed = true + } + + var mk bool + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolInt16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]int16) + v, changed := fastpathTV.DecMapBoolInt16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]int16) + fastpathTV.DecMapBoolInt16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolInt16X(vp *map[bool]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolInt16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolInt16V(v map[bool]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[bool]int16, xlen) + changed = true + } + + var mk bool + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolInt32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]int32) + v, changed := fastpathTV.DecMapBoolInt32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]int32) + fastpathTV.DecMapBoolInt32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolInt32X(vp *map[bool]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolInt32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolInt32V(v map[bool]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[bool]int32, xlen) + changed = true + } + + var mk bool + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolInt64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]int64) + v, changed := fastpathTV.DecMapBoolInt64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]int64) + fastpathTV.DecMapBoolInt64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolInt64X(vp *map[bool]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolInt64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolInt64V(v map[bool]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[bool]int64, xlen) + changed = true + } + + var mk bool + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolFloat32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]float32) + v, changed := fastpathTV.DecMapBoolFloat32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]float32) + fastpathTV.DecMapBoolFloat32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolFloat32X(vp *map[bool]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolFloat32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolFloat32V(v map[bool]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[bool]float32, xlen) + changed = true + } + + var mk bool + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolFloat64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]float64) + v, changed := fastpathTV.DecMapBoolFloat64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]float64) + fastpathTV.DecMapBoolFloat64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolFloat64X(vp *map[bool]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolFloat64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolFloat64V(v map[bool]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[bool]float64, xlen) + changed = true + } + + var mk bool + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolBoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]bool) + v, changed := fastpathTV.DecMapBoolBoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]bool) + fastpathTV.DecMapBoolBoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolBoolX(vp *map[bool]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolBoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolBoolV(v map[bool]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[bool]bool, xlen) + changed = true + } + + var mk bool + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/fast-path.go.tmpl b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/fast-path.go.tmpl new file mode 100644 index 0000000000000..58cc6df4c54b5 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/fast-path.go.tmpl @@ -0,0 +1,511 @@ +// +build !notfastpath + +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED from fast-path.go.tmpl +// ************************************************************ + +package codec + +// Fast path functions try to create a fast path encode or decode implementation +// for common maps and slices. +// +// We define the functions and register then in this single file +// so as not to pollute the encode.go and decode.go, and create a dependency in there. +// This file can be omitted without causing a build failure. +// +// The advantage of fast paths is: +// - Many calls bypass reflection altogether +// +// Currently support +// - slice of all builtin types, +// - map of all builtin types to string or interface value +// - symetrical maps of all builtin types (e.g. str-str, uint8-uint8) +// This should provide adequate "typical" implementations. +// +// Note that fast track decode functions must handle values for which an address cannot be obtained. +// For example: +// m2 := map[string]int{} +// p2 := []interface{}{m2} +// // decoding into p2 will bomb if fast track functions do not treat like unaddressable. +// + +import ( + "reflect" + "sort" +) + +const fastpathCheckNilFalse = false // for reflect +const fastpathCheckNilTrue = true // for type switch + +type fastpathT struct {} + +var fastpathTV fastpathT + +type fastpathE struct { + rtid uintptr + rt reflect.Type + encfn func(*encFnInfo, reflect.Value) + decfn func(*decFnInfo, reflect.Value) +} + +type fastpathA [{{ .FastpathLen }}]fastpathE + +func (x *fastpathA) index(rtid uintptr) int { + // use binary search to grab the index (adapted from sort/search.go) + h, i, j := 0, 0, {{ .FastpathLen }} // len(x) + for i < j { + h = i + (j-i)/2 + if x[h].rtid < rtid { + i = h + 1 + } else { + j = h + } + } + if i < {{ .FastpathLen }} && x[i].rtid == rtid { + return i + } + return -1 +} + +type fastpathAslice []fastpathE + +func (x fastpathAslice) Len() int { return len(x) } +func (x fastpathAslice) Less(i, j int) bool { return x[i].rtid < x[j].rtid } +func (x fastpathAslice) Swap(i, j int) { x[i], x[j] = x[j], x[i] } + +var fastpathAV fastpathA + +// due to possible initialization loop error, make fastpath in an init() +func init() { + if !fastpathEnabled { + return + } + i := 0 + fn := func(v interface{}, fe func(*encFnInfo, reflect.Value), fd func(*decFnInfo, reflect.Value)) (f fastpathE) { + xrt := reflect.TypeOf(v) + xptr := reflect.ValueOf(xrt).Pointer() + fastpathAV[i] = fastpathE{xptr, xrt, fe, fd} + i++ + return + } + + {{range .Values}}{{if not .Primitive}}{{if not .MapKey }} + fn([]{{ .Elem }}(nil), (*encFnInfo).{{ .MethodNamePfx "fastpathEnc" false }}R, (*decFnInfo).{{ .MethodNamePfx "fastpathDec" false }}R){{end}}{{end}}{{end}} + + {{range .Values}}{{if not .Primitive}}{{if .MapKey }} + fn(map[{{ .MapKey }}]{{ .Elem }}(nil), (*encFnInfo).{{ .MethodNamePfx "fastpathEnc" false }}R, (*decFnInfo).{{ .MethodNamePfx "fastpathDec" false }}R){{end}}{{end}}{{end}} + + sort.Sort(fastpathAslice(fastpathAV[:])) +} + +// -- encode + +// -- -- fast path type switch +func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { + if !fastpathEnabled { + return false + } + switch v := iv.(type) { +{{range .Values}}{{if not .Primitive}}{{if not .MapKey }} + case []{{ .Elem }}:{{else}} + case map[{{ .MapKey }}]{{ .Elem }}:{{end}} + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, fastpathCheckNilTrue, e){{if not .MapKey }} + case *[]{{ .Elem }}:{{else}} + case *map[{{ .MapKey }}]{{ .Elem }}:{{end}} + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, fastpathCheckNilTrue, e) +{{end}}{{end}} + default: + _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + return false + } + return true +} + +func fastpathEncodeTypeSwitchSlice(iv interface{}, e *Encoder) bool { + if !fastpathEnabled { + return false + } + switch v := iv.(type) { +{{range .Values}}{{if not .Primitive}}{{if not .MapKey }} + case []{{ .Elem }}: + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, fastpathCheckNilTrue, e) + case *[]{{ .Elem }}: + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, fastpathCheckNilTrue, e) +{{end}}{{end}}{{end}} + default: + _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + return false + } + return true +} + +func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { + if !fastpathEnabled { + return false + } + switch v := iv.(type) { +{{range .Values}}{{if not .Primitive}}{{if .MapKey }} + case map[{{ .MapKey }}]{{ .Elem }}: + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, fastpathCheckNilTrue, e) + case *map[{{ .MapKey }}]{{ .Elem }}: + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, fastpathCheckNilTrue, e) +{{end}}{{end}}{{end}} + default: + _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + return false + } + return true +} + +// -- -- fast path functions +{{range .Values}}{{if not .Primitive}}{{if not .MapKey }} + +func (f *encFnInfo) {{ .MethodNamePfx "fastpathEnc" false }}R(rv reflect.Value) { + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(rv.Interface().([]{{ .Elem }}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) {{ .MethodNamePfx "Enc" false }}V(v []{{ .Elem }}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { cr.sendContainerState(containerArrayElem) } + {{ encmd .Elem "v2"}} + } + if cr != nil { cr.sendContainerState(containerArrayEnd) }{{/* ee.EncodeEnd() */}} +} + +{{end}}{{end}}{{end}} + +{{range .Values}}{{if not .Primitive}}{{if .MapKey }} + +func (f *encFnInfo) {{ .MethodNamePfx "fastpathEnc" false }}R(rv reflect.Value) { + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(rv.Interface().(map[{{ .MapKey }}]{{ .Elem }}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) {{ .MethodNamePfx "Enc" false }}V(v map[{{ .MapKey }}]{{ .Elem }}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + {{if eq .MapKey "string"}}asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + {{end}}if e.h.Canonical { + {{if eq .MapKey "interface{}"}}{{/* out of band + */}}var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI {{/* put loop variables outside. seems currently needed for better perf */}} + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { cr.sendContainerState(containerMapKey) } + e.asis(v2[j].v) + if cr != nil { cr.sendContainerState(containerMapValue) } + e.encode(v[v2[j].i]) + } {{else}}{{ $x := sorttype .MapKey true}}v2 := make([]{{ $x }}, len(v)) + var i int + for k, _ := range v { + v2[i] = {{ $x }}(k) + i++ + } + sort.Sort({{ sorttype .MapKey false}}(v2)) + for _, k2 := range v2 { + if cr != nil { cr.sendContainerState(containerMapKey) } + {{if eq .MapKey "string"}}if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + }{{else}}{{ $y := printf "%s(k2)" .MapKey }}{{ encmd .MapKey $y }}{{end}} + if cr != nil { cr.sendContainerState(containerMapValue) } + {{ $y := printf "v[%s(k2)]" .MapKey }}{{ encmd .Elem $y }} + } {{end}} + } else { + for k2, v2 := range v { + if cr != nil { cr.sendContainerState(containerMapKey) } + {{if eq .MapKey "string"}}if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + }{{else}}{{ encmd .MapKey "k2"}}{{end}} + if cr != nil { cr.sendContainerState(containerMapValue) } + {{ encmd .Elem "v2"}} + } + } + if cr != nil { cr.sendContainerState(containerMapEnd) }{{/* ee.EncodeEnd() */}} +} + +{{end}}{{end}}{{end}} + +// -- decode + +// -- -- fast path type switch +func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { + if !fastpathEnabled { + return false + } + switch v := iv.(type) { +{{range .Values}}{{if not .Primitive}}{{if not .MapKey }} + case []{{ .Elem }}:{{else}} + case map[{{ .MapKey }}]{{ .Elem }}:{{end}} + fastpathTV.{{ .MethodNamePfx "Dec" false }}V(v, fastpathCheckNilFalse, false, d){{if not .MapKey }} + case *[]{{ .Elem }}:{{else}} + case *map[{{ .MapKey }}]{{ .Elem }}:{{end}} + v2, changed2 := fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } +{{end}}{{end}} + default: + _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + return false + } + return true +} + +// -- -- fast path functions +{{range .Values}}{{if not .Primitive}}{{if not .MapKey }} +{{/* +Slices can change if they +- did not come from an array +- are addressable (from a ptr) +- are settable (e.g. contained in an interface{}) +*/}} +func (f *decFnInfo) {{ .MethodNamePfx "fastpathDec" false }}R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { {{/* // CanSet => CanAddr + Exported */}} + vp := rv.Addr().Interface().(*[]{{ .Elem }}) + v, changed := fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]{{ .Elem }}) + fastpathTV.{{ .MethodNamePfx "Dec" false }}V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) {{ .MethodNamePfx "Dec" false }}X(vp *[]{{ .Elem }}, checkNil bool, d *Decoder) { + v, changed := f.{{ .MethodNamePfx "Dec" false }}V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v []{{ .Elem }}, checkNil bool, canChange bool, d *Decoder) (_ []{{ .Elem }}, changed bool) { + dd := d.d + {{/* // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() */}} + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []{{ .Elem }}{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { {{/* + // fast-path is for "basic" immutable types, so no need to copy them over + // s := make([]{{ .Elem }}, decInferLen(containerLenS, d.h.MaxInitLen)) + // copy(s, v[:cap(v)]) + // v = s */}} + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, {{ .Size }}) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]{{ .Elem }}, xlen) + } + } else { + v = make([]{{ .Elem }}, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } {{/* // all checks done. cannot go past len. */}} + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + {{ if eq .Elem "interface{}" }}d.decode(&v[j]){{ else }}v[j] = {{ decmd .Elem }}{{ end }} + } + if xtrunc { {{/* // means canChange=true, changed=true already. */}} + for ; j < containerLenS; j++ { + v = append(v, {{ zerocmd .Elem }}) + slh.ElemContainerState(j) + {{ if eq .Elem "interface{}" }}d.decode(&v[j]){{ else }}v[j] = {{ decmd .Elem }}{{ end }} + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() {{/* check break first, so we can initialize v with a capacity of 4 if necessary */}} + if breakFound { + if canChange { + if v == nil { + v = []{{ .Elem }}{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]{{ .Elem }}, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, {{ zerocmd .Elem }}) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { {{/* // all checks done. cannot go past len. */}} + {{ if eq .Elem "interface{}" }}d.decode(&v[j]) + {{ else }}v[j] = {{ decmd .Elem }}{{ end }} + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +{{end}}{{end}}{{end}} + + +{{range .Values}}{{if not .Primitive}}{{if .MapKey }} +{{/* +Maps can change if they are +- addressable (from a ptr) +- settable (e.g. contained in an interface{}) +*/}} +func (f *decFnInfo) {{ .MethodNamePfx "fastpathDec" false }}R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[{{ .MapKey }}]{{ .Elem }}) + v, changed := fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[{{ .MapKey }}]{{ .Elem }}) + fastpathTV.{{ .MethodNamePfx "Dec" false }}V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) {{ .MethodNamePfx "Dec" false }}X(vp *map[{{ .MapKey }}]{{ .Elem }}, checkNil bool, d *Decoder) { + v, changed := f.{{ .MethodNamePfx "Dec" false }}V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v map[{{ .MapKey }}]{{ .Elem }}, checkNil bool, canChange bool, + d *Decoder) (_ map[{{ .MapKey }}]{{ .Elem }}, changed bool) { + dd := d.d + cr := d.cr + {{/* // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() */}} + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, {{ .Size }}) + v = make(map[{{ .MapKey }}]{{ .Elem }}, xlen) + changed = true + } + {{ if eq .Elem "interface{}" }}mapGet := !d.h.MapValueReset && !d.h.InterfaceReset{{end}} + var mk {{ .MapKey }} + var mv {{ .Elem }} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { cr.sendContainerState(containerMapKey) } + {{ if eq .MapKey "interface{}" }}mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) {{/* // maps cannot have []byte as key. switch to string. */}} + }{{ else }}mk = {{ decmd .MapKey }}{{ end }} + if cr != nil { cr.sendContainerState(containerMapValue) } + {{ if eq .Elem "interface{}" }}if mapGet { mv = v[mk] } else { mv = nil } + d.decode(&mv){{ else }}mv = {{ decmd .Elem }}{{ end }} + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { cr.sendContainerState(containerMapKey) } + {{ if eq .MapKey "interface{}" }}mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) {{/* // maps cannot have []byte as key. switch to string. */}} + }{{ else }}mk = {{ decmd .MapKey }}{{ end }} + if cr != nil { cr.sendContainerState(containerMapValue) } + {{ if eq .Elem "interface{}" }}if mapGet { mv = v[mk] } else { mv = nil } + d.decode(&mv){{ else }}mv = {{ decmd .Elem }}{{ end }} + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { cr.sendContainerState(containerMapEnd) } + return v, changed +} + +{{end}}{{end}}{{end}} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/fast-path.not.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/fast-path.not.go new file mode 100644 index 0000000000000..d6f5f0c911be7 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/fast-path.not.go @@ -0,0 +1,32 @@ +// +build notfastpath + +package codec + +import "reflect" + +// The generated fast-path code is very large, and adds a few seconds to the build time. +// This causes test execution, execution of small tools which use codec, etc +// to take a long time. +// +// To mitigate, we now support the notfastpath tag. +// This tag disables fastpath during build, allowing for faster build, test execution, +// short-program runs, etc. + +func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { return false } +func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { return false } +func fastpathEncodeTypeSwitchSlice(iv interface{}, e *Encoder) bool { return false } +func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { return false } + +type fastpathT struct{} +type fastpathE struct { + rtid uintptr + rt reflect.Type + encfn func(*encFnInfo, reflect.Value) + decfn func(*decFnInfo, reflect.Value) +} +type fastpathA [0]fastpathE + +func (x fastpathA) index(rtid uintptr) int { return -1 } + +var fastpathAV fastpathA +var fastpathTV fastpathT diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/gen-dec-array.go.tmpl b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/gen-dec-array.go.tmpl new file mode 100644 index 0000000000000..2caae5bfdaf80 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/gen-dec-array.go.tmpl @@ -0,0 +1,101 @@ +{{var "v"}} := {{if not isArray}}*{{end}}{{ .Varname }} +{{var "h"}}, {{var "l"}} := z.DecSliceHelperStart() {{/* // helper, containerLenS */}} +var {{var "c"}} bool {{/* // changed */}} +if {{var "l"}} == 0 { + {{if isSlice }}if {{var "v"}} == nil { + {{var "v"}} = []{{ .Typ }}{} + {{var "c"}} = true + } else if len({{var "v"}}) != 0 { + {{var "v"}} = {{var "v"}}[:0] + {{var "c"}} = true + } {{end}} {{if isChan }}if {{var "v"}} == nil { + {{var "v"}} = make({{ .CTyp }}, 0) + {{var "c"}} = true + } {{end}} +} else if {{var "l"}} > 0 { + {{if isChan }}if {{var "v"}} == nil { + {{var "rl"}}, _ = z.DecInferLen({{var "l"}}, z.DecBasicHandle().MaxInitLen, {{ .Size }}) + {{var "v"}} = make({{ .CTyp }}, {{var "rl"}}) + {{var "c"}} = true + } + for {{var "r"}} := 0; {{var "r"}} < {{var "l"}}; {{var "r"}}++ { + {{var "h"}}.ElemContainerState({{var "r"}}) + var {{var "t"}} {{ .Typ }} + {{ $x := printf "%st%s" .TempVar .Rand }}{{ decLineVar $x }} + {{var "v"}} <- {{var "t"}} + } + {{ else }} var {{var "rr"}}, {{var "rl"}} int {{/* // num2read, length of slice/array/chan */}} + var {{var "rt"}} bool {{/* truncated */}} + if {{var "l"}} > cap({{var "v"}}) { + {{if isArray }}z.DecArrayCannotExpand(len({{var "v"}}), {{var "l"}}) + {{ else }}{{if not .Immutable }} + {{var "rg"}} := len({{var "v"}}) > 0 + {{var "v2"}} := {{var "v"}} {{end}} + {{var "rl"}}, {{var "rt"}} = z.DecInferLen({{var "l"}}, z.DecBasicHandle().MaxInitLen, {{ .Size }}) + if {{var "rt"}} { + if {{var "rl"}} <= cap({{var "v"}}) { + {{var "v"}} = {{var "v"}}[:{{var "rl"}}] + } else { + {{var "v"}} = make([]{{ .Typ }}, {{var "rl"}}) + } + } else { + {{var "v"}} = make([]{{ .Typ }}, {{var "rl"}}) + } + {{var "c"}} = true + {{var "rr"}} = len({{var "v"}}) {{if not .Immutable }} + if {{var "rg"}} { copy({{var "v"}}, {{var "v2"}}) } {{end}} {{end}}{{/* end not Immutable, isArray */}} + } {{if isSlice }} else if {{var "l"}} != len({{var "v"}}) { + {{var "v"}} = {{var "v"}}[:{{var "l"}}] + {{var "c"}} = true + } {{end}} {{/* end isSlice:47 */}} + {{var "j"}} := 0 + for ; {{var "j"}} < {{var "rr"}} ; {{var "j"}}++ { + {{var "h"}}.ElemContainerState({{var "j"}}) + {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }} + } + {{if isArray }}for ; {{var "j"}} < {{var "l"}} ; {{var "j"}}++ { + {{var "h"}}.ElemContainerState({{var "j"}}) + z.DecSwallow() + } + {{ else }}if {{var "rt"}} { + for ; {{var "j"}} < {{var "l"}} ; {{var "j"}}++ { + {{var "v"}} = append({{var "v"}}, {{ zero}}) + {{var "h"}}.ElemContainerState({{var "j"}}) + {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }} + } + } {{end}} {{/* end isArray:56 */}} + {{end}} {{/* end isChan:16 */}} +} else { {{/* len < 0 */}} + {{var "j"}} := 0 + for ; !r.CheckBreak(); {{var "j"}}++ { + {{if isChan }} + {{var "h"}}.ElemContainerState({{var "j"}}) + var {{var "t"}} {{ .Typ }} + {{ $x := printf "%st%s" .TempVar .Rand }}{{ decLineVar $x }} + {{var "v"}} <- {{var "t"}} + {{ else }} + if {{var "j"}} >= len({{var "v"}}) { + {{if isArray }}z.DecArrayCannotExpand(len({{var "v"}}), {{var "j"}}+1) + {{ else }}{{var "v"}} = append({{var "v"}}, {{zero}})// var {{var "z"}} {{ .Typ }} + {{var "c"}} = true {{end}} + } + {{var "h"}}.ElemContainerState({{var "j"}}) + if {{var "j"}} < len({{var "v"}}) { + {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }} + } else { + z.DecSwallow() + } + {{end}} + } + {{if isSlice }}if {{var "j"}} < len({{var "v"}}) { + {{var "v"}} = {{var "v"}}[:{{var "j"}}] + {{var "c"}} = true + } else if {{var "j"}} == 0 && {{var "v"}} == nil { + {{var "v"}} = []{{ .Typ }}{} + {{var "c"}} = true + }{{end}} +} +{{var "h"}}.End() +{{if not isArray }}if {{var "c"}} { + *{{ .Varname }} = {{var "v"}} +}{{end}} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/gen-dec-map.go.tmpl b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/gen-dec-map.go.tmpl new file mode 100644 index 0000000000000..77400e0a1122e --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/gen-dec-map.go.tmpl @@ -0,0 +1,58 @@ +{{var "v"}} := *{{ .Varname }} +{{var "l"}} := r.ReadMapStart() +{{var "bh"}} := z.DecBasicHandle() +if {{var "v"}} == nil { + {{var "rl"}}, _ := z.DecInferLen({{var "l"}}, {{var "bh"}}.MaxInitLen, {{ .Size }}) + {{var "v"}} = make(map[{{ .KTyp }}]{{ .Typ }}, {{var "rl"}}) + *{{ .Varname }} = {{var "v"}} +} +var {{var "mk"}} {{ .KTyp }} +var {{var "mv"}} {{ .Typ }} +var {{var "mg"}} {{if decElemKindPtr}}, {{var "ms"}}, {{var "mok"}}{{end}} bool +if {{var "bh"}}.MapValueReset { + {{if decElemKindPtr}}{{var "mg"}} = true + {{else if decElemKindIntf}}if !{{var "bh"}}.InterfaceReset { {{var "mg"}} = true } + {{else if not decElemKindImmutable}}{{var "mg"}} = true + {{end}} } +if {{var "l"}} > 0 { +for {{var "j"}} := 0; {{var "j"}} < {{var "l"}}; {{var "j"}}++ { + z.DecSendContainerState(codecSelfer_containerMapKey{{ .Sfx }}) + {{ $x := printf "%vmk%v" .TempVar .Rand }}{{ decLineVarK $x }} +{{ if eq .KTyp "interface{}" }}{{/* // special case if a byte array. */}}if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} { + {{var "mk"}} = string({{var "bv"}}) + }{{ end }}{{if decElemKindPtr}} + {{var "ms"}} = true{{end}} + if {{var "mg"}} { + {{if decElemKindPtr}}{{var "mv"}}, {{var "mok"}} = {{var "v"}}[{{var "mk"}}] + if {{var "mok"}} { + {{var "ms"}} = false + } {{else}}{{var "mv"}} = {{var "v"}}[{{var "mk"}}] {{end}} + } {{if not decElemKindImmutable}}else { {{var "mv"}} = {{decElemZero}} }{{end}} + z.DecSendContainerState(codecSelfer_containerMapValue{{ .Sfx }}) + {{ $x := printf "%vmv%v" .TempVar .Rand }}{{ decLineVar $x }} + if {{if decElemKindPtr}} {{var "ms"}} && {{end}} {{var "v"}} != nil { + {{var "v"}}[{{var "mk"}}] = {{var "mv"}} + } +} +} else if {{var "l"}} < 0 { +for {{var "j"}} := 0; !r.CheckBreak(); {{var "j"}}++ { + z.DecSendContainerState(codecSelfer_containerMapKey{{ .Sfx }}) + {{ $x := printf "%vmk%v" .TempVar .Rand }}{{ decLineVarK $x }} +{{ if eq .KTyp "interface{}" }}{{/* // special case if a byte array. */}}if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} { + {{var "mk"}} = string({{var "bv"}}) + }{{ end }}{{if decElemKindPtr}} + {{var "ms"}} = true {{ end }} + if {{var "mg"}} { + {{if decElemKindPtr}}{{var "mv"}}, {{var "mok"}} = {{var "v"}}[{{var "mk"}}] + if {{var "mok"}} { + {{var "ms"}} = false + } {{else}}{{var "mv"}} = {{var "v"}}[{{var "mk"}}] {{end}} + } {{if not decElemKindImmutable}}else { {{var "mv"}} = {{decElemZero}} }{{end}} + z.DecSendContainerState(codecSelfer_containerMapValue{{ .Sfx }}) + {{ $x := printf "%vmv%v" .TempVar .Rand }}{{ decLineVar $x }} + if {{if decElemKindPtr}} {{var "ms"}} && {{end}} {{var "v"}} != nil { + {{var "v"}}[{{var "mk"}}] = {{var "mv"}} + } +} +} // else len==0: TODO: Should we clear map entries? +z.DecSendContainerState(codecSelfer_containerMapEnd{{ .Sfx }}) diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/gen-helper.generated.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/gen-helper.generated.go new file mode 100644 index 0000000000000..22bce776bb2bb --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/gen-helper.generated.go @@ -0,0 +1,233 @@ +// //+build ignore + +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED from gen-helper.go.tmpl +// ************************************************************ + +package codec + +import ( + "encoding" + "reflect" +) + +// This file is used to generate helper code for codecgen. +// The values here i.e. genHelper(En|De)coder are not to be used directly by +// library users. They WILL change continously and without notice. +// +// To help enforce this, we create an unexported type with exported members. +// The only way to get the type is via the one exported type that we control (somewhat). +// +// When static codecs are created for types, they will use this value +// to perform encoding or decoding of primitives or known slice or map types. + +// GenHelperEncoder is exported so that it can be used externally by codecgen. +// Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE. +func GenHelperEncoder(e *Encoder) (genHelperEncoder, encDriver) { + return genHelperEncoder{e: e}, e.e +} + +// GenHelperDecoder is exported so that it can be used externally by codecgen. +// Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE. +func GenHelperDecoder(d *Decoder) (genHelperDecoder, decDriver) { + return genHelperDecoder{d: d}, d.d +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +type genHelperEncoder struct { + e *Encoder + F fastpathT +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +type genHelperDecoder struct { + d *Decoder + F fastpathT +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncBasicHandle() *BasicHandle { + return f.e.h +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncBinary() bool { + return f.e.be // f.e.hh.isBinaryEncoding() +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncFallback(iv interface{}) { + // println(">>>>>>>>> EncFallback") + f.e.encodeI(iv, false, false) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncTextMarshal(iv encoding.TextMarshaler) { + bs, fnerr := iv.MarshalText() + f.e.marshal(bs, fnerr, false, c_UTF8) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncJSONMarshal(iv jsonMarshaler) { + bs, fnerr := iv.MarshalJSON() + f.e.marshal(bs, fnerr, true, c_UTF8) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncBinaryMarshal(iv encoding.BinaryMarshaler) { + bs, fnerr := iv.MarshalBinary() + f.e.marshal(bs, fnerr, false, c_RAW) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) TimeRtidIfBinc() uintptr { + if _, ok := f.e.hh.(*BincHandle); ok { + return timeTypId + } + return 0 +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) IsJSONHandle() bool { + return f.e.js +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) HasExtensions() bool { + return len(f.e.h.extHandle) != 0 +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncExt(v interface{}) (r bool) { + rt := reflect.TypeOf(v) + if rt.Kind() == reflect.Ptr { + rt = rt.Elem() + } + rtid := reflect.ValueOf(rt).Pointer() + if xfFn := f.e.h.getExt(rtid); xfFn != nil { + f.e.e.EncodeExt(v, xfFn.tag, xfFn.ext, f.e) + return true + } + return false +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncSendContainerState(c containerState) { + if f.e.cr != nil { + f.e.cr.sendContainerState(c) + } +} + +// ---------------- DECODER FOLLOWS ----------------- + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecBasicHandle() *BasicHandle { + return f.d.h +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecBinary() bool { + return f.d.be // f.d.hh.isBinaryEncoding() +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecSwallow() { + f.d.swallow() +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecScratchBuffer() []byte { + return f.d.b[:] +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecFallback(iv interface{}, chkPtr bool) { + // println(">>>>>>>>> DecFallback") + f.d.decodeI(iv, chkPtr, false, false, false) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecSliceHelperStart() (decSliceHelper, int) { + return f.d.decSliceHelperStart() +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecStructFieldNotFound(index int, name string) { + f.d.structFieldNotFound(index, name) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecArrayCannotExpand(sliceLen, streamLen int) { + f.d.arrayCannotExpand(sliceLen, streamLen) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecTextUnmarshal(tm encoding.TextUnmarshaler) { + fnerr := tm.UnmarshalText(f.d.d.DecodeBytes(f.d.b[:], true, true)) + if fnerr != nil { + panic(fnerr) + } +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecJSONUnmarshal(tm jsonUnmarshaler) { + // bs := f.dd.DecodeBytes(f.d.b[:], true, true) + // grab the bytes to be read, as UnmarshalJSON needs the full JSON so as to unmarshal it itself. + fnerr := tm.UnmarshalJSON(f.d.nextValueBytes()) + if fnerr != nil { + panic(fnerr) + } +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecBinaryUnmarshal(bm encoding.BinaryUnmarshaler) { + fnerr := bm.UnmarshalBinary(f.d.d.DecodeBytes(nil, false, true)) + if fnerr != nil { + panic(fnerr) + } +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) TimeRtidIfBinc() uintptr { + if _, ok := f.d.hh.(*BincHandle); ok { + return timeTypId + } + return 0 +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) IsJSONHandle() bool { + return f.d.js +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) HasExtensions() bool { + return len(f.d.h.extHandle) != 0 +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecExt(v interface{}) (r bool) { + rt := reflect.TypeOf(v).Elem() + rtid := reflect.ValueOf(rt).Pointer() + if xfFn := f.d.h.getExt(rtid); xfFn != nil { + f.d.d.DecodeExt(v, xfFn.tag, xfFn.ext) + return true + } + return false +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecInferLen(clen, maxlen, unit int) (rvlen int, truncated bool) { + return decInferLen(clen, maxlen, unit) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecSendContainerState(c containerState) { + if f.d.cr != nil { + f.d.cr.sendContainerState(c) + } +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/gen-helper.go.tmpl b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/gen-helper.go.tmpl new file mode 100644 index 0000000000000..31958574ffcc1 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/gen-helper.go.tmpl @@ -0,0 +1,364 @@ +// //+build ignore + +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED from gen-helper.go.tmpl +// ************************************************************ + +package codec + +import ( + "encoding" + "reflect" +) + +// This file is used to generate helper code for codecgen. +// The values here i.e. genHelper(En|De)coder are not to be used directly by +// library users. They WILL change continously and without notice. +// +// To help enforce this, we create an unexported type with exported members. +// The only way to get the type is via the one exported type that we control (somewhat). +// +// When static codecs are created for types, they will use this value +// to perform encoding or decoding of primitives or known slice or map types. + +// GenHelperEncoder is exported so that it can be used externally by codecgen. +// Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE. +func GenHelperEncoder(e *Encoder) (genHelperEncoder, encDriver) { + return genHelperEncoder{e:e}, e.e +} + +// GenHelperDecoder is exported so that it can be used externally by codecgen. +// Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE. +func GenHelperDecoder(d *Decoder) (genHelperDecoder, decDriver) { + return genHelperDecoder{d:d}, d.d +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +type genHelperEncoder struct { + e *Encoder + F fastpathT +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +type genHelperDecoder struct { + d *Decoder + F fastpathT +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncBasicHandle() *BasicHandle { + return f.e.h +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncBinary() bool { + return f.e.be // f.e.hh.isBinaryEncoding() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncFallback(iv interface{}) { + // println(">>>>>>>>> EncFallback") + f.e.encodeI(iv, false, false) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncTextMarshal(iv encoding.TextMarshaler) { + bs, fnerr := iv.MarshalText() + f.e.marshal(bs, fnerr, false, c_UTF8) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncJSONMarshal(iv jsonMarshaler) { + bs, fnerr := iv.MarshalJSON() + f.e.marshal(bs, fnerr, true, c_UTF8) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncBinaryMarshal(iv encoding.BinaryMarshaler) { + bs, fnerr := iv.MarshalBinary() + f.e.marshal(bs, fnerr, false, c_RAW) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) TimeRtidIfBinc() uintptr { + if _, ok := f.e.hh.(*BincHandle); ok { + return timeTypId + } + return 0 +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) IsJSONHandle() bool { + return f.e.js +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) HasExtensions() bool { + return len(f.e.h.extHandle) != 0 +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncExt(v interface{}) (r bool) { + rt := reflect.TypeOf(v) + if rt.Kind() == reflect.Ptr { + rt = rt.Elem() + } + rtid := reflect.ValueOf(rt).Pointer() + if xfFn := f.e.h.getExt(rtid); xfFn != nil { + f.e.e.EncodeExt(v, xfFn.tag, xfFn.ext, f.e) + return true + } + return false +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncSendContainerState(c containerState) { + if f.e.cr != nil { + f.e.cr.sendContainerState(c) + } +} + +// ---------------- DECODER FOLLOWS ----------------- + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecBasicHandle() *BasicHandle { + return f.d.h +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecBinary() bool { + return f.d.be // f.d.hh.isBinaryEncoding() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecSwallow() { + f.d.swallow() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecScratchBuffer() []byte { + return f.d.b[:] +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecFallback(iv interface{}, chkPtr bool) { + // println(">>>>>>>>> DecFallback") + f.d.decodeI(iv, chkPtr, false, false, false) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecSliceHelperStart() (decSliceHelper, int) { + return f.d.decSliceHelperStart() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecStructFieldNotFound(index int, name string) { + f.d.structFieldNotFound(index, name) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecArrayCannotExpand(sliceLen, streamLen int) { + f.d.arrayCannotExpand(sliceLen, streamLen) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecTextUnmarshal(tm encoding.TextUnmarshaler) { + fnerr := tm.UnmarshalText(f.d.d.DecodeBytes(f.d.b[:], true, true)) + if fnerr != nil { + panic(fnerr) + } +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecJSONUnmarshal(tm jsonUnmarshaler) { + // bs := f.dd.DecodeBytes(f.d.b[:], true, true) + // grab the bytes to be read, as UnmarshalJSON needs the full JSON so as to unmarshal it itself. + fnerr := tm.UnmarshalJSON(f.d.nextValueBytes()) + if fnerr != nil { + panic(fnerr) + } +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecBinaryUnmarshal(bm encoding.BinaryUnmarshaler) { + fnerr := bm.UnmarshalBinary(f.d.d.DecodeBytes(nil, false, true)) + if fnerr != nil { + panic(fnerr) + } +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) TimeRtidIfBinc() uintptr { + if _, ok := f.d.hh.(*BincHandle); ok { + return timeTypId + } + return 0 +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) IsJSONHandle() bool { + return f.d.js +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) HasExtensions() bool { + return len(f.d.h.extHandle) != 0 +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecExt(v interface{}) (r bool) { + rt := reflect.TypeOf(v).Elem() + rtid := reflect.ValueOf(rt).Pointer() + if xfFn := f.d.h.getExt(rtid); xfFn != nil { + f.d.d.DecodeExt(v, xfFn.tag, xfFn.ext) + return true + } + return false +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecInferLen(clen, maxlen, unit int) (rvlen int, truncated bool) { + return decInferLen(clen, maxlen, unit) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecSendContainerState(c containerState) { + if f.d.cr != nil { + f.d.cr.sendContainerState(c) + } +} + +{{/* + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncDriver() encDriver { + return f.e.e +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecDriver() decDriver { + return f.d.d +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncNil() { + f.e.e.EncodeNil() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncBytes(v []byte) { + f.e.e.EncodeStringBytes(c_RAW, v) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncArrayStart(length int) { + f.e.e.EncodeArrayStart(length) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncArrayEnd() { + f.e.e.EncodeArrayEnd() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncArrayEntrySeparator() { + f.e.e.EncodeArrayEntrySeparator() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncMapStart(length int) { + f.e.e.EncodeMapStart(length) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncMapEnd() { + f.e.e.EncodeMapEnd() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncMapEntrySeparator() { + f.e.e.EncodeMapEntrySeparator() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncMapKVSeparator() { + f.e.e.EncodeMapKVSeparator() +} + +// --------- + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecBytes(v *[]byte) { + *v = f.d.d.DecodeBytes(*v) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecTryNil() bool { + return f.d.d.TryDecodeAsNil() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecContainerIsNil() (b bool) { + return f.d.d.IsContainerType(valueTypeNil) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecContainerIsMap() (b bool) { + return f.d.d.IsContainerType(valueTypeMap) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecContainerIsArray() (b bool) { + return f.d.d.IsContainerType(valueTypeArray) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecCheckBreak() bool { + return f.d.d.CheckBreak() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecMapStart() int { + return f.d.d.ReadMapStart() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecArrayStart() int { + return f.d.d.ReadArrayStart() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecMapEnd() { + f.d.d.ReadMapEnd() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecArrayEnd() { + f.d.d.ReadArrayEnd() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecArrayEntrySeparator() { + f.d.d.ReadArrayEntrySeparator() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecMapEntrySeparator() { + f.d.d.ReadMapEntrySeparator() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecMapKVSeparator() { + f.d.d.ReadMapKVSeparator() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) ReadStringAsBytes(bs []byte) []byte { + return f.d.d.DecodeStringAsBytes(bs) +} + + +// -- encode calls (primitives) +{{range .Values}}{{if .Primitive }}{{if ne .Primitive "interface{}" }} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) {{ .MethodNamePfx "Enc" true }}(v {{ .Primitive }}) { + ee := f.e.e + {{ encmd .Primitive "v" }} +} +{{ end }}{{ end }}{{ end }} + +// -- decode calls (primitives) +{{range .Values}}{{if .Primitive }}{{if ne .Primitive "interface{}" }} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) {{ .MethodNamePfx "Dec" true }}(vp *{{ .Primitive }}) { + dd := f.d.d + *vp = {{ decmd .Primitive }} +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) {{ .MethodNamePfx "Read" true }}() (v {{ .Primitive }}) { + dd := f.d.d + v = {{ decmd .Primitive }} + return +} +{{ end }}{{ end }}{{ end }} + + +// -- encode calls (slices/maps) +{{range .Values}}{{if not .Primitive }}{{if .Slice }} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) {{ .MethodNamePfx "Enc" false }}(v []{{ .Elem }}) { {{ else }} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) {{ .MethodNamePfx "Enc" false }}(v map[{{ .MapKey }}]{{ .Elem }}) { {{end}} + f.F.{{ .MethodNamePfx "Enc" false }}V(v, false, f.e) +} +{{ end }}{{ end }} + +// -- decode calls (slices/maps) +{{range .Values}}{{if not .Primitive }} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +{{if .Slice }}func (f genHelperDecoder) {{ .MethodNamePfx "Dec" false }}(vp *[]{{ .Elem }}) { +{{else}}func (f genHelperDecoder) {{ .MethodNamePfx "Dec" false }}(vp *map[{{ .MapKey }}]{{ .Elem }}) { {{end}} + v, changed := f.F.{{ .MethodNamePfx "Dec" false }}V(*vp, false, true, f.d) + if changed { + *vp = v + } +} +{{ end }}{{ end }} +*/}} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/gen.generated.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/gen.generated.go new file mode 100644 index 0000000000000..f3c1b70608899 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/gen.generated.go @@ -0,0 +1,171 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +// DO NOT EDIT. THIS FILE IS AUTO-GENERATED FROM gen-dec-(map|array).go.tmpl + +const genDecMapTmpl = ` +{{var "v"}} := *{{ .Varname }} +{{var "l"}} := r.ReadMapStart() +{{var "bh"}} := z.DecBasicHandle() +if {{var "v"}} == nil { + {{var "rl"}}, _ := z.DecInferLen({{var "l"}}, {{var "bh"}}.MaxInitLen, {{ .Size }}) + {{var "v"}} = make(map[{{ .KTyp }}]{{ .Typ }}, {{var "rl"}}) + *{{ .Varname }} = {{var "v"}} +} +var {{var "mk"}} {{ .KTyp }} +var {{var "mv"}} {{ .Typ }} +var {{var "mg"}} {{if decElemKindPtr}}, {{var "ms"}}, {{var "mok"}}{{end}} bool +if {{var "bh"}}.MapValueReset { + {{if decElemKindPtr}}{{var "mg"}} = true + {{else if decElemKindIntf}}if !{{var "bh"}}.InterfaceReset { {{var "mg"}} = true } + {{else if not decElemKindImmutable}}{{var "mg"}} = true + {{end}} } +if {{var "l"}} > 0 { +for {{var "j"}} := 0; {{var "j"}} < {{var "l"}}; {{var "j"}}++ { + z.DecSendContainerState(codecSelfer_containerMapKey{{ .Sfx }}) + {{ $x := printf "%vmk%v" .TempVar .Rand }}{{ decLineVarK $x }} +{{ if eq .KTyp "interface{}" }}{{/* // special case if a byte array. */}}if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} { + {{var "mk"}} = string({{var "bv"}}) + }{{ end }}{{if decElemKindPtr}} + {{var "ms"}} = true{{end}} + if {{var "mg"}} { + {{if decElemKindPtr}}{{var "mv"}}, {{var "mok"}} = {{var "v"}}[{{var "mk"}}] + if {{var "mok"}} { + {{var "ms"}} = false + } {{else}}{{var "mv"}} = {{var "v"}}[{{var "mk"}}] {{end}} + } {{if not decElemKindImmutable}}else { {{var "mv"}} = {{decElemZero}} }{{end}} + z.DecSendContainerState(codecSelfer_containerMapValue{{ .Sfx }}) + {{ $x := printf "%vmv%v" .TempVar .Rand }}{{ decLineVar $x }} + if {{if decElemKindPtr}} {{var "ms"}} && {{end}} {{var "v"}} != nil { + {{var "v"}}[{{var "mk"}}] = {{var "mv"}} + } +} +} else if {{var "l"}} < 0 { +for {{var "j"}} := 0; !r.CheckBreak(); {{var "j"}}++ { + z.DecSendContainerState(codecSelfer_containerMapKey{{ .Sfx }}) + {{ $x := printf "%vmk%v" .TempVar .Rand }}{{ decLineVarK $x }} +{{ if eq .KTyp "interface{}" }}{{/* // special case if a byte array. */}}if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} { + {{var "mk"}} = string({{var "bv"}}) + }{{ end }}{{if decElemKindPtr}} + {{var "ms"}} = true {{ end }} + if {{var "mg"}} { + {{if decElemKindPtr}}{{var "mv"}}, {{var "mok"}} = {{var "v"}}[{{var "mk"}}] + if {{var "mok"}} { + {{var "ms"}} = false + } {{else}}{{var "mv"}} = {{var "v"}}[{{var "mk"}}] {{end}} + } {{if not decElemKindImmutable}}else { {{var "mv"}} = {{decElemZero}} }{{end}} + z.DecSendContainerState(codecSelfer_containerMapValue{{ .Sfx }}) + {{ $x := printf "%vmv%v" .TempVar .Rand }}{{ decLineVar $x }} + if {{if decElemKindPtr}} {{var "ms"}} && {{end}} {{var "v"}} != nil { + {{var "v"}}[{{var "mk"}}] = {{var "mv"}} + } +} +} // else len==0: TODO: Should we clear map entries? +z.DecSendContainerState(codecSelfer_containerMapEnd{{ .Sfx }}) +` + +const genDecListTmpl = ` +{{var "v"}} := {{if not isArray}}*{{end}}{{ .Varname }} +{{var "h"}}, {{var "l"}} := z.DecSliceHelperStart() {{/* // helper, containerLenS */}} +var {{var "c"}} bool {{/* // changed */}} +if {{var "l"}} == 0 { + {{if isSlice }}if {{var "v"}} == nil { + {{var "v"}} = []{{ .Typ }}{} + {{var "c"}} = true + } else if len({{var "v"}}) != 0 { + {{var "v"}} = {{var "v"}}[:0] + {{var "c"}} = true + } {{end}} {{if isChan }}if {{var "v"}} == nil { + {{var "v"}} = make({{ .CTyp }}, 0) + {{var "c"}} = true + } {{end}} +} else if {{var "l"}} > 0 { + {{if isChan }}if {{var "v"}} == nil { + {{var "rl"}}, _ = z.DecInferLen({{var "l"}}, z.DecBasicHandle().MaxInitLen, {{ .Size }}) + {{var "v"}} = make({{ .CTyp }}, {{var "rl"}}) + {{var "c"}} = true + } + for {{var "r"}} := 0; {{var "r"}} < {{var "l"}}; {{var "r"}}++ { + {{var "h"}}.ElemContainerState({{var "r"}}) + var {{var "t"}} {{ .Typ }} + {{ $x := printf "%st%s" .TempVar .Rand }}{{ decLineVar $x }} + {{var "v"}} <- {{var "t"}} + } + {{ else }} var {{var "rr"}}, {{var "rl"}} int {{/* // num2read, length of slice/array/chan */}} + var {{var "rt"}} bool {{/* truncated */}} + if {{var "l"}} > cap({{var "v"}}) { + {{if isArray }}z.DecArrayCannotExpand(len({{var "v"}}), {{var "l"}}) + {{ else }}{{if not .Immutable }} + {{var "rg"}} := len({{var "v"}}) > 0 + {{var "v2"}} := {{var "v"}} {{end}} + {{var "rl"}}, {{var "rt"}} = z.DecInferLen({{var "l"}}, z.DecBasicHandle().MaxInitLen, {{ .Size }}) + if {{var "rt"}} { + if {{var "rl"}} <= cap({{var "v"}}) { + {{var "v"}} = {{var "v"}}[:{{var "rl"}}] + } else { + {{var "v"}} = make([]{{ .Typ }}, {{var "rl"}}) + } + } else { + {{var "v"}} = make([]{{ .Typ }}, {{var "rl"}}) + } + {{var "c"}} = true + {{var "rr"}} = len({{var "v"}}) {{if not .Immutable }} + if {{var "rg"}} { copy({{var "v"}}, {{var "v2"}}) } {{end}} {{end}}{{/* end not Immutable, isArray */}} + } {{if isSlice }} else if {{var "l"}} != len({{var "v"}}) { + {{var "v"}} = {{var "v"}}[:{{var "l"}}] + {{var "c"}} = true + } {{end}} {{/* end isSlice:47 */}} + {{var "j"}} := 0 + for ; {{var "j"}} < {{var "rr"}} ; {{var "j"}}++ { + {{var "h"}}.ElemContainerState({{var "j"}}) + {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }} + } + {{if isArray }}for ; {{var "j"}} < {{var "l"}} ; {{var "j"}}++ { + {{var "h"}}.ElemContainerState({{var "j"}}) + z.DecSwallow() + } + {{ else }}if {{var "rt"}} { + for ; {{var "j"}} < {{var "l"}} ; {{var "j"}}++ { + {{var "v"}} = append({{var "v"}}, {{ zero}}) + {{var "h"}}.ElemContainerState({{var "j"}}) + {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }} + } + } {{end}} {{/* end isArray:56 */}} + {{end}} {{/* end isChan:16 */}} +} else { {{/* len < 0 */}} + {{var "j"}} := 0 + for ; !r.CheckBreak(); {{var "j"}}++ { + {{if isChan }} + {{var "h"}}.ElemContainerState({{var "j"}}) + var {{var "t"}} {{ .Typ }} + {{ $x := printf "%st%s" .TempVar .Rand }}{{ decLineVar $x }} + {{var "v"}} <- {{var "t"}} + {{ else }} + if {{var "j"}} >= len({{var "v"}}) { + {{if isArray }}z.DecArrayCannotExpand(len({{var "v"}}), {{var "j"}}+1) + {{ else }}{{var "v"}} = append({{var "v"}}, {{zero}})// var {{var "z"}} {{ .Typ }} + {{var "c"}} = true {{end}} + } + {{var "h"}}.ElemContainerState({{var "j"}}) + if {{var "j"}} < len({{var "v"}}) { + {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }} + } else { + z.DecSwallow() + } + {{end}} + } + {{if isSlice }}if {{var "j"}} < len({{var "v"}}) { + {{var "v"}} = {{var "v"}}[:{{var "j"}}] + {{var "c"}} = true + } else if {{var "j"}} == 0 && {{var "v"}} == nil { + {{var "v"}} = []{{ .Typ }}{} + {{var "c"}} = true + }{{end}} +} +{{var "h"}}.End() +{{if not isArray }}if {{var "c"}} { + *{{ .Varname }} = {{var "v"}} +}{{end}} +` diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/gen.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/gen.go new file mode 100644 index 0000000000000..a075e7c0d6248 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/gen.go @@ -0,0 +1,1920 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "bytes" + "encoding/base64" + "errors" + "fmt" + "go/format" + "io" + "io/ioutil" + "math/rand" + "os" + "reflect" + "regexp" + "sort" + "strconv" + "strings" + "sync" + "text/template" + "time" +) + +// --------------------------------------------------- +// codecgen supports the full cycle of reflection-based codec: +// - RawExt +// - Builtins +// - Extensions +// - (Binary|Text|JSON)(Unm|M)arshal +// - generic by-kind +// +// This means that, for dynamic things, we MUST use reflection to at least get the reflect.Type. +// In those areas, we try to only do reflection or interface-conversion when NECESSARY: +// - Extensions, only if Extensions are configured. +// +// However, codecgen doesn't support the following: +// - Canonical option. (codecgen IGNORES it currently) +// This is just because it has not been implemented. +// +// During encode/decode, Selfer takes precedence. +// A type implementing Selfer will know how to encode/decode itself statically. +// +// The following field types are supported: +// array: [n]T +// slice: []T +// map: map[K]V +// primitive: [u]int[n], float(32|64), bool, string +// struct +// +// --------------------------------------------------- +// Note that a Selfer cannot call (e|d).(En|De)code on itself, +// as this will cause a circular reference, as (En|De)code will call Selfer methods. +// Any type that implements Selfer must implement completely and not fallback to (En|De)code. +// +// In addition, code in this file manages the generation of fast-path implementations of +// encode/decode of slices/maps of primitive keys/values. +// +// Users MUST re-generate their implementations whenever the code shape changes. +// The generated code will panic if it was generated with a version older than the supporting library. +// --------------------------------------------------- +// +// codec framework is very feature rich. +// When encoding or decoding into an interface, it depends on the runtime type of the interface. +// The type of the interface may be a named type, an extension, etc. +// Consequently, we fallback to runtime codec for encoding/decoding interfaces. +// In addition, we fallback for any value which cannot be guaranteed at runtime. +// This allows us support ANY value, including any named types, specifically those which +// do not implement our interfaces (e.g. Selfer). +// +// This explains some slowness compared to other code generation codecs (e.g. msgp). +// This reduction in speed is only seen when your refers to interfaces, +// e.g. type T struct { A interface{}; B []interface{}; C map[string]interface{} } +// +// codecgen will panic if the file was generated with an old version of the library in use. +// +// Note: +// It was a concious decision to have gen.go always explicitly call EncodeNil or TryDecodeAsNil. +// This way, there isn't a function call overhead just to see that we should not enter a block of code. + +// GenVersion is the current version of codecgen. +// +// NOTE: Increment this value each time codecgen changes fundamentally. +// Fundamental changes are: +// - helper methods change (signature change, new ones added, some removed, etc) +// - codecgen command line changes +// +// v1: Initial Version +// v2: +// v3: Changes for Kubernetes: +// changes in signature of some unpublished helper methods and codecgen cmdline arguments. +// v4: Removed separator support from (en|de)cDriver, and refactored codec(gen) +// v5: changes to support faster json decoding. Let encoder/decoder maintain state of collections. +const GenVersion = 5 + +const ( + genCodecPkg = "codec1978" + genTempVarPfx = "yy" + genTopLevelVarName = "x" + + // ignore canBeNil parameter, and always set to true. + // This is because nil can appear anywhere, so we should always check. + genAnythingCanBeNil = true + + // if genUseOneFunctionForDecStructMap, make a single codecDecodeSelferFromMap function; + // else make codecDecodeSelferFromMap{LenPrefix,CheckBreak} so that conditionals + // are not executed a lot. + // + // From testing, it didn't make much difference in runtime, so keep as true (one function only) + genUseOneFunctionForDecStructMap = true +) + +type genStructMapStyle uint8 + +const ( + genStructMapStyleConsolidated genStructMapStyle = iota + genStructMapStyleLenPrefix + genStructMapStyleCheckBreak +) + +var ( + genAllTypesSamePkgErr = errors.New("All types must be in the same package") + genExpectArrayOrMapErr = errors.New("unexpected type. Expecting array/map/slice") + genBase64enc = base64.NewEncoding("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__") + genQNameRegex = regexp.MustCompile(`[A-Za-z_.]+`) +) + +// genRunner holds some state used during a Gen run. +type genRunner struct { + w io.Writer // output + c uint64 // counter used for generating varsfx + t []reflect.Type // list of types to run selfer on + + tc reflect.Type // currently running selfer on this type + te map[uintptr]bool // types for which the encoder has been created + td map[uintptr]bool // types for which the decoder has been created + cp string // codec import path + + im map[string]reflect.Type // imports to add + imn map[string]string // package names of imports to add + imc uint64 // counter for import numbers + + is map[reflect.Type]struct{} // types seen during import search + bp string // base PkgPath, for which we are generating for + + cpfx string // codec package prefix + unsafe bool // is unsafe to be used in generated code? + + tm map[reflect.Type]struct{} // types for which enc/dec must be generated + ts []reflect.Type // types for which enc/dec must be generated + + xs string // top level variable/constant suffix + hn string // fn helper type name + + ti *TypeInfos + // rr *rand.Rand // random generator for file-specific types +} + +// Gen will write a complete go file containing Selfer implementations for each +// type passed. All the types must be in the same package. +// +// Library users: *DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE.* +func Gen(w io.Writer, buildTags, pkgName, uid string, useUnsafe bool, ti *TypeInfos, typ ...reflect.Type) { + if len(typ) == 0 { + return + } + x := genRunner{ + unsafe: useUnsafe, + w: w, + t: typ, + te: make(map[uintptr]bool), + td: make(map[uintptr]bool), + im: make(map[string]reflect.Type), + imn: make(map[string]string), + is: make(map[reflect.Type]struct{}), + tm: make(map[reflect.Type]struct{}), + ts: []reflect.Type{}, + bp: genImportPath(typ[0]), + xs: uid, + ti: ti, + } + if x.ti == nil { + x.ti = defTypeInfos + } + if x.xs == "" { + rr := rand.New(rand.NewSource(time.Now().UnixNano())) + x.xs = strconv.FormatInt(rr.Int63n(9999), 10) + } + + // gather imports first: + x.cp = genImportPath(reflect.TypeOf(x)) + x.imn[x.cp] = genCodecPkg + for _, t := range typ { + // fmt.Printf("###########: PkgPath: '%v', Name: '%s'\n", genImportPath(t), t.Name()) + if genImportPath(t) != x.bp { + panic(genAllTypesSamePkgErr) + } + x.genRefPkgs(t) + } + if buildTags != "" { + x.line("//+build " + buildTags) + x.line("") + } + x.line(` + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED BY codecgen. +// ************************************************************ + +`) + x.line("package " + pkgName) + x.line("") + x.line("import (") + if x.cp != x.bp { + x.cpfx = genCodecPkg + "." + x.linef("%s \"%s\"", genCodecPkg, x.cp) + } + // use a sorted set of im keys, so that we can get consistent output + imKeys := make([]string, 0, len(x.im)) + for k, _ := range x.im { + imKeys = append(imKeys, k) + } + sort.Strings(imKeys) + for _, k := range imKeys { // for k, _ := range x.im { + x.linef("%s \"%s\"", x.imn[k], k) + } + // add required packages + for _, k := range [...]string{"reflect", "unsafe", "runtime", "fmt", "errors"} { + if _, ok := x.im[k]; !ok { + if k == "unsafe" && !x.unsafe { + continue + } + x.line("\"" + k + "\"") + } + } + x.line(")") + x.line("") + + x.line("const (") + x.linef("// ----- content types ----") + x.linef("codecSelferC_UTF8%s = %v", x.xs, int64(c_UTF8)) + x.linef("codecSelferC_RAW%s = %v", x.xs, int64(c_RAW)) + x.linef("// ----- value types used ----") + x.linef("codecSelferValueTypeArray%s = %v", x.xs, int64(valueTypeArray)) + x.linef("codecSelferValueTypeMap%s = %v", x.xs, int64(valueTypeMap)) + x.linef("// ----- containerStateValues ----") + x.linef("codecSelfer_containerMapKey%s = %v", x.xs, int64(containerMapKey)) + x.linef("codecSelfer_containerMapValue%s = %v", x.xs, int64(containerMapValue)) + x.linef("codecSelfer_containerMapEnd%s = %v", x.xs, int64(containerMapEnd)) + x.linef("codecSelfer_containerArrayElem%s = %v", x.xs, int64(containerArrayElem)) + x.linef("codecSelfer_containerArrayEnd%s = %v", x.xs, int64(containerArrayEnd)) + x.line(")") + x.line("var (") + x.line("codecSelferBitsize" + x.xs + " = uint8(reflect.TypeOf(uint(0)).Bits())") + x.line("codecSelferOnlyMapOrArrayEncodeToStructErr" + x.xs + " = errors.New(`only encoded map or array can be decoded into a struct`)") + x.line(")") + x.line("") + + if x.unsafe { + x.line("type codecSelferUnsafeString" + x.xs + " struct { Data uintptr; Len int}") + x.line("") + } + x.hn = "codecSelfer" + x.xs + x.line("type " + x.hn + " struct{}") + x.line("") + + x.line("func init() {") + x.linef("if %sGenVersion != %v {", x.cpfx, GenVersion) + x.line("_, file, _, _ := runtime.Caller(0)") + x.line(`err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", `) + x.linef(`%v, %sGenVersion, file)`, GenVersion, x.cpfx) + x.line("panic(err)") + x.linef("}") + x.line("if false { // reference the types, but skip this branch at build/run time") + var n int + // for k, t := range x.im { + for _, k := range imKeys { + t := x.im[k] + x.linef("var v%v %s.%s", n, x.imn[k], t.Name()) + n++ + } + if x.unsafe { + x.linef("var v%v unsafe.Pointer", n) + n++ + } + if n > 0 { + x.out("_") + for i := 1; i < n; i++ { + x.out(", _") + } + x.out(" = v0") + for i := 1; i < n; i++ { + x.outf(", v%v", i) + } + } + x.line("} ") // close if false + x.line("}") // close init + x.line("") + + // generate rest of type info + for _, t := range typ { + x.tc = t + x.selfer(true) + x.selfer(false) + } + + for _, t := range x.ts { + rtid := reflect.ValueOf(t).Pointer() + // generate enc functions for all these slice/map types. + x.linef("func (x %s) enc%s(v %s%s, e *%sEncoder) {", x.hn, x.genMethodNameT(t), x.arr2str(t, "*"), x.genTypeName(t), x.cpfx) + x.genRequiredMethodVars(true) + switch t.Kind() { + case reflect.Array, reflect.Slice, reflect.Chan: + x.encListFallback("v", t) + case reflect.Map: + x.encMapFallback("v", t) + default: + panic(genExpectArrayOrMapErr) + } + x.line("}") + x.line("") + + // generate dec functions for all these slice/map types. + x.linef("func (x %s) dec%s(v *%s, d *%sDecoder) {", x.hn, x.genMethodNameT(t), x.genTypeName(t), x.cpfx) + x.genRequiredMethodVars(false) + switch t.Kind() { + case reflect.Array, reflect.Slice, reflect.Chan: + x.decListFallback("v", rtid, t) + case reflect.Map: + x.decMapFallback("v", rtid, t) + default: + panic(genExpectArrayOrMapErr) + } + x.line("}") + x.line("") + } + + x.line("") +} + +func (x *genRunner) checkForSelfer(t reflect.Type, varname string) bool { + // return varname != genTopLevelVarName && t != x.tc + // the only time we checkForSelfer is if we are not at the TOP of the generated code. + return varname != genTopLevelVarName +} + +func (x *genRunner) arr2str(t reflect.Type, s string) string { + if t.Kind() == reflect.Array { + return s + } + return "" +} + +func (x *genRunner) genRequiredMethodVars(encode bool) { + x.line("var h " + x.hn) + if encode { + x.line("z, r := " + x.cpfx + "GenHelperEncoder(e)") + } else { + x.line("z, r := " + x.cpfx + "GenHelperDecoder(d)") + } + x.line("_, _, _ = h, z, r") +} + +func (x *genRunner) genRefPkgs(t reflect.Type) { + if _, ok := x.is[t]; ok { + return + } + // fmt.Printf(">>>>>>: PkgPath: '%v', Name: '%s'\n", genImportPath(t), t.Name()) + x.is[t] = struct{}{} + tpkg, tname := genImportPath(t), t.Name() + if tpkg != "" && tpkg != x.bp && tpkg != x.cp && tname != "" && tname[0] >= 'A' && tname[0] <= 'Z' { + if _, ok := x.im[tpkg]; !ok { + x.im[tpkg] = t + if idx := strings.LastIndex(tpkg, "/"); idx < 0 { + x.imn[tpkg] = tpkg + } else { + x.imc++ + x.imn[tpkg] = "pkg" + strconv.FormatUint(x.imc, 10) + "_" + tpkg[idx+1:] + } + } + } + switch t.Kind() { + case reflect.Array, reflect.Slice, reflect.Ptr, reflect.Chan: + x.genRefPkgs(t.Elem()) + case reflect.Map: + x.genRefPkgs(t.Elem()) + x.genRefPkgs(t.Key()) + case reflect.Struct: + for i := 0; i < t.NumField(); i++ { + if fname := t.Field(i).Name; fname != "" && fname[0] >= 'A' && fname[0] <= 'Z' { + x.genRefPkgs(t.Field(i).Type) + } + } + } +} + +func (x *genRunner) line(s string) { + x.out(s) + if len(s) == 0 || s[len(s)-1] != '\n' { + x.out("\n") + } +} + +func (x *genRunner) varsfx() string { + x.c++ + return strconv.FormatUint(x.c, 10) +} + +func (x *genRunner) out(s string) { + if _, err := io.WriteString(x.w, s); err != nil { + panic(err) + } +} + +func (x *genRunner) linef(s string, params ...interface{}) { + x.line(fmt.Sprintf(s, params...)) +} + +func (x *genRunner) outf(s string, params ...interface{}) { + x.out(fmt.Sprintf(s, params...)) +} + +func (x *genRunner) genTypeName(t reflect.Type) (n string) { + // defer func() { fmt.Printf(">>>> ####: genTypeName: t: %v, name: '%s'\n", t, n) }() + + // if the type has a PkgPath, which doesn't match the current package, + // then include it. + // We cannot depend on t.String() because it includes current package, + // or t.PkgPath because it includes full import path, + // + var ptrPfx string + for t.Kind() == reflect.Ptr { + ptrPfx += "*" + t = t.Elem() + } + if tn := t.Name(); tn != "" { + return ptrPfx + x.genTypeNamePrim(t) + } + switch t.Kind() { + case reflect.Map: + return ptrPfx + "map[" + x.genTypeName(t.Key()) + "]" + x.genTypeName(t.Elem()) + case reflect.Slice: + return ptrPfx + "[]" + x.genTypeName(t.Elem()) + case reflect.Array: + return ptrPfx + "[" + strconv.FormatInt(int64(t.Len()), 10) + "]" + x.genTypeName(t.Elem()) + case reflect.Chan: + return ptrPfx + t.ChanDir().String() + " " + x.genTypeName(t.Elem()) + default: + if t == intfTyp { + return ptrPfx + "interface{}" + } else { + return ptrPfx + x.genTypeNamePrim(t) + } + } +} + +func (x *genRunner) genTypeNamePrim(t reflect.Type) (n string) { + if t.Name() == "" { + return t.String() + } else if genImportPath(t) == "" || genImportPath(t) == genImportPath(x.tc) { + return t.Name() + } else { + return x.imn[genImportPath(t)] + "." + t.Name() + // return t.String() // best way to get the package name inclusive + } +} + +func (x *genRunner) genZeroValueR(t reflect.Type) string { + // if t is a named type, w + switch t.Kind() { + case reflect.Ptr, reflect.Interface, reflect.Chan, reflect.Func, + reflect.Slice, reflect.Map, reflect.Invalid: + return "nil" + case reflect.Bool: + return "false" + case reflect.String: + return `""` + case reflect.Struct, reflect.Array: + return x.genTypeName(t) + "{}" + default: // all numbers + return "0" + } +} + +func (x *genRunner) genMethodNameT(t reflect.Type) (s string) { + return genMethodNameT(t, x.tc) +} + +func (x *genRunner) selfer(encode bool) { + t := x.tc + t0 := t + // always make decode use a pointer receiver, + // and structs always use a ptr receiver (encode|decode) + isptr := !encode || t.Kind() == reflect.Struct + fnSigPfx := "func (x " + if isptr { + fnSigPfx += "*" + } + fnSigPfx += x.genTypeName(t) + + x.out(fnSigPfx) + if isptr { + t = reflect.PtrTo(t) + } + if encode { + x.line(") CodecEncodeSelf(e *" + x.cpfx + "Encoder) {") + x.genRequiredMethodVars(true) + // x.enc(genTopLevelVarName, t) + x.encVar(genTopLevelVarName, t) + } else { + x.line(") CodecDecodeSelf(d *" + x.cpfx + "Decoder) {") + x.genRequiredMethodVars(false) + // do not use decVar, as there is no need to check TryDecodeAsNil + // or way to elegantly handle that, and also setting it to a + // non-nil value doesn't affect the pointer passed. + // x.decVar(genTopLevelVarName, t, false) + x.dec(genTopLevelVarName, t0) + } + x.line("}") + x.line("") + + if encode || t0.Kind() != reflect.Struct { + return + } + + // write is containerMap + if genUseOneFunctionForDecStructMap { + x.out(fnSigPfx) + x.line(") codecDecodeSelfFromMap(l int, d *" + x.cpfx + "Decoder) {") + x.genRequiredMethodVars(false) + x.decStructMap(genTopLevelVarName, "l", reflect.ValueOf(t0).Pointer(), t0, genStructMapStyleConsolidated) + x.line("}") + x.line("") + } else { + x.out(fnSigPfx) + x.line(") codecDecodeSelfFromMapLenPrefix(l int, d *" + x.cpfx + "Decoder) {") + x.genRequiredMethodVars(false) + x.decStructMap(genTopLevelVarName, "l", reflect.ValueOf(t0).Pointer(), t0, genStructMapStyleLenPrefix) + x.line("}") + x.line("") + + x.out(fnSigPfx) + x.line(") codecDecodeSelfFromMapCheckBreak(l int, d *" + x.cpfx + "Decoder) {") + x.genRequiredMethodVars(false) + x.decStructMap(genTopLevelVarName, "l", reflect.ValueOf(t0).Pointer(), t0, genStructMapStyleCheckBreak) + x.line("}") + x.line("") + } + + // write containerArray + x.out(fnSigPfx) + x.line(") codecDecodeSelfFromArray(l int, d *" + x.cpfx + "Decoder) {") + x.genRequiredMethodVars(false) + x.decStructArray(genTopLevelVarName, "l", "return", reflect.ValueOf(t0).Pointer(), t0) + x.line("}") + x.line("") + +} + +// used for chan, array, slice, map +func (x *genRunner) xtraSM(varname string, encode bool, t reflect.Type) { + if encode { + x.linef("h.enc%s((%s%s)(%s), e)", x.genMethodNameT(t), x.arr2str(t, "*"), x.genTypeName(t), varname) + } else { + x.linef("h.dec%s((*%s)(%s), d)", x.genMethodNameT(t), x.genTypeName(t), varname) + } + if _, ok := x.tm[t]; !ok { + x.tm[t] = struct{}{} + x.ts = append(x.ts, t) + } +} + +// encVar will encode a variable. +// The parameter, t, is the reflect.Type of the variable itself +func (x *genRunner) encVar(varname string, t reflect.Type) { + // fmt.Printf(">>>>>> varname: %s, t: %v\n", varname, t) + var checkNil bool + switch t.Kind() { + case reflect.Ptr, reflect.Interface, reflect.Slice, reflect.Map, reflect.Chan: + checkNil = true + } + if checkNil { + x.linef("if %s == nil { r.EncodeNil() } else { ", varname) + } + switch t.Kind() { + case reflect.Ptr: + switch t.Elem().Kind() { + case reflect.Struct, reflect.Array: + x.enc(varname, genNonPtr(t)) + default: + i := x.varsfx() + x.line(genTempVarPfx + i + " := *" + varname) + x.enc(genTempVarPfx+i, genNonPtr(t)) + } + case reflect.Struct, reflect.Array: + i := x.varsfx() + x.line(genTempVarPfx + i + " := &" + varname) + x.enc(genTempVarPfx+i, t) + default: + x.enc(varname, t) + } + + if checkNil { + x.line("}") + } + +} + +// enc will encode a variable (varname) of type T, +// except t is of kind reflect.Struct or reflect.Array, wherein varname is of type *T (to prevent copying) +func (x *genRunner) enc(varname string, t reflect.Type) { + // varName here must be to a pointer to a struct/array, or to a value directly. + rtid := reflect.ValueOf(t).Pointer() + // We call CodecEncodeSelf if one of the following are honored: + // - the type already implements Selfer, call that + // - the type has a Selfer implementation just created, use that + // - the type is in the list of the ones we will generate for, but it is not currently being generated + + tptr := reflect.PtrTo(t) + tk := t.Kind() + if x.checkForSelfer(t, varname) { + if t.Implements(selferTyp) || (tptr.Implements(selferTyp) && (tk == reflect.Array || tk == reflect.Struct)) { + x.line(varname + ".CodecEncodeSelf(e)") + return + } + + if _, ok := x.te[rtid]; ok { + x.line(varname + ".CodecEncodeSelf(e)") + return + } + } + + inlist := false + for _, t0 := range x.t { + if t == t0 { + inlist = true + if x.checkForSelfer(t, varname) { + x.line(varname + ".CodecEncodeSelf(e)") + return + } + break + } + } + + var rtidAdded bool + if t == x.tc { + x.te[rtid] = true + rtidAdded = true + } + + // check if + // - type is RawExt + // - the type implements (Text|JSON|Binary)(Unm|M)arshal + mi := x.varsfx() + x.linef("%sm%s := z.EncBinary()", genTempVarPfx, mi) + x.linef("_ = %sm%s", genTempVarPfx, mi) + x.line("if false {") //start if block + defer func() { x.line("}") }() //end if block + + if t == rawExtTyp { + x.linef("} else { r.EncodeRawExt(%v, e)", varname) + return + } + // HACK: Support for Builtins. + // Currently, only Binc supports builtins, and the only builtin type is time.Time. + // Have a method that returns the rtid for time.Time if Handle is Binc. + if t == timeTyp { + vrtid := genTempVarPfx + "m" + x.varsfx() + x.linef("} else if %s := z.TimeRtidIfBinc(); %s != 0 { ", vrtid, vrtid) + x.linef("r.EncodeBuiltin(%s, %s)", vrtid, varname) + } + // only check for extensions if the type is named, and has a packagePath. + if genImportPath(t) != "" && t.Name() != "" { + // first check if extensions are configued, before doing the interface conversion + x.linef("} else if z.HasExtensions() && z.EncExt(%s) {", varname) + } + if t.Implements(binaryMarshalerTyp) || tptr.Implements(binaryMarshalerTyp) { + x.linef("} else if %sm%s { z.EncBinaryMarshal(%v) ", genTempVarPfx, mi, varname) + } + if t.Implements(jsonMarshalerTyp) || tptr.Implements(jsonMarshalerTyp) { + x.linef("} else if !%sm%s && z.IsJSONHandle() { z.EncJSONMarshal(%v) ", genTempVarPfx, mi, varname) + } else if t.Implements(textMarshalerTyp) || tptr.Implements(textMarshalerTyp) { + x.linef("} else if !%sm%s { z.EncTextMarshal(%v) ", genTempVarPfx, mi, varname) + } + + x.line("} else {") + + switch t.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + x.line("r.EncodeInt(int64(" + varname + "))") + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + x.line("r.EncodeUint(uint64(" + varname + "))") + case reflect.Float32: + x.line("r.EncodeFloat32(float32(" + varname + "))") + case reflect.Float64: + x.line("r.EncodeFloat64(float64(" + varname + "))") + case reflect.Bool: + x.line("r.EncodeBool(bool(" + varname + "))") + case reflect.String: + x.line("r.EncodeString(codecSelferC_UTF8" + x.xs + ", string(" + varname + "))") + case reflect.Chan: + x.xtraSM(varname, true, t) + // x.encListFallback(varname, rtid, t) + case reflect.Array: + x.xtraSM(varname, true, t) + case reflect.Slice: + // if nil, call dedicated function + // if a []uint8, call dedicated function + // if a known fastpath slice, call dedicated function + // else write encode function in-line. + // - if elements are primitives or Selfers, call dedicated function on each member. + // - else call Encoder.encode(XXX) on it. + if rtid == uint8SliceTypId { + x.line("r.EncodeStringBytes(codecSelferC_RAW" + x.xs + ", []byte(" + varname + "))") + } else if fastpathAV.index(rtid) != -1 { + g := x.newGenV(t) + x.line("z.F." + g.MethodNamePfx("Enc", false) + "V(" + varname + ", false, e)") + } else { + x.xtraSM(varname, true, t) + // x.encListFallback(varname, rtid, t) + } + case reflect.Map: + // if nil, call dedicated function + // if a known fastpath map, call dedicated function + // else write encode function in-line. + // - if elements are primitives or Selfers, call dedicated function on each member. + // - else call Encoder.encode(XXX) on it. + // x.line("if " + varname + " == nil { \nr.EncodeNil()\n } else { ") + if fastpathAV.index(rtid) != -1 { + g := x.newGenV(t) + x.line("z.F." + g.MethodNamePfx("Enc", false) + "V(" + varname + ", false, e)") + } else { + x.xtraSM(varname, true, t) + // x.encMapFallback(varname, rtid, t) + } + case reflect.Struct: + if !inlist { + delete(x.te, rtid) + x.line("z.EncFallback(" + varname + ")") + break + } + x.encStruct(varname, rtid, t) + default: + if rtidAdded { + delete(x.te, rtid) + } + x.line("z.EncFallback(" + varname + ")") + } +} + +func (x *genRunner) encZero(t reflect.Type) { + switch t.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + x.line("r.EncodeInt(0)") + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + x.line("r.EncodeUint(0)") + case reflect.Float32: + x.line("r.EncodeFloat32(0)") + case reflect.Float64: + x.line("r.EncodeFloat64(0)") + case reflect.Bool: + x.line("r.EncodeBool(false)") + case reflect.String: + x.line("r.EncodeString(codecSelferC_UTF8" + x.xs + `, "")`) + default: + x.line("r.EncodeNil()") + } +} + +func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { + // Use knowledge from structfieldinfo (mbs, encodable fields. Ignore omitempty. ) + // replicate code in kStruct i.e. for each field, deref type to non-pointer, and call x.enc on it + + // if t === type currently running selfer on, do for all + ti := x.ti.get(rtid, t) + i := x.varsfx() + sepVarname := genTempVarPfx + "sep" + i + numfieldsvar := genTempVarPfx + "q" + i + ti2arrayvar := genTempVarPfx + "r" + i + struct2arrvar := genTempVarPfx + "2arr" + i + + x.line(sepVarname + " := !z.EncBinary()") + x.linef("%s := z.EncBasicHandle().StructToArray", struct2arrvar) + tisfi := ti.sfip // always use sequence from file. decStruct expects same thing. + // due to omitEmpty, we need to calculate the + // number of non-empty things we write out first. + // This is required as we need to pre-determine the size of the container, + // to support length-prefixing. + x.linef("var %s [%v]bool", numfieldsvar, len(tisfi)) + x.linef("_, _, _ = %s, %s, %s", sepVarname, numfieldsvar, struct2arrvar) + x.linef("const %s bool = %v", ti2arrayvar, ti.toArray) + nn := 0 + for j, si := range tisfi { + if !si.omitEmpty { + nn++ + continue + } + var t2 reflect.StructField + var omitline string + if si.i != -1 { + t2 = t.Field(int(si.i)) + } else { + t2typ := t + varname3 := varname + for _, ix := range si.is { + for t2typ.Kind() == reflect.Ptr { + t2typ = t2typ.Elem() + } + t2 = t2typ.Field(ix) + t2typ = t2.Type + varname3 = varname3 + "." + t2.Name + if t2typ.Kind() == reflect.Ptr { + omitline += varname3 + " != nil && " + } + } + } + // never check omitEmpty on a struct type, as it may contain uncomparable map/slice/etc. + // also, for maps/slices/arrays, check if len ! 0 (not if == zero value) + switch t2.Type.Kind() { + case reflect.Struct: + omitline += " true" + case reflect.Map, reflect.Slice, reflect.Array, reflect.Chan: + omitline += "len(" + varname + "." + t2.Name + ") != 0" + default: + omitline += varname + "." + t2.Name + " != " + x.genZeroValueR(t2.Type) + } + x.linef("%s[%v] = %s", numfieldsvar, j, omitline) + } + x.linef("var %snn%s int", genTempVarPfx, i) + x.linef("if %s || %s {", ti2arrayvar, struct2arrvar) // if ti.toArray { + x.line("r.EncodeArrayStart(" + strconv.FormatInt(int64(len(tisfi)), 10) + ")") + x.linef("} else {") // if not ti.toArray + x.linef("%snn%s = %v", genTempVarPfx, i, nn) + x.linef("for _, b := range %s { if b { %snn%s++ } }", numfieldsvar, genTempVarPfx, i) + x.linef("r.EncodeMapStart(%snn%s)", genTempVarPfx, i) + x.linef("%snn%s = %v", genTempVarPfx, i, 0) + // x.line("r.EncodeMapStart(" + strconv.FormatInt(int64(len(tisfi)), 10) + ")") + x.line("}") // close if not StructToArray + + for j, si := range tisfi { + i := x.varsfx() + isNilVarName := genTempVarPfx + "n" + i + var labelUsed bool + var t2 reflect.StructField + if si.i != -1 { + t2 = t.Field(int(si.i)) + } else { + t2typ := t + varname3 := varname + for _, ix := range si.is { + // fmt.Printf("%%%% %v, ix: %v\n", t2typ, ix) + for t2typ.Kind() == reflect.Ptr { + t2typ = t2typ.Elem() + } + t2 = t2typ.Field(ix) + t2typ = t2.Type + varname3 = varname3 + "." + t2.Name + if t2typ.Kind() == reflect.Ptr { + if !labelUsed { + x.line("var " + isNilVarName + " bool") + } + x.line("if " + varname3 + " == nil { " + isNilVarName + " = true ") + x.line("goto LABEL" + i) + x.line("}") + labelUsed = true + // "varname3 = new(" + x.genTypeName(t3.Elem()) + ") }") + } + } + // t2 = t.FieldByIndex(si.is) + } + if labelUsed { + x.line("LABEL" + i + ":") + } + // if the type of the field is a Selfer, or one of the ones + + x.linef("if %s || %s {", ti2arrayvar, struct2arrvar) // if ti.toArray + if labelUsed { + x.line("if " + isNilVarName + " { r.EncodeNil() } else { ") + } + x.linef("z.EncSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) + if si.omitEmpty { + x.linef("if %s[%v] {", numfieldsvar, j) + } + x.encVar(varname+"."+t2.Name, t2.Type) + if si.omitEmpty { + x.linef("} else {") + x.encZero(t2.Type) + x.linef("}") + } + if labelUsed { + x.line("}") + } + + x.linef("} else {") // if not ti.toArray + + if si.omitEmpty { + x.linef("if %s[%v] {", numfieldsvar, j) + } + x.linef("z.EncSendContainerState(codecSelfer_containerMapKey%s)", x.xs) + x.line("r.EncodeString(codecSelferC_UTF8" + x.xs + ", string(\"" + si.encName + "\"))") + x.linef("z.EncSendContainerState(codecSelfer_containerMapValue%s)", x.xs) + if labelUsed { + x.line("if " + isNilVarName + " { r.EncodeNil() } else { ") + x.encVar(varname+"."+t2.Name, t2.Type) + x.line("}") + } else { + x.encVar(varname+"."+t2.Name, t2.Type) + } + if si.omitEmpty { + x.line("}") + } + x.linef("} ") // end if/else ti.toArray + } + x.linef("if %s || %s {", ti2arrayvar, struct2arrvar) // if ti.toArray { + x.linef("z.EncSendContainerState(codecSelfer_containerArrayEnd%s)", x.xs) + x.line("} else {") + x.linef("z.EncSendContainerState(codecSelfer_containerMapEnd%s)", x.xs) + x.line("}") + +} + +func (x *genRunner) encListFallback(varname string, t reflect.Type) { + i := x.varsfx() + g := genTempVarPfx + x.line("r.EncodeArrayStart(len(" + varname + "))") + if t.Kind() == reflect.Chan { + x.linef("for %si%s, %si2%s := 0, len(%s); %si%s < %si2%s; %si%s++ {", g, i, g, i, varname, g, i, g, i, g, i) + x.linef("z.EncSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) + x.linef("%sv%s := <-%s", g, i, varname) + } else { + // x.linef("for %si%s, %sv%s := range %s {", genTempVarPfx, i, genTempVarPfx, i, varname) + x.linef("for _, %sv%s := range %s {", genTempVarPfx, i, varname) + x.linef("z.EncSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) + } + x.encVar(genTempVarPfx+"v"+i, t.Elem()) + x.line("}") + x.linef("z.EncSendContainerState(codecSelfer_containerArrayEnd%s)", x.xs) +} + +func (x *genRunner) encMapFallback(varname string, t reflect.Type) { + // TODO: expand this to handle canonical. + i := x.varsfx() + x.line("r.EncodeMapStart(len(" + varname + "))") + x.linef("for %sk%s, %sv%s := range %s {", genTempVarPfx, i, genTempVarPfx, i, varname) + // x.line("for " + genTempVarPfx + "k" + i + ", " + genTempVarPfx + "v" + i + " := range " + varname + " {") + x.linef("z.EncSendContainerState(codecSelfer_containerMapKey%s)", x.xs) + x.encVar(genTempVarPfx+"k"+i, t.Key()) + x.linef("z.EncSendContainerState(codecSelfer_containerMapValue%s)", x.xs) + x.encVar(genTempVarPfx+"v"+i, t.Elem()) + x.line("}") + x.linef("z.EncSendContainerState(codecSelfer_containerMapEnd%s)", x.xs) +} + +func (x *genRunner) decVar(varname string, t reflect.Type, canBeNil bool) { + // We only encode as nil if a nillable value. + // This removes some of the wasted checks for TryDecodeAsNil. + // We need to think about this more, to see what happens if omitempty, etc + // cause a nil value to be stored when something is expected. + // This could happen when decoding from a struct encoded as an array. + // For that, decVar should be called with canNil=true, to force true as its value. + i := x.varsfx() + if !canBeNil { + canBeNil = genAnythingCanBeNil || !genIsImmutable(t) + } + if canBeNil { + x.line("if r.TryDecodeAsNil() {") + if t.Kind() == reflect.Ptr { + x.line("if " + varname + " != nil { ") + + // if varname is a field of a struct (has a dot in it), + // then just set it to nil + if strings.IndexByte(varname, '.') != -1 { + x.line(varname + " = nil") + } else { + x.line("*" + varname + " = " + x.genZeroValueR(t.Elem())) + } + x.line("}") + } else { + x.line(varname + " = " + x.genZeroValueR(t)) + } + x.line("} else {") + } else { + x.line("// cannot be nil") + } + if t.Kind() != reflect.Ptr { + if x.decTryAssignPrimitive(varname, t) { + x.line(genTempVarPfx + "v" + i + " := &" + varname) + x.dec(genTempVarPfx+"v"+i, t) + } + } else { + x.linef("if %s == nil { %s = new(%s) }", varname, varname, x.genTypeName(t.Elem())) + // Ensure we set underlying ptr to a non-nil value (so we can deref to it later). + // There's a chance of a **T in here which is nil. + var ptrPfx string + for t = t.Elem(); t.Kind() == reflect.Ptr; t = t.Elem() { + ptrPfx += "*" + x.linef("if %s%s == nil { %s%s = new(%s)}", + ptrPfx, varname, ptrPfx, varname, x.genTypeName(t)) + } + // if varname has [ in it, then create temp variable for this ptr thingie + if strings.Index(varname, "[") >= 0 { + varname2 := genTempVarPfx + "w" + i + x.line(varname2 + " := " + varname) + varname = varname2 + } + + if ptrPfx == "" { + x.dec(varname, t) + } else { + x.line(genTempVarPfx + "z" + i + " := " + ptrPfx + varname) + x.dec(genTempVarPfx+"z"+i, t) + } + + } + + if canBeNil { + x.line("} ") + } +} + +func (x *genRunner) dec(varname string, t reflect.Type) { + // assumptions: + // - the varname is to a pointer already. No need to take address of it + // - t is always a baseType T (not a *T, etc). + rtid := reflect.ValueOf(t).Pointer() + tptr := reflect.PtrTo(t) + if x.checkForSelfer(t, varname) { + if t.Implements(selferTyp) || tptr.Implements(selferTyp) { + x.line(varname + ".CodecDecodeSelf(d)") + return + } + if _, ok := x.td[rtid]; ok { + x.line(varname + ".CodecDecodeSelf(d)") + return + } + } + + inlist := false + for _, t0 := range x.t { + if t == t0 { + inlist = true + if x.checkForSelfer(t, varname) { + x.line(varname + ".CodecDecodeSelf(d)") + return + } + break + } + } + + var rtidAdded bool + if t == x.tc { + x.td[rtid] = true + rtidAdded = true + } + + // check if + // - type is RawExt + // - the type implements (Text|JSON|Binary)(Unm|M)arshal + mi := x.varsfx() + x.linef("%sm%s := z.DecBinary()", genTempVarPfx, mi) + x.linef("_ = %sm%s", genTempVarPfx, mi) + x.line("if false {") //start if block + defer func() { x.line("}") }() //end if block + + if t == rawExtTyp { + x.linef("} else { r.DecodeExt(%v, 0, nil)", varname) + return + } + + // HACK: Support for Builtins. + // Currently, only Binc supports builtins, and the only builtin type is time.Time. + // Have a method that returns the rtid for time.Time if Handle is Binc. + if t == timeTyp { + vrtid := genTempVarPfx + "m" + x.varsfx() + x.linef("} else if %s := z.TimeRtidIfBinc(); %s != 0 { ", vrtid, vrtid) + x.linef("r.DecodeBuiltin(%s, %s)", vrtid, varname) + } + // only check for extensions if the type is named, and has a packagePath. + if genImportPath(t) != "" && t.Name() != "" { + // first check if extensions are configued, before doing the interface conversion + x.linef("} else if z.HasExtensions() && z.DecExt(%s) {", varname) + } + + if t.Implements(binaryUnmarshalerTyp) || tptr.Implements(binaryUnmarshalerTyp) { + x.linef("} else if %sm%s { z.DecBinaryUnmarshal(%v) ", genTempVarPfx, mi, varname) + } + if t.Implements(jsonUnmarshalerTyp) || tptr.Implements(jsonUnmarshalerTyp) { + x.linef("} else if !%sm%s && z.IsJSONHandle() { z.DecJSONUnmarshal(%v)", genTempVarPfx, mi, varname) + } else if t.Implements(textUnmarshalerTyp) || tptr.Implements(textUnmarshalerTyp) { + x.linef("} else if !%sm%s { z.DecTextUnmarshal(%v)", genTempVarPfx, mi, varname) + } + + x.line("} else {") + + // Since these are pointers, we cannot share, and have to use them one by one + switch t.Kind() { + case reflect.Int: + x.line("*((*int)(" + varname + ")) = int(r.DecodeInt(codecSelferBitsize" + x.xs + "))") + // x.line("z.DecInt((*int)(" + varname + "))") + case reflect.Int8: + x.line("*((*int8)(" + varname + ")) = int8(r.DecodeInt(8))") + // x.line("z.DecInt8((*int8)(" + varname + "))") + case reflect.Int16: + x.line("*((*int16)(" + varname + ")) = int16(r.DecodeInt(16))") + // x.line("z.DecInt16((*int16)(" + varname + "))") + case reflect.Int32: + x.line("*((*int32)(" + varname + ")) = int32(r.DecodeInt(32))") + // x.line("z.DecInt32((*int32)(" + varname + "))") + case reflect.Int64: + x.line("*((*int64)(" + varname + ")) = int64(r.DecodeInt(64))") + // x.line("z.DecInt64((*int64)(" + varname + "))") + + case reflect.Uint: + x.line("*((*uint)(" + varname + ")) = uint(r.DecodeUint(codecSelferBitsize" + x.xs + "))") + // x.line("z.DecUint((*uint)(" + varname + "))") + case reflect.Uint8: + x.line("*((*uint8)(" + varname + ")) = uint8(r.DecodeUint(8))") + // x.line("z.DecUint8((*uint8)(" + varname + "))") + case reflect.Uint16: + x.line("*((*uint16)(" + varname + ")) = uint16(r.DecodeUint(16))") + //x.line("z.DecUint16((*uint16)(" + varname + "))") + case reflect.Uint32: + x.line("*((*uint32)(" + varname + ")) = uint32(r.DecodeUint(32))") + //x.line("z.DecUint32((*uint32)(" + varname + "))") + case reflect.Uint64: + x.line("*((*uint64)(" + varname + ")) = uint64(r.DecodeUint(64))") + //x.line("z.DecUint64((*uint64)(" + varname + "))") + case reflect.Uintptr: + x.line("*((*uintptr)(" + varname + ")) = uintptr(r.DecodeUint(codecSelferBitsize" + x.xs + "))") + + case reflect.Float32: + x.line("*((*float32)(" + varname + ")) = float32(r.DecodeFloat(true))") + //x.line("z.DecFloat32((*float32)(" + varname + "))") + case reflect.Float64: + x.line("*((*float64)(" + varname + ")) = float64(r.DecodeFloat(false))") + // x.line("z.DecFloat64((*float64)(" + varname + "))") + + case reflect.Bool: + x.line("*((*bool)(" + varname + ")) = r.DecodeBool()") + // x.line("z.DecBool((*bool)(" + varname + "))") + case reflect.String: + x.line("*((*string)(" + varname + ")) = r.DecodeString()") + // x.line("z.DecString((*string)(" + varname + "))") + case reflect.Array, reflect.Chan: + x.xtraSM(varname, false, t) + // x.decListFallback(varname, rtid, true, t) + case reflect.Slice: + // if a []uint8, call dedicated function + // if a known fastpath slice, call dedicated function + // else write encode function in-line. + // - if elements are primitives or Selfers, call dedicated function on each member. + // - else call Encoder.encode(XXX) on it. + if rtid == uint8SliceTypId { + x.line("*" + varname + " = r.DecodeBytes(*(*[]byte)(" + varname + "), false, false)") + } else if fastpathAV.index(rtid) != -1 { + g := x.newGenV(t) + x.line("z.F." + g.MethodNamePfx("Dec", false) + "X(" + varname + ", false, d)") + } else { + x.xtraSM(varname, false, t) + // x.decListFallback(varname, rtid, false, t) + } + case reflect.Map: + // if a known fastpath map, call dedicated function + // else write encode function in-line. + // - if elements are primitives or Selfers, call dedicated function on each member. + // - else call Encoder.encode(XXX) on it. + if fastpathAV.index(rtid) != -1 { + g := x.newGenV(t) + x.line("z.F." + g.MethodNamePfx("Dec", false) + "X(" + varname + ", false, d)") + } else { + x.xtraSM(varname, false, t) + // x.decMapFallback(varname, rtid, t) + } + case reflect.Struct: + if inlist { + x.decStruct(varname, rtid, t) + } else { + // delete(x.td, rtid) + x.line("z.DecFallback(" + varname + ", false)") + } + default: + if rtidAdded { + delete(x.te, rtid) + } + x.line("z.DecFallback(" + varname + ", true)") + } +} + +func (x *genRunner) decTryAssignPrimitive(varname string, t reflect.Type) (tryAsPtr bool) { + // We have to use the actual type name when doing a direct assignment. + // We don't have the luxury of casting the pointer to the underlying type. + // + // Consequently, in the situation of a + // type Message int32 + // var x Message + // var i int32 = 32 + // x = i // this will bomb + // x = Message(i) // this will work + // *((*int32)(&x)) = i // this will work + // + // Consequently, we replace: + // case reflect.Uint32: x.line(varname + " = uint32(r.DecodeUint(32))") + // with: + // case reflect.Uint32: x.line(varname + " = " + genTypeNamePrim(t, x.tc) + "(r.DecodeUint(32))") + + xfn := func(t reflect.Type) string { + return x.genTypeNamePrim(t) + } + switch t.Kind() { + case reflect.Int: + x.linef("%s = %s(r.DecodeInt(codecSelferBitsize%s))", varname, xfn(t), x.xs) + case reflect.Int8: + x.linef("%s = %s(r.DecodeInt(8))", varname, xfn(t)) + case reflect.Int16: + x.linef("%s = %s(r.DecodeInt(16))", varname, xfn(t)) + case reflect.Int32: + x.linef("%s = %s(r.DecodeInt(32))", varname, xfn(t)) + case reflect.Int64: + x.linef("%s = %s(r.DecodeInt(64))", varname, xfn(t)) + + case reflect.Uint: + x.linef("%s = %s(r.DecodeUint(codecSelferBitsize%s))", varname, xfn(t), x.xs) + case reflect.Uint8: + x.linef("%s = %s(r.DecodeUint(8))", varname, xfn(t)) + case reflect.Uint16: + x.linef("%s = %s(r.DecodeUint(16))", varname, xfn(t)) + case reflect.Uint32: + x.linef("%s = %s(r.DecodeUint(32))", varname, xfn(t)) + case reflect.Uint64: + x.linef("%s = %s(r.DecodeUint(64))", varname, xfn(t)) + case reflect.Uintptr: + x.linef("%s = %s(r.DecodeUint(codecSelferBitsize%s))", varname, xfn(t), x.xs) + + case reflect.Float32: + x.linef("%s = %s(r.DecodeFloat(true))", varname, xfn(t)) + case reflect.Float64: + x.linef("%s = %s(r.DecodeFloat(false))", varname, xfn(t)) + + case reflect.Bool: + x.linef("%s = %s(r.DecodeBool())", varname, xfn(t)) + case reflect.String: + x.linef("%s = %s(r.DecodeString())", varname, xfn(t)) + default: + tryAsPtr = true + } + return +} + +func (x *genRunner) decListFallback(varname string, rtid uintptr, t reflect.Type) { + type tstruc struct { + TempVar string + Rand string + Varname string + CTyp string + Typ string + Immutable bool + Size int + } + telem := t.Elem() + ts := tstruc{genTempVarPfx, x.varsfx(), varname, x.genTypeName(t), x.genTypeName(telem), genIsImmutable(telem), int(telem.Size())} + + funcs := make(template.FuncMap) + + funcs["decLineVar"] = func(varname string) string { + x.decVar(varname, telem, false) + return "" + } + funcs["decLine"] = func(pfx string) string { + x.decVar(ts.TempVar+pfx+ts.Rand, reflect.PtrTo(telem), false) + return "" + } + funcs["var"] = func(s string) string { + return ts.TempVar + s + ts.Rand + } + funcs["zero"] = func() string { + return x.genZeroValueR(telem) + } + funcs["isArray"] = func() bool { + return t.Kind() == reflect.Array + } + funcs["isSlice"] = func() bool { + return t.Kind() == reflect.Slice + } + funcs["isChan"] = func() bool { + return t.Kind() == reflect.Chan + } + tm, err := template.New("").Funcs(funcs).Parse(genDecListTmpl) + if err != nil { + panic(err) + } + if err = tm.Execute(x.w, &ts); err != nil { + panic(err) + } +} + +func (x *genRunner) decMapFallback(varname string, rtid uintptr, t reflect.Type) { + type tstruc struct { + TempVar string + Sfx string + Rand string + Varname string + KTyp string + Typ string + Size int + } + telem := t.Elem() + tkey := t.Key() + ts := tstruc{ + genTempVarPfx, x.xs, x.varsfx(), varname, x.genTypeName(tkey), + x.genTypeName(telem), int(telem.Size() + tkey.Size()), + } + + funcs := make(template.FuncMap) + funcs["decElemZero"] = func() string { + return x.genZeroValueR(telem) + } + funcs["decElemKindImmutable"] = func() bool { + return genIsImmutable(telem) + } + funcs["decElemKindPtr"] = func() bool { + return telem.Kind() == reflect.Ptr + } + funcs["decElemKindIntf"] = func() bool { + return telem.Kind() == reflect.Interface + } + funcs["decLineVarK"] = func(varname string) string { + x.decVar(varname, tkey, false) + return "" + } + funcs["decLineVar"] = func(varname string) string { + x.decVar(varname, telem, false) + return "" + } + funcs["decLineK"] = func(pfx string) string { + x.decVar(ts.TempVar+pfx+ts.Rand, reflect.PtrTo(tkey), false) + return "" + } + funcs["decLine"] = func(pfx string) string { + x.decVar(ts.TempVar+pfx+ts.Rand, reflect.PtrTo(telem), false) + return "" + } + funcs["var"] = func(s string) string { + return ts.TempVar + s + ts.Rand + } + + tm, err := template.New("").Funcs(funcs).Parse(genDecMapTmpl) + if err != nil { + panic(err) + } + if err = tm.Execute(x.w, &ts); err != nil { + panic(err) + } +} + +func (x *genRunner) decStructMapSwitch(kName string, varname string, rtid uintptr, t reflect.Type) { + ti := x.ti.get(rtid, t) + tisfi := ti.sfip // always use sequence from file. decStruct expects same thing. + x.line("switch (" + kName + ") {") + for _, si := range tisfi { + x.line("case \"" + si.encName + "\":") + var t2 reflect.StructField + if si.i != -1 { + t2 = t.Field(int(si.i)) + } else { + //we must accomodate anonymous fields, where the embedded field is a nil pointer in the value. + // t2 = t.FieldByIndex(si.is) + t2typ := t + varname3 := varname + for _, ix := range si.is { + for t2typ.Kind() == reflect.Ptr { + t2typ = t2typ.Elem() + } + t2 = t2typ.Field(ix) + t2typ = t2.Type + varname3 = varname3 + "." + t2.Name + if t2typ.Kind() == reflect.Ptr { + x.linef("if %s == nil { %s = new(%s) }", varname3, varname3, x.genTypeName(t2typ.Elem())) + } + } + } + x.decVar(varname+"."+t2.Name, t2.Type, false) + } + x.line("default:") + // pass the slice here, so that the string will not escape, and maybe save allocation + x.line("z.DecStructFieldNotFound(-1, " + kName + ")") + x.line("} // end switch " + kName) +} + +func (x *genRunner) decStructMap(varname, lenvarname string, rtid uintptr, t reflect.Type, style genStructMapStyle) { + tpfx := genTempVarPfx + i := x.varsfx() + kName := tpfx + "s" + i + + // We thought to use ReadStringAsBytes, as go compiler might optimize the copy out. + // However, using that was more expensive, as it seems that the switch expression + // is evaluated each time. + // + // We could depend on decodeString using a temporary/shared buffer internally. + // However, this model of creating a byte array, and using explicitly is faster, + // and allows optional use of unsafe []byte->string conversion without alloc. + + // Also, ensure that the slice array doesn't escape. + // That will help escape analysis prevent allocation when it gets better. + + // x.line("var " + kName + "Arr = [32]byte{} // default string to decode into") + // x.line("var " + kName + "Slc = " + kName + "Arr[:] // default slice to decode into") + // use the scratch buffer to avoid allocation (most field names are < 32). + + x.line("var " + kName + "Slc = z.DecScratchBuffer() // default slice to decode into") + + x.line("_ = " + kName + "Slc") + switch style { + case genStructMapStyleLenPrefix: + x.linef("for %sj%s := 0; %sj%s < %s; %sj%s++ {", tpfx, i, tpfx, i, lenvarname, tpfx, i) + case genStructMapStyleCheckBreak: + x.linef("for %sj%s := 0; !r.CheckBreak(); %sj%s++ {", tpfx, i, tpfx, i) + default: // 0, otherwise. + x.linef("var %shl%s bool = %s >= 0", tpfx, i, lenvarname) // has length + x.linef("for %sj%s := 0; ; %sj%s++ {", tpfx, i, tpfx, i) + x.linef("if %shl%s { if %sj%s >= %s { break }", tpfx, i, tpfx, i, lenvarname) + x.line("} else { if r.CheckBreak() { break }; }") + } + x.linef("z.DecSendContainerState(codecSelfer_containerMapKey%s)", x.xs) + x.line(kName + "Slc = r.DecodeBytes(" + kName + "Slc, true, true)") + // let string be scoped to this loop alone, so it doesn't escape. + if x.unsafe { + x.line(kName + "SlcHdr := codecSelferUnsafeString" + x.xs + "{uintptr(unsafe.Pointer(&" + + kName + "Slc[0])), len(" + kName + "Slc)}") + x.line(kName + " := *(*string)(unsafe.Pointer(&" + kName + "SlcHdr))") + } else { + x.line(kName + " := string(" + kName + "Slc)") + } + x.linef("z.DecSendContainerState(codecSelfer_containerMapValue%s)", x.xs) + x.decStructMapSwitch(kName, varname, rtid, t) + + x.line("} // end for " + tpfx + "j" + i) + x.linef("z.DecSendContainerState(codecSelfer_containerMapEnd%s)", x.xs) +} + +func (x *genRunner) decStructArray(varname, lenvarname, breakString string, rtid uintptr, t reflect.Type) { + tpfx := genTempVarPfx + i := x.varsfx() + ti := x.ti.get(rtid, t) + tisfi := ti.sfip // always use sequence from file. decStruct expects same thing. + x.linef("var %sj%s int", tpfx, i) + x.linef("var %sb%s bool", tpfx, i) // break + x.linef("var %shl%s bool = %s >= 0", tpfx, i, lenvarname) // has length + for _, si := range tisfi { + var t2 reflect.StructField + if si.i != -1 { + t2 = t.Field(int(si.i)) + } else { + //we must accomodate anonymous fields, where the embedded field is a nil pointer in the value. + // t2 = t.FieldByIndex(si.is) + t2typ := t + varname3 := varname + for _, ix := range si.is { + for t2typ.Kind() == reflect.Ptr { + t2typ = t2typ.Elem() + } + t2 = t2typ.Field(ix) + t2typ = t2.Type + varname3 = varname3 + "." + t2.Name + if t2typ.Kind() == reflect.Ptr { + x.linef("if %s == nil { %s = new(%s) }", varname3, varname3, x.genTypeName(t2typ.Elem())) + } + } + } + + x.linef("%sj%s++; if %shl%s { %sb%s = %sj%s > %s } else { %sb%s = r.CheckBreak() }", + tpfx, i, tpfx, i, tpfx, i, + tpfx, i, lenvarname, tpfx, i) + x.linef("if %sb%s { z.DecSendContainerState(codecSelfer_containerArrayEnd%s); %s }", + tpfx, i, x.xs, breakString) + x.linef("z.DecSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) + x.decVar(varname+"."+t2.Name, t2.Type, true) + } + // read remaining values and throw away. + x.line("for {") + x.linef("%sj%s++; if %shl%s { %sb%s = %sj%s > %s } else { %sb%s = r.CheckBreak() }", + tpfx, i, tpfx, i, tpfx, i, + tpfx, i, lenvarname, tpfx, i) + x.linef("if %sb%s { break }", tpfx, i) + x.linef("z.DecSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) + x.linef(`z.DecStructFieldNotFound(%sj%s - 1, "")`, tpfx, i) + x.line("}") + x.linef("z.DecSendContainerState(codecSelfer_containerArrayEnd%s)", x.xs) +} + +func (x *genRunner) decStruct(varname string, rtid uintptr, t reflect.Type) { + // if container is map + i := x.varsfx() + x.linef("%sct%s := r.ContainerType()", genTempVarPfx, i) + x.linef("if %sct%s == codecSelferValueTypeMap%s {", genTempVarPfx, i, x.xs) + x.line(genTempVarPfx + "l" + i + " := r.ReadMapStart()") + x.linef("if %sl%s == 0 {", genTempVarPfx, i) + x.linef("z.DecSendContainerState(codecSelfer_containerMapEnd%s)", x.xs) + if genUseOneFunctionForDecStructMap { + x.line("} else { ") + x.linef("x.codecDecodeSelfFromMap(%sl%s, d)", genTempVarPfx, i) + } else { + x.line("} else if " + genTempVarPfx + "l" + i + " > 0 { ") + x.line("x.codecDecodeSelfFromMapLenPrefix(" + genTempVarPfx + "l" + i + ", d)") + x.line("} else {") + x.line("x.codecDecodeSelfFromMapCheckBreak(" + genTempVarPfx + "l" + i + ", d)") + } + x.line("}") + + // else if container is array + x.linef("} else if %sct%s == codecSelferValueTypeArray%s {", genTempVarPfx, i, x.xs) + x.line(genTempVarPfx + "l" + i + " := r.ReadArrayStart()") + x.linef("if %sl%s == 0 {", genTempVarPfx, i) + x.linef("z.DecSendContainerState(codecSelfer_containerArrayEnd%s)", x.xs) + x.line("} else { ") + x.linef("x.codecDecodeSelfFromArray(%sl%s, d)", genTempVarPfx, i) + x.line("}") + // else panic + x.line("} else { ") + x.line("panic(codecSelferOnlyMapOrArrayEncodeToStructErr" + x.xs + ")") + x.line("} ") +} + +// -------- + +type genV struct { + // genV is either a primitive (Primitive != "") or a map (MapKey != "") or a slice + MapKey string + Elem string + Primitive string + Size int +} + +func (x *genRunner) newGenV(t reflect.Type) (v genV) { + switch t.Kind() { + case reflect.Slice, reflect.Array: + te := t.Elem() + v.Elem = x.genTypeName(te) + v.Size = int(te.Size()) + case reflect.Map: + te, tk := t.Elem(), t.Key() + v.Elem = x.genTypeName(te) + v.MapKey = x.genTypeName(tk) + v.Size = int(te.Size() + tk.Size()) + default: + panic("unexpected type for newGenV. Requires map or slice type") + } + return +} + +func (x *genV) MethodNamePfx(prefix string, prim bool) string { + var name []byte + if prefix != "" { + name = append(name, prefix...) + } + if prim { + name = append(name, genTitleCaseName(x.Primitive)...) + } else { + if x.MapKey == "" { + name = append(name, "Slice"...) + } else { + name = append(name, "Map"...) + name = append(name, genTitleCaseName(x.MapKey)...) + } + name = append(name, genTitleCaseName(x.Elem)...) + } + return string(name) + +} + +var genCheckVendor = os.Getenv("GO15VENDOREXPERIMENT") == "1" + +// genImportPath returns import path of a non-predeclared named typed, or an empty string otherwise. +// +// This handles the misbehaviour that occurs when 1.5-style vendoring is enabled, +// where PkgPath returns the full path, including the vendoring pre-fix that should have been stripped. +// We strip it here. +func genImportPath(t reflect.Type) (s string) { + s = t.PkgPath() + if genCheckVendor { + // HACK: Misbehaviour occurs in go 1.5. May have to re-visit this later. + // if s contains /vendor/ OR startsWith vendor/, then return everything after it. + const vendorStart = "vendor/" + const vendorInline = "/vendor/" + if i := strings.LastIndex(s, vendorInline); i >= 0 { + s = s[i+len(vendorInline):] + } else if strings.HasPrefix(s, vendorStart) { + s = s[len(vendorStart):] + } + } + return +} + +func genNonPtr(t reflect.Type) reflect.Type { + for t.Kind() == reflect.Ptr { + t = t.Elem() + } + return t +} + +func genTitleCaseName(s string) string { + switch s { + case "interface{}": + return "Intf" + default: + return strings.ToUpper(s[0:1]) + s[1:] + } +} + +func genMethodNameT(t reflect.Type, tRef reflect.Type) (n string) { + var ptrPfx string + for t.Kind() == reflect.Ptr { + ptrPfx += "Ptrto" + t = t.Elem() + } + tstr := t.String() + if tn := t.Name(); tn != "" { + if tRef != nil && genImportPath(t) == genImportPath(tRef) { + return ptrPfx + tn + } else { + if genQNameRegex.MatchString(tstr) { + return ptrPfx + strings.Replace(tstr, ".", "_", 1000) + } else { + return ptrPfx + genCustomTypeName(tstr) + } + } + } + switch t.Kind() { + case reflect.Map: + return ptrPfx + "Map" + genMethodNameT(t.Key(), tRef) + genMethodNameT(t.Elem(), tRef) + case reflect.Slice: + return ptrPfx + "Slice" + genMethodNameT(t.Elem(), tRef) + case reflect.Array: + return ptrPfx + "Array" + strconv.FormatInt(int64(t.Len()), 10) + genMethodNameT(t.Elem(), tRef) + case reflect.Chan: + var cx string + switch t.ChanDir() { + case reflect.SendDir: + cx = "ChanSend" + case reflect.RecvDir: + cx = "ChanRecv" + default: + cx = "Chan" + } + return ptrPfx + cx + genMethodNameT(t.Elem(), tRef) + default: + if t == intfTyp { + return ptrPfx + "Interface" + } else { + if tRef != nil && genImportPath(t) == genImportPath(tRef) { + if t.Name() != "" { + return ptrPfx + t.Name() + } else { + return ptrPfx + genCustomTypeName(tstr) + } + } else { + // best way to get the package name inclusive + // return ptrPfx + strings.Replace(tstr, ".", "_", 1000) + // return ptrPfx + genBase64enc.EncodeToString([]byte(tstr)) + if t.Name() != "" && genQNameRegex.MatchString(tstr) { + return ptrPfx + strings.Replace(tstr, ".", "_", 1000) + } else { + return ptrPfx + genCustomTypeName(tstr) + } + } + } + } +} + +// genCustomNameForType base64encodes the t.String() value in such a way +// that it can be used within a function name. +func genCustomTypeName(tstr string) string { + len2 := genBase64enc.EncodedLen(len(tstr)) + bufx := make([]byte, len2) + genBase64enc.Encode(bufx, []byte(tstr)) + for i := len2 - 1; i >= 0; i-- { + if bufx[i] == '=' { + len2-- + } else { + break + } + } + return string(bufx[:len2]) +} + +func genIsImmutable(t reflect.Type) (v bool) { + return isImmutableKind(t.Kind()) +} + +type genInternal struct { + Values []genV + Unsafe bool +} + +func (x genInternal) FastpathLen() (l int) { + for _, v := range x.Values { + if v.Primitive == "" { + l++ + } + } + return +} + +func genInternalZeroValue(s string) string { + switch s { + case "interface{}": + return "nil" + case "bool": + return "false" + case "string": + return `""` + default: + return "0" + } +} + +func genInternalEncCommandAsString(s string, vname string) string { + switch s { + case "uint", "uint8", "uint16", "uint32", "uint64": + return "ee.EncodeUint(uint64(" + vname + "))" + case "int", "int8", "int16", "int32", "int64": + return "ee.EncodeInt(int64(" + vname + "))" + case "string": + return "ee.EncodeString(c_UTF8, " + vname + ")" + case "float32": + return "ee.EncodeFloat32(" + vname + ")" + case "float64": + return "ee.EncodeFloat64(" + vname + ")" + case "bool": + return "ee.EncodeBool(" + vname + ")" + case "symbol": + return "ee.EncodeSymbol(" + vname + ")" + default: + return "e.encode(" + vname + ")" + } +} + +func genInternalDecCommandAsString(s string) string { + switch s { + case "uint": + return "uint(dd.DecodeUint(uintBitsize))" + case "uint8": + return "uint8(dd.DecodeUint(8))" + case "uint16": + return "uint16(dd.DecodeUint(16))" + case "uint32": + return "uint32(dd.DecodeUint(32))" + case "uint64": + return "dd.DecodeUint(64)" + case "uintptr": + return "uintptr(dd.DecodeUint(uintBitsize))" + case "int": + return "int(dd.DecodeInt(intBitsize))" + case "int8": + return "int8(dd.DecodeInt(8))" + case "int16": + return "int16(dd.DecodeInt(16))" + case "int32": + return "int32(dd.DecodeInt(32))" + case "int64": + return "dd.DecodeInt(64)" + + case "string": + return "dd.DecodeString()" + case "float32": + return "float32(dd.DecodeFloat(true))" + case "float64": + return "dd.DecodeFloat(false)" + case "bool": + return "dd.DecodeBool()" + default: + panic(errors.New("gen internal: unknown type for decode: " + s)) + } +} + +func genInternalSortType(s string, elem bool) string { + for _, v := range [...]string{"int", "uint", "float", "bool", "string"} { + if strings.HasPrefix(s, v) { + if elem { + if v == "int" || v == "uint" || v == "float" { + return v + "64" + } else { + return v + } + } + return v + "Slice" + } + } + panic("sorttype: unexpected type: " + s) +} + +// var genInternalMu sync.Mutex +var genInternalV genInternal +var genInternalTmplFuncs template.FuncMap +var genInternalOnce sync.Once + +func genInternalInit() { + types := [...]string{ + "interface{}", + "string", + "float32", + "float64", + "uint", + "uint8", + "uint16", + "uint32", + "uint64", + "uintptr", + "int", + "int8", + "int16", + "int32", + "int64", + "bool", + } + // keep as slice, so it is in specific iteration order. + // Initial order was uint64, string, interface{}, int, int64 + mapvaltypes := [...]string{ + "interface{}", + "string", + "uint", + "uint8", + "uint16", + "uint32", + "uint64", + "uintptr", + "int", + "int8", + "int16", + "int32", + "int64", + "float32", + "float64", + "bool", + } + wordSizeBytes := int(intBitsize) / 8 + + mapvaltypes2 := map[string]int{ + "interface{}": 2 * wordSizeBytes, + "string": 2 * wordSizeBytes, + "uint": 1 * wordSizeBytes, + "uint8": 1, + "uint16": 2, + "uint32": 4, + "uint64": 8, + "uintptr": 1 * wordSizeBytes, + "int": 1 * wordSizeBytes, + "int8": 1, + "int16": 2, + "int32": 4, + "int64": 8, + "float32": 4, + "float64": 8, + "bool": 1, + } + var gt genInternal + + // For each slice or map type, there must be a (symetrical) Encode and Decode fast-path function + for _, s := range types { + gt.Values = append(gt.Values, genV{Primitive: s, Size: mapvaltypes2[s]}) + if s != "uint8" { // do not generate fast path for slice of bytes. Treat specially already. + gt.Values = append(gt.Values, genV{Elem: s, Size: mapvaltypes2[s]}) + } + if _, ok := mapvaltypes2[s]; !ok { + gt.Values = append(gt.Values, genV{MapKey: s, Elem: s, Size: 2 * mapvaltypes2[s]}) + } + for _, ms := range mapvaltypes { + gt.Values = append(gt.Values, genV{MapKey: s, Elem: ms, Size: mapvaltypes2[s] + mapvaltypes2[ms]}) + } + } + + funcs := make(template.FuncMap) + // funcs["haspfx"] = strings.HasPrefix + funcs["encmd"] = genInternalEncCommandAsString + funcs["decmd"] = genInternalDecCommandAsString + funcs["zerocmd"] = genInternalZeroValue + funcs["hasprefix"] = strings.HasPrefix + funcs["sorttype"] = genInternalSortType + + genInternalV = gt + genInternalTmplFuncs = funcs +} + +// genInternalGoFile is used to generate source files from templates. +// It is run by the program author alone. +// Unfortunately, it has to be exported so that it can be called from a command line tool. +// *** DO NOT USE *** +func genInternalGoFile(r io.Reader, w io.Writer, safe bool) (err error) { + genInternalOnce.Do(genInternalInit) + + gt := genInternalV + gt.Unsafe = !safe + + t := template.New("").Funcs(genInternalTmplFuncs) + + tmplstr, err := ioutil.ReadAll(r) + if err != nil { + return + } + + if t, err = t.Parse(string(tmplstr)); err != nil { + return + } + + var out bytes.Buffer + err = t.Execute(&out, gt) + if err != nil { + return + } + + bout, err := format.Source(out.Bytes()) + if err != nil { + w.Write(out.Bytes()) // write out if error, so we can still see. + // w.Write(bout) // write out if error, as much as possible, so we can still see. + return + } + w.Write(bout) + return +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/helper.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/helper.go new file mode 100644 index 0000000000000..560014ae393a9 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/helper.go @@ -0,0 +1,1129 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +// Contains code shared by both encode and decode. + +// Some shared ideas around encoding/decoding +// ------------------------------------------ +// +// If an interface{} is passed, we first do a type assertion to see if it is +// a primitive type or a map/slice of primitive types, and use a fastpath to handle it. +// +// If we start with a reflect.Value, we are already in reflect.Value land and +// will try to grab the function for the underlying Type and directly call that function. +// This is more performant than calling reflect.Value.Interface(). +// +// This still helps us bypass many layers of reflection, and give best performance. +// +// Containers +// ------------ +// Containers in the stream are either associative arrays (key-value pairs) or +// regular arrays (indexed by incrementing integers). +// +// Some streams support indefinite-length containers, and use a breaking +// byte-sequence to denote that the container has come to an end. +// +// Some streams also are text-based, and use explicit separators to denote the +// end/beginning of different values. +// +// During encode, we use a high-level condition to determine how to iterate through +// the container. That decision is based on whether the container is text-based (with +// separators) or binary (without separators). If binary, we do not even call the +// encoding of separators. +// +// During decode, we use a different high-level condition to determine how to iterate +// through the containers. That decision is based on whether the stream contained +// a length prefix, or if it used explicit breaks. If length-prefixed, we assume that +// it has to be binary, and we do not even try to read separators. +// +// The only codec that may suffer (slightly) is cbor, and only when decoding indefinite-length. +// It may suffer because we treat it like a text-based codec, and read separators. +// However, this read is a no-op and the cost is insignificant. +// +// Philosophy +// ------------ +// On decode, this codec will update containers appropriately: +// - If struct, update fields from stream into fields of struct. +// If field in stream not found in struct, handle appropriately (based on option). +// If a struct field has no corresponding value in the stream, leave it AS IS. +// If nil in stream, set value to nil/zero value. +// - If map, update map from stream. +// If the stream value is NIL, set the map to nil. +// - if slice, try to update up to length of array in stream. +// if container len is less than stream array length, +// and container cannot be expanded, handled (based on option). +// This means you can decode 4-element stream array into 1-element array. +// +// ------------------------------------ +// On encode, user can specify omitEmpty. This means that the value will be omitted +// if the zero value. The problem may occur during decode, where omitted values do not affect +// the value being decoded into. This means that if decoding into a struct with an +// int field with current value=5, and the field is omitted in the stream, then after +// decoding, the value will still be 5 (not 0). +// omitEmpty only works if you guarantee that you always decode into zero-values. +// +// ------------------------------------ +// We could have truncated a map to remove keys not available in the stream, +// or set values in the struct which are not in the stream to their zero values. +// We decided against it because there is no efficient way to do it. +// We may introduce it as an option later. +// However, that will require enabling it for both runtime and code generation modes. +// +// To support truncate, we need to do 2 passes over the container: +// map +// - first collect all keys (e.g. in k1) +// - for each key in stream, mark k1 that the key should not be removed +// - after updating map, do second pass and call delete for all keys in k1 which are not marked +// struct: +// - for each field, track the *typeInfo s1 +// - iterate through all s1, and for each one not marked, set value to zero +// - this involves checking the possible anonymous fields which are nil ptrs. +// too much work. +// +// ------------------------------------------ +// Error Handling is done within the library using panic. +// +// This way, the code doesn't have to keep checking if an error has happened, +// and we don't have to keep sending the error value along with each call +// or storing it in the En|Decoder and checking it constantly along the way. +// +// The disadvantage is that small functions which use panics cannot be inlined. +// The code accounts for that by only using panics behind an interface; +// since interface calls cannot be inlined, this is irrelevant. +// +// We considered storing the error is En|Decoder. +// - once it has its err field set, it cannot be used again. +// - panicing will be optional, controlled by const flag. +// - code should always check error first and return early. +// We eventually decided against it as it makes the code clumsier to always +// check for these error conditions. + +import ( + "bytes" + "encoding" + "encoding/binary" + "errors" + "fmt" + "math" + "reflect" + "sort" + "strings" + "sync" + "time" +) + +const ( + scratchByteArrayLen = 32 + initCollectionCap = 32 // 32 is defensive. 16 is preferred. + + // Support encoding.(Binary|Text)(Unm|M)arshaler. + // This constant flag will enable or disable it. + supportMarshalInterfaces = true + + // Each Encoder or Decoder uses a cache of functions based on conditionals, + // so that the conditionals are not run every time. + // + // Either a map or a slice is used to keep track of the functions. + // The map is more natural, but has a higher cost than a slice/array. + // This flag (useMapForCodecCache) controls which is used. + // + // From benchmarks, slices with linear search perform better with < 32 entries. + // We have typically seen a high threshold of about 24 entries. + useMapForCodecCache = false + + // for debugging, set this to false, to catch panic traces. + // Note that this will always cause rpc tests to fail, since they need io.EOF sent via panic. + recoverPanicToErr = true + + // Fast path functions try to create a fast path encode or decode implementation + // for common maps and slices, by by-passing reflection altogether. + fastpathEnabled = true + + // if checkStructForEmptyValue, check structs fields to see if an empty value. + // This could be an expensive call, so possibly disable it. + checkStructForEmptyValue = false + + // if derefForIsEmptyValue, deref pointers and interfaces when checking isEmptyValue + derefForIsEmptyValue = false + + // if resetSliceElemToZeroValue, then on decoding a slice, reset the element to a zero value first. + // Only concern is that, if the slice already contained some garbage, we will decode into that garbage. + // The chances of this are slim, so leave this "optimization". + // TODO: should this be true, to ensure that we always decode into a "zero" "empty" value? + resetSliceElemToZeroValue bool = false +) + +var oneByteArr = [1]byte{0} +var zeroByteSlice = oneByteArr[:0:0] + +type charEncoding uint8 + +const ( + c_RAW charEncoding = iota + c_UTF8 + c_UTF16LE + c_UTF16BE + c_UTF32LE + c_UTF32BE +) + +// valueType is the stream type +type valueType uint8 + +const ( + valueTypeUnset valueType = iota + valueTypeNil + valueTypeInt + valueTypeUint + valueTypeFloat + valueTypeBool + valueTypeString + valueTypeSymbol + valueTypeBytes + valueTypeMap + valueTypeArray + valueTypeTimestamp + valueTypeExt + + // valueTypeInvalid = 0xff +) + +type seqType uint8 + +const ( + _ seqType = iota + seqTypeArray + seqTypeSlice + seqTypeChan +) + +// note that containerMapStart and containerArraySend are not sent. +// This is because the ReadXXXStart and EncodeXXXStart already does these. +type containerState uint8 + +const ( + _ containerState = iota + + containerMapStart // slot left open, since Driver method already covers it + containerMapKey + containerMapValue + containerMapEnd + containerArrayStart // slot left open, since Driver methods already cover it + containerArrayElem + containerArrayEnd +) + +type containerStateRecv interface { + sendContainerState(containerState) +} + +// mirror json.Marshaler and json.Unmarshaler here, +// so we don't import the encoding/json package +type jsonMarshaler interface { + MarshalJSON() ([]byte, error) +} +type jsonUnmarshaler interface { + UnmarshalJSON([]byte) error +} + +var ( + bigen = binary.BigEndian + structInfoFieldName = "_struct" + + mapStrIntfTyp = reflect.TypeOf(map[string]interface{}(nil)) + mapIntfIntfTyp = reflect.TypeOf(map[interface{}]interface{}(nil)) + intfSliceTyp = reflect.TypeOf([]interface{}(nil)) + intfTyp = intfSliceTyp.Elem() + + stringTyp = reflect.TypeOf("") + timeTyp = reflect.TypeOf(time.Time{}) + rawExtTyp = reflect.TypeOf(RawExt{}) + uint8SliceTyp = reflect.TypeOf([]uint8(nil)) + + mapBySliceTyp = reflect.TypeOf((*MapBySlice)(nil)).Elem() + + binaryMarshalerTyp = reflect.TypeOf((*encoding.BinaryMarshaler)(nil)).Elem() + binaryUnmarshalerTyp = reflect.TypeOf((*encoding.BinaryUnmarshaler)(nil)).Elem() + + textMarshalerTyp = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem() + textUnmarshalerTyp = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem() + + jsonMarshalerTyp = reflect.TypeOf((*jsonMarshaler)(nil)).Elem() + jsonUnmarshalerTyp = reflect.TypeOf((*jsonUnmarshaler)(nil)).Elem() + + selferTyp = reflect.TypeOf((*Selfer)(nil)).Elem() + + uint8SliceTypId = reflect.ValueOf(uint8SliceTyp).Pointer() + rawExtTypId = reflect.ValueOf(rawExtTyp).Pointer() + intfTypId = reflect.ValueOf(intfTyp).Pointer() + timeTypId = reflect.ValueOf(timeTyp).Pointer() + stringTypId = reflect.ValueOf(stringTyp).Pointer() + + mapStrIntfTypId = reflect.ValueOf(mapStrIntfTyp).Pointer() + mapIntfIntfTypId = reflect.ValueOf(mapIntfIntfTyp).Pointer() + intfSliceTypId = reflect.ValueOf(intfSliceTyp).Pointer() + // mapBySliceTypId = reflect.ValueOf(mapBySliceTyp).Pointer() + + intBitsize uint8 = uint8(reflect.TypeOf(int(0)).Bits()) + uintBitsize uint8 = uint8(reflect.TypeOf(uint(0)).Bits()) + + bsAll0x00 = []byte{0, 0, 0, 0, 0, 0, 0, 0} + bsAll0xff = []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} + + chkOvf checkOverflow + + noFieldNameToStructFieldInfoErr = errors.New("no field name passed to parseStructFieldInfo") +) + +var defTypeInfos = NewTypeInfos([]string{"codec", "json"}) + +// Selfer defines methods by which a value can encode or decode itself. +// +// Any type which implements Selfer will be able to encode or decode itself. +// Consequently, during (en|de)code, this takes precedence over +// (text|binary)(M|Unm)arshal or extension support. +type Selfer interface { + CodecEncodeSelf(*Encoder) + CodecDecodeSelf(*Decoder) +} + +// MapBySlice represents a slice which should be encoded as a map in the stream. +// The slice contains a sequence of key-value pairs. +// This affords storing a map in a specific sequence in the stream. +// +// The support of MapBySlice affords the following: +// - A slice type which implements MapBySlice will be encoded as a map +// - A slice can be decoded from a map in the stream +type MapBySlice interface { + MapBySlice() +} + +// WARNING: DO NOT USE DIRECTLY. EXPORTED FOR GODOC BENEFIT. WILL BE REMOVED. +// +// BasicHandle encapsulates the common options and extension functions. +type BasicHandle struct { + // TypeInfos is used to get the type info for any type. + // + // If not configured, the default TypeInfos is used, which uses struct tag keys: codec, json + TypeInfos *TypeInfos + + extHandle + EncodeOptions + DecodeOptions +} + +func (x *BasicHandle) getBasicHandle() *BasicHandle { + return x +} + +func (x *BasicHandle) getTypeInfo(rtid uintptr, rt reflect.Type) (pti *typeInfo) { + if x.TypeInfos != nil { + return x.TypeInfos.get(rtid, rt) + } + return defTypeInfos.get(rtid, rt) +} + +// Handle is the interface for a specific encoding format. +// +// Typically, a Handle is pre-configured before first time use, +// and not modified while in use. Such a pre-configured Handle +// is safe for concurrent access. +type Handle interface { + getBasicHandle() *BasicHandle + newEncDriver(w *Encoder) encDriver + newDecDriver(r *Decoder) decDriver + isBinary() bool +} + +// RawExt represents raw unprocessed extension data. +// Some codecs will decode extension data as a *RawExt if there is no registered extension for the tag. +// +// Only one of Data or Value is nil. If Data is nil, then the content of the RawExt is in the Value. +type RawExt struct { + Tag uint64 + // Data is the []byte which represents the raw ext. If Data is nil, ext is exposed in Value. + // Data is used by codecs (e.g. binc, msgpack, simple) which do custom serialization of the types + Data []byte + // Value represents the extension, if Data is nil. + // Value is used by codecs (e.g. cbor) which use the format to do custom serialization of the types. + Value interface{} +} + +// BytesExt handles custom (de)serialization of types to/from []byte. +// It is used by codecs (e.g. binc, msgpack, simple) which do custom serialization of the types. +type BytesExt interface { + // WriteExt converts a value to a []byte. + // + // Note: v *may* be a pointer to the extension type, if the extension type was a struct or array. + WriteExt(v interface{}) []byte + + // ReadExt updates a value from a []byte. + ReadExt(dst interface{}, src []byte) +} + +// InterfaceExt handles custom (de)serialization of types to/from another interface{} value. +// The Encoder or Decoder will then handle the further (de)serialization of that known type. +// +// It is used by codecs (e.g. cbor, json) which use the format to do custom serialization of the types. +type InterfaceExt interface { + // ConvertExt converts a value into a simpler interface for easy encoding e.g. convert time.Time to int64. + // + // Note: v *may* be a pointer to the extension type, if the extension type was a struct or array. + ConvertExt(v interface{}) interface{} + + // UpdateExt updates a value from a simpler interface for easy decoding e.g. convert int64 to time.Time. + UpdateExt(dst interface{}, src interface{}) +} + +// Ext handles custom (de)serialization of custom types / extensions. +type Ext interface { + BytesExt + InterfaceExt +} + +// addExtWrapper is a wrapper implementation to support former AddExt exported method. +type addExtWrapper struct { + encFn func(reflect.Value) ([]byte, error) + decFn func(reflect.Value, []byte) error +} + +func (x addExtWrapper) WriteExt(v interface{}) []byte { + bs, err := x.encFn(reflect.ValueOf(v)) + if err != nil { + panic(err) + } + return bs +} + +func (x addExtWrapper) ReadExt(v interface{}, bs []byte) { + if err := x.decFn(reflect.ValueOf(v), bs); err != nil { + panic(err) + } +} + +func (x addExtWrapper) ConvertExt(v interface{}) interface{} { + return x.WriteExt(v) +} + +func (x addExtWrapper) UpdateExt(dest interface{}, v interface{}) { + x.ReadExt(dest, v.([]byte)) +} + +type setExtWrapper struct { + b BytesExt + i InterfaceExt +} + +func (x *setExtWrapper) WriteExt(v interface{}) []byte { + if x.b == nil { + panic("BytesExt.WriteExt is not supported") + } + return x.b.WriteExt(v) +} + +func (x *setExtWrapper) ReadExt(v interface{}, bs []byte) { + if x.b == nil { + panic("BytesExt.WriteExt is not supported") + + } + x.b.ReadExt(v, bs) +} + +func (x *setExtWrapper) ConvertExt(v interface{}) interface{} { + if x.i == nil { + panic("InterfaceExt.ConvertExt is not supported") + + } + return x.i.ConvertExt(v) +} + +func (x *setExtWrapper) UpdateExt(dest interface{}, v interface{}) { + if x.i == nil { + panic("InterfaceExxt.UpdateExt is not supported") + + } + x.i.UpdateExt(dest, v) +} + +// type errorString string +// func (x errorString) Error() string { return string(x) } + +type binaryEncodingType struct{} + +func (_ binaryEncodingType) isBinary() bool { return true } + +type textEncodingType struct{} + +func (_ textEncodingType) isBinary() bool { return false } + +// noBuiltInTypes is embedded into many types which do not support builtins +// e.g. msgpack, simple, cbor. +type noBuiltInTypes struct{} + +func (_ noBuiltInTypes) IsBuiltinType(rt uintptr) bool { return false } +func (_ noBuiltInTypes) EncodeBuiltin(rt uintptr, v interface{}) {} +func (_ noBuiltInTypes) DecodeBuiltin(rt uintptr, v interface{}) {} + +type noStreamingCodec struct{} + +func (_ noStreamingCodec) CheckBreak() bool { return false } + +// bigenHelper. +// Users must already slice the x completely, because we will not reslice. +type bigenHelper struct { + x []byte // must be correctly sliced to appropriate len. slicing is a cost. + w encWriter +} + +func (z bigenHelper) writeUint16(v uint16) { + bigen.PutUint16(z.x, v) + z.w.writeb(z.x) +} + +func (z bigenHelper) writeUint32(v uint32) { + bigen.PutUint32(z.x, v) + z.w.writeb(z.x) +} + +func (z bigenHelper) writeUint64(v uint64) { + bigen.PutUint64(z.x, v) + z.w.writeb(z.x) +} + +type extTypeTagFn struct { + rtid uintptr + rt reflect.Type + tag uint64 + ext Ext +} + +type extHandle []extTypeTagFn + +// DEPRECATED: Use SetBytesExt or SetInterfaceExt on the Handle instead. +// +// AddExt registes an encode and decode function for a reflect.Type. +// AddExt internally calls SetExt. +// To deregister an Ext, call AddExt with nil encfn and/or nil decfn. +func (o *extHandle) AddExt( + rt reflect.Type, tag byte, + encfn func(reflect.Value) ([]byte, error), decfn func(reflect.Value, []byte) error, +) (err error) { + if encfn == nil || decfn == nil { + return o.SetExt(rt, uint64(tag), nil) + } + return o.SetExt(rt, uint64(tag), addExtWrapper{encfn, decfn}) +} + +// DEPRECATED: Use SetBytesExt or SetInterfaceExt on the Handle instead. +// +// Note that the type must be a named type, and specifically not +// a pointer or Interface. An error is returned if that is not honored. +// +// To Deregister an ext, call SetExt with nil Ext +func (o *extHandle) SetExt(rt reflect.Type, tag uint64, ext Ext) (err error) { + // o is a pointer, because we may need to initialize it + if rt.PkgPath() == "" || rt.Kind() == reflect.Interface { + err = fmt.Errorf("codec.Handle.AddExt: Takes named type, especially not a pointer or interface: %T", + reflect.Zero(rt).Interface()) + return + } + + rtid := reflect.ValueOf(rt).Pointer() + for _, v := range *o { + if v.rtid == rtid { + v.tag, v.ext = tag, ext + return + } + } + + if *o == nil { + *o = make([]extTypeTagFn, 0, 4) + } + *o = append(*o, extTypeTagFn{rtid, rt, tag, ext}) + return +} + +func (o extHandle) getExt(rtid uintptr) *extTypeTagFn { + var v *extTypeTagFn + for i := range o { + v = &o[i] + if v.rtid == rtid { + return v + } + } + return nil +} + +func (o extHandle) getExtForTag(tag uint64) *extTypeTagFn { + var v *extTypeTagFn + for i := range o { + v = &o[i] + if v.tag == tag { + return v + } + } + return nil +} + +type structFieldInfo struct { + encName string // encode name + + // only one of 'i' or 'is' can be set. If 'i' is -1, then 'is' has been set. + + is []int // (recursive/embedded) field index in struct + i int16 // field index in struct + omitEmpty bool + toArray bool // if field is _struct, is the toArray set? +} + +// func (si *structFieldInfo) isZero() bool { +// return si.encName == "" && len(si.is) == 0 && si.i == 0 && !si.omitEmpty && !si.toArray +// } + +// rv returns the field of the struct. +// If anonymous, it returns an Invalid +func (si *structFieldInfo) field(v reflect.Value, update bool) (rv2 reflect.Value) { + if si.i != -1 { + v = v.Field(int(si.i)) + return v + } + // replicate FieldByIndex + for _, x := range si.is { + for v.Kind() == reflect.Ptr { + if v.IsNil() { + if !update { + return + } + v.Set(reflect.New(v.Type().Elem())) + } + v = v.Elem() + } + v = v.Field(x) + } + return v +} + +func (si *structFieldInfo) setToZeroValue(v reflect.Value) { + if si.i != -1 { + v = v.Field(int(si.i)) + v.Set(reflect.Zero(v.Type())) + // v.Set(reflect.New(v.Type()).Elem()) + // v.Set(reflect.New(v.Type())) + } else { + // replicate FieldByIndex + for _, x := range si.is { + for v.Kind() == reflect.Ptr { + if v.IsNil() { + return + } + v = v.Elem() + } + v = v.Field(x) + } + v.Set(reflect.Zero(v.Type())) + } +} + +func parseStructFieldInfo(fname string, stag string) *structFieldInfo { + // if fname == "" { + // panic(noFieldNameToStructFieldInfoErr) + // } + si := structFieldInfo{ + encName: fname, + } + + if stag != "" { + for i, s := range strings.Split(stag, ",") { + if i == 0 { + if s != "" { + si.encName = s + } + } else { + if s == "omitempty" { + si.omitEmpty = true + } else if s == "toarray" { + si.toArray = true + } + } + } + } + // si.encNameBs = []byte(si.encName) + return &si +} + +type sfiSortedByEncName []*structFieldInfo + +func (p sfiSortedByEncName) Len() int { + return len(p) +} + +func (p sfiSortedByEncName) Less(i, j int) bool { + return p[i].encName < p[j].encName +} + +func (p sfiSortedByEncName) Swap(i, j int) { + p[i], p[j] = p[j], p[i] +} + +// typeInfo keeps information about each type referenced in the encode/decode sequence. +// +// During an encode/decode sequence, we work as below: +// - If base is a built in type, en/decode base value +// - If base is registered as an extension, en/decode base value +// - If type is binary(M/Unm)arshaler, call Binary(M/Unm)arshal method +// - If type is text(M/Unm)arshaler, call Text(M/Unm)arshal method +// - Else decode appropriately based on the reflect.Kind +type typeInfo struct { + sfi []*structFieldInfo // sorted. Used when enc/dec struct to map. + sfip []*structFieldInfo // unsorted. Used when enc/dec struct to array. + + rt reflect.Type + rtid uintptr + + numMeth uint16 // number of methods + + // baseId gives pointer to the base reflect.Type, after deferencing + // the pointers. E.g. base type of ***time.Time is time.Time. + base reflect.Type + baseId uintptr + baseIndir int8 // number of indirections to get to base + + mbs bool // base type (T or *T) is a MapBySlice + + bm bool // base type (T or *T) is a binaryMarshaler + bunm bool // base type (T or *T) is a binaryUnmarshaler + bmIndir int8 // number of indirections to get to binaryMarshaler type + bunmIndir int8 // number of indirections to get to binaryUnmarshaler type + + tm bool // base type (T or *T) is a textMarshaler + tunm bool // base type (T or *T) is a textUnmarshaler + tmIndir int8 // number of indirections to get to textMarshaler type + tunmIndir int8 // number of indirections to get to textUnmarshaler type + + jm bool // base type (T or *T) is a jsonMarshaler + junm bool // base type (T or *T) is a jsonUnmarshaler + jmIndir int8 // number of indirections to get to jsonMarshaler type + junmIndir int8 // number of indirections to get to jsonUnmarshaler type + + cs bool // base type (T or *T) is a Selfer + csIndir int8 // number of indirections to get to Selfer type + + toArray bool // whether this (struct) type should be encoded as an array +} + +func (ti *typeInfo) indexForEncName(name string) int { + //tisfi := ti.sfi + const binarySearchThreshold = 16 + if sfilen := len(ti.sfi); sfilen < binarySearchThreshold { + // linear search. faster than binary search in my testing up to 16-field structs. + for i, si := range ti.sfi { + if si.encName == name { + return i + } + } + } else { + // binary search. adapted from sort/search.go. + h, i, j := 0, 0, sfilen + for i < j { + h = i + (j-i)/2 + if ti.sfi[h].encName < name { + i = h + 1 + } else { + j = h + } + } + if i < sfilen && ti.sfi[i].encName == name { + return i + } + } + return -1 +} + +// TypeInfos caches typeInfo for each type on first inspection. +// +// It is configured with a set of tag keys, which are used to get +// configuration for the type. +type TypeInfos struct { + infos map[uintptr]*typeInfo + mu sync.RWMutex + tags []string +} + +// NewTypeInfos creates a TypeInfos given a set of struct tags keys. +// +// This allows users customize the struct tag keys which contain configuration +// of their types. +func NewTypeInfos(tags []string) *TypeInfos { + return &TypeInfos{tags: tags, infos: make(map[uintptr]*typeInfo, 64)} +} + +func (x *TypeInfos) structTag(t reflect.StructTag) (s string) { + // check for tags: codec, json, in that order. + // this allows seamless support for many configured structs. + for _, x := range x.tags { + s = t.Get(x) + if s != "" { + return s + } + } + return +} + +func (x *TypeInfos) get(rtid uintptr, rt reflect.Type) (pti *typeInfo) { + var ok bool + x.mu.RLock() + pti, ok = x.infos[rtid] + x.mu.RUnlock() + if ok { + return + } + + // do not hold lock while computing this. + // it may lead to duplication, but that's ok. + ti := typeInfo{rt: rt, rtid: rtid} + ti.numMeth = uint16(rt.NumMethod()) + + var indir int8 + if ok, indir = implementsIntf(rt, binaryMarshalerTyp); ok { + ti.bm, ti.bmIndir = true, indir + } + if ok, indir = implementsIntf(rt, binaryUnmarshalerTyp); ok { + ti.bunm, ti.bunmIndir = true, indir + } + if ok, indir = implementsIntf(rt, textMarshalerTyp); ok { + ti.tm, ti.tmIndir = true, indir + } + if ok, indir = implementsIntf(rt, textUnmarshalerTyp); ok { + ti.tunm, ti.tunmIndir = true, indir + } + if ok, indir = implementsIntf(rt, jsonMarshalerTyp); ok { + ti.jm, ti.jmIndir = true, indir + } + if ok, indir = implementsIntf(rt, jsonUnmarshalerTyp); ok { + ti.junm, ti.junmIndir = true, indir + } + if ok, indir = implementsIntf(rt, selferTyp); ok { + ti.cs, ti.csIndir = true, indir + } + if ok, _ = implementsIntf(rt, mapBySliceTyp); ok { + ti.mbs = true + } + + pt := rt + var ptIndir int8 + // for ; pt.Kind() == reflect.Ptr; pt, ptIndir = pt.Elem(), ptIndir+1 { } + for pt.Kind() == reflect.Ptr { + pt = pt.Elem() + ptIndir++ + } + if ptIndir == 0 { + ti.base = rt + ti.baseId = rtid + } else { + ti.base = pt + ti.baseId = reflect.ValueOf(pt).Pointer() + ti.baseIndir = ptIndir + } + + if rt.Kind() == reflect.Struct { + var siInfo *structFieldInfo + if f, ok := rt.FieldByName(structInfoFieldName); ok { + siInfo = parseStructFieldInfo(structInfoFieldName, x.structTag(f.Tag)) + ti.toArray = siInfo.toArray + } + sfip := make([]*structFieldInfo, 0, rt.NumField()) + x.rget(rt, nil, make(map[string]bool, 16), &sfip, siInfo) + + ti.sfip = make([]*structFieldInfo, len(sfip)) + ti.sfi = make([]*structFieldInfo, len(sfip)) + copy(ti.sfip, sfip) + sort.Sort(sfiSortedByEncName(sfip)) + copy(ti.sfi, sfip) + } + // sfi = sfip + + x.mu.Lock() + if pti, ok = x.infos[rtid]; !ok { + pti = &ti + x.infos[rtid] = pti + } + x.mu.Unlock() + return +} + +func (x *TypeInfos) rget(rt reflect.Type, indexstack []int, fnameToHastag map[string]bool, + sfi *[]*structFieldInfo, siInfo *structFieldInfo, +) { + for j := 0; j < rt.NumField(); j++ { + f := rt.Field(j) + fkind := f.Type.Kind() + // skip if a func type, or is unexported, or structTag value == "-" + if fkind == reflect.Func { + continue + } + // if r1, _ := utf8.DecodeRuneInString(f.Name); r1 == utf8.RuneError || !unicode.IsUpper(r1) { + if f.PkgPath != "" && !f.Anonymous { // unexported, not embedded + continue + } + stag := x.structTag(f.Tag) + if stag == "-" { + continue + } + var si *structFieldInfo + // if anonymous and no struct tag (or it's blank), and a struct (or pointer to struct), inline it. + if f.Anonymous && fkind != reflect.Interface { + doInline := stag == "" + if !doInline { + si = parseStructFieldInfo("", stag) + doInline = si.encName == "" + // doInline = si.isZero() + } + if doInline { + ft := f.Type + for ft.Kind() == reflect.Ptr { + ft = ft.Elem() + } + if ft.Kind() == reflect.Struct { + indexstack2 := make([]int, len(indexstack)+1, len(indexstack)+4) + copy(indexstack2, indexstack) + indexstack2[len(indexstack)] = j + // indexstack2 := append(append(make([]int, 0, len(indexstack)+4), indexstack...), j) + x.rget(ft, indexstack2, fnameToHastag, sfi, siInfo) + continue + } + } + } + + // after the anonymous dance: if an unexported field, skip + if f.PkgPath != "" { // unexported + continue + } + + // do not let fields with same name in embedded structs override field at higher level. + // this must be done after anonymous check, to allow anonymous field + // still include their child fields + if _, ok := fnameToHastag[f.Name]; ok { + continue + } + if f.Name == "" { + panic(noFieldNameToStructFieldInfoErr) + } + if si == nil { + si = parseStructFieldInfo(f.Name, stag) + } else if si.encName == "" { + si.encName = f.Name + } + // si.ikind = int(f.Type.Kind()) + if len(indexstack) == 0 { + si.i = int16(j) + } else { + si.i = -1 + si.is = append(append(make([]int, 0, len(indexstack)+4), indexstack...), j) + } + + if siInfo != nil { + if siInfo.omitEmpty { + si.omitEmpty = true + } + } + *sfi = append(*sfi, si) + fnameToHastag[f.Name] = stag != "" + } +} + +func panicToErr(err *error) { + if recoverPanicToErr { + if x := recover(); x != nil { + //debug.PrintStack() + panicValToErr(x, err) + } + } +} + +// func doPanic(tag string, format string, params ...interface{}) { +// params2 := make([]interface{}, len(params)+1) +// params2[0] = tag +// copy(params2[1:], params) +// panic(fmt.Errorf("%s: "+format, params2...)) +// } + +func isImmutableKind(k reflect.Kind) (v bool) { + return false || + k == reflect.Int || + k == reflect.Int8 || + k == reflect.Int16 || + k == reflect.Int32 || + k == reflect.Int64 || + k == reflect.Uint || + k == reflect.Uint8 || + k == reflect.Uint16 || + k == reflect.Uint32 || + k == reflect.Uint64 || + k == reflect.Uintptr || + k == reflect.Float32 || + k == reflect.Float64 || + k == reflect.Bool || + k == reflect.String +} + +// these functions must be inlinable, and not call anybody +type checkOverflow struct{} + +func (_ checkOverflow) Float32(f float64) (overflow bool) { + if f < 0 { + f = -f + } + return math.MaxFloat32 < f && f <= math.MaxFloat64 +} + +func (_ checkOverflow) Uint(v uint64, bitsize uint8) (overflow bool) { + if bitsize == 0 || bitsize >= 64 || v == 0 { + return + } + if trunc := (v << (64 - bitsize)) >> (64 - bitsize); v != trunc { + overflow = true + } + return +} + +func (_ checkOverflow) Int(v int64, bitsize uint8) (overflow bool) { + if bitsize == 0 || bitsize >= 64 || v == 0 { + return + } + if trunc := (v << (64 - bitsize)) >> (64 - bitsize); v != trunc { + overflow = true + } + return +} + +func (_ checkOverflow) SignedInt(v uint64) (i int64, overflow bool) { + //e.g. -127 to 128 for int8 + pos := (v >> 63) == 0 + ui2 := v & 0x7fffffffffffffff + if pos { + if ui2 > math.MaxInt64 { + overflow = true + return + } + } else { + if ui2 > math.MaxInt64-1 { + overflow = true + return + } + } + i = int64(v) + return +} + +// ------------------ SORT ----------------- + +func isNaN(f float64) bool { return f != f } + +// ----------------------- + +type intSlice []int64 +type uintSlice []uint64 +type floatSlice []float64 +type boolSlice []bool +type stringSlice []string +type bytesSlice [][]byte + +func (p intSlice) Len() int { return len(p) } +func (p intSlice) Less(i, j int) bool { return p[i] < p[j] } +func (p intSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p uintSlice) Len() int { return len(p) } +func (p uintSlice) Less(i, j int) bool { return p[i] < p[j] } +func (p uintSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p floatSlice) Len() int { return len(p) } +func (p floatSlice) Less(i, j int) bool { + return p[i] < p[j] || isNaN(p[i]) && !isNaN(p[j]) +} +func (p floatSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p stringSlice) Len() int { return len(p) } +func (p stringSlice) Less(i, j int) bool { return p[i] < p[j] } +func (p stringSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p bytesSlice) Len() int { return len(p) } +func (p bytesSlice) Less(i, j int) bool { return bytes.Compare(p[i], p[j]) == -1 } +func (p bytesSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p boolSlice) Len() int { return len(p) } +func (p boolSlice) Less(i, j int) bool { return !p[i] && p[j] } +func (p boolSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +// --------------------- + +type intRv struct { + v int64 + r reflect.Value +} +type intRvSlice []intRv +type uintRv struct { + v uint64 + r reflect.Value +} +type uintRvSlice []uintRv +type floatRv struct { + v float64 + r reflect.Value +} +type floatRvSlice []floatRv +type boolRv struct { + v bool + r reflect.Value +} +type boolRvSlice []boolRv +type stringRv struct { + v string + r reflect.Value +} +type stringRvSlice []stringRv +type bytesRv struct { + v []byte + r reflect.Value +} +type bytesRvSlice []bytesRv + +func (p intRvSlice) Len() int { return len(p) } +func (p intRvSlice) Less(i, j int) bool { return p[i].v < p[j].v } +func (p intRvSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p uintRvSlice) Len() int { return len(p) } +func (p uintRvSlice) Less(i, j int) bool { return p[i].v < p[j].v } +func (p uintRvSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p floatRvSlice) Len() int { return len(p) } +func (p floatRvSlice) Less(i, j int) bool { + return p[i].v < p[j].v || isNaN(p[i].v) && !isNaN(p[j].v) +} +func (p floatRvSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p stringRvSlice) Len() int { return len(p) } +func (p stringRvSlice) Less(i, j int) bool { return p[i].v < p[j].v } +func (p stringRvSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p bytesRvSlice) Len() int { return len(p) } +func (p bytesRvSlice) Less(i, j int) bool { return bytes.Compare(p[i].v, p[j].v) == -1 } +func (p bytesRvSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p boolRvSlice) Len() int { return len(p) } +func (p boolRvSlice) Less(i, j int) bool { return !p[i].v && p[j].v } +func (p boolRvSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +// ----------------- + +type bytesI struct { + v []byte + i interface{} +} + +type bytesISlice []bytesI + +func (p bytesISlice) Len() int { return len(p) } +func (p bytesISlice) Less(i, j int) bool { return bytes.Compare(p[i].v, p[j].v) == -1 } +func (p bytesISlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/helper_internal.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/helper_internal.go new file mode 100644 index 0000000000000..dea981fbb7bee --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/helper_internal.go @@ -0,0 +1,242 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +// All non-std package dependencies live in this file, +// so porting to different environment is easy (just update functions). + +import ( + "errors" + "fmt" + "math" + "reflect" +) + +func panicValToErr(panicVal interface{}, err *error) { + if panicVal == nil { + return + } + // case nil + switch xerr := panicVal.(type) { + case error: + *err = xerr + case string: + *err = errors.New(xerr) + default: + *err = fmt.Errorf("%v", panicVal) + } + return +} + +func hIsEmptyValue(v reflect.Value, deref, checkStruct bool) bool { + switch v.Kind() { + case reflect.Invalid: + return true + case reflect.Array, reflect.Map, reflect.Slice, reflect.String: + return v.Len() == 0 + case reflect.Bool: + return !v.Bool() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.Interface, reflect.Ptr: + if deref { + if v.IsNil() { + return true + } + return hIsEmptyValue(v.Elem(), deref, checkStruct) + } else { + return v.IsNil() + } + case reflect.Struct: + if !checkStruct { + return false + } + // return true if all fields are empty. else return false. + // we cannot use equality check, because some fields may be maps/slices/etc + // and consequently the structs are not comparable. + // return v.Interface() == reflect.Zero(v.Type()).Interface() + for i, n := 0, v.NumField(); i < n; i++ { + if !hIsEmptyValue(v.Field(i), deref, checkStruct) { + return false + } + } + return true + } + return false +} + +func isEmptyValue(v reflect.Value) bool { + return hIsEmptyValue(v, derefForIsEmptyValue, checkStructForEmptyValue) +} + +func pruneSignExt(v []byte, pos bool) (n int) { + if len(v) < 2 { + } else if pos && v[0] == 0 { + for ; v[n] == 0 && n+1 < len(v) && (v[n+1]&(1<<7) == 0); n++ { + } + } else if !pos && v[0] == 0xff { + for ; v[n] == 0xff && n+1 < len(v) && (v[n+1]&(1<<7) != 0); n++ { + } + } + return +} + +func implementsIntf(typ, iTyp reflect.Type) (success bool, indir int8) { + if typ == nil { + return + } + rt := typ + // The type might be a pointer and we need to keep + // dereferencing to the base type until we find an implementation. + for { + if rt.Implements(iTyp) { + return true, indir + } + if p := rt; p.Kind() == reflect.Ptr { + indir++ + if indir >= math.MaxInt8 { // insane number of indirections + return false, 0 + } + rt = p.Elem() + continue + } + break + } + // No luck yet, but if this is a base type (non-pointer), the pointer might satisfy. + if typ.Kind() != reflect.Ptr { + // Not a pointer, but does the pointer work? + if reflect.PtrTo(typ).Implements(iTyp) { + return true, -1 + } + } + return false, 0 +} + +// validate that this function is correct ... +// culled from OGRE (Object-Oriented Graphics Rendering Engine) +// function: halfToFloatI (http://stderr.org/doc/ogre-doc/api/OgreBitwise_8h-source.html) +func halfFloatToFloatBits(yy uint16) (d uint32) { + y := uint32(yy) + s := (y >> 15) & 0x01 + e := (y >> 10) & 0x1f + m := y & 0x03ff + + if e == 0 { + if m == 0 { // plu or minus 0 + return s << 31 + } else { // Denormalized number -- renormalize it + for (m & 0x00000400) == 0 { + m <<= 1 + e -= 1 + } + e += 1 + const zz uint32 = 0x0400 + m &= ^zz + } + } else if e == 31 { + if m == 0 { // Inf + return (s << 31) | 0x7f800000 + } else { // NaN + return (s << 31) | 0x7f800000 | (m << 13) + } + } + e = e + (127 - 15) + m = m << 13 + return (s << 31) | (e << 23) | m +} + +// GrowCap will return a new capacity for a slice, given the following: +// - oldCap: current capacity +// - unit: in-memory size of an element +// - num: number of elements to add +func growCap(oldCap, unit, num int) (newCap int) { + // appendslice logic (if cap < 1024, *2, else *1.25): + // leads to many copy calls, especially when copying bytes. + // bytes.Buffer model (2*cap + n): much better for bytes. + // smarter way is to take the byte-size of the appended element(type) into account + + // maintain 3 thresholds: + // t1: if cap <= t1, newcap = 2x + // t2: if cap <= t2, newcap = 1.75x + // t3: if cap <= t3, newcap = 1.5x + // else newcap = 1.25x + // + // t1, t2, t3 >= 1024 always. + // i.e. if unit size >= 16, then always do 2x or 1.25x (ie t1, t2, t3 are all same) + // + // With this, appending for bytes increase by: + // 100% up to 4K + // 75% up to 8K + // 50% up to 16K + // 25% beyond that + + // unit can be 0 e.g. for struct{}{}; handle that appropriately + var t1, t2, t3 int // thresholds + if unit <= 1 { + t1, t2, t3 = 4*1024, 8*1024, 16*1024 + } else if unit < 16 { + t3 = 16 / unit * 1024 + t1 = t3 * 1 / 4 + t2 = t3 * 2 / 4 + } else { + t1, t2, t3 = 1024, 1024, 1024 + } + + var x int // temporary variable + + // x is multiplier here: one of 5, 6, 7 or 8; incr of 25%, 50%, 75% or 100% respectively + if oldCap <= t1 { // [0,t1] + x = 8 + } else if oldCap > t3 { // (t3,infinity] + x = 5 + } else if oldCap <= t2 { // (t1,t2] + x = 7 + } else { // (t2,t3] + x = 6 + } + newCap = x * oldCap / 4 + + if num > 0 { + newCap += num + } + + // ensure newCap is a multiple of 64 (if it is > 64) or 16. + if newCap > 64 { + if x = newCap % 64; x != 0 { + x = newCap / 64 + newCap = 64 * (x + 1) + } + } else { + if x = newCap % 16; x != 0 { + x = newCap / 16 + newCap = 16 * (x + 1) + } + } + return +} + +func expandSliceValue(s reflect.Value, num int) reflect.Value { + if num <= 0 { + return s + } + l0 := s.Len() + l1 := l0 + num // new slice length + if l1 < l0 { + panic("ExpandSlice: slice overflow") + } + c0 := s.Cap() + if l1 <= c0 { + return s.Slice(0, l1) + } + st := s.Type() + c1 := growCap(c0, int(st.Elem().Size()), num) + s2 := reflect.MakeSlice(st, l1, c1) + // println("expandslicevalue: cap-old: ", c0, ", cap-new: ", c1, ", len-new: ", l1) + reflect.Copy(s2, s) + return s2 +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/helper_not_unsafe.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/helper_not_unsafe.go new file mode 100644 index 0000000000000..7c2ffc0fde6e6 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/helper_not_unsafe.go @@ -0,0 +1,20 @@ +//+build !unsafe + +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +// stringView returns a view of the []byte as a string. +// In unsafe mode, it doesn't incur allocation and copying caused by conversion. +// In regular safe mode, it is an allocation and copy. +func stringView(v []byte) string { + return string(v) +} + +// bytesView returns a view of the string as a []byte. +// In unsafe mode, it doesn't incur allocation and copying caused by conversion. +// In regular safe mode, it is an allocation and copy. +func bytesView(v string) []byte { + return []byte(v) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/helper_unsafe.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/helper_unsafe.go new file mode 100644 index 0000000000000..373b2b1027dc1 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/helper_unsafe.go @@ -0,0 +1,45 @@ +//+build unsafe + +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "unsafe" +) + +// This file has unsafe variants of some helper methods. + +type unsafeString struct { + Data uintptr + Len int +} + +type unsafeBytes struct { + Data uintptr + Len int + Cap int +} + +// stringView returns a view of the []byte as a string. +// In unsafe mode, it doesn't incur allocation and copying caused by conversion. +// In regular safe mode, it is an allocation and copy. +func stringView(v []byte) string { + if len(v) == 0 { + return "" + } + x := unsafeString{uintptr(unsafe.Pointer(&v[0])), len(v)} + return *(*string)(unsafe.Pointer(&x)) +} + +// bytesView returns a view of the string as a []byte. +// In unsafe mode, it doesn't incur allocation and copying caused by conversion. +// In regular safe mode, it is an allocation and copy. +func bytesView(v string) []byte { + if len(v) == 0 { + return zeroByteSlice + } + x := unsafeBytes{uintptr(unsafe.Pointer(&v)), len(v), len(v)} + return *(*[]byte)(unsafe.Pointer(&x)) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/json.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/json.go new file mode 100644 index 0000000000000..a18a5f7063e6b --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/json.go @@ -0,0 +1,1072 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +// By default, this json support uses base64 encoding for bytes, because you cannot +// store and read any arbitrary string in json (only unicode). +// However, the user can configre how to encode/decode bytes. +// +// This library specifically supports UTF-8 for encoding and decoding only. +// +// Note that the library will happily encode/decode things which are not valid +// json e.g. a map[int64]string. We do it for consistency. With valid json, +// we will encode and decode appropriately. +// Users can specify their map type if necessary to force it. +// +// Note: +// - we cannot use strconv.Quote and strconv.Unquote because json quotes/unquotes differently. +// We implement it here. +// - Also, strconv.ParseXXX for floats and integers +// - only works on strings resulting in unnecessary allocation and []byte-string conversion. +// - it does a lot of redundant checks, because json numbers are simpler that what it supports. +// - We parse numbers (floats and integers) directly here. +// We only delegate parsing floats if it is a hairy float which could cause a loss of precision. +// In that case, we delegate to strconv.ParseFloat. +// +// Note: +// - encode does not beautify. There is no whitespace when encoding. +// - rpc calls which take single integer arguments or write single numeric arguments will need care. + +// Top-level methods of json(End|Dec)Driver (which are implementations of (en|de)cDriver +// MUST not call one-another. + +import ( + "bytes" + "encoding/base64" + "fmt" + "reflect" + "strconv" + "unicode/utf16" + "unicode/utf8" +) + +//-------------------------------- + +var jsonLiterals = [...]byte{'t', 'r', 'u', 'e', 'f', 'a', 'l', 's', 'e', 'n', 'u', 'l', 'l'} + +var jsonFloat64Pow10 = [...]float64{ + 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, + 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, + 1e20, 1e21, 1e22, +} + +var jsonUint64Pow10 = [...]uint64{ + 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, + 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, +} + +const ( + // jsonUnreadAfterDecNum controls whether we unread after decoding a number. + // + // instead of unreading, just update d.tok (iff it's not a whitespace char) + // However, doing this means that we may HOLD onto some data which belongs to another stream. + // Thus, it is safest to unread the data when done. + // keep behind a constant flag for now. + jsonUnreadAfterDecNum = true + + // If !jsonValidateSymbols, decoding will be faster, by skipping some checks: + // - If we see first character of null, false or true, + // do not validate subsequent characters. + // - e.g. if we see a n, assume null and skip next 3 characters, + // and do not validate they are ull. + // P.S. Do not expect a significant decoding boost from this. + jsonValidateSymbols = true + + // if jsonTruncateMantissa, truncate mantissa if trailing 0's. + // This is important because it could allow some floats to be decoded without + // deferring to strconv.ParseFloat. + jsonTruncateMantissa = true + + // if mantissa >= jsonNumUintCutoff before multiplying by 10, this is an overflow + jsonNumUintCutoff = (1<<64-1)/uint64(10) + 1 // cutoff64(base) + + // if mantissa >= jsonNumUintMaxVal, this is an overflow + jsonNumUintMaxVal = 1<= slen { + e.bs = e.bs[:slen] + } else { + e.bs = make([]byte, slen) + } + base64.StdEncoding.Encode(e.bs, v) + e.w.writen1('"') + e.w.writeb(e.bs) + e.w.writen1('"') + } else { + // e.EncodeString(c, string(v)) + e.quoteStr(stringView(v)) + } +} + +func (e *jsonEncDriver) EncodeAsis(v []byte) { + e.w.writeb(v) +} + +func (e *jsonEncDriver) quoteStr(s string) { + // adapted from std pkg encoding/json + const hex = "0123456789abcdef" + w := e.w + w.writen1('"') + start := 0 + for i := 0; i < len(s); { + if b := s[i]; b < utf8.RuneSelf { + if 0x20 <= b && b != '\\' && b != '"' && b != '<' && b != '>' && b != '&' { + i++ + continue + } + if start < i { + w.writestr(s[start:i]) + } + switch b { + case '\\', '"': + w.writen2('\\', b) + case '\n': + w.writen2('\\', 'n') + case '\r': + w.writen2('\\', 'r') + case '\b': + w.writen2('\\', 'b') + case '\f': + w.writen2('\\', 'f') + case '\t': + w.writen2('\\', 't') + default: + // encode all bytes < 0x20 (except \r, \n). + // also encode < > & to prevent security holes when served to some browsers. + w.writestr(`\u00`) + w.writen2(hex[b>>4], hex[b&0xF]) + } + i++ + start = i + continue + } + c, size := utf8.DecodeRuneInString(s[i:]) + if c == utf8.RuneError && size == 1 { + if start < i { + w.writestr(s[start:i]) + } + w.writestr(`\ufffd`) + i += size + start = i + continue + } + // U+2028 is LINE SEPARATOR. U+2029 is PARAGRAPH SEPARATOR. + // Both technically valid JSON, but bomb on JSONP, so fix here. + if c == '\u2028' || c == '\u2029' { + if start < i { + w.writestr(s[start:i]) + } + w.writestr(`\u202`) + w.writen1(hex[c&0xF]) + i += size + start = i + continue + } + i += size + } + if start < len(s) { + w.writestr(s[start:]) + } + w.writen1('"') +} + +//-------------------------------- + +type jsonNum struct { + // bytes []byte // may have [+-.eE0-9] + mantissa uint64 // where mantissa ends, and maybe dot begins. + exponent int16 // exponent value. + manOverflow bool + neg bool // started with -. No initial sign in the bytes above. + dot bool // has dot + explicitExponent bool // explicit exponent +} + +func (x *jsonNum) reset() { + x.manOverflow = false + x.neg = false + x.dot = false + x.explicitExponent = false + x.mantissa = 0 + x.exponent = 0 +} + +// uintExp is called only if exponent > 0. +func (x *jsonNum) uintExp() (n uint64, overflow bool) { + n = x.mantissa + e := x.exponent + if e >= int16(len(jsonUint64Pow10)) { + overflow = true + return + } + n *= jsonUint64Pow10[e] + if n < x.mantissa || n > jsonNumUintMaxVal { + overflow = true + return + } + return + // for i := int16(0); i < e; i++ { + // if n >= jsonNumUintCutoff { + // overflow = true + // return + // } + // n *= 10 + // } + // return +} + +// these constants are only used withn floatVal. +// They are brought out, so that floatVal can be inlined. +const ( + jsonUint64MantissaBits = 52 + jsonMaxExponent = int16(len(jsonFloat64Pow10)) - 1 +) + +func (x *jsonNum) floatVal() (f float64, parseUsingStrConv bool) { + // We do not want to lose precision. + // Consequently, we will delegate to strconv.ParseFloat if any of the following happen: + // - There are more digits than in math.MaxUint64: 18446744073709551615 (20 digits) + // We expect up to 99.... (19 digits) + // - The mantissa cannot fit into a 52 bits of uint64 + // - The exponent is beyond our scope ie beyong 22. + parseUsingStrConv = x.manOverflow || + x.exponent > jsonMaxExponent || + (x.exponent < 0 && -(x.exponent) > jsonMaxExponent) || + x.mantissa>>jsonUint64MantissaBits != 0 + + if parseUsingStrConv { + return + } + + // all good. so handle parse here. + f = float64(x.mantissa) + // fmt.Printf(".Float: uint64 value: %v, float: %v\n", m, f) + if x.neg { + f = -f + } + if x.exponent > 0 { + f *= jsonFloat64Pow10[x.exponent] + } else if x.exponent < 0 { + f /= jsonFloat64Pow10[-x.exponent] + } + return +} + +type jsonDecDriver struct { + noBuiltInTypes + d *Decoder + h *JsonHandle + r decReader + + c containerState + // tok is used to store the token read right after skipWhiteSpace. + tok uint8 + + bstr [8]byte // scratch used for string \UXXX parsing + b [64]byte // scratch, used for parsing strings or numbers + b2 [64]byte // scratch, used only for decodeBytes (after base64) + bs []byte // scratch. Initialized from b. Used for parsing strings or numbers. + + se setExtWrapper + + n jsonNum +} + +func jsonIsWS(b byte) bool { + return b == ' ' || b == '\t' || b == '\r' || b == '\n' +} + +// // This will skip whitespace characters and return the next byte to read. +// // The next byte determines what the value will be one of. +// func (d *jsonDecDriver) skipWhitespace() { +// // fast-path: do not enter loop. Just check first (in case no whitespace). +// b := d.r.readn1() +// if jsonIsWS(b) { +// r := d.r +// for b = r.readn1(); jsonIsWS(b); b = r.readn1() { +// } +// } +// d.tok = b +// } + +func (d *jsonDecDriver) uncacheRead() { + if d.tok != 0 { + d.r.unreadn1() + d.tok = 0 + } +} + +func (d *jsonDecDriver) sendContainerState(c containerState) { + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b + } + var xc uint8 // char expected + if c == containerMapKey { + if d.c != containerMapStart { + xc = ',' + } + } else if c == containerMapValue { + xc = ':' + } else if c == containerMapEnd { + xc = '}' + } else if c == containerArrayElem { + if d.c != containerArrayStart { + xc = ',' + } + } else if c == containerArrayEnd { + xc = ']' + } + if xc != 0 { + if d.tok != xc { + d.d.errorf("json: expect char '%c' but got char '%c'", xc, d.tok) + } + d.tok = 0 + } + d.c = c +} + +func (d *jsonDecDriver) CheckBreak() bool { + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b + } + if d.tok == '}' || d.tok == ']' { + // d.tok = 0 // only checking, not consuming + return true + } + return false +} + +func (d *jsonDecDriver) readStrIdx(fromIdx, toIdx uint8) { + bs := d.r.readx(int(toIdx - fromIdx)) + d.tok = 0 + if jsonValidateSymbols { + if !bytes.Equal(bs, jsonLiterals[fromIdx:toIdx]) { + d.d.errorf("json: expecting %s: got %s", jsonLiterals[fromIdx:toIdx], bs) + return + } + } +} + +func (d *jsonDecDriver) TryDecodeAsNil() bool { + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b + } + if d.tok == 'n' { + d.readStrIdx(10, 13) // ull + return true + } + return false +} + +func (d *jsonDecDriver) DecodeBool() bool { + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b + } + if d.tok == 'f' { + d.readStrIdx(5, 9) // alse + return false + } + if d.tok == 't' { + d.readStrIdx(1, 4) // rue + return true + } + d.d.errorf("json: decode bool: got first char %c", d.tok) + return false // "unreachable" +} + +func (d *jsonDecDriver) ReadMapStart() int { + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b + } + if d.tok != '{' { + d.d.errorf("json: expect char '%c' but got char '%c'", '{', d.tok) + } + d.tok = 0 + d.c = containerMapStart + return -1 +} + +func (d *jsonDecDriver) ReadArrayStart() int { + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b + } + if d.tok != '[' { + d.d.errorf("json: expect char '%c' but got char '%c'", '[', d.tok) + } + d.tok = 0 + d.c = containerArrayStart + return -1 +} + +func (d *jsonDecDriver) ContainerType() (vt valueType) { + // check container type by checking the first char + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b + } + if b := d.tok; b == '{' { + return valueTypeMap + } else if b == '[' { + return valueTypeArray + } else if b == 'n' { + return valueTypeNil + } else if b == '"' { + return valueTypeString + } + return valueTypeUnset + // d.d.errorf("isContainerType: unsupported parameter: %v", vt) + // return false // "unreachable" +} + +func (d *jsonDecDriver) decNum(storeBytes bool) { + // If it is has a . or an e|E, decode as a float; else decode as an int. + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b + } + b := d.tok + if !(b == '+' || b == '-' || b == '.' || (b >= '0' && b <= '9')) { + d.d.errorf("json: decNum: got first char '%c'", b) + return + } + d.tok = 0 + + const cutoff = (1<<64-1)/uint64(10) + 1 // cutoff64(base) + const jsonNumUintMaxVal = 1<= jsonNumUintCutoff { + n.manOverflow = true + break + } + v := uint64(b - '0') + n.mantissa *= 10 + if v != 0 { + n1 := n.mantissa + v + if n1 < n.mantissa || n1 > jsonNumUintMaxVal { + n.manOverflow = true // n+v overflows + break + } + n.mantissa = n1 + } + case 6: + state = 7 + fallthrough + case 7: + if !(b == '0' && e == 0) { + e = e*10 + int16(b-'0') + } + default: + break LOOP + } + default: + break LOOP + } + if storeBytes { + d.bs = append(d.bs, b) + } + b, eof = r.readn1eof() + } + + if jsonTruncateMantissa && n.mantissa != 0 { + for n.mantissa%10 == 0 { + n.mantissa /= 10 + n.exponent++ + } + } + + if e != 0 { + if eNeg { + n.exponent -= e + } else { + n.exponent += e + } + } + + // d.n = n + + if !eof { + if jsonUnreadAfterDecNum { + r.unreadn1() + } else { + if !jsonIsWS(b) { + d.tok = b + } + } + } + // fmt.Printf("1: n: bytes: %s, neg: %v, dot: %v, exponent: %v, mantissaEndIndex: %v\n", + // n.bytes, n.neg, n.dot, n.exponent, n.mantissaEndIndex) + return +} + +func (d *jsonDecDriver) DecodeInt(bitsize uint8) (i int64) { + d.decNum(false) + n := &d.n + if n.manOverflow { + d.d.errorf("json: overflow integer after: %v", n.mantissa) + return + } + var u uint64 + if n.exponent == 0 { + u = n.mantissa + } else if n.exponent < 0 { + d.d.errorf("json: fractional integer") + return + } else if n.exponent > 0 { + var overflow bool + if u, overflow = n.uintExp(); overflow { + d.d.errorf("json: overflow integer") + return + } + } + i = int64(u) + if n.neg { + i = -i + } + if chkOvf.Int(i, bitsize) { + d.d.errorf("json: overflow %v bits: %s", bitsize, d.bs) + return + } + // fmt.Printf("DecodeInt: %v\n", i) + return +} + +// floatVal MUST only be called after a decNum, as d.bs now contains the bytes of the number +func (d *jsonDecDriver) floatVal() (f float64) { + f, useStrConv := d.n.floatVal() + if useStrConv { + var err error + if f, err = strconv.ParseFloat(stringView(d.bs), 64); err != nil { + panic(fmt.Errorf("parse float: %s, %v", d.bs, err)) + } + if d.n.neg { + f = -f + } + } + return +} + +func (d *jsonDecDriver) DecodeUint(bitsize uint8) (u uint64) { + d.decNum(false) + n := &d.n + if n.neg { + d.d.errorf("json: unsigned integer cannot be negative") + return + } + if n.manOverflow { + d.d.errorf("json: overflow integer after: %v", n.mantissa) + return + } + if n.exponent == 0 { + u = n.mantissa + } else if n.exponent < 0 { + d.d.errorf("json: fractional integer") + return + } else if n.exponent > 0 { + var overflow bool + if u, overflow = n.uintExp(); overflow { + d.d.errorf("json: overflow integer") + return + } + } + if chkOvf.Uint(u, bitsize) { + d.d.errorf("json: overflow %v bits: %s", bitsize, d.bs) + return + } + // fmt.Printf("DecodeUint: %v\n", u) + return +} + +func (d *jsonDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { + d.decNum(true) + f = d.floatVal() + if chkOverflow32 && chkOvf.Float32(f) { + d.d.errorf("json: overflow float32: %v, %s", f, d.bs) + return + } + return +} + +func (d *jsonDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) { + if ext == nil { + re := rv.(*RawExt) + re.Tag = xtag + d.d.decode(&re.Value) + } else { + var v interface{} + d.d.decode(&v) + ext.UpdateExt(rv, v) + } + return +} + +func (d *jsonDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) { + // if decoding into raw bytes, and the RawBytesExt is configured, use it to decode. + if !isstring && d.se.i != nil { + bsOut = bs + d.DecodeExt(&bsOut, 0, &d.se) + return + } + d.appendStringAsBytes() + // if isstring, then just return the bytes, even if it is using the scratch buffer. + // the bytes will be converted to a string as needed. + if isstring { + return d.bs + } + bs0 := d.bs + slen := base64.StdEncoding.DecodedLen(len(bs0)) + if slen <= cap(bs) { + bsOut = bs[:slen] + } else if zerocopy && slen <= cap(d.b2) { + bsOut = d.b2[:slen] + } else { + bsOut = make([]byte, slen) + } + slen2, err := base64.StdEncoding.Decode(bsOut, bs0) + if err != nil { + d.d.errorf("json: error decoding base64 binary '%s': %v", bs0, err) + return nil + } + if slen != slen2 { + bsOut = bsOut[:slen2] + } + return +} + +func (d *jsonDecDriver) DecodeString() (s string) { + d.appendStringAsBytes() + // if x := d.s.sc; x != nil && x.so && x.st == '}' { // map key + if d.c == containerMapKey { + return d.d.string(d.bs) + } + return string(d.bs) +} + +func (d *jsonDecDriver) appendStringAsBytes() { + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b + } + if d.tok != '"' { + d.d.errorf("json: expect char '%c' but got char '%c'", '"', d.tok) + } + d.tok = 0 + + v := d.bs[:0] + var c uint8 + r := d.r + for { + c = r.readn1() + if c == '"' { + break + } else if c == '\\' { + c = r.readn1() + switch c { + case '"', '\\', '/', '\'': + v = append(v, c) + case 'b': + v = append(v, '\b') + case 'f': + v = append(v, '\f') + case 'n': + v = append(v, '\n') + case 'r': + v = append(v, '\r') + case 't': + v = append(v, '\t') + case 'u': + rr := d.jsonU4(false) + // fmt.Printf("$$$$$$$$$: is surrogate: %v\n", utf16.IsSurrogate(rr)) + if utf16.IsSurrogate(rr) { + rr = utf16.DecodeRune(rr, d.jsonU4(true)) + } + w2 := utf8.EncodeRune(d.bstr[:], rr) + v = append(v, d.bstr[:w2]...) + default: + d.d.errorf("json: unsupported escaped value: %c", c) + } + } else { + v = append(v, c) + } + } + d.bs = v +} + +func (d *jsonDecDriver) jsonU4(checkSlashU bool) rune { + r := d.r + if checkSlashU && !(r.readn1() == '\\' && r.readn1() == 'u') { + d.d.errorf(`json: unquoteStr: invalid unicode sequence. Expecting \u`) + return 0 + } + // u, _ := strconv.ParseUint(string(d.bstr[:4]), 16, 64) + var u uint32 + for i := 0; i < 4; i++ { + v := r.readn1() + if '0' <= v && v <= '9' { + v = v - '0' + } else if 'a' <= v && v <= 'z' { + v = v - 'a' + 10 + } else if 'A' <= v && v <= 'Z' { + v = v - 'A' + 10 + } else { + d.d.errorf(`json: unquoteStr: invalid hex char in \u unicode sequence: %q`, v) + return 0 + } + u = u*16 + uint32(v) + } + return rune(u) +} + +func (d *jsonDecDriver) DecodeNaked() { + z := &d.d.n + // var decodeFurther bool + + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b + } + switch d.tok { + case 'n': + d.readStrIdx(10, 13) // ull + z.v = valueTypeNil + case 'f': + d.readStrIdx(5, 9) // alse + z.v = valueTypeBool + z.b = false + case 't': + d.readStrIdx(1, 4) // rue + z.v = valueTypeBool + z.b = true + case '{': + z.v = valueTypeMap + // d.tok = 0 // don't consume. kInterfaceNaked will call ReadMapStart + // decodeFurther = true + case '[': + z.v = valueTypeArray + // d.tok = 0 // don't consume. kInterfaceNaked will call ReadArrayStart + // decodeFurther = true + case '"': + z.v = valueTypeString + z.s = d.DecodeString() + default: // number + d.decNum(true) + n := &d.n + // if the string had a any of [.eE], then decode as float. + switch { + case n.explicitExponent, n.dot, n.exponent < 0, n.manOverflow: + z.v = valueTypeFloat + z.f = d.floatVal() + case n.exponent == 0: + u := n.mantissa + switch { + case n.neg: + z.v = valueTypeInt + z.i = -int64(u) + case d.h.SignedInteger: + z.v = valueTypeInt + z.i = int64(u) + default: + z.v = valueTypeUint + z.u = u + } + default: + u, overflow := n.uintExp() + switch { + case overflow: + z.v = valueTypeFloat + z.f = d.floatVal() + case n.neg: + z.v = valueTypeInt + z.i = -int64(u) + case d.h.SignedInteger: + z.v = valueTypeInt + z.i = int64(u) + default: + z.v = valueTypeUint + z.u = u + } + } + // fmt.Printf("DecodeNaked: Number: %T, %v\n", v, v) + } + // if decodeFurther { + // d.s.sc.retryRead() + // } + return +} + +//---------------------- + +// JsonHandle is a handle for JSON encoding format. +// +// Json is comprehensively supported: +// - decodes numbers into interface{} as int, uint or float64 +// - configurable way to encode/decode []byte . +// by default, encodes and decodes []byte using base64 Std Encoding +// - UTF-8 support for encoding and decoding +// +// It has better performance than the json library in the standard library, +// by leveraging the performance improvements of the codec library and +// minimizing allocations. +// +// In addition, it doesn't read more bytes than necessary during a decode, which allows +// reading multiple values from a stream containing json and non-json content. +// For example, a user can read a json value, then a cbor value, then a msgpack value, +// all from the same stream in sequence. +type JsonHandle struct { + textEncodingType + BasicHandle + // RawBytesExt, if configured, is used to encode and decode raw bytes in a custom way. + // If not configured, raw bytes are encoded to/from base64 text. + RawBytesExt InterfaceExt +} + +func (h *JsonHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceExt) (err error) { + return h.SetExt(rt, tag, &setExtWrapper{i: ext}) +} + +func (h *JsonHandle) newEncDriver(e *Encoder) encDriver { + hd := jsonEncDriver{e: e, w: e.w, h: h} + hd.bs = hd.b[:0] + hd.se.i = h.RawBytesExt + return &hd +} + +func (h *JsonHandle) newDecDriver(d *Decoder) decDriver { + // d := jsonDecDriver{r: r.(*bytesDecReader), h: h} + hd := jsonDecDriver{d: d, r: d.r, h: h} + hd.bs = hd.b[:0] + hd.se.i = h.RawBytesExt + return &hd +} + +func (e *jsonEncDriver) reset() { + e.w = e.e.w +} + +func (d *jsonDecDriver) reset() { + d.r = d.d.r +} + +var jsonEncodeTerminate = []byte{' '} + +func (h *JsonHandle) rpcEncodeTerminate() []byte { + return jsonEncodeTerminate +} + +var _ decDriver = (*jsonDecDriver)(nil) +var _ encDriver = (*jsonEncDriver)(nil) diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/msgpack.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/msgpack.go new file mode 100644 index 0000000000000..5eb4c96368c97 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/msgpack.go @@ -0,0 +1,844 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +/* +MSGPACK + +Msgpack-c implementation powers the c, c++, python, ruby, etc libraries. +We need to maintain compatibility with it and how it encodes integer values +without caring about the type. + +For compatibility with behaviour of msgpack-c reference implementation: + - Go intX (>0) and uintX + IS ENCODED AS + msgpack +ve fixnum, unsigned + - Go intX (<0) + IS ENCODED AS + msgpack -ve fixnum, signed + +*/ +package codec + +import ( + "fmt" + "io" + "math" + "net/rpc" + "reflect" +) + +const ( + mpPosFixNumMin byte = 0x00 + mpPosFixNumMax = 0x7f + mpFixMapMin = 0x80 + mpFixMapMax = 0x8f + mpFixArrayMin = 0x90 + mpFixArrayMax = 0x9f + mpFixStrMin = 0xa0 + mpFixStrMax = 0xbf + mpNil = 0xc0 + _ = 0xc1 + mpFalse = 0xc2 + mpTrue = 0xc3 + mpFloat = 0xca + mpDouble = 0xcb + mpUint8 = 0xcc + mpUint16 = 0xcd + mpUint32 = 0xce + mpUint64 = 0xcf + mpInt8 = 0xd0 + mpInt16 = 0xd1 + mpInt32 = 0xd2 + mpInt64 = 0xd3 + + // extensions below + mpBin8 = 0xc4 + mpBin16 = 0xc5 + mpBin32 = 0xc6 + mpExt8 = 0xc7 + mpExt16 = 0xc8 + mpExt32 = 0xc9 + mpFixExt1 = 0xd4 + mpFixExt2 = 0xd5 + mpFixExt4 = 0xd6 + mpFixExt8 = 0xd7 + mpFixExt16 = 0xd8 + + mpStr8 = 0xd9 // new + mpStr16 = 0xda + mpStr32 = 0xdb + + mpArray16 = 0xdc + mpArray32 = 0xdd + + mpMap16 = 0xde + mpMap32 = 0xdf + + mpNegFixNumMin = 0xe0 + mpNegFixNumMax = 0xff +) + +// MsgpackSpecRpcMultiArgs is a special type which signifies to the MsgpackSpecRpcCodec +// that the backend RPC service takes multiple arguments, which have been arranged +// in sequence in the slice. +// +// The Codec then passes it AS-IS to the rpc service (without wrapping it in an +// array of 1 element). +type MsgpackSpecRpcMultiArgs []interface{} + +// A MsgpackContainer type specifies the different types of msgpackContainers. +type msgpackContainerType struct { + fixCutoff int + bFixMin, b8, b16, b32 byte + hasFixMin, has8, has8Always bool +} + +var ( + msgpackContainerStr = msgpackContainerType{32, mpFixStrMin, mpStr8, mpStr16, mpStr32, true, true, false} + msgpackContainerBin = msgpackContainerType{0, 0, mpBin8, mpBin16, mpBin32, false, true, true} + msgpackContainerList = msgpackContainerType{16, mpFixArrayMin, 0, mpArray16, mpArray32, true, false, false} + msgpackContainerMap = msgpackContainerType{16, mpFixMapMin, 0, mpMap16, mpMap32, true, false, false} +) + +//--------------------------------------------- + +type msgpackEncDriver struct { + noBuiltInTypes + encNoSeparator + e *Encoder + w encWriter + h *MsgpackHandle + x [8]byte +} + +func (e *msgpackEncDriver) EncodeNil() { + e.w.writen1(mpNil) +} + +func (e *msgpackEncDriver) EncodeInt(i int64) { + if i >= 0 { + e.EncodeUint(uint64(i)) + } else if i >= -32 { + e.w.writen1(byte(i)) + } else if i >= math.MinInt8 { + e.w.writen2(mpInt8, byte(i)) + } else if i >= math.MinInt16 { + e.w.writen1(mpInt16) + bigenHelper{e.x[:2], e.w}.writeUint16(uint16(i)) + } else if i >= math.MinInt32 { + e.w.writen1(mpInt32) + bigenHelper{e.x[:4], e.w}.writeUint32(uint32(i)) + } else { + e.w.writen1(mpInt64) + bigenHelper{e.x[:8], e.w}.writeUint64(uint64(i)) + } +} + +func (e *msgpackEncDriver) EncodeUint(i uint64) { + if i <= math.MaxInt8 { + e.w.writen1(byte(i)) + } else if i <= math.MaxUint8 { + e.w.writen2(mpUint8, byte(i)) + } else if i <= math.MaxUint16 { + e.w.writen1(mpUint16) + bigenHelper{e.x[:2], e.w}.writeUint16(uint16(i)) + } else if i <= math.MaxUint32 { + e.w.writen1(mpUint32) + bigenHelper{e.x[:4], e.w}.writeUint32(uint32(i)) + } else { + e.w.writen1(mpUint64) + bigenHelper{e.x[:8], e.w}.writeUint64(uint64(i)) + } +} + +func (e *msgpackEncDriver) EncodeBool(b bool) { + if b { + e.w.writen1(mpTrue) + } else { + e.w.writen1(mpFalse) + } +} + +func (e *msgpackEncDriver) EncodeFloat32(f float32) { + e.w.writen1(mpFloat) + bigenHelper{e.x[:4], e.w}.writeUint32(math.Float32bits(f)) +} + +func (e *msgpackEncDriver) EncodeFloat64(f float64) { + e.w.writen1(mpDouble) + bigenHelper{e.x[:8], e.w}.writeUint64(math.Float64bits(f)) +} + +func (e *msgpackEncDriver) EncodeExt(v interface{}, xtag uint64, ext Ext, _ *Encoder) { + bs := ext.WriteExt(v) + if bs == nil { + e.EncodeNil() + return + } + if e.h.WriteExt { + e.encodeExtPreamble(uint8(xtag), len(bs)) + e.w.writeb(bs) + } else { + e.EncodeStringBytes(c_RAW, bs) + } +} + +func (e *msgpackEncDriver) EncodeRawExt(re *RawExt, _ *Encoder) { + e.encodeExtPreamble(uint8(re.Tag), len(re.Data)) + e.w.writeb(re.Data) +} + +func (e *msgpackEncDriver) encodeExtPreamble(xtag byte, l int) { + if l == 1 { + e.w.writen2(mpFixExt1, xtag) + } else if l == 2 { + e.w.writen2(mpFixExt2, xtag) + } else if l == 4 { + e.w.writen2(mpFixExt4, xtag) + } else if l == 8 { + e.w.writen2(mpFixExt8, xtag) + } else if l == 16 { + e.w.writen2(mpFixExt16, xtag) + } else if l < 256 { + e.w.writen2(mpExt8, byte(l)) + e.w.writen1(xtag) + } else if l < 65536 { + e.w.writen1(mpExt16) + bigenHelper{e.x[:2], e.w}.writeUint16(uint16(l)) + e.w.writen1(xtag) + } else { + e.w.writen1(mpExt32) + bigenHelper{e.x[:4], e.w}.writeUint32(uint32(l)) + e.w.writen1(xtag) + } +} + +func (e *msgpackEncDriver) EncodeArrayStart(length int) { + e.writeContainerLen(msgpackContainerList, length) +} + +func (e *msgpackEncDriver) EncodeMapStart(length int) { + e.writeContainerLen(msgpackContainerMap, length) +} + +func (e *msgpackEncDriver) EncodeString(c charEncoding, s string) { + if c == c_RAW && e.h.WriteExt { + e.writeContainerLen(msgpackContainerBin, len(s)) + } else { + e.writeContainerLen(msgpackContainerStr, len(s)) + } + if len(s) > 0 { + e.w.writestr(s) + } +} + +func (e *msgpackEncDriver) EncodeSymbol(v string) { + e.EncodeString(c_UTF8, v) +} + +func (e *msgpackEncDriver) EncodeStringBytes(c charEncoding, bs []byte) { + if c == c_RAW && e.h.WriteExt { + e.writeContainerLen(msgpackContainerBin, len(bs)) + } else { + e.writeContainerLen(msgpackContainerStr, len(bs)) + } + if len(bs) > 0 { + e.w.writeb(bs) + } +} + +func (e *msgpackEncDriver) writeContainerLen(ct msgpackContainerType, l int) { + if ct.hasFixMin && l < ct.fixCutoff { + e.w.writen1(ct.bFixMin | byte(l)) + } else if ct.has8 && l < 256 && (ct.has8Always || e.h.WriteExt) { + e.w.writen2(ct.b8, uint8(l)) + } else if l < 65536 { + e.w.writen1(ct.b16) + bigenHelper{e.x[:2], e.w}.writeUint16(uint16(l)) + } else { + e.w.writen1(ct.b32) + bigenHelper{e.x[:4], e.w}.writeUint32(uint32(l)) + } +} + +//--------------------------------------------- + +type msgpackDecDriver struct { + d *Decoder + r decReader // *Decoder decReader decReaderT + h *MsgpackHandle + b [scratchByteArrayLen]byte + bd byte + bdRead bool + br bool // bytes reader + noBuiltInTypes + noStreamingCodec + decNoSeparator +} + +// Note: This returns either a primitive (int, bool, etc) for non-containers, +// or a containerType, or a specific type denoting nil or extension. +// It is called when a nil interface{} is passed, leaving it up to the DecDriver +// to introspect the stream and decide how best to decode. +// It deciphers the value by looking at the stream first. +func (d *msgpackDecDriver) DecodeNaked() { + if !d.bdRead { + d.readNextBd() + } + bd := d.bd + n := &d.d.n + var decodeFurther bool + + switch bd { + case mpNil: + n.v = valueTypeNil + d.bdRead = false + case mpFalse: + n.v = valueTypeBool + n.b = false + case mpTrue: + n.v = valueTypeBool + n.b = true + + case mpFloat: + n.v = valueTypeFloat + n.f = float64(math.Float32frombits(bigen.Uint32(d.r.readx(4)))) + case mpDouble: + n.v = valueTypeFloat + n.f = math.Float64frombits(bigen.Uint64(d.r.readx(8))) + + case mpUint8: + n.v = valueTypeUint + n.u = uint64(d.r.readn1()) + case mpUint16: + n.v = valueTypeUint + n.u = uint64(bigen.Uint16(d.r.readx(2))) + case mpUint32: + n.v = valueTypeUint + n.u = uint64(bigen.Uint32(d.r.readx(4))) + case mpUint64: + n.v = valueTypeUint + n.u = uint64(bigen.Uint64(d.r.readx(8))) + + case mpInt8: + n.v = valueTypeInt + n.i = int64(int8(d.r.readn1())) + case mpInt16: + n.v = valueTypeInt + n.i = int64(int16(bigen.Uint16(d.r.readx(2)))) + case mpInt32: + n.v = valueTypeInt + n.i = int64(int32(bigen.Uint32(d.r.readx(4)))) + case mpInt64: + n.v = valueTypeInt + n.i = int64(int64(bigen.Uint64(d.r.readx(8)))) + + default: + switch { + case bd >= mpPosFixNumMin && bd <= mpPosFixNumMax: + // positive fixnum (always signed) + n.v = valueTypeInt + n.i = int64(int8(bd)) + case bd >= mpNegFixNumMin && bd <= mpNegFixNumMax: + // negative fixnum + n.v = valueTypeInt + n.i = int64(int8(bd)) + case bd == mpStr8, bd == mpStr16, bd == mpStr32, bd >= mpFixStrMin && bd <= mpFixStrMax: + if d.h.RawToString { + n.v = valueTypeString + n.s = d.DecodeString() + } else { + n.v = valueTypeBytes + n.l = d.DecodeBytes(nil, false, false) + } + case bd == mpBin8, bd == mpBin16, bd == mpBin32: + n.v = valueTypeBytes + n.l = d.DecodeBytes(nil, false, false) + case bd == mpArray16, bd == mpArray32, bd >= mpFixArrayMin && bd <= mpFixArrayMax: + n.v = valueTypeArray + decodeFurther = true + case bd == mpMap16, bd == mpMap32, bd >= mpFixMapMin && bd <= mpFixMapMax: + n.v = valueTypeMap + decodeFurther = true + case bd >= mpFixExt1 && bd <= mpFixExt16, bd >= mpExt8 && bd <= mpExt32: + n.v = valueTypeExt + clen := d.readExtLen() + n.u = uint64(d.r.readn1()) + n.l = d.r.readx(clen) + default: + d.d.errorf("Nil-Deciphered DecodeValue: %s: hex: %x, dec: %d", msgBadDesc, bd, bd) + } + } + if !decodeFurther { + d.bdRead = false + } + if n.v == valueTypeUint && d.h.SignedInteger { + n.v = valueTypeInt + n.i = int64(n.v) + } + return +} + +// int can be decoded from msgpack type: intXXX or uintXXX +func (d *msgpackDecDriver) DecodeInt(bitsize uint8) (i int64) { + if !d.bdRead { + d.readNextBd() + } + switch d.bd { + case mpUint8: + i = int64(uint64(d.r.readn1())) + case mpUint16: + i = int64(uint64(bigen.Uint16(d.r.readx(2)))) + case mpUint32: + i = int64(uint64(bigen.Uint32(d.r.readx(4)))) + case mpUint64: + i = int64(bigen.Uint64(d.r.readx(8))) + case mpInt8: + i = int64(int8(d.r.readn1())) + case mpInt16: + i = int64(int16(bigen.Uint16(d.r.readx(2)))) + case mpInt32: + i = int64(int32(bigen.Uint32(d.r.readx(4)))) + case mpInt64: + i = int64(bigen.Uint64(d.r.readx(8))) + default: + switch { + case d.bd >= mpPosFixNumMin && d.bd <= mpPosFixNumMax: + i = int64(int8(d.bd)) + case d.bd >= mpNegFixNumMin && d.bd <= mpNegFixNumMax: + i = int64(int8(d.bd)) + default: + d.d.errorf("Unhandled single-byte unsigned integer value: %s: %x", msgBadDesc, d.bd) + return + } + } + // check overflow (logic adapted from std pkg reflect/value.go OverflowUint() + if bitsize > 0 { + if trunc := (i << (64 - bitsize)) >> (64 - bitsize); i != trunc { + d.d.errorf("Overflow int value: %v", i) + return + } + } + d.bdRead = false + return +} + +// uint can be decoded from msgpack type: intXXX or uintXXX +func (d *msgpackDecDriver) DecodeUint(bitsize uint8) (ui uint64) { + if !d.bdRead { + d.readNextBd() + } + switch d.bd { + case mpUint8: + ui = uint64(d.r.readn1()) + case mpUint16: + ui = uint64(bigen.Uint16(d.r.readx(2))) + case mpUint32: + ui = uint64(bigen.Uint32(d.r.readx(4))) + case mpUint64: + ui = bigen.Uint64(d.r.readx(8)) + case mpInt8: + if i := int64(int8(d.r.readn1())); i >= 0 { + ui = uint64(i) + } else { + d.d.errorf("Assigning negative signed value: %v, to unsigned type", i) + return + } + case mpInt16: + if i := int64(int16(bigen.Uint16(d.r.readx(2)))); i >= 0 { + ui = uint64(i) + } else { + d.d.errorf("Assigning negative signed value: %v, to unsigned type", i) + return + } + case mpInt32: + if i := int64(int32(bigen.Uint32(d.r.readx(4)))); i >= 0 { + ui = uint64(i) + } else { + d.d.errorf("Assigning negative signed value: %v, to unsigned type", i) + return + } + case mpInt64: + if i := int64(bigen.Uint64(d.r.readx(8))); i >= 0 { + ui = uint64(i) + } else { + d.d.errorf("Assigning negative signed value: %v, to unsigned type", i) + return + } + default: + switch { + case d.bd >= mpPosFixNumMin && d.bd <= mpPosFixNumMax: + ui = uint64(d.bd) + case d.bd >= mpNegFixNumMin && d.bd <= mpNegFixNumMax: + d.d.errorf("Assigning negative signed value: %v, to unsigned type", int(d.bd)) + return + default: + d.d.errorf("Unhandled single-byte unsigned integer value: %s: %x", msgBadDesc, d.bd) + return + } + } + // check overflow (logic adapted from std pkg reflect/value.go OverflowUint() + if bitsize > 0 { + if trunc := (ui << (64 - bitsize)) >> (64 - bitsize); ui != trunc { + d.d.errorf("Overflow uint value: %v", ui) + return + } + } + d.bdRead = false + return +} + +// float can either be decoded from msgpack type: float, double or intX +func (d *msgpackDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == mpFloat { + f = float64(math.Float32frombits(bigen.Uint32(d.r.readx(4)))) + } else if d.bd == mpDouble { + f = math.Float64frombits(bigen.Uint64(d.r.readx(8))) + } else { + f = float64(d.DecodeInt(0)) + } + if chkOverflow32 && chkOvf.Float32(f) { + d.d.errorf("msgpack: float32 overflow: %v", f) + return + } + d.bdRead = false + return +} + +// bool can be decoded from bool, fixnum 0 or 1. +func (d *msgpackDecDriver) DecodeBool() (b bool) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == mpFalse || d.bd == 0 { + // b = false + } else if d.bd == mpTrue || d.bd == 1 { + b = true + } else { + d.d.errorf("Invalid single-byte value for bool: %s: %x", msgBadDesc, d.bd) + return + } + d.bdRead = false + return +} + +func (d *msgpackDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) { + if !d.bdRead { + d.readNextBd() + } + var clen int + // ignore isstring. Expect that the bytes may be found from msgpackContainerStr or msgpackContainerBin + if bd := d.bd; bd == mpBin8 || bd == mpBin16 || bd == mpBin32 { + clen = d.readContainerLen(msgpackContainerBin) + } else { + clen = d.readContainerLen(msgpackContainerStr) + } + // println("DecodeBytes: clen: ", clen) + d.bdRead = false + // bytes may be nil, so handle it. if nil, clen=-1. + if clen < 0 { + return nil + } + if zerocopy { + if d.br { + return d.r.readx(clen) + } else if len(bs) == 0 { + bs = d.b[:] + } + } + return decByteSlice(d.r, clen, bs) +} + +func (d *msgpackDecDriver) DecodeString() (s string) { + return string(d.DecodeBytes(d.b[:], true, true)) +} + +func (d *msgpackDecDriver) readNextBd() { + d.bd = d.r.readn1() + d.bdRead = true +} + +func (d *msgpackDecDriver) ContainerType() (vt valueType) { + bd := d.bd + if bd == mpNil { + return valueTypeNil + } else if bd == mpBin8 || bd == mpBin16 || bd == mpBin32 || + (!d.h.RawToString && + (bd == mpStr8 || bd == mpStr16 || bd == mpStr32 || (bd >= mpFixStrMin && bd <= mpFixStrMax))) { + return valueTypeBytes + } else if d.h.RawToString && + (bd == mpStr8 || bd == mpStr16 || bd == mpStr32 || (bd >= mpFixStrMin && bd <= mpFixStrMax)) { + return valueTypeString + } else if bd == mpArray16 || bd == mpArray32 || (bd >= mpFixArrayMin && bd <= mpFixArrayMax) { + return valueTypeArray + } else if bd == mpMap16 || bd == mpMap32 || (bd >= mpFixMapMin && bd <= mpFixMapMax) { + return valueTypeMap + } else { + // d.d.errorf("isContainerType: unsupported parameter: %v", vt) + } + return valueTypeUnset +} + +func (d *msgpackDecDriver) TryDecodeAsNil() (v bool) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == mpNil { + d.bdRead = false + v = true + } + return +} + +func (d *msgpackDecDriver) readContainerLen(ct msgpackContainerType) (clen int) { + bd := d.bd + if bd == mpNil { + clen = -1 // to represent nil + } else if bd == ct.b8 { + clen = int(d.r.readn1()) + } else if bd == ct.b16 { + clen = int(bigen.Uint16(d.r.readx(2))) + } else if bd == ct.b32 { + clen = int(bigen.Uint32(d.r.readx(4))) + } else if (ct.bFixMin & bd) == ct.bFixMin { + clen = int(ct.bFixMin ^ bd) + } else { + d.d.errorf("readContainerLen: %s: hex: %x, decimal: %d", msgBadDesc, bd, bd) + return + } + d.bdRead = false + return +} + +func (d *msgpackDecDriver) ReadMapStart() int { + return d.readContainerLen(msgpackContainerMap) +} + +func (d *msgpackDecDriver) ReadArrayStart() int { + return d.readContainerLen(msgpackContainerList) +} + +func (d *msgpackDecDriver) readExtLen() (clen int) { + switch d.bd { + case mpNil: + clen = -1 // to represent nil + case mpFixExt1: + clen = 1 + case mpFixExt2: + clen = 2 + case mpFixExt4: + clen = 4 + case mpFixExt8: + clen = 8 + case mpFixExt16: + clen = 16 + case mpExt8: + clen = int(d.r.readn1()) + case mpExt16: + clen = int(bigen.Uint16(d.r.readx(2))) + case mpExt32: + clen = int(bigen.Uint32(d.r.readx(4))) + default: + d.d.errorf("decoding ext bytes: found unexpected byte: %x", d.bd) + return + } + return +} + +func (d *msgpackDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) { + if xtag > 0xff { + d.d.errorf("decodeExt: tag must be <= 0xff; got: %v", xtag) + return + } + realxtag1, xbs := d.decodeExtV(ext != nil, uint8(xtag)) + realxtag = uint64(realxtag1) + if ext == nil { + re := rv.(*RawExt) + re.Tag = realxtag + re.Data = detachZeroCopyBytes(d.br, re.Data, xbs) + } else { + ext.ReadExt(rv, xbs) + } + return +} + +func (d *msgpackDecDriver) decodeExtV(verifyTag bool, tag byte) (xtag byte, xbs []byte) { + if !d.bdRead { + d.readNextBd() + } + xbd := d.bd + if xbd == mpBin8 || xbd == mpBin16 || xbd == mpBin32 { + xbs = d.DecodeBytes(nil, false, true) + } else if xbd == mpStr8 || xbd == mpStr16 || xbd == mpStr32 || + (xbd >= mpFixStrMin && xbd <= mpFixStrMax) { + xbs = d.DecodeBytes(nil, true, true) + } else { + clen := d.readExtLen() + xtag = d.r.readn1() + if verifyTag && xtag != tag { + d.d.errorf("Wrong extension tag. Got %b. Expecting: %v", xtag, tag) + return + } + xbs = d.r.readx(clen) + } + d.bdRead = false + return +} + +//-------------------------------------------------- + +//MsgpackHandle is a Handle for the Msgpack Schema-Free Encoding Format. +type MsgpackHandle struct { + BasicHandle + + // RawToString controls how raw bytes are decoded into a nil interface{}. + RawToString bool + + // WriteExt flag supports encoding configured extensions with extension tags. + // It also controls whether other elements of the new spec are encoded (ie Str8). + // + // With WriteExt=false, configured extensions are serialized as raw bytes + // and Str8 is not encoded. + // + // A stream can still be decoded into a typed value, provided an appropriate value + // is provided, but the type cannot be inferred from the stream. If no appropriate + // type is provided (e.g. decoding into a nil interface{}), you get back + // a []byte or string based on the setting of RawToString. + WriteExt bool + binaryEncodingType +} + +func (h *MsgpackHandle) SetBytesExt(rt reflect.Type, tag uint64, ext BytesExt) (err error) { + return h.SetExt(rt, tag, &setExtWrapper{b: ext}) +} + +func (h *MsgpackHandle) newEncDriver(e *Encoder) encDriver { + return &msgpackEncDriver{e: e, w: e.w, h: h} +} + +func (h *MsgpackHandle) newDecDriver(d *Decoder) decDriver { + return &msgpackDecDriver{d: d, r: d.r, h: h, br: d.bytes} +} + +func (e *msgpackEncDriver) reset() { + e.w = e.e.w +} + +func (d *msgpackDecDriver) reset() { + d.r = d.d.r +} + +//-------------------------------------------------- + +type msgpackSpecRpcCodec struct { + rpcCodec +} + +// /////////////// Spec RPC Codec /////////////////// +func (c *msgpackSpecRpcCodec) WriteRequest(r *rpc.Request, body interface{}) error { + // WriteRequest can write to both a Go service, and other services that do + // not abide by the 1 argument rule of a Go service. + // We discriminate based on if the body is a MsgpackSpecRpcMultiArgs + var bodyArr []interface{} + if m, ok := body.(MsgpackSpecRpcMultiArgs); ok { + bodyArr = ([]interface{})(m) + } else { + bodyArr = []interface{}{body} + } + r2 := []interface{}{0, uint32(r.Seq), r.ServiceMethod, bodyArr} + return c.write(r2, nil, false, true) +} + +func (c *msgpackSpecRpcCodec) WriteResponse(r *rpc.Response, body interface{}) error { + var moe interface{} + if r.Error != "" { + moe = r.Error + } + if moe != nil && body != nil { + body = nil + } + r2 := []interface{}{1, uint32(r.Seq), moe, body} + return c.write(r2, nil, false, true) +} + +func (c *msgpackSpecRpcCodec) ReadResponseHeader(r *rpc.Response) error { + return c.parseCustomHeader(1, &r.Seq, &r.Error) +} + +func (c *msgpackSpecRpcCodec) ReadRequestHeader(r *rpc.Request) error { + return c.parseCustomHeader(0, &r.Seq, &r.ServiceMethod) +} + +func (c *msgpackSpecRpcCodec) ReadRequestBody(body interface{}) error { + if body == nil { // read and discard + return c.read(nil) + } + bodyArr := []interface{}{body} + return c.read(&bodyArr) +} + +func (c *msgpackSpecRpcCodec) parseCustomHeader(expectTypeByte byte, msgid *uint64, methodOrError *string) (err error) { + + if c.isClosed() { + return io.EOF + } + + // We read the response header by hand + // so that the body can be decoded on its own from the stream at a later time. + + const fia byte = 0x94 //four item array descriptor value + // Not sure why the panic of EOF is swallowed above. + // if bs1 := c.dec.r.readn1(); bs1 != fia { + // err = fmt.Errorf("Unexpected value for array descriptor: Expecting %v. Received %v", fia, bs1) + // return + // } + var b byte + b, err = c.br.ReadByte() + if err != nil { + return + } + if b != fia { + err = fmt.Errorf("Unexpected value for array descriptor: Expecting %v. Received %v", fia, b) + return + } + + if err = c.read(&b); err != nil { + return + } + if b != expectTypeByte { + err = fmt.Errorf("Unexpected byte descriptor in header. Expecting %v. Received %v", expectTypeByte, b) + return + } + if err = c.read(msgid); err != nil { + return + } + if err = c.read(methodOrError); err != nil { + return + } + return +} + +//-------------------------------------------------- + +// msgpackSpecRpc is the implementation of Rpc that uses custom communication protocol +// as defined in the msgpack spec at https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md +type msgpackSpecRpc struct{} + +// MsgpackSpecRpc implements Rpc using the communication protocol defined in +// the msgpack spec at https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md . +// Its methods (ServerCodec and ClientCodec) return values that implement RpcCodecBuffered. +var MsgpackSpecRpc msgpackSpecRpc + +func (x msgpackSpecRpc) ServerCodec(conn io.ReadWriteCloser, h Handle) rpc.ServerCodec { + return &msgpackSpecRpcCodec{newRPCCodec(conn, h)} +} + +func (x msgpackSpecRpc) ClientCodec(conn io.ReadWriteCloser, h Handle) rpc.ClientCodec { + return &msgpackSpecRpcCodec{newRPCCodec(conn, h)} +} + +var _ decDriver = (*msgpackDecDriver)(nil) +var _ encDriver = (*msgpackEncDriver)(nil) diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/noop.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/noop.go new file mode 100644 index 0000000000000..cfee3d084dc2a --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/noop.go @@ -0,0 +1,213 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "math/rand" + "time" +) + +// NoopHandle returns a no-op handle. It basically does nothing. +// It is only useful for benchmarking, as it gives an idea of the +// overhead from the codec framework. +// +// LIBRARY USERS: *** DO NOT USE *** +func NoopHandle(slen int) *noopHandle { + h := noopHandle{} + h.rand = rand.New(rand.NewSource(time.Now().UnixNano())) + h.B = make([][]byte, slen) + h.S = make([]string, slen) + for i := 0; i < len(h.S); i++ { + b := make([]byte, i+1) + for j := 0; j < len(b); j++ { + b[j] = 'a' + byte(i) + } + h.B[i] = b + h.S[i] = string(b) + } + return &h +} + +// noopHandle does nothing. +// It is used to simulate the overhead of the codec framework. +type noopHandle struct { + BasicHandle + binaryEncodingType + noopDrv // noopDrv is unexported here, so we can get a copy of it when needed. +} + +type noopDrv struct { + d *Decoder + e *Encoder + i int + S []string + B [][]byte + mks []bool // stack. if map (true), else if array (false) + mk bool // top of stack. what container are we on? map or array? + ct valueType // last response for IsContainerType. + cb int // counter for ContainerType + rand *rand.Rand +} + +func (h *noopDrv) r(v int) int { return h.rand.Intn(v) } +func (h *noopDrv) m(v int) int { h.i++; return h.i % v } + +func (h *noopDrv) newEncDriver(e *Encoder) encDriver { h.e = e; return h } +func (h *noopDrv) newDecDriver(d *Decoder) decDriver { h.d = d; return h } + +func (h *noopDrv) reset() {} +func (h *noopDrv) uncacheRead() {} + +// --- encDriver + +// stack functions (for map and array) +func (h *noopDrv) start(b bool) { + // println("start", len(h.mks)+1) + h.mks = append(h.mks, b) + h.mk = b +} +func (h *noopDrv) end() { + // println("end: ", len(h.mks)-1) + h.mks = h.mks[:len(h.mks)-1] + if len(h.mks) > 0 { + h.mk = h.mks[len(h.mks)-1] + } else { + h.mk = false + } +} + +func (h *noopDrv) EncodeBuiltin(rt uintptr, v interface{}) {} +func (h *noopDrv) EncodeNil() {} +func (h *noopDrv) EncodeInt(i int64) {} +func (h *noopDrv) EncodeUint(i uint64) {} +func (h *noopDrv) EncodeBool(b bool) {} +func (h *noopDrv) EncodeFloat32(f float32) {} +func (h *noopDrv) EncodeFloat64(f float64) {} +func (h *noopDrv) EncodeRawExt(re *RawExt, e *Encoder) {} +func (h *noopDrv) EncodeArrayStart(length int) { h.start(true) } +func (h *noopDrv) EncodeMapStart(length int) { h.start(false) } +func (h *noopDrv) EncodeEnd() { h.end() } + +func (h *noopDrv) EncodeString(c charEncoding, v string) {} +func (h *noopDrv) EncodeSymbol(v string) {} +func (h *noopDrv) EncodeStringBytes(c charEncoding, v []byte) {} + +func (h *noopDrv) EncodeExt(rv interface{}, xtag uint64, ext Ext, e *Encoder) {} + +// ---- decDriver +func (h *noopDrv) initReadNext() {} +func (h *noopDrv) CheckBreak() bool { return false } +func (h *noopDrv) IsBuiltinType(rt uintptr) bool { return false } +func (h *noopDrv) DecodeBuiltin(rt uintptr, v interface{}) {} +func (h *noopDrv) DecodeInt(bitsize uint8) (i int64) { return int64(h.m(15)) } +func (h *noopDrv) DecodeUint(bitsize uint8) (ui uint64) { return uint64(h.m(35)) } +func (h *noopDrv) DecodeFloat(chkOverflow32 bool) (f float64) { return float64(h.m(95)) } +func (h *noopDrv) DecodeBool() (b bool) { return h.m(2) == 0 } +func (h *noopDrv) DecodeString() (s string) { return h.S[h.m(8)] } + +// func (h *noopDrv) DecodeStringAsBytes(bs []byte) []byte { return h.DecodeBytes(bs) } + +func (h *noopDrv) DecodeBytes(bs []byte, isstring, zerocopy bool) []byte { return h.B[h.m(len(h.B))] } + +func (h *noopDrv) ReadEnd() { h.end() } + +// toggle map/slice +func (h *noopDrv) ReadMapStart() int { h.start(true); return h.m(10) } +func (h *noopDrv) ReadArrayStart() int { h.start(false); return h.m(10) } + +func (h *noopDrv) ContainerType() (vt valueType) { + // return h.m(2) == 0 + // handle kStruct, which will bomb is it calls this and doesn't get back a map or array. + // consequently, if the return value is not map or array, reset it to one of them based on h.m(7) % 2 + // for kstruct: at least one out of every 2 times, return one of valueTypeMap or Array (else kstruct bombs) + // however, every 10th time it is called, we just return something else. + var vals = [...]valueType{valueTypeArray, valueTypeMap} + // ------------ TAKE ------------ + // if h.cb%2 == 0 { + // if h.ct == valueTypeMap || h.ct == valueTypeArray { + // } else { + // h.ct = vals[h.m(2)] + // } + // } else if h.cb%5 == 0 { + // h.ct = valueType(h.m(8)) + // } else { + // h.ct = vals[h.m(2)] + // } + // ------------ TAKE ------------ + // if h.cb%16 == 0 { + // h.ct = valueType(h.cb % 8) + // } else { + // h.ct = vals[h.cb%2] + // } + h.ct = vals[h.cb%2] + h.cb++ + return h.ct + + // if h.ct == valueTypeNil || h.ct == valueTypeString || h.ct == valueTypeBytes { + // return h.ct + // } + // return valueTypeUnset + // TODO: may need to tweak this so it works. + // if h.ct == valueTypeMap && vt == valueTypeArray || h.ct == valueTypeArray && vt == valueTypeMap { + // h.cb = !h.cb + // h.ct = vt + // return h.cb + // } + // // go in a loop and check it. + // h.ct = vt + // h.cb = h.m(7) == 0 + // return h.cb +} +func (h *noopDrv) TryDecodeAsNil() bool { + if h.mk { + return false + } else { + return h.m(8) == 0 + } +} +func (h *noopDrv) DecodeExt(rv interface{}, xtag uint64, ext Ext) uint64 { + return 0 +} + +func (h *noopDrv) DecodeNaked() { + // use h.r (random) not h.m() because h.m() could cause the same value to be given. + var sk int + if h.mk { + // if mapkey, do not support values of nil OR bytes, array, map or rawext + sk = h.r(7) + 1 + } else { + sk = h.r(12) + } + n := &h.d.n + switch sk { + case 0: + n.v = valueTypeNil + case 1: + n.v, n.b = valueTypeBool, false + case 2: + n.v, n.b = valueTypeBool, true + case 3: + n.v, n.i = valueTypeInt, h.DecodeInt(64) + case 4: + n.v, n.u = valueTypeUint, h.DecodeUint(64) + case 5: + n.v, n.f = valueTypeFloat, h.DecodeFloat(true) + case 6: + n.v, n.f = valueTypeFloat, h.DecodeFloat(false) + case 7: + n.v, n.s = valueTypeString, h.DecodeString() + case 8: + n.v, n.l = valueTypeBytes, h.B[h.m(len(h.B))] + case 9: + n.v = valueTypeArray + case 10: + n.v = valueTypeMap + default: + n.v = valueTypeExt + n.u = h.DecodeUint(64) + n.l = h.B[h.m(len(h.B))] + } + h.ct = n.v + return +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/prebuild.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/prebuild.go new file mode 100644 index 0000000000000..2353263e88af6 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/prebuild.go @@ -0,0 +1,3 @@ +package codec + +//go:generate bash prebuild.sh diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/rpc.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/rpc.go new file mode 100644 index 0000000000000..dad53d0c61e60 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/rpc.go @@ -0,0 +1,180 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "bufio" + "io" + "net/rpc" + "sync" +) + +// rpcEncodeTerminator allows a handler specify a []byte terminator to send after each Encode. +// +// Some codecs like json need to put a space after each encoded value, to serve as a +// delimiter for things like numbers (else json codec will continue reading till EOF). +type rpcEncodeTerminator interface { + rpcEncodeTerminate() []byte +} + +// Rpc provides a rpc Server or Client Codec for rpc communication. +type Rpc interface { + ServerCodec(conn io.ReadWriteCloser, h Handle) rpc.ServerCodec + ClientCodec(conn io.ReadWriteCloser, h Handle) rpc.ClientCodec +} + +// RpcCodecBuffered allows access to the underlying bufio.Reader/Writer +// used by the rpc connection. It accomodates use-cases where the connection +// should be used by rpc and non-rpc functions, e.g. streaming a file after +// sending an rpc response. +type RpcCodecBuffered interface { + BufferedReader() *bufio.Reader + BufferedWriter() *bufio.Writer +} + +// ------------------------------------- + +// rpcCodec defines the struct members and common methods. +type rpcCodec struct { + rwc io.ReadWriteCloser + dec *Decoder + enc *Encoder + bw *bufio.Writer + br *bufio.Reader + mu sync.Mutex + h Handle + + cls bool + clsmu sync.RWMutex +} + +func newRPCCodec(conn io.ReadWriteCloser, h Handle) rpcCodec { + bw := bufio.NewWriter(conn) + br := bufio.NewReader(conn) + return rpcCodec{ + rwc: conn, + bw: bw, + br: br, + enc: NewEncoder(bw, h), + dec: NewDecoder(br, h), + h: h, + } +} + +func (c *rpcCodec) BufferedReader() *bufio.Reader { + return c.br +} + +func (c *rpcCodec) BufferedWriter() *bufio.Writer { + return c.bw +} + +func (c *rpcCodec) write(obj1, obj2 interface{}, writeObj2, doFlush bool) (err error) { + if c.isClosed() { + return io.EOF + } + if err = c.enc.Encode(obj1); err != nil { + return + } + t, tOk := c.h.(rpcEncodeTerminator) + if tOk { + c.bw.Write(t.rpcEncodeTerminate()) + } + if writeObj2 { + if err = c.enc.Encode(obj2); err != nil { + return + } + if tOk { + c.bw.Write(t.rpcEncodeTerminate()) + } + } + if doFlush { + return c.bw.Flush() + } + return +} + +func (c *rpcCodec) read(obj interface{}) (err error) { + if c.isClosed() { + return io.EOF + } + //If nil is passed in, we should still attempt to read content to nowhere. + if obj == nil { + var obj2 interface{} + return c.dec.Decode(&obj2) + } + return c.dec.Decode(obj) +} + +func (c *rpcCodec) isClosed() bool { + c.clsmu.RLock() + x := c.cls + c.clsmu.RUnlock() + return x +} + +func (c *rpcCodec) Close() error { + if c.isClosed() { + return io.EOF + } + c.clsmu.Lock() + c.cls = true + c.clsmu.Unlock() + return c.rwc.Close() +} + +func (c *rpcCodec) ReadResponseBody(body interface{}) error { + return c.read(body) +} + +// ------------------------------------- + +type goRpcCodec struct { + rpcCodec +} + +func (c *goRpcCodec) WriteRequest(r *rpc.Request, body interface{}) error { + // Must protect for concurrent access as per API + c.mu.Lock() + defer c.mu.Unlock() + return c.write(r, body, true, true) +} + +func (c *goRpcCodec) WriteResponse(r *rpc.Response, body interface{}) error { + c.mu.Lock() + defer c.mu.Unlock() + return c.write(r, body, true, true) +} + +func (c *goRpcCodec) ReadResponseHeader(r *rpc.Response) error { + return c.read(r) +} + +func (c *goRpcCodec) ReadRequestHeader(r *rpc.Request) error { + return c.read(r) +} + +func (c *goRpcCodec) ReadRequestBody(body interface{}) error { + return c.read(body) +} + +// ------------------------------------- + +// goRpc is the implementation of Rpc that uses the communication protocol +// as defined in net/rpc package. +type goRpc struct{} + +// GoRpc implements Rpc using the communication protocol defined in net/rpc package. +// Its methods (ServerCodec and ClientCodec) return values that implement RpcCodecBuffered. +var GoRpc goRpc + +func (x goRpc) ServerCodec(conn io.ReadWriteCloser, h Handle) rpc.ServerCodec { + return &goRpcCodec{newRPCCodec(conn, h)} +} + +func (x goRpc) ClientCodec(conn io.ReadWriteCloser, h Handle) rpc.ClientCodec { + return &goRpcCodec{newRPCCodec(conn, h)} +} + +var _ RpcCodecBuffered = (*rpcCodec)(nil) // ensure *rpcCodec implements RpcCodecBuffered diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/simple.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/simple.go new file mode 100644 index 0000000000000..c15049650955f --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/simple.go @@ -0,0 +1,518 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "math" + "reflect" +) + +const ( + _ uint8 = iota + simpleVdNil = 1 + simpleVdFalse = 2 + simpleVdTrue = 3 + simpleVdFloat32 = 4 + simpleVdFloat64 = 5 + + // each lasts for 4 (ie n, n+1, n+2, n+3) + simpleVdPosInt = 8 + simpleVdNegInt = 12 + + // containers: each lasts for 4 (ie n, n+1, n+2, ... n+7) + simpleVdString = 216 + simpleVdByteArray = 224 + simpleVdArray = 232 + simpleVdMap = 240 + simpleVdExt = 248 +) + +type simpleEncDriver struct { + noBuiltInTypes + encNoSeparator + e *Encoder + h *SimpleHandle + w encWriter + b [8]byte +} + +func (e *simpleEncDriver) EncodeNil() { + e.w.writen1(simpleVdNil) +} + +func (e *simpleEncDriver) EncodeBool(b bool) { + if b { + e.w.writen1(simpleVdTrue) + } else { + e.w.writen1(simpleVdFalse) + } +} + +func (e *simpleEncDriver) EncodeFloat32(f float32) { + e.w.writen1(simpleVdFloat32) + bigenHelper{e.b[:4], e.w}.writeUint32(math.Float32bits(f)) +} + +func (e *simpleEncDriver) EncodeFloat64(f float64) { + e.w.writen1(simpleVdFloat64) + bigenHelper{e.b[:8], e.w}.writeUint64(math.Float64bits(f)) +} + +func (e *simpleEncDriver) EncodeInt(v int64) { + if v < 0 { + e.encUint(uint64(-v), simpleVdNegInt) + } else { + e.encUint(uint64(v), simpleVdPosInt) + } +} + +func (e *simpleEncDriver) EncodeUint(v uint64) { + e.encUint(v, simpleVdPosInt) +} + +func (e *simpleEncDriver) encUint(v uint64, bd uint8) { + if v <= math.MaxUint8 { + e.w.writen2(bd, uint8(v)) + } else if v <= math.MaxUint16 { + e.w.writen1(bd + 1) + bigenHelper{e.b[:2], e.w}.writeUint16(uint16(v)) + } else if v <= math.MaxUint32 { + e.w.writen1(bd + 2) + bigenHelper{e.b[:4], e.w}.writeUint32(uint32(v)) + } else { // if v <= math.MaxUint64 { + e.w.writen1(bd + 3) + bigenHelper{e.b[:8], e.w}.writeUint64(v) + } +} + +func (e *simpleEncDriver) encLen(bd byte, length int) { + if length == 0 { + e.w.writen1(bd) + } else if length <= math.MaxUint8 { + e.w.writen1(bd + 1) + e.w.writen1(uint8(length)) + } else if length <= math.MaxUint16 { + e.w.writen1(bd + 2) + bigenHelper{e.b[:2], e.w}.writeUint16(uint16(length)) + } else if int64(length) <= math.MaxUint32 { + e.w.writen1(bd + 3) + bigenHelper{e.b[:4], e.w}.writeUint32(uint32(length)) + } else { + e.w.writen1(bd + 4) + bigenHelper{e.b[:8], e.w}.writeUint64(uint64(length)) + } +} + +func (e *simpleEncDriver) EncodeExt(rv interface{}, xtag uint64, ext Ext, _ *Encoder) { + bs := ext.WriteExt(rv) + if bs == nil { + e.EncodeNil() + return + } + e.encodeExtPreamble(uint8(xtag), len(bs)) + e.w.writeb(bs) +} + +func (e *simpleEncDriver) EncodeRawExt(re *RawExt, _ *Encoder) { + e.encodeExtPreamble(uint8(re.Tag), len(re.Data)) + e.w.writeb(re.Data) +} + +func (e *simpleEncDriver) encodeExtPreamble(xtag byte, length int) { + e.encLen(simpleVdExt, length) + e.w.writen1(xtag) +} + +func (e *simpleEncDriver) EncodeArrayStart(length int) { + e.encLen(simpleVdArray, length) +} + +func (e *simpleEncDriver) EncodeMapStart(length int) { + e.encLen(simpleVdMap, length) +} + +func (e *simpleEncDriver) EncodeString(c charEncoding, v string) { + e.encLen(simpleVdString, len(v)) + e.w.writestr(v) +} + +func (e *simpleEncDriver) EncodeSymbol(v string) { + e.EncodeString(c_UTF8, v) +} + +func (e *simpleEncDriver) EncodeStringBytes(c charEncoding, v []byte) { + e.encLen(simpleVdByteArray, len(v)) + e.w.writeb(v) +} + +//------------------------------------ + +type simpleDecDriver struct { + d *Decoder + h *SimpleHandle + r decReader + bdRead bool + bd byte + br bool // bytes reader + noBuiltInTypes + noStreamingCodec + decNoSeparator + b [scratchByteArrayLen]byte +} + +func (d *simpleDecDriver) readNextBd() { + d.bd = d.r.readn1() + d.bdRead = true +} + +func (d *simpleDecDriver) ContainerType() (vt valueType) { + if d.bd == simpleVdNil { + return valueTypeNil + } else if d.bd == simpleVdByteArray || d.bd == simpleVdByteArray+1 || + d.bd == simpleVdByteArray+2 || d.bd == simpleVdByteArray+3 || d.bd == simpleVdByteArray+4 { + return valueTypeBytes + } else if d.bd == simpleVdString || d.bd == simpleVdString+1 || + d.bd == simpleVdString+2 || d.bd == simpleVdString+3 || d.bd == simpleVdString+4 { + return valueTypeString + } else if d.bd == simpleVdArray || d.bd == simpleVdArray+1 || + d.bd == simpleVdArray+2 || d.bd == simpleVdArray+3 || d.bd == simpleVdArray+4 { + return valueTypeArray + } else if d.bd == simpleVdMap || d.bd == simpleVdMap+1 || + d.bd == simpleVdMap+2 || d.bd == simpleVdMap+3 || d.bd == simpleVdMap+4 { + return valueTypeMap + } else { + // d.d.errorf("isContainerType: unsupported parameter: %v", vt) + } + return valueTypeUnset +} + +func (d *simpleDecDriver) TryDecodeAsNil() bool { + if !d.bdRead { + d.readNextBd() + } + if d.bd == simpleVdNil { + d.bdRead = false + return true + } + return false +} + +func (d *simpleDecDriver) decCheckInteger() (ui uint64, neg bool) { + if !d.bdRead { + d.readNextBd() + } + switch d.bd { + case simpleVdPosInt: + ui = uint64(d.r.readn1()) + case simpleVdPosInt + 1: + ui = uint64(bigen.Uint16(d.r.readx(2))) + case simpleVdPosInt + 2: + ui = uint64(bigen.Uint32(d.r.readx(4))) + case simpleVdPosInt + 3: + ui = uint64(bigen.Uint64(d.r.readx(8))) + case simpleVdNegInt: + ui = uint64(d.r.readn1()) + neg = true + case simpleVdNegInt + 1: + ui = uint64(bigen.Uint16(d.r.readx(2))) + neg = true + case simpleVdNegInt + 2: + ui = uint64(bigen.Uint32(d.r.readx(4))) + neg = true + case simpleVdNegInt + 3: + ui = uint64(bigen.Uint64(d.r.readx(8))) + neg = true + default: + d.d.errorf("decIntAny: Integer only valid from pos/neg integer1..8. Invalid descriptor: %v", d.bd) + return + } + // don't do this check, because callers may only want the unsigned value. + // if ui > math.MaxInt64 { + // d.d.errorf("decIntAny: Integer out of range for signed int64: %v", ui) + // return + // } + return +} + +func (d *simpleDecDriver) DecodeInt(bitsize uint8) (i int64) { + ui, neg := d.decCheckInteger() + i, overflow := chkOvf.SignedInt(ui) + if overflow { + d.d.errorf("simple: overflow converting %v to signed integer", ui) + return + } + if neg { + i = -i + } + if chkOvf.Int(i, bitsize) { + d.d.errorf("simple: overflow integer: %v", i) + return + } + d.bdRead = false + return +} + +func (d *simpleDecDriver) DecodeUint(bitsize uint8) (ui uint64) { + ui, neg := d.decCheckInteger() + if neg { + d.d.errorf("Assigning negative signed value to unsigned type") + return + } + if chkOvf.Uint(ui, bitsize) { + d.d.errorf("simple: overflow integer: %v", ui) + return + } + d.bdRead = false + return +} + +func (d *simpleDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == simpleVdFloat32 { + f = float64(math.Float32frombits(bigen.Uint32(d.r.readx(4)))) + } else if d.bd == simpleVdFloat64 { + f = math.Float64frombits(bigen.Uint64(d.r.readx(8))) + } else { + if d.bd >= simpleVdPosInt && d.bd <= simpleVdNegInt+3 { + f = float64(d.DecodeInt(64)) + } else { + d.d.errorf("Float only valid from float32/64: Invalid descriptor: %v", d.bd) + return + } + } + if chkOverflow32 && chkOvf.Float32(f) { + d.d.errorf("msgpack: float32 overflow: %v", f) + return + } + d.bdRead = false + return +} + +// bool can be decoded from bool only (single byte). +func (d *simpleDecDriver) DecodeBool() (b bool) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == simpleVdTrue { + b = true + } else if d.bd == simpleVdFalse { + } else { + d.d.errorf("Invalid single-byte value for bool: %s: %x", msgBadDesc, d.bd) + return + } + d.bdRead = false + return +} + +func (d *simpleDecDriver) ReadMapStart() (length int) { + d.bdRead = false + return d.decLen() +} + +func (d *simpleDecDriver) ReadArrayStart() (length int) { + d.bdRead = false + return d.decLen() +} + +func (d *simpleDecDriver) decLen() int { + switch d.bd % 8 { + case 0: + return 0 + case 1: + return int(d.r.readn1()) + case 2: + return int(bigen.Uint16(d.r.readx(2))) + case 3: + ui := uint64(bigen.Uint32(d.r.readx(4))) + if chkOvf.Uint(ui, intBitsize) { + d.d.errorf("simple: overflow integer: %v", ui) + return 0 + } + return int(ui) + case 4: + ui := bigen.Uint64(d.r.readx(8)) + if chkOvf.Uint(ui, intBitsize) { + d.d.errorf("simple: overflow integer: %v", ui) + return 0 + } + return int(ui) + } + d.d.errorf("decLen: Cannot read length: bd%8 must be in range 0..4. Got: %d", d.bd%8) + return -1 +} + +func (d *simpleDecDriver) DecodeString() (s string) { + return string(d.DecodeBytes(d.b[:], true, true)) +} + +func (d *simpleDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == simpleVdNil { + d.bdRead = false + return + } + clen := d.decLen() + d.bdRead = false + if zerocopy { + if d.br { + return d.r.readx(clen) + } else if len(bs) == 0 { + bs = d.b[:] + } + } + return decByteSlice(d.r, clen, bs) +} + +func (d *simpleDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) { + if xtag > 0xff { + d.d.errorf("decodeExt: tag must be <= 0xff; got: %v", xtag) + return + } + realxtag1, xbs := d.decodeExtV(ext != nil, uint8(xtag)) + realxtag = uint64(realxtag1) + if ext == nil { + re := rv.(*RawExt) + re.Tag = realxtag + re.Data = detachZeroCopyBytes(d.br, re.Data, xbs) + } else { + ext.ReadExt(rv, xbs) + } + return +} + +func (d *simpleDecDriver) decodeExtV(verifyTag bool, tag byte) (xtag byte, xbs []byte) { + if !d.bdRead { + d.readNextBd() + } + switch d.bd { + case simpleVdExt, simpleVdExt + 1, simpleVdExt + 2, simpleVdExt + 3, simpleVdExt + 4: + l := d.decLen() + xtag = d.r.readn1() + if verifyTag && xtag != tag { + d.d.errorf("Wrong extension tag. Got %b. Expecting: %v", xtag, tag) + return + } + xbs = d.r.readx(l) + case simpleVdByteArray, simpleVdByteArray + 1, simpleVdByteArray + 2, simpleVdByteArray + 3, simpleVdByteArray + 4: + xbs = d.DecodeBytes(nil, false, true) + default: + d.d.errorf("Invalid d.bd for extensions (Expecting extensions or byte array). Got: 0x%x", d.bd) + return + } + d.bdRead = false + return +} + +func (d *simpleDecDriver) DecodeNaked() { + if !d.bdRead { + d.readNextBd() + } + + n := &d.d.n + var decodeFurther bool + + switch d.bd { + case simpleVdNil: + n.v = valueTypeNil + case simpleVdFalse: + n.v = valueTypeBool + n.b = false + case simpleVdTrue: + n.v = valueTypeBool + n.b = true + case simpleVdPosInt, simpleVdPosInt + 1, simpleVdPosInt + 2, simpleVdPosInt + 3: + if d.h.SignedInteger { + n.v = valueTypeInt + n.i = d.DecodeInt(64) + } else { + n.v = valueTypeUint + n.u = d.DecodeUint(64) + } + case simpleVdNegInt, simpleVdNegInt + 1, simpleVdNegInt + 2, simpleVdNegInt + 3: + n.v = valueTypeInt + n.i = d.DecodeInt(64) + case simpleVdFloat32: + n.v = valueTypeFloat + n.f = d.DecodeFloat(true) + case simpleVdFloat64: + n.v = valueTypeFloat + n.f = d.DecodeFloat(false) + case simpleVdString, simpleVdString + 1, simpleVdString + 2, simpleVdString + 3, simpleVdString + 4: + n.v = valueTypeString + n.s = d.DecodeString() + case simpleVdByteArray, simpleVdByteArray + 1, simpleVdByteArray + 2, simpleVdByteArray + 3, simpleVdByteArray + 4: + n.v = valueTypeBytes + n.l = d.DecodeBytes(nil, false, false) + case simpleVdExt, simpleVdExt + 1, simpleVdExt + 2, simpleVdExt + 3, simpleVdExt + 4: + n.v = valueTypeExt + l := d.decLen() + n.u = uint64(d.r.readn1()) + n.l = d.r.readx(l) + case simpleVdArray, simpleVdArray + 1, simpleVdArray + 2, simpleVdArray + 3, simpleVdArray + 4: + n.v = valueTypeArray + decodeFurther = true + case simpleVdMap, simpleVdMap + 1, simpleVdMap + 2, simpleVdMap + 3, simpleVdMap + 4: + n.v = valueTypeMap + decodeFurther = true + default: + d.d.errorf("decodeNaked: Unrecognized d.bd: 0x%x", d.bd) + } + + if !decodeFurther { + d.bdRead = false + } + return +} + +//------------------------------------ + +// SimpleHandle is a Handle for a very simple encoding format. +// +// simple is a simplistic codec similar to binc, but not as compact. +// - Encoding of a value is always preceeded by the descriptor byte (bd) +// - True, false, nil are encoded fully in 1 byte (the descriptor) +// - Integers (intXXX, uintXXX) are encoded in 1, 2, 4 or 8 bytes (plus a descriptor byte). +// There are positive (uintXXX and intXXX >= 0) and negative (intXXX < 0) integers. +// - Floats are encoded in 4 or 8 bytes (plus a descriptor byte) +// - Lenght of containers (strings, bytes, array, map, extensions) +// are encoded in 0, 1, 2, 4 or 8 bytes. +// Zero-length containers have no length encoded. +// For others, the number of bytes is given by pow(2, bd%3) +// - maps are encoded as [bd] [length] [[key][value]]... +// - arrays are encoded as [bd] [length] [value]... +// - extensions are encoded as [bd] [length] [tag] [byte]... +// - strings/bytearrays are encoded as [bd] [length] [byte]... +// +// The full spec will be published soon. +type SimpleHandle struct { + BasicHandle + binaryEncodingType +} + +func (h *SimpleHandle) SetBytesExt(rt reflect.Type, tag uint64, ext BytesExt) (err error) { + return h.SetExt(rt, tag, &setExtWrapper{b: ext}) +} + +func (h *SimpleHandle) newEncDriver(e *Encoder) encDriver { + return &simpleEncDriver{e: e, w: e.w, h: h} +} + +func (h *SimpleHandle) newDecDriver(d *Decoder) decDriver { + return &simpleDecDriver{d: d, r: d.r, h: h, br: d.bytes} +} + +func (e *simpleEncDriver) reset() { + e.w = e.e.w +} + +func (d *simpleDecDriver) reset() { + d.r = d.d.r +} + +var _ decDriver = (*simpleDecDriver)(nil) +var _ encDriver = (*simpleEncDriver)(nil) diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/test.py b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/test.py new file mode 100755 index 0000000000000..dfe3b0c9a0749 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/test.py @@ -0,0 +1,120 @@ +#!/usr/bin/env python + +# This will create golden files in a directory passed to it. +# A Test calls this internally to create the golden files +# So it can process them (so we don't have to checkin the files). + +# Ensure msgpack-python and cbor are installed first, using: +# sudo apt-get install python-dev +# sudo apt-get install python-pip +# pip install --user msgpack-python msgpack-rpc-python cbor + +import cbor, msgpack, msgpackrpc, sys, os, threading + +def get_test_data_list(): + # get list with all primitive types, and a combo type + l0 = [ + -8, + -1616, + -32323232, + -6464646464646464, + 192, + 1616, + 32323232, + 6464646464646464, + 192, + -3232.0, + -6464646464.0, + 3232.0, + 6464646464.0, + False, + True, + None, + u"someday", + u"", + u"bytestring", + 1328176922000002000, + -2206187877999998000, + 270, + -2013855847999995777, + #-6795364578871345152, + ] + l1 = [ + { "true": True, + "false": False }, + { "true": "True", + "false": False, + "uint16(1616)": 1616 }, + { "list": [1616, 32323232, True, -3232.0, {"TRUE":True, "FALSE":False}, [True, False] ], + "int32":32323232, "bool": True, + "LONG STRING": "123456789012345678901234567890123456789012345678901234567890", + "SHORT STRING": "1234567890" }, + { True: "true", 8: False, "false": 0 } + ] + + l = [] + l.extend(l0) + l.append(l0) + l.extend(l1) + return l + +def build_test_data(destdir): + l = get_test_data_list() + for i in range(len(l)): + # packer = msgpack.Packer() + serialized = msgpack.dumps(l[i]) + f = open(os.path.join(destdir, str(i) + '.msgpack.golden'), 'wb') + f.write(serialized) + f.close() + serialized = cbor.dumps(l[i]) + f = open(os.path.join(destdir, str(i) + '.cbor.golden'), 'wb') + f.write(serialized) + f.close() + +def doRpcServer(port, stopTimeSec): + class EchoHandler(object): + def Echo123(self, msg1, msg2, msg3): + return ("1:%s 2:%s 3:%s" % (msg1, msg2, msg3)) + def EchoStruct(self, msg): + return ("%s" % msg) + + addr = msgpackrpc.Address('localhost', port) + server = msgpackrpc.Server(EchoHandler()) + server.listen(addr) + # run thread to stop it after stopTimeSec seconds if > 0 + if stopTimeSec > 0: + def myStopRpcServer(): + server.stop() + t = threading.Timer(stopTimeSec, myStopRpcServer) + t.start() + server.start() + +def doRpcClientToPythonSvc(port): + address = msgpackrpc.Address('localhost', port) + client = msgpackrpc.Client(address, unpack_encoding='utf-8') + print client.call("Echo123", "A1", "B2", "C3") + print client.call("EchoStruct", {"A" :"Aa", "B":"Bb", "C":"Cc"}) + +def doRpcClientToGoSvc(port): + # print ">>>> port: ", port, " <<<<<" + address = msgpackrpc.Address('localhost', port) + client = msgpackrpc.Client(address, unpack_encoding='utf-8') + print client.call("TestRpcInt.Echo123", ["A1", "B2", "C3"]) + print client.call("TestRpcInt.EchoStruct", {"A" :"Aa", "B":"Bb", "C":"Cc"}) + +def doMain(args): + if len(args) == 2 and args[0] == "testdata": + build_test_data(args[1]) + elif len(args) == 3 and args[0] == "rpc-server": + doRpcServer(int(args[1]), int(args[2])) + elif len(args) == 2 and args[0] == "rpc-client-python-service": + doRpcClientToPythonSvc(int(args[1])) + elif len(args) == 2 and args[0] == "rpc-client-go-service": + doRpcClientToGoSvc(int(args[1])) + else: + print("Usage: test.py " + + "[testdata|rpc-server|rpc-client-python-service|rpc-client-go-service] ...") + +if __name__ == "__main__": + doMain(sys.argv[1:]) + diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/time.go b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/time.go new file mode 100644 index 0000000000000..fc4c63e1defcc --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/github.com/ugorji/go/codec/time.go @@ -0,0 +1,222 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "fmt" + "time" +) + +var ( + timeDigits = [...]byte{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'} +) + +type timeExt struct{} + +func (x timeExt) WriteExt(v interface{}) (bs []byte) { + switch v2 := v.(type) { + case time.Time: + bs = encodeTime(v2) + case *time.Time: + bs = encodeTime(*v2) + default: + panic(fmt.Errorf("unsupported format for time conversion: expecting time.Time; got %T", v2)) + } + return +} +func (x timeExt) ReadExt(v interface{}, bs []byte) { + tt, err := decodeTime(bs) + if err != nil { + panic(err) + } + *(v.(*time.Time)) = tt +} + +func (x timeExt) ConvertExt(v interface{}) interface{} { + return x.WriteExt(v) +} +func (x timeExt) UpdateExt(v interface{}, src interface{}) { + x.ReadExt(v, src.([]byte)) +} + +// EncodeTime encodes a time.Time as a []byte, including +// information on the instant in time and UTC offset. +// +// Format Description +// +// A timestamp is composed of 3 components: +// +// - secs: signed integer representing seconds since unix epoch +// - nsces: unsigned integer representing fractional seconds as a +// nanosecond offset within secs, in the range 0 <= nsecs < 1e9 +// - tz: signed integer representing timezone offset in minutes east of UTC, +// and a dst (daylight savings time) flag +// +// When encoding a timestamp, the first byte is the descriptor, which +// defines which components are encoded and how many bytes are used to +// encode secs and nsecs components. *If secs/nsecs is 0 or tz is UTC, it +// is not encoded in the byte array explicitly*. +// +// Descriptor 8 bits are of the form `A B C DDD EE`: +// A: Is secs component encoded? 1 = true +// B: Is nsecs component encoded? 1 = true +// C: Is tz component encoded? 1 = true +// DDD: Number of extra bytes for secs (range 0-7). +// If A = 1, secs encoded in DDD+1 bytes. +// If A = 0, secs is not encoded, and is assumed to be 0. +// If A = 1, then we need at least 1 byte to encode secs. +// DDD says the number of extra bytes beyond that 1. +// E.g. if DDD=0, then secs is represented in 1 byte. +// if DDD=2, then secs is represented in 3 bytes. +// EE: Number of extra bytes for nsecs (range 0-3). +// If B = 1, nsecs encoded in EE+1 bytes (similar to secs/DDD above) +// +// Following the descriptor bytes, subsequent bytes are: +// +// secs component encoded in `DDD + 1` bytes (if A == 1) +// nsecs component encoded in `EE + 1` bytes (if B == 1) +// tz component encoded in 2 bytes (if C == 1) +// +// secs and nsecs components are integers encoded in a BigEndian +// 2-complement encoding format. +// +// tz component is encoded as 2 bytes (16 bits). Most significant bit 15 to +// Least significant bit 0 are described below: +// +// Timezone offset has a range of -12:00 to +14:00 (ie -720 to +840 minutes). +// Bit 15 = have\_dst: set to 1 if we set the dst flag. +// Bit 14 = dst\_on: set to 1 if dst is in effect at the time, or 0 if not. +// Bits 13..0 = timezone offset in minutes. It is a signed integer in Big Endian format. +// +func encodeTime(t time.Time) []byte { + //t := rv.Interface().(time.Time) + tsecs, tnsecs := t.Unix(), t.Nanosecond() + var ( + bd byte + btmp [8]byte + bs [16]byte + i int = 1 + ) + l := t.Location() + if l == time.UTC { + l = nil + } + if tsecs != 0 { + bd = bd | 0x80 + bigen.PutUint64(btmp[:], uint64(tsecs)) + f := pruneSignExt(btmp[:], tsecs >= 0) + bd = bd | (byte(7-f) << 2) + copy(bs[i:], btmp[f:]) + i = i + (8 - f) + } + if tnsecs != 0 { + bd = bd | 0x40 + bigen.PutUint32(btmp[:4], uint32(tnsecs)) + f := pruneSignExt(btmp[:4], true) + bd = bd | byte(3-f) + copy(bs[i:], btmp[f:4]) + i = i + (4 - f) + } + if l != nil { + bd = bd | 0x20 + // Note that Go Libs do not give access to dst flag. + _, zoneOffset := t.Zone() + //zoneName, zoneOffset := t.Zone() + zoneOffset /= 60 + z := uint16(zoneOffset) + bigen.PutUint16(btmp[:2], z) + // clear dst flags + bs[i] = btmp[0] & 0x3f + bs[i+1] = btmp[1] + i = i + 2 + } + bs[0] = bd + return bs[0:i] +} + +// DecodeTime decodes a []byte into a time.Time. +func decodeTime(bs []byte) (tt time.Time, err error) { + bd := bs[0] + var ( + tsec int64 + tnsec uint32 + tz uint16 + i byte = 1 + i2 byte + n byte + ) + if bd&(1<<7) != 0 { + var btmp [8]byte + n = ((bd >> 2) & 0x7) + 1 + i2 = i + n + copy(btmp[8-n:], bs[i:i2]) + //if first bit of bs[i] is set, then fill btmp[0..8-n] with 0xff (ie sign extend it) + if bs[i]&(1<<7) != 0 { + copy(btmp[0:8-n], bsAll0xff) + //for j,k := byte(0), 8-n; j < k; j++ { btmp[j] = 0xff } + } + i = i2 + tsec = int64(bigen.Uint64(btmp[:])) + } + if bd&(1<<6) != 0 { + var btmp [4]byte + n = (bd & 0x3) + 1 + i2 = i + n + copy(btmp[4-n:], bs[i:i2]) + i = i2 + tnsec = bigen.Uint32(btmp[:]) + } + if bd&(1<<5) == 0 { + tt = time.Unix(tsec, int64(tnsec)).UTC() + return + } + // In stdlib time.Parse, when a date is parsed without a zone name, it uses "" as zone name. + // However, we need name here, so it can be shown when time is printed. + // Zone name is in form: UTC-08:00. + // Note that Go Libs do not give access to dst flag, so we ignore dst bits + + i2 = i + 2 + tz = bigen.Uint16(bs[i:i2]) + i = i2 + // sign extend sign bit into top 2 MSB (which were dst bits): + if tz&(1<<13) == 0 { // positive + tz = tz & 0x3fff //clear 2 MSBs: dst bits + } else { // negative + tz = tz | 0xc000 //set 2 MSBs: dst bits + //tzname[3] = '-' (TODO: verify. this works here) + } + tzint := int16(tz) + if tzint == 0 { + tt = time.Unix(tsec, int64(tnsec)).UTC() + } else { + // For Go Time, do not use a descriptive timezone. + // It's unnecessary, and makes it harder to do a reflect.DeepEqual. + // The Offset already tells what the offset should be, if not on UTC and unknown zone name. + // var zoneName = timeLocUTCName(tzint) + tt = time.Unix(tsec, int64(tnsec)).In(time.FixedZone("", int(tzint)*60)) + } + return +} + +func timeLocUTCName(tzint int16) string { + if tzint == 0 { + return "UTC" + } + var tzname = []byte("UTC+00:00") + //tzname := fmt.Sprintf("UTC%s%02d:%02d", tzsign, tz/60, tz%60) //perf issue using Sprintf. inline below. + //tzhr, tzmin := tz/60, tz%60 //faster if u convert to int first + var tzhr, tzmin int16 + if tzint < 0 { + tzname[3] = '-' // (TODO: verify. this works here) + tzhr, tzmin = -tzint/60, (-tzint)%60 + } else { + tzhr, tzmin = tzint/60, tzint%60 + } + tzname[4] = timeDigits[tzhr/10] + tzname[5] = timeDigits[tzhr%10] + tzname[7] = timeDigits[tzmin/10] + tzname[8] = timeDigits[tzmin%10] + return string(tzname) + //return time.FixedZone(string(tzname), int(tzint)*60) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/LICENSE b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/LICENSE new file mode 100644 index 0000000000000..6a66aea5eafe0 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/LICENSE @@ -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. diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/PATENTS b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/PATENTS new file mode 100644 index 0000000000000..733099041f84f --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/context/context.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/context/context.go new file mode 100644 index 0000000000000..ea1a7cd53a12e --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/context/context.go @@ -0,0 +1,156 @@ +// 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. + +// Package context defines the Context type, which carries deadlines, +// cancelation signals, and other request-scoped values across API boundaries +// and between processes. +// +// Incoming requests to a server should create a Context, and outgoing calls to +// servers should accept a Context. The chain of function calls between must +// propagate the Context, optionally replacing it with a modified copy created +// using WithDeadline, WithTimeout, WithCancel, or WithValue. +// +// Programs that use Contexts should follow these rules to keep interfaces +// consistent across packages and enable static analysis tools to check context +// propagation: +// +// Do not store Contexts inside a struct type; instead, pass a Context +// explicitly to each function that needs it. The Context should be the first +// parameter, typically named ctx: +// +// func DoSomething(ctx context.Context, arg Arg) error { +// // ... use ctx ... +// } +// +// Do not pass a nil Context, even if a function permits it. Pass context.TODO +// if you are unsure about which Context to use. +// +// Use context Values only for request-scoped data that transits processes and +// APIs, not for passing optional parameters to functions. +// +// The same Context may be passed to functions running in different goroutines; +// Contexts are safe for simultaneous use by multiple goroutines. +// +// See http://blog.golang.org/context for example code for a server that uses +// Contexts. +package context + +import "time" + +// A Context carries a deadline, a cancelation signal, and other values across +// API boundaries. +// +// Context's methods may be called by multiple goroutines simultaneously. +type Context interface { + // Deadline returns the time when work done on behalf of this context + // should be canceled. Deadline returns ok==false when no deadline is + // set. Successive calls to Deadline return the same results. + Deadline() (deadline time.Time, ok bool) + + // Done returns a channel that's closed when work done on behalf of this + // context should be canceled. Done may return nil if this context can + // never be canceled. Successive calls to Done return the same value. + // + // WithCancel arranges for Done to be closed when cancel is called; + // WithDeadline arranges for Done to be closed when the deadline + // expires; WithTimeout arranges for Done to be closed when the timeout + // elapses. + // + // Done is provided for use in select statements: + // + // // Stream generates values with DoSomething and sends them to out + // // until DoSomething returns an error or ctx.Done is closed. + // func Stream(ctx context.Context, out chan<- Value) error { + // for { + // v, err := DoSomething(ctx) + // if err != nil { + // return err + // } + // select { + // case <-ctx.Done(): + // return ctx.Err() + // case out <- v: + // } + // } + // } + // + // See http://blog.golang.org/pipelines for more examples of how to use + // a Done channel for cancelation. + Done() <-chan struct{} + + // Err returns a non-nil error value after Done is closed. Err returns + // Canceled if the context was canceled or DeadlineExceeded if the + // context's deadline passed. No other values for Err are defined. + // After Done is closed, successive calls to Err return the same value. + Err() error + + // Value returns the value associated with this context for key, or nil + // if no value is associated with key. Successive calls to Value with + // the same key returns the same result. + // + // Use context values only for request-scoped data that transits + // processes and API boundaries, not for passing optional parameters to + // functions. + // + // A key identifies a specific value in a Context. Functions that wish + // to store values in Context typically allocate a key in a global + // variable then use that key as the argument to context.WithValue and + // Context.Value. A key can be any type that supports equality; + // packages should define keys as an unexported type to avoid + // collisions. + // + // Packages that define a Context key should provide type-safe accessors + // for the values stores using that key: + // + // // Package user defines a User type that's stored in Contexts. + // package user + // + // import "golang.org/x/net/context" + // + // // User is the type of value stored in the Contexts. + // type User struct {...} + // + // // key is an unexported type for keys defined in this package. + // // This prevents collisions with keys defined in other packages. + // type key int + // + // // userKey is the key for user.User values in Contexts. It is + // // unexported; clients use user.NewContext and user.FromContext + // // instead of using this key directly. + // var userKey key = 0 + // + // // NewContext returns a new Context that carries value u. + // func NewContext(ctx context.Context, u *User) context.Context { + // return context.WithValue(ctx, userKey, u) + // } + // + // // FromContext returns the User value stored in ctx, if any. + // func FromContext(ctx context.Context) (*User, bool) { + // u, ok := ctx.Value(userKey).(*User) + // return u, ok + // } + Value(key interface{}) interface{} +} + +// Background returns a non-nil, empty Context. It is never canceled, has no +// values, and has no deadline. It is typically used by the main function, +// initialization, and tests, and as the top-level Context for incoming +// requests. +func Background() Context { + return background +} + +// TODO returns a non-nil, empty Context. Code should use context.TODO when +// it's unclear which Context to use or it is not yet available (because the +// surrounding function has not yet been extended to accept a Context +// parameter). TODO is recognized by static analysis tools that determine +// whether Contexts are propagated correctly in a program. +func TODO() Context { + return todo +} + +// A CancelFunc tells an operation to abandon its work. +// A CancelFunc does not wait for the work to stop. +// After the first call, subsequent calls to a CancelFunc do nothing. +type CancelFunc func() diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/context/go17.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/context/go17.go new file mode 100644 index 0000000000000..f8cda19adaee9 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/context/go17.go @@ -0,0 +1,72 @@ +// Copyright 2016 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 go1.7 + +package context + +import ( + "context" // standard library's context, as of Go 1.7 + "time" +) + +var ( + todo = context.TODO() + background = context.Background() +) + +// Canceled is the error returned by Context.Err when the context is canceled. +var Canceled = context.Canceled + +// DeadlineExceeded is the error returned by Context.Err when the context's +// deadline passes. +var DeadlineExceeded = context.DeadlineExceeded + +// WithCancel returns a copy of parent with a new Done channel. The returned +// context's Done channel is closed when the returned cancel function is called +// or when the parent context's Done channel is closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithCancel(parent Context) (ctx Context, cancel CancelFunc) { + ctx, f := context.WithCancel(parent) + return ctx, CancelFunc(f) +} + +// WithDeadline returns a copy of the parent context with the deadline adjusted +// to be no later than d. If the parent's deadline is already earlier than d, +// WithDeadline(parent, d) is semantically equivalent to parent. The returned +// context's Done channel is closed when the deadline expires, when the returned +// cancel function is called, or when the parent context's Done channel is +// closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) { + ctx, f := context.WithDeadline(parent, deadline) + return ctx, CancelFunc(f) +} + +// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)). +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete: +// +// func slowOperationWithTimeout(ctx context.Context) (Result, error) { +// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond) +// defer cancel() // releases resources if slowOperation completes before timeout elapses +// return slowOperation(ctx) +// } +func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) { + return WithDeadline(parent, time.Now().Add(timeout)) +} + +// WithValue returns a copy of parent in which the value associated with key is +// val. +// +// Use context Values only for request-scoped data that transits processes and +// APIs, not for passing optional parameters to functions. +func WithValue(parent Context, key interface{}, val interface{}) Context { + return context.WithValue(parent, key, val) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/context/pre_go17.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/context/pre_go17.go new file mode 100644 index 0000000000000..5a30acabd03c3 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/context/pre_go17.go @@ -0,0 +1,300 @@ +// 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 !go1.7 + +package context + +import ( + "errors" + "fmt" + "sync" + "time" +) + +// An emptyCtx is never canceled, has no values, and has no deadline. It is not +// struct{}, since vars of this type must have distinct addresses. +type emptyCtx int + +func (*emptyCtx) Deadline() (deadline time.Time, ok bool) { + return +} + +func (*emptyCtx) Done() <-chan struct{} { + return nil +} + +func (*emptyCtx) Err() error { + return nil +} + +func (*emptyCtx) Value(key interface{}) interface{} { + return nil +} + +func (e *emptyCtx) String() string { + switch e { + case background: + return "context.Background" + case todo: + return "context.TODO" + } + return "unknown empty Context" +} + +var ( + background = new(emptyCtx) + todo = new(emptyCtx) +) + +// Canceled is the error returned by Context.Err when the context is canceled. +var Canceled = errors.New("context canceled") + +// DeadlineExceeded is the error returned by Context.Err when the context's +// deadline passes. +var DeadlineExceeded = errors.New("context deadline exceeded") + +// WithCancel returns a copy of parent with a new Done channel. The returned +// context's Done channel is closed when the returned cancel function is called +// or when the parent context's Done channel is closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithCancel(parent Context) (ctx Context, cancel CancelFunc) { + c := newCancelCtx(parent) + propagateCancel(parent, c) + return c, func() { c.cancel(true, Canceled) } +} + +// newCancelCtx returns an initialized cancelCtx. +func newCancelCtx(parent Context) *cancelCtx { + return &cancelCtx{ + Context: parent, + done: make(chan struct{}), + } +} + +// propagateCancel arranges for child to be canceled when parent is. +func propagateCancel(parent Context, child canceler) { + if parent.Done() == nil { + return // parent is never canceled + } + if p, ok := parentCancelCtx(parent); ok { + p.mu.Lock() + if p.err != nil { + // parent has already been canceled + child.cancel(false, p.err) + } else { + if p.children == nil { + p.children = make(map[canceler]bool) + } + p.children[child] = true + } + p.mu.Unlock() + } else { + go func() { + select { + case <-parent.Done(): + child.cancel(false, parent.Err()) + case <-child.Done(): + } + }() + } +} + +// parentCancelCtx follows a chain of parent references until it finds a +// *cancelCtx. This function understands how each of the concrete types in this +// package represents its parent. +func parentCancelCtx(parent Context) (*cancelCtx, bool) { + for { + switch c := parent.(type) { + case *cancelCtx: + return c, true + case *timerCtx: + return c.cancelCtx, true + case *valueCtx: + parent = c.Context + default: + return nil, false + } + } +} + +// removeChild removes a context from its parent. +func removeChild(parent Context, child canceler) { + p, ok := parentCancelCtx(parent) + if !ok { + return + } + p.mu.Lock() + if p.children != nil { + delete(p.children, child) + } + p.mu.Unlock() +} + +// A canceler is a context type that can be canceled directly. The +// implementations are *cancelCtx and *timerCtx. +type canceler interface { + cancel(removeFromParent bool, err error) + Done() <-chan struct{} +} + +// A cancelCtx can be canceled. When canceled, it also cancels any children +// that implement canceler. +type cancelCtx struct { + Context + + done chan struct{} // closed by the first cancel call. + + mu sync.Mutex + children map[canceler]bool // set to nil by the first cancel call + err error // set to non-nil by the first cancel call +} + +func (c *cancelCtx) Done() <-chan struct{} { + return c.done +} + +func (c *cancelCtx) Err() error { + c.mu.Lock() + defer c.mu.Unlock() + return c.err +} + +func (c *cancelCtx) String() string { + return fmt.Sprintf("%v.WithCancel", c.Context) +} + +// cancel closes c.done, cancels each of c's children, and, if +// removeFromParent is true, removes c from its parent's children. +func (c *cancelCtx) cancel(removeFromParent bool, err error) { + if err == nil { + panic("context: internal error: missing cancel error") + } + c.mu.Lock() + if c.err != nil { + c.mu.Unlock() + return // already canceled + } + c.err = err + close(c.done) + for child := range c.children { + // NOTE: acquiring the child's lock while holding parent's lock. + child.cancel(false, err) + } + c.children = nil + c.mu.Unlock() + + if removeFromParent { + removeChild(c.Context, c) + } +} + +// WithDeadline returns a copy of the parent context with the deadline adjusted +// to be no later than d. If the parent's deadline is already earlier than d, +// WithDeadline(parent, d) is semantically equivalent to parent. The returned +// context's Done channel is closed when the deadline expires, when the returned +// cancel function is called, or when the parent context's Done channel is +// closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) { + if cur, ok := parent.Deadline(); ok && cur.Before(deadline) { + // The current deadline is already sooner than the new one. + return WithCancel(parent) + } + c := &timerCtx{ + cancelCtx: newCancelCtx(parent), + deadline: deadline, + } + propagateCancel(parent, c) + d := deadline.Sub(time.Now()) + if d <= 0 { + c.cancel(true, DeadlineExceeded) // deadline has already passed + return c, func() { c.cancel(true, Canceled) } + } + c.mu.Lock() + defer c.mu.Unlock() + if c.err == nil { + c.timer = time.AfterFunc(d, func() { + c.cancel(true, DeadlineExceeded) + }) + } + return c, func() { c.cancel(true, Canceled) } +} + +// A timerCtx carries a timer and a deadline. It embeds a cancelCtx to +// implement Done and Err. It implements cancel by stopping its timer then +// delegating to cancelCtx.cancel. +type timerCtx struct { + *cancelCtx + timer *time.Timer // Under cancelCtx.mu. + + deadline time.Time +} + +func (c *timerCtx) Deadline() (deadline time.Time, ok bool) { + return c.deadline, true +} + +func (c *timerCtx) String() string { + return fmt.Sprintf("%v.WithDeadline(%s [%s])", c.cancelCtx.Context, c.deadline, c.deadline.Sub(time.Now())) +} + +func (c *timerCtx) cancel(removeFromParent bool, err error) { + c.cancelCtx.cancel(false, err) + if removeFromParent { + // Remove this timerCtx from its parent cancelCtx's children. + removeChild(c.cancelCtx.Context, c) + } + c.mu.Lock() + if c.timer != nil { + c.timer.Stop() + c.timer = nil + } + c.mu.Unlock() +} + +// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)). +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete: +// +// func slowOperationWithTimeout(ctx context.Context) (Result, error) { +// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond) +// defer cancel() // releases resources if slowOperation completes before timeout elapses +// return slowOperation(ctx) +// } +func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) { + return WithDeadline(parent, time.Now().Add(timeout)) +} + +// WithValue returns a copy of parent in which the value associated with key is +// val. +// +// Use context Values only for request-scoped data that transits processes and +// APIs, not for passing optional parameters to functions. +func WithValue(parent Context, key interface{}, val interface{}) Context { + return &valueCtx{parent, key, val} +} + +// A valueCtx carries a key-value pair. It implements Value for that key and +// delegates all other calls to the embedded Context. +type valueCtx struct { + Context + key, val interface{} +} + +func (c *valueCtx) String() string { + return fmt.Sprintf("%v.WithValue(%#v, %#v)", c.Context, c.key, c.val) +} + +func (c *valueCtx) Value(key interface{}) interface{} { + if c.key == key { + return c.val + } + return c.Context.Value(key) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/.gitignore b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/.gitignore new file mode 100644 index 0000000000000..190f12234adf8 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/.gitignore @@ -0,0 +1,2 @@ +*~ +h2i/h2i diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/Dockerfile b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/Dockerfile new file mode 100644 index 0000000000000..53fc525797445 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/Dockerfile @@ -0,0 +1,51 @@ +# +# This Dockerfile builds a recent curl with HTTP/2 client support, using +# a recent nghttp2 build. +# +# See the Makefile for how to tag it. If Docker and that image is found, the +# Go tests use this curl binary for integration tests. +# + +FROM ubuntu:trusty + +RUN apt-get update && \ + apt-get upgrade -y && \ + apt-get install -y git-core build-essential wget + +RUN apt-get install -y --no-install-recommends \ + autotools-dev libtool pkg-config zlib1g-dev \ + libcunit1-dev libssl-dev libxml2-dev libevent-dev \ + automake autoconf + +# The list of packages nghttp2 recommends for h2load: +RUN apt-get install -y --no-install-recommends make binutils \ + autoconf automake autotools-dev \ + libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev \ + libev-dev libevent-dev libjansson-dev libjemalloc-dev \ + cython python3.4-dev python-setuptools + +# Note: setting NGHTTP2_VER before the git clone, so an old git clone isn't cached: +ENV NGHTTP2_VER 895da9a +RUN cd /root && git clone https://github.com/tatsuhiro-t/nghttp2.git + +WORKDIR /root/nghttp2 +RUN git reset --hard $NGHTTP2_VER +RUN autoreconf -i +RUN automake +RUN autoconf +RUN ./configure +RUN make +RUN make install + +WORKDIR /root +RUN wget http://curl.haxx.se/download/curl-7.45.0.tar.gz +RUN tar -zxvf curl-7.45.0.tar.gz +WORKDIR /root/curl-7.45.0 +RUN ./configure --with-ssl --with-nghttp2=/usr/local +RUN make +RUN make install +RUN ldconfig + +CMD ["-h"] +ENTRYPOINT ["/usr/local/bin/curl"] + diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/Makefile b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/Makefile new file mode 100644 index 0000000000000..55fd826f77bd9 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/Makefile @@ -0,0 +1,3 @@ +curlimage: + docker build -t gohttp2/curl . + diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/README b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/README new file mode 100644 index 0000000000000..360d5aa379057 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/README @@ -0,0 +1,20 @@ +This is a work-in-progress HTTP/2 implementation for Go. + +It will eventually live in the Go standard library and won't require +any changes to your code to use. It will just be automatic. + +Status: + +* The server support is pretty good. A few things are missing + but are being worked on. +* The client work has just started but shares a lot of code + is coming along much quicker. + +Docs are at https://godoc.org/golang.org/x/net/http2 + +Demo test server at https://http2.golang.org/ + +Help & bug reports welcome! + +Contributing: https://golang.org/doc/contribute.html +Bugs: https://golang.org/issue/new?title=x/net/http2:+ diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/client_conn_pool.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/client_conn_pool.go new file mode 100644 index 0000000000000..547e238a58585 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/client_conn_pool.go @@ -0,0 +1,255 @@ +// Copyright 2015 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. + +// Transport code's client connection pooling. + +package http2 + +import ( + "crypto/tls" + "net/http" + "sync" +) + +// ClientConnPool manages a pool of HTTP/2 client connections. +type ClientConnPool interface { + GetClientConn(req *http.Request, addr string) (*ClientConn, error) + MarkDead(*ClientConn) +} + +// clientConnPoolIdleCloser is the interface implemented by ClientConnPool +// implementations which can close their idle connections. +type clientConnPoolIdleCloser interface { + ClientConnPool + closeIdleConnections() +} + +var ( + _ clientConnPoolIdleCloser = (*clientConnPool)(nil) + _ clientConnPoolIdleCloser = noDialClientConnPool{} +) + +// TODO: use singleflight for dialing and addConnCalls? +type clientConnPool struct { + t *Transport + + mu sync.Mutex // TODO: maybe switch to RWMutex + // TODO: add support for sharing conns based on cert names + // (e.g. share conn for googleapis.com and appspot.com) + conns map[string][]*ClientConn // key is host:port + dialing map[string]*dialCall // currently in-flight dials + keys map[*ClientConn][]string + addConnCalls map[string]*addConnCall // in-flight addConnIfNeede calls +} + +func (p *clientConnPool) GetClientConn(req *http.Request, addr string) (*ClientConn, error) { + return p.getClientConn(req, addr, dialOnMiss) +} + +const ( + dialOnMiss = true + noDialOnMiss = false +) + +func (p *clientConnPool) getClientConn(req *http.Request, addr string, dialOnMiss bool) (*ClientConn, error) { + if req.Close && dialOnMiss { + // It gets its own connection. + cc, err := p.t.dialClientConn(addr) + if err != nil { + return nil, err + } + cc.singleUse = true + return cc, nil + } + p.mu.Lock() + for _, cc := range p.conns[addr] { + if cc.CanTakeNewRequest() { + p.mu.Unlock() + return cc, nil + } + } + if !dialOnMiss { + p.mu.Unlock() + return nil, ErrNoCachedConn + } + call := p.getStartDialLocked(addr) + p.mu.Unlock() + <-call.done + return call.res, call.err +} + +// dialCall is an in-flight Transport dial call to a host. +type dialCall struct { + p *clientConnPool + done chan struct{} // closed when done + res *ClientConn // valid after done is closed + err error // valid after done is closed +} + +// requires p.mu is held. +func (p *clientConnPool) getStartDialLocked(addr string) *dialCall { + if call, ok := p.dialing[addr]; ok { + // A dial is already in-flight. Don't start another. + return call + } + call := &dialCall{p: p, done: make(chan struct{})} + if p.dialing == nil { + p.dialing = make(map[string]*dialCall) + } + p.dialing[addr] = call + go call.dial(addr) + return call +} + +// run in its own goroutine. +func (c *dialCall) dial(addr string) { + c.res, c.err = c.p.t.dialClientConn(addr) + close(c.done) + + c.p.mu.Lock() + delete(c.p.dialing, addr) + if c.err == nil { + c.p.addConnLocked(addr, c.res) + } + c.p.mu.Unlock() +} + +// addConnIfNeeded makes a NewClientConn out of c if a connection for key doesn't +// already exist. It coalesces concurrent calls with the same key. +// This is used by the http1 Transport code when it creates a new connection. Because +// the http1 Transport doesn't de-dup TCP dials to outbound hosts (because it doesn't know +// the protocol), it can get into a situation where it has multiple TLS connections. +// This code decides which ones live or die. +// The return value used is whether c was used. +// c is never closed. +func (p *clientConnPool) addConnIfNeeded(key string, t *Transport, c *tls.Conn) (used bool, err error) { + p.mu.Lock() + for _, cc := range p.conns[key] { + if cc.CanTakeNewRequest() { + p.mu.Unlock() + return false, nil + } + } + call, dup := p.addConnCalls[key] + if !dup { + if p.addConnCalls == nil { + p.addConnCalls = make(map[string]*addConnCall) + } + call = &addConnCall{ + p: p, + done: make(chan struct{}), + } + p.addConnCalls[key] = call + go call.run(t, key, c) + } + p.mu.Unlock() + + <-call.done + if call.err != nil { + return false, call.err + } + return !dup, nil +} + +type addConnCall struct { + p *clientConnPool + done chan struct{} // closed when done + err error +} + +func (c *addConnCall) run(t *Transport, key string, tc *tls.Conn) { + cc, err := t.NewClientConn(tc) + + p := c.p + p.mu.Lock() + if err != nil { + c.err = err + } else { + p.addConnLocked(key, cc) + } + delete(p.addConnCalls, key) + p.mu.Unlock() + close(c.done) +} + +func (p *clientConnPool) addConn(key string, cc *ClientConn) { + p.mu.Lock() + p.addConnLocked(key, cc) + p.mu.Unlock() +} + +// p.mu must be held +func (p *clientConnPool) addConnLocked(key string, cc *ClientConn) { + for _, v := range p.conns[key] { + if v == cc { + return + } + } + if p.conns == nil { + p.conns = make(map[string][]*ClientConn) + } + if p.keys == nil { + p.keys = make(map[*ClientConn][]string) + } + p.conns[key] = append(p.conns[key], cc) + p.keys[cc] = append(p.keys[cc], key) +} + +func (p *clientConnPool) MarkDead(cc *ClientConn) { + p.mu.Lock() + defer p.mu.Unlock() + for _, key := range p.keys[cc] { + vv, ok := p.conns[key] + if !ok { + continue + } + newList := filterOutClientConn(vv, cc) + if len(newList) > 0 { + p.conns[key] = newList + } else { + delete(p.conns, key) + } + } + delete(p.keys, cc) +} + +func (p *clientConnPool) closeIdleConnections() { + p.mu.Lock() + defer p.mu.Unlock() + // TODO: don't close a cc if it was just added to the pool + // milliseconds ago and has never been used. There's currently + // a small race window with the HTTP/1 Transport's integration + // where it can add an idle conn just before using it, and + // somebody else can concurrently call CloseIdleConns and + // break some caller's RoundTrip. + for _, vv := range p.conns { + for _, cc := range vv { + cc.closeIfIdle() + } + } +} + +func filterOutClientConn(in []*ClientConn, exclude *ClientConn) []*ClientConn { + out := in[:0] + for _, v := range in { + if v != exclude { + out = append(out, v) + } + } + // If we filtered it out, zero out the last item to prevent + // the GC from seeing it. + if len(in) != len(out) { + in[len(in)-1] = nil + } + return out +} + +// noDialClientConnPool is an implementation of http2.ClientConnPool +// which never dials. We let the HTTP/1.1 client dial and use its TLS +// connection instead. +type noDialClientConnPool struct{ *clientConnPool } + +func (p noDialClientConnPool) GetClientConn(req *http.Request, addr string) (*ClientConn, error) { + return p.getClientConn(req, addr, noDialOnMiss) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/configure_transport.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/configure_transport.go new file mode 100644 index 0000000000000..4f720f530b009 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/configure_transport.go @@ -0,0 +1,80 @@ +// Copyright 2015 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 go1.6 + +package http2 + +import ( + "crypto/tls" + "fmt" + "net/http" +) + +func configureTransport(t1 *http.Transport) (*Transport, error) { + connPool := new(clientConnPool) + t2 := &Transport{ + ConnPool: noDialClientConnPool{connPool}, + t1: t1, + } + connPool.t = t2 + if err := registerHTTPSProtocol(t1, noDialH2RoundTripper{t2}); err != nil { + return nil, err + } + if t1.TLSClientConfig == nil { + t1.TLSClientConfig = new(tls.Config) + } + if !strSliceContains(t1.TLSClientConfig.NextProtos, "h2") { + t1.TLSClientConfig.NextProtos = append([]string{"h2"}, t1.TLSClientConfig.NextProtos...) + } + if !strSliceContains(t1.TLSClientConfig.NextProtos, "http/1.1") { + t1.TLSClientConfig.NextProtos = append(t1.TLSClientConfig.NextProtos, "http/1.1") + } + upgradeFn := func(authority string, c *tls.Conn) http.RoundTripper { + addr := authorityAddr("https", authority) + if used, err := connPool.addConnIfNeeded(addr, t2, c); err != nil { + go c.Close() + return erringRoundTripper{err} + } else if !used { + // Turns out we don't need this c. + // For example, two goroutines made requests to the same host + // at the same time, both kicking off TCP dials. (since protocol + // was unknown) + go c.Close() + } + return t2 + } + if m := t1.TLSNextProto; len(m) == 0 { + t1.TLSNextProto = map[string]func(string, *tls.Conn) http.RoundTripper{ + "h2": upgradeFn, + } + } else { + m["h2"] = upgradeFn + } + return t2, nil +} + +// registerHTTPSProtocol calls Transport.RegisterProtocol but +// convering panics into errors. +func registerHTTPSProtocol(t *http.Transport, rt http.RoundTripper) (err error) { + defer func() { + if e := recover(); e != nil { + err = fmt.Errorf("%v", e) + } + }() + t.RegisterProtocol("https", rt) + return nil +} + +// noDialH2RoundTripper is a RoundTripper which only tries to complete the request +// if there's already has a cached connection to the host. +type noDialH2RoundTripper struct{ t *Transport } + +func (rt noDialH2RoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { + res, err := rt.t.RoundTrip(req) + if err == ErrNoCachedConn { + return nil, http.ErrSkipAltProtocol + } + return res, err +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/errors.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/errors.go new file mode 100644 index 0000000000000..71a4e29056831 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/errors.go @@ -0,0 +1,122 @@ +// 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. + +package http2 + +import ( + "errors" + "fmt" +) + +// An ErrCode is an unsigned 32-bit error code as defined in the HTTP/2 spec. +type ErrCode uint32 + +const ( + ErrCodeNo ErrCode = 0x0 + ErrCodeProtocol ErrCode = 0x1 + ErrCodeInternal ErrCode = 0x2 + ErrCodeFlowControl ErrCode = 0x3 + ErrCodeSettingsTimeout ErrCode = 0x4 + ErrCodeStreamClosed ErrCode = 0x5 + ErrCodeFrameSize ErrCode = 0x6 + ErrCodeRefusedStream ErrCode = 0x7 + ErrCodeCancel ErrCode = 0x8 + ErrCodeCompression ErrCode = 0x9 + ErrCodeConnect ErrCode = 0xa + ErrCodeEnhanceYourCalm ErrCode = 0xb + ErrCodeInadequateSecurity ErrCode = 0xc + ErrCodeHTTP11Required ErrCode = 0xd +) + +var errCodeName = map[ErrCode]string{ + ErrCodeNo: "NO_ERROR", + ErrCodeProtocol: "PROTOCOL_ERROR", + ErrCodeInternal: "INTERNAL_ERROR", + ErrCodeFlowControl: "FLOW_CONTROL_ERROR", + ErrCodeSettingsTimeout: "SETTINGS_TIMEOUT", + ErrCodeStreamClosed: "STREAM_CLOSED", + ErrCodeFrameSize: "FRAME_SIZE_ERROR", + ErrCodeRefusedStream: "REFUSED_STREAM", + ErrCodeCancel: "CANCEL", + ErrCodeCompression: "COMPRESSION_ERROR", + ErrCodeConnect: "CONNECT_ERROR", + ErrCodeEnhanceYourCalm: "ENHANCE_YOUR_CALM", + ErrCodeInadequateSecurity: "INADEQUATE_SECURITY", + ErrCodeHTTP11Required: "HTTP_1_1_REQUIRED", +} + +func (e ErrCode) String() string { + if s, ok := errCodeName[e]; ok { + return s + } + return fmt.Sprintf("unknown error code 0x%x", uint32(e)) +} + +// ConnectionError is an error that results in the termination of the +// entire connection. +type ConnectionError ErrCode + +func (e ConnectionError) Error() string { return fmt.Sprintf("connection error: %s", ErrCode(e)) } + +// StreamError is an error that only affects one stream within an +// HTTP/2 connection. +type StreamError struct { + StreamID uint32 + Code ErrCode +} + +func (e StreamError) Error() string { + return fmt.Sprintf("stream error: stream ID %d; %v", e.StreamID, e.Code) +} + +// 6.9.1 The Flow Control Window +// "If a sender receives a WINDOW_UPDATE that causes a flow control +// window to exceed this maximum it MUST terminate either the stream +// or the connection, as appropriate. For streams, [...]; for the +// connection, a GOAWAY frame with a FLOW_CONTROL_ERROR code." +type goAwayFlowError struct{} + +func (goAwayFlowError) Error() string { return "connection exceeded flow control window size" } + +// connErrorReason wraps a ConnectionError with an informative error about why it occurs. + +// Errors of this type are only returned by the frame parser functions +// and converted into ConnectionError(ErrCodeProtocol). +type connError struct { + Code ErrCode + Reason string +} + +func (e connError) Error() string { + return fmt.Sprintf("http2: connection error: %v: %v", e.Code, e.Reason) +} + +type pseudoHeaderError string + +func (e pseudoHeaderError) Error() string { + return fmt.Sprintf("invalid pseudo-header %q", string(e)) +} + +type duplicatePseudoHeaderError string + +func (e duplicatePseudoHeaderError) Error() string { + return fmt.Sprintf("duplicate pseudo-header %q", string(e)) +} + +type headerFieldNameError string + +func (e headerFieldNameError) Error() string { + return fmt.Sprintf("invalid header field name %q", string(e)) +} + +type headerFieldValueError string + +func (e headerFieldValueError) Error() string { + return fmt.Sprintf("invalid header field value %q", string(e)) +} + +var ( + errMixPseudoHeaderTypes = errors.New("mix of request and response pseudo headers") + errPseudoAfterRegular = errors.New("pseudo header field after regular") +) diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/fixed_buffer.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/fixed_buffer.go new file mode 100644 index 0000000000000..47da0f0bf71f0 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/fixed_buffer.go @@ -0,0 +1,60 @@ +// 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. + +package http2 + +import ( + "errors" +) + +// fixedBuffer is an io.ReadWriter backed by a fixed size buffer. +// It never allocates, but moves old data as new data is written. +type fixedBuffer struct { + buf []byte + r, w int +} + +var ( + errReadEmpty = errors.New("read from empty fixedBuffer") + errWriteFull = errors.New("write on full fixedBuffer") +) + +// Read copies bytes from the buffer into p. +// It is an error to read when no data is available. +func (b *fixedBuffer) Read(p []byte) (n int, err error) { + if b.r == b.w { + return 0, errReadEmpty + } + n = copy(p, b.buf[b.r:b.w]) + b.r += n + if b.r == b.w { + b.r = 0 + b.w = 0 + } + return n, nil +} + +// Len returns the number of bytes of the unread portion of the buffer. +func (b *fixedBuffer) Len() int { + return b.w - b.r +} + +// Write copies bytes from p into the buffer. +// It is an error to write more data than the buffer can hold. +func (b *fixedBuffer) Write(p []byte) (n int, err error) { + // Slide existing data to beginning. + if b.r > 0 && len(p) > len(b.buf)-b.w { + copy(b.buf, b.buf[b.r:b.w]) + b.w -= b.r + b.r = 0 + } + + // Write new data. + n = copy(b.buf[b.w:], p) + b.w += n + if n < len(p) { + err = errWriteFull + } + return n, err +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/flow.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/flow.go new file mode 100644 index 0000000000000..957de25420d91 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/flow.go @@ -0,0 +1,50 @@ +// 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. + +// Flow control + +package http2 + +// flow is the flow control window's size. +type flow struct { + // n is the number of DATA bytes we're allowed to send. + // A flow is kept both on a conn and a per-stream. + n int32 + + // conn points to the shared connection-level flow that is + // shared by all streams on that conn. It is nil for the flow + // that's on the conn directly. + conn *flow +} + +func (f *flow) setConnFlow(cf *flow) { f.conn = cf } + +func (f *flow) available() int32 { + n := f.n + if f.conn != nil && f.conn.n < n { + n = f.conn.n + } + return n +} + +func (f *flow) take(n int32) { + if n > f.available() { + panic("internal error: took too much") + } + f.n -= n + if f.conn != nil { + f.conn.n -= n + } +} + +// add adds n bytes (positive or negative) to the flow control window. +// It returns false if the sum would exceed 2^31-1. +func (f *flow) add(n int32) bool { + remain := (1<<31 - 1) - f.n + if n > remain { + return false + } + f.n += n + return true +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/frame.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/frame.go new file mode 100644 index 0000000000000..981d407a714cb --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/frame.go @@ -0,0 +1,1507 @@ +// 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. + +package http2 + +import ( + "bytes" + "encoding/binary" + "errors" + "fmt" + "io" + "log" + "strings" + "sync" + + "golang.org/x/net/http2/hpack" + "golang.org/x/net/lex/httplex" +) + +const frameHeaderLen = 9 + +var padZeros = make([]byte, 255) // zeros for padding + +// A FrameType is a registered frame type as defined in +// http://http2.github.io/http2-spec/#rfc.section.11.2 +type FrameType uint8 + +const ( + FrameData FrameType = 0x0 + FrameHeaders FrameType = 0x1 + FramePriority FrameType = 0x2 + FrameRSTStream FrameType = 0x3 + FrameSettings FrameType = 0x4 + FramePushPromise FrameType = 0x5 + FramePing FrameType = 0x6 + FrameGoAway FrameType = 0x7 + FrameWindowUpdate FrameType = 0x8 + FrameContinuation FrameType = 0x9 +) + +var frameName = map[FrameType]string{ + FrameData: "DATA", + FrameHeaders: "HEADERS", + FramePriority: "PRIORITY", + FrameRSTStream: "RST_STREAM", + FrameSettings: "SETTINGS", + FramePushPromise: "PUSH_PROMISE", + FramePing: "PING", + FrameGoAway: "GOAWAY", + FrameWindowUpdate: "WINDOW_UPDATE", + FrameContinuation: "CONTINUATION", +} + +func (t FrameType) String() string { + if s, ok := frameName[t]; ok { + return s + } + return fmt.Sprintf("UNKNOWN_FRAME_TYPE_%d", uint8(t)) +} + +// Flags is a bitmask of HTTP/2 flags. +// The meaning of flags varies depending on the frame type. +type Flags uint8 + +// Has reports whether f contains all (0 or more) flags in v. +func (f Flags) Has(v Flags) bool { + return (f & v) == v +} + +// Frame-specific FrameHeader flag bits. +const ( + // Data Frame + FlagDataEndStream Flags = 0x1 + FlagDataPadded Flags = 0x8 + + // Headers Frame + FlagHeadersEndStream Flags = 0x1 + FlagHeadersEndHeaders Flags = 0x4 + FlagHeadersPadded Flags = 0x8 + FlagHeadersPriority Flags = 0x20 + + // Settings Frame + FlagSettingsAck Flags = 0x1 + + // Ping Frame + FlagPingAck Flags = 0x1 + + // Continuation Frame + FlagContinuationEndHeaders Flags = 0x4 + + FlagPushPromiseEndHeaders Flags = 0x4 + FlagPushPromisePadded Flags = 0x8 +) + +var flagName = map[FrameType]map[Flags]string{ + FrameData: { + FlagDataEndStream: "END_STREAM", + FlagDataPadded: "PADDED", + }, + FrameHeaders: { + FlagHeadersEndStream: "END_STREAM", + FlagHeadersEndHeaders: "END_HEADERS", + FlagHeadersPadded: "PADDED", + FlagHeadersPriority: "PRIORITY", + }, + FrameSettings: { + FlagSettingsAck: "ACK", + }, + FramePing: { + FlagPingAck: "ACK", + }, + FrameContinuation: { + FlagContinuationEndHeaders: "END_HEADERS", + }, + FramePushPromise: { + FlagPushPromiseEndHeaders: "END_HEADERS", + FlagPushPromisePadded: "PADDED", + }, +} + +// a frameParser parses a frame given its FrameHeader and payload +// bytes. The length of payload will always equal fh.Length (which +// might be 0). +type frameParser func(fh FrameHeader, payload []byte) (Frame, error) + +var frameParsers = map[FrameType]frameParser{ + FrameData: parseDataFrame, + FrameHeaders: parseHeadersFrame, + FramePriority: parsePriorityFrame, + FrameRSTStream: parseRSTStreamFrame, + FrameSettings: parseSettingsFrame, + FramePushPromise: parsePushPromise, + FramePing: parsePingFrame, + FrameGoAway: parseGoAwayFrame, + FrameWindowUpdate: parseWindowUpdateFrame, + FrameContinuation: parseContinuationFrame, +} + +func typeFrameParser(t FrameType) frameParser { + if f := frameParsers[t]; f != nil { + return f + } + return parseUnknownFrame +} + +// A FrameHeader is the 9 byte header of all HTTP/2 frames. +// +// See http://http2.github.io/http2-spec/#FrameHeader +type FrameHeader struct { + valid bool // caller can access []byte fields in the Frame + + // Type is the 1 byte frame type. There are ten standard frame + // types, but extension frame types may be written by WriteRawFrame + // and will be returned by ReadFrame (as UnknownFrame). + Type FrameType + + // Flags are the 1 byte of 8 potential bit flags per frame. + // They are specific to the frame type. + Flags Flags + + // Length is the length of the frame, not including the 9 byte header. + // The maximum size is one byte less than 16MB (uint24), but only + // frames up to 16KB are allowed without peer agreement. + Length uint32 + + // StreamID is which stream this frame is for. Certain frames + // are not stream-specific, in which case this field is 0. + StreamID uint32 +} + +// Header returns h. It exists so FrameHeaders can be embedded in other +// specific frame types and implement the Frame interface. +func (h FrameHeader) Header() FrameHeader { return h } + +func (h FrameHeader) String() string { + var buf bytes.Buffer + buf.WriteString("[FrameHeader ") + h.writeDebug(&buf) + buf.WriteByte(']') + return buf.String() +} + +func (h FrameHeader) writeDebug(buf *bytes.Buffer) { + buf.WriteString(h.Type.String()) + if h.Flags != 0 { + buf.WriteString(" flags=") + set := 0 + for i := uint8(0); i < 8; i++ { + if h.Flags&(1< 1 { + buf.WriteByte('|') + } + name := flagName[h.Type][Flags(1<>24), + byte(streamID>>16), + byte(streamID>>8), + byte(streamID)) +} + +func (f *Framer) endWrite() error { + // Now that we know the final size, fill in the FrameHeader in + // the space previously reserved for it. Abuse append. + length := len(f.wbuf) - frameHeaderLen + if length >= (1 << 24) { + return ErrFrameTooLarge + } + _ = append(f.wbuf[:0], + byte(length>>16), + byte(length>>8), + byte(length)) + if logFrameWrites { + f.logWrite() + } + + n, err := f.w.Write(f.wbuf) + if err == nil && n != len(f.wbuf) { + err = io.ErrShortWrite + } + return err +} + +func (f *Framer) logWrite() { + if f.debugFramer == nil { + f.debugFramerBuf = new(bytes.Buffer) + f.debugFramer = NewFramer(nil, f.debugFramerBuf) + f.debugFramer.logReads = false // we log it ourselves, saying "wrote" below + // Let us read anything, even if we accidentally wrote it + // in the wrong order: + f.debugFramer.AllowIllegalReads = true + } + f.debugFramerBuf.Write(f.wbuf) + fr, err := f.debugFramer.ReadFrame() + if err != nil { + log.Printf("http2: Framer %p: failed to decode just-written frame", f) + return + } + log.Printf("http2: Framer %p: wrote %v", f, summarizeFrame(fr)) +} + +func (f *Framer) writeByte(v byte) { f.wbuf = append(f.wbuf, v) } +func (f *Framer) writeBytes(v []byte) { f.wbuf = append(f.wbuf, v...) } +func (f *Framer) writeUint16(v uint16) { f.wbuf = append(f.wbuf, byte(v>>8), byte(v)) } +func (f *Framer) writeUint32(v uint32) { + f.wbuf = append(f.wbuf, byte(v>>24), byte(v>>16), byte(v>>8), byte(v)) +} + +const ( + minMaxFrameSize = 1 << 14 + maxFrameSize = 1<<24 - 1 +) + +// NewFramer returns a Framer that writes frames to w and reads them from r. +func NewFramer(w io.Writer, r io.Reader) *Framer { + fr := &Framer{ + w: w, + r: r, + logReads: logFrameReads, + } + fr.getReadBuf = func(size uint32) []byte { + if cap(fr.readBuf) >= int(size) { + return fr.readBuf[:size] + } + fr.readBuf = make([]byte, size) + return fr.readBuf + } + fr.SetMaxReadFrameSize(maxFrameSize) + return fr +} + +// SetMaxReadFrameSize sets the maximum size of a frame +// that will be read by a subsequent call to ReadFrame. +// It is the caller's responsibility to advertise this +// limit with a SETTINGS frame. +func (fr *Framer) SetMaxReadFrameSize(v uint32) { + if v > maxFrameSize { + v = maxFrameSize + } + fr.maxReadSize = v +} + +// ErrorDetail returns a more detailed error of the last error +// returned by Framer.ReadFrame. For instance, if ReadFrame +// returns a StreamError with code PROTOCOL_ERROR, ErrorDetail +// will say exactly what was invalid. ErrorDetail is not guaranteed +// to return a non-nil value and like the rest of the http2 package, +// its return value is not protected by an API compatibility promise. +// ErrorDetail is reset after the next call to ReadFrame. +func (fr *Framer) ErrorDetail() error { + return fr.errDetail +} + +// ErrFrameTooLarge is returned from Framer.ReadFrame when the peer +// sends a frame that is larger than declared with SetMaxReadFrameSize. +var ErrFrameTooLarge = errors.New("http2: frame too large") + +// terminalReadFrameError reports whether err is an unrecoverable +// error from ReadFrame and no other frames should be read. +func terminalReadFrameError(err error) bool { + if _, ok := err.(StreamError); ok { + return false + } + return err != nil +} + +// ReadFrame reads a single frame. The returned Frame is only valid +// until the next call to ReadFrame. +// +// If the frame is larger than previously set with SetMaxReadFrameSize, the +// returned error is ErrFrameTooLarge. Other errors may be of type +// ConnectionError, StreamError, or anything else from the underlying +// reader. +func (fr *Framer) ReadFrame() (Frame, error) { + fr.errDetail = nil + if fr.lastFrame != nil { + fr.lastFrame.invalidate() + } + fh, err := readFrameHeader(fr.headerBuf[:], fr.r) + if err != nil { + return nil, err + } + if fh.Length > fr.maxReadSize { + return nil, ErrFrameTooLarge + } + payload := fr.getReadBuf(fh.Length) + if _, err := io.ReadFull(fr.r, payload); err != nil { + return nil, err + } + f, err := typeFrameParser(fh.Type)(fh, payload) + if err != nil { + if ce, ok := err.(connError); ok { + return nil, fr.connError(ce.Code, ce.Reason) + } + return nil, err + } + if err := fr.checkFrameOrder(f); err != nil { + return nil, err + } + if fr.logReads { + log.Printf("http2: Framer %p: read %v", fr, summarizeFrame(f)) + } + if fh.Type == FrameHeaders && fr.ReadMetaHeaders != nil { + return fr.readMetaFrame(f.(*HeadersFrame)) + } + return f, nil +} + +// connError returns ConnectionError(code) but first +// stashes away a public reason to the caller can optionally relay it +// to the peer before hanging up on them. This might help others debug +// their implementations. +func (fr *Framer) connError(code ErrCode, reason string) error { + fr.errDetail = errors.New(reason) + return ConnectionError(code) +} + +// checkFrameOrder reports an error if f is an invalid frame to return +// next from ReadFrame. Mostly it checks whether HEADERS and +// CONTINUATION frames are contiguous. +func (fr *Framer) checkFrameOrder(f Frame) error { + last := fr.lastFrame + fr.lastFrame = f + if fr.AllowIllegalReads { + return nil + } + + fh := f.Header() + if fr.lastHeaderStream != 0 { + if fh.Type != FrameContinuation { + return fr.connError(ErrCodeProtocol, + fmt.Sprintf("got %s for stream %d; expected CONTINUATION following %s for stream %d", + fh.Type, fh.StreamID, + last.Header().Type, fr.lastHeaderStream)) + } + if fh.StreamID != fr.lastHeaderStream { + return fr.connError(ErrCodeProtocol, + fmt.Sprintf("got CONTINUATION for stream %d; expected stream %d", + fh.StreamID, fr.lastHeaderStream)) + } + } else if fh.Type == FrameContinuation { + return fr.connError(ErrCodeProtocol, fmt.Sprintf("unexpected CONTINUATION for stream %d", fh.StreamID)) + } + + switch fh.Type { + case FrameHeaders, FrameContinuation: + if fh.Flags.Has(FlagHeadersEndHeaders) { + fr.lastHeaderStream = 0 + } else { + fr.lastHeaderStream = fh.StreamID + } + } + + return nil +} + +// A DataFrame conveys arbitrary, variable-length sequences of octets +// associated with a stream. +// See http://http2.github.io/http2-spec/#rfc.section.6.1 +type DataFrame struct { + FrameHeader + data []byte +} + +func (f *DataFrame) StreamEnded() bool { + return f.FrameHeader.Flags.Has(FlagDataEndStream) +} + +// Data returns the frame's data octets, not including any padding +// size byte or padding suffix bytes. +// The caller must not retain the returned memory past the next +// call to ReadFrame. +func (f *DataFrame) Data() []byte { + f.checkValid() + return f.data +} + +func parseDataFrame(fh FrameHeader, payload []byte) (Frame, error) { + if fh.StreamID == 0 { + // DATA frames MUST be associated with a stream. If a + // DATA frame is received whose stream identifier + // field is 0x0, the recipient MUST respond with a + // connection error (Section 5.4.1) of type + // PROTOCOL_ERROR. + return nil, connError{ErrCodeProtocol, "DATA frame with stream ID 0"} + } + f := &DataFrame{ + FrameHeader: fh, + } + var padSize byte + if fh.Flags.Has(FlagDataPadded) { + var err error + payload, padSize, err = readByte(payload) + if err != nil { + return nil, err + } + } + if int(padSize) > len(payload) { + // If the length of the padding is greater than the + // length of the frame payload, the recipient MUST + // treat this as a connection error. + // Filed: https://github.com/http2/http2-spec/issues/610 + return nil, connError{ErrCodeProtocol, "pad size larger than data payload"} + } + f.data = payload[:len(payload)-int(padSize)] + return f, nil +} + +var ( + errStreamID = errors.New("invalid stream ID") + errDepStreamID = errors.New("invalid dependent stream ID") +) + +func validStreamIDOrZero(streamID uint32) bool { + return streamID&(1<<31) == 0 +} + +func validStreamID(streamID uint32) bool { + return streamID != 0 && streamID&(1<<31) == 0 +} + +// WriteData writes a DATA frame. +// +// It will perform exactly one Write to the underlying Writer. +// It is the caller's responsibility to not call other Write methods concurrently. +func (f *Framer) WriteData(streamID uint32, endStream bool, data []byte) error { + // TODO: ignoring padding for now. will add when somebody cares. + if !validStreamID(streamID) && !f.AllowIllegalWrites { + return errStreamID + } + var flags Flags + if endStream { + flags |= FlagDataEndStream + } + f.startWrite(FrameData, flags, streamID) + f.wbuf = append(f.wbuf, data...) + return f.endWrite() +} + +// A SettingsFrame conveys configuration parameters that affect how +// endpoints communicate, such as preferences and constraints on peer +// behavior. +// +// See http://http2.github.io/http2-spec/#SETTINGS +type SettingsFrame struct { + FrameHeader + p []byte +} + +func parseSettingsFrame(fh FrameHeader, p []byte) (Frame, error) { + if fh.Flags.Has(FlagSettingsAck) && fh.Length > 0 { + // When this (ACK 0x1) bit is set, the payload of the + // SETTINGS frame MUST be empty. Receipt of a + // SETTINGS frame with the ACK flag set and a length + // field value other than 0 MUST be treated as a + // connection error (Section 5.4.1) of type + // FRAME_SIZE_ERROR. + return nil, ConnectionError(ErrCodeFrameSize) + } + if fh.StreamID != 0 { + // SETTINGS frames always apply to a connection, + // never a single stream. The stream identifier for a + // SETTINGS frame MUST be zero (0x0). If an endpoint + // receives a SETTINGS frame whose stream identifier + // field is anything other than 0x0, the endpoint MUST + // respond with a connection error (Section 5.4.1) of + // type PROTOCOL_ERROR. + return nil, ConnectionError(ErrCodeProtocol) + } + if len(p)%6 != 0 { + // Expecting even number of 6 byte settings. + return nil, ConnectionError(ErrCodeFrameSize) + } + f := &SettingsFrame{FrameHeader: fh, p: p} + if v, ok := f.Value(SettingInitialWindowSize); ok && v > (1<<31)-1 { + // Values above the maximum flow control window size of 2^31 - 1 MUST + // be treated as a connection error (Section 5.4.1) of type + // FLOW_CONTROL_ERROR. + return nil, ConnectionError(ErrCodeFlowControl) + } + return f, nil +} + +func (f *SettingsFrame) IsAck() bool { + return f.FrameHeader.Flags.Has(FlagSettingsAck) +} + +func (f *SettingsFrame) Value(s SettingID) (v uint32, ok bool) { + f.checkValid() + buf := f.p + for len(buf) > 0 { + settingID := SettingID(binary.BigEndian.Uint16(buf[:2])) + if settingID == s { + return binary.BigEndian.Uint32(buf[2:6]), true + } + buf = buf[6:] + } + return 0, false +} + +// ForeachSetting runs fn for each setting. +// It stops and returns the first error. +func (f *SettingsFrame) ForeachSetting(fn func(Setting) error) error { + f.checkValid() + buf := f.p + for len(buf) > 0 { + if err := fn(Setting{ + SettingID(binary.BigEndian.Uint16(buf[:2])), + binary.BigEndian.Uint32(buf[2:6]), + }); err != nil { + return err + } + buf = buf[6:] + } + return nil +} + +// WriteSettings writes a SETTINGS frame with zero or more settings +// specified and the ACK bit not set. +// +// It will perform exactly one Write to the underlying Writer. +// It is the caller's responsibility to not call other Write methods concurrently. +func (f *Framer) WriteSettings(settings ...Setting) error { + f.startWrite(FrameSettings, 0, 0) + for _, s := range settings { + f.writeUint16(uint16(s.ID)) + f.writeUint32(s.Val) + } + return f.endWrite() +} + +// WriteSettings writes an empty SETTINGS frame with the ACK bit set. +// +// It will perform exactly one Write to the underlying Writer. +// It is the caller's responsibility to not call other Write methods concurrently. +func (f *Framer) WriteSettingsAck() error { + f.startWrite(FrameSettings, FlagSettingsAck, 0) + return f.endWrite() +} + +// A PingFrame is a mechanism for measuring a minimal round trip time +// from the sender, as well as determining whether an idle connection +// is still functional. +// See http://http2.github.io/http2-spec/#rfc.section.6.7 +type PingFrame struct { + FrameHeader + Data [8]byte +} + +func (f *PingFrame) IsAck() bool { return f.Flags.Has(FlagPingAck) } + +func parsePingFrame(fh FrameHeader, payload []byte) (Frame, error) { + if len(payload) != 8 { + return nil, ConnectionError(ErrCodeFrameSize) + } + if fh.StreamID != 0 { + return nil, ConnectionError(ErrCodeProtocol) + } + f := &PingFrame{FrameHeader: fh} + copy(f.Data[:], payload) + return f, nil +} + +func (f *Framer) WritePing(ack bool, data [8]byte) error { + var flags Flags + if ack { + flags = FlagPingAck + } + f.startWrite(FramePing, flags, 0) + f.writeBytes(data[:]) + return f.endWrite() +} + +// A GoAwayFrame informs the remote peer to stop creating streams on this connection. +// See http://http2.github.io/http2-spec/#rfc.section.6.8 +type GoAwayFrame struct { + FrameHeader + LastStreamID uint32 + ErrCode ErrCode + debugData []byte +} + +// DebugData returns any debug data in the GOAWAY frame. Its contents +// are not defined. +// The caller must not retain the returned memory past the next +// call to ReadFrame. +func (f *GoAwayFrame) DebugData() []byte { + f.checkValid() + return f.debugData +} + +func parseGoAwayFrame(fh FrameHeader, p []byte) (Frame, error) { + if fh.StreamID != 0 { + return nil, ConnectionError(ErrCodeProtocol) + } + if len(p) < 8 { + return nil, ConnectionError(ErrCodeFrameSize) + } + return &GoAwayFrame{ + FrameHeader: fh, + LastStreamID: binary.BigEndian.Uint32(p[:4]) & (1<<31 - 1), + ErrCode: ErrCode(binary.BigEndian.Uint32(p[4:8])), + debugData: p[8:], + }, nil +} + +func (f *Framer) WriteGoAway(maxStreamID uint32, code ErrCode, debugData []byte) error { + f.startWrite(FrameGoAway, 0, 0) + f.writeUint32(maxStreamID & (1<<31 - 1)) + f.writeUint32(uint32(code)) + f.writeBytes(debugData) + return f.endWrite() +} + +// An UnknownFrame is the frame type returned when the frame type is unknown +// or no specific frame type parser exists. +type UnknownFrame struct { + FrameHeader + p []byte +} + +// Payload returns the frame's payload (after the header). It is not +// valid to call this method after a subsequent call to +// Framer.ReadFrame, nor is it valid to retain the returned slice. +// The memory is owned by the Framer and is invalidated when the next +// frame is read. +func (f *UnknownFrame) Payload() []byte { + f.checkValid() + return f.p +} + +func parseUnknownFrame(fh FrameHeader, p []byte) (Frame, error) { + return &UnknownFrame{fh, p}, nil +} + +// A WindowUpdateFrame is used to implement flow control. +// See http://http2.github.io/http2-spec/#rfc.section.6.9 +type WindowUpdateFrame struct { + FrameHeader + Increment uint32 // never read with high bit set +} + +func parseWindowUpdateFrame(fh FrameHeader, p []byte) (Frame, error) { + if len(p) != 4 { + return nil, ConnectionError(ErrCodeFrameSize) + } + inc := binary.BigEndian.Uint32(p[:4]) & 0x7fffffff // mask off high reserved bit + if inc == 0 { + // A receiver MUST treat the receipt of a + // WINDOW_UPDATE frame with an flow control window + // increment of 0 as a stream error (Section 5.4.2) of + // type PROTOCOL_ERROR; errors on the connection flow + // control window MUST be treated as a connection + // error (Section 5.4.1). + if fh.StreamID == 0 { + return nil, ConnectionError(ErrCodeProtocol) + } + return nil, StreamError{fh.StreamID, ErrCodeProtocol} + } + return &WindowUpdateFrame{ + FrameHeader: fh, + Increment: inc, + }, nil +} + +// WriteWindowUpdate writes a WINDOW_UPDATE frame. +// The increment value must be between 1 and 2,147,483,647, inclusive. +// If the Stream ID is zero, the window update applies to the +// connection as a whole. +func (f *Framer) WriteWindowUpdate(streamID, incr uint32) error { + // "The legal range for the increment to the flow control window is 1 to 2^31-1 (2,147,483,647) octets." + if (incr < 1 || incr > 2147483647) && !f.AllowIllegalWrites { + return errors.New("illegal window increment value") + } + f.startWrite(FrameWindowUpdate, 0, streamID) + f.writeUint32(incr) + return f.endWrite() +} + +// A HeadersFrame is used to open a stream and additionally carries a +// header block fragment. +type HeadersFrame struct { + FrameHeader + + // Priority is set if FlagHeadersPriority is set in the FrameHeader. + Priority PriorityParam + + headerFragBuf []byte // not owned +} + +func (f *HeadersFrame) HeaderBlockFragment() []byte { + f.checkValid() + return f.headerFragBuf +} + +func (f *HeadersFrame) HeadersEnded() bool { + return f.FrameHeader.Flags.Has(FlagHeadersEndHeaders) +} + +func (f *HeadersFrame) StreamEnded() bool { + return f.FrameHeader.Flags.Has(FlagHeadersEndStream) +} + +func (f *HeadersFrame) HasPriority() bool { + return f.FrameHeader.Flags.Has(FlagHeadersPriority) +} + +func parseHeadersFrame(fh FrameHeader, p []byte) (_ Frame, err error) { + hf := &HeadersFrame{ + FrameHeader: fh, + } + if fh.StreamID == 0 { + // HEADERS frames MUST be associated with a stream. If a HEADERS frame + // is received whose stream identifier field is 0x0, the recipient MUST + // respond with a connection error (Section 5.4.1) of type + // PROTOCOL_ERROR. + return nil, connError{ErrCodeProtocol, "HEADERS frame with stream ID 0"} + } + var padLength uint8 + if fh.Flags.Has(FlagHeadersPadded) { + if p, padLength, err = readByte(p); err != nil { + return + } + } + if fh.Flags.Has(FlagHeadersPriority) { + var v uint32 + p, v, err = readUint32(p) + if err != nil { + return nil, err + } + hf.Priority.StreamDep = v & 0x7fffffff + hf.Priority.Exclusive = (v != hf.Priority.StreamDep) // high bit was set + p, hf.Priority.Weight, err = readByte(p) + if err != nil { + return nil, err + } + } + if len(p)-int(padLength) <= 0 { + return nil, StreamError{fh.StreamID, ErrCodeProtocol} + } + hf.headerFragBuf = p[:len(p)-int(padLength)] + return hf, nil +} + +// HeadersFrameParam are the parameters for writing a HEADERS frame. +type HeadersFrameParam struct { + // StreamID is the required Stream ID to initiate. + StreamID uint32 + // BlockFragment is part (or all) of a Header Block. + BlockFragment []byte + + // EndStream indicates that the header block is the last that + // the endpoint will send for the identified stream. Setting + // this flag causes the stream to enter one of "half closed" + // states. + EndStream bool + + // EndHeaders indicates that this frame contains an entire + // header block and is not followed by any + // CONTINUATION frames. + EndHeaders bool + + // PadLength is the optional number of bytes of zeros to add + // to this frame. + PadLength uint8 + + // Priority, if non-zero, includes stream priority information + // in the HEADER frame. + Priority PriorityParam +} + +// WriteHeaders writes a single HEADERS frame. +// +// This is a low-level header writing method. Encoding headers and +// splitting them into any necessary CONTINUATION frames is handled +// elsewhere. +// +// It will perform exactly one Write to the underlying Writer. +// It is the caller's responsibility to not call other Write methods concurrently. +func (f *Framer) WriteHeaders(p HeadersFrameParam) error { + if !validStreamID(p.StreamID) && !f.AllowIllegalWrites { + return errStreamID + } + var flags Flags + if p.PadLength != 0 { + flags |= FlagHeadersPadded + } + if p.EndStream { + flags |= FlagHeadersEndStream + } + if p.EndHeaders { + flags |= FlagHeadersEndHeaders + } + if !p.Priority.IsZero() { + flags |= FlagHeadersPriority + } + f.startWrite(FrameHeaders, flags, p.StreamID) + if p.PadLength != 0 { + f.writeByte(p.PadLength) + } + if !p.Priority.IsZero() { + v := p.Priority.StreamDep + if !validStreamIDOrZero(v) && !f.AllowIllegalWrites { + return errDepStreamID + } + if p.Priority.Exclusive { + v |= 1 << 31 + } + f.writeUint32(v) + f.writeByte(p.Priority.Weight) + } + f.wbuf = append(f.wbuf, p.BlockFragment...) + f.wbuf = append(f.wbuf, padZeros[:p.PadLength]...) + return f.endWrite() +} + +// A PriorityFrame specifies the sender-advised priority of a stream. +// See http://http2.github.io/http2-spec/#rfc.section.6.3 +type PriorityFrame struct { + FrameHeader + PriorityParam +} + +// PriorityParam are the stream prioritzation parameters. +type PriorityParam struct { + // StreamDep is a 31-bit stream identifier for the + // stream that this stream depends on. Zero means no + // dependency. + StreamDep uint32 + + // Exclusive is whether the dependency is exclusive. + Exclusive bool + + // Weight is the stream's zero-indexed weight. It should be + // set together with StreamDep, or neither should be set. Per + // the spec, "Add one to the value to obtain a weight between + // 1 and 256." + Weight uint8 +} + +func (p PriorityParam) IsZero() bool { + return p == PriorityParam{} +} + +func parsePriorityFrame(fh FrameHeader, payload []byte) (Frame, error) { + if fh.StreamID == 0 { + return nil, connError{ErrCodeProtocol, "PRIORITY frame with stream ID 0"} + } + if len(payload) != 5 { + return nil, connError{ErrCodeFrameSize, fmt.Sprintf("PRIORITY frame payload size was %d; want 5", len(payload))} + } + v := binary.BigEndian.Uint32(payload[:4]) + streamID := v & 0x7fffffff // mask off high bit + return &PriorityFrame{ + FrameHeader: fh, + PriorityParam: PriorityParam{ + Weight: payload[4], + StreamDep: streamID, + Exclusive: streamID != v, // was high bit set? + }, + }, nil +} + +// WritePriority writes a PRIORITY frame. +// +// It will perform exactly one Write to the underlying Writer. +// It is the caller's responsibility to not call other Write methods concurrently. +func (f *Framer) WritePriority(streamID uint32, p PriorityParam) error { + if !validStreamID(streamID) && !f.AllowIllegalWrites { + return errStreamID + } + if !validStreamIDOrZero(p.StreamDep) { + return errDepStreamID + } + f.startWrite(FramePriority, 0, streamID) + v := p.StreamDep + if p.Exclusive { + v |= 1 << 31 + } + f.writeUint32(v) + f.writeByte(p.Weight) + return f.endWrite() +} + +// A RSTStreamFrame allows for abnormal termination of a stream. +// See http://http2.github.io/http2-spec/#rfc.section.6.4 +type RSTStreamFrame struct { + FrameHeader + ErrCode ErrCode +} + +func parseRSTStreamFrame(fh FrameHeader, p []byte) (Frame, error) { + if len(p) != 4 { + return nil, ConnectionError(ErrCodeFrameSize) + } + if fh.StreamID == 0 { + return nil, ConnectionError(ErrCodeProtocol) + } + return &RSTStreamFrame{fh, ErrCode(binary.BigEndian.Uint32(p[:4]))}, nil +} + +// WriteRSTStream writes a RST_STREAM frame. +// +// It will perform exactly one Write to the underlying Writer. +// It is the caller's responsibility to not call other Write methods concurrently. +func (f *Framer) WriteRSTStream(streamID uint32, code ErrCode) error { + if !validStreamID(streamID) && !f.AllowIllegalWrites { + return errStreamID + } + f.startWrite(FrameRSTStream, 0, streamID) + f.writeUint32(uint32(code)) + return f.endWrite() +} + +// A ContinuationFrame is used to continue a sequence of header block fragments. +// See http://http2.github.io/http2-spec/#rfc.section.6.10 +type ContinuationFrame struct { + FrameHeader + headerFragBuf []byte +} + +func parseContinuationFrame(fh FrameHeader, p []byte) (Frame, error) { + if fh.StreamID == 0 { + return nil, connError{ErrCodeProtocol, "CONTINUATION frame with stream ID 0"} + } + return &ContinuationFrame{fh, p}, nil +} + +func (f *ContinuationFrame) HeaderBlockFragment() []byte { + f.checkValid() + return f.headerFragBuf +} + +func (f *ContinuationFrame) HeadersEnded() bool { + return f.FrameHeader.Flags.Has(FlagContinuationEndHeaders) +} + +// WriteContinuation writes a CONTINUATION frame. +// +// It will perform exactly one Write to the underlying Writer. +// It is the caller's responsibility to not call other Write methods concurrently. +func (f *Framer) WriteContinuation(streamID uint32, endHeaders bool, headerBlockFragment []byte) error { + if !validStreamID(streamID) && !f.AllowIllegalWrites { + return errStreamID + } + var flags Flags + if endHeaders { + flags |= FlagContinuationEndHeaders + } + f.startWrite(FrameContinuation, flags, streamID) + f.wbuf = append(f.wbuf, headerBlockFragment...) + return f.endWrite() +} + +// A PushPromiseFrame is used to initiate a server stream. +// See http://http2.github.io/http2-spec/#rfc.section.6.6 +type PushPromiseFrame struct { + FrameHeader + PromiseID uint32 + headerFragBuf []byte // not owned +} + +func (f *PushPromiseFrame) HeaderBlockFragment() []byte { + f.checkValid() + return f.headerFragBuf +} + +func (f *PushPromiseFrame) HeadersEnded() bool { + return f.FrameHeader.Flags.Has(FlagPushPromiseEndHeaders) +} + +func parsePushPromise(fh FrameHeader, p []byte) (_ Frame, err error) { + pp := &PushPromiseFrame{ + FrameHeader: fh, + } + if pp.StreamID == 0 { + // PUSH_PROMISE frames MUST be associated with an existing, + // peer-initiated stream. The stream identifier of a + // PUSH_PROMISE frame indicates the stream it is associated + // with. If the stream identifier field specifies the value + // 0x0, a recipient MUST respond with a connection error + // (Section 5.4.1) of type PROTOCOL_ERROR. + return nil, ConnectionError(ErrCodeProtocol) + } + // The PUSH_PROMISE frame includes optional padding. + // Padding fields and flags are identical to those defined for DATA frames + var padLength uint8 + if fh.Flags.Has(FlagPushPromisePadded) { + if p, padLength, err = readByte(p); err != nil { + return + } + } + + p, pp.PromiseID, err = readUint32(p) + if err != nil { + return + } + pp.PromiseID = pp.PromiseID & (1<<31 - 1) + + if int(padLength) > len(p) { + // like the DATA frame, error out if padding is longer than the body. + return nil, ConnectionError(ErrCodeProtocol) + } + pp.headerFragBuf = p[:len(p)-int(padLength)] + return pp, nil +} + +// PushPromiseParam are the parameters for writing a PUSH_PROMISE frame. +type PushPromiseParam struct { + // StreamID is the required Stream ID to initiate. + StreamID uint32 + + // PromiseID is the required Stream ID which this + // Push Promises + PromiseID uint32 + + // BlockFragment is part (or all) of a Header Block. + BlockFragment []byte + + // EndHeaders indicates that this frame contains an entire + // header block and is not followed by any + // CONTINUATION frames. + EndHeaders bool + + // PadLength is the optional number of bytes of zeros to add + // to this frame. + PadLength uint8 +} + +// WritePushPromise writes a single PushPromise Frame. +// +// As with Header Frames, This is the low level call for writing +// individual frames. Continuation frames are handled elsewhere. +// +// It will perform exactly one Write to the underlying Writer. +// It is the caller's responsibility to not call other Write methods concurrently. +func (f *Framer) WritePushPromise(p PushPromiseParam) error { + if !validStreamID(p.StreamID) && !f.AllowIllegalWrites { + return errStreamID + } + var flags Flags + if p.PadLength != 0 { + flags |= FlagPushPromisePadded + } + if p.EndHeaders { + flags |= FlagPushPromiseEndHeaders + } + f.startWrite(FramePushPromise, flags, p.StreamID) + if p.PadLength != 0 { + f.writeByte(p.PadLength) + } + if !validStreamID(p.PromiseID) && !f.AllowIllegalWrites { + return errStreamID + } + f.writeUint32(p.PromiseID) + f.wbuf = append(f.wbuf, p.BlockFragment...) + f.wbuf = append(f.wbuf, padZeros[:p.PadLength]...) + return f.endWrite() +} + +// WriteRawFrame writes a raw frame. This can be used to write +// extension frames unknown to this package. +func (f *Framer) WriteRawFrame(t FrameType, flags Flags, streamID uint32, payload []byte) error { + f.startWrite(t, flags, streamID) + f.writeBytes(payload) + return f.endWrite() +} + +func readByte(p []byte) (remain []byte, b byte, err error) { + if len(p) == 0 { + return nil, 0, io.ErrUnexpectedEOF + } + return p[1:], p[0], nil +} + +func readUint32(p []byte) (remain []byte, v uint32, err error) { + if len(p) < 4 { + return nil, 0, io.ErrUnexpectedEOF + } + return p[4:], binary.BigEndian.Uint32(p[:4]), nil +} + +type streamEnder interface { + StreamEnded() bool +} + +type headersEnder interface { + HeadersEnded() bool +} + +type headersOrContinuation interface { + headersEnder + HeaderBlockFragment() []byte +} + +// A MetaHeadersFrame is the representation of one HEADERS frame and +// zero or more contiguous CONTINUATION frames and the decoding of +// their HPACK-encoded contents. +// +// This type of frame does not appear on the wire and is only returned +// by the Framer when Framer.ReadMetaHeaders is set. +type MetaHeadersFrame struct { + *HeadersFrame + + // Fields are the fields contained in the HEADERS and + // CONTINUATION frames. The underlying slice is owned by the + // Framer and must not be retained after the next call to + // ReadFrame. + // + // Fields are guaranteed to be in the correct http2 order and + // not have unknown pseudo header fields or invalid header + // field names or values. Required pseudo header fields may be + // missing, however. Use the MetaHeadersFrame.Pseudo accessor + // method access pseudo headers. + Fields []hpack.HeaderField + + // Truncated is whether the max header list size limit was hit + // and Fields is incomplete. The hpack decoder state is still + // valid, however. + Truncated bool +} + +// PseudoValue returns the given pseudo header field's value. +// The provided pseudo field should not contain the leading colon. +func (mh *MetaHeadersFrame) PseudoValue(pseudo string) string { + for _, hf := range mh.Fields { + if !hf.IsPseudo() { + return "" + } + if hf.Name[1:] == pseudo { + return hf.Value + } + } + return "" +} + +// RegularFields returns the regular (non-pseudo) header fields of mh. +// The caller does not own the returned slice. +func (mh *MetaHeadersFrame) RegularFields() []hpack.HeaderField { + for i, hf := range mh.Fields { + if !hf.IsPseudo() { + return mh.Fields[i:] + } + } + return nil +} + +// PseudoFields returns the pseudo header fields of mh. +// The caller does not own the returned slice. +func (mh *MetaHeadersFrame) PseudoFields() []hpack.HeaderField { + for i, hf := range mh.Fields { + if !hf.IsPseudo() { + return mh.Fields[:i] + } + } + return mh.Fields +} + +func (mh *MetaHeadersFrame) checkPseudos() error { + var isRequest, isResponse bool + pf := mh.PseudoFields() + for i, hf := range pf { + switch hf.Name { + case ":method", ":path", ":scheme", ":authority": + isRequest = true + case ":status": + isResponse = true + default: + return pseudoHeaderError(hf.Name) + } + // Check for duplicates. + // This would be a bad algorithm, but N is 4. + // And this doesn't allocate. + for _, hf2 := range pf[:i] { + if hf.Name == hf2.Name { + return duplicatePseudoHeaderError(hf.Name) + } + } + } + if isRequest && isResponse { + return errMixPseudoHeaderTypes + } + return nil +} + +func (fr *Framer) maxHeaderStringLen() int { + v := fr.maxHeaderListSize() + if uint32(int(v)) == v { + return int(v) + } + // They had a crazy big number for MaxHeaderBytes anyway, + // so give them unlimited header lengths: + return 0 +} + +// readMetaFrame returns 0 or more CONTINUATION frames from fr and +// merge them into into the provided hf and returns a MetaHeadersFrame +// with the decoded hpack values. +func (fr *Framer) readMetaFrame(hf *HeadersFrame) (*MetaHeadersFrame, error) { + if fr.AllowIllegalReads { + return nil, errors.New("illegal use of AllowIllegalReads with ReadMetaHeaders") + } + mh := &MetaHeadersFrame{ + HeadersFrame: hf, + } + var remainSize = fr.maxHeaderListSize() + var sawRegular bool + + var invalid error // pseudo header field errors + hdec := fr.ReadMetaHeaders + hdec.SetEmitEnabled(true) + hdec.SetMaxStringLength(fr.maxHeaderStringLen()) + hdec.SetEmitFunc(func(hf hpack.HeaderField) { + if !httplex.ValidHeaderFieldValue(hf.Value) { + invalid = headerFieldValueError(hf.Value) + } + isPseudo := strings.HasPrefix(hf.Name, ":") + if isPseudo { + if sawRegular { + invalid = errPseudoAfterRegular + } + } else { + sawRegular = true + if !validWireHeaderFieldName(hf.Name) { + invalid = headerFieldNameError(hf.Name) + } + } + + if invalid != nil { + hdec.SetEmitEnabled(false) + return + } + + size := hf.Size() + if size > remainSize { + hdec.SetEmitEnabled(false) + mh.Truncated = true + return + } + remainSize -= size + + mh.Fields = append(mh.Fields, hf) + }) + // Lose reference to MetaHeadersFrame: + defer hdec.SetEmitFunc(func(hf hpack.HeaderField) {}) + + var hc headersOrContinuation = hf + for { + frag := hc.HeaderBlockFragment() + if _, err := hdec.Write(frag); err != nil { + return nil, ConnectionError(ErrCodeCompression) + } + + if hc.HeadersEnded() { + break + } + if f, err := fr.ReadFrame(); err != nil { + return nil, err + } else { + hc = f.(*ContinuationFrame) // guaranteed by checkFrameOrder + } + } + + mh.HeadersFrame.headerFragBuf = nil + mh.HeadersFrame.invalidate() + + if err := hdec.Close(); err != nil { + return nil, ConnectionError(ErrCodeCompression) + } + if invalid != nil { + fr.errDetail = invalid + return nil, StreamError{mh.StreamID, ErrCodeProtocol} + } + if err := mh.checkPseudos(); err != nil { + fr.errDetail = err + return nil, StreamError{mh.StreamID, ErrCodeProtocol} + } + return mh, nil +} + +func summarizeFrame(f Frame) string { + var buf bytes.Buffer + f.Header().writeDebug(&buf) + switch f := f.(type) { + case *SettingsFrame: + n := 0 + f.ForeachSetting(func(s Setting) error { + n++ + if n == 1 { + buf.WriteString(", settings:") + } + fmt.Fprintf(&buf, " %v=%v,", s.ID, s.Val) + return nil + }) + if n > 0 { + buf.Truncate(buf.Len() - 1) // remove trailing comma + } + case *DataFrame: + data := f.Data() + const max = 256 + if len(data) > max { + data = data[:max] + } + fmt.Fprintf(&buf, " data=%q", data) + if len(f.Data()) > max { + fmt.Fprintf(&buf, " (%d bytes omitted)", len(f.Data())-max) + } + case *WindowUpdateFrame: + if f.StreamID == 0 { + buf.WriteString(" (conn)") + } + fmt.Fprintf(&buf, " incr=%v", f.Increment) + case *PingFrame: + fmt.Fprintf(&buf, " ping=%q", f.Data[:]) + case *GoAwayFrame: + fmt.Fprintf(&buf, " LastStreamID=%v ErrCode=%v Debug=%q", + f.LastStreamID, f.ErrCode, f.debugData) + case *RSTStreamFrame: + fmt.Fprintf(&buf, " ErrCode=%v", f.ErrCode) + } + return buf.String() +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/go16.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/go16.go new file mode 100644 index 0000000000000..2b72855f55210 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/go16.go @@ -0,0 +1,43 @@ +// Copyright 2016 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 go1.6 + +package http2 + +import ( + "crypto/tls" + "net/http" + "time" +) + +func transportExpectContinueTimeout(t1 *http.Transport) time.Duration { + return t1.ExpectContinueTimeout +} + +// isBadCipher reports whether the cipher is blacklisted by the HTTP/2 spec. +func isBadCipher(cipher uint16) bool { + switch cipher { + case tls.TLS_RSA_WITH_RC4_128_SHA, + tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA, + tls.TLS_RSA_WITH_AES_128_CBC_SHA, + tls.TLS_RSA_WITH_AES_256_CBC_SHA, + tls.TLS_RSA_WITH_AES_128_GCM_SHA256, + tls.TLS_RSA_WITH_AES_256_GCM_SHA384, + tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, + tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, + tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, + tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA, + tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, + tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, + tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA: + // Reject cipher suites from Appendix A. + // "This list includes those cipher suites that do not + // offer an ephemeral key exchange and those that are + // based on the TLS null, stream or block cipher type" + return true + default: + return false + } +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/go17.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/go17.go new file mode 100644 index 0000000000000..730319dd5ac78 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/go17.go @@ -0,0 +1,94 @@ +// Copyright 2016 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 go1.7 + +package http2 + +import ( + "context" + "net" + "net/http" + "net/http/httptrace" + "time" +) + +type contextContext interface { + context.Context +} + +func serverConnBaseContext(c net.Conn, opts *ServeConnOpts) (ctx contextContext, cancel func()) { + ctx, cancel = context.WithCancel(context.Background()) + ctx = context.WithValue(ctx, http.LocalAddrContextKey, c.LocalAddr()) + if hs := opts.baseConfig(); hs != nil { + ctx = context.WithValue(ctx, http.ServerContextKey, hs) + } + return +} + +func contextWithCancel(ctx contextContext) (_ contextContext, cancel func()) { + return context.WithCancel(ctx) +} + +func requestWithContext(req *http.Request, ctx contextContext) *http.Request { + return req.WithContext(ctx) +} + +type clientTrace httptrace.ClientTrace + +func reqContext(r *http.Request) context.Context { return r.Context() } + +func setResponseUncompressed(res *http.Response) { res.Uncompressed = true } + +func traceGotConn(req *http.Request, cc *ClientConn) { + trace := httptrace.ContextClientTrace(req.Context()) + if trace == nil || trace.GotConn == nil { + return + } + ci := httptrace.GotConnInfo{Conn: cc.tconn} + cc.mu.Lock() + ci.Reused = cc.nextStreamID > 1 + ci.WasIdle = len(cc.streams) == 0 && ci.Reused + if ci.WasIdle && !cc.lastActive.IsZero() { + ci.IdleTime = time.Now().Sub(cc.lastActive) + } + cc.mu.Unlock() + + trace.GotConn(ci) +} + +func traceWroteHeaders(trace *clientTrace) { + if trace != nil && trace.WroteHeaders != nil { + trace.WroteHeaders() + } +} + +func traceGot100Continue(trace *clientTrace) { + if trace != nil && trace.Got100Continue != nil { + trace.Got100Continue() + } +} + +func traceWait100Continue(trace *clientTrace) { + if trace != nil && trace.Wait100Continue != nil { + trace.Wait100Continue() + } +} + +func traceWroteRequest(trace *clientTrace, err error) { + if trace != nil && trace.WroteRequest != nil { + trace.WroteRequest(httptrace.WroteRequestInfo{Err: err}) + } +} + +func traceFirstResponseByte(trace *clientTrace) { + if trace != nil && trace.GotFirstResponseByte != nil { + trace.GotFirstResponseByte() + } +} + +func requestTrace(req *http.Request) *clientTrace { + trace := httptrace.ContextClientTrace(req.Context()) + return (*clientTrace)(trace) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/gotrack.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/gotrack.go new file mode 100644 index 0000000000000..9933c9f8c7487 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/gotrack.go @@ -0,0 +1,170 @@ +// 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. + +// Defensive debug-only utility to track that functions run on the +// goroutine that they're supposed to. + +package http2 + +import ( + "bytes" + "errors" + "fmt" + "os" + "runtime" + "strconv" + "sync" +) + +var DebugGoroutines = os.Getenv("DEBUG_HTTP2_GOROUTINES") == "1" + +type goroutineLock uint64 + +func newGoroutineLock() goroutineLock { + if !DebugGoroutines { + return 0 + } + return goroutineLock(curGoroutineID()) +} + +func (g goroutineLock) check() { + if !DebugGoroutines { + return + } + if curGoroutineID() != uint64(g) { + panic("running on the wrong goroutine") + } +} + +func (g goroutineLock) checkNotOn() { + if !DebugGoroutines { + return + } + if curGoroutineID() == uint64(g) { + panic("running on the wrong goroutine") + } +} + +var goroutineSpace = []byte("goroutine ") + +func curGoroutineID() uint64 { + bp := littleBuf.Get().(*[]byte) + defer littleBuf.Put(bp) + b := *bp + b = b[:runtime.Stack(b, false)] + // Parse the 4707 out of "goroutine 4707 [" + b = bytes.TrimPrefix(b, goroutineSpace) + i := bytes.IndexByte(b, ' ') + if i < 0 { + panic(fmt.Sprintf("No space found in %q", b)) + } + b = b[:i] + n, err := parseUintBytes(b, 10, 64) + if err != nil { + panic(fmt.Sprintf("Failed to parse goroutine ID out of %q: %v", b, err)) + } + return n +} + +var littleBuf = sync.Pool{ + New: func() interface{} { + buf := make([]byte, 64) + return &buf + }, +} + +// parseUintBytes is like strconv.ParseUint, but using a []byte. +func parseUintBytes(s []byte, base int, bitSize int) (n uint64, err error) { + var cutoff, maxVal uint64 + + if bitSize == 0 { + bitSize = int(strconv.IntSize) + } + + s0 := s + switch { + case len(s) < 1: + err = strconv.ErrSyntax + goto Error + + case 2 <= base && base <= 36: + // valid base; nothing to do + + case base == 0: + // Look for octal, hex prefix. + switch { + case s[0] == '0' && len(s) > 1 && (s[1] == 'x' || s[1] == 'X'): + base = 16 + s = s[2:] + if len(s) < 1 { + err = strconv.ErrSyntax + goto Error + } + case s[0] == '0': + base = 8 + default: + base = 10 + } + + default: + err = errors.New("invalid base " + strconv.Itoa(base)) + goto Error + } + + n = 0 + cutoff = cutoff64(base) + maxVal = 1<= base { + n = 0 + err = strconv.ErrSyntax + goto Error + } + + if n >= cutoff { + // n*base overflows + n = 1<<64 - 1 + err = strconv.ErrRange + goto Error + } + n *= uint64(base) + + n1 := n + uint64(v) + if n1 < n || n1 > maxVal { + // n+v overflows + n = 1<<64 - 1 + err = strconv.ErrRange + goto Error + } + n = n1 + } + + return n, nil + +Error: + return n, &strconv.NumError{Func: "ParseUint", Num: string(s0), Err: err} +} + +// Return the first number n such that n*base >= 1<<64. +func cutoff64(base int) uint64 { + if base < 2 { + return 0 + } + return (1<<64-1)/uint64(base) + 1 +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/headermap.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/headermap.go new file mode 100644 index 0000000000000..c2805f6ac4d53 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/headermap.go @@ -0,0 +1,78 @@ +// 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. + +package http2 + +import ( + "net/http" + "strings" +) + +var ( + commonLowerHeader = map[string]string{} // Go-Canonical-Case -> lower-case + commonCanonHeader = map[string]string{} // lower-case -> Go-Canonical-Case +) + +func init() { + for _, v := range []string{ + "accept", + "accept-charset", + "accept-encoding", + "accept-language", + "accept-ranges", + "age", + "access-control-allow-origin", + "allow", + "authorization", + "cache-control", + "content-disposition", + "content-encoding", + "content-language", + "content-length", + "content-location", + "content-range", + "content-type", + "cookie", + "date", + "etag", + "expect", + "expires", + "from", + "host", + "if-match", + "if-modified-since", + "if-none-match", + "if-unmodified-since", + "last-modified", + "link", + "location", + "max-forwards", + "proxy-authenticate", + "proxy-authorization", + "range", + "referer", + "refresh", + "retry-after", + "server", + "set-cookie", + "strict-transport-security", + "trailer", + "transfer-encoding", + "user-agent", + "vary", + "via", + "www-authenticate", + } { + chk := http.CanonicalHeaderKey(v) + commonLowerHeader[chk] = v + commonCanonHeader[v] = chk + } +} + +func lowerHeader(v string) string { + if s, ok := commonLowerHeader[v]; ok { + return s + } + return strings.ToLower(v) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/hpack/encode.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/hpack/encode.go new file mode 100644 index 0000000000000..f9bb033984835 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/hpack/encode.go @@ -0,0 +1,251 @@ +// 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. + +package hpack + +import ( + "io" +) + +const ( + uint32Max = ^uint32(0) + initialHeaderTableSize = 4096 +) + +type Encoder struct { + dynTab dynamicTable + // minSize is the minimum table size set by + // SetMaxDynamicTableSize after the previous Header Table Size + // Update. + minSize uint32 + // maxSizeLimit is the maximum table size this encoder + // supports. This will protect the encoder from too large + // size. + maxSizeLimit uint32 + // tableSizeUpdate indicates whether "Header Table Size + // Update" is required. + tableSizeUpdate bool + w io.Writer + buf []byte +} + +// NewEncoder returns a new Encoder which performs HPACK encoding. An +// encoded data is written to w. +func NewEncoder(w io.Writer) *Encoder { + e := &Encoder{ + minSize: uint32Max, + maxSizeLimit: initialHeaderTableSize, + tableSizeUpdate: false, + w: w, + } + e.dynTab.setMaxSize(initialHeaderTableSize) + return e +} + +// WriteField encodes f into a single Write to e's underlying Writer. +// This function may also produce bytes for "Header Table Size Update" +// if necessary. If produced, it is done before encoding f. +func (e *Encoder) WriteField(f HeaderField) error { + e.buf = e.buf[:0] + + if e.tableSizeUpdate { + e.tableSizeUpdate = false + if e.minSize < e.dynTab.maxSize { + e.buf = appendTableSize(e.buf, e.minSize) + } + e.minSize = uint32Max + e.buf = appendTableSize(e.buf, e.dynTab.maxSize) + } + + idx, nameValueMatch := e.searchTable(f) + if nameValueMatch { + e.buf = appendIndexed(e.buf, idx) + } else { + indexing := e.shouldIndex(f) + if indexing { + e.dynTab.add(f) + } + + if idx == 0 { + e.buf = appendNewName(e.buf, f, indexing) + } else { + e.buf = appendIndexedName(e.buf, f, idx, indexing) + } + } + n, err := e.w.Write(e.buf) + if err == nil && n != len(e.buf) { + err = io.ErrShortWrite + } + return err +} + +// searchTable searches f in both stable and dynamic header tables. +// The static header table is searched first. Only when there is no +// exact match for both name and value, the dynamic header table is +// then searched. If there is no match, i is 0. If both name and value +// match, i is the matched index and nameValueMatch becomes true. If +// only name matches, i points to that index and nameValueMatch +// becomes false. +func (e *Encoder) searchTable(f HeaderField) (i uint64, nameValueMatch bool) { + for idx, hf := range staticTable { + if !constantTimeStringCompare(hf.Name, f.Name) { + continue + } + if i == 0 { + i = uint64(idx + 1) + } + if f.Sensitive { + continue + } + if !constantTimeStringCompare(hf.Value, f.Value) { + continue + } + i = uint64(idx + 1) + nameValueMatch = true + return + } + + j, nameValueMatch := e.dynTab.search(f) + if nameValueMatch || (i == 0 && j != 0) { + i = j + uint64(len(staticTable)) + } + return +} + +// SetMaxDynamicTableSize changes the dynamic header table size to v. +// The actual size is bounded by the value passed to +// SetMaxDynamicTableSizeLimit. +func (e *Encoder) SetMaxDynamicTableSize(v uint32) { + if v > e.maxSizeLimit { + v = e.maxSizeLimit + } + if v < e.minSize { + e.minSize = v + } + e.tableSizeUpdate = true + e.dynTab.setMaxSize(v) +} + +// SetMaxDynamicTableSizeLimit changes the maximum value that can be +// specified in SetMaxDynamicTableSize to v. By default, it is set to +// 4096, which is the same size of the default dynamic header table +// size described in HPACK specification. If the current maximum +// dynamic header table size is strictly greater than v, "Header Table +// Size Update" will be done in the next WriteField call and the +// maximum dynamic header table size is truncated to v. +func (e *Encoder) SetMaxDynamicTableSizeLimit(v uint32) { + e.maxSizeLimit = v + if e.dynTab.maxSize > v { + e.tableSizeUpdate = true + e.dynTab.setMaxSize(v) + } +} + +// shouldIndex reports whether f should be indexed. +func (e *Encoder) shouldIndex(f HeaderField) bool { + return !f.Sensitive && f.Size() <= e.dynTab.maxSize +} + +// appendIndexed appends index i, as encoded in "Indexed Header Field" +// representation, to dst and returns the extended buffer. +func appendIndexed(dst []byte, i uint64) []byte { + first := len(dst) + dst = appendVarInt(dst, 7, i) + dst[first] |= 0x80 + return dst +} + +// appendNewName appends f, as encoded in one of "Literal Header field +// - New Name" representation variants, to dst and returns the +// extended buffer. +// +// If f.Sensitive is true, "Never Indexed" representation is used. If +// f.Sensitive is false and indexing is true, "Inremental Indexing" +// representation is used. +func appendNewName(dst []byte, f HeaderField, indexing bool) []byte { + dst = append(dst, encodeTypeByte(indexing, f.Sensitive)) + dst = appendHpackString(dst, f.Name) + return appendHpackString(dst, f.Value) +} + +// appendIndexedName appends f and index i referring indexed name +// entry, as encoded in one of "Literal Header field - Indexed Name" +// representation variants, to dst and returns the extended buffer. +// +// If f.Sensitive is true, "Never Indexed" representation is used. If +// f.Sensitive is false and indexing is true, "Incremental Indexing" +// representation is used. +func appendIndexedName(dst []byte, f HeaderField, i uint64, indexing bool) []byte { + first := len(dst) + var n byte + if indexing { + n = 6 + } else { + n = 4 + } + dst = appendVarInt(dst, n, i) + dst[first] |= encodeTypeByte(indexing, f.Sensitive) + return appendHpackString(dst, f.Value) +} + +// appendTableSize appends v, as encoded in "Header Table Size Update" +// representation, to dst and returns the extended buffer. +func appendTableSize(dst []byte, v uint32) []byte { + first := len(dst) + dst = appendVarInt(dst, 5, uint64(v)) + dst[first] |= 0x20 + return dst +} + +// appendVarInt appends i, as encoded in variable integer form using n +// bit prefix, to dst and returns the extended buffer. +// +// See +// http://http2.github.io/http2-spec/compression.html#integer.representation +func appendVarInt(dst []byte, n byte, i uint64) []byte { + k := uint64((1 << n) - 1) + if i < k { + return append(dst, byte(i)) + } + dst = append(dst, byte(k)) + i -= k + for ; i >= 128; i >>= 7 { + dst = append(dst, byte(0x80|(i&0x7f))) + } + return append(dst, byte(i)) +} + +// appendHpackString appends s, as encoded in "String Literal" +// representation, to dst and returns the the extended buffer. +// +// s will be encoded in Huffman codes only when it produces strictly +// shorter byte string. +func appendHpackString(dst []byte, s string) []byte { + huffmanLength := HuffmanEncodeLength(s) + if huffmanLength < uint64(len(s)) { + first := len(dst) + dst = appendVarInt(dst, 7, huffmanLength) + dst = AppendHuffmanString(dst, s) + dst[first] |= 0x80 + } else { + dst = appendVarInt(dst, 7, uint64(len(s))) + dst = append(dst, s...) + } + return dst +} + +// encodeTypeByte returns type byte. If sensitive is true, type byte +// for "Never Indexed" representation is returned. If sensitive is +// false and indexing is true, type byte for "Incremental Indexing" +// representation is returned. Otherwise, type byte for "Without +// Indexing" is returned. +func encodeTypeByte(indexing, sensitive bool) byte { + if sensitive { + return 0x10 + } + if indexing { + return 0x40 + } + return 0 +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/hpack/hpack.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/hpack/hpack.go new file mode 100644 index 0000000000000..8aa197ad678d3 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/hpack/hpack.go @@ -0,0 +1,542 @@ +// 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. + +// Package hpack implements HPACK, a compression format for +// efficiently representing HTTP header fields in the context of HTTP/2. +// +// See http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-09 +package hpack + +import ( + "bytes" + "errors" + "fmt" +) + +// A DecodingError is something the spec defines as a decoding error. +type DecodingError struct { + Err error +} + +func (de DecodingError) Error() string { + return fmt.Sprintf("decoding error: %v", de.Err) +} + +// An InvalidIndexError is returned when an encoder references a table +// entry before the static table or after the end of the dynamic table. +type InvalidIndexError int + +func (e InvalidIndexError) Error() string { + return fmt.Sprintf("invalid indexed representation index %d", int(e)) +} + +// A HeaderField is a name-value pair. Both the name and value are +// treated as opaque sequences of octets. +type HeaderField struct { + Name, Value string + + // Sensitive means that this header field should never be + // indexed. + Sensitive bool +} + +// IsPseudo reports whether the header field is an http2 pseudo header. +// That is, it reports whether it starts with a colon. +// It is not otherwise guaranteed to be a valid pseudo header field, +// though. +func (hf HeaderField) IsPseudo() bool { + return len(hf.Name) != 0 && hf.Name[0] == ':' +} + +func (hf HeaderField) String() string { + var suffix string + if hf.Sensitive { + suffix = " (sensitive)" + } + return fmt.Sprintf("header field %q = %q%s", hf.Name, hf.Value, suffix) +} + +// Size returns the size of an entry per RFC 7540 section 5.2. +func (hf HeaderField) Size() uint32 { + // http://http2.github.io/http2-spec/compression.html#rfc.section.4.1 + // "The size of the dynamic table is the sum of the size of + // its entries. The size of an entry is the sum of its name's + // length in octets (as defined in Section 5.2), its value's + // length in octets (see Section 5.2), plus 32. The size of + // an entry is calculated using the length of the name and + // value without any Huffman encoding applied." + + // This can overflow if somebody makes a large HeaderField + // Name and/or Value by hand, but we don't care, because that + // won't happen on the wire because the encoding doesn't allow + // it. + return uint32(len(hf.Name) + len(hf.Value) + 32) +} + +// A Decoder is the decoding context for incremental processing of +// header blocks. +type Decoder struct { + dynTab dynamicTable + emit func(f HeaderField) + + emitEnabled bool // whether calls to emit are enabled + maxStrLen int // 0 means unlimited + + // buf is the unparsed buffer. It's only written to + // saveBuf if it was truncated in the middle of a header + // block. Because it's usually not owned, we can only + // process it under Write. + buf []byte // not owned; only valid during Write + + // saveBuf is previous data passed to Write which we weren't able + // to fully parse before. Unlike buf, we own this data. + saveBuf bytes.Buffer +} + +// NewDecoder returns a new decoder with the provided maximum dynamic +// table size. The emitFunc will be called for each valid field +// parsed, in the same goroutine as calls to Write, before Write returns. +func NewDecoder(maxDynamicTableSize uint32, emitFunc func(f HeaderField)) *Decoder { + d := &Decoder{ + emit: emitFunc, + emitEnabled: true, + } + d.dynTab.allowedMaxSize = maxDynamicTableSize + d.dynTab.setMaxSize(maxDynamicTableSize) + return d +} + +// ErrStringLength is returned by Decoder.Write when the max string length +// (as configured by Decoder.SetMaxStringLength) would be violated. +var ErrStringLength = errors.New("hpack: string too long") + +// SetMaxStringLength sets the maximum size of a HeaderField name or +// value string. If a string exceeds this length (even after any +// decompression), Write will return ErrStringLength. +// A value of 0 means unlimited and is the default from NewDecoder. +func (d *Decoder) SetMaxStringLength(n int) { + d.maxStrLen = n +} + +// SetEmitFunc changes the callback used when new header fields +// are decoded. +// It must be non-nil. It does not affect EmitEnabled. +func (d *Decoder) SetEmitFunc(emitFunc func(f HeaderField)) { + d.emit = emitFunc +} + +// SetEmitEnabled controls whether the emitFunc provided to NewDecoder +// should be called. The default is true. +// +// This facility exists to let servers enforce MAX_HEADER_LIST_SIZE +// while still decoding and keeping in-sync with decoder state, but +// without doing unnecessary decompression or generating unnecessary +// garbage for header fields past the limit. +func (d *Decoder) SetEmitEnabled(v bool) { d.emitEnabled = v } + +// EmitEnabled reports whether calls to the emitFunc provided to NewDecoder +// are currently enabled. The default is true. +func (d *Decoder) EmitEnabled() bool { return d.emitEnabled } + +// TODO: add method *Decoder.Reset(maxSize, emitFunc) to let callers re-use Decoders and their +// underlying buffers for garbage reasons. + +func (d *Decoder) SetMaxDynamicTableSize(v uint32) { + d.dynTab.setMaxSize(v) +} + +// SetAllowedMaxDynamicTableSize sets the upper bound that the encoded +// stream (via dynamic table size updates) may set the maximum size +// to. +func (d *Decoder) SetAllowedMaxDynamicTableSize(v uint32) { + d.dynTab.allowedMaxSize = v +} + +type dynamicTable struct { + // ents is the FIFO described at + // http://http2.github.io/http2-spec/compression.html#rfc.section.2.3.2 + // The newest (low index) is append at the end, and items are + // evicted from the front. + ents []HeaderField + size uint32 + maxSize uint32 // current maxSize + allowedMaxSize uint32 // maxSize may go up to this, inclusive +} + +func (dt *dynamicTable) setMaxSize(v uint32) { + dt.maxSize = v + dt.evict() +} + +// TODO: change dynamicTable to be a struct with a slice and a size int field, +// per http://http2.github.io/http2-spec/compression.html#rfc.section.4.1: +// +// +// Then make add increment the size. maybe the max size should move from Decoder to +// dynamicTable and add should return an ok bool if there was enough space. +// +// Later we'll need a remove operation on dynamicTable. + +func (dt *dynamicTable) add(f HeaderField) { + dt.ents = append(dt.ents, f) + dt.size += f.Size() + dt.evict() +} + +// If we're too big, evict old stuff (front of the slice) +func (dt *dynamicTable) evict() { + base := dt.ents // keep base pointer of slice + for dt.size > dt.maxSize { + dt.size -= dt.ents[0].Size() + dt.ents = dt.ents[1:] + } + + // Shift slice contents down if we evicted things. + if len(dt.ents) != len(base) { + copy(base, dt.ents) + dt.ents = base[:len(dt.ents)] + } +} + +// constantTimeStringCompare compares string a and b in a constant +// time manner. +func constantTimeStringCompare(a, b string) bool { + if len(a) != len(b) { + return false + } + + c := byte(0) + + for i := 0; i < len(a); i++ { + c |= a[i] ^ b[i] + } + + return c == 0 +} + +// Search searches f in the table. The return value i is 0 if there is +// no name match. If there is name match or name/value match, i is the +// index of that entry (1-based). If both name and value match, +// nameValueMatch becomes true. +func (dt *dynamicTable) search(f HeaderField) (i uint64, nameValueMatch bool) { + l := len(dt.ents) + for j := l - 1; j >= 0; j-- { + ent := dt.ents[j] + if !constantTimeStringCompare(ent.Name, f.Name) { + continue + } + if i == 0 { + i = uint64(l - j) + } + if f.Sensitive { + continue + } + if !constantTimeStringCompare(ent.Value, f.Value) { + continue + } + i = uint64(l - j) + nameValueMatch = true + return + } + return +} + +func (d *Decoder) maxTableIndex() int { + return len(d.dynTab.ents) + len(staticTable) +} + +func (d *Decoder) at(i uint64) (hf HeaderField, ok bool) { + if i < 1 { + return + } + if i > uint64(d.maxTableIndex()) { + return + } + if i <= uint64(len(staticTable)) { + return staticTable[i-1], true + } + dents := d.dynTab.ents + return dents[len(dents)-(int(i)-len(staticTable))], true +} + +// Decode decodes an entire block. +// +// TODO: remove this method and make it incremental later? This is +// easier for debugging now. +func (d *Decoder) DecodeFull(p []byte) ([]HeaderField, error) { + var hf []HeaderField + saveFunc := d.emit + defer func() { d.emit = saveFunc }() + d.emit = func(f HeaderField) { hf = append(hf, f) } + if _, err := d.Write(p); err != nil { + return nil, err + } + if err := d.Close(); err != nil { + return nil, err + } + return hf, nil +} + +func (d *Decoder) Close() error { + if d.saveBuf.Len() > 0 { + d.saveBuf.Reset() + return DecodingError{errors.New("truncated headers")} + } + return nil +} + +func (d *Decoder) Write(p []byte) (n int, err error) { + if len(p) == 0 { + // Prevent state machine CPU attacks (making us redo + // work up to the point of finding out we don't have + // enough data) + return + } + // Only copy the data if we have to. Optimistically assume + // that p will contain a complete header block. + if d.saveBuf.Len() == 0 { + d.buf = p + } else { + d.saveBuf.Write(p) + d.buf = d.saveBuf.Bytes() + d.saveBuf.Reset() + } + + for len(d.buf) > 0 { + err = d.parseHeaderFieldRepr() + if err == errNeedMore { + // Extra paranoia, making sure saveBuf won't + // get too large. All the varint and string + // reading code earlier should already catch + // overlong things and return ErrStringLength, + // but keep this as a last resort. + const varIntOverhead = 8 // conservative + if d.maxStrLen != 0 && int64(len(d.buf)) > 2*(int64(d.maxStrLen)+varIntOverhead) { + return 0, ErrStringLength + } + d.saveBuf.Write(d.buf) + return len(p), nil + } + if err != nil { + break + } + } + return len(p), err +} + +// errNeedMore is an internal sentinel error value that means the +// buffer is truncated and we need to read more data before we can +// continue parsing. +var errNeedMore = errors.New("need more data") + +type indexType int + +const ( + indexedTrue indexType = iota + indexedFalse + indexedNever +) + +func (v indexType) indexed() bool { return v == indexedTrue } +func (v indexType) sensitive() bool { return v == indexedNever } + +// returns errNeedMore if there isn't enough data available. +// any other error is fatal. +// consumes d.buf iff it returns nil. +// precondition: must be called with len(d.buf) > 0 +func (d *Decoder) parseHeaderFieldRepr() error { + b := d.buf[0] + switch { + case b&128 != 0: + // Indexed representation. + // High bit set? + // http://http2.github.io/http2-spec/compression.html#rfc.section.6.1 + return d.parseFieldIndexed() + case b&192 == 64: + // 6.2.1 Literal Header Field with Incremental Indexing + // 0b10xxxxxx: top two bits are 10 + // http://http2.github.io/http2-spec/compression.html#rfc.section.6.2.1 + return d.parseFieldLiteral(6, indexedTrue) + case b&240 == 0: + // 6.2.2 Literal Header Field without Indexing + // 0b0000xxxx: top four bits are 0000 + // http://http2.github.io/http2-spec/compression.html#rfc.section.6.2.2 + return d.parseFieldLiteral(4, indexedFalse) + case b&240 == 16: + // 6.2.3 Literal Header Field never Indexed + // 0b0001xxxx: top four bits are 0001 + // http://http2.github.io/http2-spec/compression.html#rfc.section.6.2.3 + return d.parseFieldLiteral(4, indexedNever) + case b&224 == 32: + // 6.3 Dynamic Table Size Update + // Top three bits are '001'. + // http://http2.github.io/http2-spec/compression.html#rfc.section.6.3 + return d.parseDynamicTableSizeUpdate() + } + + return DecodingError{errors.New("invalid encoding")} +} + +// (same invariants and behavior as parseHeaderFieldRepr) +func (d *Decoder) parseFieldIndexed() error { + buf := d.buf + idx, buf, err := readVarInt(7, buf) + if err != nil { + return err + } + hf, ok := d.at(idx) + if !ok { + return DecodingError{InvalidIndexError(idx)} + } + d.buf = buf + return d.callEmit(HeaderField{Name: hf.Name, Value: hf.Value}) +} + +// (same invariants and behavior as parseHeaderFieldRepr) +func (d *Decoder) parseFieldLiteral(n uint8, it indexType) error { + buf := d.buf + nameIdx, buf, err := readVarInt(n, buf) + if err != nil { + return err + } + + var hf HeaderField + wantStr := d.emitEnabled || it.indexed() + if nameIdx > 0 { + ihf, ok := d.at(nameIdx) + if !ok { + return DecodingError{InvalidIndexError(nameIdx)} + } + hf.Name = ihf.Name + } else { + hf.Name, buf, err = d.readString(buf, wantStr) + if err != nil { + return err + } + } + hf.Value, buf, err = d.readString(buf, wantStr) + if err != nil { + return err + } + d.buf = buf + if it.indexed() { + d.dynTab.add(hf) + } + hf.Sensitive = it.sensitive() + return d.callEmit(hf) +} + +func (d *Decoder) callEmit(hf HeaderField) error { + if d.maxStrLen != 0 { + if len(hf.Name) > d.maxStrLen || len(hf.Value) > d.maxStrLen { + return ErrStringLength + } + } + if d.emitEnabled { + d.emit(hf) + } + return nil +} + +// (same invariants and behavior as parseHeaderFieldRepr) +func (d *Decoder) parseDynamicTableSizeUpdate() error { + buf := d.buf + size, buf, err := readVarInt(5, buf) + if err != nil { + return err + } + if size > uint64(d.dynTab.allowedMaxSize) { + return DecodingError{errors.New("dynamic table size update too large")} + } + d.dynTab.setMaxSize(uint32(size)) + d.buf = buf + return nil +} + +var errVarintOverflow = DecodingError{errors.New("varint integer overflow")} + +// readVarInt reads an unsigned variable length integer off the +// beginning of p. n is the parameter as described in +// http://http2.github.io/http2-spec/compression.html#rfc.section.5.1. +// +// n must always be between 1 and 8. +// +// The returned remain buffer is either a smaller suffix of p, or err != nil. +// The error is errNeedMore if p doesn't contain a complete integer. +func readVarInt(n byte, p []byte) (i uint64, remain []byte, err error) { + if n < 1 || n > 8 { + panic("bad n") + } + if len(p) == 0 { + return 0, p, errNeedMore + } + i = uint64(p[0]) + if n < 8 { + i &= (1 << uint64(n)) - 1 + } + if i < (1< 0 { + b := p[0] + p = p[1:] + i += uint64(b&127) << m + if b&128 == 0 { + return i, p, nil + } + m += 7 + if m >= 63 { // TODO: proper overflow check. making this up. + return 0, origP, errVarintOverflow + } + } + return 0, origP, errNeedMore +} + +// readString decodes an hpack string from p. +// +// wantStr is whether s will be used. If false, decompression and +// []byte->string garbage are skipped if s will be ignored +// anyway. This does mean that huffman decoding errors for non-indexed +// strings past the MAX_HEADER_LIST_SIZE are ignored, but the server +// is returning an error anyway, and because they're not indexed, the error +// won't affect the decoding state. +func (d *Decoder) readString(p []byte, wantStr bool) (s string, remain []byte, err error) { + if len(p) == 0 { + return "", p, errNeedMore + } + isHuff := p[0]&128 != 0 + strLen, p, err := readVarInt(7, p) + if err != nil { + return "", p, err + } + if d.maxStrLen != 0 && strLen > uint64(d.maxStrLen) { + return "", nil, ErrStringLength + } + if uint64(len(p)) < strLen { + return "", p, errNeedMore + } + if !isHuff { + if wantStr { + s = string(p[:strLen]) + } + return s, p[strLen:], nil + } + + if wantStr { + buf := bufPool.Get().(*bytes.Buffer) + buf.Reset() // don't trust others + defer bufPool.Put(buf) + if err := huffmanDecode(buf, d.maxStrLen, p[:strLen]); err != nil { + buf.Reset() + return "", nil, err + } + s = buf.String() + buf.Reset() // be nice to GC + } + return s, p[strLen:], nil +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/hpack/huffman.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/hpack/huffman.go new file mode 100644 index 0000000000000..8850e3946770e --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/hpack/huffman.go @@ -0,0 +1,212 @@ +// 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. + +package hpack + +import ( + "bytes" + "errors" + "io" + "sync" +) + +var bufPool = sync.Pool{ + New: func() interface{} { return new(bytes.Buffer) }, +} + +// HuffmanDecode decodes the string in v and writes the expanded +// result to w, returning the number of bytes written to w and the +// Write call's return value. At most one Write call is made. +func HuffmanDecode(w io.Writer, v []byte) (int, error) { + buf := bufPool.Get().(*bytes.Buffer) + buf.Reset() + defer bufPool.Put(buf) + if err := huffmanDecode(buf, 0, v); err != nil { + return 0, err + } + return w.Write(buf.Bytes()) +} + +// HuffmanDecodeToString decodes the string in v. +func HuffmanDecodeToString(v []byte) (string, error) { + buf := bufPool.Get().(*bytes.Buffer) + buf.Reset() + defer bufPool.Put(buf) + if err := huffmanDecode(buf, 0, v); err != nil { + return "", err + } + return buf.String(), nil +} + +// ErrInvalidHuffman is returned for errors found decoding +// Huffman-encoded strings. +var ErrInvalidHuffman = errors.New("hpack: invalid Huffman-encoded data") + +// huffmanDecode decodes v to buf. +// If maxLen is greater than 0, attempts to write more to buf than +// maxLen bytes will return ErrStringLength. +func huffmanDecode(buf *bytes.Buffer, maxLen int, v []byte) error { + n := rootHuffmanNode + // cur is the bit buffer that has not been fed into n. + // cbits is the number of low order bits in cur that are valid. + // sbits is the number of bits of the symbol prefix being decoded. + cur, cbits, sbits := uint(0), uint8(0), uint8(0) + for _, b := range v { + cur = cur<<8 | uint(b) + cbits += 8 + sbits += 8 + for cbits >= 8 { + idx := byte(cur >> (cbits - 8)) + n = n.children[idx] + if n == nil { + return ErrInvalidHuffman + } + if n.children == nil { + if maxLen != 0 && buf.Len() == maxLen { + return ErrStringLength + } + buf.WriteByte(n.sym) + cbits -= n.codeLen + n = rootHuffmanNode + sbits = cbits + } else { + cbits -= 8 + } + } + } + for cbits > 0 { + n = n.children[byte(cur<<(8-cbits))] + if n == nil { + return ErrInvalidHuffman + } + if n.children != nil || n.codeLen > cbits { + break + } + if maxLen != 0 && buf.Len() == maxLen { + return ErrStringLength + } + buf.WriteByte(n.sym) + cbits -= n.codeLen + n = rootHuffmanNode + sbits = cbits + } + if sbits > 7 { + // Either there was an incomplete symbol, or overlong padding. + // Both are decoding errors per RFC 7541 section 5.2. + return ErrInvalidHuffman + } + if mask := uint(1< 8 { + codeLen -= 8 + i := uint8(code >> codeLen) + if cur.children[i] == nil { + cur.children[i] = newInternalNode() + } + cur = cur.children[i] + } + shift := 8 - codeLen + start, end := int(uint8(code<> (nbits - rembits)) + dst[len(dst)-1] |= t + } + + return dst +} + +// HuffmanEncodeLength returns the number of bytes required to encode +// s in Huffman codes. The result is round up to byte boundary. +func HuffmanEncodeLength(s string) uint64 { + n := uint64(0) + for i := 0; i < len(s); i++ { + n += uint64(huffmanCodeLen[s[i]]) + } + return (n + 7) / 8 +} + +// appendByteToHuffmanCode appends Huffman code for c to dst and +// returns the extended buffer and the remaining bits in the last +// element. The appending is not byte aligned and the remaining bits +// in the last element of dst is given in rembits. +func appendByteToHuffmanCode(dst []byte, rembits uint8, c byte) ([]byte, uint8) { + code := huffmanCodes[c] + nbits := huffmanCodeLen[c] + + for { + if rembits > nbits { + t := uint8(code << (rembits - nbits)) + dst[len(dst)-1] |= t + rembits -= nbits + break + } + + t := uint8(code >> (nbits - rembits)) + dst[len(dst)-1] |= t + + nbits -= rembits + rembits = 8 + + if nbits == 0 { + break + } + + dst = append(dst, 0) + } + + return dst, rembits +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/hpack/tables.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/hpack/tables.go new file mode 100644 index 0000000000000..b9283a0233023 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/hpack/tables.go @@ -0,0 +1,352 @@ +// 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. + +package hpack + +func pair(name, value string) HeaderField { + return HeaderField{Name: name, Value: value} +} + +// http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-07#appendix-B +var staticTable = [...]HeaderField{ + pair(":authority", ""), // index 1 (1-based) + pair(":method", "GET"), + pair(":method", "POST"), + pair(":path", "/"), + pair(":path", "/index.html"), + pair(":scheme", "http"), + pair(":scheme", "https"), + pair(":status", "200"), + pair(":status", "204"), + pair(":status", "206"), + pair(":status", "304"), + pair(":status", "400"), + pair(":status", "404"), + pair(":status", "500"), + pair("accept-charset", ""), + pair("accept-encoding", "gzip, deflate"), + pair("accept-language", ""), + pair("accept-ranges", ""), + pair("accept", ""), + pair("access-control-allow-origin", ""), + pair("age", ""), + pair("allow", ""), + pair("authorization", ""), + pair("cache-control", ""), + pair("content-disposition", ""), + pair("content-encoding", ""), + pair("content-language", ""), + pair("content-length", ""), + pair("content-location", ""), + pair("content-range", ""), + pair("content-type", ""), + pair("cookie", ""), + pair("date", ""), + pair("etag", ""), + pair("expect", ""), + pair("expires", ""), + pair("from", ""), + pair("host", ""), + pair("if-match", ""), + pair("if-modified-since", ""), + pair("if-none-match", ""), + pair("if-range", ""), + pair("if-unmodified-since", ""), + pair("last-modified", ""), + pair("link", ""), + pair("location", ""), + pair("max-forwards", ""), + pair("proxy-authenticate", ""), + pair("proxy-authorization", ""), + pair("range", ""), + pair("referer", ""), + pair("refresh", ""), + pair("retry-after", ""), + pair("server", ""), + pair("set-cookie", ""), + pair("strict-transport-security", ""), + pair("transfer-encoding", ""), + pair("user-agent", ""), + pair("vary", ""), + pair("via", ""), + pair("www-authenticate", ""), +} + +var huffmanCodes = [256]uint32{ + 0x1ff8, + 0x7fffd8, + 0xfffffe2, + 0xfffffe3, + 0xfffffe4, + 0xfffffe5, + 0xfffffe6, + 0xfffffe7, + 0xfffffe8, + 0xffffea, + 0x3ffffffc, + 0xfffffe9, + 0xfffffea, + 0x3ffffffd, + 0xfffffeb, + 0xfffffec, + 0xfffffed, + 0xfffffee, + 0xfffffef, + 0xffffff0, + 0xffffff1, + 0xffffff2, + 0x3ffffffe, + 0xffffff3, + 0xffffff4, + 0xffffff5, + 0xffffff6, + 0xffffff7, + 0xffffff8, + 0xffffff9, + 0xffffffa, + 0xffffffb, + 0x14, + 0x3f8, + 0x3f9, + 0xffa, + 0x1ff9, + 0x15, + 0xf8, + 0x7fa, + 0x3fa, + 0x3fb, + 0xf9, + 0x7fb, + 0xfa, + 0x16, + 0x17, + 0x18, + 0x0, + 0x1, + 0x2, + 0x19, + 0x1a, + 0x1b, + 0x1c, + 0x1d, + 0x1e, + 0x1f, + 0x5c, + 0xfb, + 0x7ffc, + 0x20, + 0xffb, + 0x3fc, + 0x1ffa, + 0x21, + 0x5d, + 0x5e, + 0x5f, + 0x60, + 0x61, + 0x62, + 0x63, + 0x64, + 0x65, + 0x66, + 0x67, + 0x68, + 0x69, + 0x6a, + 0x6b, + 0x6c, + 0x6d, + 0x6e, + 0x6f, + 0x70, + 0x71, + 0x72, + 0xfc, + 0x73, + 0xfd, + 0x1ffb, + 0x7fff0, + 0x1ffc, + 0x3ffc, + 0x22, + 0x7ffd, + 0x3, + 0x23, + 0x4, + 0x24, + 0x5, + 0x25, + 0x26, + 0x27, + 0x6, + 0x74, + 0x75, + 0x28, + 0x29, + 0x2a, + 0x7, + 0x2b, + 0x76, + 0x2c, + 0x8, + 0x9, + 0x2d, + 0x77, + 0x78, + 0x79, + 0x7a, + 0x7b, + 0x7ffe, + 0x7fc, + 0x3ffd, + 0x1ffd, + 0xffffffc, + 0xfffe6, + 0x3fffd2, + 0xfffe7, + 0xfffe8, + 0x3fffd3, + 0x3fffd4, + 0x3fffd5, + 0x7fffd9, + 0x3fffd6, + 0x7fffda, + 0x7fffdb, + 0x7fffdc, + 0x7fffdd, + 0x7fffde, + 0xffffeb, + 0x7fffdf, + 0xffffec, + 0xffffed, + 0x3fffd7, + 0x7fffe0, + 0xffffee, + 0x7fffe1, + 0x7fffe2, + 0x7fffe3, + 0x7fffe4, + 0x1fffdc, + 0x3fffd8, + 0x7fffe5, + 0x3fffd9, + 0x7fffe6, + 0x7fffe7, + 0xffffef, + 0x3fffda, + 0x1fffdd, + 0xfffe9, + 0x3fffdb, + 0x3fffdc, + 0x7fffe8, + 0x7fffe9, + 0x1fffde, + 0x7fffea, + 0x3fffdd, + 0x3fffde, + 0xfffff0, + 0x1fffdf, + 0x3fffdf, + 0x7fffeb, + 0x7fffec, + 0x1fffe0, + 0x1fffe1, + 0x3fffe0, + 0x1fffe2, + 0x7fffed, + 0x3fffe1, + 0x7fffee, + 0x7fffef, + 0xfffea, + 0x3fffe2, + 0x3fffe3, + 0x3fffe4, + 0x7ffff0, + 0x3fffe5, + 0x3fffe6, + 0x7ffff1, + 0x3ffffe0, + 0x3ffffe1, + 0xfffeb, + 0x7fff1, + 0x3fffe7, + 0x7ffff2, + 0x3fffe8, + 0x1ffffec, + 0x3ffffe2, + 0x3ffffe3, + 0x3ffffe4, + 0x7ffffde, + 0x7ffffdf, + 0x3ffffe5, + 0xfffff1, + 0x1ffffed, + 0x7fff2, + 0x1fffe3, + 0x3ffffe6, + 0x7ffffe0, + 0x7ffffe1, + 0x3ffffe7, + 0x7ffffe2, + 0xfffff2, + 0x1fffe4, + 0x1fffe5, + 0x3ffffe8, + 0x3ffffe9, + 0xffffffd, + 0x7ffffe3, + 0x7ffffe4, + 0x7ffffe5, + 0xfffec, + 0xfffff3, + 0xfffed, + 0x1fffe6, + 0x3fffe9, + 0x1fffe7, + 0x1fffe8, + 0x7ffff3, + 0x3fffea, + 0x3fffeb, + 0x1ffffee, + 0x1ffffef, + 0xfffff4, + 0xfffff5, + 0x3ffffea, + 0x7ffff4, + 0x3ffffeb, + 0x7ffffe6, + 0x3ffffec, + 0x3ffffed, + 0x7ffffe7, + 0x7ffffe8, + 0x7ffffe9, + 0x7ffffea, + 0x7ffffeb, + 0xffffffe, + 0x7ffffec, + 0x7ffffed, + 0x7ffffee, + 0x7ffffef, + 0x7fffff0, + 0x3ffffee, +} + +var huffmanCodeLen = [256]uint8{ + 13, 23, 28, 28, 28, 28, 28, 28, 28, 24, 30, 28, 28, 30, 28, 28, + 28, 28, 28, 28, 28, 28, 30, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 6, 10, 10, 12, 13, 6, 8, 11, 10, 10, 8, 11, 8, 6, 6, 6, + 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 8, 15, 6, 12, 10, + 13, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 8, 7, 8, 13, 19, 13, 14, 6, + 15, 5, 6, 5, 6, 5, 6, 6, 6, 5, 7, 7, 6, 6, 6, 5, + 6, 7, 6, 5, 5, 6, 7, 7, 7, 7, 7, 15, 11, 14, 13, 28, + 20, 22, 20, 20, 22, 22, 22, 23, 22, 23, 23, 23, 23, 23, 24, 23, + 24, 24, 22, 23, 24, 23, 23, 23, 23, 21, 22, 23, 22, 23, 23, 24, + 22, 21, 20, 22, 22, 23, 23, 21, 23, 22, 22, 24, 21, 22, 23, 23, + 21, 21, 22, 21, 23, 22, 23, 23, 20, 22, 22, 22, 23, 22, 22, 23, + 26, 26, 20, 19, 22, 23, 22, 25, 26, 26, 26, 27, 27, 26, 24, 25, + 19, 21, 26, 27, 27, 26, 27, 24, 21, 21, 26, 26, 28, 27, 27, 27, + 20, 24, 20, 21, 22, 21, 21, 23, 22, 22, 25, 25, 24, 24, 26, 23, + 26, 27, 26, 26, 27, 27, 27, 27, 27, 28, 27, 27, 27, 27, 27, 26, +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/http2.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/http2.go new file mode 100644 index 0000000000000..0173aed64a337 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/http2.go @@ -0,0 +1,351 @@ +// 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. + +// Package http2 implements the HTTP/2 protocol. +// +// This package is low-level and intended to be used directly by very +// few people. Most users will use it indirectly through the automatic +// use by the net/http package (from Go 1.6 and later). +// For use in earlier Go versions see ConfigureServer. (Transport support +// requires Go 1.6 or later) +// +// See https://http2.github.io/ for more information on HTTP/2. +// +// See https://http2.golang.org/ for a test server running this code. +package http2 + +import ( + "bufio" + "crypto/tls" + "errors" + "fmt" + "io" + "net/http" + "os" + "sort" + "strconv" + "strings" + "sync" + + "golang.org/x/net/lex/httplex" +) + +var ( + VerboseLogs bool + logFrameWrites bool + logFrameReads bool +) + +func init() { + e := os.Getenv("GODEBUG") + if strings.Contains(e, "http2debug=1") { + VerboseLogs = true + } + if strings.Contains(e, "http2debug=2") { + VerboseLogs = true + logFrameWrites = true + logFrameReads = true + } +} + +const ( + // ClientPreface is the string that must be sent by new + // connections from clients. + ClientPreface = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" + + // SETTINGS_MAX_FRAME_SIZE default + // http://http2.github.io/http2-spec/#rfc.section.6.5.2 + initialMaxFrameSize = 16384 + + // NextProtoTLS is the NPN/ALPN protocol negotiated during + // HTTP/2's TLS setup. + NextProtoTLS = "h2" + + // http://http2.github.io/http2-spec/#SettingValues + initialHeaderTableSize = 4096 + + initialWindowSize = 65535 // 6.9.2 Initial Flow Control Window Size + + defaultMaxReadFrameSize = 1 << 20 +) + +var ( + clientPreface = []byte(ClientPreface) +) + +type streamState int + +const ( + stateIdle streamState = iota + stateOpen + stateHalfClosedLocal + stateHalfClosedRemote + stateResvLocal + stateResvRemote + stateClosed +) + +var stateName = [...]string{ + stateIdle: "Idle", + stateOpen: "Open", + stateHalfClosedLocal: "HalfClosedLocal", + stateHalfClosedRemote: "HalfClosedRemote", + stateResvLocal: "ResvLocal", + stateResvRemote: "ResvRemote", + stateClosed: "Closed", +} + +func (st streamState) String() string { + return stateName[st] +} + +// Setting is a setting parameter: which setting it is, and its value. +type Setting struct { + // ID is which setting is being set. + // See http://http2.github.io/http2-spec/#SettingValues + ID SettingID + + // Val is the value. + Val uint32 +} + +func (s Setting) String() string { + return fmt.Sprintf("[%v = %d]", s.ID, s.Val) +} + +// Valid reports whether the setting is valid. +func (s Setting) Valid() error { + // Limits and error codes from 6.5.2 Defined SETTINGS Parameters + switch s.ID { + case SettingEnablePush: + if s.Val != 1 && s.Val != 0 { + return ConnectionError(ErrCodeProtocol) + } + case SettingInitialWindowSize: + if s.Val > 1<<31-1 { + return ConnectionError(ErrCodeFlowControl) + } + case SettingMaxFrameSize: + if s.Val < 16384 || s.Val > 1<<24-1 { + return ConnectionError(ErrCodeProtocol) + } + } + return nil +} + +// A SettingID is an HTTP/2 setting as defined in +// http://http2.github.io/http2-spec/#iana-settings +type SettingID uint16 + +const ( + SettingHeaderTableSize SettingID = 0x1 + SettingEnablePush SettingID = 0x2 + SettingMaxConcurrentStreams SettingID = 0x3 + SettingInitialWindowSize SettingID = 0x4 + SettingMaxFrameSize SettingID = 0x5 + SettingMaxHeaderListSize SettingID = 0x6 +) + +var settingName = map[SettingID]string{ + SettingHeaderTableSize: "HEADER_TABLE_SIZE", + SettingEnablePush: "ENABLE_PUSH", + SettingMaxConcurrentStreams: "MAX_CONCURRENT_STREAMS", + SettingInitialWindowSize: "INITIAL_WINDOW_SIZE", + SettingMaxFrameSize: "MAX_FRAME_SIZE", + SettingMaxHeaderListSize: "MAX_HEADER_LIST_SIZE", +} + +func (s SettingID) String() string { + if v, ok := settingName[s]; ok { + return v + } + return fmt.Sprintf("UNKNOWN_SETTING_%d", uint16(s)) +} + +var ( + errInvalidHeaderFieldName = errors.New("http2: invalid header field name") + errInvalidHeaderFieldValue = errors.New("http2: invalid header field value") +) + +// validWireHeaderFieldName reports whether v is a valid header field +// name (key). See httplex.ValidHeaderName for the base rules. +// +// Further, http2 says: +// "Just as in HTTP/1.x, header field names are strings of ASCII +// characters that are compared in a case-insensitive +// fashion. However, header field names MUST be converted to +// lowercase prior to their encoding in HTTP/2. " +func validWireHeaderFieldName(v string) bool { + if len(v) == 0 { + return false + } + for _, r := range v { + if !httplex.IsTokenRune(r) { + return false + } + if 'A' <= r && r <= 'Z' { + return false + } + } + return true +} + +var httpCodeStringCommon = map[int]string{} // n -> strconv.Itoa(n) + +func init() { + for i := 100; i <= 999; i++ { + if v := http.StatusText(i); v != "" { + httpCodeStringCommon[i] = strconv.Itoa(i) + } + } +} + +func httpCodeString(code int) string { + if s, ok := httpCodeStringCommon[code]; ok { + return s + } + return strconv.Itoa(code) +} + +// from pkg io +type stringWriter interface { + WriteString(s string) (n int, err error) +} + +// A gate lets two goroutines coordinate their activities. +type gate chan struct{} + +func (g gate) Done() { g <- struct{}{} } +func (g gate) Wait() { <-g } + +// A closeWaiter is like a sync.WaitGroup but only goes 1 to 0 (open to closed). +type closeWaiter chan struct{} + +// Init makes a closeWaiter usable. +// It exists because so a closeWaiter value can be placed inside a +// larger struct and have the Mutex and Cond's memory in the same +// allocation. +func (cw *closeWaiter) Init() { + *cw = make(chan struct{}) +} + +// Close marks the closeWaiter as closed and unblocks any waiters. +func (cw closeWaiter) Close() { + close(cw) +} + +// Wait waits for the closeWaiter to become closed. +func (cw closeWaiter) Wait() { + <-cw +} + +// bufferedWriter is a buffered writer that writes to w. +// Its buffered writer is lazily allocated as needed, to minimize +// idle memory usage with many connections. +type bufferedWriter struct { + w io.Writer // immutable + bw *bufio.Writer // non-nil when data is buffered +} + +func newBufferedWriter(w io.Writer) *bufferedWriter { + return &bufferedWriter{w: w} +} + +var bufWriterPool = sync.Pool{ + New: func() interface{} { + // TODO: pick something better? this is a bit under + // (3 x typical 1500 byte MTU) at least. + return bufio.NewWriterSize(nil, 4<<10) + }, +} + +func (w *bufferedWriter) Write(p []byte) (n int, err error) { + if w.bw == nil { + bw := bufWriterPool.Get().(*bufio.Writer) + bw.Reset(w.w) + w.bw = bw + } + return w.bw.Write(p) +} + +func (w *bufferedWriter) Flush() error { + bw := w.bw + if bw == nil { + return nil + } + err := bw.Flush() + bw.Reset(nil) + bufWriterPool.Put(bw) + w.bw = nil + return err +} + +func mustUint31(v int32) uint32 { + if v < 0 || v > 2147483647 { + panic("out of range") + } + return uint32(v) +} + +// bodyAllowedForStatus reports whether a given response status code +// permits a body. See RFC 2616, section 4.4. +func bodyAllowedForStatus(status int) bool { + switch { + case status >= 100 && status <= 199: + return false + case status == 204: + return false + case status == 304: + return false + } + return true +} + +type httpError struct { + msg string + timeout bool +} + +func (e *httpError) Error() string { return e.msg } +func (e *httpError) Timeout() bool { return e.timeout } +func (e *httpError) Temporary() bool { return true } + +var errTimeout error = &httpError{msg: "http2: timeout awaiting response headers", timeout: true} + +type connectionStater interface { + ConnectionState() tls.ConnectionState +} + +var sorterPool = sync.Pool{New: func() interface{} { return new(sorter) }} + +type sorter struct { + v []string // owned by sorter +} + +func (s *sorter) Len() int { return len(s.v) } +func (s *sorter) Swap(i, j int) { s.v[i], s.v[j] = s.v[j], s.v[i] } +func (s *sorter) Less(i, j int) bool { return s.v[i] < s.v[j] } + +// Keys returns the sorted keys of h. +// +// The returned slice is only valid until s used again or returned to +// its pool. +func (s *sorter) Keys(h http.Header) []string { + keys := s.v[:0] + for k := range h { + keys = append(keys, k) + } + s.v = keys + sort.Sort(s) + return keys +} + +func (s *sorter) SortStrings(ss []string) { + // Our sorter works on s.v, which sorter owners, so + // stash it away while we sort the user's buffer. + save := s.v + s.v = ss + sort.Sort(s) + s.v = save +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/not_go16.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/not_go16.go new file mode 100644 index 0000000000000..efd2e1282cf60 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/not_go16.go @@ -0,0 +1,46 @@ +// Copyright 2015 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 !go1.6 + +package http2 + +import ( + "crypto/tls" + "net/http" + "time" +) + +func configureTransport(t1 *http.Transport) (*Transport, error) { + return nil, errTransportVersion +} + +func transportExpectContinueTimeout(t1 *http.Transport) time.Duration { + return 0 + +} + +// isBadCipher reports whether the cipher is blacklisted by the HTTP/2 spec. +func isBadCipher(cipher uint16) bool { + switch cipher { + case tls.TLS_RSA_WITH_RC4_128_SHA, + tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA, + tls.TLS_RSA_WITH_AES_128_CBC_SHA, + tls.TLS_RSA_WITH_AES_256_CBC_SHA, + tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, + tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, + tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, + tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA, + tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, + tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, + tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA: + // Reject cipher suites from Appendix A. + // "This list includes those cipher suites that do not + // offer an ephemeral key exchange and those that are + // based on the TLS null, stream or block cipher type" + return true + default: + return false + } +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/not_go17.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/not_go17.go new file mode 100644 index 0000000000000..28df0c16bf00c --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/not_go17.go @@ -0,0 +1,51 @@ +// Copyright 2016 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 !go1.7 + +package http2 + +import ( + "net" + "net/http" +) + +type contextContext interface{} + +type fakeContext struct{} + +func (fakeContext) Done() <-chan struct{} { return nil } +func (fakeContext) Err() error { panic("should not be called") } + +func reqContext(r *http.Request) fakeContext { + return fakeContext{} +} + +func setResponseUncompressed(res *http.Response) { + // Nothing. +} + +type clientTrace struct{} + +func requestTrace(*http.Request) *clientTrace { return nil } +func traceGotConn(*http.Request, *ClientConn) {} +func traceFirstResponseByte(*clientTrace) {} +func traceWroteHeaders(*clientTrace) {} +func traceWroteRequest(*clientTrace, error) {} +func traceGot100Continue(trace *clientTrace) {} +func traceWait100Continue(trace *clientTrace) {} + +func nop() {} + +func serverConnBaseContext(c net.Conn, opts *ServeConnOpts) (ctx contextContext, cancel func()) { + return nil, nop +} + +func contextWithCancel(ctx contextContext) (_ contextContext, cancel func()) { + return ctx, nop +} + +func requestWithContext(req *http.Request, ctx contextContext) *http.Request { + return req +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/pipe.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/pipe.go new file mode 100644 index 0000000000000..53b7a1daf630a --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/pipe.go @@ -0,0 +1,153 @@ +// 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. + +package http2 + +import ( + "errors" + "io" + "sync" +) + +// pipe is a goroutine-safe io.Reader/io.Writer pair. It's like +// io.Pipe except there are no PipeReader/PipeWriter halves, and the +// underlying buffer is an interface. (io.Pipe is always unbuffered) +type pipe struct { + mu sync.Mutex + c sync.Cond // c.L lazily initialized to &p.mu + b pipeBuffer + err error // read error once empty. non-nil means closed. + breakErr error // immediate read error (caller doesn't see rest of b) + donec chan struct{} // closed on error + readFn func() // optional code to run in Read before error +} + +type pipeBuffer interface { + Len() int + io.Writer + io.Reader +} + +func (p *pipe) Len() int { + p.mu.Lock() + defer p.mu.Unlock() + return p.b.Len() +} + +// Read waits until data is available and copies bytes +// from the buffer into p. +func (p *pipe) Read(d []byte) (n int, err error) { + p.mu.Lock() + defer p.mu.Unlock() + if p.c.L == nil { + p.c.L = &p.mu + } + for { + if p.breakErr != nil { + return 0, p.breakErr + } + if p.b.Len() > 0 { + return p.b.Read(d) + } + if p.err != nil { + if p.readFn != nil { + p.readFn() // e.g. copy trailers + p.readFn = nil // not sticky like p.err + } + return 0, p.err + } + p.c.Wait() + } +} + +var errClosedPipeWrite = errors.New("write on closed buffer") + +// Write copies bytes from p into the buffer and wakes a reader. +// It is an error to write more data than the buffer can hold. +func (p *pipe) Write(d []byte) (n int, err error) { + p.mu.Lock() + defer p.mu.Unlock() + if p.c.L == nil { + p.c.L = &p.mu + } + defer p.c.Signal() + if p.err != nil { + return 0, errClosedPipeWrite + } + return p.b.Write(d) +} + +// CloseWithError causes the next Read (waking up a current blocked +// Read if needed) to return the provided err after all data has been +// read. +// +// The error must be non-nil. +func (p *pipe) CloseWithError(err error) { p.closeWithError(&p.err, err, nil) } + +// BreakWithError causes the next Read (waking up a current blocked +// Read if needed) to return the provided err immediately, without +// waiting for unread data. +func (p *pipe) BreakWithError(err error) { p.closeWithError(&p.breakErr, err, nil) } + +// closeWithErrorAndCode is like CloseWithError but also sets some code to run +// in the caller's goroutine before returning the error. +func (p *pipe) closeWithErrorAndCode(err error, fn func()) { p.closeWithError(&p.err, err, fn) } + +func (p *pipe) closeWithError(dst *error, err error, fn func()) { + if err == nil { + panic("err must be non-nil") + } + p.mu.Lock() + defer p.mu.Unlock() + if p.c.L == nil { + p.c.L = &p.mu + } + defer p.c.Signal() + if *dst != nil { + // Already been done. + return + } + p.readFn = fn + *dst = err + p.closeDoneLocked() +} + +// requires p.mu be held. +func (p *pipe) closeDoneLocked() { + if p.donec == nil { + return + } + // Close if unclosed. This isn't racy since we always + // hold p.mu while closing. + select { + case <-p.donec: + default: + close(p.donec) + } +} + +// Err returns the error (if any) first set by BreakWithError or CloseWithError. +func (p *pipe) Err() error { + p.mu.Lock() + defer p.mu.Unlock() + if p.breakErr != nil { + return p.breakErr + } + return p.err +} + +// Done returns a channel which is closed if and when this pipe is closed +// with CloseWithError. +func (p *pipe) Done() <-chan struct{} { + p.mu.Lock() + defer p.mu.Unlock() + if p.donec == nil { + p.donec = make(chan struct{}) + if p.err != nil || p.breakErr != nil { + // Already hit an error. + p.closeDoneLocked() + } + } + return p.donec +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/server.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/server.go new file mode 100644 index 0000000000000..f368738f7c761 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/server.go @@ -0,0 +1,2263 @@ +// 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. + +// TODO: replace all <-sc.doneServing with reads from the stream's cw +// instead, and make sure that on close we close all open +// streams. then remove doneServing? + +// TODO: re-audit GOAWAY support. Consider each incoming frame type and +// whether it should be ignored during graceful shutdown. + +// TODO: disconnect idle clients. GFE seems to do 4 minutes. make +// configurable? or maximum number of idle clients and remove the +// oldest? + +// TODO: turn off the serve goroutine when idle, so +// an idle conn only has the readFrames goroutine active. (which could +// also be optimized probably to pin less memory in crypto/tls). This +// would involve tracking when the serve goroutine is active (atomic +// int32 read/CAS probably?) and starting it up when frames arrive, +// and shutting it down when all handlers exit. the occasional PING +// packets could use time.AfterFunc to call sc.wakeStartServeLoop() +// (which is a no-op if already running) and then queue the PING write +// as normal. The serve loop would then exit in most cases (if no +// Handlers running) and not be woken up again until the PING packet +// returns. + +// TODO (maybe): add a mechanism for Handlers to going into +// half-closed-local mode (rw.(io.Closer) test?) but not exit their +// handler, and continue to be able to read from the +// Request.Body. This would be a somewhat semantic change from HTTP/1 +// (or at least what we expose in net/http), so I'd probably want to +// add it there too. For now, this package says that returning from +// the Handler ServeHTTP function means you're both done reading and +// done writing, without a way to stop just one or the other. + +package http2 + +import ( + "bufio" + "bytes" + "crypto/tls" + "errors" + "fmt" + "io" + "log" + "net" + "net/http" + "net/textproto" + "net/url" + "os" + "reflect" + "runtime" + "strconv" + "strings" + "sync" + "time" + + "golang.org/x/net/http2/hpack" +) + +const ( + prefaceTimeout = 10 * time.Second + firstSettingsTimeout = 2 * time.Second // should be in-flight with preface anyway + handlerChunkWriteSize = 4 << 10 + defaultMaxStreams = 250 // TODO: make this 100 as the GFE seems to? +) + +var ( + errClientDisconnected = errors.New("client disconnected") + errClosedBody = errors.New("body closed by handler") + errHandlerComplete = errors.New("http2: request body closed due to handler exiting") + errStreamClosed = errors.New("http2: stream closed") +) + +var responseWriterStatePool = sync.Pool{ + New: func() interface{} { + rws := &responseWriterState{} + rws.bw = bufio.NewWriterSize(chunkWriter{rws}, handlerChunkWriteSize) + return rws + }, +} + +// Test hooks. +var ( + testHookOnConn func() + testHookGetServerConn func(*serverConn) + testHookOnPanicMu *sync.Mutex // nil except in tests + testHookOnPanic func(sc *serverConn, panicVal interface{}) (rePanic bool) +) + +// Server is an HTTP/2 server. +type Server struct { + // MaxHandlers limits the number of http.Handler ServeHTTP goroutines + // which may run at a time over all connections. + // Negative or zero no limit. + // TODO: implement + MaxHandlers int + + // MaxConcurrentStreams optionally specifies the number of + // concurrent streams that each client may have open at a + // time. This is unrelated to the number of http.Handler goroutines + // which may be active globally, which is MaxHandlers. + // If zero, MaxConcurrentStreams defaults to at least 100, per + // the HTTP/2 spec's recommendations. + MaxConcurrentStreams uint32 + + // MaxReadFrameSize optionally specifies the largest frame + // this server is willing to read. A valid value is between + // 16k and 16M, inclusive. If zero or otherwise invalid, a + // default value is used. + MaxReadFrameSize uint32 + + // PermitProhibitedCipherSuites, if true, permits the use of + // cipher suites prohibited by the HTTP/2 spec. + PermitProhibitedCipherSuites bool +} + +func (s *Server) maxReadFrameSize() uint32 { + if v := s.MaxReadFrameSize; v >= minMaxFrameSize && v <= maxFrameSize { + return v + } + return defaultMaxReadFrameSize +} + +func (s *Server) maxConcurrentStreams() uint32 { + if v := s.MaxConcurrentStreams; v > 0 { + return v + } + return defaultMaxStreams +} + +// ConfigureServer adds HTTP/2 support to a net/http Server. +// +// The configuration conf may be nil. +// +// ConfigureServer must be called before s begins serving. +func ConfigureServer(s *http.Server, conf *Server) error { + if conf == nil { + conf = new(Server) + } + + if s.TLSConfig == nil { + s.TLSConfig = new(tls.Config) + } else if s.TLSConfig.CipherSuites != nil { + // If they already provided a CipherSuite list, return + // an error if it has a bad order or is missing + // ECDHE_RSA_WITH_AES_128_GCM_SHA256. + const requiredCipher = tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 + haveRequired := false + sawBad := false + for i, cs := range s.TLSConfig.CipherSuites { + if cs == requiredCipher { + haveRequired = true + } + if isBadCipher(cs) { + sawBad = true + } else if sawBad { + return fmt.Errorf("http2: TLSConfig.CipherSuites index %d contains an HTTP/2-approved cipher suite (%#04x), but it comes after unapproved cipher suites. With this configuration, clients that don't support previous, approved cipher suites may be given an unapproved one and reject the connection.", i, cs) + } + } + if !haveRequired { + return fmt.Errorf("http2: TLSConfig.CipherSuites is missing HTTP/2-required TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256") + } + } + + // Note: not setting MinVersion to tls.VersionTLS12, + // as we don't want to interfere with HTTP/1.1 traffic + // on the user's server. We enforce TLS 1.2 later once + // we accept a connection. Ideally this should be done + // during next-proto selection, but using TLS <1.2 with + // HTTP/2 is still the client's bug. + + s.TLSConfig.PreferServerCipherSuites = true + + haveNPN := false + for _, p := range s.TLSConfig.NextProtos { + if p == NextProtoTLS { + haveNPN = true + break + } + } + if !haveNPN { + s.TLSConfig.NextProtos = append(s.TLSConfig.NextProtos, NextProtoTLS) + } + // h2-14 is temporary (as of 2015-03-05) while we wait for all browsers + // to switch to "h2". + s.TLSConfig.NextProtos = append(s.TLSConfig.NextProtos, "h2-14") + + if s.TLSNextProto == nil { + s.TLSNextProto = map[string]func(*http.Server, *tls.Conn, http.Handler){} + } + protoHandler := func(hs *http.Server, c *tls.Conn, h http.Handler) { + if testHookOnConn != nil { + testHookOnConn() + } + conf.ServeConn(c, &ServeConnOpts{ + Handler: h, + BaseConfig: hs, + }) + } + s.TLSNextProto[NextProtoTLS] = protoHandler + s.TLSNextProto["h2-14"] = protoHandler // temporary; see above. + return nil +} + +// ServeConnOpts are options for the Server.ServeConn method. +type ServeConnOpts struct { + // BaseConfig optionally sets the base configuration + // for values. If nil, defaults are used. + BaseConfig *http.Server + + // Handler specifies which handler to use for processing + // requests. If nil, BaseConfig.Handler is used. If BaseConfig + // or BaseConfig.Handler is nil, http.DefaultServeMux is used. + Handler http.Handler +} + +func (o *ServeConnOpts) baseConfig() *http.Server { + if o != nil && o.BaseConfig != nil { + return o.BaseConfig + } + return new(http.Server) +} + +func (o *ServeConnOpts) handler() http.Handler { + if o != nil { + if o.Handler != nil { + return o.Handler + } + if o.BaseConfig != nil && o.BaseConfig.Handler != nil { + return o.BaseConfig.Handler + } + } + return http.DefaultServeMux +} + +// ServeConn serves HTTP/2 requests on the provided connection and +// blocks until the connection is no longer readable. +// +// ServeConn starts speaking HTTP/2 assuming that c has not had any +// reads or writes. It writes its initial settings frame and expects +// to be able to read the preface and settings frame from the +// client. If c has a ConnectionState method like a *tls.Conn, the +// ConnectionState is used to verify the TLS ciphersuite and to set +// the Request.TLS field in Handlers. +// +// ServeConn does not support h2c by itself. Any h2c support must be +// implemented in terms of providing a suitably-behaving net.Conn. +// +// The opts parameter is optional. If nil, default values are used. +func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) { + baseCtx, cancel := serverConnBaseContext(c, opts) + defer cancel() + + sc := &serverConn{ + srv: s, + hs: opts.baseConfig(), + conn: c, + baseCtx: baseCtx, + remoteAddrStr: c.RemoteAddr().String(), + bw: newBufferedWriter(c), + handler: opts.handler(), + streams: make(map[uint32]*stream), + readFrameCh: make(chan readFrameResult), + wantWriteFrameCh: make(chan frameWriteMsg, 8), + wroteFrameCh: make(chan frameWriteResult, 1), // buffered; one send in writeFrameAsync + bodyReadCh: make(chan bodyReadMsg), // buffering doesn't matter either way + doneServing: make(chan struct{}), + advMaxStreams: s.maxConcurrentStreams(), + writeSched: writeScheduler{ + maxFrameSize: initialMaxFrameSize, + }, + initialWindowSize: initialWindowSize, + headerTableSize: initialHeaderTableSize, + serveG: newGoroutineLock(), + pushEnabled: true, + } + + sc.flow.add(initialWindowSize) + sc.inflow.add(initialWindowSize) + sc.hpackEncoder = hpack.NewEncoder(&sc.headerWriteBuf) + + fr := NewFramer(sc.bw, c) + fr.ReadMetaHeaders = hpack.NewDecoder(initialHeaderTableSize, nil) + fr.MaxHeaderListSize = sc.maxHeaderListSize() + fr.SetMaxReadFrameSize(s.maxReadFrameSize()) + sc.framer = fr + + if tc, ok := c.(connectionStater); ok { + sc.tlsState = new(tls.ConnectionState) + *sc.tlsState = tc.ConnectionState() + // 9.2 Use of TLS Features + // An implementation of HTTP/2 over TLS MUST use TLS + // 1.2 or higher with the restrictions on feature set + // and cipher suite described in this section. Due to + // implementation limitations, it might not be + // possible to fail TLS negotiation. An endpoint MUST + // immediately terminate an HTTP/2 connection that + // does not meet the TLS requirements described in + // this section with a connection error (Section + // 5.4.1) of type INADEQUATE_SECURITY. + if sc.tlsState.Version < tls.VersionTLS12 { + sc.rejectConn(ErrCodeInadequateSecurity, "TLS version too low") + return + } + + if sc.tlsState.ServerName == "" { + // Client must use SNI, but we don't enforce that anymore, + // since it was causing problems when connecting to bare IP + // addresses during development. + // + // TODO: optionally enforce? Or enforce at the time we receive + // a new request, and verify the the ServerName matches the :authority? + // But that precludes proxy situations, perhaps. + // + // So for now, do nothing here again. + } + + if !s.PermitProhibitedCipherSuites && isBadCipher(sc.tlsState.CipherSuite) { + // "Endpoints MAY choose to generate a connection error + // (Section 5.4.1) of type INADEQUATE_SECURITY if one of + // the prohibited cipher suites are negotiated." + // + // We choose that. In my opinion, the spec is weak + // here. It also says both parties must support at least + // TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 so there's no + // excuses here. If we really must, we could allow an + // "AllowInsecureWeakCiphers" option on the server later. + // Let's see how it plays out first. + sc.rejectConn(ErrCodeInadequateSecurity, fmt.Sprintf("Prohibited TLS 1.2 Cipher Suite: %x", sc.tlsState.CipherSuite)) + return + } + } + + if hook := testHookGetServerConn; hook != nil { + hook(sc) + } + sc.serve() +} + +func (sc *serverConn) rejectConn(err ErrCode, debug string) { + sc.vlogf("http2: server rejecting conn: %v, %s", err, debug) + // ignoring errors. hanging up anyway. + sc.framer.WriteGoAway(0, err, []byte(debug)) + sc.bw.Flush() + sc.conn.Close() +} + +type serverConn struct { + // Immutable: + srv *Server + hs *http.Server + conn net.Conn + bw *bufferedWriter // writing to conn + handler http.Handler + baseCtx contextContext + framer *Framer + doneServing chan struct{} // closed when serverConn.serve ends + readFrameCh chan readFrameResult // written by serverConn.readFrames + wantWriteFrameCh chan frameWriteMsg // from handlers -> serve + wroteFrameCh chan frameWriteResult // from writeFrameAsync -> serve, tickles more frame writes + bodyReadCh chan bodyReadMsg // from handlers -> serve + testHookCh chan func(int) // code to run on the serve loop + flow flow // conn-wide (not stream-specific) outbound flow control + inflow flow // conn-wide inbound flow control + tlsState *tls.ConnectionState // shared by all handlers, like net/http + remoteAddrStr string + + // Everything following is owned by the serve loop; use serveG.check(): + serveG goroutineLock // used to verify funcs are on serve() + pushEnabled bool + sawFirstSettings bool // got the initial SETTINGS frame after the preface + needToSendSettingsAck bool + unackedSettings int // how many SETTINGS have we sent without ACKs? + clientMaxStreams uint32 // SETTINGS_MAX_CONCURRENT_STREAMS from client (our PUSH_PROMISE limit) + advMaxStreams uint32 // our SETTINGS_MAX_CONCURRENT_STREAMS advertised the client + curOpenStreams uint32 // client's number of open streams + maxStreamID uint32 // max ever seen + streams map[uint32]*stream + initialWindowSize int32 + headerTableSize uint32 + peerMaxHeaderListSize uint32 // zero means unknown (default) + canonHeader map[string]string // http2-lower-case -> Go-Canonical-Case + writingFrame bool // started write goroutine but haven't heard back on wroteFrameCh + needsFrameFlush bool // last frame write wasn't a flush + writeSched writeScheduler + inGoAway bool // we've started to or sent GOAWAY + needToSendGoAway bool // we need to schedule a GOAWAY frame write + goAwayCode ErrCode + shutdownTimerCh <-chan time.Time // nil until used + shutdownTimer *time.Timer // nil until used + freeRequestBodyBuf []byte // if non-nil, a free initialWindowSize buffer for getRequestBodyBuf + + // Owned by the writeFrameAsync goroutine: + headerWriteBuf bytes.Buffer + hpackEncoder *hpack.Encoder +} + +func (sc *serverConn) maxHeaderListSize() uint32 { + n := sc.hs.MaxHeaderBytes + if n <= 0 { + n = http.DefaultMaxHeaderBytes + } + // http2's count is in a slightly different unit and includes 32 bytes per pair. + // So, take the net/http.Server value and pad it up a bit, assuming 10 headers. + const perFieldOverhead = 32 // per http2 spec + const typicalHeaders = 10 // conservative + return uint32(n + typicalHeaders*perFieldOverhead) +} + +// stream represents a stream. This is the minimal metadata needed by +// the serve goroutine. Most of the actual stream state is owned by +// the http.Handler's goroutine in the responseWriter. Because the +// responseWriter's responseWriterState is recycled at the end of a +// handler, this struct intentionally has no pointer to the +// *responseWriter{,State} itself, as the Handler ending nils out the +// responseWriter's state field. +type stream struct { + // immutable: + sc *serverConn + id uint32 + body *pipe // non-nil if expecting DATA frames + cw closeWaiter // closed wait stream transitions to closed state + ctx contextContext + cancelCtx func() + + // owned by serverConn's serve loop: + bodyBytes int64 // body bytes seen so far + declBodyBytes int64 // or -1 if undeclared + flow flow // limits writing from Handler to client + inflow flow // what the client is allowed to POST/etc to us + parent *stream // or nil + numTrailerValues int64 + weight uint8 + state streamState + sentReset bool // only true once detached from streams map + gotReset bool // only true once detacted from streams map + gotTrailerHeader bool // HEADER frame for trailers was seen + wroteHeaders bool // whether we wrote headers (not status 100) + reqBuf []byte + + trailer http.Header // accumulated trailers + reqTrailer http.Header // handler's Request.Trailer +} + +func (sc *serverConn) Framer() *Framer { return sc.framer } +func (sc *serverConn) CloseConn() error { return sc.conn.Close() } +func (sc *serverConn) Flush() error { return sc.bw.Flush() } +func (sc *serverConn) HeaderEncoder() (*hpack.Encoder, *bytes.Buffer) { + return sc.hpackEncoder, &sc.headerWriteBuf +} + +func (sc *serverConn) state(streamID uint32) (streamState, *stream) { + sc.serveG.check() + // http://http2.github.io/http2-spec/#rfc.section.5.1 + if st, ok := sc.streams[streamID]; ok { + return st.state, st + } + // "The first use of a new stream identifier implicitly closes all + // streams in the "idle" state that might have been initiated by + // that peer with a lower-valued stream identifier. For example, if + // a client sends a HEADERS frame on stream 7 without ever sending a + // frame on stream 5, then stream 5 transitions to the "closed" + // state when the first frame for stream 7 is sent or received." + if streamID <= sc.maxStreamID { + return stateClosed, nil + } + return stateIdle, nil +} + +// setConnState calls the net/http ConnState hook for this connection, if configured. +// Note that the net/http package does StateNew and StateClosed for us. +// There is currently no plan for StateHijacked or hijacking HTTP/2 connections. +func (sc *serverConn) setConnState(state http.ConnState) { + if sc.hs.ConnState != nil { + sc.hs.ConnState(sc.conn, state) + } +} + +func (sc *serverConn) vlogf(format string, args ...interface{}) { + if VerboseLogs { + sc.logf(format, args...) + } +} + +func (sc *serverConn) logf(format string, args ...interface{}) { + if lg := sc.hs.ErrorLog; lg != nil { + lg.Printf(format, args...) + } else { + log.Printf(format, args...) + } +} + +// errno returns v's underlying uintptr, else 0. +// +// TODO: remove this helper function once http2 can use build +// tags. See comment in isClosedConnError. +func errno(v error) uintptr { + if rv := reflect.ValueOf(v); rv.Kind() == reflect.Uintptr { + return uintptr(rv.Uint()) + } + return 0 +} + +// isClosedConnError reports whether err is an error from use of a closed +// network connection. +func isClosedConnError(err error) bool { + if err == nil { + return false + } + + // TODO: remove this string search and be more like the Windows + // case below. That might involve modifying the standard library + // to return better error types. + str := err.Error() + if strings.Contains(str, "use of closed network connection") { + return true + } + + // TODO(bradfitz): x/tools/cmd/bundle doesn't really support + // build tags, so I can't make an http2_windows.go file with + // Windows-specific stuff. Fix that and move this, once we + // have a way to bundle this into std's net/http somehow. + if runtime.GOOS == "windows" { + if oe, ok := err.(*net.OpError); ok && oe.Op == "read" { + if se, ok := oe.Err.(*os.SyscallError); ok && se.Syscall == "wsarecv" { + const WSAECONNABORTED = 10053 + const WSAECONNRESET = 10054 + if n := errno(se.Err); n == WSAECONNRESET || n == WSAECONNABORTED { + return true + } + } + } + } + return false +} + +func (sc *serverConn) condlogf(err error, format string, args ...interface{}) { + if err == nil { + return + } + if err == io.EOF || err == io.ErrUnexpectedEOF || isClosedConnError(err) { + // Boring, expected errors. + sc.vlogf(format, args...) + } else { + sc.logf(format, args...) + } +} + +func (sc *serverConn) canonicalHeader(v string) string { + sc.serveG.check() + cv, ok := commonCanonHeader[v] + if ok { + return cv + } + cv, ok = sc.canonHeader[v] + if ok { + return cv + } + if sc.canonHeader == nil { + sc.canonHeader = make(map[string]string) + } + cv = http.CanonicalHeaderKey(v) + sc.canonHeader[v] = cv + return cv +} + +type readFrameResult struct { + f Frame // valid until readMore is called + err error + + // readMore should be called once the consumer no longer needs or + // retains f. After readMore, f is invalid and more frames can be + // read. + readMore func() +} + +// readFrames is the loop that reads incoming frames. +// It takes care to only read one frame at a time, blocking until the +// consumer is done with the frame. +// It's run on its own goroutine. +func (sc *serverConn) readFrames() { + gate := make(gate) + gateDone := gate.Done + for { + f, err := sc.framer.ReadFrame() + select { + case sc.readFrameCh <- readFrameResult{f, err, gateDone}: + case <-sc.doneServing: + return + } + select { + case <-gate: + case <-sc.doneServing: + return + } + if terminalReadFrameError(err) { + return + } + } +} + +// frameWriteResult is the message passed from writeFrameAsync to the serve goroutine. +type frameWriteResult struct { + wm frameWriteMsg // what was written (or attempted) + err error // result of the writeFrame call +} + +// writeFrameAsync runs in its own goroutine and writes a single frame +// and then reports when it's done. +// At most one goroutine can be running writeFrameAsync at a time per +// serverConn. +func (sc *serverConn) writeFrameAsync(wm frameWriteMsg) { + err := wm.write.writeFrame(sc) + sc.wroteFrameCh <- frameWriteResult{wm, err} +} + +func (sc *serverConn) closeAllStreamsOnConnClose() { + sc.serveG.check() + for _, st := range sc.streams { + sc.closeStream(st, errClientDisconnected) + } +} + +func (sc *serverConn) stopShutdownTimer() { + sc.serveG.check() + if t := sc.shutdownTimer; t != nil { + t.Stop() + } +} + +func (sc *serverConn) notePanic() { + // Note: this is for serverConn.serve panicking, not http.Handler code. + if testHookOnPanicMu != nil { + testHookOnPanicMu.Lock() + defer testHookOnPanicMu.Unlock() + } + if testHookOnPanic != nil { + if e := recover(); e != nil { + if testHookOnPanic(sc, e) { + panic(e) + } + } + } +} + +func (sc *serverConn) serve() { + sc.serveG.check() + defer sc.notePanic() + defer sc.conn.Close() + defer sc.closeAllStreamsOnConnClose() + defer sc.stopShutdownTimer() + defer close(sc.doneServing) // unblocks handlers trying to send + + if VerboseLogs { + sc.vlogf("http2: server connection from %v on %p", sc.conn.RemoteAddr(), sc.hs) + } + + sc.writeFrame(frameWriteMsg{ + write: writeSettings{ + {SettingMaxFrameSize, sc.srv.maxReadFrameSize()}, + {SettingMaxConcurrentStreams, sc.advMaxStreams}, + {SettingMaxHeaderListSize, sc.maxHeaderListSize()}, + + // TODO: more actual settings, notably + // SettingInitialWindowSize, but then we also + // want to bump up the conn window size the + // same amount here right after the settings + }, + }) + sc.unackedSettings++ + + if err := sc.readPreface(); err != nil { + sc.condlogf(err, "http2: server: error reading preface from client %v: %v", sc.conn.RemoteAddr(), err) + return + } + // Now that we've got the preface, get us out of the + // "StateNew" state. We can't go directly to idle, though. + // Active means we read some data and anticipate a request. We'll + // do another Active when we get a HEADERS frame. + sc.setConnState(http.StateActive) + sc.setConnState(http.StateIdle) + + go sc.readFrames() // closed by defer sc.conn.Close above + + settingsTimer := time.NewTimer(firstSettingsTimeout) + loopNum := 0 + for { + loopNum++ + select { + case wm := <-sc.wantWriteFrameCh: + sc.writeFrame(wm) + case res := <-sc.wroteFrameCh: + sc.wroteFrame(res) + case res := <-sc.readFrameCh: + if !sc.processFrameFromReader(res) { + return + } + res.readMore() + if settingsTimer.C != nil { + settingsTimer.Stop() + settingsTimer.C = nil + } + case m := <-sc.bodyReadCh: + sc.noteBodyRead(m.st, m.n) + case <-settingsTimer.C: + sc.logf("timeout waiting for SETTINGS frames from %v", sc.conn.RemoteAddr()) + return + case <-sc.shutdownTimerCh: + sc.vlogf("GOAWAY close timer fired; closing conn from %v", sc.conn.RemoteAddr()) + return + case fn := <-sc.testHookCh: + fn(loopNum) + } + } +} + +// readPreface reads the ClientPreface greeting from the peer +// or returns an error on timeout or an invalid greeting. +func (sc *serverConn) readPreface() error { + errc := make(chan error, 1) + go func() { + // Read the client preface + buf := make([]byte, len(ClientPreface)) + if _, err := io.ReadFull(sc.conn, buf); err != nil { + errc <- err + } else if !bytes.Equal(buf, clientPreface) { + errc <- fmt.Errorf("bogus greeting %q", buf) + } else { + errc <- nil + } + }() + timer := time.NewTimer(prefaceTimeout) // TODO: configurable on *Server? + defer timer.Stop() + select { + case <-timer.C: + return errors.New("timeout waiting for client preface") + case err := <-errc: + if err == nil { + if VerboseLogs { + sc.vlogf("http2: server: client %v said hello", sc.conn.RemoteAddr()) + } + } + return err + } +} + +var errChanPool = sync.Pool{ + New: func() interface{} { return make(chan error, 1) }, +} + +var writeDataPool = sync.Pool{ + New: func() interface{} { return new(writeData) }, +} + +// writeDataFromHandler writes DATA response frames from a handler on +// the given stream. +func (sc *serverConn) writeDataFromHandler(stream *stream, data []byte, endStream bool) error { + ch := errChanPool.Get().(chan error) + writeArg := writeDataPool.Get().(*writeData) + *writeArg = writeData{stream.id, data, endStream} + err := sc.writeFrameFromHandler(frameWriteMsg{ + write: writeArg, + stream: stream, + done: ch, + }) + if err != nil { + return err + } + var frameWriteDone bool // the frame write is done (successfully or not) + select { + case err = <-ch: + frameWriteDone = true + case <-sc.doneServing: + return errClientDisconnected + case <-stream.cw: + // If both ch and stream.cw were ready (as might + // happen on the final Write after an http.Handler + // ends), prefer the write result. Otherwise this + // might just be us successfully closing the stream. + // The writeFrameAsync and serve goroutines guarantee + // that the ch send will happen before the stream.cw + // close. + select { + case err = <-ch: + frameWriteDone = true + default: + return errStreamClosed + } + } + errChanPool.Put(ch) + if frameWriteDone { + writeDataPool.Put(writeArg) + } + return err +} + +// writeFrameFromHandler sends wm to sc.wantWriteFrameCh, but aborts +// if the connection has gone away. +// +// This must not be run from the serve goroutine itself, else it might +// deadlock writing to sc.wantWriteFrameCh (which is only mildly +// buffered and is read by serve itself). If you're on the serve +// goroutine, call writeFrame instead. +func (sc *serverConn) writeFrameFromHandler(wm frameWriteMsg) error { + sc.serveG.checkNotOn() // NOT + select { + case sc.wantWriteFrameCh <- wm: + return nil + case <-sc.doneServing: + // Serve loop is gone. + // Client has closed their connection to the server. + return errClientDisconnected + } +} + +// writeFrame schedules a frame to write and sends it if there's nothing +// already being written. +// +// There is no pushback here (the serve goroutine never blocks). It's +// the http.Handlers that block, waiting for their previous frames to +// make it onto the wire +// +// If you're not on the serve goroutine, use writeFrameFromHandler instead. +func (sc *serverConn) writeFrame(wm frameWriteMsg) { + sc.serveG.check() + + var ignoreWrite bool + + // Don't send a 100-continue response if we've already sent headers. + // See golang.org/issue/14030. + switch wm.write.(type) { + case *writeResHeaders: + wm.stream.wroteHeaders = true + case write100ContinueHeadersFrame: + if wm.stream.wroteHeaders { + ignoreWrite = true + } + } + + if !ignoreWrite { + sc.writeSched.add(wm) + } + sc.scheduleFrameWrite() +} + +// startFrameWrite starts a goroutine to write wm (in a separate +// goroutine since that might block on the network), and updates the +// serve goroutine's state about the world, updated from info in wm. +func (sc *serverConn) startFrameWrite(wm frameWriteMsg) { + sc.serveG.check() + if sc.writingFrame { + panic("internal error: can only be writing one frame at a time") + } + + st := wm.stream + if st != nil { + switch st.state { + case stateHalfClosedLocal: + panic("internal error: attempt to send frame on half-closed-local stream") + case stateClosed: + if st.sentReset || st.gotReset { + // Skip this frame. + sc.scheduleFrameWrite() + return + } + panic(fmt.Sprintf("internal error: attempt to send a write %v on a closed stream", wm)) + } + } + + sc.writingFrame = true + sc.needsFrameFlush = true + go sc.writeFrameAsync(wm) +} + +// errHandlerPanicked is the error given to any callers blocked in a read from +// Request.Body when the main goroutine panics. Since most handlers read in the +// the main ServeHTTP goroutine, this will show up rarely. +var errHandlerPanicked = errors.New("http2: handler panicked") + +// wroteFrame is called on the serve goroutine with the result of +// whatever happened on writeFrameAsync. +func (sc *serverConn) wroteFrame(res frameWriteResult) { + sc.serveG.check() + if !sc.writingFrame { + panic("internal error: expected to be already writing a frame") + } + sc.writingFrame = false + + wm := res.wm + st := wm.stream + + closeStream := endsStream(wm.write) + + if _, ok := wm.write.(handlerPanicRST); ok { + sc.closeStream(st, errHandlerPanicked) + } + + // Reply (if requested) to the blocked ServeHTTP goroutine. + if ch := wm.done; ch != nil { + select { + case ch <- res.err: + default: + panic(fmt.Sprintf("unbuffered done channel passed in for type %T", wm.write)) + } + } + wm.write = nil // prevent use (assume it's tainted after wm.done send) + + if closeStream { + if st == nil { + panic("internal error: expecting non-nil stream") + } + switch st.state { + case stateOpen: + // Here we would go to stateHalfClosedLocal in + // theory, but since our handler is done and + // the net/http package provides no mechanism + // for finishing writing to a ResponseWriter + // while still reading data (see possible TODO + // at top of this file), we go into closed + // state here anyway, after telling the peer + // we're hanging up on them. + st.state = stateHalfClosedLocal // won't last long, but necessary for closeStream via resetStream + errCancel := StreamError{st.id, ErrCodeCancel} + sc.resetStream(errCancel) + case stateHalfClosedRemote: + sc.closeStream(st, errHandlerComplete) + } + } + + sc.scheduleFrameWrite() +} + +// scheduleFrameWrite tickles the frame writing scheduler. +// +// If a frame is already being written, nothing happens. This will be called again +// when the frame is done being written. +// +// If a frame isn't being written we need to send one, the best frame +// to send is selected, preferring first things that aren't +// stream-specific (e.g. ACKing settings), and then finding the +// highest priority stream. +// +// If a frame isn't being written and there's nothing else to send, we +// flush the write buffer. +func (sc *serverConn) scheduleFrameWrite() { + sc.serveG.check() + if sc.writingFrame { + return + } + if sc.needToSendGoAway { + sc.needToSendGoAway = false + sc.startFrameWrite(frameWriteMsg{ + write: &writeGoAway{ + maxStreamID: sc.maxStreamID, + code: sc.goAwayCode, + }, + }) + return + } + if sc.needToSendSettingsAck { + sc.needToSendSettingsAck = false + sc.startFrameWrite(frameWriteMsg{write: writeSettingsAck{}}) + return + } + if !sc.inGoAway { + if wm, ok := sc.writeSched.take(); ok { + sc.startFrameWrite(wm) + return + } + } + if sc.needsFrameFlush { + sc.startFrameWrite(frameWriteMsg{write: flushFrameWriter{}}) + sc.needsFrameFlush = false // after startFrameWrite, since it sets this true + return + } +} + +func (sc *serverConn) goAway(code ErrCode) { + sc.serveG.check() + if sc.inGoAway { + return + } + if code != ErrCodeNo { + sc.shutDownIn(250 * time.Millisecond) + } else { + // TODO: configurable + sc.shutDownIn(1 * time.Second) + } + sc.inGoAway = true + sc.needToSendGoAway = true + sc.goAwayCode = code + sc.scheduleFrameWrite() +} + +func (sc *serverConn) shutDownIn(d time.Duration) { + sc.serveG.check() + sc.shutdownTimer = time.NewTimer(d) + sc.shutdownTimerCh = sc.shutdownTimer.C +} + +func (sc *serverConn) resetStream(se StreamError) { + sc.serveG.check() + sc.writeFrame(frameWriteMsg{write: se}) + if st, ok := sc.streams[se.StreamID]; ok { + st.sentReset = true + sc.closeStream(st, se) + } +} + +// processFrameFromReader processes the serve loop's read from readFrameCh from the +// frame-reading goroutine. +// processFrameFromReader returns whether the connection should be kept open. +func (sc *serverConn) processFrameFromReader(res readFrameResult) bool { + sc.serveG.check() + err := res.err + if err != nil { + if err == ErrFrameTooLarge { + sc.goAway(ErrCodeFrameSize) + return true // goAway will close the loop + } + clientGone := err == io.EOF || err == io.ErrUnexpectedEOF || isClosedConnError(err) + if clientGone { + // TODO: could we also get into this state if + // the peer does a half close + // (e.g. CloseWrite) because they're done + // sending frames but they're still wanting + // our open replies? Investigate. + // TODO: add CloseWrite to crypto/tls.Conn first + // so we have a way to test this? I suppose + // just for testing we could have a non-TLS mode. + return false + } + } else { + f := res.f + if VerboseLogs { + sc.vlogf("http2: server read frame %v", summarizeFrame(f)) + } + err = sc.processFrame(f) + if err == nil { + return true + } + } + + switch ev := err.(type) { + case StreamError: + sc.resetStream(ev) + return true + case goAwayFlowError: + sc.goAway(ErrCodeFlowControl) + return true + case ConnectionError: + sc.logf("http2: server connection error from %v: %v", sc.conn.RemoteAddr(), ev) + sc.goAway(ErrCode(ev)) + return true // goAway will handle shutdown + default: + if res.err != nil { + sc.vlogf("http2: server closing client connection; error reading frame from client %s: %v", sc.conn.RemoteAddr(), err) + } else { + sc.logf("http2: server closing client connection: %v", err) + } + return false + } +} + +func (sc *serverConn) processFrame(f Frame) error { + sc.serveG.check() + + // First frame received must be SETTINGS. + if !sc.sawFirstSettings { + if _, ok := f.(*SettingsFrame); !ok { + return ConnectionError(ErrCodeProtocol) + } + sc.sawFirstSettings = true + } + + switch f := f.(type) { + case *SettingsFrame: + return sc.processSettings(f) + case *MetaHeadersFrame: + return sc.processHeaders(f) + case *WindowUpdateFrame: + return sc.processWindowUpdate(f) + case *PingFrame: + return sc.processPing(f) + case *DataFrame: + return sc.processData(f) + case *RSTStreamFrame: + return sc.processResetStream(f) + case *PriorityFrame: + return sc.processPriority(f) + case *PushPromiseFrame: + // A client cannot push. Thus, servers MUST treat the receipt of a PUSH_PROMISE + // frame as a connection error (Section 5.4.1) of type PROTOCOL_ERROR. + return ConnectionError(ErrCodeProtocol) + default: + sc.vlogf("http2: server ignoring frame: %v", f.Header()) + return nil + } +} + +func (sc *serverConn) processPing(f *PingFrame) error { + sc.serveG.check() + if f.IsAck() { + // 6.7 PING: " An endpoint MUST NOT respond to PING frames + // containing this flag." + return nil + } + if f.StreamID != 0 { + // "PING frames are not associated with any individual + // stream. If a PING frame is received with a stream + // identifier field value other than 0x0, the recipient MUST + // respond with a connection error (Section 5.4.1) of type + // PROTOCOL_ERROR." + return ConnectionError(ErrCodeProtocol) + } + sc.writeFrame(frameWriteMsg{write: writePingAck{f}}) + return nil +} + +func (sc *serverConn) processWindowUpdate(f *WindowUpdateFrame) error { + sc.serveG.check() + switch { + case f.StreamID != 0: // stream-level flow control + st := sc.streams[f.StreamID] + if st == nil { + // "WINDOW_UPDATE can be sent by a peer that has sent a + // frame bearing the END_STREAM flag. This means that a + // receiver could receive a WINDOW_UPDATE frame on a "half + // closed (remote)" or "closed" stream. A receiver MUST + // NOT treat this as an error, see Section 5.1." + return nil + } + if !st.flow.add(int32(f.Increment)) { + return StreamError{f.StreamID, ErrCodeFlowControl} + } + default: // connection-level flow control + if !sc.flow.add(int32(f.Increment)) { + return goAwayFlowError{} + } + } + sc.scheduleFrameWrite() + return nil +} + +func (sc *serverConn) processResetStream(f *RSTStreamFrame) error { + sc.serveG.check() + + state, st := sc.state(f.StreamID) + if state == stateIdle { + // 6.4 "RST_STREAM frames MUST NOT be sent for a + // stream in the "idle" state. If a RST_STREAM frame + // identifying an idle stream is received, the + // recipient MUST treat this as a connection error + // (Section 5.4.1) of type PROTOCOL_ERROR. + return ConnectionError(ErrCodeProtocol) + } + if st != nil { + st.gotReset = true + st.cancelCtx() + sc.closeStream(st, StreamError{f.StreamID, f.ErrCode}) + } + return nil +} + +func (sc *serverConn) closeStream(st *stream, err error) { + sc.serveG.check() + if st.state == stateIdle || st.state == stateClosed { + panic(fmt.Sprintf("invariant; can't close stream in state %v", st.state)) + } + st.state = stateClosed + sc.curOpenStreams-- + if sc.curOpenStreams == 0 { + sc.setConnState(http.StateIdle) + } + delete(sc.streams, st.id) + if p := st.body; p != nil { + p.CloseWithError(err) + } + st.cw.Close() // signals Handler's CloseNotifier, unblocks writes, etc + sc.writeSched.forgetStream(st.id) + if st.reqBuf != nil { + // Stash this request body buffer (64k) away for reuse + // by a future POST/PUT/etc. + // + // TODO(bradfitz): share on the server? sync.Pool? + // Server requires locks and might hurt contention. + // sync.Pool might work, or might be worse, depending + // on goroutine CPU migrations. (get and put on + // separate CPUs). Maybe a mix of strategies. But + // this is an easy win for now. + sc.freeRequestBodyBuf = st.reqBuf + } +} + +func (sc *serverConn) processSettings(f *SettingsFrame) error { + sc.serveG.check() + if f.IsAck() { + sc.unackedSettings-- + if sc.unackedSettings < 0 { + // Why is the peer ACKing settings we never sent? + // The spec doesn't mention this case, but + // hang up on them anyway. + return ConnectionError(ErrCodeProtocol) + } + return nil + } + if err := f.ForeachSetting(sc.processSetting); err != nil { + return err + } + sc.needToSendSettingsAck = true + sc.scheduleFrameWrite() + return nil +} + +func (sc *serverConn) processSetting(s Setting) error { + sc.serveG.check() + if err := s.Valid(); err != nil { + return err + } + if VerboseLogs { + sc.vlogf("http2: server processing setting %v", s) + } + switch s.ID { + case SettingHeaderTableSize: + sc.headerTableSize = s.Val + sc.hpackEncoder.SetMaxDynamicTableSize(s.Val) + case SettingEnablePush: + sc.pushEnabled = s.Val != 0 + case SettingMaxConcurrentStreams: + sc.clientMaxStreams = s.Val + case SettingInitialWindowSize: + return sc.processSettingInitialWindowSize(s.Val) + case SettingMaxFrameSize: + sc.writeSched.maxFrameSize = s.Val + case SettingMaxHeaderListSize: + sc.peerMaxHeaderListSize = s.Val + default: + // Unknown setting: "An endpoint that receives a SETTINGS + // frame with any unknown or unsupported identifier MUST + // ignore that setting." + if VerboseLogs { + sc.vlogf("http2: server ignoring unknown setting %v", s) + } + } + return nil +} + +func (sc *serverConn) processSettingInitialWindowSize(val uint32) error { + sc.serveG.check() + // Note: val already validated to be within range by + // processSetting's Valid call. + + // "A SETTINGS frame can alter the initial flow control window + // size for all current streams. When the value of + // SETTINGS_INITIAL_WINDOW_SIZE changes, a receiver MUST + // adjust the size of all stream flow control windows that it + // maintains by the difference between the new value and the + // old value." + old := sc.initialWindowSize + sc.initialWindowSize = int32(val) + growth := sc.initialWindowSize - old // may be negative + for _, st := range sc.streams { + if !st.flow.add(growth) { + // 6.9.2 Initial Flow Control Window Size + // "An endpoint MUST treat a change to + // SETTINGS_INITIAL_WINDOW_SIZE that causes any flow + // control window to exceed the maximum size as a + // connection error (Section 5.4.1) of type + // FLOW_CONTROL_ERROR." + return ConnectionError(ErrCodeFlowControl) + } + } + return nil +} + +func (sc *serverConn) processData(f *DataFrame) error { + sc.serveG.check() + // "If a DATA frame is received whose stream is not in "open" + // or "half closed (local)" state, the recipient MUST respond + // with a stream error (Section 5.4.2) of type STREAM_CLOSED." + id := f.Header().StreamID + st, ok := sc.streams[id] + if !ok || st.state != stateOpen || st.gotTrailerHeader { + // This includes sending a RST_STREAM if the stream is + // in stateHalfClosedLocal (which currently means that + // the http.Handler returned, so it's done reading & + // done writing). Try to stop the client from sending + // more DATA. + return StreamError{id, ErrCodeStreamClosed} + } + if st.body == nil { + panic("internal error: should have a body in this state") + } + data := f.Data() + + // Sender sending more than they'd declared? + if st.declBodyBytes != -1 && st.bodyBytes+int64(len(data)) > st.declBodyBytes { + st.body.CloseWithError(fmt.Errorf("sender tried to send more than declared Content-Length of %d bytes", st.declBodyBytes)) + return StreamError{id, ErrCodeStreamClosed} + } + if len(data) > 0 { + // Check whether the client has flow control quota. + if int(st.inflow.available()) < len(data) { + return StreamError{id, ErrCodeFlowControl} + } + st.inflow.take(int32(len(data))) + wrote, err := st.body.Write(data) + if err != nil { + return StreamError{id, ErrCodeStreamClosed} + } + if wrote != len(data) { + panic("internal error: bad Writer") + } + st.bodyBytes += int64(len(data)) + } + if f.StreamEnded() { + st.endStream() + } + return nil +} + +// endStream closes a Request.Body's pipe. It is called when a DATA +// frame says a request body is over (or after trailers). +func (st *stream) endStream() { + sc := st.sc + sc.serveG.check() + + if st.declBodyBytes != -1 && st.declBodyBytes != st.bodyBytes { + st.body.CloseWithError(fmt.Errorf("request declared a Content-Length of %d but only wrote %d bytes", + st.declBodyBytes, st.bodyBytes)) + } else { + st.body.closeWithErrorAndCode(io.EOF, st.copyTrailersToHandlerRequest) + st.body.CloseWithError(io.EOF) + } + st.state = stateHalfClosedRemote +} + +// copyTrailersToHandlerRequest is run in the Handler's goroutine in +// its Request.Body.Read just before it gets io.EOF. +func (st *stream) copyTrailersToHandlerRequest() { + for k, vv := range st.trailer { + if _, ok := st.reqTrailer[k]; ok { + // Only copy it over it was pre-declared. + st.reqTrailer[k] = vv + } + } +} + +func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error { + sc.serveG.check() + id := f.Header().StreamID + if sc.inGoAway { + // Ignore. + return nil + } + // http://http2.github.io/http2-spec/#rfc.section.5.1.1 + // Streams initiated by a client MUST use odd-numbered stream + // identifiers. [...] An endpoint that receives an unexpected + // stream identifier MUST respond with a connection error + // (Section 5.4.1) of type PROTOCOL_ERROR. + if id%2 != 1 { + return ConnectionError(ErrCodeProtocol) + } + // A HEADERS frame can be used to create a new stream or + // send a trailer for an open one. If we already have a stream + // open, let it process its own HEADERS frame (trailers at this + // point, if it's valid). + st := sc.streams[f.Header().StreamID] + if st != nil { + return st.processTrailerHeaders(f) + } + + // [...] The identifier of a newly established stream MUST be + // numerically greater than all streams that the initiating + // endpoint has opened or reserved. [...] An endpoint that + // receives an unexpected stream identifier MUST respond with + // a connection error (Section 5.4.1) of type PROTOCOL_ERROR. + if id <= sc.maxStreamID { + return ConnectionError(ErrCodeProtocol) + } + sc.maxStreamID = id + + ctx, cancelCtx := contextWithCancel(sc.baseCtx) + st = &stream{ + sc: sc, + id: id, + state: stateOpen, + ctx: ctx, + cancelCtx: cancelCtx, + } + if f.StreamEnded() { + st.state = stateHalfClosedRemote + } + st.cw.Init() + + st.flow.conn = &sc.flow // link to conn-level counter + st.flow.add(sc.initialWindowSize) + st.inflow.conn = &sc.inflow // link to conn-level counter + st.inflow.add(initialWindowSize) // TODO: update this when we send a higher initial window size in the initial settings + + sc.streams[id] = st + if f.HasPriority() { + adjustStreamPriority(sc.streams, st.id, f.Priority) + } + sc.curOpenStreams++ + if sc.curOpenStreams == 1 { + sc.setConnState(http.StateActive) + } + if sc.curOpenStreams > sc.advMaxStreams { + // "Endpoints MUST NOT exceed the limit set by their + // peer. An endpoint that receives a HEADERS frame + // that causes their advertised concurrent stream + // limit to be exceeded MUST treat this as a stream + // error (Section 5.4.2) of type PROTOCOL_ERROR or + // REFUSED_STREAM." + if sc.unackedSettings == 0 { + // They should know better. + return StreamError{st.id, ErrCodeProtocol} + } + // Assume it's a network race, where they just haven't + // received our last SETTINGS update. But actually + // this can't happen yet, because we don't yet provide + // a way for users to adjust server parameters at + // runtime. + return StreamError{st.id, ErrCodeRefusedStream} + } + + rw, req, err := sc.newWriterAndRequest(st, f) + if err != nil { + return err + } + st.reqTrailer = req.Trailer + if st.reqTrailer != nil { + st.trailer = make(http.Header) + } + st.body = req.Body.(*requestBody).pipe // may be nil + st.declBodyBytes = req.ContentLength + + handler := sc.handler.ServeHTTP + if f.Truncated { + // Their header list was too long. Send a 431 error. + handler = handleHeaderListTooLong + } else if err := checkValidHTTP2Request(req); err != nil { + handler = new400Handler(err) + } + + go sc.runHandler(rw, req, handler) + return nil +} + +func (st *stream) processTrailerHeaders(f *MetaHeadersFrame) error { + sc := st.sc + sc.serveG.check() + if st.gotTrailerHeader { + return ConnectionError(ErrCodeProtocol) + } + st.gotTrailerHeader = true + if !f.StreamEnded() { + return StreamError{st.id, ErrCodeProtocol} + } + + if len(f.PseudoFields()) > 0 { + return StreamError{st.id, ErrCodeProtocol} + } + if st.trailer != nil { + for _, hf := range f.RegularFields() { + key := sc.canonicalHeader(hf.Name) + if !ValidTrailerHeader(key) { + // TODO: send more details to the peer somehow. But http2 has + // no way to send debug data at a stream level. Discuss with + // HTTP folk. + return StreamError{st.id, ErrCodeProtocol} + } + st.trailer[key] = append(st.trailer[key], hf.Value) + } + } + st.endStream() + return nil +} + +func (sc *serverConn) processPriority(f *PriorityFrame) error { + adjustStreamPriority(sc.streams, f.StreamID, f.PriorityParam) + return nil +} + +func adjustStreamPriority(streams map[uint32]*stream, streamID uint32, priority PriorityParam) { + st, ok := streams[streamID] + if !ok { + // TODO: not quite correct (this streamID might + // already exist in the dep tree, but be closed), but + // close enough for now. + return + } + st.weight = priority.Weight + parent := streams[priority.StreamDep] // might be nil + if parent == st { + // if client tries to set this stream to be the parent of itself + // ignore and keep going + return + } + + // section 5.3.3: If a stream is made dependent on one of its + // own dependencies, the formerly dependent stream is first + // moved to be dependent on the reprioritized stream's previous + // parent. The moved dependency retains its weight. + for piter := parent; piter != nil; piter = piter.parent { + if piter == st { + parent.parent = st.parent + break + } + } + st.parent = parent + if priority.Exclusive && (st.parent != nil || priority.StreamDep == 0) { + for _, openStream := range streams { + if openStream != st && openStream.parent == st.parent { + openStream.parent = st + } + } + } +} + +func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*responseWriter, *http.Request, error) { + sc.serveG.check() + + method := f.PseudoValue("method") + path := f.PseudoValue("path") + scheme := f.PseudoValue("scheme") + authority := f.PseudoValue("authority") + + isConnect := method == "CONNECT" + if isConnect { + if path != "" || scheme != "" || authority == "" { + return nil, nil, StreamError{f.StreamID, ErrCodeProtocol} + } + } else if method == "" || path == "" || + (scheme != "https" && scheme != "http") { + // See 8.1.2.6 Malformed Requests and Responses: + // + // Malformed requests or responses that are detected + // MUST be treated as a stream error (Section 5.4.2) + // of type PROTOCOL_ERROR." + // + // 8.1.2.3 Request Pseudo-Header Fields + // "All HTTP/2 requests MUST include exactly one valid + // value for the :method, :scheme, and :path + // pseudo-header fields" + return nil, nil, StreamError{f.StreamID, ErrCodeProtocol} + } + + bodyOpen := !f.StreamEnded() + if method == "HEAD" && bodyOpen { + // HEAD requests can't have bodies + return nil, nil, StreamError{f.StreamID, ErrCodeProtocol} + } + var tlsState *tls.ConnectionState // nil if not scheme https + + if scheme == "https" { + tlsState = sc.tlsState + } + + header := make(http.Header) + for _, hf := range f.RegularFields() { + header.Add(sc.canonicalHeader(hf.Name), hf.Value) + } + + if authority == "" { + authority = header.Get("Host") + } + needsContinue := header.Get("Expect") == "100-continue" + if needsContinue { + header.Del("Expect") + } + // Merge Cookie headers into one "; "-delimited value. + if cookies := header["Cookie"]; len(cookies) > 1 { + header.Set("Cookie", strings.Join(cookies, "; ")) + } + + // Setup Trailers + var trailer http.Header + for _, v := range header["Trailer"] { + for _, key := range strings.Split(v, ",") { + key = http.CanonicalHeaderKey(strings.TrimSpace(key)) + switch key { + case "Transfer-Encoding", "Trailer", "Content-Length": + // Bogus. (copy of http1 rules) + // Ignore. + default: + if trailer == nil { + trailer = make(http.Header) + } + trailer[key] = nil + } + } + } + delete(header, "Trailer") + + body := &requestBody{ + conn: sc, + stream: st, + needsContinue: needsContinue, + } + var url_ *url.URL + var requestURI string + if isConnect { + url_ = &url.URL{Host: authority} + requestURI = authority // mimic HTTP/1 server behavior + } else { + var err error + url_, err = url.ParseRequestURI(path) + if err != nil { + return nil, nil, StreamError{f.StreamID, ErrCodeProtocol} + } + requestURI = path + } + req := &http.Request{ + Method: method, + URL: url_, + RemoteAddr: sc.remoteAddrStr, + Header: header, + RequestURI: requestURI, + Proto: "HTTP/2.0", + ProtoMajor: 2, + ProtoMinor: 0, + TLS: tlsState, + Host: authority, + Body: body, + Trailer: trailer, + } + req = requestWithContext(req, st.ctx) + if bodyOpen { + // Disabled, per golang.org/issue/14960: + // st.reqBuf = sc.getRequestBodyBuf() + // TODO: remove this 64k of garbage per request (again, but without a data race): + buf := make([]byte, initialWindowSize) + + body.pipe = &pipe{ + b: &fixedBuffer{buf: buf}, + } + + if vv, ok := header["Content-Length"]; ok { + req.ContentLength, _ = strconv.ParseInt(vv[0], 10, 64) + } else { + req.ContentLength = -1 + } + } + + rws := responseWriterStatePool.Get().(*responseWriterState) + bwSave := rws.bw + *rws = responseWriterState{} // zero all the fields + rws.conn = sc + rws.bw = bwSave + rws.bw.Reset(chunkWriter{rws}) + rws.stream = st + rws.req = req + rws.body = body + + rw := &responseWriter{rws: rws} + return rw, req, nil +} + +func (sc *serverConn) getRequestBodyBuf() []byte { + sc.serveG.check() + if buf := sc.freeRequestBodyBuf; buf != nil { + sc.freeRequestBodyBuf = nil + return buf + } + return make([]byte, initialWindowSize) +} + +// Run on its own goroutine. +func (sc *serverConn) runHandler(rw *responseWriter, req *http.Request, handler func(http.ResponseWriter, *http.Request)) { + didPanic := true + defer func() { + rw.rws.stream.cancelCtx() + if didPanic { + e := recover() + // Same as net/http: + const size = 64 << 10 + buf := make([]byte, size) + buf = buf[:runtime.Stack(buf, false)] + sc.writeFrameFromHandler(frameWriteMsg{ + write: handlerPanicRST{rw.rws.stream.id}, + stream: rw.rws.stream, + }) + sc.logf("http2: panic serving %v: %v\n%s", sc.conn.RemoteAddr(), e, buf) + return + } + rw.handlerDone() + }() + handler(rw, req) + didPanic = false +} + +func handleHeaderListTooLong(w http.ResponseWriter, r *http.Request) { + // 10.5.1 Limits on Header Block Size: + // .. "A server that receives a larger header block than it is + // willing to handle can send an HTTP 431 (Request Header Fields Too + // Large) status code" + const statusRequestHeaderFieldsTooLarge = 431 // only in Go 1.6+ + w.WriteHeader(statusRequestHeaderFieldsTooLarge) + io.WriteString(w, "

HTTP Error 431

Request Header Field(s) Too Large

") +} + +// called from handler goroutines. +// h may be nil. +func (sc *serverConn) writeHeaders(st *stream, headerData *writeResHeaders) error { + sc.serveG.checkNotOn() // NOT on + var errc chan error + if headerData.h != nil { + // If there's a header map (which we don't own), so we have to block on + // waiting for this frame to be written, so an http.Flush mid-handler + // writes out the correct value of keys, before a handler later potentially + // mutates it. + errc = errChanPool.Get().(chan error) + } + if err := sc.writeFrameFromHandler(frameWriteMsg{ + write: headerData, + stream: st, + done: errc, + }); err != nil { + return err + } + if errc != nil { + select { + case err := <-errc: + errChanPool.Put(errc) + return err + case <-sc.doneServing: + return errClientDisconnected + case <-st.cw: + return errStreamClosed + } + } + return nil +} + +// called from handler goroutines. +func (sc *serverConn) write100ContinueHeaders(st *stream) { + sc.writeFrameFromHandler(frameWriteMsg{ + write: write100ContinueHeadersFrame{st.id}, + stream: st, + }) +} + +// A bodyReadMsg tells the server loop that the http.Handler read n +// bytes of the DATA from the client on the given stream. +type bodyReadMsg struct { + st *stream + n int +} + +// called from handler goroutines. +// Notes that the handler for the given stream ID read n bytes of its body +// and schedules flow control tokens to be sent. +func (sc *serverConn) noteBodyReadFromHandler(st *stream, n int) { + sc.serveG.checkNotOn() // NOT on + select { + case sc.bodyReadCh <- bodyReadMsg{st, n}: + case <-sc.doneServing: + } +} + +func (sc *serverConn) noteBodyRead(st *stream, n int) { + sc.serveG.check() + sc.sendWindowUpdate(nil, n) // conn-level + if st.state != stateHalfClosedRemote && st.state != stateClosed { + // Don't send this WINDOW_UPDATE if the stream is closed + // remotely. + sc.sendWindowUpdate(st, n) + } +} + +// st may be nil for conn-level +func (sc *serverConn) sendWindowUpdate(st *stream, n int) { + sc.serveG.check() + // "The legal range for the increment to the flow control + // window is 1 to 2^31-1 (2,147,483,647) octets." + // A Go Read call on 64-bit machines could in theory read + // a larger Read than this. Very unlikely, but we handle it here + // rather than elsewhere for now. + const maxUint31 = 1<<31 - 1 + for n >= maxUint31 { + sc.sendWindowUpdate32(st, maxUint31) + n -= maxUint31 + } + sc.sendWindowUpdate32(st, int32(n)) +} + +// st may be nil for conn-level +func (sc *serverConn) sendWindowUpdate32(st *stream, n int32) { + sc.serveG.check() + if n == 0 { + return + } + if n < 0 { + panic("negative update") + } + var streamID uint32 + if st != nil { + streamID = st.id + } + sc.writeFrame(frameWriteMsg{ + write: writeWindowUpdate{streamID: streamID, n: uint32(n)}, + stream: st, + }) + var ok bool + if st == nil { + ok = sc.inflow.add(n) + } else { + ok = st.inflow.add(n) + } + if !ok { + panic("internal error; sent too many window updates without decrements?") + } +} + +type requestBody struct { + stream *stream + conn *serverConn + closed bool + pipe *pipe // non-nil if we have a HTTP entity message body + needsContinue bool // need to send a 100-continue +} + +func (b *requestBody) Close() error { + if b.pipe != nil { + b.pipe.BreakWithError(errClosedBody) + } + b.closed = true + return nil +} + +func (b *requestBody) Read(p []byte) (n int, err error) { + if b.needsContinue { + b.needsContinue = false + b.conn.write100ContinueHeaders(b.stream) + } + if b.pipe == nil { + return 0, io.EOF + } + n, err = b.pipe.Read(p) + if n > 0 { + b.conn.noteBodyReadFromHandler(b.stream, n) + } + return +} + +// responseWriter is the http.ResponseWriter implementation. It's +// intentionally small (1 pointer wide) to minimize garbage. The +// responseWriterState pointer inside is zeroed at the end of a +// request (in handlerDone) and calls on the responseWriter thereafter +// simply crash (caller's mistake), but the much larger responseWriterState +// and buffers are reused between multiple requests. +type responseWriter struct { + rws *responseWriterState +} + +// Optional http.ResponseWriter interfaces implemented. +var ( + _ http.CloseNotifier = (*responseWriter)(nil) + _ http.Flusher = (*responseWriter)(nil) + _ stringWriter = (*responseWriter)(nil) +) + +type responseWriterState struct { + // immutable within a request: + stream *stream + req *http.Request + body *requestBody // to close at end of request, if DATA frames didn't + conn *serverConn + + // TODO: adjust buffer writing sizes based on server config, frame size updates from peer, etc + bw *bufio.Writer // writing to a chunkWriter{this *responseWriterState} + + // mutated by http.Handler goroutine: + handlerHeader http.Header // nil until called + snapHeader http.Header // snapshot of handlerHeader at WriteHeader time + trailers []string // set in writeChunk + status int // status code passed to WriteHeader + wroteHeader bool // WriteHeader called (explicitly or implicitly). Not necessarily sent to user yet. + sentHeader bool // have we sent the header frame? + handlerDone bool // handler has finished + + sentContentLen int64 // non-zero if handler set a Content-Length header + wroteBytes int64 + + closeNotifierMu sync.Mutex // guards closeNotifierCh + closeNotifierCh chan bool // nil until first used +} + +type chunkWriter struct{ rws *responseWriterState } + +func (cw chunkWriter) Write(p []byte) (n int, err error) { return cw.rws.writeChunk(p) } + +func (rws *responseWriterState) hasTrailers() bool { return len(rws.trailers) != 0 } + +// declareTrailer is called for each Trailer header when the +// response header is written. It notes that a header will need to be +// written in the trailers at the end of the response. +func (rws *responseWriterState) declareTrailer(k string) { + k = http.CanonicalHeaderKey(k) + if !ValidTrailerHeader(k) { + // Forbidden by RFC 2616 14.40. + rws.conn.logf("ignoring invalid trailer %q", k) + return + } + if !strSliceContains(rws.trailers, k) { + rws.trailers = append(rws.trailers, k) + } +} + +// writeChunk writes chunks from the bufio.Writer. But because +// bufio.Writer may bypass its chunking, sometimes p may be +// arbitrarily large. +// +// writeChunk is also responsible (on the first chunk) for sending the +// HEADER response. +func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) { + if !rws.wroteHeader { + rws.writeHeader(200) + } + + isHeadResp := rws.req.Method == "HEAD" + if !rws.sentHeader { + rws.sentHeader = true + var ctype, clen string + if clen = rws.snapHeader.Get("Content-Length"); clen != "" { + rws.snapHeader.Del("Content-Length") + clen64, err := strconv.ParseInt(clen, 10, 64) + if err == nil && clen64 >= 0 { + rws.sentContentLen = clen64 + } else { + clen = "" + } + } + if clen == "" && rws.handlerDone && bodyAllowedForStatus(rws.status) && (len(p) > 0 || !isHeadResp) { + clen = strconv.Itoa(len(p)) + } + _, hasContentType := rws.snapHeader["Content-Type"] + if !hasContentType && bodyAllowedForStatus(rws.status) { + ctype = http.DetectContentType(p) + } + var date string + if _, ok := rws.snapHeader["Date"]; !ok { + // TODO(bradfitz): be faster here, like net/http? measure. + date = time.Now().UTC().Format(http.TimeFormat) + } + + for _, v := range rws.snapHeader["Trailer"] { + foreachHeaderElement(v, rws.declareTrailer) + } + + endStream := (rws.handlerDone && !rws.hasTrailers() && len(p) == 0) || isHeadResp + err = rws.conn.writeHeaders(rws.stream, &writeResHeaders{ + streamID: rws.stream.id, + httpResCode: rws.status, + h: rws.snapHeader, + endStream: endStream, + contentType: ctype, + contentLength: clen, + date: date, + }) + if err != nil { + return 0, err + } + if endStream { + return 0, nil + } + } + if isHeadResp { + return len(p), nil + } + if len(p) == 0 && !rws.handlerDone { + return 0, nil + } + + if rws.handlerDone { + rws.promoteUndeclaredTrailers() + } + + endStream := rws.handlerDone && !rws.hasTrailers() + if len(p) > 0 || endStream { + // only send a 0 byte DATA frame if we're ending the stream. + if err := rws.conn.writeDataFromHandler(rws.stream, p, endStream); err != nil { + return 0, err + } + } + + if rws.handlerDone && rws.hasTrailers() { + err = rws.conn.writeHeaders(rws.stream, &writeResHeaders{ + streamID: rws.stream.id, + h: rws.handlerHeader, + trailers: rws.trailers, + endStream: true, + }) + return len(p), err + } + return len(p), nil +} + +// TrailerPrefix is a magic prefix for ResponseWriter.Header map keys +// that, if present, signals that the map entry is actually for +// the response trailers, and not the response headers. The prefix +// is stripped after the ServeHTTP call finishes and the values are +// sent in the trailers. +// +// This mechanism is intended only for trailers that are not known +// prior to the headers being written. If the set of trailers is fixed +// or known before the header is written, the normal Go trailers mechanism +// is preferred: +// https://golang.org/pkg/net/http/#ResponseWriter +// https://golang.org/pkg/net/http/#example_ResponseWriter_trailers +const TrailerPrefix = "Trailer:" + +// promoteUndeclaredTrailers permits http.Handlers to set trailers +// after the header has already been flushed. Because the Go +// ResponseWriter interface has no way to set Trailers (only the +// Header), and because we didn't want to expand the ResponseWriter +// interface, and because nobody used trailers, and because RFC 2616 +// says you SHOULD (but not must) predeclare any trailers in the +// header, the official ResponseWriter rules said trailers in Go must +// be predeclared, and then we reuse the same ResponseWriter.Header() +// map to mean both Headers and Trailers. When it's time to write the +// Trailers, we pick out the fields of Headers that were declared as +// trailers. That worked for a while, until we found the first major +// user of Trailers in the wild: gRPC (using them only over http2), +// and gRPC libraries permit setting trailers mid-stream without +// predeclarnig them. So: change of plans. We still permit the old +// way, but we also permit this hack: if a Header() key begins with +// "Trailer:", the suffix of that key is a Trailer. Because ':' is an +// invalid token byte anyway, there is no ambiguity. (And it's already +// filtered out) It's mildly hacky, but not terrible. +// +// This method runs after the Handler is done and promotes any Header +// fields to be trailers. +func (rws *responseWriterState) promoteUndeclaredTrailers() { + for k, vv := range rws.handlerHeader { + if !strings.HasPrefix(k, TrailerPrefix) { + continue + } + trailerKey := strings.TrimPrefix(k, TrailerPrefix) + rws.declareTrailer(trailerKey) + rws.handlerHeader[http.CanonicalHeaderKey(trailerKey)] = vv + } + + if len(rws.trailers) > 1 { + sorter := sorterPool.Get().(*sorter) + sorter.SortStrings(rws.trailers) + sorterPool.Put(sorter) + } +} + +func (w *responseWriter) Flush() { + rws := w.rws + if rws == nil { + panic("Header called after Handler finished") + } + if rws.bw.Buffered() > 0 { + if err := rws.bw.Flush(); err != nil { + // Ignore the error. The frame writer already knows. + return + } + } else { + // The bufio.Writer won't call chunkWriter.Write + // (writeChunk with zero bytes, so we have to do it + // ourselves to force the HTTP response header and/or + // final DATA frame (with END_STREAM) to be sent. + rws.writeChunk(nil) + } +} + +func (w *responseWriter) CloseNotify() <-chan bool { + rws := w.rws + if rws == nil { + panic("CloseNotify called after Handler finished") + } + rws.closeNotifierMu.Lock() + ch := rws.closeNotifierCh + if ch == nil { + ch = make(chan bool, 1) + rws.closeNotifierCh = ch + go func() { + rws.stream.cw.Wait() // wait for close + ch <- true + }() + } + rws.closeNotifierMu.Unlock() + return ch +} + +func (w *responseWriter) Header() http.Header { + rws := w.rws + if rws == nil { + panic("Header called after Handler finished") + } + if rws.handlerHeader == nil { + rws.handlerHeader = make(http.Header) + } + return rws.handlerHeader +} + +func (w *responseWriter) WriteHeader(code int) { + rws := w.rws + if rws == nil { + panic("WriteHeader called after Handler finished") + } + rws.writeHeader(code) +} + +func (rws *responseWriterState) writeHeader(code int) { + if !rws.wroteHeader { + rws.wroteHeader = true + rws.status = code + if len(rws.handlerHeader) > 0 { + rws.snapHeader = cloneHeader(rws.handlerHeader) + } + } +} + +func cloneHeader(h http.Header) http.Header { + h2 := make(http.Header, len(h)) + for k, vv := range h { + vv2 := make([]string, len(vv)) + copy(vv2, vv) + h2[k] = vv2 + } + return h2 +} + +// The Life Of A Write is like this: +// +// * Handler calls w.Write or w.WriteString -> +// * -> rws.bw (*bufio.Writer) -> +// * (Handler migth call Flush) +// * -> chunkWriter{rws} +// * -> responseWriterState.writeChunk(p []byte) +// * -> responseWriterState.writeChunk (most of the magic; see comment there) +func (w *responseWriter) Write(p []byte) (n int, err error) { + return w.write(len(p), p, "") +} + +func (w *responseWriter) WriteString(s string) (n int, err error) { + return w.write(len(s), nil, s) +} + +// either dataB or dataS is non-zero. +func (w *responseWriter) write(lenData int, dataB []byte, dataS string) (n int, err error) { + rws := w.rws + if rws == nil { + panic("Write called after Handler finished") + } + if !rws.wroteHeader { + w.WriteHeader(200) + } + if !bodyAllowedForStatus(rws.status) { + return 0, http.ErrBodyNotAllowed + } + rws.wroteBytes += int64(len(dataB)) + int64(len(dataS)) // only one can be set + if rws.sentContentLen != 0 && rws.wroteBytes > rws.sentContentLen { + // TODO: send a RST_STREAM + return 0, errors.New("http2: handler wrote more than declared Content-Length") + } + + if dataB != nil { + return rws.bw.Write(dataB) + } else { + return rws.bw.WriteString(dataS) + } +} + +func (w *responseWriter) handlerDone() { + rws := w.rws + rws.handlerDone = true + w.Flush() + w.rws = nil + responseWriterStatePool.Put(rws) +} + +// foreachHeaderElement splits v according to the "#rule" construction +// in RFC 2616 section 2.1 and calls fn for each non-empty element. +func foreachHeaderElement(v string, fn func(string)) { + v = textproto.TrimString(v) + if v == "" { + return + } + if !strings.Contains(v, ",") { + fn(v) + return + } + for _, f := range strings.Split(v, ",") { + if f = textproto.TrimString(f); f != "" { + fn(f) + } + } +} + +// From http://httpwg.org/specs/rfc7540.html#rfc.section.8.1.2.2 +var connHeaders = []string{ + "Connection", + "Keep-Alive", + "Proxy-Connection", + "Transfer-Encoding", + "Upgrade", +} + +// checkValidHTTP2Request checks whether req is a valid HTTP/2 request, +// per RFC 7540 Section 8.1.2.2. +// The returned error is reported to users. +func checkValidHTTP2Request(req *http.Request) error { + for _, h := range connHeaders { + if _, ok := req.Header[h]; ok { + return fmt.Errorf("request header %q is not valid in HTTP/2", h) + } + } + te := req.Header["Te"] + if len(te) > 0 && (len(te) > 1 || (te[0] != "trailers" && te[0] != "")) { + return errors.New(`request header "TE" may only be "trailers" in HTTP/2`) + } + return nil +} + +func new400Handler(err error) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + http.Error(w, err.Error(), http.StatusBadRequest) + } +} + +// ValidTrailerHeader reports whether name is a valid header field name to appear +// in trailers. +// See: http://tools.ietf.org/html/rfc7230#section-4.1.2 +func ValidTrailerHeader(name string) bool { + name = http.CanonicalHeaderKey(name) + if strings.HasPrefix(name, "If-") || badTrailer[name] { + return false + } + return true +} + +var badTrailer = map[string]bool{ + "Authorization": true, + "Cache-Control": true, + "Connection": true, + "Content-Encoding": true, + "Content-Length": true, + "Content-Range": true, + "Content-Type": true, + "Expect": true, + "Host": true, + "Keep-Alive": true, + "Max-Forwards": true, + "Pragma": true, + "Proxy-Authenticate": true, + "Proxy-Authorization": true, + "Proxy-Connection": true, + "Range": true, + "Realm": true, + "Te": true, + "Trailer": true, + "Transfer-Encoding": true, + "Www-Authenticate": true, +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/transport.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/transport.go new file mode 100644 index 0000000000000..fb8dd997b7436 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/transport.go @@ -0,0 +1,1868 @@ +// Copyright 2015 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. + +// Transport code. + +package http2 + +import ( + "bufio" + "bytes" + "compress/gzip" + "crypto/tls" + "errors" + "fmt" + "io" + "io/ioutil" + "log" + "net" + "net/http" + "sort" + "strconv" + "strings" + "sync" + "time" + + "golang.org/x/net/http2/hpack" + "golang.org/x/net/lex/httplex" +) + +const ( + // transportDefaultConnFlow is how many connection-level flow control + // tokens we give the server at start-up, past the default 64k. + transportDefaultConnFlow = 1 << 30 + + // transportDefaultStreamFlow is how many stream-level flow + // control tokens we announce to the peer, and how many bytes + // we buffer per stream. + transportDefaultStreamFlow = 4 << 20 + + // transportDefaultStreamMinRefresh is the minimum number of bytes we'll send + // a stream-level WINDOW_UPDATE for at a time. + transportDefaultStreamMinRefresh = 4 << 10 + + defaultUserAgent = "Go-http-client/2.0" +) + +// Transport is an HTTP/2 Transport. +// +// A Transport internally caches connections to servers. It is safe +// for concurrent use by multiple goroutines. +type Transport struct { + // DialTLS specifies an optional dial function for creating + // TLS connections for requests. + // + // If DialTLS is nil, tls.Dial is used. + // + // If the returned net.Conn has a ConnectionState method like tls.Conn, + // it will be used to set http.Response.TLS. + DialTLS func(network, addr string, cfg *tls.Config) (net.Conn, error) + + // TLSClientConfig specifies the TLS configuration to use with + // tls.Client. If nil, the default configuration is used. + TLSClientConfig *tls.Config + + // ConnPool optionally specifies an alternate connection pool to use. + // If nil, the default is used. + ConnPool ClientConnPool + + // DisableCompression, if true, prevents the Transport from + // requesting compression with an "Accept-Encoding: gzip" + // request header when the Request contains no existing + // Accept-Encoding value. If the Transport requests gzip on + // its own and gets a gzipped response, it's transparently + // decoded in the Response.Body. However, if the user + // explicitly requested gzip it is not automatically + // uncompressed. + DisableCompression bool + + // AllowHTTP, if true, permits HTTP/2 requests using the insecure, + // plain-text "http" scheme. Note that this does not enable h2c support. + AllowHTTP bool + + // MaxHeaderListSize is the http2 SETTINGS_MAX_HEADER_LIST_SIZE to + // send in the initial settings frame. It is how many bytes + // of response headers are allow. Unlike the http2 spec, zero here + // means to use a default limit (currently 10MB). If you actually + // want to advertise an ulimited value to the peer, Transport + // interprets the highest possible value here (0xffffffff or 1<<32-1) + // to mean no limit. + MaxHeaderListSize uint32 + + // t1, if non-nil, is the standard library Transport using + // this transport. Its settings are used (but not its + // RoundTrip method, etc). + t1 *http.Transport + + connPoolOnce sync.Once + connPoolOrDef ClientConnPool // non-nil version of ConnPool +} + +func (t *Transport) maxHeaderListSize() uint32 { + if t.MaxHeaderListSize == 0 { + return 10 << 20 + } + if t.MaxHeaderListSize == 0xffffffff { + return 0 + } + return t.MaxHeaderListSize +} + +func (t *Transport) disableCompression() bool { + return t.DisableCompression || (t.t1 != nil && t.t1.DisableCompression) +} + +var errTransportVersion = errors.New("http2: ConfigureTransport is only supported starting at Go 1.6") + +// ConfigureTransport configures a net/http HTTP/1 Transport to use HTTP/2. +// It requires Go 1.6 or later and returns an error if the net/http package is too old +// or if t1 has already been HTTP/2-enabled. +func ConfigureTransport(t1 *http.Transport) error { + _, err := configureTransport(t1) // in configure_transport.go (go1.6) or not_go16.go + return err +} + +func (t *Transport) connPool() ClientConnPool { + t.connPoolOnce.Do(t.initConnPool) + return t.connPoolOrDef +} + +func (t *Transport) initConnPool() { + if t.ConnPool != nil { + t.connPoolOrDef = t.ConnPool + } else { + t.connPoolOrDef = &clientConnPool{t: t} + } +} + +// ClientConn is the state of a single HTTP/2 client connection to an +// HTTP/2 server. +type ClientConn struct { + t *Transport + tconn net.Conn // usually *tls.Conn, except specialized impls + tlsState *tls.ConnectionState // nil only for specialized impls + singleUse bool // whether being used for a single http.Request + + // readLoop goroutine fields: + readerDone chan struct{} // closed on error + readerErr error // set before readerDone is closed + + mu sync.Mutex // guards following + cond *sync.Cond // hold mu; broadcast on flow/closed changes + flow flow // our conn-level flow control quota (cs.flow is per stream) + inflow flow // peer's conn-level flow control + closed bool + goAway *GoAwayFrame // if non-nil, the GoAwayFrame we received + goAwayDebug string // goAway frame's debug data, retained as a string + streams map[uint32]*clientStream // client-initiated + nextStreamID uint32 + bw *bufio.Writer + br *bufio.Reader + fr *Framer + lastActive time.Time + + // Settings from peer: + maxFrameSize uint32 + maxConcurrentStreams uint32 + initialWindowSize uint32 + hbuf bytes.Buffer // HPACK encoder writes into this + henc *hpack.Encoder + freeBuf [][]byte + + wmu sync.Mutex // held while writing; acquire AFTER mu if holding both + werr error // first write error that has occurred +} + +// clientStream is the state for a single HTTP/2 stream. One of these +// is created for each Transport.RoundTrip call. +type clientStream struct { + cc *ClientConn + req *http.Request + trace *clientTrace // or nil + ID uint32 + resc chan resAndError + bufPipe pipe // buffered pipe with the flow-controlled response payload + requestedGzip bool + on100 func() // optional code to run if get a 100 continue response + + flow flow // guarded by cc.mu + inflow flow // guarded by cc.mu + bytesRemain int64 // -1 means unknown; owned by transportResponseBody.Read + readErr error // sticky read error; owned by transportResponseBody.Read + stopReqBody error // if non-nil, stop writing req body; guarded by cc.mu + + peerReset chan struct{} // closed on peer reset + resetErr error // populated before peerReset is closed + + done chan struct{} // closed when stream remove from cc.streams map; close calls guarded by cc.mu + + // owned by clientConnReadLoop: + firstByte bool // got the first response byte + pastHeaders bool // got first MetaHeadersFrame (actual headers) + pastTrailers bool // got optional second MetaHeadersFrame (trailers) + + trailer http.Header // accumulated trailers + resTrailer *http.Header // client's Response.Trailer +} + +// awaitRequestCancel runs in its own goroutine and waits for the user +// to cancel a RoundTrip request, its context to expire, or for the +// request to be done (any way it might be removed from the cc.streams +// map: peer reset, successful completion, TCP connection breakage, +// etc) +func (cs *clientStream) awaitRequestCancel(req *http.Request) { + ctx := reqContext(req) + if req.Cancel == nil && ctx.Done() == nil { + return + } + select { + case <-req.Cancel: + cs.bufPipe.CloseWithError(errRequestCanceled) + cs.cc.writeStreamReset(cs.ID, ErrCodeCancel, nil) + case <-ctx.Done(): + cs.bufPipe.CloseWithError(ctx.Err()) + cs.cc.writeStreamReset(cs.ID, ErrCodeCancel, nil) + case <-cs.done: + } +} + +// checkResetOrDone reports any error sent in a RST_STREAM frame by the +// server, or errStreamClosed if the stream is complete. +func (cs *clientStream) checkResetOrDone() error { + select { + case <-cs.peerReset: + return cs.resetErr + case <-cs.done: + return errStreamClosed + default: + return nil + } +} + +func (cs *clientStream) abortRequestBodyWrite(err error) { + if err == nil { + panic("nil error") + } + cc := cs.cc + cc.mu.Lock() + cs.stopReqBody = err + cc.cond.Broadcast() + cc.mu.Unlock() +} + +type stickyErrWriter struct { + w io.Writer + err *error +} + +func (sew stickyErrWriter) Write(p []byte) (n int, err error) { + if *sew.err != nil { + return 0, *sew.err + } + n, err = sew.w.Write(p) + *sew.err = err + return +} + +var ErrNoCachedConn = errors.New("http2: no cached connection was available") + +// RoundTripOpt are options for the Transport.RoundTripOpt method. +type RoundTripOpt struct { + // OnlyCachedConn controls whether RoundTripOpt may + // create a new TCP connection. If set true and + // no cached connection is available, RoundTripOpt + // will return ErrNoCachedConn. + OnlyCachedConn bool +} + +func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) { + return t.RoundTripOpt(req, RoundTripOpt{}) +} + +// authorityAddr returns a given authority (a host/IP, or host:port / ip:port) +// and returns a host:port. The port 443 is added if needed. +func authorityAddr(scheme string, authority string) (addr string) { + if _, _, err := net.SplitHostPort(authority); err == nil { + return authority + } + port := "443" + if scheme == "http" { + port = "80" + } + return net.JoinHostPort(authority, port) +} + +// RoundTripOpt is like RoundTrip, but takes options. +func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Response, error) { + if !(req.URL.Scheme == "https" || (req.URL.Scheme == "http" && t.AllowHTTP)) { + return nil, errors.New("http2: unsupported scheme") + } + + addr := authorityAddr(req.URL.Scheme, req.URL.Host) + for { + cc, err := t.connPool().GetClientConn(req, addr) + if err != nil { + t.vlogf("http2: Transport failed to get client conn for %s: %v", addr, err) + return nil, err + } + traceGotConn(req, cc) + res, err := cc.RoundTrip(req) + if shouldRetryRequest(req, err) { + continue + } + if err != nil { + t.vlogf("RoundTrip failure: %v", err) + return nil, err + } + return res, nil + } +} + +// CloseIdleConnections closes any connections which were previously +// connected from previous requests but are now sitting idle. +// It does not interrupt any connections currently in use. +func (t *Transport) CloseIdleConnections() { + if cp, ok := t.connPool().(clientConnPoolIdleCloser); ok { + cp.closeIdleConnections() + } +} + +var ( + errClientConnClosed = errors.New("http2: client conn is closed") + errClientConnUnusable = errors.New("http2: client conn not usable") +) + +func shouldRetryRequest(req *http.Request, err error) bool { + // TODO: retry GET requests (no bodies) more aggressively, if shutdown + // before response. + return err == errClientConnUnusable +} + +func (t *Transport) dialClientConn(addr string) (*ClientConn, error) { + host, _, err := net.SplitHostPort(addr) + if err != nil { + return nil, err + } + tconn, err := t.dialTLS()("tcp", addr, t.newTLSConfig(host)) + if err != nil { + return nil, err + } + return t.NewClientConn(tconn) +} + +func (t *Transport) newTLSConfig(host string) *tls.Config { + cfg := new(tls.Config) + if t.TLSClientConfig != nil { + *cfg = *t.TLSClientConfig + } + if !strSliceContains(cfg.NextProtos, NextProtoTLS) { + cfg.NextProtos = append([]string{NextProtoTLS}, cfg.NextProtos...) + } + if cfg.ServerName == "" { + cfg.ServerName = host + } + return cfg +} + +func (t *Transport) dialTLS() func(string, string, *tls.Config) (net.Conn, error) { + if t.DialTLS != nil { + return t.DialTLS + } + return t.dialTLSDefault +} + +func (t *Transport) dialTLSDefault(network, addr string, cfg *tls.Config) (net.Conn, error) { + cn, err := tls.Dial(network, addr, cfg) + if err != nil { + return nil, err + } + if err := cn.Handshake(); err != nil { + return nil, err + } + if !cfg.InsecureSkipVerify { + if err := cn.VerifyHostname(cfg.ServerName); err != nil { + return nil, err + } + } + state := cn.ConnectionState() + if p := state.NegotiatedProtocol; p != NextProtoTLS { + return nil, fmt.Errorf("http2: unexpected ALPN protocol %q; want %q", p, NextProtoTLS) + } + if !state.NegotiatedProtocolIsMutual { + return nil, errors.New("http2: could not negotiate protocol mutually") + } + return cn, nil +} + +// disableKeepAlives reports whether connections should be closed as +// soon as possible after handling the first request. +func (t *Transport) disableKeepAlives() bool { + return t.t1 != nil && t.t1.DisableKeepAlives +} + +func (t *Transport) expectContinueTimeout() time.Duration { + if t.t1 == nil { + return 0 + } + return transportExpectContinueTimeout(t.t1) +} + +func (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) { + if VerboseLogs { + t.vlogf("http2: Transport creating client conn to %v", c.RemoteAddr()) + } + if _, err := c.Write(clientPreface); err != nil { + t.vlogf("client preface write error: %v", err) + return nil, err + } + + cc := &ClientConn{ + t: t, + tconn: c, + readerDone: make(chan struct{}), + nextStreamID: 1, + maxFrameSize: 16 << 10, // spec default + initialWindowSize: 65535, // spec default + maxConcurrentStreams: 1000, // "infinite", per spec. 1000 seems good enough. + streams: make(map[uint32]*clientStream), + } + cc.cond = sync.NewCond(&cc.mu) + cc.flow.add(int32(initialWindowSize)) + + // TODO: adjust this writer size to account for frame size + + // MTU + crypto/tls record padding. + cc.bw = bufio.NewWriter(stickyErrWriter{c, &cc.werr}) + cc.br = bufio.NewReader(c) + cc.fr = NewFramer(cc.bw, cc.br) + cc.fr.ReadMetaHeaders = hpack.NewDecoder(initialHeaderTableSize, nil) + cc.fr.MaxHeaderListSize = t.maxHeaderListSize() + + // TODO: SetMaxDynamicTableSize, SetMaxDynamicTableSizeLimit on + // henc in response to SETTINGS frames? + cc.henc = hpack.NewEncoder(&cc.hbuf) + + if cs, ok := c.(connectionStater); ok { + state := cs.ConnectionState() + cc.tlsState = &state + } + + initialSettings := []Setting{ + {ID: SettingEnablePush, Val: 0}, + {ID: SettingInitialWindowSize, Val: transportDefaultStreamFlow}, + } + if max := t.maxHeaderListSize(); max != 0 { + initialSettings = append(initialSettings, Setting{ID: SettingMaxHeaderListSize, Val: max}) + } + cc.fr.WriteSettings(initialSettings...) + cc.fr.WriteWindowUpdate(0, transportDefaultConnFlow) + cc.inflow.add(transportDefaultConnFlow + initialWindowSize) + cc.bw.Flush() + if cc.werr != nil { + return nil, cc.werr + } + + // Read the obligatory SETTINGS frame + f, err := cc.fr.ReadFrame() + if err != nil { + return nil, err + } + sf, ok := f.(*SettingsFrame) + if !ok { + return nil, fmt.Errorf("expected settings frame, got: %T", f) + } + cc.fr.WriteSettingsAck() + cc.bw.Flush() + + sf.ForeachSetting(func(s Setting) error { + switch s.ID { + case SettingMaxFrameSize: + cc.maxFrameSize = s.Val + case SettingMaxConcurrentStreams: + cc.maxConcurrentStreams = s.Val + case SettingInitialWindowSize: + cc.initialWindowSize = s.Val + default: + // TODO(bradfitz): handle more; at least SETTINGS_HEADER_TABLE_SIZE? + t.vlogf("Unhandled Setting: %v", s) + } + return nil + }) + + go cc.readLoop() + return cc, nil +} + +func (cc *ClientConn) setGoAway(f *GoAwayFrame) { + cc.mu.Lock() + defer cc.mu.Unlock() + + old := cc.goAway + cc.goAway = f + + // Merge the previous and current GoAway error frames. + if cc.goAwayDebug == "" { + cc.goAwayDebug = string(f.DebugData()) + } + if old != nil && old.ErrCode != ErrCodeNo { + cc.goAway.ErrCode = old.ErrCode + } +} + +func (cc *ClientConn) CanTakeNewRequest() bool { + cc.mu.Lock() + defer cc.mu.Unlock() + return cc.canTakeNewRequestLocked() +} + +func (cc *ClientConn) canTakeNewRequestLocked() bool { + if cc.singleUse && cc.nextStreamID > 1 { + return false + } + return cc.goAway == nil && !cc.closed && + int64(len(cc.streams)+1) < int64(cc.maxConcurrentStreams) && + cc.nextStreamID < 2147483647 +} + +func (cc *ClientConn) closeIfIdle() { + cc.mu.Lock() + if len(cc.streams) > 0 { + cc.mu.Unlock() + return + } + cc.closed = true + // TODO: do clients send GOAWAY too? maybe? Just Close: + cc.mu.Unlock() + + cc.tconn.Close() +} + +const maxAllocFrameSize = 512 << 10 + +// frameBuffer returns a scratch buffer suitable for writing DATA frames. +// They're capped at the min of the peer's max frame size or 512KB +// (kinda arbitrarily), but definitely capped so we don't allocate 4GB +// bufers. +func (cc *ClientConn) frameScratchBuffer() []byte { + cc.mu.Lock() + size := cc.maxFrameSize + if size > maxAllocFrameSize { + size = maxAllocFrameSize + } + for i, buf := range cc.freeBuf { + if len(buf) >= int(size) { + cc.freeBuf[i] = nil + cc.mu.Unlock() + return buf[:size] + } + } + cc.mu.Unlock() + return make([]byte, size) +} + +func (cc *ClientConn) putFrameScratchBuffer(buf []byte) { + cc.mu.Lock() + defer cc.mu.Unlock() + const maxBufs = 4 // arbitrary; 4 concurrent requests per conn? investigate. + if len(cc.freeBuf) < maxBufs { + cc.freeBuf = append(cc.freeBuf, buf) + return + } + for i, old := range cc.freeBuf { + if old == nil { + cc.freeBuf[i] = buf + return + } + } + // forget about it. +} + +// errRequestCanceled is a copy of net/http's errRequestCanceled because it's not +// exported. At least they'll be DeepEqual for h1-vs-h2 comparisons tests. +var errRequestCanceled = errors.New("net/http: request canceled") + +func commaSeparatedTrailers(req *http.Request) (string, error) { + keys := make([]string, 0, len(req.Trailer)) + for k := range req.Trailer { + k = http.CanonicalHeaderKey(k) + switch k { + case "Transfer-Encoding", "Trailer", "Content-Length": + return "", &badStringError{"invalid Trailer key", k} + } + keys = append(keys, k) + } + if len(keys) > 0 { + sort.Strings(keys) + // TODO: could do better allocation-wise here, but trailers are rare, + // so being lazy for now. + return strings.Join(keys, ","), nil + } + return "", nil +} + +func (cc *ClientConn) responseHeaderTimeout() time.Duration { + if cc.t.t1 != nil { + return cc.t.t1.ResponseHeaderTimeout + } + // No way to do this (yet?) with just an http2.Transport. Probably + // no need. Request.Cancel this is the new way. We only need to support + // this for compatibility with the old http.Transport fields when + // we're doing transparent http2. + return 0 +} + +// checkConnHeaders checks whether req has any invalid connection-level headers. +// per RFC 7540 section 8.1.2.2: Connection-Specific Header Fields. +// Certain headers are special-cased as okay but not transmitted later. +func checkConnHeaders(req *http.Request) error { + if v := req.Header.Get("Upgrade"); v != "" { + return errors.New("http2: invalid Upgrade request header") + } + if v := req.Header.Get("Transfer-Encoding"); (v != "" && v != "chunked") || len(req.Header["Transfer-Encoding"]) > 1 { + return errors.New("http2: invalid Transfer-Encoding request header") + } + if v := req.Header.Get("Connection"); (v != "" && v != "close" && v != "keep-alive") || len(req.Header["Connection"]) > 1 { + return errors.New("http2: invalid Connection request header") + } + return nil +} + +func bodyAndLength(req *http.Request) (body io.Reader, contentLen int64) { + body = req.Body + if body == nil { + return nil, 0 + } + if req.ContentLength != 0 { + return req.Body, req.ContentLength + } + + // We have a body but a zero content length. Test to see if + // it's actually zero or just unset. + var buf [1]byte + n, rerr := io.ReadFull(body, buf[:]) + if rerr != nil && rerr != io.EOF { + return errorReader{rerr}, -1 + } + if n == 1 { + // Oh, guess there is data in this Body Reader after all. + // The ContentLength field just wasn't set. + // Stich the Body back together again, re-attaching our + // consumed byte. + return io.MultiReader(bytes.NewReader(buf[:]), body), -1 + } + // Body is actually zero bytes. + return nil, 0 +} + +func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) { + if err := checkConnHeaders(req); err != nil { + return nil, err + } + + trailers, err := commaSeparatedTrailers(req) + if err != nil { + return nil, err + } + hasTrailers := trailers != "" + + body, contentLen := bodyAndLength(req) + hasBody := body != nil + + cc.mu.Lock() + cc.lastActive = time.Now() + if cc.closed || !cc.canTakeNewRequestLocked() { + cc.mu.Unlock() + return nil, errClientConnUnusable + } + + // TODO(bradfitz): this is a copy of the logic in net/http. Unify somewhere? + var requestedGzip bool + if !cc.t.disableCompression() && + req.Header.Get("Accept-Encoding") == "" && + req.Header.Get("Range") == "" && + req.Method != "HEAD" { + // Request gzip only, not deflate. Deflate is ambiguous and + // not as universally supported anyway. + // See: http://www.gzip.org/zlib/zlib_faq.html#faq38 + // + // Note that we don't request this for HEAD requests, + // due to a bug in nginx: + // http://trac.nginx.org/nginx/ticket/358 + // https://golang.org/issue/5522 + // + // We don't request gzip if the request is for a range, since + // auto-decoding a portion of a gzipped document will just fail + // anyway. See https://golang.org/issue/8923 + requestedGzip = true + } + + // we send: HEADERS{1}, CONTINUATION{0,} + DATA{0,} (DATA is + // sent by writeRequestBody below, along with any Trailers, + // again in form HEADERS{1}, CONTINUATION{0,}) + hdrs, err := cc.encodeHeaders(req, requestedGzip, trailers, contentLen) + if err != nil { + cc.mu.Unlock() + return nil, err + } + + cs := cc.newStream() + cs.req = req + cs.trace = requestTrace(req) + cs.requestedGzip = requestedGzip + bodyWriter := cc.t.getBodyWriterState(cs, body) + cs.on100 = bodyWriter.on100 + + cc.wmu.Lock() + endStream := !hasBody && !hasTrailers + werr := cc.writeHeaders(cs.ID, endStream, hdrs) + cc.wmu.Unlock() + traceWroteHeaders(cs.trace) + cc.mu.Unlock() + + if werr != nil { + if hasBody { + req.Body.Close() // per RoundTripper contract + bodyWriter.cancel() + } + cc.forgetStreamID(cs.ID) + // Don't bother sending a RST_STREAM (our write already failed; + // no need to keep writing) + traceWroteRequest(cs.trace, werr) + return nil, werr + } + + var respHeaderTimer <-chan time.Time + if hasBody { + bodyWriter.scheduleBodyWrite() + } else { + traceWroteRequest(cs.trace, nil) + if d := cc.responseHeaderTimeout(); d != 0 { + timer := time.NewTimer(d) + defer timer.Stop() + respHeaderTimer = timer.C + } + } + + readLoopResCh := cs.resc + bodyWritten := false + ctx := reqContext(req) + + for { + select { + case re := <-readLoopResCh: + res := re.res + if re.err != nil || res.StatusCode > 299 { + // On error or status code 3xx, 4xx, 5xx, etc abort any + // ongoing write, assuming that the server doesn't care + // about our request body. If the server replied with 1xx or + // 2xx, however, then assume the server DOES potentially + // want our body (e.g. full-duplex streaming: + // golang.org/issue/13444). If it turns out the server + // doesn't, they'll RST_STREAM us soon enough. This is a + // heuristic to avoid adding knobs to Transport. Hopefully + // we can keep it. + bodyWriter.cancel() + cs.abortRequestBodyWrite(errStopReqBodyWrite) + } + if re.err != nil { + cc.forgetStreamID(cs.ID) + return nil, re.err + } + res.Request = req + res.TLS = cc.tlsState + return res, nil + case <-respHeaderTimer: + cc.forgetStreamID(cs.ID) + if !hasBody || bodyWritten { + cc.writeStreamReset(cs.ID, ErrCodeCancel, nil) + } else { + bodyWriter.cancel() + cs.abortRequestBodyWrite(errStopReqBodyWriteAndCancel) + } + return nil, errTimeout + case <-ctx.Done(): + cc.forgetStreamID(cs.ID) + if !hasBody || bodyWritten { + cc.writeStreamReset(cs.ID, ErrCodeCancel, nil) + } else { + bodyWriter.cancel() + cs.abortRequestBodyWrite(errStopReqBodyWriteAndCancel) + } + return nil, ctx.Err() + case <-req.Cancel: + cc.forgetStreamID(cs.ID) + if !hasBody || bodyWritten { + cc.writeStreamReset(cs.ID, ErrCodeCancel, nil) + } else { + bodyWriter.cancel() + cs.abortRequestBodyWrite(errStopReqBodyWriteAndCancel) + } + return nil, errRequestCanceled + case <-cs.peerReset: + // processResetStream already removed the + // stream from the streams map; no need for + // forgetStreamID. + return nil, cs.resetErr + case err := <-bodyWriter.resc: + if err != nil { + return nil, err + } + bodyWritten = true + if d := cc.responseHeaderTimeout(); d != 0 { + timer := time.NewTimer(d) + defer timer.Stop() + respHeaderTimer = timer.C + } + } + } +} + +// requires cc.wmu be held +func (cc *ClientConn) writeHeaders(streamID uint32, endStream bool, hdrs []byte) error { + first := true // first frame written (HEADERS is first, then CONTINUATION) + frameSize := int(cc.maxFrameSize) + for len(hdrs) > 0 && cc.werr == nil { + chunk := hdrs + if len(chunk) > frameSize { + chunk = chunk[:frameSize] + } + hdrs = hdrs[len(chunk):] + endHeaders := len(hdrs) == 0 + if first { + cc.fr.WriteHeaders(HeadersFrameParam{ + StreamID: streamID, + BlockFragment: chunk, + EndStream: endStream, + EndHeaders: endHeaders, + }) + first = false + } else { + cc.fr.WriteContinuation(streamID, endHeaders, chunk) + } + } + // TODO(bradfitz): this Flush could potentially block (as + // could the WriteHeaders call(s) above), which means they + // wouldn't respond to Request.Cancel being readable. That's + // rare, but this should probably be in a goroutine. + cc.bw.Flush() + return cc.werr +} + +// internal error values; they don't escape to callers +var ( + // abort request body write; don't send cancel + errStopReqBodyWrite = errors.New("http2: aborting request body write") + + // abort request body write, but send stream reset of cancel. + errStopReqBodyWriteAndCancel = errors.New("http2: canceling request") +) + +func (cs *clientStream) writeRequestBody(body io.Reader, bodyCloser io.Closer) (err error) { + cc := cs.cc + sentEnd := false // whether we sent the final DATA frame w/ END_STREAM + buf := cc.frameScratchBuffer() + defer cc.putFrameScratchBuffer(buf) + + defer func() { + traceWroteRequest(cs.trace, err) + // TODO: write h12Compare test showing whether + // Request.Body is closed by the Transport, + // and in multiple cases: server replies <=299 and >299 + // while still writing request body + cerr := bodyCloser.Close() + if err == nil { + err = cerr + } + }() + + req := cs.req + hasTrailers := req.Trailer != nil + + var sawEOF bool + for !sawEOF { + n, err := body.Read(buf) + if err == io.EOF { + sawEOF = true + err = nil + } else if err != nil { + return err + } + + remain := buf[:n] + for len(remain) > 0 && err == nil { + var allowed int32 + allowed, err = cs.awaitFlowControl(len(remain)) + switch { + case err == errStopReqBodyWrite: + return err + case err == errStopReqBodyWriteAndCancel: + cc.writeStreamReset(cs.ID, ErrCodeCancel, nil) + return err + case err != nil: + return err + } + cc.wmu.Lock() + data := remain[:allowed] + remain = remain[allowed:] + sentEnd = sawEOF && len(remain) == 0 && !hasTrailers + err = cc.fr.WriteData(cs.ID, sentEnd, data) + if err == nil { + // TODO(bradfitz): this flush is for latency, not bandwidth. + // Most requests won't need this. Make this opt-in or opt-out? + // Use some heuristic on the body type? Nagel-like timers? + // Based on 'n'? Only last chunk of this for loop, unless flow control + // tokens are low? For now, always: + err = cc.bw.Flush() + } + cc.wmu.Unlock() + } + if err != nil { + return err + } + } + + cc.wmu.Lock() + if !sentEnd { + var trls []byte + if hasTrailers { + cc.mu.Lock() + trls = cc.encodeTrailers(req) + cc.mu.Unlock() + } + + // Avoid forgetting to send an END_STREAM if the encoded + // trailers are 0 bytes. Both results produce and END_STREAM. + if len(trls) > 0 { + err = cc.writeHeaders(cs.ID, true, trls) + } else { + err = cc.fr.WriteData(cs.ID, true, nil) + } + } + if ferr := cc.bw.Flush(); ferr != nil && err == nil { + err = ferr + } + cc.wmu.Unlock() + + return err +} + +// awaitFlowControl waits for [1, min(maxBytes, cc.cs.maxFrameSize)] flow +// control tokens from the server. +// It returns either the non-zero number of tokens taken or an error +// if the stream is dead. +func (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error) { + cc := cs.cc + cc.mu.Lock() + defer cc.mu.Unlock() + for { + if cc.closed { + return 0, errClientConnClosed + } + if cs.stopReqBody != nil { + return 0, cs.stopReqBody + } + if err := cs.checkResetOrDone(); err != nil { + return 0, err + } + if a := cs.flow.available(); a > 0 { + take := a + if int(take) > maxBytes { + + take = int32(maxBytes) // can't truncate int; take is int32 + } + if take > int32(cc.maxFrameSize) { + take = int32(cc.maxFrameSize) + } + cs.flow.take(take) + return take, nil + } + cc.cond.Wait() + } +} + +type badStringError struct { + what string + str string +} + +func (e *badStringError) Error() string { return fmt.Sprintf("%s %q", e.what, e.str) } + +// requires cc.mu be held. +func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trailers string, contentLength int64) ([]byte, error) { + cc.hbuf.Reset() + + host := req.Host + if host == "" { + host = req.URL.Host + } + + // Check for any invalid headers and return an error before we + // potentially pollute our hpack state. (We want to be able to + // continue to reuse the hpack encoder for future requests) + for k, vv := range req.Header { + if !httplex.ValidHeaderFieldName(k) { + return nil, fmt.Errorf("invalid HTTP header name %q", k) + } + for _, v := range vv { + if !httplex.ValidHeaderFieldValue(v) { + return nil, fmt.Errorf("invalid HTTP header value %q for header %q", v, k) + } + } + } + + // 8.1.2.3 Request Pseudo-Header Fields + // The :path pseudo-header field includes the path and query parts of the + // target URI (the path-absolute production and optionally a '?' character + // followed by the query production (see Sections 3.3 and 3.4 of + // [RFC3986]). + cc.writeHeader(":authority", host) + cc.writeHeader(":method", req.Method) + if req.Method != "CONNECT" { + cc.writeHeader(":path", req.URL.RequestURI()) + cc.writeHeader(":scheme", "https") + } + if trailers != "" { + cc.writeHeader("trailer", trailers) + } + + var didUA bool + for k, vv := range req.Header { + lowKey := strings.ToLower(k) + switch lowKey { + case "host", "content-length": + // Host is :authority, already sent. + // Content-Length is automatic, set below. + continue + case "connection", "proxy-connection", "transfer-encoding", "upgrade", "keep-alive": + // Per 8.1.2.2 Connection-Specific Header + // Fields, don't send connection-specific + // fields. We have already checked if any + // are error-worthy so just ignore the rest. + continue + case "user-agent": + // Match Go's http1 behavior: at most one + // User-Agent. If set to nil or empty string, + // then omit it. Otherwise if not mentioned, + // include the default (below). + didUA = true + if len(vv) < 1 { + continue + } + vv = vv[:1] + if vv[0] == "" { + continue + } + } + for _, v := range vv { + cc.writeHeader(lowKey, v) + } + } + if shouldSendReqContentLength(req.Method, contentLength) { + cc.writeHeader("content-length", strconv.FormatInt(contentLength, 10)) + } + if addGzipHeader { + cc.writeHeader("accept-encoding", "gzip") + } + if !didUA { + cc.writeHeader("user-agent", defaultUserAgent) + } + return cc.hbuf.Bytes(), nil +} + +// shouldSendReqContentLength reports whether the http2.Transport should send +// a "content-length" request header. This logic is basically a copy of the net/http +// transferWriter.shouldSendContentLength. +// The contentLength is the corrected contentLength (so 0 means actually 0, not unknown). +// -1 means unknown. +func shouldSendReqContentLength(method string, contentLength int64) bool { + if contentLength > 0 { + return true + } + if contentLength < 0 { + return false + } + // For zero bodies, whether we send a content-length depends on the method. + // It also kinda doesn't matter for http2 either way, with END_STREAM. + switch method { + case "POST", "PUT", "PATCH": + return true + default: + return false + } +} + +// requires cc.mu be held. +func (cc *ClientConn) encodeTrailers(req *http.Request) []byte { + cc.hbuf.Reset() + for k, vv := range req.Trailer { + // Transfer-Encoding, etc.. have already been filter at the + // start of RoundTrip + lowKey := strings.ToLower(k) + for _, v := range vv { + cc.writeHeader(lowKey, v) + } + } + return cc.hbuf.Bytes() +} + +func (cc *ClientConn) writeHeader(name, value string) { + if VerboseLogs { + log.Printf("http2: Transport encoding header %q = %q", name, value) + } + cc.henc.WriteField(hpack.HeaderField{Name: name, Value: value}) +} + +type resAndError struct { + res *http.Response + err error +} + +// requires cc.mu be held. +func (cc *ClientConn) newStream() *clientStream { + cs := &clientStream{ + cc: cc, + ID: cc.nextStreamID, + resc: make(chan resAndError, 1), + peerReset: make(chan struct{}), + done: make(chan struct{}), + } + cs.flow.add(int32(cc.initialWindowSize)) + cs.flow.setConnFlow(&cc.flow) + cs.inflow.add(transportDefaultStreamFlow) + cs.inflow.setConnFlow(&cc.inflow) + cc.nextStreamID += 2 + cc.streams[cs.ID] = cs + return cs +} + +func (cc *ClientConn) forgetStreamID(id uint32) { + cc.streamByID(id, true) +} + +func (cc *ClientConn) streamByID(id uint32, andRemove bool) *clientStream { + cc.mu.Lock() + defer cc.mu.Unlock() + cs := cc.streams[id] + if andRemove && cs != nil && !cc.closed { + cc.lastActive = time.Now() + delete(cc.streams, id) + close(cs.done) + cc.cond.Broadcast() // wake up checkResetOrDone via clientStream.awaitFlowControl + } + return cs +} + +// clientConnReadLoop is the state owned by the clientConn's frame-reading readLoop. +type clientConnReadLoop struct { + cc *ClientConn + activeRes map[uint32]*clientStream // keyed by streamID + closeWhenIdle bool +} + +// readLoop runs in its own goroutine and reads and dispatches frames. +func (cc *ClientConn) readLoop() { + rl := &clientConnReadLoop{ + cc: cc, + activeRes: make(map[uint32]*clientStream), + } + + defer rl.cleanup() + cc.readerErr = rl.run() + if ce, ok := cc.readerErr.(ConnectionError); ok { + cc.wmu.Lock() + cc.fr.WriteGoAway(0, ErrCode(ce), nil) + cc.wmu.Unlock() + } +} + +// GoAwayError is returned by the Transport when the server closes the +// TCP connection after sending a GOAWAY frame. +type GoAwayError struct { + LastStreamID uint32 + ErrCode ErrCode + DebugData string +} + +func (e GoAwayError) Error() string { + return fmt.Sprintf("http2: server sent GOAWAY and closed the connection; LastStreamID=%v, ErrCode=%v, debug=%q", + e.LastStreamID, e.ErrCode, e.DebugData) +} + +func (rl *clientConnReadLoop) cleanup() { + cc := rl.cc + defer cc.tconn.Close() + defer cc.t.connPool().MarkDead(cc) + defer close(cc.readerDone) + + // Close any response bodies if the server closes prematurely. + // TODO: also do this if we've written the headers but not + // gotten a response yet. + err := cc.readerErr + cc.mu.Lock() + if err == io.EOF { + if cc.goAway != nil { + err = GoAwayError{ + LastStreamID: cc.goAway.LastStreamID, + ErrCode: cc.goAway.ErrCode, + DebugData: cc.goAwayDebug, + } + } else { + err = io.ErrUnexpectedEOF + } + } + for _, cs := range rl.activeRes { + cs.bufPipe.CloseWithError(err) + } + for _, cs := range cc.streams { + select { + case cs.resc <- resAndError{err: err}: + default: + } + close(cs.done) + } + cc.closed = true + cc.cond.Broadcast() + cc.mu.Unlock() +} + +func (rl *clientConnReadLoop) run() error { + cc := rl.cc + rl.closeWhenIdle = cc.t.disableKeepAlives() || cc.singleUse + gotReply := false // ever saw a reply + for { + f, err := cc.fr.ReadFrame() + if err != nil { + cc.vlogf("Transport readFrame error: (%T) %v", err, err) + } + if se, ok := err.(StreamError); ok { + if cs := cc.streamByID(se.StreamID, true /*ended; remove it*/); cs != nil { + rl.endStreamError(cs, cc.fr.errDetail) + } + continue + } else if err != nil { + return err + } + if VerboseLogs { + cc.vlogf("http2: Transport received %s", summarizeFrame(f)) + } + maybeIdle := false // whether frame might transition us to idle + + switch f := f.(type) { + case *MetaHeadersFrame: + err = rl.processHeaders(f) + maybeIdle = true + gotReply = true + case *DataFrame: + err = rl.processData(f) + maybeIdle = true + case *GoAwayFrame: + err = rl.processGoAway(f) + maybeIdle = true + case *RSTStreamFrame: + err = rl.processResetStream(f) + maybeIdle = true + case *SettingsFrame: + err = rl.processSettings(f) + case *PushPromiseFrame: + err = rl.processPushPromise(f) + case *WindowUpdateFrame: + err = rl.processWindowUpdate(f) + case *PingFrame: + err = rl.processPing(f) + default: + cc.logf("Transport: unhandled response frame type %T", f) + } + if err != nil { + return err + } + if rl.closeWhenIdle && gotReply && maybeIdle && len(rl.activeRes) == 0 { + cc.closeIfIdle() + } + } +} + +func (rl *clientConnReadLoop) processHeaders(f *MetaHeadersFrame) error { + cc := rl.cc + cs := cc.streamByID(f.StreamID, f.StreamEnded()) + if cs == nil { + // We'd get here if we canceled a request while the + // server had its response still in flight. So if this + // was just something we canceled, ignore it. + return nil + } + if !cs.firstByte { + if cs.trace != nil { + // TODO(bradfitz): move first response byte earlier, + // when we first read the 9 byte header, not waiting + // until all the HEADERS+CONTINUATION frames have been + // merged. This works for now. + traceFirstResponseByte(cs.trace) + } + cs.firstByte = true + } + if !cs.pastHeaders { + cs.pastHeaders = true + } else { + return rl.processTrailers(cs, f) + } + + res, err := rl.handleResponse(cs, f) + if err != nil { + if _, ok := err.(ConnectionError); ok { + return err + } + // Any other error type is a stream error. + cs.cc.writeStreamReset(f.StreamID, ErrCodeProtocol, err) + cs.resc <- resAndError{err: err} + return nil // return nil from process* funcs to keep conn alive + } + if res == nil { + // (nil, nil) special case. See handleResponse docs. + return nil + } + if res.Body != noBody { + rl.activeRes[cs.ID] = cs + } + cs.resTrailer = &res.Trailer + cs.resc <- resAndError{res: res} + return nil +} + +// may return error types nil, or ConnectionError. Any other error value +// is a StreamError of type ErrCodeProtocol. The returned error in that case +// is the detail. +// +// As a special case, handleResponse may return (nil, nil) to skip the +// frame (currently only used for 100 expect continue). This special +// case is going away after Issue 13851 is fixed. +func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFrame) (*http.Response, error) { + if f.Truncated { + return nil, errResponseHeaderListSize + } + + status := f.PseudoValue("status") + if status == "" { + return nil, errors.New("missing status pseudo header") + } + statusCode, err := strconv.Atoi(status) + if err != nil { + return nil, errors.New("malformed non-numeric status pseudo header") + } + + if statusCode == 100 { + traceGot100Continue(cs.trace) + if cs.on100 != nil { + cs.on100() // forces any write delay timer to fire + } + cs.pastHeaders = false // do it all again + return nil, nil + } + + header := make(http.Header) + res := &http.Response{ + Proto: "HTTP/2.0", + ProtoMajor: 2, + Header: header, + StatusCode: statusCode, + Status: status + " " + http.StatusText(statusCode), + } + for _, hf := range f.RegularFields() { + key := http.CanonicalHeaderKey(hf.Name) + if key == "Trailer" { + t := res.Trailer + if t == nil { + t = make(http.Header) + res.Trailer = t + } + foreachHeaderElement(hf.Value, func(v string) { + t[http.CanonicalHeaderKey(v)] = nil + }) + } else { + header[key] = append(header[key], hf.Value) + } + } + + streamEnded := f.StreamEnded() + isHead := cs.req.Method == "HEAD" + if !streamEnded || isHead { + res.ContentLength = -1 + if clens := res.Header["Content-Length"]; len(clens) == 1 { + if clen64, err := strconv.ParseInt(clens[0], 10, 64); err == nil { + res.ContentLength = clen64 + } else { + // TODO: care? unlike http/1, it won't mess up our framing, so it's + // more safe smuggling-wise to ignore. + } + } else if len(clens) > 1 { + // TODO: care? unlike http/1, it won't mess up our framing, so it's + // more safe smuggling-wise to ignore. + } + } + + if streamEnded || isHead { + res.Body = noBody + return res, nil + } + + buf := new(bytes.Buffer) // TODO(bradfitz): recycle this garbage + cs.bufPipe = pipe{b: buf} + cs.bytesRemain = res.ContentLength + res.Body = transportResponseBody{cs} + go cs.awaitRequestCancel(cs.req) + + if cs.requestedGzip && res.Header.Get("Content-Encoding") == "gzip" { + res.Header.Del("Content-Encoding") + res.Header.Del("Content-Length") + res.ContentLength = -1 + res.Body = &gzipReader{body: res.Body} + setResponseUncompressed(res) + } + return res, nil +} + +func (rl *clientConnReadLoop) processTrailers(cs *clientStream, f *MetaHeadersFrame) error { + if cs.pastTrailers { + // Too many HEADERS frames for this stream. + return ConnectionError(ErrCodeProtocol) + } + cs.pastTrailers = true + if !f.StreamEnded() { + // We expect that any headers for trailers also + // has END_STREAM. + return ConnectionError(ErrCodeProtocol) + } + if len(f.PseudoFields()) > 0 { + // No pseudo header fields are defined for trailers. + // TODO: ConnectionError might be overly harsh? Check. + return ConnectionError(ErrCodeProtocol) + } + + trailer := make(http.Header) + for _, hf := range f.RegularFields() { + key := http.CanonicalHeaderKey(hf.Name) + trailer[key] = append(trailer[key], hf.Value) + } + cs.trailer = trailer + + rl.endStream(cs) + return nil +} + +// transportResponseBody is the concrete type of Transport.RoundTrip's +// Response.Body. It is an io.ReadCloser. On Read, it reads from cs.body. +// On Close it sends RST_STREAM if EOF wasn't already seen. +type transportResponseBody struct { + cs *clientStream +} + +func (b transportResponseBody) Read(p []byte) (n int, err error) { + cs := b.cs + cc := cs.cc + + if cs.readErr != nil { + return 0, cs.readErr + } + n, err = b.cs.bufPipe.Read(p) + if cs.bytesRemain != -1 { + if int64(n) > cs.bytesRemain { + n = int(cs.bytesRemain) + if err == nil { + err = errors.New("net/http: server replied with more than declared Content-Length; truncated") + cc.writeStreamReset(cs.ID, ErrCodeProtocol, err) + } + cs.readErr = err + return int(cs.bytesRemain), err + } + cs.bytesRemain -= int64(n) + if err == io.EOF && cs.bytesRemain > 0 { + err = io.ErrUnexpectedEOF + cs.readErr = err + return n, err + } + } + if n == 0 { + // No flow control tokens to send back. + return + } + + cc.mu.Lock() + defer cc.mu.Unlock() + + var connAdd, streamAdd int32 + // Check the conn-level first, before the stream-level. + if v := cc.inflow.available(); v < transportDefaultConnFlow/2 { + connAdd = transportDefaultConnFlow - v + cc.inflow.add(connAdd) + } + if err == nil { // No need to refresh if the stream is over or failed. + // Consider any buffered body data (read from the conn but not + // consumed by the client) when computing flow control for this + // stream. + v := int(cs.inflow.available()) + cs.bufPipe.Len() + if v < transportDefaultStreamFlow-transportDefaultStreamMinRefresh { + streamAdd = int32(transportDefaultStreamFlow - v) + cs.inflow.add(streamAdd) + } + } + if connAdd != 0 || streamAdd != 0 { + cc.wmu.Lock() + defer cc.wmu.Unlock() + if connAdd != 0 { + cc.fr.WriteWindowUpdate(0, mustUint31(connAdd)) + } + if streamAdd != 0 { + cc.fr.WriteWindowUpdate(cs.ID, mustUint31(streamAdd)) + } + cc.bw.Flush() + } + return +} + +var errClosedResponseBody = errors.New("http2: response body closed") + +func (b transportResponseBody) Close() error { + cs := b.cs + if cs.bufPipe.Err() != io.EOF { + // TODO: write test for this + cs.cc.writeStreamReset(cs.ID, ErrCodeCancel, nil) + } + cs.bufPipe.BreakWithError(errClosedResponseBody) + return nil +} + +func (rl *clientConnReadLoop) processData(f *DataFrame) error { + cc := rl.cc + cs := cc.streamByID(f.StreamID, f.StreamEnded()) + if cs == nil { + cc.mu.Lock() + neverSent := cc.nextStreamID + cc.mu.Unlock() + if f.StreamID >= neverSent { + // We never asked for this. + cc.logf("http2: Transport received unsolicited DATA frame; closing connection") + return ConnectionError(ErrCodeProtocol) + } + // We probably did ask for this, but canceled. Just ignore it. + // TODO: be stricter here? only silently ignore things which + // we canceled, but not things which were closed normally + // by the peer? Tough without accumulating too much state. + return nil + } + if data := f.Data(); len(data) > 0 { + if cs.bufPipe.b == nil { + // Data frame after it's already closed? + cc.logf("http2: Transport received DATA frame for closed stream; closing connection") + return ConnectionError(ErrCodeProtocol) + } + + // Check connection-level flow control. + cc.mu.Lock() + if cs.inflow.available() >= int32(len(data)) { + cs.inflow.take(int32(len(data))) + } else { + cc.mu.Unlock() + return ConnectionError(ErrCodeFlowControl) + } + cc.mu.Unlock() + + if _, err := cs.bufPipe.Write(data); err != nil { + rl.endStreamError(cs, err) + return err + } + } + + if f.StreamEnded() { + rl.endStream(cs) + } + return nil +} + +var errInvalidTrailers = errors.New("http2: invalid trailers") + +func (rl *clientConnReadLoop) endStream(cs *clientStream) { + // TODO: check that any declared content-length matches, like + // server.go's (*stream).endStream method. + rl.endStreamError(cs, nil) +} + +func (rl *clientConnReadLoop) endStreamError(cs *clientStream, err error) { + var code func() + if err == nil { + err = io.EOF + code = cs.copyTrailers + } + cs.bufPipe.closeWithErrorAndCode(err, code) + delete(rl.activeRes, cs.ID) + if cs.req.Close || cs.req.Header.Get("Connection") == "close" { + rl.closeWhenIdle = true + } +} + +func (cs *clientStream) copyTrailers() { + for k, vv := range cs.trailer { + t := cs.resTrailer + if *t == nil { + *t = make(http.Header) + } + (*t)[k] = vv + } +} + +func (rl *clientConnReadLoop) processGoAway(f *GoAwayFrame) error { + cc := rl.cc + cc.t.connPool().MarkDead(cc) + if f.ErrCode != 0 { + // TODO: deal with GOAWAY more. particularly the error code + cc.vlogf("transport got GOAWAY with error code = %v", f.ErrCode) + } + cc.setGoAway(f) + return nil +} + +func (rl *clientConnReadLoop) processSettings(f *SettingsFrame) error { + cc := rl.cc + cc.mu.Lock() + defer cc.mu.Unlock() + return f.ForeachSetting(func(s Setting) error { + switch s.ID { + case SettingMaxFrameSize: + cc.maxFrameSize = s.Val + case SettingMaxConcurrentStreams: + cc.maxConcurrentStreams = s.Val + case SettingInitialWindowSize: + // TODO: error if this is too large. + + // TODO: adjust flow control of still-open + // frames by the difference of the old initial + // window size and this one. + cc.initialWindowSize = s.Val + default: + // TODO(bradfitz): handle more settings? SETTINGS_HEADER_TABLE_SIZE probably. + cc.vlogf("Unhandled Setting: %v", s) + } + return nil + }) +} + +func (rl *clientConnReadLoop) processWindowUpdate(f *WindowUpdateFrame) error { + cc := rl.cc + cs := cc.streamByID(f.StreamID, false) + if f.StreamID != 0 && cs == nil { + return nil + } + + cc.mu.Lock() + defer cc.mu.Unlock() + + fl := &cc.flow + if cs != nil { + fl = &cs.flow + } + if !fl.add(int32(f.Increment)) { + return ConnectionError(ErrCodeFlowControl) + } + cc.cond.Broadcast() + return nil +} + +func (rl *clientConnReadLoop) processResetStream(f *RSTStreamFrame) error { + cs := rl.cc.streamByID(f.StreamID, true) + if cs == nil { + // TODO: return error if server tries to RST_STEAM an idle stream + return nil + } + select { + case <-cs.peerReset: + // Already reset. + // This is the only goroutine + // which closes this, so there + // isn't a race. + default: + err := StreamError{cs.ID, f.ErrCode} + cs.resetErr = err + close(cs.peerReset) + cs.bufPipe.CloseWithError(err) + cs.cc.cond.Broadcast() // wake up checkResetOrDone via clientStream.awaitFlowControl + } + delete(rl.activeRes, cs.ID) + return nil +} + +func (rl *clientConnReadLoop) processPing(f *PingFrame) error { + if f.IsAck() { + // 6.7 PING: " An endpoint MUST NOT respond to PING frames + // containing this flag." + return nil + } + cc := rl.cc + cc.wmu.Lock() + defer cc.wmu.Unlock() + if err := cc.fr.WritePing(true, f.Data); err != nil { + return err + } + return cc.bw.Flush() +} + +func (rl *clientConnReadLoop) processPushPromise(f *PushPromiseFrame) error { + // We told the peer we don't want them. + // Spec says: + // "PUSH_PROMISE MUST NOT be sent if the SETTINGS_ENABLE_PUSH + // setting of the peer endpoint is set to 0. An endpoint that + // has set this setting and has received acknowledgement MUST + // treat the receipt of a PUSH_PROMISE frame as a connection + // error (Section 5.4.1) of type PROTOCOL_ERROR." + return ConnectionError(ErrCodeProtocol) +} + +func (cc *ClientConn) writeStreamReset(streamID uint32, code ErrCode, err error) { + // TODO: do something with err? send it as a debug frame to the peer? + // But that's only in GOAWAY. Invent a new frame type? Is there one already? + cc.wmu.Lock() + cc.fr.WriteRSTStream(streamID, code) + cc.bw.Flush() + cc.wmu.Unlock() +} + +var ( + errResponseHeaderListSize = errors.New("http2: response header list larger than advertised limit") + errPseudoTrailers = errors.New("http2: invalid pseudo header in trailers") +) + +func (cc *ClientConn) logf(format string, args ...interface{}) { + cc.t.logf(format, args...) +} + +func (cc *ClientConn) vlogf(format string, args ...interface{}) { + cc.t.vlogf(format, args...) +} + +func (t *Transport) vlogf(format string, args ...interface{}) { + if VerboseLogs { + t.logf(format, args...) + } +} + +func (t *Transport) logf(format string, args ...interface{}) { + log.Printf(format, args...) +} + +var noBody io.ReadCloser = ioutil.NopCloser(bytes.NewReader(nil)) + +func strSliceContains(ss []string, s string) bool { + for _, v := range ss { + if v == s { + return true + } + } + return false +} + +type erringRoundTripper struct{ err error } + +func (rt erringRoundTripper) RoundTrip(*http.Request) (*http.Response, error) { return nil, rt.err } + +// gzipReader wraps a response body so it can lazily +// call gzip.NewReader on the first call to Read +type gzipReader struct { + body io.ReadCloser // underlying Response.Body + zr *gzip.Reader // lazily-initialized gzip reader + zerr error // sticky error +} + +func (gz *gzipReader) Read(p []byte) (n int, err error) { + if gz.zerr != nil { + return 0, gz.zerr + } + if gz.zr == nil { + gz.zr, err = gzip.NewReader(gz.body) + if err != nil { + gz.zerr = err + return 0, err + } + } + return gz.zr.Read(p) +} + +func (gz *gzipReader) Close() error { + return gz.body.Close() +} + +type errorReader struct{ err error } + +func (r errorReader) Read(p []byte) (int, error) { return 0, r.err } + +// bodyWriterState encapsulates various state around the Transport's writing +// of the request body, particularly regarding doing delayed writes of the body +// when the request contains "Expect: 100-continue". +type bodyWriterState struct { + cs *clientStream + timer *time.Timer // if non-nil, we're doing a delayed write + fnonce *sync.Once // to call fn with + fn func() // the code to run in the goroutine, writing the body + resc chan error // result of fn's execution + delay time.Duration // how long we should delay a delayed write for +} + +func (t *Transport) getBodyWriterState(cs *clientStream, body io.Reader) (s bodyWriterState) { + s.cs = cs + if body == nil { + return + } + resc := make(chan error, 1) + s.resc = resc + s.fn = func() { + resc <- cs.writeRequestBody(body, cs.req.Body) + } + s.delay = t.expectContinueTimeout() + if s.delay == 0 || + !httplex.HeaderValuesContainsToken( + cs.req.Header["Expect"], + "100-continue") { + return + } + s.fnonce = new(sync.Once) + + // Arm the timer with a very large duration, which we'll + // intentionally lower later. It has to be large now because + // we need a handle to it before writing the headers, but the + // s.delay value is defined to not start until after the + // request headers were written. + const hugeDuration = 365 * 24 * time.Hour + s.timer = time.AfterFunc(hugeDuration, func() { + s.fnonce.Do(s.fn) + }) + return +} + +func (s bodyWriterState) cancel() { + if s.timer != nil { + s.timer.Stop() + } +} + +func (s bodyWriterState) on100() { + if s.timer == nil { + // If we didn't do a delayed write, ignore the server's + // bogus 100 continue response. + return + } + s.timer.Stop() + go func() { s.fnonce.Do(s.fn) }() +} + +// scheduleBodyWrite starts writing the body, either immediately (in +// the common case) or after the delay timeout. It should not be +// called until after the headers have been written. +func (s bodyWriterState) scheduleBodyWrite() { + if s.timer == nil { + // We're not doing a delayed write (see + // getBodyWriterState), so just start the writing + // goroutine immediately. + go s.fn() + return + } + traceWait100Continue(s.cs.trace) + if s.timer.Stop() { + s.timer.Reset(s.delay) + } +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/write.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/write.go new file mode 100644 index 0000000000000..27ef0dd4d728c --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/write.go @@ -0,0 +1,264 @@ +// 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. + +package http2 + +import ( + "bytes" + "fmt" + "log" + "net/http" + "time" + + "golang.org/x/net/http2/hpack" + "golang.org/x/net/lex/httplex" +) + +// writeFramer is implemented by any type that is used to write frames. +type writeFramer interface { + writeFrame(writeContext) error +} + +// writeContext is the interface needed by the various frame writer +// types below. All the writeFrame methods below are scheduled via the +// frame writing scheduler (see writeScheduler in writesched.go). +// +// This interface is implemented by *serverConn. +// +// TODO: decide whether to a) use this in the client code (which didn't +// end up using this yet, because it has a simpler design, not +// currently implementing priorities), or b) delete this and +// make the server code a bit more concrete. +type writeContext interface { + Framer() *Framer + Flush() error + CloseConn() error + // HeaderEncoder returns an HPACK encoder that writes to the + // returned buffer. + HeaderEncoder() (*hpack.Encoder, *bytes.Buffer) +} + +// endsStream reports whether the given frame writer w will locally +// close the stream. +func endsStream(w writeFramer) bool { + switch v := w.(type) { + case *writeData: + return v.endStream + case *writeResHeaders: + return v.endStream + case nil: + // This can only happen if the caller reuses w after it's + // been intentionally nil'ed out to prevent use. Keep this + // here to catch future refactoring breaking it. + panic("endsStream called on nil writeFramer") + } + return false +} + +type flushFrameWriter struct{} + +func (flushFrameWriter) writeFrame(ctx writeContext) error { + return ctx.Flush() +} + +type writeSettings []Setting + +func (s writeSettings) writeFrame(ctx writeContext) error { + return ctx.Framer().WriteSettings([]Setting(s)...) +} + +type writeGoAway struct { + maxStreamID uint32 + code ErrCode +} + +func (p *writeGoAway) writeFrame(ctx writeContext) error { + err := ctx.Framer().WriteGoAway(p.maxStreamID, p.code, nil) + if p.code != 0 { + ctx.Flush() // ignore error: we're hanging up on them anyway + time.Sleep(50 * time.Millisecond) + ctx.CloseConn() + } + return err +} + +type writeData struct { + streamID uint32 + p []byte + endStream bool +} + +func (w *writeData) String() string { + return fmt.Sprintf("writeData(stream=%d, p=%d, endStream=%v)", w.streamID, len(w.p), w.endStream) +} + +func (w *writeData) writeFrame(ctx writeContext) error { + return ctx.Framer().WriteData(w.streamID, w.endStream, w.p) +} + +// handlerPanicRST is the message sent from handler goroutines when +// the handler panics. +type handlerPanicRST struct { + StreamID uint32 +} + +func (hp handlerPanicRST) writeFrame(ctx writeContext) error { + return ctx.Framer().WriteRSTStream(hp.StreamID, ErrCodeInternal) +} + +func (se StreamError) writeFrame(ctx writeContext) error { + return ctx.Framer().WriteRSTStream(se.StreamID, se.Code) +} + +type writePingAck struct{ pf *PingFrame } + +func (w writePingAck) writeFrame(ctx writeContext) error { + return ctx.Framer().WritePing(true, w.pf.Data) +} + +type writeSettingsAck struct{} + +func (writeSettingsAck) writeFrame(ctx writeContext) error { + return ctx.Framer().WriteSettingsAck() +} + +// writeResHeaders is a request to write a HEADERS and 0+ CONTINUATION frames +// for HTTP response headers or trailers from a server handler. +type writeResHeaders struct { + streamID uint32 + httpResCode int // 0 means no ":status" line + h http.Header // may be nil + trailers []string // if non-nil, which keys of h to write. nil means all. + endStream bool + + date string + contentType string + contentLength string +} + +func encKV(enc *hpack.Encoder, k, v string) { + if VerboseLogs { + log.Printf("http2: server encoding header %q = %q", k, v) + } + enc.WriteField(hpack.HeaderField{Name: k, Value: v}) +} + +func (w *writeResHeaders) writeFrame(ctx writeContext) error { + enc, buf := ctx.HeaderEncoder() + buf.Reset() + + if w.httpResCode != 0 { + encKV(enc, ":status", httpCodeString(w.httpResCode)) + } + + encodeHeaders(enc, w.h, w.trailers) + + if w.contentType != "" { + encKV(enc, "content-type", w.contentType) + } + if w.contentLength != "" { + encKV(enc, "content-length", w.contentLength) + } + if w.date != "" { + encKV(enc, "date", w.date) + } + + headerBlock := buf.Bytes() + if len(headerBlock) == 0 && w.trailers == nil { + panic("unexpected empty hpack") + } + + // For now we're lazy and just pick the minimum MAX_FRAME_SIZE + // that all peers must support (16KB). Later we could care + // more and send larger frames if the peer advertised it, but + // there's little point. Most headers are small anyway (so we + // generally won't have CONTINUATION frames), and extra frames + // only waste 9 bytes anyway. + const maxFrameSize = 16384 + + first := true + for len(headerBlock) > 0 { + frag := headerBlock + if len(frag) > maxFrameSize { + frag = frag[:maxFrameSize] + } + headerBlock = headerBlock[len(frag):] + endHeaders := len(headerBlock) == 0 + var err error + if first { + first = false + err = ctx.Framer().WriteHeaders(HeadersFrameParam{ + StreamID: w.streamID, + BlockFragment: frag, + EndStream: w.endStream, + EndHeaders: endHeaders, + }) + } else { + err = ctx.Framer().WriteContinuation(w.streamID, endHeaders, frag) + } + if err != nil { + return err + } + } + return nil +} + +type write100ContinueHeadersFrame struct { + streamID uint32 +} + +func (w write100ContinueHeadersFrame) writeFrame(ctx writeContext) error { + enc, buf := ctx.HeaderEncoder() + buf.Reset() + encKV(enc, ":status", "100") + return ctx.Framer().WriteHeaders(HeadersFrameParam{ + StreamID: w.streamID, + BlockFragment: buf.Bytes(), + EndStream: false, + EndHeaders: true, + }) +} + +type writeWindowUpdate struct { + streamID uint32 // or 0 for conn-level + n uint32 +} + +func (wu writeWindowUpdate) writeFrame(ctx writeContext) error { + return ctx.Framer().WriteWindowUpdate(wu.streamID, wu.n) +} + +func encodeHeaders(enc *hpack.Encoder, h http.Header, keys []string) { + if keys == nil { + sorter := sorterPool.Get().(*sorter) + // Using defer here, since the returned keys from the + // sorter.Keys method is only valid until the sorter + // is returned: + defer sorterPool.Put(sorter) + keys = sorter.Keys(h) + } + for _, k := range keys { + vv := h[k] + k = lowerHeader(k) + if !validWireHeaderFieldName(k) { + // Skip it as backup paranoia. Per + // golang.org/issue/14048, these should + // already be rejected at a higher level. + continue + } + isTE := k == "transfer-encoding" + for _, v := range vv { + if !httplex.ValidHeaderFieldValue(v) { + // TODO: return an error? golang.org/issue/14048 + // For now just omit it. + continue + } + // TODO: more of "8.1.2.2 Connection-Specific Header Fields" + if isTE && v != "trailers" { + continue + } + encKV(enc, k, v) + } + } +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/writesched.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/writesched.go new file mode 100644 index 0000000000000..c24316ce7b2fd --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/http2/writesched.go @@ -0,0 +1,283 @@ +// 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. + +package http2 + +import "fmt" + +// frameWriteMsg is a request to write a frame. +type frameWriteMsg struct { + // write is the interface value that does the writing, once the + // writeScheduler (below) has decided to select this frame + // to write. The write functions are all defined in write.go. + write writeFramer + + stream *stream // used for prioritization. nil for non-stream frames. + + // done, if non-nil, must be a buffered channel with space for + // 1 message and is sent the return value from write (or an + // earlier error) when the frame has been written. + done chan error +} + +// for debugging only: +func (wm frameWriteMsg) String() string { + var streamID uint32 + if wm.stream != nil { + streamID = wm.stream.id + } + var des string + if s, ok := wm.write.(fmt.Stringer); ok { + des = s.String() + } else { + des = fmt.Sprintf("%T", wm.write) + } + return fmt.Sprintf("[frameWriteMsg stream=%d, ch=%v, type: %v]", streamID, wm.done != nil, des) +} + +// writeScheduler tracks pending frames to write, priorities, and decides +// the next one to use. It is not thread-safe. +type writeScheduler struct { + // zero are frames not associated with a specific stream. + // They're sent before any stream-specific freams. + zero writeQueue + + // maxFrameSize is the maximum size of a DATA frame + // we'll write. Must be non-zero and between 16K-16M. + maxFrameSize uint32 + + // sq contains the stream-specific queues, keyed by stream ID. + // when a stream is idle, it's deleted from the map. + sq map[uint32]*writeQueue + + // canSend is a slice of memory that's reused between frame + // scheduling decisions to hold the list of writeQueues (from sq) + // which have enough flow control data to send. After canSend is + // built, the best is selected. + canSend []*writeQueue + + // pool of empty queues for reuse. + queuePool []*writeQueue +} + +func (ws *writeScheduler) putEmptyQueue(q *writeQueue) { + if len(q.s) != 0 { + panic("queue must be empty") + } + ws.queuePool = append(ws.queuePool, q) +} + +func (ws *writeScheduler) getEmptyQueue() *writeQueue { + ln := len(ws.queuePool) + if ln == 0 { + return new(writeQueue) + } + q := ws.queuePool[ln-1] + ws.queuePool = ws.queuePool[:ln-1] + return q +} + +func (ws *writeScheduler) empty() bool { return ws.zero.empty() && len(ws.sq) == 0 } + +func (ws *writeScheduler) add(wm frameWriteMsg) { + st := wm.stream + if st == nil { + ws.zero.push(wm) + } else { + ws.streamQueue(st.id).push(wm) + } +} + +func (ws *writeScheduler) streamQueue(streamID uint32) *writeQueue { + if q, ok := ws.sq[streamID]; ok { + return q + } + if ws.sq == nil { + ws.sq = make(map[uint32]*writeQueue) + } + q := ws.getEmptyQueue() + ws.sq[streamID] = q + return q +} + +// take returns the most important frame to write and removes it from the scheduler. +// It is illegal to call this if the scheduler is empty or if there are no connection-level +// flow control bytes available. +func (ws *writeScheduler) take() (wm frameWriteMsg, ok bool) { + if ws.maxFrameSize == 0 { + panic("internal error: ws.maxFrameSize not initialized or invalid") + } + + // If there any frames not associated with streams, prefer those first. + // These are usually SETTINGS, etc. + if !ws.zero.empty() { + return ws.zero.shift(), true + } + if len(ws.sq) == 0 { + return + } + + // Next, prioritize frames on streams that aren't DATA frames (no cost). + for id, q := range ws.sq { + if q.firstIsNoCost() { + return ws.takeFrom(id, q) + } + } + + // Now, all that remains are DATA frames with non-zero bytes to + // send. So pick the best one. + if len(ws.canSend) != 0 { + panic("should be empty") + } + for _, q := range ws.sq { + if n := ws.streamWritableBytes(q); n > 0 { + ws.canSend = append(ws.canSend, q) + } + } + if len(ws.canSend) == 0 { + return + } + defer ws.zeroCanSend() + + // TODO: find the best queue + q := ws.canSend[0] + + return ws.takeFrom(q.streamID(), q) +} + +// zeroCanSend is defered from take. +func (ws *writeScheduler) zeroCanSend() { + for i := range ws.canSend { + ws.canSend[i] = nil + } + ws.canSend = ws.canSend[:0] +} + +// streamWritableBytes returns the number of DATA bytes we could write +// from the given queue's stream, if this stream/queue were +// selected. It is an error to call this if q's head isn't a +// *writeData. +func (ws *writeScheduler) streamWritableBytes(q *writeQueue) int32 { + wm := q.head() + ret := wm.stream.flow.available() // max we can write + if ret == 0 { + return 0 + } + if int32(ws.maxFrameSize) < ret { + ret = int32(ws.maxFrameSize) + } + if ret == 0 { + panic("internal error: ws.maxFrameSize not initialized or invalid") + } + wd := wm.write.(*writeData) + if len(wd.p) < int(ret) { + ret = int32(len(wd.p)) + } + return ret +} + +func (ws *writeScheduler) takeFrom(id uint32, q *writeQueue) (wm frameWriteMsg, ok bool) { + wm = q.head() + // If the first item in this queue costs flow control tokens + // and we don't have enough, write as much as we can. + if wd, ok := wm.write.(*writeData); ok && len(wd.p) > 0 { + allowed := wm.stream.flow.available() // max we can write + if allowed == 0 { + // No quota available. Caller can try the next stream. + return frameWriteMsg{}, false + } + if int32(ws.maxFrameSize) < allowed { + allowed = int32(ws.maxFrameSize) + } + // TODO: further restrict the allowed size, because even if + // the peer says it's okay to write 16MB data frames, we might + // want to write smaller ones to properly weight competing + // streams' priorities. + + if len(wd.p) > int(allowed) { + wm.stream.flow.take(allowed) + chunk := wd.p[:allowed] + wd.p = wd.p[allowed:] + // Make up a new write message of a valid size, rather + // than shifting one off the queue. + return frameWriteMsg{ + stream: wm.stream, + write: &writeData{ + streamID: wd.streamID, + p: chunk, + // even if the original had endStream set, there + // arebytes remaining because len(wd.p) > allowed, + // so we know endStream is false: + endStream: false, + }, + // our caller is blocking on the final DATA frame, not + // these intermediates, so no need to wait: + done: nil, + }, true + } + wm.stream.flow.take(int32(len(wd.p))) + } + + q.shift() + if q.empty() { + ws.putEmptyQueue(q) + delete(ws.sq, id) + } + return wm, true +} + +func (ws *writeScheduler) forgetStream(id uint32) { + q, ok := ws.sq[id] + if !ok { + return + } + delete(ws.sq, id) + + // But keep it for others later. + for i := range q.s { + q.s[i] = frameWriteMsg{} + } + q.s = q.s[:0] + ws.putEmptyQueue(q) +} + +type writeQueue struct { + s []frameWriteMsg +} + +// streamID returns the stream ID for a non-empty stream-specific queue. +func (q *writeQueue) streamID() uint32 { return q.s[0].stream.id } + +func (q *writeQueue) empty() bool { return len(q.s) == 0 } + +func (q *writeQueue) push(wm frameWriteMsg) { + q.s = append(q.s, wm) +} + +// head returns the next item that would be removed by shift. +func (q *writeQueue) head() frameWriteMsg { + if len(q.s) == 0 { + panic("invalid use of queue") + } + return q.s[0] +} + +func (q *writeQueue) shift() frameWriteMsg { + if len(q.s) == 0 { + panic("invalid use of queue") + } + wm := q.s[0] + // TODO: less copy-happy queue. + copy(q.s, q.s[1:]) + q.s[len(q.s)-1] = frameWriteMsg{} + q.s = q.s[:len(q.s)-1] + return wm +} + +func (q *writeQueue) firstIsNoCost() bool { + if df, ok := q.s[0].write.(*writeData); ok { + return len(df.p) == 0 + } + return true +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/lex/httplex/httplex.go b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/lex/httplex/httplex.go new file mode 100644 index 0000000000000..bd0ec24f44436 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/golang.org/x/net/lex/httplex/httplex.go @@ -0,0 +1,312 @@ +// Copyright 2016 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. + +// Package httplex contains rules around lexical matters of various +// HTTP-related specifications. +// +// This package is shared by the standard library (which vendors it) +// and x/net/http2. It comes with no API stability promise. +package httplex + +import ( + "strings" + "unicode/utf8" +) + +var isTokenTable = [127]bool{ + '!': true, + '#': true, + '$': true, + '%': true, + '&': true, + '\'': true, + '*': true, + '+': true, + '-': true, + '.': true, + '0': true, + '1': true, + '2': true, + '3': true, + '4': true, + '5': true, + '6': true, + '7': true, + '8': true, + '9': true, + 'A': true, + 'B': true, + 'C': true, + 'D': true, + 'E': true, + 'F': true, + 'G': true, + 'H': true, + 'I': true, + 'J': true, + 'K': true, + 'L': true, + 'M': true, + 'N': true, + 'O': true, + 'P': true, + 'Q': true, + 'R': true, + 'S': true, + 'T': true, + 'U': true, + 'W': true, + 'V': true, + 'X': true, + 'Y': true, + 'Z': true, + '^': true, + '_': true, + '`': true, + 'a': true, + 'b': true, + 'c': true, + 'd': true, + 'e': true, + 'f': true, + 'g': true, + 'h': true, + 'i': true, + 'j': true, + 'k': true, + 'l': true, + 'm': true, + 'n': true, + 'o': true, + 'p': true, + 'q': true, + 'r': true, + 's': true, + 't': true, + 'u': true, + 'v': true, + 'w': true, + 'x': true, + 'y': true, + 'z': true, + '|': true, + '~': true, +} + +func IsTokenRune(r rune) bool { + i := int(r) + return i < len(isTokenTable) && isTokenTable[i] +} + +func isNotToken(r rune) bool { + return !IsTokenRune(r) +} + +// HeaderValuesContainsToken reports whether any string in values +// contains the provided token, ASCII case-insensitively. +func HeaderValuesContainsToken(values []string, token string) bool { + for _, v := range values { + if headerValueContainsToken(v, token) { + return true + } + } + return false +} + +// isOWS reports whether b is an optional whitespace byte, as defined +// by RFC 7230 section 3.2.3. +func isOWS(b byte) bool { return b == ' ' || b == '\t' } + +// trimOWS returns x with all optional whitespace removes from the +// beginning and end. +func trimOWS(x string) string { + // TODO: consider using strings.Trim(x, " \t") instead, + // if and when it's fast enough. See issue 10292. + // But this ASCII-only code will probably always beat UTF-8 + // aware code. + for len(x) > 0 && isOWS(x[0]) { + x = x[1:] + } + for len(x) > 0 && isOWS(x[len(x)-1]) { + x = x[:len(x)-1] + } + return x +} + +// headerValueContainsToken reports whether v (assumed to be a +// 0#element, in the ABNF extension described in RFC 7230 section 7) +// contains token amongst its comma-separated tokens, ASCII +// case-insensitively. +func headerValueContainsToken(v string, token string) bool { + v = trimOWS(v) + if comma := strings.IndexByte(v, ','); comma != -1 { + return tokenEqual(trimOWS(v[:comma]), token) || headerValueContainsToken(v[comma+1:], token) + } + return tokenEqual(v, token) +} + +// lowerASCII returns the ASCII lowercase version of b. +func lowerASCII(b byte) byte { + if 'A' <= b && b <= 'Z' { + return b + ('a' - 'A') + } + return b +} + +// tokenEqual reports whether t1 and t2 are equal, ASCII case-insensitively. +func tokenEqual(t1, t2 string) bool { + if len(t1) != len(t2) { + return false + } + for i, b := range t1 { + if b >= utf8.RuneSelf { + // No UTF-8 or non-ASCII allowed in tokens. + return false + } + if lowerASCII(byte(b)) != lowerASCII(t2[i]) { + return false + } + } + return true +} + +// isLWS reports whether b is linear white space, according +// to http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2 +// LWS = [CRLF] 1*( SP | HT ) +func isLWS(b byte) bool { return b == ' ' || b == '\t' } + +// isCTL reports whether b is a control byte, according +// to http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2 +// CTL = +func isCTL(b byte) bool { + const del = 0x7f // a CTL + return b < ' ' || b == del +} + +// ValidHeaderFieldName reports whether v is a valid HTTP/1.x header name. +// HTTP/2 imposes the additional restriction that uppercase ASCII +// letters are not allowed. +// +// RFC 7230 says: +// header-field = field-name ":" OWS field-value OWS +// field-name = token +// token = 1*tchar +// tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." / +// "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA +func ValidHeaderFieldName(v string) bool { + if len(v) == 0 { + return false + } + for _, r := range v { + if !IsTokenRune(r) { + return false + } + } + return true +} + +// ValidHostHeader reports whether h is a valid host header. +func ValidHostHeader(h string) bool { + // The latest spec is actually this: + // + // http://tools.ietf.org/html/rfc7230#section-5.4 + // Host = uri-host [ ":" port ] + // + // Where uri-host is: + // http://tools.ietf.org/html/rfc3986#section-3.2.2 + // + // But we're going to be much more lenient for now and just + // search for any byte that's not a valid byte in any of those + // expressions. + for i := 0; i < len(h); i++ { + if !validHostByte[h[i]] { + return false + } + } + return true +} + +// See the validHostHeader comment. +var validHostByte = [256]bool{ + '0': true, '1': true, '2': true, '3': true, '4': true, '5': true, '6': true, '7': true, + '8': true, '9': true, + + 'a': true, 'b': true, 'c': true, 'd': true, 'e': true, 'f': true, 'g': true, 'h': true, + 'i': true, 'j': true, 'k': true, 'l': true, 'm': true, 'n': true, 'o': true, 'p': true, + 'q': true, 'r': true, 's': true, 't': true, 'u': true, 'v': true, 'w': true, 'x': true, + 'y': true, 'z': true, + + 'A': true, 'B': true, 'C': true, 'D': true, 'E': true, 'F': true, 'G': true, 'H': true, + 'I': true, 'J': true, 'K': true, 'L': true, 'M': true, 'N': true, 'O': true, 'P': true, + 'Q': true, 'R': true, 'S': true, 'T': true, 'U': true, 'V': true, 'W': true, 'X': true, + 'Y': true, 'Z': true, + + '!': true, // sub-delims + '$': true, // sub-delims + '%': true, // pct-encoded (and used in IPv6 zones) + '&': true, // sub-delims + '(': true, // sub-delims + ')': true, // sub-delims + '*': true, // sub-delims + '+': true, // sub-delims + ',': true, // sub-delims + '-': true, // unreserved + '.': true, // unreserved + ':': true, // IPv6address + Host expression's optional port + ';': true, // sub-delims + '=': true, // sub-delims + '[': true, + '\'': true, // sub-delims + ']': true, + '_': true, // unreserved + '~': true, // unreserved +} + +// ValidHeaderFieldValue reports whether v is a valid "field-value" according to +// http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 : +// +// message-header = field-name ":" [ field-value ] +// field-value = *( field-content | LWS ) +// field-content = +// +// http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2 : +// +// TEXT = +// LWS = [CRLF] 1*( SP | HT ) +// CTL = +// +// RFC 7230 says: +// field-value = *( field-content / obs-fold ) +// obj-fold = N/A to http2, and deprecated +// field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] +// field-vchar = VCHAR / obs-text +// obs-text = %x80-FF +// VCHAR = "any visible [USASCII] character" +// +// http2 further says: "Similarly, HTTP/2 allows header field values +// that are not valid. While most of the values that can be encoded +// will not alter header field parsing, carriage return (CR, ASCII +// 0xd), line feed (LF, ASCII 0xa), and the zero character (NUL, ASCII +// 0x0) might be exploited by an attacker if they are translated +// verbatim. Any request or response that contains a character not +// permitted in a header field value MUST be treated as malformed +// (Section 8.1.2.6). Valid characters are defined by the +// field-content ABNF rule in Section 3.2 of [RFC7230]." +// +// This function does not (yet?) properly handle the rejection of +// strings that begin or end with SP or HTAB. +func ValidHeaderFieldValue(v string) bool { + for i := 0; i < len(v); i++ { + b := v[i] + if isCTL(b) && !isLWS(b) { + return false + } + } + return true +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/inf.v0/LICENSE b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/inf.v0/LICENSE new file mode 100644 index 0000000000000..87a5cede33929 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/inf.v0/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2012 Péter Surányi. Portions 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. diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/inf.v0/dec.go b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/inf.v0/dec.go new file mode 100644 index 0000000000000..d17ad945d42db --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/inf.v0/dec.go @@ -0,0 +1,615 @@ +// Package inf (type inf.Dec) implements "infinite-precision" decimal +// arithmetic. +// "Infinite precision" describes two characteristics: practically unlimited +// precision for decimal number representation and no support for calculating +// with any specific fixed precision. +// (Although there is no practical limit on precision, inf.Dec can only +// represent finite decimals.) +// +// This package is currently in experimental stage and the API may change. +// +// This package does NOT support: +// - rounding to specific precisions (as opposed to specific decimal positions) +// - the notion of context (each rounding must be explicit) +// - NaN and Inf values, and distinguishing between positive and negative zero +// - conversions to and from float32/64 types +// +// Features considered for possible addition: +// + formatting options +// + Exp method +// + combined operations such as AddRound/MulAdd etc +// + exchanging data in decimal32/64/128 formats +// +package inf + +// TODO: +// - avoid excessive deep copying (quo and rounders) + +import ( + "fmt" + "io" + "math/big" + "strings" +) + +// A Dec represents a signed arbitrary-precision decimal. +// It is a combination of a sign, an arbitrary-precision integer coefficient +// value, and a signed fixed-precision exponent value. +// The sign and the coefficient value are handled together as a signed value +// and referred to as the unscaled value. +// (Positive and negative zero values are not distinguished.) +// Since the exponent is most commonly non-positive, it is handled in negated +// form and referred to as scale. +// +// The mathematical value of a Dec equals: +// +// unscaled * 10**(-scale) +// +// Note that different Dec representations may have equal mathematical values. +// +// unscaled scale String() +// ------------------------- +// 0 0 "0" +// 0 2 "0.00" +// 0 -2 "0" +// 1 0 "1" +// 100 2 "1.00" +// 10 0 "10" +// 1 -1 "10" +// +// The zero value for a Dec represents the value 0 with scale 0. +// +// Operations are typically performed through the *Dec type. +// The semantics of the assignment operation "=" for "bare" Dec values is +// undefined and should not be relied on. +// +// Methods are typically of the form: +// +// func (z *Dec) Op(x, y *Dec) *Dec +// +// and implement operations z = x Op y with the result as receiver; if it +// is one of the operands it may be overwritten (and its memory reused). +// To enable chaining of operations, the result is also returned. Methods +// returning a result other than *Dec take one of the operands as the receiver. +// +// A "bare" Quo method (quotient / division operation) is not provided, as the +// result is not always a finite decimal and thus in general cannot be +// represented as a Dec. +// Instead, in the common case when rounding is (potentially) necessary, +// QuoRound should be used with a Scale and a Rounder. +// QuoExact or QuoRound with RoundExact can be used in the special cases when it +// is known that the result is always a finite decimal. +// +type Dec struct { + unscaled big.Int + scale Scale +} + +// Scale represents the type used for the scale of a Dec. +type Scale int32 + +const scaleSize = 4 // bytes in a Scale value + +// Scaler represents a method for obtaining the scale to use for the result of +// an operation on x and y. +type scaler interface { + Scale(x *Dec, y *Dec) Scale +} + +var bigInt = [...]*big.Int{ + big.NewInt(0), big.NewInt(1), big.NewInt(2), big.NewInt(3), big.NewInt(4), + big.NewInt(5), big.NewInt(6), big.NewInt(7), big.NewInt(8), big.NewInt(9), + big.NewInt(10), +} + +var exp10cache [64]big.Int = func() [64]big.Int { + e10, e10i := [64]big.Int{}, bigInt[1] + for i, _ := range e10 { + e10[i].Set(e10i) + e10i = new(big.Int).Mul(e10i, bigInt[10]) + } + return e10 +}() + +// NewDec allocates and returns a new Dec set to the given int64 unscaled value +// and scale. +func NewDec(unscaled int64, scale Scale) *Dec { + return new(Dec).SetUnscaled(unscaled).SetScale(scale) +} + +// NewDecBig allocates and returns a new Dec set to the given *big.Int unscaled +// value and scale. +func NewDecBig(unscaled *big.Int, scale Scale) *Dec { + return new(Dec).SetUnscaledBig(unscaled).SetScale(scale) +} + +// Scale returns the scale of x. +func (x *Dec) Scale() Scale { + return x.scale +} + +// Unscaled returns the unscaled value of x for u and true for ok when the +// unscaled value can be represented as int64; otherwise it returns an undefined +// int64 value for u and false for ok. Use x.UnscaledBig().Int64() to avoid +// checking the validity of the value when the check is known to be redundant. +func (x *Dec) Unscaled() (u int64, ok bool) { + u = x.unscaled.Int64() + var i big.Int + ok = i.SetInt64(u).Cmp(&x.unscaled) == 0 + return +} + +// UnscaledBig returns the unscaled value of x as *big.Int. +func (x *Dec) UnscaledBig() *big.Int { + return &x.unscaled +} + +// SetScale sets the scale of z, with the unscaled value unchanged, and returns +// z. +// The mathematical value of the Dec changes as if it was multiplied by +// 10**(oldscale-scale). +func (z *Dec) SetScale(scale Scale) *Dec { + z.scale = scale + return z +} + +// SetUnscaled sets the unscaled value of z, with the scale unchanged, and +// returns z. +func (z *Dec) SetUnscaled(unscaled int64) *Dec { + z.unscaled.SetInt64(unscaled) + return z +} + +// SetUnscaledBig sets the unscaled value of z, with the scale unchanged, and +// returns z. +func (z *Dec) SetUnscaledBig(unscaled *big.Int) *Dec { + z.unscaled.Set(unscaled) + return z +} + +// Set sets z to the value of x and returns z. +// It does nothing if z == x. +func (z *Dec) Set(x *Dec) *Dec { + if z != x { + z.SetUnscaledBig(x.UnscaledBig()) + z.SetScale(x.Scale()) + } + return z +} + +// Sign returns: +// +// -1 if x < 0 +// 0 if x == 0 +// +1 if x > 0 +// +func (x *Dec) Sign() int { + return x.UnscaledBig().Sign() +} + +// Neg sets z to -x and returns z. +func (z *Dec) Neg(x *Dec) *Dec { + z.SetScale(x.Scale()) + z.UnscaledBig().Neg(x.UnscaledBig()) + return z +} + +// Cmp compares x and y and returns: +// +// -1 if x < y +// 0 if x == y +// +1 if x > y +// +func (x *Dec) Cmp(y *Dec) int { + xx, yy := upscale(x, y) + return xx.UnscaledBig().Cmp(yy.UnscaledBig()) +} + +// Abs sets z to |x| (the absolute value of x) and returns z. +func (z *Dec) Abs(x *Dec) *Dec { + z.SetScale(x.Scale()) + z.UnscaledBig().Abs(x.UnscaledBig()) + return z +} + +// Add sets z to the sum x+y and returns z. +// The scale of z is the greater of the scales of x and y. +func (z *Dec) Add(x, y *Dec) *Dec { + xx, yy := upscale(x, y) + z.SetScale(xx.Scale()) + z.UnscaledBig().Add(xx.UnscaledBig(), yy.UnscaledBig()) + return z +} + +// Sub sets z to the difference x-y and returns z. +// The scale of z is the greater of the scales of x and y. +func (z *Dec) Sub(x, y *Dec) *Dec { + xx, yy := upscale(x, y) + z.SetScale(xx.Scale()) + z.UnscaledBig().Sub(xx.UnscaledBig(), yy.UnscaledBig()) + return z +} + +// Mul sets z to the product x*y and returns z. +// The scale of z is the sum of the scales of x and y. +func (z *Dec) Mul(x, y *Dec) *Dec { + z.SetScale(x.Scale() + y.Scale()) + z.UnscaledBig().Mul(x.UnscaledBig(), y.UnscaledBig()) + return z +} + +// Round sets z to the value of x rounded to Scale s using Rounder r, and +// returns z. +func (z *Dec) Round(x *Dec, s Scale, r Rounder) *Dec { + return z.QuoRound(x, NewDec(1, 0), s, r) +} + +// QuoRound sets z to the quotient x/y, rounded using the given Rounder to the +// specified scale. +// +// If the rounder is RoundExact but the result can not be expressed exactly at +// the specified scale, QuoRound returns nil, and the value of z is undefined. +// +// There is no corresponding Div method; the equivalent can be achieved through +// the choice of Rounder used. +// +func (z *Dec) QuoRound(x, y *Dec, s Scale, r Rounder) *Dec { + return z.quo(x, y, sclr{s}, r) +} + +func (z *Dec) quo(x, y *Dec, s scaler, r Rounder) *Dec { + scl := s.Scale(x, y) + var zzz *Dec + if r.UseRemainder() { + zz, rA, rB := new(Dec).quoRem(x, y, scl, true, new(big.Int), new(big.Int)) + zzz = r.Round(new(Dec), zz, rA, rB) + } else { + zz, _, _ := new(Dec).quoRem(x, y, scl, false, nil, nil) + zzz = r.Round(new(Dec), zz, nil, nil) + } + if zzz == nil { + return nil + } + return z.Set(zzz) +} + +// QuoExact sets z to the quotient x/y and returns z when x/y is a finite +// decimal. Otherwise it returns nil and the value of z is undefined. +// +// The scale of a non-nil result is "x.Scale() - y.Scale()" or greater; it is +// calculated so that the remainder will be zero whenever x/y is a finite +// decimal. +func (z *Dec) QuoExact(x, y *Dec) *Dec { + return z.quo(x, y, scaleQuoExact{}, RoundExact) +} + +// quoRem sets z to the quotient x/y with the scale s, and if useRem is true, +// it sets remNum and remDen to the numerator and denominator of the remainder. +// It returns z, remNum and remDen. +// +// The remainder is normalized to the range -1 < r < 1 to simplify rounding; +// that is, the results satisfy the following equation: +// +// x / y = z + (remNum/remDen) * 10**(-z.Scale()) +// +// See Rounder for more details about rounding. +// +func (z *Dec) quoRem(x, y *Dec, s Scale, useRem bool, + remNum, remDen *big.Int) (*Dec, *big.Int, *big.Int) { + // difference (required adjustment) compared to "canonical" result scale + shift := s - (x.Scale() - y.Scale()) + // pointers to adjusted unscaled dividend and divisor + var ix, iy *big.Int + switch { + case shift > 0: + // increased scale: decimal-shift dividend left + ix = new(big.Int).Mul(x.UnscaledBig(), exp10(shift)) + iy = y.UnscaledBig() + case shift < 0: + // decreased scale: decimal-shift divisor left + ix = x.UnscaledBig() + iy = new(big.Int).Mul(y.UnscaledBig(), exp10(-shift)) + default: + ix = x.UnscaledBig() + iy = y.UnscaledBig() + } + // save a copy of iy in case it to be overwritten with the result + iy2 := iy + if iy == z.UnscaledBig() { + iy2 = new(big.Int).Set(iy) + } + // set scale + z.SetScale(s) + // set unscaled + if useRem { + // Int division + _, intr := z.UnscaledBig().QuoRem(ix, iy, new(big.Int)) + // set remainder + remNum.Set(intr) + remDen.Set(iy2) + } else { + z.UnscaledBig().Quo(ix, iy) + } + return z, remNum, remDen +} + +type sclr struct{ s Scale } + +func (s sclr) Scale(x, y *Dec) Scale { + return s.s +} + +type scaleQuoExact struct{} + +func (sqe scaleQuoExact) Scale(x, y *Dec) Scale { + rem := new(big.Rat).SetFrac(x.UnscaledBig(), y.UnscaledBig()) + f2, f5 := factor2(rem.Denom()), factor(rem.Denom(), bigInt[5]) + var f10 Scale + if f2 > f5 { + f10 = Scale(f2) + } else { + f10 = Scale(f5) + } + return x.Scale() - y.Scale() + f10 +} + +func factor(n *big.Int, p *big.Int) int { + // could be improved for large factors + d, f := n, 0 + for { + dd, dm := new(big.Int).DivMod(d, p, new(big.Int)) + if dm.Sign() == 0 { + f++ + d = dd + } else { + break + } + } + return f +} + +func factor2(n *big.Int) int { + // could be improved for large factors + f := 0 + for ; n.Bit(f) == 0; f++ { + } + return f +} + +func upscale(a, b *Dec) (*Dec, *Dec) { + if a.Scale() == b.Scale() { + return a, b + } + if a.Scale() > b.Scale() { + bb := b.rescale(a.Scale()) + return a, bb + } + aa := a.rescale(b.Scale()) + return aa, b +} + +func exp10(x Scale) *big.Int { + if int(x) < len(exp10cache) { + return &exp10cache[int(x)] + } + return new(big.Int).Exp(bigInt[10], big.NewInt(int64(x)), nil) +} + +func (x *Dec) rescale(newScale Scale) *Dec { + shift := newScale - x.Scale() + switch { + case shift < 0: + e := exp10(-shift) + return NewDecBig(new(big.Int).Quo(x.UnscaledBig(), e), newScale) + case shift > 0: + e := exp10(shift) + return NewDecBig(new(big.Int).Mul(x.UnscaledBig(), e), newScale) + } + return x +} + +var zeros = []byte("00000000000000000000000000000000" + + "00000000000000000000000000000000") +var lzeros = Scale(len(zeros)) + +func appendZeros(s []byte, n Scale) []byte { + for i := Scale(0); i < n; i += lzeros { + if n > i+lzeros { + s = append(s, zeros...) + } else { + s = append(s, zeros[0:n-i]...) + } + } + return s +} + +func (x *Dec) String() string { + if x == nil { + return "" + } + scale := x.Scale() + s := []byte(x.UnscaledBig().String()) + if scale <= 0 { + if scale != 0 && x.unscaled.Sign() != 0 { + s = appendZeros(s, -scale) + } + return string(s) + } + negbit := Scale(-((x.Sign() - 1) / 2)) + // scale > 0 + lens := Scale(len(s)) + if lens-negbit <= scale { + ss := make([]byte, 0, scale+2) + if negbit == 1 { + ss = append(ss, '-') + } + ss = append(ss, '0', '.') + ss = appendZeros(ss, scale-lens+negbit) + ss = append(ss, s[negbit:]...) + return string(ss) + } + // lens > scale + ss := make([]byte, 0, lens+1) + ss = append(ss, s[:lens-scale]...) + ss = append(ss, '.') + ss = append(ss, s[lens-scale:]...) + return string(ss) +} + +// Format is a support routine for fmt.Formatter. It accepts the decimal +// formats 'd' and 'f', and handles both equivalently. +// Width, precision, flags and bases 2, 8, 16 are not supported. +func (x *Dec) Format(s fmt.State, ch rune) { + if ch != 'd' && ch != 'f' && ch != 'v' && ch != 's' { + fmt.Fprintf(s, "%%!%c(dec.Dec=%s)", ch, x.String()) + return + } + fmt.Fprintf(s, x.String()) +} + +func (z *Dec) scan(r io.RuneScanner) (*Dec, error) { + unscaled := make([]byte, 0, 256) // collects chars of unscaled as bytes + dp, dg := -1, -1 // indexes of decimal point, first digit +loop: + for { + ch, _, err := r.ReadRune() + if err == io.EOF { + break loop + } + if err != nil { + return nil, err + } + switch { + case ch == '+' || ch == '-': + if len(unscaled) > 0 || dp >= 0 { // must be first character + r.UnreadRune() + break loop + } + case ch == '.': + if dp >= 0 { + r.UnreadRune() + break loop + } + dp = len(unscaled) + continue // don't add to unscaled + case ch >= '0' && ch <= '9': + if dg == -1 { + dg = len(unscaled) + } + default: + r.UnreadRune() + break loop + } + unscaled = append(unscaled, byte(ch)) + } + if dg == -1 { + return nil, fmt.Errorf("no digits read") + } + if dp >= 0 { + z.SetScale(Scale(len(unscaled) - dp)) + } else { + z.SetScale(0) + } + _, ok := z.UnscaledBig().SetString(string(unscaled), 10) + if !ok { + return nil, fmt.Errorf("invalid decimal: %s", string(unscaled)) + } + return z, nil +} + +// SetString sets z to the value of s, interpreted as a decimal (base 10), +// and returns z and a boolean indicating success. The scale of z is the +// number of digits after the decimal point (including any trailing 0s), +// or 0 if there is no decimal point. If SetString fails, the value of z +// is undefined but the returned value is nil. +func (z *Dec) SetString(s string) (*Dec, bool) { + r := strings.NewReader(s) + _, err := z.scan(r) + if err != nil { + return nil, false + } + _, _, err = r.ReadRune() + if err != io.EOF { + return nil, false + } + // err == io.EOF => scan consumed all of s + return z, true +} + +// Scan is a support routine for fmt.Scanner; it sets z to the value of +// the scanned number. It accepts the decimal formats 'd' and 'f', and +// handles both equivalently. Bases 2, 8, 16 are not supported. +// The scale of z is the number of digits after the decimal point +// (including any trailing 0s), or 0 if there is no decimal point. +func (z *Dec) Scan(s fmt.ScanState, ch rune) error { + if ch != 'd' && ch != 'f' && ch != 's' && ch != 'v' { + return fmt.Errorf("Dec.Scan: invalid verb '%c'", ch) + } + s.SkipSpace() + _, err := z.scan(s) + return err +} + +// Gob encoding version +const decGobVersion byte = 1 + +func scaleBytes(s Scale) []byte { + buf := make([]byte, scaleSize) + i := scaleSize + for j := 0; j < scaleSize; j++ { + i-- + buf[i] = byte(s) + s >>= 8 + } + return buf +} + +func scale(b []byte) (s Scale) { + for j := 0; j < scaleSize; j++ { + s <<= 8 + s |= Scale(b[j]) + } + return +} + +// GobEncode implements the gob.GobEncoder interface. +func (x *Dec) GobEncode() ([]byte, error) { + buf, err := x.UnscaledBig().GobEncode() + if err != nil { + return nil, err + } + buf = append(append(buf, scaleBytes(x.Scale())...), decGobVersion) + return buf, nil +} + +// GobDecode implements the gob.GobDecoder interface. +func (z *Dec) GobDecode(buf []byte) error { + if len(buf) == 0 { + return fmt.Errorf("Dec.GobDecode: no data") + } + b := buf[len(buf)-1] + if b != decGobVersion { + return fmt.Errorf("Dec.GobDecode: encoding version %d not supported", b) + } + l := len(buf) - scaleSize - 1 + err := z.UnscaledBig().GobDecode(buf[:l]) + if err != nil { + return err + } + z.SetScale(scale(buf[l : l+scaleSize])) + return nil +} + +// MarshalText implements the encoding.TextMarshaler interface. +func (x *Dec) MarshalText() ([]byte, error) { + return []byte(x.String()), nil +} + +// UnmarshalText implements the encoding.TextUnmarshaler interface. +func (z *Dec) UnmarshalText(data []byte) error { + _, ok := z.SetString(string(data)) + if !ok { + return fmt.Errorf("invalid inf.Dec") + } + return nil +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/inf.v0/rounder.go b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/inf.v0/rounder.go new file mode 100644 index 0000000000000..3a97ef529b97e --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/inf.v0/rounder.go @@ -0,0 +1,145 @@ +package inf + +import ( + "math/big" +) + +// Rounder represents a method for rounding the (possibly infinite decimal) +// result of a division to a finite Dec. It is used by Dec.Round() and +// Dec.Quo(). +// +// See the Example for results of using each Rounder with some sample values. +// +type Rounder rounder + +// See http://speleotrove.com/decimal/damodel.html#refround for more detailed +// definitions of these rounding modes. +var ( + RoundDown Rounder // towards 0 + RoundUp Rounder // away from 0 + RoundFloor Rounder // towards -infinity + RoundCeil Rounder // towards +infinity + RoundHalfDown Rounder // to nearest; towards 0 if same distance + RoundHalfUp Rounder // to nearest; away from 0 if same distance + RoundHalfEven Rounder // to nearest; even last digit if same distance +) + +// RoundExact is to be used in the case when rounding is not necessary. +// When used with Quo or Round, it returns the result verbatim when it can be +// expressed exactly with the given precision, and it returns nil otherwise. +// QuoExact is a shorthand for using Quo with RoundExact. +var RoundExact Rounder + +type rounder interface { + + // When UseRemainder() returns true, the Round() method is passed the + // remainder of the division, expressed as the numerator and denominator of + // a rational. + UseRemainder() bool + + // Round sets the rounded value of a quotient to z, and returns z. + // quo is rounded down (truncated towards zero) to the scale obtained from + // the Scaler in Quo(). + // + // When the remainder is not used, remNum and remDen are nil. + // When used, the remainder is normalized between -1 and 1; that is: + // + // -|remDen| < remNum < |remDen| + // + // remDen has the same sign as y, and remNum is zero or has the same sign + // as x. + Round(z, quo *Dec, remNum, remDen *big.Int) *Dec +} + +type rndr struct { + useRem bool + round func(z, quo *Dec, remNum, remDen *big.Int) *Dec +} + +func (r rndr) UseRemainder() bool { + return r.useRem +} + +func (r rndr) Round(z, quo *Dec, remNum, remDen *big.Int) *Dec { + return r.round(z, quo, remNum, remDen) +} + +var intSign = []*big.Int{big.NewInt(-1), big.NewInt(0), big.NewInt(1)} + +func roundHalf(f func(c int, odd uint) (roundUp bool)) func(z, q *Dec, rA, rB *big.Int) *Dec { + return func(z, q *Dec, rA, rB *big.Int) *Dec { + z.Set(q) + brA, brB := rA.BitLen(), rB.BitLen() + if brA < brB-1 { + // brA < brB-1 => |rA| < |rB/2| + return z + } + roundUp := false + srA, srB := rA.Sign(), rB.Sign() + s := srA * srB + if brA == brB-1 { + rA2 := new(big.Int).Lsh(rA, 1) + if s < 0 { + rA2.Neg(rA2) + } + roundUp = f(rA2.Cmp(rB)*srB, z.UnscaledBig().Bit(0)) + } else { + // brA > brB-1 => |rA| > |rB/2| + roundUp = true + } + if roundUp { + z.UnscaledBig().Add(z.UnscaledBig(), intSign[s+1]) + } + return z + } +} + +func init() { + RoundExact = rndr{true, + func(z, q *Dec, rA, rB *big.Int) *Dec { + if rA.Sign() != 0 { + return nil + } + return z.Set(q) + }} + RoundDown = rndr{false, + func(z, q *Dec, rA, rB *big.Int) *Dec { + return z.Set(q) + }} + RoundUp = rndr{true, + func(z, q *Dec, rA, rB *big.Int) *Dec { + z.Set(q) + if rA.Sign() != 0 { + z.UnscaledBig().Add(z.UnscaledBig(), intSign[rA.Sign()*rB.Sign()+1]) + } + return z + }} + RoundFloor = rndr{true, + func(z, q *Dec, rA, rB *big.Int) *Dec { + z.Set(q) + if rA.Sign()*rB.Sign() < 0 { + z.UnscaledBig().Add(z.UnscaledBig(), intSign[0]) + } + return z + }} + RoundCeil = rndr{true, + func(z, q *Dec, rA, rB *big.Int) *Dec { + z.Set(q) + if rA.Sign()*rB.Sign() > 0 { + z.UnscaledBig().Add(z.UnscaledBig(), intSign[2]) + } + return z + }} + RoundHalfDown = rndr{true, roundHalf( + func(c int, odd uint) bool { + return c > 0 + })} + RoundHalfUp = rndr{true, roundHalf( + func(c int, odd uint) bool { + return c >= 0 + })} + RoundHalfEven = rndr{true, roundHalf( + func(c int, odd uint) bool { + return c > 0 || c == 0 && odd == 1 + })} +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/LICENSE b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/LICENSE new file mode 100644 index 0000000000000..a68e67f01b0cb --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/LICENSE @@ -0,0 +1,188 @@ + +Copyright (c) 2011-2014 - Canonical Inc. + +This software is licensed under the LGPLv3, included below. + +As a special exception to the GNU Lesser General Public License version 3 +("LGPL3"), the copyright holders of this Library give you permission to +convey to a third party a Combined Work that links statically or dynamically +to this Library without providing any Minimal Corresponding Source or +Minimal Application Code as set out in 4d or providing the installation +information set out in section 4e, provided that you comply with the other +provisions of LGPL3 and provided that you meet, for the Application the +terms and conditions of the license(s) which apply to the Application. + +Except as stated in this special exception, the provisions of LGPL3 will +continue to comply in full to this Library. If you modify this Library, you +may apply this exception to your version of this Library, but you are not +obliged to do so. If you do not wish to do so, delete this exception +statement from your version. This exception does not (and cannot) modify any +license terms which apply to the Application, with which you must still +comply. + + + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/LICENSE.libyaml b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/LICENSE.libyaml new file mode 100644 index 0000000000000..8da58fbf6f84a --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/LICENSE.libyaml @@ -0,0 +1,31 @@ +The following files were ported to Go from C files of libyaml, and thus +are still covered by their original copyright and license: + + apic.go + emitterc.go + parserc.go + readerc.go + scannerc.go + writerc.go + yamlh.go + yamlprivateh.go + +Copyright (c) 2006 Kirill Simonov + +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/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/apic.go b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/apic.go new file mode 100644 index 0000000000000..95ec014e8ccfd --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/apic.go @@ -0,0 +1,742 @@ +package yaml + +import ( + "io" + "os" +) + +func yaml_insert_token(parser *yaml_parser_t, pos int, token *yaml_token_t) { + //fmt.Println("yaml_insert_token", "pos:", pos, "typ:", token.typ, "head:", parser.tokens_head, "len:", len(parser.tokens)) + + // Check if we can move the queue at the beginning of the buffer. + if parser.tokens_head > 0 && len(parser.tokens) == cap(parser.tokens) { + if parser.tokens_head != len(parser.tokens) { + copy(parser.tokens, parser.tokens[parser.tokens_head:]) + } + parser.tokens = parser.tokens[:len(parser.tokens)-parser.tokens_head] + parser.tokens_head = 0 + } + parser.tokens = append(parser.tokens, *token) + if pos < 0 { + return + } + copy(parser.tokens[parser.tokens_head+pos+1:], parser.tokens[parser.tokens_head+pos:]) + parser.tokens[parser.tokens_head+pos] = *token +} + +// Create a new parser object. +func yaml_parser_initialize(parser *yaml_parser_t) bool { + *parser = yaml_parser_t{ + raw_buffer: make([]byte, 0, input_raw_buffer_size), + buffer: make([]byte, 0, input_buffer_size), + } + return true +} + +// Destroy a parser object. +func yaml_parser_delete(parser *yaml_parser_t) { + *parser = yaml_parser_t{} +} + +// String read handler. +func yaml_string_read_handler(parser *yaml_parser_t, buffer []byte) (n int, err error) { + if parser.input_pos == len(parser.input) { + return 0, io.EOF + } + n = copy(buffer, parser.input[parser.input_pos:]) + parser.input_pos += n + return n, nil +} + +// File read handler. +func yaml_file_read_handler(parser *yaml_parser_t, buffer []byte) (n int, err error) { + return parser.input_file.Read(buffer) +} + +// Set a string input. +func yaml_parser_set_input_string(parser *yaml_parser_t, input []byte) { + if parser.read_handler != nil { + panic("must set the input source only once") + } + parser.read_handler = yaml_string_read_handler + parser.input = input + parser.input_pos = 0 +} + +// Set a file input. +func yaml_parser_set_input_file(parser *yaml_parser_t, file *os.File) { + if parser.read_handler != nil { + panic("must set the input source only once") + } + parser.read_handler = yaml_file_read_handler + parser.input_file = file +} + +// Set the source encoding. +func yaml_parser_set_encoding(parser *yaml_parser_t, encoding yaml_encoding_t) { + if parser.encoding != yaml_ANY_ENCODING { + panic("must set the encoding only once") + } + parser.encoding = encoding +} + +// Create a new emitter object. +func yaml_emitter_initialize(emitter *yaml_emitter_t) bool { + *emitter = yaml_emitter_t{ + buffer: make([]byte, output_buffer_size), + raw_buffer: make([]byte, 0, output_raw_buffer_size), + states: make([]yaml_emitter_state_t, 0, initial_stack_size), + events: make([]yaml_event_t, 0, initial_queue_size), + } + return true +} + +// Destroy an emitter object. +func yaml_emitter_delete(emitter *yaml_emitter_t) { + *emitter = yaml_emitter_t{} +} + +// String write handler. +func yaml_string_write_handler(emitter *yaml_emitter_t, buffer []byte) error { + *emitter.output_buffer = append(*emitter.output_buffer, buffer...) + return nil +} + +// File write handler. +func yaml_file_write_handler(emitter *yaml_emitter_t, buffer []byte) error { + _, err := emitter.output_file.Write(buffer) + return err +} + +// Set a string output. +func yaml_emitter_set_output_string(emitter *yaml_emitter_t, output_buffer *[]byte) { + if emitter.write_handler != nil { + panic("must set the output target only once") + } + emitter.write_handler = yaml_string_write_handler + emitter.output_buffer = output_buffer +} + +// Set a file output. +func yaml_emitter_set_output_file(emitter *yaml_emitter_t, file io.Writer) { + if emitter.write_handler != nil { + panic("must set the output target only once") + } + emitter.write_handler = yaml_file_write_handler + emitter.output_file = file +} + +// Set the output encoding. +func yaml_emitter_set_encoding(emitter *yaml_emitter_t, encoding yaml_encoding_t) { + if emitter.encoding != yaml_ANY_ENCODING { + panic("must set the output encoding only once") + } + emitter.encoding = encoding +} + +// Set the canonical output style. +func yaml_emitter_set_canonical(emitter *yaml_emitter_t, canonical bool) { + emitter.canonical = canonical +} + +//// Set the indentation increment. +func yaml_emitter_set_indent(emitter *yaml_emitter_t, indent int) { + if indent < 2 || indent > 9 { + indent = 2 + } + emitter.best_indent = indent +} + +// Set the preferred line width. +func yaml_emitter_set_width(emitter *yaml_emitter_t, width int) { + if width < 0 { + width = -1 + } + emitter.best_width = width +} + +// Set if unescaped non-ASCII characters are allowed. +func yaml_emitter_set_unicode(emitter *yaml_emitter_t, unicode bool) { + emitter.unicode = unicode +} + +// Set the preferred line break character. +func yaml_emitter_set_break(emitter *yaml_emitter_t, line_break yaml_break_t) { + emitter.line_break = line_break +} + +///* +// * Destroy a token object. +// */ +// +//YAML_DECLARE(void) +//yaml_token_delete(yaml_token_t *token) +//{ +// assert(token); // Non-NULL token object expected. +// +// switch (token.type) +// { +// case YAML_TAG_DIRECTIVE_TOKEN: +// yaml_free(token.data.tag_directive.handle); +// yaml_free(token.data.tag_directive.prefix); +// break; +// +// case YAML_ALIAS_TOKEN: +// yaml_free(token.data.alias.value); +// break; +// +// case YAML_ANCHOR_TOKEN: +// yaml_free(token.data.anchor.value); +// break; +// +// case YAML_TAG_TOKEN: +// yaml_free(token.data.tag.handle); +// yaml_free(token.data.tag.suffix); +// break; +// +// case YAML_SCALAR_TOKEN: +// yaml_free(token.data.scalar.value); +// break; +// +// default: +// break; +// } +// +// memset(token, 0, sizeof(yaml_token_t)); +//} +// +///* +// * Check if a string is a valid UTF-8 sequence. +// * +// * Check 'reader.c' for more details on UTF-8 encoding. +// */ +// +//static int +//yaml_check_utf8(yaml_char_t *start, size_t length) +//{ +// yaml_char_t *end = start+length; +// yaml_char_t *pointer = start; +// +// while (pointer < end) { +// unsigned char octet; +// unsigned int width; +// unsigned int value; +// size_t k; +// +// octet = pointer[0]; +// width = (octet & 0x80) == 0x00 ? 1 : +// (octet & 0xE0) == 0xC0 ? 2 : +// (octet & 0xF0) == 0xE0 ? 3 : +// (octet & 0xF8) == 0xF0 ? 4 : 0; +// value = (octet & 0x80) == 0x00 ? octet & 0x7F : +// (octet & 0xE0) == 0xC0 ? octet & 0x1F : +// (octet & 0xF0) == 0xE0 ? octet & 0x0F : +// (octet & 0xF8) == 0xF0 ? octet & 0x07 : 0; +// if (!width) return 0; +// if (pointer+width > end) return 0; +// for (k = 1; k < width; k ++) { +// octet = pointer[k]; +// if ((octet & 0xC0) != 0x80) return 0; +// value = (value << 6) + (octet & 0x3F); +// } +// if (!((width == 1) || +// (width == 2 && value >= 0x80) || +// (width == 3 && value >= 0x800) || +// (width == 4 && value >= 0x10000))) return 0; +// +// pointer += width; +// } +// +// return 1; +//} +// + +// Create STREAM-START. +func yaml_stream_start_event_initialize(event *yaml_event_t, encoding yaml_encoding_t) bool { + *event = yaml_event_t{ + typ: yaml_STREAM_START_EVENT, + encoding: encoding, + } + return true +} + +// Create STREAM-END. +func yaml_stream_end_event_initialize(event *yaml_event_t) bool { + *event = yaml_event_t{ + typ: yaml_STREAM_END_EVENT, + } + return true +} + +// Create DOCUMENT-START. +func yaml_document_start_event_initialize(event *yaml_event_t, version_directive *yaml_version_directive_t, + tag_directives []yaml_tag_directive_t, implicit bool) bool { + *event = yaml_event_t{ + typ: yaml_DOCUMENT_START_EVENT, + version_directive: version_directive, + tag_directives: tag_directives, + implicit: implicit, + } + return true +} + +// Create DOCUMENT-END. +func yaml_document_end_event_initialize(event *yaml_event_t, implicit bool) bool { + *event = yaml_event_t{ + typ: yaml_DOCUMENT_END_EVENT, + implicit: implicit, + } + return true +} + +///* +// * Create ALIAS. +// */ +// +//YAML_DECLARE(int) +//yaml_alias_event_initialize(event *yaml_event_t, anchor *yaml_char_t) +//{ +// mark yaml_mark_t = { 0, 0, 0 } +// anchor_copy *yaml_char_t = NULL +// +// assert(event) // Non-NULL event object is expected. +// assert(anchor) // Non-NULL anchor is expected. +// +// if (!yaml_check_utf8(anchor, strlen((char *)anchor))) return 0 +// +// anchor_copy = yaml_strdup(anchor) +// if (!anchor_copy) +// return 0 +// +// ALIAS_EVENT_INIT(*event, anchor_copy, mark, mark) +// +// return 1 +//} + +// Create SCALAR. +func yaml_scalar_event_initialize(event *yaml_event_t, anchor, tag, value []byte, plain_implicit, quoted_implicit bool, style yaml_scalar_style_t) bool { + *event = yaml_event_t{ + typ: yaml_SCALAR_EVENT, + anchor: anchor, + tag: tag, + value: value, + implicit: plain_implicit, + quoted_implicit: quoted_implicit, + style: yaml_style_t(style), + } + return true +} + +// Create SEQUENCE-START. +func yaml_sequence_start_event_initialize(event *yaml_event_t, anchor, tag []byte, implicit bool, style yaml_sequence_style_t) bool { + *event = yaml_event_t{ + typ: yaml_SEQUENCE_START_EVENT, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(style), + } + return true +} + +// Create SEQUENCE-END. +func yaml_sequence_end_event_initialize(event *yaml_event_t) bool { + *event = yaml_event_t{ + typ: yaml_SEQUENCE_END_EVENT, + } + return true +} + +// Create MAPPING-START. +func yaml_mapping_start_event_initialize(event *yaml_event_t, anchor, tag []byte, implicit bool, style yaml_mapping_style_t) bool { + *event = yaml_event_t{ + typ: yaml_MAPPING_START_EVENT, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(style), + } + return true +} + +// Create MAPPING-END. +func yaml_mapping_end_event_initialize(event *yaml_event_t) bool { + *event = yaml_event_t{ + typ: yaml_MAPPING_END_EVENT, + } + return true +} + +// Destroy an event object. +func yaml_event_delete(event *yaml_event_t) { + *event = yaml_event_t{} +} + +///* +// * Create a document object. +// */ +// +//YAML_DECLARE(int) +//yaml_document_initialize(document *yaml_document_t, +// version_directive *yaml_version_directive_t, +// tag_directives_start *yaml_tag_directive_t, +// tag_directives_end *yaml_tag_directive_t, +// start_implicit int, end_implicit int) +//{ +// struct { +// error yaml_error_type_t +// } context +// struct { +// start *yaml_node_t +// end *yaml_node_t +// top *yaml_node_t +// } nodes = { NULL, NULL, NULL } +// version_directive_copy *yaml_version_directive_t = NULL +// struct { +// start *yaml_tag_directive_t +// end *yaml_tag_directive_t +// top *yaml_tag_directive_t +// } tag_directives_copy = { NULL, NULL, NULL } +// value yaml_tag_directive_t = { NULL, NULL } +// mark yaml_mark_t = { 0, 0, 0 } +// +// assert(document) // Non-NULL document object is expected. +// assert((tag_directives_start && tag_directives_end) || +// (tag_directives_start == tag_directives_end)) +// // Valid tag directives are expected. +// +// if (!STACK_INIT(&context, nodes, INITIAL_STACK_SIZE)) goto error +// +// if (version_directive) { +// version_directive_copy = yaml_malloc(sizeof(yaml_version_directive_t)) +// if (!version_directive_copy) goto error +// version_directive_copy.major = version_directive.major +// version_directive_copy.minor = version_directive.minor +// } +// +// if (tag_directives_start != tag_directives_end) { +// tag_directive *yaml_tag_directive_t +// if (!STACK_INIT(&context, tag_directives_copy, INITIAL_STACK_SIZE)) +// goto error +// for (tag_directive = tag_directives_start +// tag_directive != tag_directives_end; tag_directive ++) { +// assert(tag_directive.handle) +// assert(tag_directive.prefix) +// if (!yaml_check_utf8(tag_directive.handle, +// strlen((char *)tag_directive.handle))) +// goto error +// if (!yaml_check_utf8(tag_directive.prefix, +// strlen((char *)tag_directive.prefix))) +// goto error +// value.handle = yaml_strdup(tag_directive.handle) +// value.prefix = yaml_strdup(tag_directive.prefix) +// if (!value.handle || !value.prefix) goto error +// if (!PUSH(&context, tag_directives_copy, value)) +// goto error +// value.handle = NULL +// value.prefix = NULL +// } +// } +// +// DOCUMENT_INIT(*document, nodes.start, nodes.end, version_directive_copy, +// tag_directives_copy.start, tag_directives_copy.top, +// start_implicit, end_implicit, mark, mark) +// +// return 1 +// +//error: +// STACK_DEL(&context, nodes) +// yaml_free(version_directive_copy) +// while (!STACK_EMPTY(&context, tag_directives_copy)) { +// value yaml_tag_directive_t = POP(&context, tag_directives_copy) +// yaml_free(value.handle) +// yaml_free(value.prefix) +// } +// STACK_DEL(&context, tag_directives_copy) +// yaml_free(value.handle) +// yaml_free(value.prefix) +// +// return 0 +//} +// +///* +// * Destroy a document object. +// */ +// +//YAML_DECLARE(void) +//yaml_document_delete(document *yaml_document_t) +//{ +// struct { +// error yaml_error_type_t +// } context +// tag_directive *yaml_tag_directive_t +// +// context.error = YAML_NO_ERROR // Eliminate a compliler warning. +// +// assert(document) // Non-NULL document object is expected. +// +// while (!STACK_EMPTY(&context, document.nodes)) { +// node yaml_node_t = POP(&context, document.nodes) +// yaml_free(node.tag) +// switch (node.type) { +// case YAML_SCALAR_NODE: +// yaml_free(node.data.scalar.value) +// break +// case YAML_SEQUENCE_NODE: +// STACK_DEL(&context, node.data.sequence.items) +// break +// case YAML_MAPPING_NODE: +// STACK_DEL(&context, node.data.mapping.pairs) +// break +// default: +// assert(0) // Should not happen. +// } +// } +// STACK_DEL(&context, document.nodes) +// +// yaml_free(document.version_directive) +// for (tag_directive = document.tag_directives.start +// tag_directive != document.tag_directives.end +// tag_directive++) { +// yaml_free(tag_directive.handle) +// yaml_free(tag_directive.prefix) +// } +// yaml_free(document.tag_directives.start) +// +// memset(document, 0, sizeof(yaml_document_t)) +//} +// +///** +// * Get a document node. +// */ +// +//YAML_DECLARE(yaml_node_t *) +//yaml_document_get_node(document *yaml_document_t, index int) +//{ +// assert(document) // Non-NULL document object is expected. +// +// if (index > 0 && document.nodes.start + index <= document.nodes.top) { +// return document.nodes.start + index - 1 +// } +// return NULL +//} +// +///** +// * Get the root object. +// */ +// +//YAML_DECLARE(yaml_node_t *) +//yaml_document_get_root_node(document *yaml_document_t) +//{ +// assert(document) // Non-NULL document object is expected. +// +// if (document.nodes.top != document.nodes.start) { +// return document.nodes.start +// } +// return NULL +//} +// +///* +// * Add a scalar node to a document. +// */ +// +//YAML_DECLARE(int) +//yaml_document_add_scalar(document *yaml_document_t, +// tag *yaml_char_t, value *yaml_char_t, length int, +// style yaml_scalar_style_t) +//{ +// struct { +// error yaml_error_type_t +// } context +// mark yaml_mark_t = { 0, 0, 0 } +// tag_copy *yaml_char_t = NULL +// value_copy *yaml_char_t = NULL +// node yaml_node_t +// +// assert(document) // Non-NULL document object is expected. +// assert(value) // Non-NULL value is expected. +// +// if (!tag) { +// tag = (yaml_char_t *)YAML_DEFAULT_SCALAR_TAG +// } +// +// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error +// tag_copy = yaml_strdup(tag) +// if (!tag_copy) goto error +// +// if (length < 0) { +// length = strlen((char *)value) +// } +// +// if (!yaml_check_utf8(value, length)) goto error +// value_copy = yaml_malloc(length+1) +// if (!value_copy) goto error +// memcpy(value_copy, value, length) +// value_copy[length] = '\0' +// +// SCALAR_NODE_INIT(node, tag_copy, value_copy, length, style, mark, mark) +// if (!PUSH(&context, document.nodes, node)) goto error +// +// return document.nodes.top - document.nodes.start +// +//error: +// yaml_free(tag_copy) +// yaml_free(value_copy) +// +// return 0 +//} +// +///* +// * Add a sequence node to a document. +// */ +// +//YAML_DECLARE(int) +//yaml_document_add_sequence(document *yaml_document_t, +// tag *yaml_char_t, style yaml_sequence_style_t) +//{ +// struct { +// error yaml_error_type_t +// } context +// mark yaml_mark_t = { 0, 0, 0 } +// tag_copy *yaml_char_t = NULL +// struct { +// start *yaml_node_item_t +// end *yaml_node_item_t +// top *yaml_node_item_t +// } items = { NULL, NULL, NULL } +// node yaml_node_t +// +// assert(document) // Non-NULL document object is expected. +// +// if (!tag) { +// tag = (yaml_char_t *)YAML_DEFAULT_SEQUENCE_TAG +// } +// +// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error +// tag_copy = yaml_strdup(tag) +// if (!tag_copy) goto error +// +// if (!STACK_INIT(&context, items, INITIAL_STACK_SIZE)) goto error +// +// SEQUENCE_NODE_INIT(node, tag_copy, items.start, items.end, +// style, mark, mark) +// if (!PUSH(&context, document.nodes, node)) goto error +// +// return document.nodes.top - document.nodes.start +// +//error: +// STACK_DEL(&context, items) +// yaml_free(tag_copy) +// +// return 0 +//} +// +///* +// * Add a mapping node to a document. +// */ +// +//YAML_DECLARE(int) +//yaml_document_add_mapping(document *yaml_document_t, +// tag *yaml_char_t, style yaml_mapping_style_t) +//{ +// struct { +// error yaml_error_type_t +// } context +// mark yaml_mark_t = { 0, 0, 0 } +// tag_copy *yaml_char_t = NULL +// struct { +// start *yaml_node_pair_t +// end *yaml_node_pair_t +// top *yaml_node_pair_t +// } pairs = { NULL, NULL, NULL } +// node yaml_node_t +// +// assert(document) // Non-NULL document object is expected. +// +// if (!tag) { +// tag = (yaml_char_t *)YAML_DEFAULT_MAPPING_TAG +// } +// +// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error +// tag_copy = yaml_strdup(tag) +// if (!tag_copy) goto error +// +// if (!STACK_INIT(&context, pairs, INITIAL_STACK_SIZE)) goto error +// +// MAPPING_NODE_INIT(node, tag_copy, pairs.start, pairs.end, +// style, mark, mark) +// if (!PUSH(&context, document.nodes, node)) goto error +// +// return document.nodes.top - document.nodes.start +// +//error: +// STACK_DEL(&context, pairs) +// yaml_free(tag_copy) +// +// return 0 +//} +// +///* +// * Append an item to a sequence node. +// */ +// +//YAML_DECLARE(int) +//yaml_document_append_sequence_item(document *yaml_document_t, +// sequence int, item int) +//{ +// struct { +// error yaml_error_type_t +// } context +// +// assert(document) // Non-NULL document is required. +// assert(sequence > 0 +// && document.nodes.start + sequence <= document.nodes.top) +// // Valid sequence id is required. +// assert(document.nodes.start[sequence-1].type == YAML_SEQUENCE_NODE) +// // A sequence node is required. +// assert(item > 0 && document.nodes.start + item <= document.nodes.top) +// // Valid item id is required. +// +// if (!PUSH(&context, +// document.nodes.start[sequence-1].data.sequence.items, item)) +// return 0 +// +// return 1 +//} +// +///* +// * Append a pair of a key and a value to a mapping node. +// */ +// +//YAML_DECLARE(int) +//yaml_document_append_mapping_pair(document *yaml_document_t, +// mapping int, key int, value int) +//{ +// struct { +// error yaml_error_type_t +// } context +// +// pair yaml_node_pair_t +// +// assert(document) // Non-NULL document is required. +// assert(mapping > 0 +// && document.nodes.start + mapping <= document.nodes.top) +// // Valid mapping id is required. +// assert(document.nodes.start[mapping-1].type == YAML_MAPPING_NODE) +// // A mapping node is required. +// assert(key > 0 && document.nodes.start + key <= document.nodes.top) +// // Valid key id is required. +// assert(value > 0 && document.nodes.start + value <= document.nodes.top) +// // Valid value id is required. +// +// pair.key = key +// pair.value = value +// +// if (!PUSH(&context, +// document.nodes.start[mapping-1].data.mapping.pairs, pair)) +// return 0 +// +// return 1 +//} +// +// diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/decode.go b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/decode.go new file mode 100644 index 0000000000000..085cddc44beb9 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/decode.go @@ -0,0 +1,683 @@ +package yaml + +import ( + "encoding" + "encoding/base64" + "fmt" + "math" + "reflect" + "strconv" + "time" +) + +const ( + documentNode = 1 << iota + mappingNode + sequenceNode + scalarNode + aliasNode +) + +type node struct { + kind int + line, column int + tag string + value string + implicit bool + children []*node + anchors map[string]*node +} + +// ---------------------------------------------------------------------------- +// Parser, produces a node tree out of a libyaml event stream. + +type parser struct { + parser yaml_parser_t + event yaml_event_t + doc *node +} + +func newParser(b []byte) *parser { + p := parser{} + if !yaml_parser_initialize(&p.parser) { + panic("failed to initialize YAML emitter") + } + + if len(b) == 0 { + b = []byte{'\n'} + } + + yaml_parser_set_input_string(&p.parser, b) + + p.skip() + if p.event.typ != yaml_STREAM_START_EVENT { + panic("expected stream start event, got " + strconv.Itoa(int(p.event.typ))) + } + p.skip() + return &p +} + +func (p *parser) destroy() { + if p.event.typ != yaml_NO_EVENT { + yaml_event_delete(&p.event) + } + yaml_parser_delete(&p.parser) +} + +func (p *parser) skip() { + if p.event.typ != yaml_NO_EVENT { + if p.event.typ == yaml_STREAM_END_EVENT { + failf("attempted to go past the end of stream; corrupted value?") + } + yaml_event_delete(&p.event) + } + if !yaml_parser_parse(&p.parser, &p.event) { + p.fail() + } +} + +func (p *parser) fail() { + var where string + var line int + if p.parser.problem_mark.line != 0 { + line = p.parser.problem_mark.line + } else if p.parser.context_mark.line != 0 { + line = p.parser.context_mark.line + } + if line != 0 { + where = "line " + strconv.Itoa(line) + ": " + } + var msg string + if len(p.parser.problem) > 0 { + msg = p.parser.problem + } else { + msg = "unknown problem parsing YAML content" + } + failf("%s%s", where, msg) +} + +func (p *parser) anchor(n *node, anchor []byte) { + if anchor != nil { + p.doc.anchors[string(anchor)] = n + } +} + +func (p *parser) parse() *node { + switch p.event.typ { + case yaml_SCALAR_EVENT: + return p.scalar() + case yaml_ALIAS_EVENT: + return p.alias() + case yaml_MAPPING_START_EVENT: + return p.mapping() + case yaml_SEQUENCE_START_EVENT: + return p.sequence() + case yaml_DOCUMENT_START_EVENT: + return p.document() + case yaml_STREAM_END_EVENT: + // Happens when attempting to decode an empty buffer. + return nil + default: + panic("attempted to parse unknown event: " + strconv.Itoa(int(p.event.typ))) + } + panic("unreachable") +} + +func (p *parser) node(kind int) *node { + return &node{ + kind: kind, + line: p.event.start_mark.line, + column: p.event.start_mark.column, + } +} + +func (p *parser) document() *node { + n := p.node(documentNode) + n.anchors = make(map[string]*node) + p.doc = n + p.skip() + n.children = append(n.children, p.parse()) + if p.event.typ != yaml_DOCUMENT_END_EVENT { + panic("expected end of document event but got " + strconv.Itoa(int(p.event.typ))) + } + p.skip() + return n +} + +func (p *parser) alias() *node { + n := p.node(aliasNode) + n.value = string(p.event.anchor) + p.skip() + return n +} + +func (p *parser) scalar() *node { + n := p.node(scalarNode) + n.value = string(p.event.value) + n.tag = string(p.event.tag) + n.implicit = p.event.implicit + p.anchor(n, p.event.anchor) + p.skip() + return n +} + +func (p *parser) sequence() *node { + n := p.node(sequenceNode) + p.anchor(n, p.event.anchor) + p.skip() + for p.event.typ != yaml_SEQUENCE_END_EVENT { + n.children = append(n.children, p.parse()) + } + p.skip() + return n +} + +func (p *parser) mapping() *node { + n := p.node(mappingNode) + p.anchor(n, p.event.anchor) + p.skip() + for p.event.typ != yaml_MAPPING_END_EVENT { + n.children = append(n.children, p.parse(), p.parse()) + } + p.skip() + return n +} + +// ---------------------------------------------------------------------------- +// Decoder, unmarshals a node into a provided value. + +type decoder struct { + doc *node + aliases map[string]bool + mapType reflect.Type + terrors []string +} + +var ( + mapItemType = reflect.TypeOf(MapItem{}) + durationType = reflect.TypeOf(time.Duration(0)) + defaultMapType = reflect.TypeOf(map[interface{}]interface{}{}) + ifaceType = defaultMapType.Elem() +) + +func newDecoder() *decoder { + d := &decoder{mapType: defaultMapType} + d.aliases = make(map[string]bool) + return d +} + +func (d *decoder) terror(n *node, tag string, out reflect.Value) { + if n.tag != "" { + tag = n.tag + } + value := n.value + if tag != yaml_SEQ_TAG && tag != yaml_MAP_TAG { + if len(value) > 10 { + value = " `" + value[:7] + "...`" + } else { + value = " `" + value + "`" + } + } + d.terrors = append(d.terrors, fmt.Sprintf("line %d: cannot unmarshal %s%s into %s", n.line+1, shortTag(tag), value, out.Type())) +} + +func (d *decoder) callUnmarshaler(n *node, u Unmarshaler) (good bool) { + terrlen := len(d.terrors) + err := u.UnmarshalYAML(func(v interface{}) (err error) { + defer handleErr(&err) + d.unmarshal(n, reflect.ValueOf(v)) + if len(d.terrors) > terrlen { + issues := d.terrors[terrlen:] + d.terrors = d.terrors[:terrlen] + return &TypeError{issues} + } + return nil + }) + if e, ok := err.(*TypeError); ok { + d.terrors = append(d.terrors, e.Errors...) + return false + } + if err != nil { + fail(err) + } + return true +} + +// d.prepare initializes and dereferences pointers and calls UnmarshalYAML +// if a value is found to implement it. +// It returns the initialized and dereferenced out value, whether +// unmarshalling was already done by UnmarshalYAML, and if so whether +// its types unmarshalled appropriately. +// +// If n holds a null value, prepare returns before doing anything. +func (d *decoder) prepare(n *node, out reflect.Value) (newout reflect.Value, unmarshaled, good bool) { + if n.tag == yaml_NULL_TAG || n.kind == scalarNode && n.tag == "" && (n.value == "null" || n.value == "") { + return out, false, false + } + again := true + for again { + again = false + if out.Kind() == reflect.Ptr { + if out.IsNil() { + out.Set(reflect.New(out.Type().Elem())) + } + out = out.Elem() + again = true + } + if out.CanAddr() { + if u, ok := out.Addr().Interface().(Unmarshaler); ok { + good = d.callUnmarshaler(n, u) + return out, true, good + } + } + } + return out, false, false +} + +func (d *decoder) unmarshal(n *node, out reflect.Value) (good bool) { + switch n.kind { + case documentNode: + return d.document(n, out) + case aliasNode: + return d.alias(n, out) + } + out, unmarshaled, good := d.prepare(n, out) + if unmarshaled { + return good + } + switch n.kind { + case scalarNode: + good = d.scalar(n, out) + case mappingNode: + good = d.mapping(n, out) + case sequenceNode: + good = d.sequence(n, out) + default: + panic("internal error: unknown node kind: " + strconv.Itoa(n.kind)) + } + return good +} + +func (d *decoder) document(n *node, out reflect.Value) (good bool) { + if len(n.children) == 1 { + d.doc = n + d.unmarshal(n.children[0], out) + return true + } + return false +} + +func (d *decoder) alias(n *node, out reflect.Value) (good bool) { + an, ok := d.doc.anchors[n.value] + if !ok { + failf("unknown anchor '%s' referenced", n.value) + } + if d.aliases[n.value] { + failf("anchor '%s' value contains itself", n.value) + } + d.aliases[n.value] = true + good = d.unmarshal(an, out) + delete(d.aliases, n.value) + return good +} + +var zeroValue reflect.Value + +func resetMap(out reflect.Value) { + for _, k := range out.MapKeys() { + out.SetMapIndex(k, zeroValue) + } +} + +func (d *decoder) scalar(n *node, out reflect.Value) (good bool) { + var tag string + var resolved interface{} + if n.tag == "" && !n.implicit { + tag = yaml_STR_TAG + resolved = n.value + } else { + tag, resolved = resolve(n.tag, n.value) + if tag == yaml_BINARY_TAG { + data, err := base64.StdEncoding.DecodeString(resolved.(string)) + if err != nil { + failf("!!binary value contains invalid base64 data") + } + resolved = string(data) + } + } + if resolved == nil { + if out.Kind() == reflect.Map && !out.CanAddr() { + resetMap(out) + } else { + out.Set(reflect.Zero(out.Type())) + } + return true + } + if s, ok := resolved.(string); ok && out.CanAddr() { + if u, ok := out.Addr().Interface().(encoding.TextUnmarshaler); ok { + err := u.UnmarshalText([]byte(s)) + if err != nil { + fail(err) + } + return true + } + } + switch out.Kind() { + case reflect.String: + if tag == yaml_BINARY_TAG { + out.SetString(resolved.(string)) + good = true + } else if resolved != nil { + out.SetString(n.value) + good = true + } + case reflect.Interface: + if resolved == nil { + out.Set(reflect.Zero(out.Type())) + } else { + out.Set(reflect.ValueOf(resolved)) + } + good = true + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + switch resolved := resolved.(type) { + case int: + if !out.OverflowInt(int64(resolved)) { + out.SetInt(int64(resolved)) + good = true + } + case int64: + if !out.OverflowInt(resolved) { + out.SetInt(resolved) + good = true + } + case uint64: + if resolved <= math.MaxInt64 && !out.OverflowInt(int64(resolved)) { + out.SetInt(int64(resolved)) + good = true + } + case float64: + if resolved <= math.MaxInt64 && !out.OverflowInt(int64(resolved)) { + out.SetInt(int64(resolved)) + good = true + } + case string: + if out.Type() == durationType { + d, err := time.ParseDuration(resolved) + if err == nil { + out.SetInt(int64(d)) + good = true + } + } + } + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + switch resolved := resolved.(type) { + case int: + if resolved >= 0 && !out.OverflowUint(uint64(resolved)) { + out.SetUint(uint64(resolved)) + good = true + } + case int64: + if resolved >= 0 && !out.OverflowUint(uint64(resolved)) { + out.SetUint(uint64(resolved)) + good = true + } + case uint64: + if !out.OverflowUint(uint64(resolved)) { + out.SetUint(uint64(resolved)) + good = true + } + case float64: + if resolved <= math.MaxUint64 && !out.OverflowUint(uint64(resolved)) { + out.SetUint(uint64(resolved)) + good = true + } + } + case reflect.Bool: + switch resolved := resolved.(type) { + case bool: + out.SetBool(resolved) + good = true + } + case reflect.Float32, reflect.Float64: + switch resolved := resolved.(type) { + case int: + out.SetFloat(float64(resolved)) + good = true + case int64: + out.SetFloat(float64(resolved)) + good = true + case uint64: + out.SetFloat(float64(resolved)) + good = true + case float64: + out.SetFloat(resolved) + good = true + } + case reflect.Ptr: + if out.Type().Elem() == reflect.TypeOf(resolved) { + // TODO DOes this make sense? When is out a Ptr except when decoding a nil value? + elem := reflect.New(out.Type().Elem()) + elem.Elem().Set(reflect.ValueOf(resolved)) + out.Set(elem) + good = true + } + } + if !good { + d.terror(n, tag, out) + } + return good +} + +func settableValueOf(i interface{}) reflect.Value { + v := reflect.ValueOf(i) + sv := reflect.New(v.Type()).Elem() + sv.Set(v) + return sv +} + +func (d *decoder) sequence(n *node, out reflect.Value) (good bool) { + l := len(n.children) + + var iface reflect.Value + switch out.Kind() { + case reflect.Slice: + out.Set(reflect.MakeSlice(out.Type(), l, l)) + case reflect.Interface: + // No type hints. Will have to use a generic sequence. + iface = out + out = settableValueOf(make([]interface{}, l)) + default: + d.terror(n, yaml_SEQ_TAG, out) + return false + } + et := out.Type().Elem() + + j := 0 + for i := 0; i < l; i++ { + e := reflect.New(et).Elem() + if ok := d.unmarshal(n.children[i], e); ok { + out.Index(j).Set(e) + j++ + } + } + out.Set(out.Slice(0, j)) + if iface.IsValid() { + iface.Set(out) + } + return true +} + +func (d *decoder) mapping(n *node, out reflect.Value) (good bool) { + switch out.Kind() { + case reflect.Struct: + return d.mappingStruct(n, out) + case reflect.Slice: + return d.mappingSlice(n, out) + case reflect.Map: + // okay + case reflect.Interface: + if d.mapType.Kind() == reflect.Map { + iface := out + out = reflect.MakeMap(d.mapType) + iface.Set(out) + } else { + slicev := reflect.New(d.mapType).Elem() + if !d.mappingSlice(n, slicev) { + return false + } + out.Set(slicev) + return true + } + default: + d.terror(n, yaml_MAP_TAG, out) + return false + } + outt := out.Type() + kt := outt.Key() + et := outt.Elem() + + mapType := d.mapType + if outt.Key() == ifaceType && outt.Elem() == ifaceType { + d.mapType = outt + } + + if out.IsNil() { + out.Set(reflect.MakeMap(outt)) + } + l := len(n.children) + for i := 0; i < l; i += 2 { + if isMerge(n.children[i]) { + d.merge(n.children[i+1], out) + continue + } + k := reflect.New(kt).Elem() + if d.unmarshal(n.children[i], k) { + kkind := k.Kind() + if kkind == reflect.Interface { + kkind = k.Elem().Kind() + } + if kkind == reflect.Map || kkind == reflect.Slice { + failf("invalid map key: %#v", k.Interface()) + } + e := reflect.New(et).Elem() + if d.unmarshal(n.children[i+1], e) { + out.SetMapIndex(k, e) + } + } + } + d.mapType = mapType + return true +} + +func (d *decoder) mappingSlice(n *node, out reflect.Value) (good bool) { + outt := out.Type() + if outt.Elem() != mapItemType { + d.terror(n, yaml_MAP_TAG, out) + return false + } + + mapType := d.mapType + d.mapType = outt + + var slice []MapItem + var l = len(n.children) + for i := 0; i < l; i += 2 { + if isMerge(n.children[i]) { + d.merge(n.children[i+1], out) + continue + } + item := MapItem{} + k := reflect.ValueOf(&item.Key).Elem() + if d.unmarshal(n.children[i], k) { + v := reflect.ValueOf(&item.Value).Elem() + if d.unmarshal(n.children[i+1], v) { + slice = append(slice, item) + } + } + } + out.Set(reflect.ValueOf(slice)) + d.mapType = mapType + return true +} + +func (d *decoder) mappingStruct(n *node, out reflect.Value) (good bool) { + sinfo, err := getStructInfo(out.Type()) + if err != nil { + panic(err) + } + name := settableValueOf("") + l := len(n.children) + + var inlineMap reflect.Value + var elemType reflect.Type + if sinfo.InlineMap != -1 { + inlineMap = out.Field(sinfo.InlineMap) + inlineMap.Set(reflect.New(inlineMap.Type()).Elem()) + elemType = inlineMap.Type().Elem() + } + + for i := 0; i < l; i += 2 { + ni := n.children[i] + if isMerge(ni) { + d.merge(n.children[i+1], out) + continue + } + if !d.unmarshal(ni, name) { + continue + } + if info, ok := sinfo.FieldsMap[name.String()]; ok { + var field reflect.Value + if info.Inline == nil { + field = out.Field(info.Num) + } else { + field = out.FieldByIndex(info.Inline) + } + d.unmarshal(n.children[i+1], field) + } else if sinfo.InlineMap != -1 { + if inlineMap.IsNil() { + inlineMap.Set(reflect.MakeMap(inlineMap.Type())) + } + value := reflect.New(elemType).Elem() + d.unmarshal(n.children[i+1], value) + inlineMap.SetMapIndex(name, value) + } + } + return true +} + +func failWantMap() { + failf("map merge requires map or sequence of maps as the value") +} + +func (d *decoder) merge(n *node, out reflect.Value) { + switch n.kind { + case mappingNode: + d.unmarshal(n, out) + case aliasNode: + an, ok := d.doc.anchors[n.value] + if ok && an.kind != mappingNode { + failWantMap() + } + d.unmarshal(n, out) + case sequenceNode: + // Step backwards as earlier nodes take precedence. + for i := len(n.children) - 1; i >= 0; i-- { + ni := n.children[i] + if ni.kind == aliasNode { + an, ok := d.doc.anchors[ni.value] + if ok && an.kind != mappingNode { + failWantMap() + } + } else if ni.kind != mappingNode { + failWantMap() + } + d.unmarshal(ni, out) + } + default: + failWantMap() + } +} + +func isMerge(n *node) bool { + return n.kind == scalarNode && n.value == "<<" && (n.implicit == true || n.tag == yaml_MERGE_TAG) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/emitterc.go b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/emitterc.go new file mode 100644 index 0000000000000..2befd553ed026 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/emitterc.go @@ -0,0 +1,1685 @@ +package yaml + +import ( + "bytes" +) + +// Flush the buffer if needed. +func flush(emitter *yaml_emitter_t) bool { + if emitter.buffer_pos+5 >= len(emitter.buffer) { + return yaml_emitter_flush(emitter) + } + return true +} + +// Put a character to the output buffer. +func put(emitter *yaml_emitter_t, value byte) bool { + if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { + return false + } + emitter.buffer[emitter.buffer_pos] = value + emitter.buffer_pos++ + emitter.column++ + return true +} + +// Put a line break to the output buffer. +func put_break(emitter *yaml_emitter_t) bool { + if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { + return false + } + switch emitter.line_break { + case yaml_CR_BREAK: + emitter.buffer[emitter.buffer_pos] = '\r' + emitter.buffer_pos += 1 + case yaml_LN_BREAK: + emitter.buffer[emitter.buffer_pos] = '\n' + emitter.buffer_pos += 1 + case yaml_CRLN_BREAK: + emitter.buffer[emitter.buffer_pos+0] = '\r' + emitter.buffer[emitter.buffer_pos+1] = '\n' + emitter.buffer_pos += 2 + default: + panic("unknown line break setting") + } + emitter.column = 0 + emitter.line++ + return true +} + +// Copy a character from a string into buffer. +func write(emitter *yaml_emitter_t, s []byte, i *int) bool { + if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { + return false + } + p := emitter.buffer_pos + w := width(s[*i]) + switch w { + case 4: + emitter.buffer[p+3] = s[*i+3] + fallthrough + case 3: + emitter.buffer[p+2] = s[*i+2] + fallthrough + case 2: + emitter.buffer[p+1] = s[*i+1] + fallthrough + case 1: + emitter.buffer[p+0] = s[*i+0] + default: + panic("unknown character width") + } + emitter.column++ + emitter.buffer_pos += w + *i += w + return true +} + +// Write a whole string into buffer. +func write_all(emitter *yaml_emitter_t, s []byte) bool { + for i := 0; i < len(s); { + if !write(emitter, s, &i) { + return false + } + } + return true +} + +// Copy a line break character from a string into buffer. +func write_break(emitter *yaml_emitter_t, s []byte, i *int) bool { + if s[*i] == '\n' { + if !put_break(emitter) { + return false + } + *i++ + } else { + if !write(emitter, s, i) { + return false + } + emitter.column = 0 + emitter.line++ + } + return true +} + +// Set an emitter error and return false. +func yaml_emitter_set_emitter_error(emitter *yaml_emitter_t, problem string) bool { + emitter.error = yaml_EMITTER_ERROR + emitter.problem = problem + return false +} + +// Emit an event. +func yaml_emitter_emit(emitter *yaml_emitter_t, event *yaml_event_t) bool { + emitter.events = append(emitter.events, *event) + for !yaml_emitter_need_more_events(emitter) { + event := &emitter.events[emitter.events_head] + if !yaml_emitter_analyze_event(emitter, event) { + return false + } + if !yaml_emitter_state_machine(emitter, event) { + return false + } + yaml_event_delete(event) + emitter.events_head++ + } + return true +} + +// Check if we need to accumulate more events before emitting. +// +// We accumulate extra +// - 1 event for DOCUMENT-START +// - 2 events for SEQUENCE-START +// - 3 events for MAPPING-START +// +func yaml_emitter_need_more_events(emitter *yaml_emitter_t) bool { + if emitter.events_head == len(emitter.events) { + return true + } + var accumulate int + switch emitter.events[emitter.events_head].typ { + case yaml_DOCUMENT_START_EVENT: + accumulate = 1 + break + case yaml_SEQUENCE_START_EVENT: + accumulate = 2 + break + case yaml_MAPPING_START_EVENT: + accumulate = 3 + break + default: + return false + } + if len(emitter.events)-emitter.events_head > accumulate { + return false + } + var level int + for i := emitter.events_head; i < len(emitter.events); i++ { + switch emitter.events[i].typ { + case yaml_STREAM_START_EVENT, yaml_DOCUMENT_START_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT: + level++ + case yaml_STREAM_END_EVENT, yaml_DOCUMENT_END_EVENT, yaml_SEQUENCE_END_EVENT, yaml_MAPPING_END_EVENT: + level-- + } + if level == 0 { + return false + } + } + return true +} + +// Append a directive to the directives stack. +func yaml_emitter_append_tag_directive(emitter *yaml_emitter_t, value *yaml_tag_directive_t, allow_duplicates bool) bool { + for i := 0; i < len(emitter.tag_directives); i++ { + if bytes.Equal(value.handle, emitter.tag_directives[i].handle) { + if allow_duplicates { + return true + } + return yaml_emitter_set_emitter_error(emitter, "duplicate %TAG directive") + } + } + + // [Go] Do we actually need to copy this given garbage collection + // and the lack of deallocating destructors? + tag_copy := yaml_tag_directive_t{ + handle: make([]byte, len(value.handle)), + prefix: make([]byte, len(value.prefix)), + } + copy(tag_copy.handle, value.handle) + copy(tag_copy.prefix, value.prefix) + emitter.tag_directives = append(emitter.tag_directives, tag_copy) + return true +} + +// Increase the indentation level. +func yaml_emitter_increase_indent(emitter *yaml_emitter_t, flow, indentless bool) bool { + emitter.indents = append(emitter.indents, emitter.indent) + if emitter.indent < 0 { + if flow { + emitter.indent = emitter.best_indent + } else { + emitter.indent = 0 + } + } else if !indentless { + emitter.indent += emitter.best_indent + } + return true +} + +// State dispatcher. +func yaml_emitter_state_machine(emitter *yaml_emitter_t, event *yaml_event_t) bool { + switch emitter.state { + default: + case yaml_EMIT_STREAM_START_STATE: + return yaml_emitter_emit_stream_start(emitter, event) + + case yaml_EMIT_FIRST_DOCUMENT_START_STATE: + return yaml_emitter_emit_document_start(emitter, event, true) + + case yaml_EMIT_DOCUMENT_START_STATE: + return yaml_emitter_emit_document_start(emitter, event, false) + + case yaml_EMIT_DOCUMENT_CONTENT_STATE: + return yaml_emitter_emit_document_content(emitter, event) + + case yaml_EMIT_DOCUMENT_END_STATE: + return yaml_emitter_emit_document_end(emitter, event) + + case yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE: + return yaml_emitter_emit_flow_sequence_item(emitter, event, true) + + case yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE: + return yaml_emitter_emit_flow_sequence_item(emitter, event, false) + + case yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE: + return yaml_emitter_emit_flow_mapping_key(emitter, event, true) + + case yaml_EMIT_FLOW_MAPPING_KEY_STATE: + return yaml_emitter_emit_flow_mapping_key(emitter, event, false) + + case yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE: + return yaml_emitter_emit_flow_mapping_value(emitter, event, true) + + case yaml_EMIT_FLOW_MAPPING_VALUE_STATE: + return yaml_emitter_emit_flow_mapping_value(emitter, event, false) + + case yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE: + return yaml_emitter_emit_block_sequence_item(emitter, event, true) + + case yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE: + return yaml_emitter_emit_block_sequence_item(emitter, event, false) + + case yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE: + return yaml_emitter_emit_block_mapping_key(emitter, event, true) + + case yaml_EMIT_BLOCK_MAPPING_KEY_STATE: + return yaml_emitter_emit_block_mapping_key(emitter, event, false) + + case yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE: + return yaml_emitter_emit_block_mapping_value(emitter, event, true) + + case yaml_EMIT_BLOCK_MAPPING_VALUE_STATE: + return yaml_emitter_emit_block_mapping_value(emitter, event, false) + + case yaml_EMIT_END_STATE: + return yaml_emitter_set_emitter_error(emitter, "expected nothing after STREAM-END") + } + panic("invalid emitter state") +} + +// Expect STREAM-START. +func yaml_emitter_emit_stream_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { + if event.typ != yaml_STREAM_START_EVENT { + return yaml_emitter_set_emitter_error(emitter, "expected STREAM-START") + } + if emitter.encoding == yaml_ANY_ENCODING { + emitter.encoding = event.encoding + if emitter.encoding == yaml_ANY_ENCODING { + emitter.encoding = yaml_UTF8_ENCODING + } + } + if emitter.best_indent < 2 || emitter.best_indent > 9 { + emitter.best_indent = 2 + } + if emitter.best_width >= 0 && emitter.best_width <= emitter.best_indent*2 { + emitter.best_width = 80 + } + if emitter.best_width < 0 { + emitter.best_width = 1<<31 - 1 + } + if emitter.line_break == yaml_ANY_BREAK { + emitter.line_break = yaml_LN_BREAK + } + + emitter.indent = -1 + emitter.line = 0 + emitter.column = 0 + emitter.whitespace = true + emitter.indention = true + + if emitter.encoding != yaml_UTF8_ENCODING { + if !yaml_emitter_write_bom(emitter) { + return false + } + } + emitter.state = yaml_EMIT_FIRST_DOCUMENT_START_STATE + return true +} + +// Expect DOCUMENT-START or STREAM-END. +func yaml_emitter_emit_document_start(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { + + if event.typ == yaml_DOCUMENT_START_EVENT { + + if event.version_directive != nil { + if !yaml_emitter_analyze_version_directive(emitter, event.version_directive) { + return false + } + } + + for i := 0; i < len(event.tag_directives); i++ { + tag_directive := &event.tag_directives[i] + if !yaml_emitter_analyze_tag_directive(emitter, tag_directive) { + return false + } + if !yaml_emitter_append_tag_directive(emitter, tag_directive, false) { + return false + } + } + + for i := 0; i < len(default_tag_directives); i++ { + tag_directive := &default_tag_directives[i] + if !yaml_emitter_append_tag_directive(emitter, tag_directive, true) { + return false + } + } + + implicit := event.implicit + if !first || emitter.canonical { + implicit = false + } + + if emitter.open_ended && (event.version_directive != nil || len(event.tag_directives) > 0) { + if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + } + + if event.version_directive != nil { + implicit = false + if !yaml_emitter_write_indicator(emitter, []byte("%YAML"), true, false, false) { + return false + } + if !yaml_emitter_write_indicator(emitter, []byte("1.1"), true, false, false) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + } + + if len(event.tag_directives) > 0 { + implicit = false + for i := 0; i < len(event.tag_directives); i++ { + tag_directive := &event.tag_directives[i] + if !yaml_emitter_write_indicator(emitter, []byte("%TAG"), true, false, false) { + return false + } + if !yaml_emitter_write_tag_handle(emitter, tag_directive.handle) { + return false + } + if !yaml_emitter_write_tag_content(emitter, tag_directive.prefix, true) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + } + } + + if yaml_emitter_check_empty_document(emitter) { + implicit = false + } + if !implicit { + if !yaml_emitter_write_indent(emitter) { + return false + } + if !yaml_emitter_write_indicator(emitter, []byte("---"), true, false, false) { + return false + } + if emitter.canonical { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + } + + emitter.state = yaml_EMIT_DOCUMENT_CONTENT_STATE + return true + } + + if event.typ == yaml_STREAM_END_EVENT { + if emitter.open_ended { + if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !yaml_emitter_flush(emitter) { + return false + } + emitter.state = yaml_EMIT_END_STATE + return true + } + + return yaml_emitter_set_emitter_error(emitter, "expected DOCUMENT-START or STREAM-END") +} + +// Expect the root node. +func yaml_emitter_emit_document_content(emitter *yaml_emitter_t, event *yaml_event_t) bool { + emitter.states = append(emitter.states, yaml_EMIT_DOCUMENT_END_STATE) + return yaml_emitter_emit_node(emitter, event, true, false, false, false) +} + +// Expect DOCUMENT-END. +func yaml_emitter_emit_document_end(emitter *yaml_emitter_t, event *yaml_event_t) bool { + if event.typ != yaml_DOCUMENT_END_EVENT { + return yaml_emitter_set_emitter_error(emitter, "expected DOCUMENT-END") + } + if !yaml_emitter_write_indent(emitter) { + return false + } + if !event.implicit { + // [Go] Allocate the slice elsewhere. + if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !yaml_emitter_flush(emitter) { + return false + } + emitter.state = yaml_EMIT_DOCUMENT_START_STATE + emitter.tag_directives = emitter.tag_directives[:0] + return true +} + +// Expect a flow item node. +func yaml_emitter_emit_flow_sequence_item(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { + if first { + if !yaml_emitter_write_indicator(emitter, []byte{'['}, true, true, false) { + return false + } + if !yaml_emitter_increase_indent(emitter, true, false) { + return false + } + emitter.flow_level++ + } + + if event.typ == yaml_SEQUENCE_END_EVENT { + emitter.flow_level-- + emitter.indent = emitter.indents[len(emitter.indents)-1] + emitter.indents = emitter.indents[:len(emitter.indents)-1] + if emitter.canonical && !first { + if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !yaml_emitter_write_indicator(emitter, []byte{']'}, false, false, false) { + return false + } + emitter.state = emitter.states[len(emitter.states)-1] + emitter.states = emitter.states[:len(emitter.states)-1] + + return true + } + + if !first { + if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { + return false + } + } + + if emitter.canonical || emitter.column > emitter.best_width { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + emitter.states = append(emitter.states, yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE) + return yaml_emitter_emit_node(emitter, event, false, true, false, false) +} + +// Expect a flow key node. +func yaml_emitter_emit_flow_mapping_key(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { + if first { + if !yaml_emitter_write_indicator(emitter, []byte{'{'}, true, true, false) { + return false + } + if !yaml_emitter_increase_indent(emitter, true, false) { + return false + } + emitter.flow_level++ + } + + if event.typ == yaml_MAPPING_END_EVENT { + emitter.flow_level-- + emitter.indent = emitter.indents[len(emitter.indents)-1] + emitter.indents = emitter.indents[:len(emitter.indents)-1] + if emitter.canonical && !first { + if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !yaml_emitter_write_indicator(emitter, []byte{'}'}, false, false, false) { + return false + } + emitter.state = emitter.states[len(emitter.states)-1] + emitter.states = emitter.states[:len(emitter.states)-1] + return true + } + + if !first { + if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { + return false + } + } + if emitter.canonical || emitter.column > emitter.best_width { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + + if !emitter.canonical && yaml_emitter_check_simple_key(emitter) { + emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE) + return yaml_emitter_emit_node(emitter, event, false, false, true, true) + } + if !yaml_emitter_write_indicator(emitter, []byte{'?'}, true, false, false) { + return false + } + emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_VALUE_STATE) + return yaml_emitter_emit_node(emitter, event, false, false, true, false) +} + +// Expect a flow value node. +func yaml_emitter_emit_flow_mapping_value(emitter *yaml_emitter_t, event *yaml_event_t, simple bool) bool { + if simple { + if !yaml_emitter_write_indicator(emitter, []byte{':'}, false, false, false) { + return false + } + } else { + if emitter.canonical || emitter.column > emitter.best_width { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !yaml_emitter_write_indicator(emitter, []byte{':'}, true, false, false) { + return false + } + } + emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_KEY_STATE) + return yaml_emitter_emit_node(emitter, event, false, false, true, false) +} + +// Expect a block item node. +func yaml_emitter_emit_block_sequence_item(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { + if first { + if !yaml_emitter_increase_indent(emitter, false, emitter.mapping_context && !emitter.indention) { + return false + } + } + if event.typ == yaml_SEQUENCE_END_EVENT { + emitter.indent = emitter.indents[len(emitter.indents)-1] + emitter.indents = emitter.indents[:len(emitter.indents)-1] + emitter.state = emitter.states[len(emitter.states)-1] + emitter.states = emitter.states[:len(emitter.states)-1] + return true + } + if !yaml_emitter_write_indent(emitter) { + return false + } + if !yaml_emitter_write_indicator(emitter, []byte{'-'}, true, false, true) { + return false + } + emitter.states = append(emitter.states, yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE) + return yaml_emitter_emit_node(emitter, event, false, true, false, false) +} + +// Expect a block key node. +func yaml_emitter_emit_block_mapping_key(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { + if first { + if !yaml_emitter_increase_indent(emitter, false, false) { + return false + } + } + if event.typ == yaml_MAPPING_END_EVENT { + emitter.indent = emitter.indents[len(emitter.indents)-1] + emitter.indents = emitter.indents[:len(emitter.indents)-1] + emitter.state = emitter.states[len(emitter.states)-1] + emitter.states = emitter.states[:len(emitter.states)-1] + return true + } + if !yaml_emitter_write_indent(emitter) { + return false + } + if yaml_emitter_check_simple_key(emitter) { + emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE) + return yaml_emitter_emit_node(emitter, event, false, false, true, true) + } + if !yaml_emitter_write_indicator(emitter, []byte{'?'}, true, false, true) { + return false + } + emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_VALUE_STATE) + return yaml_emitter_emit_node(emitter, event, false, false, true, false) +} + +// Expect a block value node. +func yaml_emitter_emit_block_mapping_value(emitter *yaml_emitter_t, event *yaml_event_t, simple bool) bool { + if simple { + if !yaml_emitter_write_indicator(emitter, []byte{':'}, false, false, false) { + return false + } + } else { + if !yaml_emitter_write_indent(emitter) { + return false + } + if !yaml_emitter_write_indicator(emitter, []byte{':'}, true, false, true) { + return false + } + } + emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_KEY_STATE) + return yaml_emitter_emit_node(emitter, event, false, false, true, false) +} + +// Expect a node. +func yaml_emitter_emit_node(emitter *yaml_emitter_t, event *yaml_event_t, + root bool, sequence bool, mapping bool, simple_key bool) bool { + + emitter.root_context = root + emitter.sequence_context = sequence + emitter.mapping_context = mapping + emitter.simple_key_context = simple_key + + switch event.typ { + case yaml_ALIAS_EVENT: + return yaml_emitter_emit_alias(emitter, event) + case yaml_SCALAR_EVENT: + return yaml_emitter_emit_scalar(emitter, event) + case yaml_SEQUENCE_START_EVENT: + return yaml_emitter_emit_sequence_start(emitter, event) + case yaml_MAPPING_START_EVENT: + return yaml_emitter_emit_mapping_start(emitter, event) + default: + return yaml_emitter_set_emitter_error(emitter, + "expected SCALAR, SEQUENCE-START, MAPPING-START, or ALIAS") + } + return false +} + +// Expect ALIAS. +func yaml_emitter_emit_alias(emitter *yaml_emitter_t, event *yaml_event_t) bool { + if !yaml_emitter_process_anchor(emitter) { + return false + } + emitter.state = emitter.states[len(emitter.states)-1] + emitter.states = emitter.states[:len(emitter.states)-1] + return true +} + +// Expect SCALAR. +func yaml_emitter_emit_scalar(emitter *yaml_emitter_t, event *yaml_event_t) bool { + if !yaml_emitter_select_scalar_style(emitter, event) { + return false + } + if !yaml_emitter_process_anchor(emitter) { + return false + } + if !yaml_emitter_process_tag(emitter) { + return false + } + if !yaml_emitter_increase_indent(emitter, true, false) { + return false + } + if !yaml_emitter_process_scalar(emitter) { + return false + } + emitter.indent = emitter.indents[len(emitter.indents)-1] + emitter.indents = emitter.indents[:len(emitter.indents)-1] + emitter.state = emitter.states[len(emitter.states)-1] + emitter.states = emitter.states[:len(emitter.states)-1] + return true +} + +// Expect SEQUENCE-START. +func yaml_emitter_emit_sequence_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { + if !yaml_emitter_process_anchor(emitter) { + return false + } + if !yaml_emitter_process_tag(emitter) { + return false + } + if emitter.flow_level > 0 || emitter.canonical || event.sequence_style() == yaml_FLOW_SEQUENCE_STYLE || + yaml_emitter_check_empty_sequence(emitter) { + emitter.state = yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE + } else { + emitter.state = yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE + } + return true +} + +// Expect MAPPING-START. +func yaml_emitter_emit_mapping_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { + if !yaml_emitter_process_anchor(emitter) { + return false + } + if !yaml_emitter_process_tag(emitter) { + return false + } + if emitter.flow_level > 0 || emitter.canonical || event.mapping_style() == yaml_FLOW_MAPPING_STYLE || + yaml_emitter_check_empty_mapping(emitter) { + emitter.state = yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE + } else { + emitter.state = yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE + } + return true +} + +// Check if the document content is an empty scalar. +func yaml_emitter_check_empty_document(emitter *yaml_emitter_t) bool { + return false // [Go] Huh? +} + +// Check if the next events represent an empty sequence. +func yaml_emitter_check_empty_sequence(emitter *yaml_emitter_t) bool { + if len(emitter.events)-emitter.events_head < 2 { + return false + } + return emitter.events[emitter.events_head].typ == yaml_SEQUENCE_START_EVENT && + emitter.events[emitter.events_head+1].typ == yaml_SEQUENCE_END_EVENT +} + +// Check if the next events represent an empty mapping. +func yaml_emitter_check_empty_mapping(emitter *yaml_emitter_t) bool { + if len(emitter.events)-emitter.events_head < 2 { + return false + } + return emitter.events[emitter.events_head].typ == yaml_MAPPING_START_EVENT && + emitter.events[emitter.events_head+1].typ == yaml_MAPPING_END_EVENT +} + +// Check if the next node can be expressed as a simple key. +func yaml_emitter_check_simple_key(emitter *yaml_emitter_t) bool { + length := 0 + switch emitter.events[emitter.events_head].typ { + case yaml_ALIAS_EVENT: + length += len(emitter.anchor_data.anchor) + case yaml_SCALAR_EVENT: + if emitter.scalar_data.multiline { + return false + } + length += len(emitter.anchor_data.anchor) + + len(emitter.tag_data.handle) + + len(emitter.tag_data.suffix) + + len(emitter.scalar_data.value) + case yaml_SEQUENCE_START_EVENT: + if !yaml_emitter_check_empty_sequence(emitter) { + return false + } + length += len(emitter.anchor_data.anchor) + + len(emitter.tag_data.handle) + + len(emitter.tag_data.suffix) + case yaml_MAPPING_START_EVENT: + if !yaml_emitter_check_empty_mapping(emitter) { + return false + } + length += len(emitter.anchor_data.anchor) + + len(emitter.tag_data.handle) + + len(emitter.tag_data.suffix) + default: + return false + } + return length <= 128 +} + +// Determine an acceptable scalar style. +func yaml_emitter_select_scalar_style(emitter *yaml_emitter_t, event *yaml_event_t) bool { + + no_tag := len(emitter.tag_data.handle) == 0 && len(emitter.tag_data.suffix) == 0 + if no_tag && !event.implicit && !event.quoted_implicit { + return yaml_emitter_set_emitter_error(emitter, "neither tag nor implicit flags are specified") + } + + style := event.scalar_style() + if style == yaml_ANY_SCALAR_STYLE { + style = yaml_PLAIN_SCALAR_STYLE + } + if emitter.canonical { + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } + if emitter.simple_key_context && emitter.scalar_data.multiline { + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } + + if style == yaml_PLAIN_SCALAR_STYLE { + if emitter.flow_level > 0 && !emitter.scalar_data.flow_plain_allowed || + emitter.flow_level == 0 && !emitter.scalar_data.block_plain_allowed { + style = yaml_SINGLE_QUOTED_SCALAR_STYLE + } + if len(emitter.scalar_data.value) == 0 && (emitter.flow_level > 0 || emitter.simple_key_context) { + style = yaml_SINGLE_QUOTED_SCALAR_STYLE + } + if no_tag && !event.implicit { + style = yaml_SINGLE_QUOTED_SCALAR_STYLE + } + } + if style == yaml_SINGLE_QUOTED_SCALAR_STYLE { + if !emitter.scalar_data.single_quoted_allowed { + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } + } + if style == yaml_LITERAL_SCALAR_STYLE || style == yaml_FOLDED_SCALAR_STYLE { + if !emitter.scalar_data.block_allowed || emitter.flow_level > 0 || emitter.simple_key_context { + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } + } + + if no_tag && !event.quoted_implicit && style != yaml_PLAIN_SCALAR_STYLE { + emitter.tag_data.handle = []byte{'!'} + } + emitter.scalar_data.style = style + return true +} + +// Write an achor. +func yaml_emitter_process_anchor(emitter *yaml_emitter_t) bool { + if emitter.anchor_data.anchor == nil { + return true + } + c := []byte{'&'} + if emitter.anchor_data.alias { + c[0] = '*' + } + if !yaml_emitter_write_indicator(emitter, c, true, false, false) { + return false + } + return yaml_emitter_write_anchor(emitter, emitter.anchor_data.anchor) +} + +// Write a tag. +func yaml_emitter_process_tag(emitter *yaml_emitter_t) bool { + if len(emitter.tag_data.handle) == 0 && len(emitter.tag_data.suffix) == 0 { + return true + } + if len(emitter.tag_data.handle) > 0 { + if !yaml_emitter_write_tag_handle(emitter, emitter.tag_data.handle) { + return false + } + if len(emitter.tag_data.suffix) > 0 { + if !yaml_emitter_write_tag_content(emitter, emitter.tag_data.suffix, false) { + return false + } + } + } else { + // [Go] Allocate these slices elsewhere. + if !yaml_emitter_write_indicator(emitter, []byte("!<"), true, false, false) { + return false + } + if !yaml_emitter_write_tag_content(emitter, emitter.tag_data.suffix, false) { + return false + } + if !yaml_emitter_write_indicator(emitter, []byte{'>'}, false, false, false) { + return false + } + } + return true +} + +// Write a scalar. +func yaml_emitter_process_scalar(emitter *yaml_emitter_t) bool { + switch emitter.scalar_data.style { + case yaml_PLAIN_SCALAR_STYLE: + return yaml_emitter_write_plain_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) + + case yaml_SINGLE_QUOTED_SCALAR_STYLE: + return yaml_emitter_write_single_quoted_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) + + case yaml_DOUBLE_QUOTED_SCALAR_STYLE: + return yaml_emitter_write_double_quoted_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) + + case yaml_LITERAL_SCALAR_STYLE: + return yaml_emitter_write_literal_scalar(emitter, emitter.scalar_data.value) + + case yaml_FOLDED_SCALAR_STYLE: + return yaml_emitter_write_folded_scalar(emitter, emitter.scalar_data.value) + } + panic("unknown scalar style") +} + +// Check if a %YAML directive is valid. +func yaml_emitter_analyze_version_directive(emitter *yaml_emitter_t, version_directive *yaml_version_directive_t) bool { + if version_directive.major != 1 || version_directive.minor != 1 { + return yaml_emitter_set_emitter_error(emitter, "incompatible %YAML directive") + } + return true +} + +// Check if a %TAG directive is valid. +func yaml_emitter_analyze_tag_directive(emitter *yaml_emitter_t, tag_directive *yaml_tag_directive_t) bool { + handle := tag_directive.handle + prefix := tag_directive.prefix + if len(handle) == 0 { + return yaml_emitter_set_emitter_error(emitter, "tag handle must not be empty") + } + if handle[0] != '!' { + return yaml_emitter_set_emitter_error(emitter, "tag handle must start with '!'") + } + if handle[len(handle)-1] != '!' { + return yaml_emitter_set_emitter_error(emitter, "tag handle must end with '!'") + } + for i := 1; i < len(handle)-1; i += width(handle[i]) { + if !is_alpha(handle, i) { + return yaml_emitter_set_emitter_error(emitter, "tag handle must contain alphanumerical characters only") + } + } + if len(prefix) == 0 { + return yaml_emitter_set_emitter_error(emitter, "tag prefix must not be empty") + } + return true +} + +// Check if an anchor is valid. +func yaml_emitter_analyze_anchor(emitter *yaml_emitter_t, anchor []byte, alias bool) bool { + if len(anchor) == 0 { + problem := "anchor value must not be empty" + if alias { + problem = "alias value must not be empty" + } + return yaml_emitter_set_emitter_error(emitter, problem) + } + for i := 0; i < len(anchor); i += width(anchor[i]) { + if !is_alpha(anchor, i) { + problem := "anchor value must contain alphanumerical characters only" + if alias { + problem = "alias value must contain alphanumerical characters only" + } + return yaml_emitter_set_emitter_error(emitter, problem) + } + } + emitter.anchor_data.anchor = anchor + emitter.anchor_data.alias = alias + return true +} + +// Check if a tag is valid. +func yaml_emitter_analyze_tag(emitter *yaml_emitter_t, tag []byte) bool { + if len(tag) == 0 { + return yaml_emitter_set_emitter_error(emitter, "tag value must not be empty") + } + for i := 0; i < len(emitter.tag_directives); i++ { + tag_directive := &emitter.tag_directives[i] + if bytes.HasPrefix(tag, tag_directive.prefix) { + emitter.tag_data.handle = tag_directive.handle + emitter.tag_data.suffix = tag[len(tag_directive.prefix):] + return true + } + } + emitter.tag_data.suffix = tag + return true +} + +// Check if a scalar is valid. +func yaml_emitter_analyze_scalar(emitter *yaml_emitter_t, value []byte) bool { + var ( + block_indicators = false + flow_indicators = false + line_breaks = false + special_characters = false + + leading_space = false + leading_break = false + trailing_space = false + trailing_break = false + break_space = false + space_break = false + + preceeded_by_whitespace = false + followed_by_whitespace = false + previous_space = false + previous_break = false + ) + + emitter.scalar_data.value = value + + if len(value) == 0 { + emitter.scalar_data.multiline = false + emitter.scalar_data.flow_plain_allowed = false + emitter.scalar_data.block_plain_allowed = true + emitter.scalar_data.single_quoted_allowed = true + emitter.scalar_data.block_allowed = false + return true + } + + if len(value) >= 3 && ((value[0] == '-' && value[1] == '-' && value[2] == '-') || (value[0] == '.' && value[1] == '.' && value[2] == '.')) { + block_indicators = true + flow_indicators = true + } + + preceeded_by_whitespace = true + for i, w := 0, 0; i < len(value); i += w { + w = width(value[i]) + followed_by_whitespace = i+w >= len(value) || is_blank(value, i+w) + + if i == 0 { + switch value[i] { + case '#', ',', '[', ']', '{', '}', '&', '*', '!', '|', '>', '\'', '"', '%', '@', '`': + flow_indicators = true + block_indicators = true + case '?', ':': + flow_indicators = true + if followed_by_whitespace { + block_indicators = true + } + case '-': + if followed_by_whitespace { + flow_indicators = true + block_indicators = true + } + } + } else { + switch value[i] { + case ',', '?', '[', ']', '{', '}': + flow_indicators = true + case ':': + flow_indicators = true + if followed_by_whitespace { + block_indicators = true + } + case '#': + if preceeded_by_whitespace { + flow_indicators = true + block_indicators = true + } + } + } + + if !is_printable(value, i) || !is_ascii(value, i) && !emitter.unicode { + special_characters = true + } + if is_space(value, i) { + if i == 0 { + leading_space = true + } + if i+width(value[i]) == len(value) { + trailing_space = true + } + if previous_break { + break_space = true + } + previous_space = true + previous_break = false + } else if is_break(value, i) { + line_breaks = true + if i == 0 { + leading_break = true + } + if i+width(value[i]) == len(value) { + trailing_break = true + } + if previous_space { + space_break = true + } + previous_space = false + previous_break = true + } else { + previous_space = false + previous_break = false + } + + // [Go]: Why 'z'? Couldn't be the end of the string as that's the loop condition. + preceeded_by_whitespace = is_blankz(value, i) + } + + emitter.scalar_data.multiline = line_breaks + emitter.scalar_data.flow_plain_allowed = true + emitter.scalar_data.block_plain_allowed = true + emitter.scalar_data.single_quoted_allowed = true + emitter.scalar_data.block_allowed = true + + if leading_space || leading_break || trailing_space || trailing_break { + emitter.scalar_data.flow_plain_allowed = false + emitter.scalar_data.block_plain_allowed = false + } + if trailing_space { + emitter.scalar_data.block_allowed = false + } + if break_space { + emitter.scalar_data.flow_plain_allowed = false + emitter.scalar_data.block_plain_allowed = false + emitter.scalar_data.single_quoted_allowed = false + } + if space_break || special_characters { + emitter.scalar_data.flow_plain_allowed = false + emitter.scalar_data.block_plain_allowed = false + emitter.scalar_data.single_quoted_allowed = false + emitter.scalar_data.block_allowed = false + } + if line_breaks { + emitter.scalar_data.flow_plain_allowed = false + emitter.scalar_data.block_plain_allowed = false + } + if flow_indicators { + emitter.scalar_data.flow_plain_allowed = false + } + if block_indicators { + emitter.scalar_data.block_plain_allowed = false + } + return true +} + +// Check if the event data is valid. +func yaml_emitter_analyze_event(emitter *yaml_emitter_t, event *yaml_event_t) bool { + + emitter.anchor_data.anchor = nil + emitter.tag_data.handle = nil + emitter.tag_data.suffix = nil + emitter.scalar_data.value = nil + + switch event.typ { + case yaml_ALIAS_EVENT: + if !yaml_emitter_analyze_anchor(emitter, event.anchor, true) { + return false + } + + case yaml_SCALAR_EVENT: + if len(event.anchor) > 0 { + if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { + return false + } + } + if len(event.tag) > 0 && (emitter.canonical || (!event.implicit && !event.quoted_implicit)) { + if !yaml_emitter_analyze_tag(emitter, event.tag) { + return false + } + } + if !yaml_emitter_analyze_scalar(emitter, event.value) { + return false + } + + case yaml_SEQUENCE_START_EVENT: + if len(event.anchor) > 0 { + if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { + return false + } + } + if len(event.tag) > 0 && (emitter.canonical || !event.implicit) { + if !yaml_emitter_analyze_tag(emitter, event.tag) { + return false + } + } + + case yaml_MAPPING_START_EVENT: + if len(event.anchor) > 0 { + if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { + return false + } + } + if len(event.tag) > 0 && (emitter.canonical || !event.implicit) { + if !yaml_emitter_analyze_tag(emitter, event.tag) { + return false + } + } + } + return true +} + +// Write the BOM character. +func yaml_emitter_write_bom(emitter *yaml_emitter_t) bool { + if !flush(emitter) { + return false + } + pos := emitter.buffer_pos + emitter.buffer[pos+0] = '\xEF' + emitter.buffer[pos+1] = '\xBB' + emitter.buffer[pos+2] = '\xBF' + emitter.buffer_pos += 3 + return true +} + +func yaml_emitter_write_indent(emitter *yaml_emitter_t) bool { + indent := emitter.indent + if indent < 0 { + indent = 0 + } + if !emitter.indention || emitter.column > indent || (emitter.column == indent && !emitter.whitespace) { + if !put_break(emitter) { + return false + } + } + for emitter.column < indent { + if !put(emitter, ' ') { + return false + } + } + emitter.whitespace = true + emitter.indention = true + return true +} + +func yaml_emitter_write_indicator(emitter *yaml_emitter_t, indicator []byte, need_whitespace, is_whitespace, is_indention bool) bool { + if need_whitespace && !emitter.whitespace { + if !put(emitter, ' ') { + return false + } + } + if !write_all(emitter, indicator) { + return false + } + emitter.whitespace = is_whitespace + emitter.indention = (emitter.indention && is_indention) + emitter.open_ended = false + return true +} + +func yaml_emitter_write_anchor(emitter *yaml_emitter_t, value []byte) bool { + if !write_all(emitter, value) { + return false + } + emitter.whitespace = false + emitter.indention = false + return true +} + +func yaml_emitter_write_tag_handle(emitter *yaml_emitter_t, value []byte) bool { + if !emitter.whitespace { + if !put(emitter, ' ') { + return false + } + } + if !write_all(emitter, value) { + return false + } + emitter.whitespace = false + emitter.indention = false + return true +} + +func yaml_emitter_write_tag_content(emitter *yaml_emitter_t, value []byte, need_whitespace bool) bool { + if need_whitespace && !emitter.whitespace { + if !put(emitter, ' ') { + return false + } + } + for i := 0; i < len(value); { + var must_write bool + switch value[i] { + case ';', '/', '?', ':', '@', '&', '=', '+', '$', ',', '_', '.', '~', '*', '\'', '(', ')', '[', ']': + must_write = true + default: + must_write = is_alpha(value, i) + } + if must_write { + if !write(emitter, value, &i) { + return false + } + } else { + w := width(value[i]) + for k := 0; k < w; k++ { + octet := value[i] + i++ + if !put(emitter, '%') { + return false + } + + c := octet >> 4 + if c < 10 { + c += '0' + } else { + c += 'A' - 10 + } + if !put(emitter, c) { + return false + } + + c = octet & 0x0f + if c < 10 { + c += '0' + } else { + c += 'A' - 10 + } + if !put(emitter, c) { + return false + } + } + } + } + emitter.whitespace = false + emitter.indention = false + return true +} + +func yaml_emitter_write_plain_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { + if !emitter.whitespace { + if !put(emitter, ' ') { + return false + } + } + + spaces := false + breaks := false + for i := 0; i < len(value); { + if is_space(value, i) { + if allow_breaks && !spaces && emitter.column > emitter.best_width && !is_space(value, i+1) { + if !yaml_emitter_write_indent(emitter) { + return false + } + i += width(value[i]) + } else { + if !write(emitter, value, &i) { + return false + } + } + spaces = true + } else if is_break(value, i) { + if !breaks && value[i] == '\n' { + if !put_break(emitter) { + return false + } + } + if !write_break(emitter, value, &i) { + return false + } + emitter.indention = true + breaks = true + } else { + if breaks { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !write(emitter, value, &i) { + return false + } + emitter.indention = false + spaces = false + breaks = false + } + } + + emitter.whitespace = false + emitter.indention = false + if emitter.root_context { + emitter.open_ended = true + } + + return true +} + +func yaml_emitter_write_single_quoted_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { + + if !yaml_emitter_write_indicator(emitter, []byte{'\''}, true, false, false) { + return false + } + + spaces := false + breaks := false + for i := 0; i < len(value); { + if is_space(value, i) { + if allow_breaks && !spaces && emitter.column > emitter.best_width && i > 0 && i < len(value)-1 && !is_space(value, i+1) { + if !yaml_emitter_write_indent(emitter) { + return false + } + i += width(value[i]) + } else { + if !write(emitter, value, &i) { + return false + } + } + spaces = true + } else if is_break(value, i) { + if !breaks && value[i] == '\n' { + if !put_break(emitter) { + return false + } + } + if !write_break(emitter, value, &i) { + return false + } + emitter.indention = true + breaks = true + } else { + if breaks { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if value[i] == '\'' { + if !put(emitter, '\'') { + return false + } + } + if !write(emitter, value, &i) { + return false + } + emitter.indention = false + spaces = false + breaks = false + } + } + if !yaml_emitter_write_indicator(emitter, []byte{'\''}, false, false, false) { + return false + } + emitter.whitespace = false + emitter.indention = false + return true +} + +func yaml_emitter_write_double_quoted_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { + spaces := false + if !yaml_emitter_write_indicator(emitter, []byte{'"'}, true, false, false) { + return false + } + + for i := 0; i < len(value); { + if !is_printable(value, i) || (!emitter.unicode && !is_ascii(value, i)) || + is_bom(value, i) || is_break(value, i) || + value[i] == '"' || value[i] == '\\' { + + octet := value[i] + + var w int + var v rune + switch { + case octet&0x80 == 0x00: + w, v = 1, rune(octet&0x7F) + case octet&0xE0 == 0xC0: + w, v = 2, rune(octet&0x1F) + case octet&0xF0 == 0xE0: + w, v = 3, rune(octet&0x0F) + case octet&0xF8 == 0xF0: + w, v = 4, rune(octet&0x07) + } + for k := 1; k < w; k++ { + octet = value[i+k] + v = (v << 6) + (rune(octet) & 0x3F) + } + i += w + + if !put(emitter, '\\') { + return false + } + + var ok bool + switch v { + case 0x00: + ok = put(emitter, '0') + case 0x07: + ok = put(emitter, 'a') + case 0x08: + ok = put(emitter, 'b') + case 0x09: + ok = put(emitter, 't') + case 0x0A: + ok = put(emitter, 'n') + case 0x0b: + ok = put(emitter, 'v') + case 0x0c: + ok = put(emitter, 'f') + case 0x0d: + ok = put(emitter, 'r') + case 0x1b: + ok = put(emitter, 'e') + case 0x22: + ok = put(emitter, '"') + case 0x5c: + ok = put(emitter, '\\') + case 0x85: + ok = put(emitter, 'N') + case 0xA0: + ok = put(emitter, '_') + case 0x2028: + ok = put(emitter, 'L') + case 0x2029: + ok = put(emitter, 'P') + default: + if v <= 0xFF { + ok = put(emitter, 'x') + w = 2 + } else if v <= 0xFFFF { + ok = put(emitter, 'u') + w = 4 + } else { + ok = put(emitter, 'U') + w = 8 + } + for k := (w - 1) * 4; ok && k >= 0; k -= 4 { + digit := byte((v >> uint(k)) & 0x0F) + if digit < 10 { + ok = put(emitter, digit+'0') + } else { + ok = put(emitter, digit+'A'-10) + } + } + } + if !ok { + return false + } + spaces = false + } else if is_space(value, i) { + if allow_breaks && !spaces && emitter.column > emitter.best_width && i > 0 && i < len(value)-1 { + if !yaml_emitter_write_indent(emitter) { + return false + } + if is_space(value, i+1) { + if !put(emitter, '\\') { + return false + } + } + i += width(value[i]) + } else if !write(emitter, value, &i) { + return false + } + spaces = true + } else { + if !write(emitter, value, &i) { + return false + } + spaces = false + } + } + if !yaml_emitter_write_indicator(emitter, []byte{'"'}, false, false, false) { + return false + } + emitter.whitespace = false + emitter.indention = false + return true +} + +func yaml_emitter_write_block_scalar_hints(emitter *yaml_emitter_t, value []byte) bool { + if is_space(value, 0) || is_break(value, 0) { + indent_hint := []byte{'0' + byte(emitter.best_indent)} + if !yaml_emitter_write_indicator(emitter, indent_hint, false, false, false) { + return false + } + } + + emitter.open_ended = false + + var chomp_hint [1]byte + if len(value) == 0 { + chomp_hint[0] = '-' + } else { + i := len(value) - 1 + for value[i]&0xC0 == 0x80 { + i-- + } + if !is_break(value, i) { + chomp_hint[0] = '-' + } else if i == 0 { + chomp_hint[0] = '+' + emitter.open_ended = true + } else { + i-- + for value[i]&0xC0 == 0x80 { + i-- + } + if is_break(value, i) { + chomp_hint[0] = '+' + emitter.open_ended = true + } + } + } + if chomp_hint[0] != 0 { + if !yaml_emitter_write_indicator(emitter, chomp_hint[:], false, false, false) { + return false + } + } + return true +} + +func yaml_emitter_write_literal_scalar(emitter *yaml_emitter_t, value []byte) bool { + if !yaml_emitter_write_indicator(emitter, []byte{'|'}, true, false, false) { + return false + } + if !yaml_emitter_write_block_scalar_hints(emitter, value) { + return false + } + if !put_break(emitter) { + return false + } + emitter.indention = true + emitter.whitespace = true + breaks := true + for i := 0; i < len(value); { + if is_break(value, i) { + if !write_break(emitter, value, &i) { + return false + } + emitter.indention = true + breaks = true + } else { + if breaks { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !write(emitter, value, &i) { + return false + } + emitter.indention = false + breaks = false + } + } + + return true +} + +func yaml_emitter_write_folded_scalar(emitter *yaml_emitter_t, value []byte) bool { + if !yaml_emitter_write_indicator(emitter, []byte{'>'}, true, false, false) { + return false + } + if !yaml_emitter_write_block_scalar_hints(emitter, value) { + return false + } + + if !put_break(emitter) { + return false + } + emitter.indention = true + emitter.whitespace = true + + breaks := true + leading_spaces := true + for i := 0; i < len(value); { + if is_break(value, i) { + if !breaks && !leading_spaces && value[i] == '\n' { + k := 0 + for is_break(value, k) { + k += width(value[k]) + } + if !is_blankz(value, k) { + if !put_break(emitter) { + return false + } + } + } + if !write_break(emitter, value, &i) { + return false + } + emitter.indention = true + breaks = true + } else { + if breaks { + if !yaml_emitter_write_indent(emitter) { + return false + } + leading_spaces = is_blank(value, i) + } + if !breaks && is_space(value, i) && !is_space(value, i+1) && emitter.column > emitter.best_width { + if !yaml_emitter_write_indent(emitter) { + return false + } + i += width(value[i]) + } else { + if !write(emitter, value, &i) { + return false + } + } + emitter.indention = false + breaks = false + } + } + return true +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/encode.go b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/encode.go new file mode 100644 index 0000000000000..84f84995517b6 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/encode.go @@ -0,0 +1,306 @@ +package yaml + +import ( + "encoding" + "fmt" + "reflect" + "regexp" + "sort" + "strconv" + "strings" + "time" +) + +type encoder struct { + emitter yaml_emitter_t + event yaml_event_t + out []byte + flow bool +} + +func newEncoder() (e *encoder) { + e = &encoder{} + e.must(yaml_emitter_initialize(&e.emitter)) + yaml_emitter_set_output_string(&e.emitter, &e.out) + yaml_emitter_set_unicode(&e.emitter, true) + e.must(yaml_stream_start_event_initialize(&e.event, yaml_UTF8_ENCODING)) + e.emit() + e.must(yaml_document_start_event_initialize(&e.event, nil, nil, true)) + e.emit() + return e +} + +func (e *encoder) finish() { + e.must(yaml_document_end_event_initialize(&e.event, true)) + e.emit() + e.emitter.open_ended = false + e.must(yaml_stream_end_event_initialize(&e.event)) + e.emit() +} + +func (e *encoder) destroy() { + yaml_emitter_delete(&e.emitter) +} + +func (e *encoder) emit() { + // This will internally delete the e.event value. + if !yaml_emitter_emit(&e.emitter, &e.event) && e.event.typ != yaml_DOCUMENT_END_EVENT && e.event.typ != yaml_STREAM_END_EVENT { + e.must(false) + } +} + +func (e *encoder) must(ok bool) { + if !ok { + msg := e.emitter.problem + if msg == "" { + msg = "unknown problem generating YAML content" + } + failf("%s", msg) + } +} + +func (e *encoder) marshal(tag string, in reflect.Value) { + if !in.IsValid() { + e.nilv() + return + } + iface := in.Interface() + if m, ok := iface.(Marshaler); ok { + v, err := m.MarshalYAML() + if err != nil { + fail(err) + } + if v == nil { + e.nilv() + return + } + in = reflect.ValueOf(v) + } else if m, ok := iface.(encoding.TextMarshaler); ok { + text, err := m.MarshalText() + if err != nil { + fail(err) + } + in = reflect.ValueOf(string(text)) + } + switch in.Kind() { + case reflect.Interface: + if in.IsNil() { + e.nilv() + } else { + e.marshal(tag, in.Elem()) + } + case reflect.Map: + e.mapv(tag, in) + case reflect.Ptr: + if in.IsNil() { + e.nilv() + } else { + e.marshal(tag, in.Elem()) + } + case reflect.Struct: + e.structv(tag, in) + case reflect.Slice: + if in.Type().Elem() == mapItemType { + e.itemsv(tag, in) + } else { + e.slicev(tag, in) + } + case reflect.String: + e.stringv(tag, in) + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + if in.Type() == durationType { + e.stringv(tag, reflect.ValueOf(iface.(time.Duration).String())) + } else { + e.intv(tag, in) + } + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + e.uintv(tag, in) + case reflect.Float32, reflect.Float64: + e.floatv(tag, in) + case reflect.Bool: + e.boolv(tag, in) + default: + panic("cannot marshal type: " + in.Type().String()) + } +} + +func (e *encoder) mapv(tag string, in reflect.Value) { + e.mappingv(tag, func() { + keys := keyList(in.MapKeys()) + sort.Sort(keys) + for _, k := range keys { + e.marshal("", k) + e.marshal("", in.MapIndex(k)) + } + }) +} + +func (e *encoder) itemsv(tag string, in reflect.Value) { + e.mappingv(tag, func() { + slice := in.Convert(reflect.TypeOf([]MapItem{})).Interface().([]MapItem) + for _, item := range slice { + e.marshal("", reflect.ValueOf(item.Key)) + e.marshal("", reflect.ValueOf(item.Value)) + } + }) +} + +func (e *encoder) structv(tag string, in reflect.Value) { + sinfo, err := getStructInfo(in.Type()) + if err != nil { + panic(err) + } + e.mappingv(tag, func() { + for _, info := range sinfo.FieldsList { + var value reflect.Value + if info.Inline == nil { + value = in.Field(info.Num) + } else { + value = in.FieldByIndex(info.Inline) + } + if info.OmitEmpty && isZero(value) { + continue + } + e.marshal("", reflect.ValueOf(info.Key)) + e.flow = info.Flow + e.marshal("", value) + } + if sinfo.InlineMap >= 0 { + m := in.Field(sinfo.InlineMap) + if m.Len() > 0 { + e.flow = false + keys := keyList(m.MapKeys()) + sort.Sort(keys) + for _, k := range keys { + if _, found := sinfo.FieldsMap[k.String()]; found { + panic(fmt.Sprintf("Can't have key %q in inlined map; conflicts with struct field", k.String())) + } + e.marshal("", k) + e.flow = false + e.marshal("", m.MapIndex(k)) + } + } + } + }) +} + +func (e *encoder) mappingv(tag string, f func()) { + implicit := tag == "" + style := yaml_BLOCK_MAPPING_STYLE + if e.flow { + e.flow = false + style = yaml_FLOW_MAPPING_STYLE + } + e.must(yaml_mapping_start_event_initialize(&e.event, nil, []byte(tag), implicit, style)) + e.emit() + f() + e.must(yaml_mapping_end_event_initialize(&e.event)) + e.emit() +} + +func (e *encoder) slicev(tag string, in reflect.Value) { + implicit := tag == "" + style := yaml_BLOCK_SEQUENCE_STYLE + if e.flow { + e.flow = false + style = yaml_FLOW_SEQUENCE_STYLE + } + e.must(yaml_sequence_start_event_initialize(&e.event, nil, []byte(tag), implicit, style)) + e.emit() + n := in.Len() + for i := 0; i < n; i++ { + e.marshal("", in.Index(i)) + } + e.must(yaml_sequence_end_event_initialize(&e.event)) + e.emit() +} + +// isBase60 returns whether s is in base 60 notation as defined in YAML 1.1. +// +// The base 60 float notation in YAML 1.1 is a terrible idea and is unsupported +// in YAML 1.2 and by this package, but these should be marshalled quoted for +// the time being for compatibility with other parsers. +func isBase60Float(s string) (result bool) { + // Fast path. + if s == "" { + return false + } + c := s[0] + if !(c == '+' || c == '-' || c >= '0' && c <= '9') || strings.IndexByte(s, ':') < 0 { + return false + } + // Do the full match. + return base60float.MatchString(s) +} + +// From http://yaml.org/type/float.html, except the regular expression there +// is bogus. In practice parsers do not enforce the "\.[0-9_]*" suffix. +var base60float = regexp.MustCompile(`^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+(?:\.[0-9_]*)?$`) + +func (e *encoder) stringv(tag string, in reflect.Value) { + var style yaml_scalar_style_t + s := in.String() + rtag, rs := resolve("", s) + if rtag == yaml_BINARY_TAG { + if tag == "" || tag == yaml_STR_TAG { + tag = rtag + s = rs.(string) + } else if tag == yaml_BINARY_TAG { + failf("explicitly tagged !!binary data must be base64-encoded") + } else { + failf("cannot marshal invalid UTF-8 data as %s", shortTag(tag)) + } + } + if tag == "" && (rtag != yaml_STR_TAG || isBase60Float(s)) { + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } else if strings.Contains(s, "\n") { + style = yaml_LITERAL_SCALAR_STYLE + } else { + style = yaml_PLAIN_SCALAR_STYLE + } + e.emitScalar(s, "", tag, style) +} + +func (e *encoder) boolv(tag string, in reflect.Value) { + var s string + if in.Bool() { + s = "true" + } else { + s = "false" + } + e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) +} + +func (e *encoder) intv(tag string, in reflect.Value) { + s := strconv.FormatInt(in.Int(), 10) + e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) +} + +func (e *encoder) uintv(tag string, in reflect.Value) { + s := strconv.FormatUint(in.Uint(), 10) + e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) +} + +func (e *encoder) floatv(tag string, in reflect.Value) { + // FIXME: Handle 64 bits here. + s := strconv.FormatFloat(float64(in.Float()), 'g', -1, 32) + switch s { + case "+Inf": + s = ".inf" + case "-Inf": + s = "-.inf" + case "NaN": + s = ".nan" + } + e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) +} + +func (e *encoder) nilv() { + e.emitScalar("null", "", "", yaml_PLAIN_SCALAR_STYLE) +} + +func (e *encoder) emitScalar(value, anchor, tag string, style yaml_scalar_style_t) { + implicit := tag == "" + e.must(yaml_scalar_event_initialize(&e.event, []byte(anchor), []byte(tag), []byte(value), implicit, implicit, style)) + e.emit() +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/parserc.go b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/parserc.go new file mode 100644 index 0000000000000..0a7037ad1b2a6 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/parserc.go @@ -0,0 +1,1096 @@ +package yaml + +import ( + "bytes" +) + +// The parser implements the following grammar: +// +// stream ::= STREAM-START implicit_document? explicit_document* STREAM-END +// implicit_document ::= block_node DOCUMENT-END* +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* +// block_node_or_indentless_sequence ::= +// ALIAS +// | properties (block_content | indentless_block_sequence)? +// | block_content +// | indentless_block_sequence +// block_node ::= ALIAS +// | properties block_content? +// | block_content +// flow_node ::= ALIAS +// | properties flow_content? +// | flow_content +// properties ::= TAG ANCHOR? | ANCHOR TAG? +// block_content ::= block_collection | flow_collection | SCALAR +// flow_content ::= flow_collection | SCALAR +// block_collection ::= block_sequence | block_mapping +// flow_collection ::= flow_sequence | flow_mapping +// block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END +// indentless_sequence ::= (BLOCK-ENTRY block_node?)+ +// block_mapping ::= BLOCK-MAPPING_START +// ((KEY block_node_or_indentless_sequence?)? +// (VALUE block_node_or_indentless_sequence?)?)* +// BLOCK-END +// flow_sequence ::= FLOW-SEQUENCE-START +// (flow_sequence_entry FLOW-ENTRY)* +// flow_sequence_entry? +// FLOW-SEQUENCE-END +// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// flow_mapping ::= FLOW-MAPPING-START +// (flow_mapping_entry FLOW-ENTRY)* +// flow_mapping_entry? +// FLOW-MAPPING-END +// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? + +// Peek the next token in the token queue. +func peek_token(parser *yaml_parser_t) *yaml_token_t { + if parser.token_available || yaml_parser_fetch_more_tokens(parser) { + return &parser.tokens[parser.tokens_head] + } + return nil +} + +// Remove the next token from the queue (must be called after peek_token). +func skip_token(parser *yaml_parser_t) { + parser.token_available = false + parser.tokens_parsed++ + parser.stream_end_produced = parser.tokens[parser.tokens_head].typ == yaml_STREAM_END_TOKEN + parser.tokens_head++ +} + +// Get the next event. +func yaml_parser_parse(parser *yaml_parser_t, event *yaml_event_t) bool { + // Erase the event object. + *event = yaml_event_t{} + + // No events after the end of the stream or error. + if parser.stream_end_produced || parser.error != yaml_NO_ERROR || parser.state == yaml_PARSE_END_STATE { + return true + } + + // Generate the next event. + return yaml_parser_state_machine(parser, event) +} + +// Set parser error. +func yaml_parser_set_parser_error(parser *yaml_parser_t, problem string, problem_mark yaml_mark_t) bool { + parser.error = yaml_PARSER_ERROR + parser.problem = problem + parser.problem_mark = problem_mark + return false +} + +func yaml_parser_set_parser_error_context(parser *yaml_parser_t, context string, context_mark yaml_mark_t, problem string, problem_mark yaml_mark_t) bool { + parser.error = yaml_PARSER_ERROR + parser.context = context + parser.context_mark = context_mark + parser.problem = problem + parser.problem_mark = problem_mark + return false +} + +// State dispatcher. +func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool { + //trace("yaml_parser_state_machine", "state:", parser.state.String()) + + switch parser.state { + case yaml_PARSE_STREAM_START_STATE: + return yaml_parser_parse_stream_start(parser, event) + + case yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE: + return yaml_parser_parse_document_start(parser, event, true) + + case yaml_PARSE_DOCUMENT_START_STATE: + return yaml_parser_parse_document_start(parser, event, false) + + case yaml_PARSE_DOCUMENT_CONTENT_STATE: + return yaml_parser_parse_document_content(parser, event) + + case yaml_PARSE_DOCUMENT_END_STATE: + return yaml_parser_parse_document_end(parser, event) + + case yaml_PARSE_BLOCK_NODE_STATE: + return yaml_parser_parse_node(parser, event, true, false) + + case yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE: + return yaml_parser_parse_node(parser, event, true, true) + + case yaml_PARSE_FLOW_NODE_STATE: + return yaml_parser_parse_node(parser, event, false, false) + + case yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE: + return yaml_parser_parse_block_sequence_entry(parser, event, true) + + case yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE: + return yaml_parser_parse_block_sequence_entry(parser, event, false) + + case yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE: + return yaml_parser_parse_indentless_sequence_entry(parser, event) + + case yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE: + return yaml_parser_parse_block_mapping_key(parser, event, true) + + case yaml_PARSE_BLOCK_MAPPING_KEY_STATE: + return yaml_parser_parse_block_mapping_key(parser, event, false) + + case yaml_PARSE_BLOCK_MAPPING_VALUE_STATE: + return yaml_parser_parse_block_mapping_value(parser, event) + + case yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE: + return yaml_parser_parse_flow_sequence_entry(parser, event, true) + + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE: + return yaml_parser_parse_flow_sequence_entry(parser, event, false) + + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE: + return yaml_parser_parse_flow_sequence_entry_mapping_key(parser, event) + + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE: + return yaml_parser_parse_flow_sequence_entry_mapping_value(parser, event) + + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE: + return yaml_parser_parse_flow_sequence_entry_mapping_end(parser, event) + + case yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE: + return yaml_parser_parse_flow_mapping_key(parser, event, true) + + case yaml_PARSE_FLOW_MAPPING_KEY_STATE: + return yaml_parser_parse_flow_mapping_key(parser, event, false) + + case yaml_PARSE_FLOW_MAPPING_VALUE_STATE: + return yaml_parser_parse_flow_mapping_value(parser, event, false) + + case yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE: + return yaml_parser_parse_flow_mapping_value(parser, event, true) + + default: + panic("invalid parser state") + } + return false +} + +// Parse the production: +// stream ::= STREAM-START implicit_document? explicit_document* STREAM-END +// ************ +func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_STREAM_START_TOKEN { + return yaml_parser_set_parser_error(parser, "did not find expected ", token.start_mark) + } + parser.state = yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE + *event = yaml_event_t{ + typ: yaml_STREAM_START_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + encoding: token.encoding, + } + skip_token(parser) + return true +} + +// Parse the productions: +// implicit_document ::= block_node DOCUMENT-END* +// * +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* +// ************************* +func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t, implicit bool) bool { + + token := peek_token(parser) + if token == nil { + return false + } + + // Parse extra document end indicators. + if !implicit { + for token.typ == yaml_DOCUMENT_END_TOKEN { + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + } + } + + if implicit && token.typ != yaml_VERSION_DIRECTIVE_TOKEN && + token.typ != yaml_TAG_DIRECTIVE_TOKEN && + token.typ != yaml_DOCUMENT_START_TOKEN && + token.typ != yaml_STREAM_END_TOKEN { + // Parse an implicit document. + if !yaml_parser_process_directives(parser, nil, nil) { + return false + } + parser.states = append(parser.states, yaml_PARSE_DOCUMENT_END_STATE) + parser.state = yaml_PARSE_BLOCK_NODE_STATE + + *event = yaml_event_t{ + typ: yaml_DOCUMENT_START_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + } + + } else if token.typ != yaml_STREAM_END_TOKEN { + // Parse an explicit document. + var version_directive *yaml_version_directive_t + var tag_directives []yaml_tag_directive_t + start_mark := token.start_mark + if !yaml_parser_process_directives(parser, &version_directive, &tag_directives) { + return false + } + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_DOCUMENT_START_TOKEN { + yaml_parser_set_parser_error(parser, + "did not find expected ", token.start_mark) + return false + } + parser.states = append(parser.states, yaml_PARSE_DOCUMENT_END_STATE) + parser.state = yaml_PARSE_DOCUMENT_CONTENT_STATE + end_mark := token.end_mark + + *event = yaml_event_t{ + typ: yaml_DOCUMENT_START_EVENT, + start_mark: start_mark, + end_mark: end_mark, + version_directive: version_directive, + tag_directives: tag_directives, + implicit: false, + } + skip_token(parser) + + } else { + // Parse the stream end. + parser.state = yaml_PARSE_END_STATE + *event = yaml_event_t{ + typ: yaml_STREAM_END_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + } + skip_token(parser) + } + + return true +} + +// Parse the productions: +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* +// *********** +// +func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + if token.typ == yaml_VERSION_DIRECTIVE_TOKEN || + token.typ == yaml_TAG_DIRECTIVE_TOKEN || + token.typ == yaml_DOCUMENT_START_TOKEN || + token.typ == yaml_DOCUMENT_END_TOKEN || + token.typ == yaml_STREAM_END_TOKEN { + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + return yaml_parser_process_empty_scalar(parser, event, + token.start_mark) + } + return yaml_parser_parse_node(parser, event, true, false) +} + +// Parse the productions: +// implicit_document ::= block_node DOCUMENT-END* +// ************* +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* +// +func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + + start_mark := token.start_mark + end_mark := token.start_mark + + implicit := true + if token.typ == yaml_DOCUMENT_END_TOKEN { + end_mark = token.end_mark + skip_token(parser) + implicit = false + } + + parser.tag_directives = parser.tag_directives[:0] + + parser.state = yaml_PARSE_DOCUMENT_START_STATE + *event = yaml_event_t{ + typ: yaml_DOCUMENT_END_EVENT, + start_mark: start_mark, + end_mark: end_mark, + implicit: implicit, + } + return true +} + +// Parse the productions: +// block_node_or_indentless_sequence ::= +// ALIAS +// ***** +// | properties (block_content | indentless_block_sequence)? +// ********** * +// | block_content | indentless_block_sequence +// * +// block_node ::= ALIAS +// ***** +// | properties block_content? +// ********** * +// | block_content +// * +// flow_node ::= ALIAS +// ***** +// | properties flow_content? +// ********** * +// | flow_content +// * +// properties ::= TAG ANCHOR? | ANCHOR TAG? +// ************************* +// block_content ::= block_collection | flow_collection | SCALAR +// ****** +// flow_content ::= flow_collection | SCALAR +// ****** +func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, indentless_sequence bool) bool { + //defer trace("yaml_parser_parse_node", "block:", block, "indentless_sequence:", indentless_sequence)() + + token := peek_token(parser) + if token == nil { + return false + } + + if token.typ == yaml_ALIAS_TOKEN { + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + *event = yaml_event_t{ + typ: yaml_ALIAS_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + anchor: token.value, + } + skip_token(parser) + return true + } + + start_mark := token.start_mark + end_mark := token.start_mark + + var tag_token bool + var tag_handle, tag_suffix, anchor []byte + var tag_mark yaml_mark_t + if token.typ == yaml_ANCHOR_TOKEN { + anchor = token.value + start_mark = token.start_mark + end_mark = token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ == yaml_TAG_TOKEN { + tag_token = true + tag_handle = token.value + tag_suffix = token.suffix + tag_mark = token.start_mark + end_mark = token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + } + } else if token.typ == yaml_TAG_TOKEN { + tag_token = true + tag_handle = token.value + tag_suffix = token.suffix + start_mark = token.start_mark + tag_mark = token.start_mark + end_mark = token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ == yaml_ANCHOR_TOKEN { + anchor = token.value + end_mark = token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + } + } + + var tag []byte + if tag_token { + if len(tag_handle) == 0 { + tag = tag_suffix + tag_suffix = nil + } else { + for i := range parser.tag_directives { + if bytes.Equal(parser.tag_directives[i].handle, tag_handle) { + tag = append([]byte(nil), parser.tag_directives[i].prefix...) + tag = append(tag, tag_suffix...) + break + } + } + if len(tag) == 0 { + yaml_parser_set_parser_error_context(parser, + "while parsing a node", start_mark, + "found undefined tag handle", tag_mark) + return false + } + } + } + + implicit := len(tag) == 0 + if indentless_sequence && token.typ == yaml_BLOCK_ENTRY_TOKEN { + end_mark = token.end_mark + parser.state = yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE + *event = yaml_event_t{ + typ: yaml_SEQUENCE_START_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(yaml_BLOCK_SEQUENCE_STYLE), + } + return true + } + if token.typ == yaml_SCALAR_TOKEN { + var plain_implicit, quoted_implicit bool + end_mark = token.end_mark + if (len(tag) == 0 && token.style == yaml_PLAIN_SCALAR_STYLE) || (len(tag) == 1 && tag[0] == '!') { + plain_implicit = true + } else if len(tag) == 0 { + quoted_implicit = true + } + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + + *event = yaml_event_t{ + typ: yaml_SCALAR_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + value: token.value, + implicit: plain_implicit, + quoted_implicit: quoted_implicit, + style: yaml_style_t(token.style), + } + skip_token(parser) + return true + } + if token.typ == yaml_FLOW_SEQUENCE_START_TOKEN { + // [Go] Some of the events below can be merged as they differ only on style. + end_mark = token.end_mark + parser.state = yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE + *event = yaml_event_t{ + typ: yaml_SEQUENCE_START_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(yaml_FLOW_SEQUENCE_STYLE), + } + return true + } + if token.typ == yaml_FLOW_MAPPING_START_TOKEN { + end_mark = token.end_mark + parser.state = yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE + *event = yaml_event_t{ + typ: yaml_MAPPING_START_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(yaml_FLOW_MAPPING_STYLE), + } + return true + } + if block && token.typ == yaml_BLOCK_SEQUENCE_START_TOKEN { + end_mark = token.end_mark + parser.state = yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE + *event = yaml_event_t{ + typ: yaml_SEQUENCE_START_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(yaml_BLOCK_SEQUENCE_STYLE), + } + return true + } + if block && token.typ == yaml_BLOCK_MAPPING_START_TOKEN { + end_mark = token.end_mark + parser.state = yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE + *event = yaml_event_t{ + typ: yaml_MAPPING_START_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(yaml_BLOCK_MAPPING_STYLE), + } + return true + } + if len(anchor) > 0 || len(tag) > 0 { + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + + *event = yaml_event_t{ + typ: yaml_SCALAR_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + implicit: implicit, + quoted_implicit: false, + style: yaml_style_t(yaml_PLAIN_SCALAR_STYLE), + } + return true + } + + context := "while parsing a flow node" + if block { + context = "while parsing a block node" + } + yaml_parser_set_parser_error_context(parser, context, start_mark, + "did not find expected node content", token.start_mark) + return false +} + +// Parse the productions: +// block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END +// ******************** *********** * ********* +// +func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { + if first { + token := peek_token(parser) + parser.marks = append(parser.marks, token.start_mark) + skip_token(parser) + } + + token := peek_token(parser) + if token == nil { + return false + } + + if token.typ == yaml_BLOCK_ENTRY_TOKEN { + mark := token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_BLOCK_ENTRY_TOKEN && token.typ != yaml_BLOCK_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE) + return yaml_parser_parse_node(parser, event, true, false) + } else { + parser.state = yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE + return yaml_parser_process_empty_scalar(parser, event, mark) + } + } + if token.typ == yaml_BLOCK_END_TOKEN { + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + + *event = yaml_event_t{ + typ: yaml_SEQUENCE_END_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + } + + skip_token(parser) + return true + } + + context_mark := parser.marks[len(parser.marks)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + return yaml_parser_set_parser_error_context(parser, + "while parsing a block collection", context_mark, + "did not find expected '-' indicator", token.start_mark) +} + +// Parse the productions: +// indentless_sequence ::= (BLOCK-ENTRY block_node?)+ +// *********** * +func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + + if token.typ == yaml_BLOCK_ENTRY_TOKEN { + mark := token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_BLOCK_ENTRY_TOKEN && + token.typ != yaml_KEY_TOKEN && + token.typ != yaml_VALUE_TOKEN && + token.typ != yaml_BLOCK_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE) + return yaml_parser_parse_node(parser, event, true, false) + } + parser.state = yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE + return yaml_parser_process_empty_scalar(parser, event, mark) + } + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + + *event = yaml_event_t{ + typ: yaml_SEQUENCE_END_EVENT, + start_mark: token.start_mark, + end_mark: token.start_mark, // [Go] Shouldn't this be token.end_mark? + } + return true +} + +// Parse the productions: +// block_mapping ::= BLOCK-MAPPING_START +// ******************* +// ((KEY block_node_or_indentless_sequence?)? +// *** * +// (VALUE block_node_or_indentless_sequence?)?)* +// +// BLOCK-END +// ********* +// +func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { + if first { + token := peek_token(parser) + parser.marks = append(parser.marks, token.start_mark) + skip_token(parser) + } + + token := peek_token(parser) + if token == nil { + return false + } + + if token.typ == yaml_KEY_TOKEN { + mark := token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_KEY_TOKEN && + token.typ != yaml_VALUE_TOKEN && + token.typ != yaml_BLOCK_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_BLOCK_MAPPING_VALUE_STATE) + return yaml_parser_parse_node(parser, event, true, true) + } else { + parser.state = yaml_PARSE_BLOCK_MAPPING_VALUE_STATE + return yaml_parser_process_empty_scalar(parser, event, mark) + } + } else if token.typ == yaml_BLOCK_END_TOKEN { + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + *event = yaml_event_t{ + typ: yaml_MAPPING_END_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + } + skip_token(parser) + return true + } + + context_mark := parser.marks[len(parser.marks)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + return yaml_parser_set_parser_error_context(parser, + "while parsing a block mapping", context_mark, + "did not find expected key", token.start_mark) +} + +// Parse the productions: +// block_mapping ::= BLOCK-MAPPING_START +// +// ((KEY block_node_or_indentless_sequence?)? +// +// (VALUE block_node_or_indentless_sequence?)?)* +// ***** * +// BLOCK-END +// +// +func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + if token.typ == yaml_VALUE_TOKEN { + mark := token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_KEY_TOKEN && + token.typ != yaml_VALUE_TOKEN && + token.typ != yaml_BLOCK_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_BLOCK_MAPPING_KEY_STATE) + return yaml_parser_parse_node(parser, event, true, true) + } + parser.state = yaml_PARSE_BLOCK_MAPPING_KEY_STATE + return yaml_parser_process_empty_scalar(parser, event, mark) + } + parser.state = yaml_PARSE_BLOCK_MAPPING_KEY_STATE + return yaml_parser_process_empty_scalar(parser, event, token.start_mark) +} + +// Parse the productions: +// flow_sequence ::= FLOW-SEQUENCE-START +// ******************* +// (flow_sequence_entry FLOW-ENTRY)* +// * ********** +// flow_sequence_entry? +// * +// FLOW-SEQUENCE-END +// ***************** +// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// * +// +func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { + if first { + token := peek_token(parser) + parser.marks = append(parser.marks, token.start_mark) + skip_token(parser) + } + token := peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { + if !first { + if token.typ == yaml_FLOW_ENTRY_TOKEN { + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + } else { + context_mark := parser.marks[len(parser.marks)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + return yaml_parser_set_parser_error_context(parser, + "while parsing a flow sequence", context_mark, + "did not find expected ',' or ']'", token.start_mark) + } + } + + if token.typ == yaml_KEY_TOKEN { + parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE + *event = yaml_event_t{ + typ: yaml_MAPPING_START_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + implicit: true, + style: yaml_style_t(yaml_FLOW_MAPPING_STYLE), + } + skip_token(parser) + return true + } else if token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE) + return yaml_parser_parse_node(parser, event, false, false) + } + } + + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + + *event = yaml_event_t{ + typ: yaml_SEQUENCE_END_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + } + + skip_token(parser) + return true +} + +// +// Parse the productions: +// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// *** * +// +func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_VALUE_TOKEN && + token.typ != yaml_FLOW_ENTRY_TOKEN && + token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE) + return yaml_parser_parse_node(parser, event, false, false) + } + mark := token.end_mark + skip_token(parser) + parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE + return yaml_parser_process_empty_scalar(parser, event, mark) +} + +// Parse the productions: +// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// ***** * +// +func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + if token.typ == yaml_VALUE_TOKEN { + skip_token(parser) + token := peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_FLOW_ENTRY_TOKEN && token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE) + return yaml_parser_parse_node(parser, event, false, false) + } + } + parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE + return yaml_parser_process_empty_scalar(parser, event, token.start_mark) +} + +// Parse the productions: +// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// * +// +func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE + *event = yaml_event_t{ + typ: yaml_MAPPING_END_EVENT, + start_mark: token.start_mark, + end_mark: token.start_mark, // [Go] Shouldn't this be end_mark? + } + return true +} + +// Parse the productions: +// flow_mapping ::= FLOW-MAPPING-START +// ****************** +// (flow_mapping_entry FLOW-ENTRY)* +// * ********** +// flow_mapping_entry? +// ****************** +// FLOW-MAPPING-END +// **************** +// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// * *** * +// +func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { + if first { + token := peek_token(parser) + parser.marks = append(parser.marks, token.start_mark) + skip_token(parser) + } + + token := peek_token(parser) + if token == nil { + return false + } + + if token.typ != yaml_FLOW_MAPPING_END_TOKEN { + if !first { + if token.typ == yaml_FLOW_ENTRY_TOKEN { + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + } else { + context_mark := parser.marks[len(parser.marks)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + return yaml_parser_set_parser_error_context(parser, + "while parsing a flow mapping", context_mark, + "did not find expected ',' or '}'", token.start_mark) + } + } + + if token.typ == yaml_KEY_TOKEN { + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_VALUE_TOKEN && + token.typ != yaml_FLOW_ENTRY_TOKEN && + token.typ != yaml_FLOW_MAPPING_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_VALUE_STATE) + return yaml_parser_parse_node(parser, event, false, false) + } else { + parser.state = yaml_PARSE_FLOW_MAPPING_VALUE_STATE + return yaml_parser_process_empty_scalar(parser, event, token.start_mark) + } + } else if token.typ != yaml_FLOW_MAPPING_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE) + return yaml_parser_parse_node(parser, event, false, false) + } + } + + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + *event = yaml_event_t{ + typ: yaml_MAPPING_END_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + } + skip_token(parser) + return true +} + +// Parse the productions: +// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// * ***** * +// +func yaml_parser_parse_flow_mapping_value(parser *yaml_parser_t, event *yaml_event_t, empty bool) bool { + token := peek_token(parser) + if token == nil { + return false + } + if empty { + parser.state = yaml_PARSE_FLOW_MAPPING_KEY_STATE + return yaml_parser_process_empty_scalar(parser, event, token.start_mark) + } + if token.typ == yaml_VALUE_TOKEN { + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_FLOW_ENTRY_TOKEN && token.typ != yaml_FLOW_MAPPING_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_KEY_STATE) + return yaml_parser_parse_node(parser, event, false, false) + } + } + parser.state = yaml_PARSE_FLOW_MAPPING_KEY_STATE + return yaml_parser_process_empty_scalar(parser, event, token.start_mark) +} + +// Generate an empty scalar event. +func yaml_parser_process_empty_scalar(parser *yaml_parser_t, event *yaml_event_t, mark yaml_mark_t) bool { + *event = yaml_event_t{ + typ: yaml_SCALAR_EVENT, + start_mark: mark, + end_mark: mark, + value: nil, // Empty + implicit: true, + style: yaml_style_t(yaml_PLAIN_SCALAR_STYLE), + } + return true +} + +var default_tag_directives = []yaml_tag_directive_t{ + {[]byte("!"), []byte("!")}, + {[]byte("!!"), []byte("tag:yaml.org,2002:")}, +} + +// Parse directives. +func yaml_parser_process_directives(parser *yaml_parser_t, + version_directive_ref **yaml_version_directive_t, + tag_directives_ref *[]yaml_tag_directive_t) bool { + + var version_directive *yaml_version_directive_t + var tag_directives []yaml_tag_directive_t + + token := peek_token(parser) + if token == nil { + return false + } + + for token.typ == yaml_VERSION_DIRECTIVE_TOKEN || token.typ == yaml_TAG_DIRECTIVE_TOKEN { + if token.typ == yaml_VERSION_DIRECTIVE_TOKEN { + if version_directive != nil { + yaml_parser_set_parser_error(parser, + "found duplicate %YAML directive", token.start_mark) + return false + } + if token.major != 1 || token.minor != 1 { + yaml_parser_set_parser_error(parser, + "found incompatible YAML document", token.start_mark) + return false + } + version_directive = &yaml_version_directive_t{ + major: token.major, + minor: token.minor, + } + } else if token.typ == yaml_TAG_DIRECTIVE_TOKEN { + value := yaml_tag_directive_t{ + handle: token.value, + prefix: token.prefix, + } + if !yaml_parser_append_tag_directive(parser, value, false, token.start_mark) { + return false + } + tag_directives = append(tag_directives, value) + } + + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + } + + for i := range default_tag_directives { + if !yaml_parser_append_tag_directive(parser, default_tag_directives[i], true, token.start_mark) { + return false + } + } + + if version_directive_ref != nil { + *version_directive_ref = version_directive + } + if tag_directives_ref != nil { + *tag_directives_ref = tag_directives + } + return true +} + +// Append a tag directive to the directives stack. +func yaml_parser_append_tag_directive(parser *yaml_parser_t, value yaml_tag_directive_t, allow_duplicates bool, mark yaml_mark_t) bool { + for i := range parser.tag_directives { + if bytes.Equal(value.handle, parser.tag_directives[i].handle) { + if allow_duplicates { + return true + } + return yaml_parser_set_parser_error(parser, "found duplicate %TAG directive", mark) + } + } + + // [Go] I suspect the copy is unnecessary. This was likely done + // because there was no way to track ownership of the data. + value_copy := yaml_tag_directive_t{ + handle: make([]byte, len(value.handle)), + prefix: make([]byte, len(value.prefix)), + } + copy(value_copy.handle, value.handle) + copy(value_copy.prefix, value.prefix) + parser.tag_directives = append(parser.tag_directives, value_copy) + return true +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/readerc.go b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/readerc.go new file mode 100644 index 0000000000000..d5fb09727720a --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/readerc.go @@ -0,0 +1,391 @@ +package yaml + +import ( + "io" +) + +// Set the reader error and return 0. +func yaml_parser_set_reader_error(parser *yaml_parser_t, problem string, offset int, value int) bool { + parser.error = yaml_READER_ERROR + parser.problem = problem + parser.problem_offset = offset + parser.problem_value = value + return false +} + +// Byte order marks. +const ( + bom_UTF8 = "\xef\xbb\xbf" + bom_UTF16LE = "\xff\xfe" + bom_UTF16BE = "\xfe\xff" +) + +// Determine the input stream encoding by checking the BOM symbol. If no BOM is +// found, the UTF-8 encoding is assumed. Return 1 on success, 0 on failure. +func yaml_parser_determine_encoding(parser *yaml_parser_t) bool { + // Ensure that we had enough bytes in the raw buffer. + for !parser.eof && len(parser.raw_buffer)-parser.raw_buffer_pos < 3 { + if !yaml_parser_update_raw_buffer(parser) { + return false + } + } + + // Determine the encoding. + buf := parser.raw_buffer + pos := parser.raw_buffer_pos + avail := len(buf) - pos + if avail >= 2 && buf[pos] == bom_UTF16LE[0] && buf[pos+1] == bom_UTF16LE[1] { + parser.encoding = yaml_UTF16LE_ENCODING + parser.raw_buffer_pos += 2 + parser.offset += 2 + } else if avail >= 2 && buf[pos] == bom_UTF16BE[0] && buf[pos+1] == bom_UTF16BE[1] { + parser.encoding = yaml_UTF16BE_ENCODING + parser.raw_buffer_pos += 2 + parser.offset += 2 + } else if avail >= 3 && buf[pos] == bom_UTF8[0] && buf[pos+1] == bom_UTF8[1] && buf[pos+2] == bom_UTF8[2] { + parser.encoding = yaml_UTF8_ENCODING + parser.raw_buffer_pos += 3 + parser.offset += 3 + } else { + parser.encoding = yaml_UTF8_ENCODING + } + return true +} + +// Update the raw buffer. +func yaml_parser_update_raw_buffer(parser *yaml_parser_t) bool { + size_read := 0 + + // Return if the raw buffer is full. + if parser.raw_buffer_pos == 0 && len(parser.raw_buffer) == cap(parser.raw_buffer) { + return true + } + + // Return on EOF. + if parser.eof { + return true + } + + // Move the remaining bytes in the raw buffer to the beginning. + if parser.raw_buffer_pos > 0 && parser.raw_buffer_pos < len(parser.raw_buffer) { + copy(parser.raw_buffer, parser.raw_buffer[parser.raw_buffer_pos:]) + } + parser.raw_buffer = parser.raw_buffer[:len(parser.raw_buffer)-parser.raw_buffer_pos] + parser.raw_buffer_pos = 0 + + // Call the read handler to fill the buffer. + size_read, err := parser.read_handler(parser, parser.raw_buffer[len(parser.raw_buffer):cap(parser.raw_buffer)]) + parser.raw_buffer = parser.raw_buffer[:len(parser.raw_buffer)+size_read] + if err == io.EOF { + parser.eof = true + } else if err != nil { + return yaml_parser_set_reader_error(parser, "input error: "+err.Error(), parser.offset, -1) + } + return true +} + +// Ensure that the buffer contains at least `length` characters. +// Return true on success, false on failure. +// +// The length is supposed to be significantly less that the buffer size. +func yaml_parser_update_buffer(parser *yaml_parser_t, length int) bool { + if parser.read_handler == nil { + panic("read handler must be set") + } + + // If the EOF flag is set and the raw buffer is empty, do nothing. + if parser.eof && parser.raw_buffer_pos == len(parser.raw_buffer) { + return true + } + + // Return if the buffer contains enough characters. + if parser.unread >= length { + return true + } + + // Determine the input encoding if it is not known yet. + if parser.encoding == yaml_ANY_ENCODING { + if !yaml_parser_determine_encoding(parser) { + return false + } + } + + // Move the unread characters to the beginning of the buffer. + buffer_len := len(parser.buffer) + if parser.buffer_pos > 0 && parser.buffer_pos < buffer_len { + copy(parser.buffer, parser.buffer[parser.buffer_pos:]) + buffer_len -= parser.buffer_pos + parser.buffer_pos = 0 + } else if parser.buffer_pos == buffer_len { + buffer_len = 0 + parser.buffer_pos = 0 + } + + // Open the whole buffer for writing, and cut it before returning. + parser.buffer = parser.buffer[:cap(parser.buffer)] + + // Fill the buffer until it has enough characters. + first := true + for parser.unread < length { + + // Fill the raw buffer if necessary. + if !first || parser.raw_buffer_pos == len(parser.raw_buffer) { + if !yaml_parser_update_raw_buffer(parser) { + parser.buffer = parser.buffer[:buffer_len] + return false + } + } + first = false + + // Decode the raw buffer. + inner: + for parser.raw_buffer_pos != len(parser.raw_buffer) { + var value rune + var width int + + raw_unread := len(parser.raw_buffer) - parser.raw_buffer_pos + + // Decode the next character. + switch parser.encoding { + case yaml_UTF8_ENCODING: + // Decode a UTF-8 character. Check RFC 3629 + // (http://www.ietf.org/rfc/rfc3629.txt) for more details. + // + // The following table (taken from the RFC) is used for + // decoding. + // + // Char. number range | UTF-8 octet sequence + // (hexadecimal) | (binary) + // --------------------+------------------------------------ + // 0000 0000-0000 007F | 0xxxxxxx + // 0000 0080-0000 07FF | 110xxxxx 10xxxxxx + // 0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx + // 0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + // + // Additionally, the characters in the range 0xD800-0xDFFF + // are prohibited as they are reserved for use with UTF-16 + // surrogate pairs. + + // Determine the length of the UTF-8 sequence. + octet := parser.raw_buffer[parser.raw_buffer_pos] + switch { + case octet&0x80 == 0x00: + width = 1 + case octet&0xE0 == 0xC0: + width = 2 + case octet&0xF0 == 0xE0: + width = 3 + case octet&0xF8 == 0xF0: + width = 4 + default: + // The leading octet is invalid. + return yaml_parser_set_reader_error(parser, + "invalid leading UTF-8 octet", + parser.offset, int(octet)) + } + + // Check if the raw buffer contains an incomplete character. + if width > raw_unread { + if parser.eof { + return yaml_parser_set_reader_error(parser, + "incomplete UTF-8 octet sequence", + parser.offset, -1) + } + break inner + } + + // Decode the leading octet. + switch { + case octet&0x80 == 0x00: + value = rune(octet & 0x7F) + case octet&0xE0 == 0xC0: + value = rune(octet & 0x1F) + case octet&0xF0 == 0xE0: + value = rune(octet & 0x0F) + case octet&0xF8 == 0xF0: + value = rune(octet & 0x07) + default: + value = 0 + } + + // Check and decode the trailing octets. + for k := 1; k < width; k++ { + octet = parser.raw_buffer[parser.raw_buffer_pos+k] + + // Check if the octet is valid. + if (octet & 0xC0) != 0x80 { + return yaml_parser_set_reader_error(parser, + "invalid trailing UTF-8 octet", + parser.offset+k, int(octet)) + } + + // Decode the octet. + value = (value << 6) + rune(octet&0x3F) + } + + // Check the length of the sequence against the value. + switch { + case width == 1: + case width == 2 && value >= 0x80: + case width == 3 && value >= 0x800: + case width == 4 && value >= 0x10000: + default: + return yaml_parser_set_reader_error(parser, + "invalid length of a UTF-8 sequence", + parser.offset, -1) + } + + // Check the range of the value. + if value >= 0xD800 && value <= 0xDFFF || value > 0x10FFFF { + return yaml_parser_set_reader_error(parser, + "invalid Unicode character", + parser.offset, int(value)) + } + + case yaml_UTF16LE_ENCODING, yaml_UTF16BE_ENCODING: + var low, high int + if parser.encoding == yaml_UTF16LE_ENCODING { + low, high = 0, 1 + } else { + high, low = 1, 0 + } + + // The UTF-16 encoding is not as simple as one might + // naively think. Check RFC 2781 + // (http://www.ietf.org/rfc/rfc2781.txt). + // + // Normally, two subsequent bytes describe a Unicode + // character. However a special technique (called a + // surrogate pair) is used for specifying character + // values larger than 0xFFFF. + // + // A surrogate pair consists of two pseudo-characters: + // high surrogate area (0xD800-0xDBFF) + // low surrogate area (0xDC00-0xDFFF) + // + // The following formulas are used for decoding + // and encoding characters using surrogate pairs: + // + // U = U' + 0x10000 (0x01 00 00 <= U <= 0x10 FF FF) + // U' = yyyyyyyyyyxxxxxxxxxx (0 <= U' <= 0x0F FF FF) + // W1 = 110110yyyyyyyyyy + // W2 = 110111xxxxxxxxxx + // + // where U is the character value, W1 is the high surrogate + // area, W2 is the low surrogate area. + + // Check for incomplete UTF-16 character. + if raw_unread < 2 { + if parser.eof { + return yaml_parser_set_reader_error(parser, + "incomplete UTF-16 character", + parser.offset, -1) + } + break inner + } + + // Get the character. + value = rune(parser.raw_buffer[parser.raw_buffer_pos+low]) + + (rune(parser.raw_buffer[parser.raw_buffer_pos+high]) << 8) + + // Check for unexpected low surrogate area. + if value&0xFC00 == 0xDC00 { + return yaml_parser_set_reader_error(parser, + "unexpected low surrogate area", + parser.offset, int(value)) + } + + // Check for a high surrogate area. + if value&0xFC00 == 0xD800 { + width = 4 + + // Check for incomplete surrogate pair. + if raw_unread < 4 { + if parser.eof { + return yaml_parser_set_reader_error(parser, + "incomplete UTF-16 surrogate pair", + parser.offset, -1) + } + break inner + } + + // Get the next character. + value2 := rune(parser.raw_buffer[parser.raw_buffer_pos+low+2]) + + (rune(parser.raw_buffer[parser.raw_buffer_pos+high+2]) << 8) + + // Check for a low surrogate area. + if value2&0xFC00 != 0xDC00 { + return yaml_parser_set_reader_error(parser, + "expected low surrogate area", + parser.offset+2, int(value2)) + } + + // Generate the value of the surrogate pair. + value = 0x10000 + ((value & 0x3FF) << 10) + (value2 & 0x3FF) + } else { + width = 2 + } + + default: + panic("impossible") + } + + // Check if the character is in the allowed range: + // #x9 | #xA | #xD | [#x20-#x7E] (8 bit) + // | #x85 | [#xA0-#xD7FF] | [#xE000-#xFFFD] (16 bit) + // | [#x10000-#x10FFFF] (32 bit) + switch { + case value == 0x09: + case value == 0x0A: + case value == 0x0D: + case value >= 0x20 && value <= 0x7E: + case value == 0x85: + case value >= 0xA0 && value <= 0xD7FF: + case value >= 0xE000 && value <= 0xFFFD: + case value >= 0x10000 && value <= 0x10FFFF: + default: + return yaml_parser_set_reader_error(parser, + "control characters are not allowed", + parser.offset, int(value)) + } + + // Move the raw pointers. + parser.raw_buffer_pos += width + parser.offset += width + + // Finally put the character into the buffer. + if value <= 0x7F { + // 0000 0000-0000 007F . 0xxxxxxx + parser.buffer[buffer_len+0] = byte(value) + } 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)) + } 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)) + } 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 += width + + parser.unread++ + } + + // On EOF, put NUL into the buffer and return. + if parser.eof { + parser.buffer[buffer_len] = 0 + buffer_len++ + parser.unread++ + break + } + } + parser.buffer = parser.buffer[:buffer_len] + return true +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/resolve.go b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/resolve.go new file mode 100644 index 0000000000000..93a86327434b9 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/resolve.go @@ -0,0 +1,203 @@ +package yaml + +import ( + "encoding/base64" + "math" + "strconv" + "strings" + "unicode/utf8" +) + +type resolveMapItem struct { + value interface{} + tag string +} + +var resolveTable = make([]byte, 256) +var resolveMap = make(map[string]resolveMapItem) + +func init() { + t := resolveTable + t[int('+')] = 'S' // Sign + t[int('-')] = 'S' + for _, c := range "0123456789" { + t[int(c)] = 'D' // Digit + } + for _, c := range "yYnNtTfFoO~" { + t[int(c)] = 'M' // In map + } + t[int('.')] = '.' // Float (potentially in map) + + var resolveMapList = []struct { + v interface{} + tag string + l []string + }{ + {true, yaml_BOOL_TAG, []string{"y", "Y", "yes", "Yes", "YES"}}, + {true, yaml_BOOL_TAG, []string{"true", "True", "TRUE"}}, + {true, yaml_BOOL_TAG, []string{"on", "On", "ON"}}, + {false, yaml_BOOL_TAG, []string{"n", "N", "no", "No", "NO"}}, + {false, yaml_BOOL_TAG, []string{"false", "False", "FALSE"}}, + {false, yaml_BOOL_TAG, []string{"off", "Off", "OFF"}}, + {nil, yaml_NULL_TAG, []string{"", "~", "null", "Null", "NULL"}}, + {math.NaN(), yaml_FLOAT_TAG, []string{".nan", ".NaN", ".NAN"}}, + {math.Inf(+1), yaml_FLOAT_TAG, []string{".inf", ".Inf", ".INF"}}, + {math.Inf(+1), yaml_FLOAT_TAG, []string{"+.inf", "+.Inf", "+.INF"}}, + {math.Inf(-1), yaml_FLOAT_TAG, []string{"-.inf", "-.Inf", "-.INF"}}, + {"<<", yaml_MERGE_TAG, []string{"<<"}}, + } + + m := resolveMap + for _, item := range resolveMapList { + for _, s := range item.l { + m[s] = resolveMapItem{item.v, item.tag} + } + } +} + +const longTagPrefix = "tag:yaml.org,2002:" + +func shortTag(tag string) string { + // TODO This can easily be made faster and produce less garbage. + if strings.HasPrefix(tag, longTagPrefix) { + return "!!" + tag[len(longTagPrefix):] + } + return tag +} + +func longTag(tag string) string { + if strings.HasPrefix(tag, "!!") { + return longTagPrefix + tag[2:] + } + return tag +} + +func resolvableTag(tag string) bool { + switch tag { + case "", yaml_STR_TAG, yaml_BOOL_TAG, yaml_INT_TAG, yaml_FLOAT_TAG, yaml_NULL_TAG: + return true + } + return false +} + +func resolve(tag string, in string) (rtag string, out interface{}) { + if !resolvableTag(tag) { + return tag, in + } + + defer func() { + switch tag { + case "", rtag, yaml_STR_TAG, yaml_BINARY_TAG: + return + } + failf("cannot decode %s `%s` as a %s", shortTag(rtag), in, shortTag(tag)) + }() + + // Any data is accepted as a !!str or !!binary. + // Otherwise, the prefix is enough of a hint about what it might be. + hint := byte('N') + if in != "" { + hint = resolveTable[in[0]] + } + if hint != 0 && tag != yaml_STR_TAG && tag != yaml_BINARY_TAG { + // Handle things we can lookup in a map. + if item, ok := resolveMap[in]; ok { + return item.tag, item.value + } + + // Base 60 floats are a bad idea, were dropped in YAML 1.2, and + // are purposefully unsupported here. They're still quoted on + // the way out for compatibility with other parser, though. + + switch hint { + case 'M': + // We've already checked the map above. + + case '.': + // Not in the map, so maybe a normal float. + floatv, err := strconv.ParseFloat(in, 64) + if err == nil { + return yaml_FLOAT_TAG, floatv + } + + case 'D', 'S': + // Int, float, or timestamp. + plain := strings.Replace(in, "_", "", -1) + intv, err := strconv.ParseInt(plain, 0, 64) + if err == nil { + if intv == int64(int(intv)) { + return yaml_INT_TAG, int(intv) + } else { + return yaml_INT_TAG, intv + } + } + uintv, err := strconv.ParseUint(plain, 0, 64) + if err == nil { + return yaml_INT_TAG, uintv + } + floatv, err := strconv.ParseFloat(plain, 64) + if err == nil { + return yaml_FLOAT_TAG, floatv + } + if strings.HasPrefix(plain, "0b") { + intv, err := strconv.ParseInt(plain[2:], 2, 64) + if err == nil { + if intv == int64(int(intv)) { + return yaml_INT_TAG, int(intv) + } else { + return yaml_INT_TAG, intv + } + } + uintv, err := strconv.ParseUint(plain[2:], 2, 64) + if err == nil { + return yaml_INT_TAG, uintv + } + } else if strings.HasPrefix(plain, "-0b") { + intv, err := strconv.ParseInt(plain[3:], 2, 64) + if err == nil { + if intv == int64(int(intv)) { + return yaml_INT_TAG, -int(intv) + } else { + return yaml_INT_TAG, -intv + } + } + } + // XXX Handle timestamps here. + + default: + panic("resolveTable item not yet handled: " + string(rune(hint)) + " (with " + in + ")") + } + } + if tag == yaml_BINARY_TAG { + return yaml_BINARY_TAG, in + } + if utf8.ValidString(in) { + return yaml_STR_TAG, in + } + return yaml_BINARY_TAG, encodeBase64(in) +} + +// encodeBase64 encodes s as base64 that is broken up into multiple lines +// as appropriate for the resulting length. +func encodeBase64(s string) string { + const lineLen = 70 + encLen := base64.StdEncoding.EncodedLen(len(s)) + lines := encLen/lineLen + 1 + buf := make([]byte, encLen*2+lines) + in := buf[0:encLen] + out := buf[encLen:] + base64.StdEncoding.Encode(in, []byte(s)) + k := 0 + for i := 0; i < len(in); i += lineLen { + j := i + lineLen + if j > len(in) { + j = len(in) + } + k += copy(out[k:], in[i:j]) + if lines > 1 { + out[k] = '\n' + k++ + } + } + return string(out[:k]) +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/scannerc.go b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/scannerc.go new file mode 100644 index 0000000000000..d97d76fa55c4d --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/scannerc.go @@ -0,0 +1,2710 @@ +package yaml + +import ( + "bytes" + "fmt" +) + +// Introduction +// ************ +// +// The following notes assume that you are familiar with the YAML specification +// (http://yaml.org/spec/cvs/current.html). We mostly follow it, although in +// some cases we are less restrictive that it requires. +// +// The process of transforming a YAML stream into a sequence of events is +// divided on two steps: Scanning and Parsing. +// +// The Scanner transforms the input stream into a sequence of tokens, while the +// parser transform the sequence of tokens produced by the Scanner into a +// sequence of parsing events. +// +// The Scanner is rather clever and complicated. The Parser, on the contrary, +// is a straightforward implementation of a recursive-descendant parser (or, +// LL(1) parser, as it is usually called). +// +// Actually there are two issues of Scanning that might be called "clever", the +// rest is quite straightforward. The issues are "block collection start" and +// "simple keys". Both issues are explained below in details. +// +// Here the Scanning step is explained and implemented. We start with the list +// of all the tokens produced by the Scanner together with short descriptions. +// +// Now, tokens: +// +// STREAM-START(encoding) # The stream start. +// STREAM-END # The stream end. +// VERSION-DIRECTIVE(major,minor) # The '%YAML' directive. +// TAG-DIRECTIVE(handle,prefix) # The '%TAG' directive. +// DOCUMENT-START # '---' +// DOCUMENT-END # '...' +// BLOCK-SEQUENCE-START # Indentation increase denoting a block +// BLOCK-MAPPING-START # sequence or a block mapping. +// BLOCK-END # Indentation decrease. +// FLOW-SEQUENCE-START # '[' +// FLOW-SEQUENCE-END # ']' +// BLOCK-SEQUENCE-START # '{' +// BLOCK-SEQUENCE-END # '}' +// BLOCK-ENTRY # '-' +// FLOW-ENTRY # ',' +// KEY # '?' or nothing (simple keys). +// VALUE # ':' +// ALIAS(anchor) # '*anchor' +// ANCHOR(anchor) # '&anchor' +// TAG(handle,suffix) # '!handle!suffix' +// SCALAR(value,style) # A scalar. +// +// The following two tokens are "virtual" tokens denoting the beginning and the +// end of the stream: +// +// STREAM-START(encoding) +// STREAM-END +// +// We pass the information about the input stream encoding with the +// STREAM-START token. +// +// The next two tokens are responsible for tags: +// +// VERSION-DIRECTIVE(major,minor) +// TAG-DIRECTIVE(handle,prefix) +// +// Example: +// +// %YAML 1.1 +// %TAG ! !foo +// %TAG !yaml! tag:yaml.org,2002: +// --- +// +// The correspoding sequence of tokens: +// +// STREAM-START(utf-8) +// VERSION-DIRECTIVE(1,1) +// TAG-DIRECTIVE("!","!foo") +// TAG-DIRECTIVE("!yaml","tag:yaml.org,2002:") +// DOCUMENT-START +// STREAM-END +// +// Note that the VERSION-DIRECTIVE and TAG-DIRECTIVE tokens occupy a whole +// line. +// +// The document start and end indicators are represented by: +// +// DOCUMENT-START +// DOCUMENT-END +// +// Note that if a YAML stream contains an implicit document (without '---' +// and '...' indicators), no DOCUMENT-START and DOCUMENT-END tokens will be +// produced. +// +// In the following examples, we present whole documents together with the +// produced tokens. +// +// 1. An implicit document: +// +// 'a scalar' +// +// Tokens: +// +// STREAM-START(utf-8) +// SCALAR("a scalar",single-quoted) +// STREAM-END +// +// 2. An explicit document: +// +// --- +// 'a scalar' +// ... +// +// Tokens: +// +// STREAM-START(utf-8) +// DOCUMENT-START +// SCALAR("a scalar",single-quoted) +// DOCUMENT-END +// STREAM-END +// +// 3. Several documents in a stream: +// +// 'a scalar' +// --- +// 'another scalar' +// --- +// 'yet another scalar' +// +// Tokens: +// +// STREAM-START(utf-8) +// SCALAR("a scalar",single-quoted) +// DOCUMENT-START +// SCALAR("another scalar",single-quoted) +// DOCUMENT-START +// SCALAR("yet another scalar",single-quoted) +// STREAM-END +// +// We have already introduced the SCALAR token above. The following tokens are +// used to describe aliases, anchors, tag, and scalars: +// +// ALIAS(anchor) +// ANCHOR(anchor) +// TAG(handle,suffix) +// SCALAR(value,style) +// +// The following series of examples illustrate the usage of these tokens: +// +// 1. A recursive sequence: +// +// &A [ *A ] +// +// Tokens: +// +// STREAM-START(utf-8) +// ANCHOR("A") +// FLOW-SEQUENCE-START +// ALIAS("A") +// FLOW-SEQUENCE-END +// STREAM-END +// +// 2. A tagged scalar: +// +// !!float "3.14" # A good approximation. +// +// Tokens: +// +// STREAM-START(utf-8) +// TAG("!!","float") +// SCALAR("3.14",double-quoted) +// STREAM-END +// +// 3. Various scalar styles: +// +// --- # Implicit empty plain scalars do not produce tokens. +// --- a plain scalar +// --- 'a single-quoted scalar' +// --- "a double-quoted scalar" +// --- |- +// a literal scalar +// --- >- +// a folded +// scalar +// +// Tokens: +// +// STREAM-START(utf-8) +// DOCUMENT-START +// DOCUMENT-START +// SCALAR("a plain scalar",plain) +// DOCUMENT-START +// SCALAR("a single-quoted scalar",single-quoted) +// DOCUMENT-START +// SCALAR("a double-quoted scalar",double-quoted) +// DOCUMENT-START +// SCALAR("a literal scalar",literal) +// DOCUMENT-START +// SCALAR("a folded scalar",folded) +// STREAM-END +// +// Now it's time to review collection-related tokens. We will start with +// flow collections: +// +// FLOW-SEQUENCE-START +// FLOW-SEQUENCE-END +// FLOW-MAPPING-START +// FLOW-MAPPING-END +// FLOW-ENTRY +// KEY +// VALUE +// +// The tokens FLOW-SEQUENCE-START, FLOW-SEQUENCE-END, FLOW-MAPPING-START, and +// FLOW-MAPPING-END represent the indicators '[', ']', '{', and '}' +// correspondingly. FLOW-ENTRY represent the ',' indicator. Finally the +// indicators '?' and ':', which are used for denoting mapping keys and values, +// are represented by the KEY and VALUE tokens. +// +// The following examples show flow collections: +// +// 1. A flow sequence: +// +// [item 1, item 2, item 3] +// +// Tokens: +// +// STREAM-START(utf-8) +// FLOW-SEQUENCE-START +// SCALAR("item 1",plain) +// FLOW-ENTRY +// SCALAR("item 2",plain) +// FLOW-ENTRY +// SCALAR("item 3",plain) +// FLOW-SEQUENCE-END +// STREAM-END +// +// 2. A flow mapping: +// +// { +// a simple key: a value, # Note that the KEY token is produced. +// ? a complex key: another value, +// } +// +// Tokens: +// +// STREAM-START(utf-8) +// FLOW-MAPPING-START +// KEY +// SCALAR("a simple key",plain) +// VALUE +// SCALAR("a value",plain) +// FLOW-ENTRY +// KEY +// SCALAR("a complex key",plain) +// VALUE +// SCALAR("another value",plain) +// FLOW-ENTRY +// FLOW-MAPPING-END +// STREAM-END +// +// A simple key is a key which is not denoted by the '?' indicator. Note that +// the Scanner still produce the KEY token whenever it encounters a simple key. +// +// For scanning block collections, the following tokens are used (note that we +// repeat KEY and VALUE here): +// +// BLOCK-SEQUENCE-START +// BLOCK-MAPPING-START +// BLOCK-END +// BLOCK-ENTRY +// KEY +// VALUE +// +// The tokens BLOCK-SEQUENCE-START and BLOCK-MAPPING-START denote indentation +// increase that precedes a block collection (cf. the INDENT token in Python). +// The token BLOCK-END denote indentation decrease that ends a block collection +// (cf. the DEDENT token in Python). However YAML has some syntax pecularities +// that makes detections of these tokens more complex. +// +// The tokens BLOCK-ENTRY, KEY, and VALUE are used to represent the indicators +// '-', '?', and ':' correspondingly. +// +// The following examples show how the tokens BLOCK-SEQUENCE-START, +// BLOCK-MAPPING-START, and BLOCK-END are emitted by the Scanner: +// +// 1. Block sequences: +// +// - item 1 +// - item 2 +// - +// - item 3.1 +// - item 3.2 +// - +// key 1: value 1 +// key 2: value 2 +// +// Tokens: +// +// STREAM-START(utf-8) +// BLOCK-SEQUENCE-START +// BLOCK-ENTRY +// SCALAR("item 1",plain) +// BLOCK-ENTRY +// SCALAR("item 2",plain) +// BLOCK-ENTRY +// BLOCK-SEQUENCE-START +// BLOCK-ENTRY +// SCALAR("item 3.1",plain) +// BLOCK-ENTRY +// SCALAR("item 3.2",plain) +// BLOCK-END +// BLOCK-ENTRY +// BLOCK-MAPPING-START +// KEY +// SCALAR("key 1",plain) +// VALUE +// SCALAR("value 1",plain) +// KEY +// SCALAR("key 2",plain) +// VALUE +// SCALAR("value 2",plain) +// BLOCK-END +// BLOCK-END +// STREAM-END +// +// 2. Block mappings: +// +// a simple key: a value # The KEY token is produced here. +// ? a complex key +// : another value +// a mapping: +// key 1: value 1 +// key 2: value 2 +// a sequence: +// - item 1 +// - item 2 +// +// Tokens: +// +// STREAM-START(utf-8) +// BLOCK-MAPPING-START +// KEY +// SCALAR("a simple key",plain) +// VALUE +// SCALAR("a value",plain) +// KEY +// SCALAR("a complex key",plain) +// VALUE +// SCALAR("another value",plain) +// KEY +// SCALAR("a mapping",plain) +// BLOCK-MAPPING-START +// KEY +// SCALAR("key 1",plain) +// VALUE +// SCALAR("value 1",plain) +// KEY +// SCALAR("key 2",plain) +// VALUE +// SCALAR("value 2",plain) +// BLOCK-END +// KEY +// SCALAR("a sequence",plain) +// VALUE +// BLOCK-SEQUENCE-START +// BLOCK-ENTRY +// SCALAR("item 1",plain) +// BLOCK-ENTRY +// SCALAR("item 2",plain) +// BLOCK-END +// BLOCK-END +// STREAM-END +// +// YAML does not always require to start a new block collection from a new +// line. If the current line contains only '-', '?', and ':' indicators, a new +// block collection may start at the current line. The following examples +// illustrate this case: +// +// 1. Collections in a sequence: +// +// - - item 1 +// - item 2 +// - key 1: value 1 +// key 2: value 2 +// - ? complex key +// : complex value +// +// Tokens: +// +// STREAM-START(utf-8) +// BLOCK-SEQUENCE-START +// BLOCK-ENTRY +// BLOCK-SEQUENCE-START +// BLOCK-ENTRY +// SCALAR("item 1",plain) +// BLOCK-ENTRY +// SCALAR("item 2",plain) +// BLOCK-END +// BLOCK-ENTRY +// BLOCK-MAPPING-START +// KEY +// SCALAR("key 1",plain) +// VALUE +// SCALAR("value 1",plain) +// KEY +// SCALAR("key 2",plain) +// VALUE +// SCALAR("value 2",plain) +// BLOCK-END +// BLOCK-ENTRY +// BLOCK-MAPPING-START +// KEY +// SCALAR("complex key") +// VALUE +// SCALAR("complex value") +// BLOCK-END +// BLOCK-END +// STREAM-END +// +// 2. Collections in a mapping: +// +// ? a sequence +// : - item 1 +// - item 2 +// ? a mapping +// : key 1: value 1 +// key 2: value 2 +// +// Tokens: +// +// STREAM-START(utf-8) +// BLOCK-MAPPING-START +// KEY +// SCALAR("a sequence",plain) +// VALUE +// BLOCK-SEQUENCE-START +// BLOCK-ENTRY +// SCALAR("item 1",plain) +// BLOCK-ENTRY +// SCALAR("item 2",plain) +// BLOCK-END +// KEY +// SCALAR("a mapping",plain) +// VALUE +// BLOCK-MAPPING-START +// KEY +// SCALAR("key 1",plain) +// VALUE +// SCALAR("value 1",plain) +// KEY +// SCALAR("key 2",plain) +// VALUE +// SCALAR("value 2",plain) +// BLOCK-END +// BLOCK-END +// STREAM-END +// +// YAML also permits non-indented sequences if they are included into a block +// mapping. In this case, the token BLOCK-SEQUENCE-START is not produced: +// +// key: +// - item 1 # BLOCK-SEQUENCE-START is NOT produced here. +// - item 2 +// +// Tokens: +// +// STREAM-START(utf-8) +// BLOCK-MAPPING-START +// KEY +// SCALAR("key",plain) +// VALUE +// BLOCK-ENTRY +// SCALAR("item 1",plain) +// BLOCK-ENTRY +// SCALAR("item 2",plain) +// BLOCK-END +// + +// Ensure that the buffer contains the required number of characters. +// Return true on success, false on failure (reader error or memory error). +func cache(parser *yaml_parser_t, length int) bool { + // [Go] This was inlined: !cache(A, B) -> unread < B && !update(A, B) + return parser.unread >= length || yaml_parser_update_buffer(parser, length) +} + +// Advance the buffer pointer. +func skip(parser *yaml_parser_t) { + parser.mark.index++ + parser.mark.column++ + parser.unread-- + parser.buffer_pos += width(parser.buffer[parser.buffer_pos]) +} + +func skip_line(parser *yaml_parser_t) { + if is_crlf(parser.buffer, parser.buffer_pos) { + parser.mark.index += 2 + parser.mark.column = 0 + parser.mark.line++ + parser.unread -= 2 + parser.buffer_pos += 2 + } else if is_break(parser.buffer, parser.buffer_pos) { + parser.mark.index++ + parser.mark.column = 0 + parser.mark.line++ + parser.unread-- + parser.buffer_pos += width(parser.buffer[parser.buffer_pos]) + } +} + +// Copy a character to a string buffer and advance pointers. +func read(parser *yaml_parser_t, s []byte) []byte { + w := width(parser.buffer[parser.buffer_pos]) + if w == 0 { + panic("invalid character sequence") + } + if len(s) == 0 { + s = make([]byte, 0, 32) + } + if w == 1 && len(s)+w <= cap(s) { + s = s[:len(s)+1] + s[len(s)-1] = parser.buffer[parser.buffer_pos] + parser.buffer_pos++ + } else { + s = append(s, parser.buffer[parser.buffer_pos:parser.buffer_pos+w]...) + parser.buffer_pos += w + } + parser.mark.index++ + parser.mark.column++ + parser.unread-- + return s +} + +// Copy a line break character to a string buffer and advance pointers. +func read_line(parser *yaml_parser_t, s []byte) []byte { + buf := parser.buffer + pos := parser.buffer_pos + switch { + case buf[pos] == '\r' && buf[pos+1] == '\n': + // CR LF . LF + s = append(s, '\n') + parser.buffer_pos += 2 + parser.mark.index++ + parser.unread-- + case buf[pos] == '\r' || buf[pos] == '\n': + // CR|LF . LF + s = append(s, '\n') + parser.buffer_pos += 1 + case buf[pos] == '\xC2' && buf[pos+1] == '\x85': + // NEL . LF + s = append(s, '\n') + parser.buffer_pos += 2 + case buf[pos] == '\xE2' && buf[pos+1] == '\x80' && (buf[pos+2] == '\xA8' || buf[pos+2] == '\xA9'): + // LS|PS . LS|PS + s = append(s, buf[parser.buffer_pos:pos+3]...) + parser.buffer_pos += 3 + default: + return s + } + parser.mark.index++ + parser.mark.column = 0 + parser.mark.line++ + parser.unread-- + return s +} + +// Get the next token. +func yaml_parser_scan(parser *yaml_parser_t, token *yaml_token_t) bool { + // Erase the token object. + *token = yaml_token_t{} // [Go] Is this necessary? + + // No tokens after STREAM-END or error. + if parser.stream_end_produced || parser.error != yaml_NO_ERROR { + return true + } + + // Ensure that the tokens queue contains enough tokens. + if !parser.token_available { + if !yaml_parser_fetch_more_tokens(parser) { + return false + } + } + + // Fetch the next token from the queue. + *token = parser.tokens[parser.tokens_head] + parser.tokens_head++ + parser.tokens_parsed++ + parser.token_available = false + + if token.typ == yaml_STREAM_END_TOKEN { + parser.stream_end_produced = true + } + return true +} + +// Set the scanner error and return false. +func yaml_parser_set_scanner_error(parser *yaml_parser_t, context string, context_mark yaml_mark_t, problem string) bool { + parser.error = yaml_SCANNER_ERROR + parser.context = context + parser.context_mark = context_mark + parser.problem = problem + parser.problem_mark = parser.mark + return false +} + +func yaml_parser_set_scanner_tag_error(parser *yaml_parser_t, directive bool, context_mark yaml_mark_t, problem string) bool { + context := "while parsing a tag" + if directive { + context = "while parsing a %TAG directive" + } + return yaml_parser_set_scanner_error(parser, context, context_mark, "did not find URI escaped octet") +} + +func trace(args ...interface{}) func() { + pargs := append([]interface{}{"+++"}, args...) + fmt.Println(pargs...) + pargs = append([]interface{}{"---"}, args...) + return func() { fmt.Println(pargs...) } +} + +// Ensure that the tokens queue contains at least one token which can be +// returned to the Parser. +func yaml_parser_fetch_more_tokens(parser *yaml_parser_t) bool { + // While we need more tokens to fetch, do it. + for { + // Check if we really need to fetch more tokens. + need_more_tokens := false + + if parser.tokens_head == len(parser.tokens) { + // Queue is empty. + need_more_tokens = true + } else { + // Check if any potential simple key may occupy the head position. + if !yaml_parser_stale_simple_keys(parser) { + return false + } + + for i := range parser.simple_keys { + simple_key := &parser.simple_keys[i] + if simple_key.possible && simple_key.token_number == parser.tokens_parsed { + need_more_tokens = true + break + } + } + } + + // We are finished. + if !need_more_tokens { + break + } + // Fetch the next token. + if !yaml_parser_fetch_next_token(parser) { + return false + } + } + + parser.token_available = true + return true +} + +// The dispatcher for token fetchers. +func yaml_parser_fetch_next_token(parser *yaml_parser_t) bool { + // Ensure that the buffer is initialized. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + // Check if we just started scanning. Fetch STREAM-START then. + if !parser.stream_start_produced { + return yaml_parser_fetch_stream_start(parser) + } + + // Eat whitespaces and comments until we reach the next token. + if !yaml_parser_scan_to_next_token(parser) { + return false + } + + // Remove obsolete potential simple keys. + if !yaml_parser_stale_simple_keys(parser) { + return false + } + + // Check the indentation level against the current column. + if !yaml_parser_unroll_indent(parser, parser.mark.column) { + return false + } + + // Ensure that the buffer contains at least 4 characters. 4 is the length + // of the longest indicators ('--- ' and '... '). + if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { + return false + } + + // Is it the end of the stream? + if is_z(parser.buffer, parser.buffer_pos) { + return yaml_parser_fetch_stream_end(parser) + } + + // Is it a directive? + if parser.mark.column == 0 && parser.buffer[parser.buffer_pos] == '%' { + return yaml_parser_fetch_directive(parser) + } + + buf := parser.buffer + pos := parser.buffer_pos + + // Is it the document start indicator? + if parser.mark.column == 0 && buf[pos] == '-' && buf[pos+1] == '-' && buf[pos+2] == '-' && is_blankz(buf, pos+3) { + return yaml_parser_fetch_document_indicator(parser, yaml_DOCUMENT_START_TOKEN) + } + + // Is it the document end indicator? + if parser.mark.column == 0 && buf[pos] == '.' && buf[pos+1] == '.' && buf[pos+2] == '.' && is_blankz(buf, pos+3) { + return yaml_parser_fetch_document_indicator(parser, yaml_DOCUMENT_END_TOKEN) + } + + // Is it the flow sequence start indicator? + if buf[pos] == '[' { + return yaml_parser_fetch_flow_collection_start(parser, yaml_FLOW_SEQUENCE_START_TOKEN) + } + + // Is it the flow mapping start indicator? + if parser.buffer[parser.buffer_pos] == '{' { + return yaml_parser_fetch_flow_collection_start(parser, yaml_FLOW_MAPPING_START_TOKEN) + } + + // Is it the flow sequence end indicator? + if parser.buffer[parser.buffer_pos] == ']' { + return yaml_parser_fetch_flow_collection_end(parser, + yaml_FLOW_SEQUENCE_END_TOKEN) + } + + // Is it the flow mapping end indicator? + if parser.buffer[parser.buffer_pos] == '}' { + return yaml_parser_fetch_flow_collection_end(parser, + yaml_FLOW_MAPPING_END_TOKEN) + } + + // Is it the flow entry indicator? + if parser.buffer[parser.buffer_pos] == ',' { + return yaml_parser_fetch_flow_entry(parser) + } + + // Is it the block entry indicator? + if parser.buffer[parser.buffer_pos] == '-' && is_blankz(parser.buffer, parser.buffer_pos+1) { + return yaml_parser_fetch_block_entry(parser) + } + + // Is it the key indicator? + if parser.buffer[parser.buffer_pos] == '?' && (parser.flow_level > 0 || is_blankz(parser.buffer, parser.buffer_pos+1)) { + return yaml_parser_fetch_key(parser) + } + + // Is it the value indicator? + if parser.buffer[parser.buffer_pos] == ':' && (parser.flow_level > 0 || is_blankz(parser.buffer, parser.buffer_pos+1)) { + return yaml_parser_fetch_value(parser) + } + + // Is it an alias? + if parser.buffer[parser.buffer_pos] == '*' { + return yaml_parser_fetch_anchor(parser, yaml_ALIAS_TOKEN) + } + + // Is it an anchor? + if parser.buffer[parser.buffer_pos] == '&' { + return yaml_parser_fetch_anchor(parser, yaml_ANCHOR_TOKEN) + } + + // Is it a tag? + if parser.buffer[parser.buffer_pos] == '!' { + return yaml_parser_fetch_tag(parser) + } + + // Is it a literal scalar? + if parser.buffer[parser.buffer_pos] == '|' && parser.flow_level == 0 { + return yaml_parser_fetch_block_scalar(parser, true) + } + + // Is it a folded scalar? + if parser.buffer[parser.buffer_pos] == '>' && parser.flow_level == 0 { + return yaml_parser_fetch_block_scalar(parser, false) + } + + // Is it a single-quoted scalar? + if parser.buffer[parser.buffer_pos] == '\'' { + return yaml_parser_fetch_flow_scalar(parser, true) + } + + // Is it a double-quoted scalar? + if parser.buffer[parser.buffer_pos] == '"' { + return yaml_parser_fetch_flow_scalar(parser, false) + } + + // Is it a plain scalar? + // + // A plain scalar may start with any non-blank characters except + // + // '-', '?', ':', ',', '[', ']', '{', '}', + // '#', '&', '*', '!', '|', '>', '\'', '\"', + // '%', '@', '`'. + // + // In the block context (and, for the '-' indicator, in the flow context + // too), it may also start with the characters + // + // '-', '?', ':' + // + // if it is followed by a non-space character. + // + // The last rule is more restrictive than the specification requires. + // [Go] Make this logic more reasonable. + //switch parser.buffer[parser.buffer_pos] { + //case '-', '?', ':', ',', '?', '-', ',', ':', ']', '[', '}', '{', '&', '#', '!', '*', '>', '|', '"', '\'', '@', '%', '-', '`': + //} + if !(is_blankz(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == '-' || + parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == ':' || + parser.buffer[parser.buffer_pos] == ',' || parser.buffer[parser.buffer_pos] == '[' || + parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '{' || + parser.buffer[parser.buffer_pos] == '}' || parser.buffer[parser.buffer_pos] == '#' || + parser.buffer[parser.buffer_pos] == '&' || parser.buffer[parser.buffer_pos] == '*' || + parser.buffer[parser.buffer_pos] == '!' || parser.buffer[parser.buffer_pos] == '|' || + parser.buffer[parser.buffer_pos] == '>' || parser.buffer[parser.buffer_pos] == '\'' || + parser.buffer[parser.buffer_pos] == '"' || parser.buffer[parser.buffer_pos] == '%' || + parser.buffer[parser.buffer_pos] == '@' || parser.buffer[parser.buffer_pos] == '`') || + (parser.buffer[parser.buffer_pos] == '-' && !is_blank(parser.buffer, parser.buffer_pos+1)) || + (parser.flow_level == 0 && + (parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == ':') && + !is_blankz(parser.buffer, parser.buffer_pos+1)) { + return yaml_parser_fetch_plain_scalar(parser) + } + + // If we don't determine the token type so far, it is an error. + return yaml_parser_set_scanner_error(parser, + "while scanning for the next token", parser.mark, + "found character that cannot start any token") +} + +// Check the list of potential simple keys and remove the positions that +// cannot contain simple keys anymore. +func yaml_parser_stale_simple_keys(parser *yaml_parser_t) bool { + // Check for a potential simple key for each flow level. + for i := range parser.simple_keys { + simple_key := &parser.simple_keys[i] + + // The specification requires that a simple key + // + // - is limited to a single line, + // - is shorter than 1024 characters. + if simple_key.possible && (simple_key.mark.line < parser.mark.line || simple_key.mark.index+1024 < parser.mark.index) { + + // Check if the potential simple key to be removed is required. + if simple_key.required { + return yaml_parser_set_scanner_error(parser, + "while scanning a simple key", simple_key.mark, + "could not find expected ':'") + } + simple_key.possible = false + } + } + return true +} + +// Check if a simple key may start at the current position and add it if +// needed. +func yaml_parser_save_simple_key(parser *yaml_parser_t) bool { + // A simple key is required at the current position if the scanner is in + // the block context and the current column coincides with the indentation + // level. + + required := parser.flow_level == 0 && parser.indent == parser.mark.column + + // A simple key is required only when it is the first token in the current + // line. Therefore it is always allowed. But we add a check anyway. + if required && !parser.simple_key_allowed { + panic("should not happen") + } + + // + // If the current position may start a simple key, save it. + // + if parser.simple_key_allowed { + simple_key := yaml_simple_key_t{ + possible: true, + required: required, + token_number: parser.tokens_parsed + (len(parser.tokens) - parser.tokens_head), + } + simple_key.mark = parser.mark + + if !yaml_parser_remove_simple_key(parser) { + return false + } + parser.simple_keys[len(parser.simple_keys)-1] = simple_key + } + return true +} + +// Remove a potential simple key at the current flow level. +func yaml_parser_remove_simple_key(parser *yaml_parser_t) bool { + i := len(parser.simple_keys) - 1 + if parser.simple_keys[i].possible { + // If the key is required, it is an error. + if parser.simple_keys[i].required { + return yaml_parser_set_scanner_error(parser, + "while scanning a simple key", parser.simple_keys[i].mark, + "could not find expected ':'") + } + } + // Remove the key from the stack. + parser.simple_keys[i].possible = false + return true +} + +// Increase the flow level and resize the simple key list if needed. +func yaml_parser_increase_flow_level(parser *yaml_parser_t) bool { + // Reset the simple key on the next level. + parser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{}) + + // Increase the flow level. + parser.flow_level++ + return true +} + +// Decrease the flow level. +func yaml_parser_decrease_flow_level(parser *yaml_parser_t) bool { + if parser.flow_level > 0 { + parser.flow_level-- + parser.simple_keys = parser.simple_keys[:len(parser.simple_keys)-1] + } + return true +} + +// Push the current indentation level to the stack and set the new level +// the current column is greater than the indentation level. In this case, +// append or insert the specified token into the token queue. +func yaml_parser_roll_indent(parser *yaml_parser_t, column, number int, typ yaml_token_type_t, mark yaml_mark_t) bool { + // In the flow context, do nothing. + if parser.flow_level > 0 { + return true + } + + if parser.indent < column { + // Push the current indentation level to the stack and set the new + // indentation level. + parser.indents = append(parser.indents, parser.indent) + parser.indent = column + + // Create a token and insert it into the queue. + token := yaml_token_t{ + typ: typ, + start_mark: mark, + end_mark: mark, + } + if number > -1 { + number -= parser.tokens_parsed + } + yaml_insert_token(parser, number, &token) + } + return true +} + +// Pop indentation levels from the indents stack until the current level +// becomes less or equal to the column. For each indentation level, append +// the BLOCK-END token. +func yaml_parser_unroll_indent(parser *yaml_parser_t, column int) bool { + // In the flow context, do nothing. + if parser.flow_level > 0 { + return true + } + + // Loop through the indentation levels in the stack. + for parser.indent > column { + // Create a token and append it to the queue. + token := yaml_token_t{ + typ: yaml_BLOCK_END_TOKEN, + start_mark: parser.mark, + end_mark: parser.mark, + } + yaml_insert_token(parser, -1, &token) + + // Pop the indentation level. + parser.indent = parser.indents[len(parser.indents)-1] + parser.indents = parser.indents[:len(parser.indents)-1] + } + return true +} + +// Initialize the scanner and produce the STREAM-START token. +func yaml_parser_fetch_stream_start(parser *yaml_parser_t) bool { + + // Set the initial indentation. + parser.indent = -1 + + // Initialize the simple key stack. + parser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{}) + + // A simple key is allowed at the beginning of the stream. + parser.simple_key_allowed = true + + // We have started. + parser.stream_start_produced = true + + // Create the STREAM-START token and append it to the queue. + token := yaml_token_t{ + typ: yaml_STREAM_START_TOKEN, + start_mark: parser.mark, + end_mark: parser.mark, + encoding: parser.encoding, + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the STREAM-END token and shut down the scanner. +func yaml_parser_fetch_stream_end(parser *yaml_parser_t) bool { + + // Force new line. + if parser.mark.column != 0 { + parser.mark.column = 0 + parser.mark.line++ + } + + // Reset the indentation level. + if !yaml_parser_unroll_indent(parser, -1) { + return false + } + + // Reset simple keys. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + parser.simple_key_allowed = false + + // Create the STREAM-END token and append it to the queue. + token := yaml_token_t{ + typ: yaml_STREAM_END_TOKEN, + start_mark: parser.mark, + end_mark: parser.mark, + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce a VERSION-DIRECTIVE or TAG-DIRECTIVE token. +func yaml_parser_fetch_directive(parser *yaml_parser_t) bool { + // Reset the indentation level. + if !yaml_parser_unroll_indent(parser, -1) { + return false + } + + // Reset simple keys. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + parser.simple_key_allowed = false + + // Create the YAML-DIRECTIVE or TAG-DIRECTIVE token. + token := yaml_token_t{} + if !yaml_parser_scan_directive(parser, &token) { + return false + } + // Append the token to the queue. + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the DOCUMENT-START or DOCUMENT-END token. +func yaml_parser_fetch_document_indicator(parser *yaml_parser_t, typ yaml_token_type_t) bool { + // Reset the indentation level. + if !yaml_parser_unroll_indent(parser, -1) { + return false + } + + // Reset simple keys. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + parser.simple_key_allowed = false + + // Consume the token. + start_mark := parser.mark + + skip(parser) + skip(parser) + skip(parser) + + end_mark := parser.mark + + // Create the DOCUMENT-START or DOCUMENT-END token. + token := yaml_token_t{ + typ: typ, + start_mark: start_mark, + end_mark: end_mark, + } + // Append the token to the queue. + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the FLOW-SEQUENCE-START or FLOW-MAPPING-START token. +func yaml_parser_fetch_flow_collection_start(parser *yaml_parser_t, typ yaml_token_type_t) bool { + // The indicators '[' and '{' may start a simple key. + if !yaml_parser_save_simple_key(parser) { + return false + } + + // Increase the flow level. + if !yaml_parser_increase_flow_level(parser) { + return false + } + + // A simple key may follow the indicators '[' and '{'. + parser.simple_key_allowed = true + + // Consume the token. + start_mark := parser.mark + skip(parser) + end_mark := parser.mark + + // Create the FLOW-SEQUENCE-START of FLOW-MAPPING-START token. + token := yaml_token_t{ + typ: typ, + start_mark: start_mark, + end_mark: end_mark, + } + // Append the token to the queue. + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the FLOW-SEQUENCE-END or FLOW-MAPPING-END token. +func yaml_parser_fetch_flow_collection_end(parser *yaml_parser_t, typ yaml_token_type_t) bool { + // Reset any potential simple key on the current flow level. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + // Decrease the flow level. + if !yaml_parser_decrease_flow_level(parser) { + return false + } + + // No simple keys after the indicators ']' and '}'. + parser.simple_key_allowed = false + + // Consume the token. + + start_mark := parser.mark + skip(parser) + end_mark := parser.mark + + // Create the FLOW-SEQUENCE-END of FLOW-MAPPING-END token. + token := yaml_token_t{ + typ: typ, + start_mark: start_mark, + end_mark: end_mark, + } + // Append the token to the queue. + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the FLOW-ENTRY token. +func yaml_parser_fetch_flow_entry(parser *yaml_parser_t) bool { + // Reset any potential simple keys on the current flow level. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + // Simple keys are allowed after ','. + parser.simple_key_allowed = true + + // Consume the token. + start_mark := parser.mark + skip(parser) + end_mark := parser.mark + + // Create the FLOW-ENTRY token and append it to the queue. + token := yaml_token_t{ + typ: yaml_FLOW_ENTRY_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the BLOCK-ENTRY token. +func yaml_parser_fetch_block_entry(parser *yaml_parser_t) bool { + // Check if the scanner is in the block context. + if parser.flow_level == 0 { + // Check if we are allowed to start a new entry. + if !parser.simple_key_allowed { + return yaml_parser_set_scanner_error(parser, "", parser.mark, + "block sequence entries are not allowed in this context") + } + // Add the BLOCK-SEQUENCE-START token if needed. + if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_SEQUENCE_START_TOKEN, parser.mark) { + return false + } + } else { + // It is an error for the '-' indicator to occur in the flow context, + // but we let the Parser detect and report about it because the Parser + // is able to point to the context. + } + + // Reset any potential simple keys on the current flow level. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + // Simple keys are allowed after '-'. + parser.simple_key_allowed = true + + // Consume the token. + start_mark := parser.mark + skip(parser) + end_mark := parser.mark + + // Create the BLOCK-ENTRY token and append it to the queue. + token := yaml_token_t{ + typ: yaml_BLOCK_ENTRY_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the KEY token. +func yaml_parser_fetch_key(parser *yaml_parser_t) bool { + + // In the block context, additional checks are required. + if parser.flow_level == 0 { + // Check if we are allowed to start a new key (not nessesary simple). + if !parser.simple_key_allowed { + return yaml_parser_set_scanner_error(parser, "", parser.mark, + "mapping keys are not allowed in this context") + } + // Add the BLOCK-MAPPING-START token if needed. + if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_MAPPING_START_TOKEN, parser.mark) { + return false + } + } + + // Reset any potential simple keys on the current flow level. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + // Simple keys are allowed after '?' in the block context. + parser.simple_key_allowed = parser.flow_level == 0 + + // Consume the token. + start_mark := parser.mark + skip(parser) + end_mark := parser.mark + + // Create the KEY token and append it to the queue. + token := yaml_token_t{ + typ: yaml_KEY_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the VALUE token. +func yaml_parser_fetch_value(parser *yaml_parser_t) bool { + + simple_key := &parser.simple_keys[len(parser.simple_keys)-1] + + // Have we found a simple key? + if simple_key.possible { + // Create the KEY token and insert it into the queue. + token := yaml_token_t{ + typ: yaml_KEY_TOKEN, + start_mark: simple_key.mark, + end_mark: simple_key.mark, + } + yaml_insert_token(parser, simple_key.token_number-parser.tokens_parsed, &token) + + // In the block context, we may need to add the BLOCK-MAPPING-START token. + if !yaml_parser_roll_indent(parser, simple_key.mark.column, + simple_key.token_number, + yaml_BLOCK_MAPPING_START_TOKEN, simple_key.mark) { + return false + } + + // Remove the simple key. + simple_key.possible = false + + // A simple key cannot follow another simple key. + parser.simple_key_allowed = false + + } else { + // The ':' indicator follows a complex key. + + // In the block context, extra checks are required. + if parser.flow_level == 0 { + + // Check if we are allowed to start a complex value. + if !parser.simple_key_allowed { + return yaml_parser_set_scanner_error(parser, "", parser.mark, + "mapping values are not allowed in this context") + } + + // Add the BLOCK-MAPPING-START token if needed. + if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_MAPPING_START_TOKEN, parser.mark) { + return false + } + } + + // Simple keys after ':' are allowed in the block context. + parser.simple_key_allowed = parser.flow_level == 0 + } + + // Consume the token. + start_mark := parser.mark + skip(parser) + end_mark := parser.mark + + // Create the VALUE token and append it to the queue. + token := yaml_token_t{ + typ: yaml_VALUE_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the ALIAS or ANCHOR token. +func yaml_parser_fetch_anchor(parser *yaml_parser_t, typ yaml_token_type_t) bool { + // An anchor or an alias could be a simple key. + if !yaml_parser_save_simple_key(parser) { + return false + } + + // A simple key cannot follow an anchor or an alias. + parser.simple_key_allowed = false + + // Create the ALIAS or ANCHOR token and append it to the queue. + var token yaml_token_t + if !yaml_parser_scan_anchor(parser, &token, typ) { + return false + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the TAG token. +func yaml_parser_fetch_tag(parser *yaml_parser_t) bool { + // A tag could be a simple key. + if !yaml_parser_save_simple_key(parser) { + return false + } + + // A simple key cannot follow a tag. + parser.simple_key_allowed = false + + // Create the TAG token and append it to the queue. + var token yaml_token_t + if !yaml_parser_scan_tag(parser, &token) { + return false + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the SCALAR(...,literal) or SCALAR(...,folded) tokens. +func yaml_parser_fetch_block_scalar(parser *yaml_parser_t, literal bool) bool { + // Remove any potential simple keys. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + // A simple key may follow a block scalar. + parser.simple_key_allowed = true + + // Create the SCALAR token and append it to the queue. + var token yaml_token_t + if !yaml_parser_scan_block_scalar(parser, &token, literal) { + return false + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the SCALAR(...,single-quoted) or SCALAR(...,double-quoted) tokens. +func yaml_parser_fetch_flow_scalar(parser *yaml_parser_t, single bool) bool { + // A plain scalar could be a simple key. + if !yaml_parser_save_simple_key(parser) { + return false + } + + // A simple key cannot follow a flow scalar. + parser.simple_key_allowed = false + + // Create the SCALAR token and append it to the queue. + var token yaml_token_t + if !yaml_parser_scan_flow_scalar(parser, &token, single) { + return false + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the SCALAR(...,plain) token. +func yaml_parser_fetch_plain_scalar(parser *yaml_parser_t) bool { + // A plain scalar could be a simple key. + if !yaml_parser_save_simple_key(parser) { + return false + } + + // A simple key cannot follow a flow scalar. + parser.simple_key_allowed = false + + // Create the SCALAR token and append it to the queue. + var token yaml_token_t + if !yaml_parser_scan_plain_scalar(parser, &token) { + return false + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Eat whitespaces and comments until the next token is found. +func yaml_parser_scan_to_next_token(parser *yaml_parser_t) bool { + + // Until the next token is not found. + for { + // Allow the BOM mark to start a line. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if parser.mark.column == 0 && is_bom(parser.buffer, parser.buffer_pos) { + skip(parser) + } + + // Eat whitespaces. + // Tabs are allowed: + // - in the flow context + // - in the block context, but not at the beginning of the line or + // after '-', '?', or ':' (complex value). + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + for parser.buffer[parser.buffer_pos] == ' ' || ((parser.flow_level > 0 || !parser.simple_key_allowed) && parser.buffer[parser.buffer_pos] == '\t') { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Eat a comment until a line break. + if parser.buffer[parser.buffer_pos] == '#' { + for !is_breakz(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + } + + // If it is a line break, eat it. + if is_break(parser.buffer, parser.buffer_pos) { + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + skip_line(parser) + + // In the block context, a new line may start a simple key. + if parser.flow_level == 0 { + parser.simple_key_allowed = true + } + } else { + break // We have found a token. + } + } + + return true +} + +// Scan a YAML-DIRECTIVE or TAG-DIRECTIVE token. +// +// Scope: +// %YAML 1.1 # a comment \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool { + // Eat '%'. + start_mark := parser.mark + skip(parser) + + // Scan the directive name. + var name []byte + if !yaml_parser_scan_directive_name(parser, start_mark, &name) { + return false + } + + // Is it a YAML directive? + if bytes.Equal(name, []byte("YAML")) { + // Scan the VERSION directive value. + var major, minor int8 + if !yaml_parser_scan_version_directive_value(parser, start_mark, &major, &minor) { + return false + } + end_mark := parser.mark + + // Create a VERSION-DIRECTIVE token. + *token = yaml_token_t{ + typ: yaml_VERSION_DIRECTIVE_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + major: major, + minor: minor, + } + + // Is it a TAG directive? + } else if bytes.Equal(name, []byte("TAG")) { + // Scan the TAG directive value. + var handle, prefix []byte + if !yaml_parser_scan_tag_directive_value(parser, start_mark, &handle, &prefix) { + return false + } + end_mark := parser.mark + + // Create a TAG-DIRECTIVE token. + *token = yaml_token_t{ + typ: yaml_TAG_DIRECTIVE_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + value: handle, + prefix: prefix, + } + + // Unknown directive. + } else { + yaml_parser_set_scanner_error(parser, "while scanning a directive", + start_mark, "found uknown directive name") + return false + } + + // Eat the rest of the line including any comments. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + for is_blank(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + if parser.buffer[parser.buffer_pos] == '#' { + for !is_breakz(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + } + + // Check if we are at the end of the line. + if !is_breakz(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a directive", + start_mark, "did not find expected comment or line break") + return false + } + + // Eat a line break. + if is_break(parser.buffer, parser.buffer_pos) { + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + skip_line(parser) + } + + return true +} + +// Scan the directive name. +// +// Scope: +// %YAML 1.1 # a comment \n +// ^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^ +// +func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark_t, name *[]byte) bool { + // Consume the directive name. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + var s []byte + for is_alpha(parser.buffer, parser.buffer_pos) { + s = read(parser, s) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Check if the name is empty. + if len(s) == 0 { + yaml_parser_set_scanner_error(parser, "while scanning a directive", + start_mark, "could not find expected directive name") + return false + } + + // Check for an blank character after the name. + if !is_blankz(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a directive", + start_mark, "found unexpected non-alphabetical character") + return false + } + *name = s + return true +} + +// Scan the value of VERSION-DIRECTIVE. +// +// Scope: +// %YAML 1.1 # a comment \n +// ^^^^^^ +func yaml_parser_scan_version_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, major, minor *int8) bool { + // Eat whitespaces. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + for is_blank(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Consume the major version number. + if !yaml_parser_scan_version_directive_number(parser, start_mark, major) { + return false + } + + // Eat '.'. + if parser.buffer[parser.buffer_pos] != '.' { + return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", + start_mark, "did not find expected digit or '.' character") + } + + skip(parser) + + // Consume the minor version number. + if !yaml_parser_scan_version_directive_number(parser, start_mark, minor) { + return false + } + return true +} + +const max_number_length = 2 + +// Scan the version number of VERSION-DIRECTIVE. +// +// Scope: +// %YAML 1.1 # a comment \n +// ^ +// %YAML 1.1 # a comment \n +// ^ +func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark yaml_mark_t, number *int8) bool { + + // Repeat while the next character is digit. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + var value, length int8 + for is_digit(parser.buffer, parser.buffer_pos) { + // Check if the number is too long. + length++ + if length > max_number_length { + return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", + start_mark, "found extremely long version number") + } + value = value*10 + int8(as_digit(parser.buffer, parser.buffer_pos)) + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Check if the number was present. + if length == 0 { + return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", + start_mark, "did not find expected version number") + } + *number = value + return true +} + +// Scan the value of a TAG-DIRECTIVE token. +// +// Scope: +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +func yaml_parser_scan_tag_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, handle, prefix *[]byte) bool { + var handle_value, prefix_value []byte + + // Eat whitespaces. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + for is_blank(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Scan a handle. + if !yaml_parser_scan_tag_handle(parser, true, start_mark, &handle_value) { + return false + } + + // Expect a whitespace. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if !is_blank(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a %TAG directive", + start_mark, "did not find expected whitespace") + return false + } + + // Eat whitespaces. + for is_blank(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Scan a prefix. + if !yaml_parser_scan_tag_uri(parser, true, nil, start_mark, &prefix_value) { + return false + } + + // Expect a whitespace or line break. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if !is_blankz(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a %TAG directive", + start_mark, "did not find expected whitespace or line break") + return false + } + + *handle = handle_value + *prefix = prefix_value + return true +} + +func yaml_parser_scan_anchor(parser *yaml_parser_t, token *yaml_token_t, typ yaml_token_type_t) bool { + var s []byte + + // Eat the indicator character. + start_mark := parser.mark + skip(parser) + + // Consume the value. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + for is_alpha(parser.buffer, parser.buffer_pos) { + s = read(parser, s) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + end_mark := parser.mark + + /* + * Check if length of the anchor is greater than 0 and it is followed by + * a whitespace character or one of the indicators: + * + * '?', ':', ',', ']', '}', '%', '@', '`'. + */ + + if len(s) == 0 || + !(is_blankz(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == '?' || + parser.buffer[parser.buffer_pos] == ':' || parser.buffer[parser.buffer_pos] == ',' || + parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '}' || + parser.buffer[parser.buffer_pos] == '%' || parser.buffer[parser.buffer_pos] == '@' || + parser.buffer[parser.buffer_pos] == '`') { + context := "while scanning an alias" + if typ == yaml_ANCHOR_TOKEN { + context = "while scanning an anchor" + } + yaml_parser_set_scanner_error(parser, context, start_mark, + "did not find expected alphabetic or numeric character") + return false + } + + // Create a token. + *token = yaml_token_t{ + typ: typ, + start_mark: start_mark, + end_mark: end_mark, + value: s, + } + + return true +} + +/* + * Scan a TAG token. + */ + +func yaml_parser_scan_tag(parser *yaml_parser_t, token *yaml_token_t) bool { + var handle, suffix []byte + + start_mark := parser.mark + + // Check if the tag is in the canonical form. + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + + if parser.buffer[parser.buffer_pos+1] == '<' { + // Keep the handle as '' + + // Eat '!<' + skip(parser) + skip(parser) + + // Consume the tag value. + if !yaml_parser_scan_tag_uri(parser, false, nil, start_mark, &suffix) { + return false + } + + // Check for '>' and eat it. + if parser.buffer[parser.buffer_pos] != '>' { + yaml_parser_set_scanner_error(parser, "while scanning a tag", + start_mark, "did not find the expected '>'") + return false + } + + skip(parser) + } else { + // The tag has either the '!suffix' or the '!handle!suffix' form. + + // First, try to scan a handle. + if !yaml_parser_scan_tag_handle(parser, false, start_mark, &handle) { + return false + } + + // Check if it is, indeed, handle. + if handle[0] == '!' && len(handle) > 1 && handle[len(handle)-1] == '!' { + // Scan the suffix now. + if !yaml_parser_scan_tag_uri(parser, false, nil, start_mark, &suffix) { + return false + } + } else { + // It wasn't a handle after all. Scan the rest of the tag. + if !yaml_parser_scan_tag_uri(parser, false, handle, start_mark, &suffix) { + return false + } + + // Set the handle to '!'. + handle = []byte{'!'} + + // A special case: the '!' tag. Set the handle to '' and the + // suffix to '!'. + if len(suffix) == 0 { + handle, suffix = suffix, handle + } + } + } + + // Check the character which ends the tag. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if !is_blankz(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a tag", + start_mark, "did not find expected whitespace or line break") + return false + } + + end_mark := parser.mark + + // Create a token. + *token = yaml_token_t{ + typ: yaml_TAG_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + value: handle, + suffix: suffix, + } + return true +} + +// Scan a tag handle. +func yaml_parser_scan_tag_handle(parser *yaml_parser_t, directive bool, start_mark yaml_mark_t, handle *[]byte) bool { + // Check the initial '!' character. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if parser.buffer[parser.buffer_pos] != '!' { + yaml_parser_set_scanner_tag_error(parser, directive, + start_mark, "did not find expected '!'") + return false + } + + var s []byte + + // Copy the '!' character. + s = read(parser, s) + + // Copy all subsequent alphabetical and numerical characters. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + for is_alpha(parser.buffer, parser.buffer_pos) { + s = read(parser, s) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Check if the trailing character is '!' and copy it. + if parser.buffer[parser.buffer_pos] == '!' { + s = read(parser, s) + } else { + // It's either the '!' tag or not really a tag handle. If it's a %TAG + // directive, it's an error. If it's a tag token, it must be a part of URI. + if directive && !(s[0] == '!' && s[1] == 0) { + yaml_parser_set_scanner_tag_error(parser, directive, + start_mark, "did not find expected '!'") + return false + } + } + + *handle = s + return true +} + +// Scan a tag. +func yaml_parser_scan_tag_uri(parser *yaml_parser_t, directive bool, head []byte, start_mark yaml_mark_t, uri *[]byte) bool { + //size_t length = head ? strlen((char *)head) : 0 + var s []byte + + // Copy the head if needed. + // + // Note that we don't copy the leading '!' character. + if len(head) > 1 { + s = append(s, head[1:]...) + } + + // Scan the tag. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + // The set of characters that may appear in URI is as follows: + // + // '0'-'9', 'A'-'Z', 'a'-'z', '_', '-', ';', '/', '?', ':', '@', '&', + // '=', '+', '$', ',', '.', '!', '~', '*', '\'', '(', ')', '[', ']', + // '%'. + // [Go] Convert this into more reasonable logic. + for is_alpha(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == ';' || + parser.buffer[parser.buffer_pos] == '/' || parser.buffer[parser.buffer_pos] == '?' || + parser.buffer[parser.buffer_pos] == ':' || parser.buffer[parser.buffer_pos] == '@' || + parser.buffer[parser.buffer_pos] == '&' || parser.buffer[parser.buffer_pos] == '=' || + parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '$' || + parser.buffer[parser.buffer_pos] == ',' || parser.buffer[parser.buffer_pos] == '.' || + parser.buffer[parser.buffer_pos] == '!' || parser.buffer[parser.buffer_pos] == '~' || + parser.buffer[parser.buffer_pos] == '*' || parser.buffer[parser.buffer_pos] == '\'' || + parser.buffer[parser.buffer_pos] == '(' || parser.buffer[parser.buffer_pos] == ')' || + parser.buffer[parser.buffer_pos] == '[' || parser.buffer[parser.buffer_pos] == ']' || + parser.buffer[parser.buffer_pos] == '%' { + // Check if it is a URI-escape sequence. + if parser.buffer[parser.buffer_pos] == '%' { + if !yaml_parser_scan_uri_escapes(parser, directive, start_mark, &s) { + return false + } + } else { + s = read(parser, s) + } + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Check if the tag is non-empty. + if len(s) == 0 { + yaml_parser_set_scanner_tag_error(parser, directive, + start_mark, "did not find expected tag URI") + return false + } + *uri = s + return true +} + +// Decode an URI-escape sequence corresponding to a single UTF-8 character. +func yaml_parser_scan_uri_escapes(parser *yaml_parser_t, directive bool, start_mark yaml_mark_t, s *[]byte) bool { + + // Decode the required number of characters. + w := 1024 + for w > 0 { + // Check for a URI-escaped octet. + if parser.unread < 3 && !yaml_parser_update_buffer(parser, 3) { + return false + } + + if !(parser.buffer[parser.buffer_pos] == '%' && + is_hex(parser.buffer, parser.buffer_pos+1) && + is_hex(parser.buffer, parser.buffer_pos+2)) { + return yaml_parser_set_scanner_tag_error(parser, directive, + start_mark, "did not find URI escaped octet") + } + + // Get the octet. + octet := byte((as_hex(parser.buffer, parser.buffer_pos+1) << 4) + as_hex(parser.buffer, parser.buffer_pos+2)) + + // If it is the leading octet, determine the length of the UTF-8 sequence. + if w == 1024 { + w = width(octet) + if w == 0 { + return yaml_parser_set_scanner_tag_error(parser, directive, + start_mark, "found an incorrect leading UTF-8 octet") + } + } else { + // Check if the trailing octet is correct. + if octet&0xC0 != 0x80 { + return yaml_parser_set_scanner_tag_error(parser, directive, + start_mark, "found an incorrect trailing UTF-8 octet") + } + } + + // Copy the octet and move the pointers. + *s = append(*s, octet) + skip(parser) + skip(parser) + skip(parser) + w-- + } + return true +} + +// Scan a block scalar. +func yaml_parser_scan_block_scalar(parser *yaml_parser_t, token *yaml_token_t, literal bool) bool { + // Eat the indicator '|' or '>'. + start_mark := parser.mark + skip(parser) + + // Scan the additional block scalar indicators. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + // Check for a chomping indicator. + var chomping, increment int + if parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '-' { + // Set the chomping method and eat the indicator. + if parser.buffer[parser.buffer_pos] == '+' { + chomping = +1 + } else { + chomping = -1 + } + skip(parser) + + // Check for an indentation indicator. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if is_digit(parser.buffer, parser.buffer_pos) { + // Check that the indentation is greater than 0. + if parser.buffer[parser.buffer_pos] == '0' { + yaml_parser_set_scanner_error(parser, "while scanning a block scalar", + start_mark, "found an indentation indicator equal to 0") + return false + } + + // Get the indentation level and eat the indicator. + increment = as_digit(parser.buffer, parser.buffer_pos) + skip(parser) + } + + } else if is_digit(parser.buffer, parser.buffer_pos) { + // Do the same as above, but in the opposite order. + + if parser.buffer[parser.buffer_pos] == '0' { + yaml_parser_set_scanner_error(parser, "while scanning a block scalar", + start_mark, "found an indentation indicator equal to 0") + return false + } + increment = as_digit(parser.buffer, parser.buffer_pos) + skip(parser) + + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '-' { + if parser.buffer[parser.buffer_pos] == '+' { + chomping = +1 + } else { + chomping = -1 + } + skip(parser) + } + } + + // Eat whitespaces and comments to the end of the line. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + for is_blank(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + if parser.buffer[parser.buffer_pos] == '#' { + for !is_breakz(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + } + + // Check if we are at the end of the line. + if !is_breakz(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a block scalar", + start_mark, "did not find expected comment or line break") + return false + } + + // Eat a line break. + if is_break(parser.buffer, parser.buffer_pos) { + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + skip_line(parser) + } + + end_mark := parser.mark + + // Set the indentation level if it was specified. + var indent int + if increment > 0 { + if parser.indent >= 0 { + indent = parser.indent + increment + } else { + indent = increment + } + } + + // Scan the leading line breaks and determine the indentation level if needed. + var s, leading_break, trailing_breaks []byte + if !yaml_parser_scan_block_scalar_breaks(parser, &indent, &trailing_breaks, start_mark, &end_mark) { + return false + } + + // Scan the block scalar content. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + var leading_blank, trailing_blank bool + for parser.mark.column == indent && !is_z(parser.buffer, parser.buffer_pos) { + // We are at the beginning of a non-empty line. + + // Is it a trailing whitespace? + trailing_blank = is_blank(parser.buffer, parser.buffer_pos) + + // Check if we need to fold the leading line break. + if !literal && !leading_blank && !trailing_blank && len(leading_break) > 0 && leading_break[0] == '\n' { + // Do we need to join the lines by space? + if len(trailing_breaks) == 0 { + s = append(s, ' ') + } + } else { + s = append(s, leading_break...) + } + leading_break = leading_break[:0] + + // Append the remaining line breaks. + s = append(s, trailing_breaks...) + trailing_breaks = trailing_breaks[:0] + + // Is it a leading whitespace? + leading_blank = is_blank(parser.buffer, parser.buffer_pos) + + // Consume the current line. + for !is_breakz(parser.buffer, parser.buffer_pos) { + s = read(parser, s) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Consume the line break. + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + + leading_break = read_line(parser, leading_break) + + // Eat the following indentation spaces and line breaks. + if !yaml_parser_scan_block_scalar_breaks(parser, &indent, &trailing_breaks, start_mark, &end_mark) { + return false + } + } + + // Chomp the tail. + if chomping != -1 { + s = append(s, leading_break...) + } + if chomping == 1 { + s = append(s, trailing_breaks...) + } + + // Create a token. + *token = yaml_token_t{ + typ: yaml_SCALAR_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + value: s, + style: yaml_LITERAL_SCALAR_STYLE, + } + if !literal { + token.style = yaml_FOLDED_SCALAR_STYLE + } + return true +} + +// Scan indentation spaces and line breaks for a block scalar. Determine the +// indentation level if needed. +func yaml_parser_scan_block_scalar_breaks(parser *yaml_parser_t, indent *int, breaks *[]byte, start_mark yaml_mark_t, end_mark *yaml_mark_t) bool { + *end_mark = parser.mark + + // Eat the indentation spaces and line breaks. + max_indent := 0 + for { + // Eat the indentation spaces. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + for (*indent == 0 || parser.mark.column < *indent) && is_space(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + if parser.mark.column > max_indent { + max_indent = parser.mark.column + } + + // Check for a tab character messing the indentation. + if (*indent == 0 || parser.mark.column < *indent) && is_tab(parser.buffer, parser.buffer_pos) { + return yaml_parser_set_scanner_error(parser, "while scanning a block scalar", + start_mark, "found a tab character where an indentation space is expected") + } + + // Have we found a non-empty line? + if !is_break(parser.buffer, parser.buffer_pos) { + break + } + + // Consume the line break. + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + // [Go] Should really be returning breaks instead. + *breaks = read_line(parser, *breaks) + *end_mark = parser.mark + } + + // Determine the indentation level if needed. + if *indent == 0 { + *indent = max_indent + if *indent < parser.indent+1 { + *indent = parser.indent + 1 + } + if *indent < 1 { + *indent = 1 + } + } + return true +} + +// Scan a quoted scalar. +func yaml_parser_scan_flow_scalar(parser *yaml_parser_t, token *yaml_token_t, single bool) bool { + // Eat the left quote. + start_mark := parser.mark + skip(parser) + + // Consume the content of the quoted scalar. + var s, leading_break, trailing_breaks, whitespaces []byte + for { + // Check that there are no document indicators at the beginning of the line. + if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { + return false + } + + if parser.mark.column == 0 && + ((parser.buffer[parser.buffer_pos+0] == '-' && + parser.buffer[parser.buffer_pos+1] == '-' && + parser.buffer[parser.buffer_pos+2] == '-') || + (parser.buffer[parser.buffer_pos+0] == '.' && + parser.buffer[parser.buffer_pos+1] == '.' && + parser.buffer[parser.buffer_pos+2] == '.')) && + is_blankz(parser.buffer, parser.buffer_pos+3) { + yaml_parser_set_scanner_error(parser, "while scanning a quoted scalar", + start_mark, "found unexpected document indicator") + return false + } + + // Check for EOF. + if is_z(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a quoted scalar", + start_mark, "found unexpected end of stream") + return false + } + + // Consume non-blank characters. + leading_blanks := false + for !is_blankz(parser.buffer, parser.buffer_pos) { + if single && parser.buffer[parser.buffer_pos] == '\'' && parser.buffer[parser.buffer_pos+1] == '\'' { + // Is is an escaped single quote. + s = append(s, '\'') + skip(parser) + skip(parser) + + } else if single && parser.buffer[parser.buffer_pos] == '\'' { + // It is a right single quote. + break + } else if !single && parser.buffer[parser.buffer_pos] == '"' { + // It is a right double quote. + break + + } else if !single && parser.buffer[parser.buffer_pos] == '\\' && is_break(parser.buffer, parser.buffer_pos+1) { + // It is an escaped line break. + if parser.unread < 3 && !yaml_parser_update_buffer(parser, 3) { + return false + } + skip(parser) + skip_line(parser) + leading_blanks = true + break + + } else if !single && parser.buffer[parser.buffer_pos] == '\\' { + // It is an escape sequence. + code_length := 0 + + // Check the escape character. + switch parser.buffer[parser.buffer_pos+1] { + case '0': + s = append(s, 0) + case 'a': + s = append(s, '\x07') + case 'b': + s = append(s, '\x08') + case 't', '\t': + s = append(s, '\x09') + case 'n': + s = append(s, '\x0A') + case 'v': + s = append(s, '\x0B') + case 'f': + s = append(s, '\x0C') + case 'r': + s = append(s, '\x0D') + case 'e': + s = append(s, '\x1B') + case ' ': + s = append(s, '\x20') + case '"': + s = append(s, '"') + case '\'': + s = append(s, '\'') + case '\\': + s = append(s, '\\') + case 'N': // NEL (#x85) + s = append(s, '\xC2') + s = append(s, '\x85') + case '_': // #xA0 + s = append(s, '\xC2') + s = append(s, '\xA0') + case 'L': // LS (#x2028) + s = append(s, '\xE2') + s = append(s, '\x80') + s = append(s, '\xA8') + case 'P': // PS (#x2029) + s = append(s, '\xE2') + s = append(s, '\x80') + s = append(s, '\xA9') + case 'x': + code_length = 2 + case 'u': + code_length = 4 + case 'U': + code_length = 8 + default: + yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", + start_mark, "found unknown escape character") + return false + } + + skip(parser) + skip(parser) + + // Consume an arbitrary escape code. + if code_length > 0 { + var value int + + // Scan the character value. + if parser.unread < code_length && !yaml_parser_update_buffer(parser, code_length) { + return false + } + for k := 0; k < code_length; k++ { + if !is_hex(parser.buffer, parser.buffer_pos+k) { + yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", + start_mark, "did not find expected hexdecimal number") + return false + } + value = (value << 4) + as_hex(parser.buffer, parser.buffer_pos+k) + } + + // Check the value and write the character. + if (value >= 0xD800 && value <= 0xDFFF) || value > 0x10FFFF { + yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", + start_mark, "found invalid Unicode character escape code") + return false + } + if value <= 0x7F { + s = append(s, byte(value)) + } else if value <= 0x7FF { + s = append(s, byte(0xC0+(value>>6))) + s = append(s, byte(0x80+(value&0x3F))) + } else if value <= 0xFFFF { + s = append(s, byte(0xE0+(value>>12))) + s = append(s, byte(0x80+((value>>6)&0x3F))) + s = append(s, byte(0x80+(value&0x3F))) + } else { + s = append(s, byte(0xF0+(value>>18))) + s = append(s, byte(0x80+((value>>12)&0x3F))) + s = append(s, byte(0x80+((value>>6)&0x3F))) + s = append(s, byte(0x80+(value&0x3F))) + } + + // Advance the pointer. + for k := 0; k < code_length; k++ { + skip(parser) + } + } + } else { + // It is a non-escaped non-blank character. + s = read(parser, s) + } + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + } + + // Check if we are at the end of the scalar. + if single { + if parser.buffer[parser.buffer_pos] == '\'' { + break + } + } else { + if parser.buffer[parser.buffer_pos] == '"' { + break + } + } + + // Consume blank characters. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + for is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos) { + if is_blank(parser.buffer, parser.buffer_pos) { + // Consume a space or a tab character. + if !leading_blanks { + whitespaces = read(parser, whitespaces) + } else { + skip(parser) + } + } else { + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + + // Check if it is a first line break. + if !leading_blanks { + whitespaces = whitespaces[:0] + leading_break = read_line(parser, leading_break) + leading_blanks = true + } else { + trailing_breaks = read_line(parser, trailing_breaks) + } + } + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Join the whitespaces or fold line breaks. + if leading_blanks { + // Do we need to fold line breaks? + if len(leading_break) > 0 && leading_break[0] == '\n' { + if len(trailing_breaks) == 0 { + s = append(s, ' ') + } else { + s = append(s, trailing_breaks...) + } + } else { + s = append(s, leading_break...) + s = append(s, trailing_breaks...) + } + trailing_breaks = trailing_breaks[:0] + leading_break = leading_break[:0] + } else { + s = append(s, whitespaces...) + whitespaces = whitespaces[:0] + } + } + + // Eat the right quote. + skip(parser) + end_mark := parser.mark + + // Create a token. + *token = yaml_token_t{ + typ: yaml_SCALAR_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + value: s, + style: yaml_SINGLE_QUOTED_SCALAR_STYLE, + } + if !single { + token.style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } + return true +} + +// Scan a plain scalar. +func yaml_parser_scan_plain_scalar(parser *yaml_parser_t, token *yaml_token_t) bool { + + var s, leading_break, trailing_breaks, whitespaces []byte + var leading_blanks bool + var indent = parser.indent + 1 + + start_mark := parser.mark + end_mark := parser.mark + + // Consume the content of the plain scalar. + for { + // Check for a document indicator. + if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { + return false + } + if parser.mark.column == 0 && + ((parser.buffer[parser.buffer_pos+0] == '-' && + parser.buffer[parser.buffer_pos+1] == '-' && + parser.buffer[parser.buffer_pos+2] == '-') || + (parser.buffer[parser.buffer_pos+0] == '.' && + parser.buffer[parser.buffer_pos+1] == '.' && + parser.buffer[parser.buffer_pos+2] == '.')) && + is_blankz(parser.buffer, parser.buffer_pos+3) { + break + } + + // Check for a comment. + if parser.buffer[parser.buffer_pos] == '#' { + break + } + + // Consume non-blank characters. + for !is_blankz(parser.buffer, parser.buffer_pos) { + + // Check for 'x:x' in the flow context. TODO: Fix the test "spec-08-13". + if parser.flow_level > 0 && + parser.buffer[parser.buffer_pos] == ':' && + !is_blankz(parser.buffer, parser.buffer_pos+1) { + yaml_parser_set_scanner_error(parser, "while scanning a plain scalar", + start_mark, "found unexpected ':'") + return false + } + + // Check for indicators that may end a plain scalar. + if (parser.buffer[parser.buffer_pos] == ':' && is_blankz(parser.buffer, parser.buffer_pos+1)) || + (parser.flow_level > 0 && + (parser.buffer[parser.buffer_pos] == ',' || parser.buffer[parser.buffer_pos] == ':' || + parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == '[' || + parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '{' || + parser.buffer[parser.buffer_pos] == '}')) { + break + } + + // Check if we need to join whitespaces and breaks. + if leading_blanks || len(whitespaces) > 0 { + if leading_blanks { + // Do we need to fold line breaks? + if leading_break[0] == '\n' { + if len(trailing_breaks) == 0 { + s = append(s, ' ') + } else { + s = append(s, trailing_breaks...) + } + } else { + s = append(s, leading_break...) + s = append(s, trailing_breaks...) + } + trailing_breaks = trailing_breaks[:0] + leading_break = leading_break[:0] + leading_blanks = false + } else { + s = append(s, whitespaces...) + whitespaces = whitespaces[:0] + } + } + + // Copy the character. + s = read(parser, s) + + end_mark = parser.mark + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + } + + // Is it the end? + if !(is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos)) { + break + } + + // Consume blank characters. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + for is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos) { + if is_blank(parser.buffer, parser.buffer_pos) { + + // Check for tab character that abuse indentation. + if leading_blanks && parser.mark.column < indent && is_tab(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a plain scalar", + start_mark, "found a tab character that violate indentation") + return false + } + + // Consume a space or a tab character. + if !leading_blanks { + whitespaces = read(parser, whitespaces) + } else { + skip(parser) + } + } else { + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + + // Check if it is a first line break. + if !leading_blanks { + whitespaces = whitespaces[:0] + leading_break = read_line(parser, leading_break) + leading_blanks = true + } else { + trailing_breaks = read_line(parser, trailing_breaks) + } + } + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Check indentation level. + if parser.flow_level == 0 && parser.mark.column < indent { + break + } + } + + // Create a token. + *token = yaml_token_t{ + typ: yaml_SCALAR_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + value: s, + style: yaml_PLAIN_SCALAR_STYLE, + } + + // Note that we change the 'simple_key_allowed' flag. + if leading_blanks { + parser.simple_key_allowed = true + } + return true +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/sorter.go b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/sorter.go new file mode 100644 index 0000000000000..5958822f9c6bb --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/sorter.go @@ -0,0 +1,104 @@ +package yaml + +import ( + "reflect" + "unicode" +) + +type keyList []reflect.Value + +func (l keyList) Len() int { return len(l) } +func (l keyList) Swap(i, j int) { l[i], l[j] = l[j], l[i] } +func (l keyList) Less(i, j int) bool { + a := l[i] + b := l[j] + ak := a.Kind() + bk := b.Kind() + for (ak == reflect.Interface || ak == reflect.Ptr) && !a.IsNil() { + a = a.Elem() + ak = a.Kind() + } + for (bk == reflect.Interface || bk == reflect.Ptr) && !b.IsNil() { + b = b.Elem() + bk = b.Kind() + } + af, aok := keyFloat(a) + bf, bok := keyFloat(b) + if aok && bok { + if af != bf { + return af < bf + } + if ak != bk { + return ak < bk + } + return numLess(a, b) + } + if ak != reflect.String || bk != reflect.String { + return ak < bk + } + ar, br := []rune(a.String()), []rune(b.String()) + for i := 0; i < len(ar) && i < len(br); i++ { + if ar[i] == br[i] { + continue + } + al := unicode.IsLetter(ar[i]) + bl := unicode.IsLetter(br[i]) + if al && bl { + return ar[i] < br[i] + } + if al || bl { + return bl + } + var ai, bi int + var an, bn int64 + for ai = i; ai < len(ar) && unicode.IsDigit(ar[ai]); ai++ { + an = an*10 + int64(ar[ai]-'0') + } + for bi = i; bi < len(br) && unicode.IsDigit(br[bi]); bi++ { + bn = bn*10 + int64(br[bi]-'0') + } + if an != bn { + return an < bn + } + if ai != bi { + return ai < bi + } + return ar[i] < br[i] + } + return len(ar) < len(br) +} + +// keyFloat returns a float value for v if it is a number/bool +// and whether it is a number/bool or not. +func keyFloat(v reflect.Value) (f float64, ok bool) { + switch v.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return float64(v.Int()), true + case reflect.Float32, reflect.Float64: + return v.Float(), true + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return float64(v.Uint()), true + case reflect.Bool: + if v.Bool() { + return 1, true + } + return 0, true + } + return 0, false +} + +// numLess returns whether a < b. +// a and b must necessarily have the same kind. +func numLess(a, b reflect.Value) bool { + switch a.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return a.Int() < b.Int() + case reflect.Float32, reflect.Float64: + return a.Float() < b.Float() + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return a.Uint() < b.Uint() + case reflect.Bool: + return !a.Bool() && b.Bool() + } + panic("not a number") +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/writerc.go b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/writerc.go new file mode 100644 index 0000000000000..190362f25dfb9 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/writerc.go @@ -0,0 +1,89 @@ +package yaml + +// Set the writer error and return false. +func yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem string) bool { + emitter.error = yaml_WRITER_ERROR + emitter.problem = problem + return false +} + +// Flush the output buffer. +func yaml_emitter_flush(emitter *yaml_emitter_t) bool { + if emitter.write_handler == nil { + panic("write handler not set") + } + + // Check if the buffer is empty. + if emitter.buffer_pos == 0 { + return true + } + + // If the output encoding is UTF-8, we don't need to recode the buffer. + if emitter.encoding == yaml_UTF8_ENCODING { + if err := emitter.write_handler(emitter, emitter.buffer[:emitter.buffer_pos]); err != nil { + return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error()) + } + emitter.buffer_pos = 0 + return true + } + + // Recode the buffer into the raw buffer. + var low, high int + if emitter.encoding == yaml_UTF16LE_ENCODING { + low, high = 0, 1 + } else { + high, low = 1, 0 + } + + pos := 0 + for pos < emitter.buffer_pos { + // See the "reader.c" code for more details on UTF-8 encoding. Note + // that we assume that the buffer contains a valid UTF-8 sequence. + + // Read the next UTF-8 character. + octet := emitter.buffer[pos] + + var w int + var value rune + switch { + case octet&0x80 == 0x00: + w, value = 1, rune(octet&0x7F) + case octet&0xE0 == 0xC0: + w, value = 2, rune(octet&0x1F) + case octet&0xF0 == 0xE0: + w, value = 3, rune(octet&0x0F) + case octet&0xF8 == 0xF0: + w, value = 4, rune(octet&0x07) + } + for k := 1; k < w; k++ { + octet = emitter.buffer[pos+k] + value = (value << 6) + (rune(octet) & 0x3F) + } + pos += w + + // Write the character. + if value < 0x10000 { + var b [2]byte + b[high] = byte(value >> 8) + b[low] = byte(value & 0xFF) + emitter.raw_buffer = append(emitter.raw_buffer, b[0], b[1]) + } else { + // Write the character using a surrogate pair (check "reader.c"). + var b [4]byte + value -= 0x10000 + b[high] = byte(0xD8 + (value >> 18)) + b[low] = byte((value >> 10) & 0xFF) + b[high+2] = byte(0xDC + ((value >> 8) & 0xFF)) + b[low+2] = byte(value & 0xFF) + emitter.raw_buffer = append(emitter.raw_buffer, b[0], b[1], b[2], b[3]) + } + } + + // Write the raw buffer. + if err := emitter.write_handler(emitter, emitter.raw_buffer); err != nil { + return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error()) + } + emitter.buffer_pos = 0 + emitter.raw_buffer = emitter.raw_buffer[:0] + return true +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/yaml.go b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/yaml.go new file mode 100644 index 0000000000000..d133edf9d34b7 --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/yaml.go @@ -0,0 +1,346 @@ +// Package yaml implements YAML support for the Go language. +// +// Source code and other details for the project are available at GitHub: +// +// https://github.com/go-yaml/yaml +// +package yaml + +import ( + "errors" + "fmt" + "reflect" + "strings" + "sync" +) + +// MapSlice encodes and decodes as a YAML map. +// The order of keys is preserved when encoding and decoding. +type MapSlice []MapItem + +// MapItem is an item in a MapSlice. +type MapItem struct { + Key, Value interface{} +} + +// The Unmarshaler interface may be implemented by types to customize their +// behavior when being unmarshaled from a YAML document. The UnmarshalYAML +// method receives a function that may be called to unmarshal the original +// YAML value into a field or variable. It is safe to call the unmarshal +// function parameter more than once if necessary. +type Unmarshaler interface { + UnmarshalYAML(unmarshal func(interface{}) error) error +} + +// The Marshaler interface may be implemented by types to customize their +// behavior when being marshaled into a YAML document. The returned value +// is marshaled in place of the original value implementing Marshaler. +// +// If an error is returned by MarshalYAML, the marshaling procedure stops +// and returns with the provided error. +type Marshaler interface { + MarshalYAML() (interface{}, error) +} + +// Unmarshal decodes the first document found within the in byte slice +// and assigns decoded values into the out value. +// +// Maps and pointers (to a struct, string, int, etc) are accepted as out +// values. If an internal pointer within a struct is not initialized, +// the yaml package will initialize it if necessary for unmarshalling +// the provided data. The out parameter must not be nil. +// +// The type of the decoded values should be compatible with the respective +// values in out. If one or more values cannot be decoded due to a type +// mismatches, decoding continues partially until the end of the YAML +// content, and a *yaml.TypeError is returned with details for all +// missed values. +// +// Struct fields are only unmarshalled if they are exported (have an +// upper case first letter), and are unmarshalled using the field name +// lowercased as the default key. Custom keys may be defined via the +// "yaml" name in the field tag: the content preceding the first comma +// is used as the key, and the following comma-separated options are +// used to tweak the marshalling process (see Marshal). +// Conflicting names result in a runtime error. +// +// For example: +// +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// var t T +// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) +// +// See the documentation of Marshal for the format of tags and a list of +// supported tag options. +// +func Unmarshal(in []byte, out interface{}) (err error) { + defer handleErr(&err) + d := newDecoder() + p := newParser(in) + defer p.destroy() + node := p.parse() + if node != nil { + v := reflect.ValueOf(out) + if v.Kind() == reflect.Ptr && !v.IsNil() { + v = v.Elem() + } + d.unmarshal(node, v) + } + if len(d.terrors) > 0 { + return &TypeError{d.terrors} + } + return nil +} + +// Marshal serializes the value provided into a YAML document. The structure +// of the generated document will reflect the structure of the value itself. +// Maps and pointers (to struct, string, int, etc) are accepted as the in value. +// +// Struct fields are only unmarshalled if they are exported (have an upper case +// first letter), and are unmarshalled using the field name lowercased as the +// default key. Custom keys may be defined via the "yaml" name in the field +// tag: the content preceding the first comma is used as the key, and the +// following comma-separated options are used to tweak the marshalling process. +// Conflicting names result in a runtime error. +// +// The field tag format accepted is: +// +// `(...) yaml:"[][,[,]]" (...)` +// +// The following flags are currently supported: +// +// omitempty Only include the field if it's not set to the zero +// value for the type or to empty slices or maps. +// Does not apply to zero valued structs. +// +// flow Marshal using a flow style (useful for structs, +// sequences and maps). +// +// inline Inline the field, which must be a struct or a map, +// causing all of its fields or keys to be processed as if +// they were part of the outer struct. For maps, keys must +// not conflict with the yaml keys of other struct fields. +// +// In addition, if the key is "-", the field is ignored. +// +// For example: +// +// type T struct { +// F int "a,omitempty" +// B int +// } +// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" +// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" +// +func Marshal(in interface{}) (out []byte, err error) { + defer handleErr(&err) + e := newEncoder() + defer e.destroy() + e.marshal("", reflect.ValueOf(in)) + e.finish() + out = e.out + return +} + +func handleErr(err *error) { + if v := recover(); v != nil { + if e, ok := v.(yamlError); ok { + *err = e.err + } else { + panic(v) + } + } +} + +type yamlError struct { + err error +} + +func fail(err error) { + panic(yamlError{err}) +} + +func failf(format string, args ...interface{}) { + panic(yamlError{fmt.Errorf("yaml: "+format, args...)}) +} + +// A TypeError is returned by Unmarshal when one or more fields in +// the YAML document cannot be properly decoded into the requested +// types. When this error is returned, the value is still +// unmarshaled partially. +type TypeError struct { + Errors []string +} + +func (e *TypeError) Error() string { + return fmt.Sprintf("yaml: unmarshal errors:\n %s", strings.Join(e.Errors, "\n ")) +} + +// -------------------------------------------------------------------------- +// Maintain a mapping of keys to structure field indexes + +// The code in this section was copied from mgo/bson. + +// structInfo holds details for the serialization of fields of +// a given struct. +type structInfo struct { + FieldsMap map[string]fieldInfo + FieldsList []fieldInfo + + // InlineMap is the number of the field in the struct that + // contains an ,inline map, or -1 if there's none. + InlineMap int +} + +type fieldInfo struct { + Key string + Num int + OmitEmpty bool + Flow bool + + // Inline holds the field index if the field is part of an inlined struct. + Inline []int +} + +var structMap = make(map[reflect.Type]*structInfo) +var fieldMapMutex sync.RWMutex + +func getStructInfo(st reflect.Type) (*structInfo, error) { + fieldMapMutex.RLock() + sinfo, found := structMap[st] + fieldMapMutex.RUnlock() + if found { + return sinfo, nil + } + + n := st.NumField() + fieldsMap := make(map[string]fieldInfo) + fieldsList := make([]fieldInfo, 0, n) + inlineMap := -1 + for i := 0; i != n; i++ { + field := st.Field(i) + if field.PkgPath != "" { + continue // Private field + } + + info := fieldInfo{Num: i} + + tag := field.Tag.Get("yaml") + if tag == "" && strings.Index(string(field.Tag), ":") < 0 { + tag = string(field.Tag) + } + if tag == "-" { + continue + } + + inline := false + fields := strings.Split(tag, ",") + if len(fields) > 1 { + for _, flag := range fields[1:] { + switch flag { + case "omitempty": + info.OmitEmpty = true + case "flow": + info.Flow = true + case "inline": + inline = true + default: + return nil, errors.New(fmt.Sprintf("Unsupported flag %q in tag %q of type %s", flag, tag, st)) + } + } + tag = fields[0] + } + + if inline { + switch field.Type.Kind() { + case reflect.Map: + if inlineMap >= 0 { + return nil, errors.New("Multiple ,inline maps in struct " + st.String()) + } + if field.Type.Key() != reflect.TypeOf("") { + return nil, errors.New("Option ,inline needs a map with string keys in struct " + st.String()) + } + inlineMap = info.Num + case reflect.Struct: + sinfo, err := getStructInfo(field.Type) + if err != nil { + return nil, err + } + for _, finfo := range sinfo.FieldsList { + if _, found := fieldsMap[finfo.Key]; found { + msg := "Duplicated key '" + finfo.Key + "' in struct " + st.String() + return nil, errors.New(msg) + } + if finfo.Inline == nil { + finfo.Inline = []int{i, finfo.Num} + } else { + finfo.Inline = append([]int{i}, finfo.Inline...) + } + fieldsMap[finfo.Key] = finfo + fieldsList = append(fieldsList, finfo) + } + default: + //return nil, errors.New("Option ,inline needs a struct value or map field") + return nil, errors.New("Option ,inline needs a struct value field") + } + continue + } + + if tag != "" { + info.Key = tag + } else { + info.Key = strings.ToLower(field.Name) + } + + if _, found = fieldsMap[info.Key]; found { + msg := "Duplicated key '" + info.Key + "' in struct " + st.String() + return nil, errors.New(msg) + } + + fieldsList = append(fieldsList, info) + fieldsMap[info.Key] = info + } + + sinfo = &structInfo{fieldsMap, fieldsList, inlineMap} + + fieldMapMutex.Lock() + structMap[st] = sinfo + fieldMapMutex.Unlock() + return sinfo, nil +} + +func isZero(v reflect.Value) bool { + switch v.Kind() { + case reflect.String: + return len(v.String()) == 0 + case reflect.Interface, reflect.Ptr: + return v.IsNil() + case reflect.Slice: + return v.Len() == 0 + case reflect.Map: + return v.Len() == 0 + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return v.Uint() == 0 + case reflect.Bool: + return !v.Bool() + case reflect.Struct: + vt := v.Type() + for i := v.NumField() - 1; i >= 0; i-- { + if vt.Field(i).PkgPath != "" { + continue // Private field + } + if !isZero(v.Field(i)) { + return false + } + } + return true + } + return false +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/yamlh.go b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/yamlh.go new file mode 100644 index 0000000000000..d60a6b6b0035b --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/yamlh.go @@ -0,0 +1,716 @@ +package yaml + +import ( + "io" +) + +// The version directive data. +type yaml_version_directive_t struct { + major int8 // The major version number. + minor int8 // The minor version number. +} + +// The tag directive data. +type yaml_tag_directive_t struct { + handle []byte // The tag handle. + prefix []byte // The tag prefix. +} + +type yaml_encoding_t int + +// The stream encoding. +const ( + // Let the parser choose the encoding. + yaml_ANY_ENCODING yaml_encoding_t = iota + + yaml_UTF8_ENCODING // The default UTF-8 encoding. + yaml_UTF16LE_ENCODING // The UTF-16-LE encoding with BOM. + yaml_UTF16BE_ENCODING // The UTF-16-BE encoding with BOM. +) + +type yaml_break_t int + +// Line break types. +const ( + // Let the parser choose the break type. + yaml_ANY_BREAK yaml_break_t = iota + + yaml_CR_BREAK // Use CR for line breaks (Mac style). + yaml_LN_BREAK // Use LN for line breaks (Unix style). + yaml_CRLN_BREAK // Use CR LN for line breaks (DOS style). +) + +type yaml_error_type_t int + +// Many bad things could happen with the parser and emitter. +const ( + // No error is produced. + yaml_NO_ERROR yaml_error_type_t = iota + + yaml_MEMORY_ERROR // Cannot allocate or reallocate a block of memory. + yaml_READER_ERROR // Cannot read or decode the input stream. + yaml_SCANNER_ERROR // Cannot scan the input stream. + yaml_PARSER_ERROR // Cannot parse the input stream. + yaml_COMPOSER_ERROR // Cannot compose a YAML document. + yaml_WRITER_ERROR // Cannot write to the output stream. + yaml_EMITTER_ERROR // Cannot emit a YAML stream. +) + +// The pointer position. +type yaml_mark_t struct { + index int // The position index. + line int // The position line. + column int // The position column. +} + +// Node Styles + +type yaml_style_t int8 + +type yaml_scalar_style_t yaml_style_t + +// Scalar styles. +const ( + // Let the emitter choose the style. + yaml_ANY_SCALAR_STYLE yaml_scalar_style_t = iota + + yaml_PLAIN_SCALAR_STYLE // The plain scalar style. + yaml_SINGLE_QUOTED_SCALAR_STYLE // The single-quoted scalar style. + yaml_DOUBLE_QUOTED_SCALAR_STYLE // The double-quoted scalar style. + yaml_LITERAL_SCALAR_STYLE // The literal scalar style. + yaml_FOLDED_SCALAR_STYLE // The folded scalar style. +) + +type yaml_sequence_style_t yaml_style_t + +// Sequence styles. +const ( + // Let the emitter choose the style. + yaml_ANY_SEQUENCE_STYLE yaml_sequence_style_t = iota + + yaml_BLOCK_SEQUENCE_STYLE // The block sequence style. + yaml_FLOW_SEQUENCE_STYLE // The flow sequence style. +) + +type yaml_mapping_style_t yaml_style_t + +// Mapping styles. +const ( + // Let the emitter choose the style. + yaml_ANY_MAPPING_STYLE yaml_mapping_style_t = iota + + yaml_BLOCK_MAPPING_STYLE // The block mapping style. + yaml_FLOW_MAPPING_STYLE // The flow mapping style. +) + +// Tokens + +type yaml_token_type_t int + +// Token types. +const ( + // An empty token. + yaml_NO_TOKEN yaml_token_type_t = iota + + yaml_STREAM_START_TOKEN // A STREAM-START token. + yaml_STREAM_END_TOKEN // A STREAM-END token. + + yaml_VERSION_DIRECTIVE_TOKEN // A VERSION-DIRECTIVE token. + yaml_TAG_DIRECTIVE_TOKEN // A TAG-DIRECTIVE token. + yaml_DOCUMENT_START_TOKEN // A DOCUMENT-START token. + yaml_DOCUMENT_END_TOKEN // A DOCUMENT-END token. + + yaml_BLOCK_SEQUENCE_START_TOKEN // A BLOCK-SEQUENCE-START token. + yaml_BLOCK_MAPPING_START_TOKEN // A BLOCK-SEQUENCE-END token. + yaml_BLOCK_END_TOKEN // A BLOCK-END token. + + yaml_FLOW_SEQUENCE_START_TOKEN // A FLOW-SEQUENCE-START token. + yaml_FLOW_SEQUENCE_END_TOKEN // A FLOW-SEQUENCE-END token. + yaml_FLOW_MAPPING_START_TOKEN // A FLOW-MAPPING-START token. + yaml_FLOW_MAPPING_END_TOKEN // A FLOW-MAPPING-END token. + + yaml_BLOCK_ENTRY_TOKEN // A BLOCK-ENTRY token. + yaml_FLOW_ENTRY_TOKEN // A FLOW-ENTRY token. + yaml_KEY_TOKEN // A KEY token. + yaml_VALUE_TOKEN // A VALUE token. + + yaml_ALIAS_TOKEN // An ALIAS token. + yaml_ANCHOR_TOKEN // An ANCHOR token. + yaml_TAG_TOKEN // A TAG token. + yaml_SCALAR_TOKEN // A SCALAR token. +) + +func (tt yaml_token_type_t) String() string { + switch tt { + case yaml_NO_TOKEN: + return "yaml_NO_TOKEN" + case yaml_STREAM_START_TOKEN: + return "yaml_STREAM_START_TOKEN" + case yaml_STREAM_END_TOKEN: + return "yaml_STREAM_END_TOKEN" + case yaml_VERSION_DIRECTIVE_TOKEN: + return "yaml_VERSION_DIRECTIVE_TOKEN" + case yaml_TAG_DIRECTIVE_TOKEN: + return "yaml_TAG_DIRECTIVE_TOKEN" + case yaml_DOCUMENT_START_TOKEN: + return "yaml_DOCUMENT_START_TOKEN" + case yaml_DOCUMENT_END_TOKEN: + return "yaml_DOCUMENT_END_TOKEN" + case yaml_BLOCK_SEQUENCE_START_TOKEN: + return "yaml_BLOCK_SEQUENCE_START_TOKEN" + case yaml_BLOCK_MAPPING_START_TOKEN: + return "yaml_BLOCK_MAPPING_START_TOKEN" + case yaml_BLOCK_END_TOKEN: + return "yaml_BLOCK_END_TOKEN" + case yaml_FLOW_SEQUENCE_START_TOKEN: + return "yaml_FLOW_SEQUENCE_START_TOKEN" + case yaml_FLOW_SEQUENCE_END_TOKEN: + return "yaml_FLOW_SEQUENCE_END_TOKEN" + case yaml_FLOW_MAPPING_START_TOKEN: + return "yaml_FLOW_MAPPING_START_TOKEN" + case yaml_FLOW_MAPPING_END_TOKEN: + return "yaml_FLOW_MAPPING_END_TOKEN" + case yaml_BLOCK_ENTRY_TOKEN: + return "yaml_BLOCK_ENTRY_TOKEN" + case yaml_FLOW_ENTRY_TOKEN: + return "yaml_FLOW_ENTRY_TOKEN" + case yaml_KEY_TOKEN: + return "yaml_KEY_TOKEN" + case yaml_VALUE_TOKEN: + return "yaml_VALUE_TOKEN" + case yaml_ALIAS_TOKEN: + return "yaml_ALIAS_TOKEN" + case yaml_ANCHOR_TOKEN: + return "yaml_ANCHOR_TOKEN" + case yaml_TAG_TOKEN: + return "yaml_TAG_TOKEN" + case yaml_SCALAR_TOKEN: + return "yaml_SCALAR_TOKEN" + } + return "" +} + +// The token structure. +type yaml_token_t struct { + // The token type. + typ yaml_token_type_t + + // The start/end of the token. + start_mark, end_mark yaml_mark_t + + // The stream encoding (for yaml_STREAM_START_TOKEN). + encoding yaml_encoding_t + + // The alias/anchor/scalar value or tag/tag directive handle + // (for yaml_ALIAS_TOKEN, yaml_ANCHOR_TOKEN, yaml_SCALAR_TOKEN, yaml_TAG_TOKEN, yaml_TAG_DIRECTIVE_TOKEN). + value []byte + + // The tag suffix (for yaml_TAG_TOKEN). + suffix []byte + + // The tag directive prefix (for yaml_TAG_DIRECTIVE_TOKEN). + prefix []byte + + // The scalar style (for yaml_SCALAR_TOKEN). + style yaml_scalar_style_t + + // The version directive major/minor (for yaml_VERSION_DIRECTIVE_TOKEN). + major, minor int8 +} + +// Events + +type yaml_event_type_t int8 + +// Event types. +const ( + // An empty event. + yaml_NO_EVENT yaml_event_type_t = iota + + yaml_STREAM_START_EVENT // A STREAM-START event. + yaml_STREAM_END_EVENT // A STREAM-END event. + yaml_DOCUMENT_START_EVENT // A DOCUMENT-START event. + yaml_DOCUMENT_END_EVENT // A DOCUMENT-END event. + yaml_ALIAS_EVENT // An ALIAS event. + yaml_SCALAR_EVENT // A SCALAR event. + yaml_SEQUENCE_START_EVENT // A SEQUENCE-START event. + yaml_SEQUENCE_END_EVENT // A SEQUENCE-END event. + yaml_MAPPING_START_EVENT // A MAPPING-START event. + yaml_MAPPING_END_EVENT // A MAPPING-END event. +) + +// The event structure. +type yaml_event_t struct { + + // The event type. + typ yaml_event_type_t + + // The start and end of the event. + start_mark, end_mark yaml_mark_t + + // The document encoding (for yaml_STREAM_START_EVENT). + encoding yaml_encoding_t + + // The version directive (for yaml_DOCUMENT_START_EVENT). + version_directive *yaml_version_directive_t + + // The list of tag directives (for yaml_DOCUMENT_START_EVENT). + tag_directives []yaml_tag_directive_t + + // The anchor (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT, yaml_ALIAS_EVENT). + anchor []byte + + // The tag (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT). + tag []byte + + // The scalar value (for yaml_SCALAR_EVENT). + value []byte + + // Is the document start/end indicator implicit, or the tag optional? + // (for yaml_DOCUMENT_START_EVENT, yaml_DOCUMENT_END_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT, yaml_SCALAR_EVENT). + implicit bool + + // Is the tag optional for any non-plain style? (for yaml_SCALAR_EVENT). + quoted_implicit bool + + // The style (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT). + style yaml_style_t +} + +func (e *yaml_event_t) scalar_style() yaml_scalar_style_t { return yaml_scalar_style_t(e.style) } +func (e *yaml_event_t) sequence_style() yaml_sequence_style_t { return yaml_sequence_style_t(e.style) } +func (e *yaml_event_t) mapping_style() yaml_mapping_style_t { return yaml_mapping_style_t(e.style) } + +// Nodes + +const ( + yaml_NULL_TAG = "tag:yaml.org,2002:null" // The tag !!null with the only possible value: null. + yaml_BOOL_TAG = "tag:yaml.org,2002:bool" // The tag !!bool with the values: true and false. + yaml_STR_TAG = "tag:yaml.org,2002:str" // The tag !!str for string values. + yaml_INT_TAG = "tag:yaml.org,2002:int" // The tag !!int for integer values. + yaml_FLOAT_TAG = "tag:yaml.org,2002:float" // The tag !!float for float values. + yaml_TIMESTAMP_TAG = "tag:yaml.org,2002:timestamp" // The tag !!timestamp for date and time values. + + yaml_SEQ_TAG = "tag:yaml.org,2002:seq" // The tag !!seq is used to denote sequences. + yaml_MAP_TAG = "tag:yaml.org,2002:map" // The tag !!map is used to denote mapping. + + // Not in original libyaml. + yaml_BINARY_TAG = "tag:yaml.org,2002:binary" + yaml_MERGE_TAG = "tag:yaml.org,2002:merge" + + yaml_DEFAULT_SCALAR_TAG = yaml_STR_TAG // The default scalar tag is !!str. + yaml_DEFAULT_SEQUENCE_TAG = yaml_SEQ_TAG // The default sequence tag is !!seq. + yaml_DEFAULT_MAPPING_TAG = yaml_MAP_TAG // The default mapping tag is !!map. +) + +type yaml_node_type_t int + +// Node types. +const ( + // An empty node. + yaml_NO_NODE yaml_node_type_t = iota + + yaml_SCALAR_NODE // A scalar node. + yaml_SEQUENCE_NODE // A sequence node. + yaml_MAPPING_NODE // A mapping node. +) + +// An element of a sequence node. +type yaml_node_item_t int + +// An element of a mapping node. +type yaml_node_pair_t struct { + key int // The key of the element. + value int // The value of the element. +} + +// The node structure. +type yaml_node_t struct { + typ yaml_node_type_t // The node type. + tag []byte // The node tag. + + // The node data. + + // The scalar parameters (for yaml_SCALAR_NODE). + scalar struct { + value []byte // The scalar value. + length int // The length of the scalar value. + style yaml_scalar_style_t // The scalar style. + } + + // The sequence parameters (for YAML_SEQUENCE_NODE). + sequence struct { + items_data []yaml_node_item_t // The stack of sequence items. + style yaml_sequence_style_t // The sequence style. + } + + // The mapping parameters (for yaml_MAPPING_NODE). + mapping struct { + pairs_data []yaml_node_pair_t // The stack of mapping pairs (key, value). + pairs_start *yaml_node_pair_t // The beginning of the stack. + pairs_end *yaml_node_pair_t // The end of the stack. + pairs_top *yaml_node_pair_t // The top of the stack. + style yaml_mapping_style_t // The mapping style. + } + + start_mark yaml_mark_t // The beginning of the node. + end_mark yaml_mark_t // The end of the node. + +} + +// The document structure. +type yaml_document_t struct { + + // The document nodes. + nodes []yaml_node_t + + // The version directive. + version_directive *yaml_version_directive_t + + // The list of tag directives. + tag_directives_data []yaml_tag_directive_t + tag_directives_start int // The beginning of the tag directives list. + tag_directives_end int // The end of the tag directives list. + + start_implicit int // Is the document start indicator implicit? + end_implicit int // Is the document end indicator implicit? + + // The start/end of the document. + start_mark, end_mark yaml_mark_t +} + +// The prototype of a read handler. +// +// The read handler is called when the parser needs to read more bytes from the +// source. The handler should write not more than size bytes to the buffer. +// The number of written bytes should be set to the size_read variable. +// +// [in,out] data A pointer to an application data specified by +// yaml_parser_set_input(). +// [out] buffer The buffer to write the data from the source. +// [in] size The size of the buffer. +// [out] size_read The actual number of bytes read from the source. +// +// On success, the handler should return 1. If the handler failed, +// the returned value should be 0. On EOF, the handler should set the +// size_read to 0 and return 1. +type yaml_read_handler_t func(parser *yaml_parser_t, buffer []byte) (n int, err error) + +// This structure holds information about a potential simple key. +type yaml_simple_key_t struct { + possible bool // Is a simple key possible? + required bool // Is a simple key required? + token_number int // The number of the token. + mark yaml_mark_t // The position mark. +} + +// The states of the parser. +type yaml_parser_state_t int + +const ( + yaml_PARSE_STREAM_START_STATE yaml_parser_state_t = iota + + yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE // Expect the beginning of an implicit document. + yaml_PARSE_DOCUMENT_START_STATE // Expect DOCUMENT-START. + yaml_PARSE_DOCUMENT_CONTENT_STATE // Expect the content of a document. + yaml_PARSE_DOCUMENT_END_STATE // Expect DOCUMENT-END. + yaml_PARSE_BLOCK_NODE_STATE // Expect a block node. + yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE // Expect a block node or indentless sequence. + yaml_PARSE_FLOW_NODE_STATE // Expect a flow node. + yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE // Expect the first entry of a block sequence. + yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE // Expect an entry of a block sequence. + yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE // Expect an entry of an indentless sequence. + yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE // Expect the first key of a block mapping. + yaml_PARSE_BLOCK_MAPPING_KEY_STATE // Expect a block mapping key. + yaml_PARSE_BLOCK_MAPPING_VALUE_STATE // Expect a block mapping value. + yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE // Expect the first entry of a flow sequence. + yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE // Expect an entry of a flow sequence. + yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE // Expect a key of an ordered mapping. + yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE // Expect a value of an ordered mapping. + yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE // Expect the and of an ordered mapping entry. + yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE // Expect the first key of a flow mapping. + yaml_PARSE_FLOW_MAPPING_KEY_STATE // Expect a key of a flow mapping. + yaml_PARSE_FLOW_MAPPING_VALUE_STATE // Expect a value of a flow mapping. + yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE // Expect an empty value of a flow mapping. + yaml_PARSE_END_STATE // Expect nothing. +) + +func (ps yaml_parser_state_t) String() string { + switch ps { + case yaml_PARSE_STREAM_START_STATE: + return "yaml_PARSE_STREAM_START_STATE" + case yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE: + return "yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE" + case yaml_PARSE_DOCUMENT_START_STATE: + return "yaml_PARSE_DOCUMENT_START_STATE" + case yaml_PARSE_DOCUMENT_CONTENT_STATE: + return "yaml_PARSE_DOCUMENT_CONTENT_STATE" + case yaml_PARSE_DOCUMENT_END_STATE: + return "yaml_PARSE_DOCUMENT_END_STATE" + case yaml_PARSE_BLOCK_NODE_STATE: + return "yaml_PARSE_BLOCK_NODE_STATE" + case yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE: + return "yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE" + case yaml_PARSE_FLOW_NODE_STATE: + return "yaml_PARSE_FLOW_NODE_STATE" + case yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE: + return "yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE" + case yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE: + return "yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE" + case yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE: + return "yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE" + case yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE: + return "yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE" + case yaml_PARSE_BLOCK_MAPPING_KEY_STATE: + return "yaml_PARSE_BLOCK_MAPPING_KEY_STATE" + case yaml_PARSE_BLOCK_MAPPING_VALUE_STATE: + return "yaml_PARSE_BLOCK_MAPPING_VALUE_STATE" + case yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE: + return "yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE" + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE: + return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE" + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE: + return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE" + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE: + return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE" + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE: + return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE" + case yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE: + return "yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE" + case yaml_PARSE_FLOW_MAPPING_KEY_STATE: + return "yaml_PARSE_FLOW_MAPPING_KEY_STATE" + case yaml_PARSE_FLOW_MAPPING_VALUE_STATE: + return "yaml_PARSE_FLOW_MAPPING_VALUE_STATE" + case yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE: + return "yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE" + case yaml_PARSE_END_STATE: + return "yaml_PARSE_END_STATE" + } + return "" +} + +// This structure holds aliases data. +type yaml_alias_data_t struct { + anchor []byte // The anchor. + index int // The node id. + mark yaml_mark_t // The anchor mark. +} + +// The parser structure. +// +// All members are internal. Manage the structure using the +// yaml_parser_ family of functions. +type yaml_parser_t struct { + + // Error handling + + error yaml_error_type_t // Error type. + + problem string // Error description. + + // The byte about which the problem occured. + problem_offset int + problem_value int + problem_mark yaml_mark_t + + // The error context. + context string + context_mark yaml_mark_t + + // Reader stuff + + read_handler yaml_read_handler_t // Read handler. + + input_file io.Reader // File input data. + input []byte // String input data. + input_pos int + + eof bool // EOF flag + + buffer []byte // The working buffer. + buffer_pos int // The current position of the buffer. + + unread int // The number of unread characters in the buffer. + + raw_buffer []byte // The raw buffer. + raw_buffer_pos int // The current position of the buffer. + + encoding yaml_encoding_t // The input encoding. + + offset int // The offset of the current position (in bytes). + mark yaml_mark_t // The mark of the current position. + + // Scanner stuff + + stream_start_produced bool // Have we started to scan the input stream? + stream_end_produced bool // Have we reached the end of the input stream? + + flow_level int // The number of unclosed '[' and '{' indicators. + + tokens []yaml_token_t // The tokens queue. + tokens_head int // The head of the tokens queue. + tokens_parsed int // The number of tokens fetched from the queue. + token_available bool // Does the tokens queue contain a token ready for dequeueing. + + indent int // The current indentation level. + indents []int // The indentation levels stack. + + simple_key_allowed bool // May a simple key occur at the current position? + simple_keys []yaml_simple_key_t // The stack of simple keys. + + // Parser stuff + + state yaml_parser_state_t // The current parser state. + states []yaml_parser_state_t // The parser states stack. + marks []yaml_mark_t // The stack of marks. + tag_directives []yaml_tag_directive_t // The list of TAG directives. + + // Dumper stuff + + aliases []yaml_alias_data_t // The alias data. + + document *yaml_document_t // The currently parsed document. +} + +// Emitter Definitions + +// The prototype of a write handler. +// +// The write handler is called when the emitter needs to flush the accumulated +// characters to the output. The handler should write @a size bytes of the +// @a buffer to the output. +// +// @param[in,out] data A pointer to an application data specified by +// yaml_emitter_set_output(). +// @param[in] buffer The buffer with bytes to be written. +// @param[in] size The size of the buffer. +// +// @returns On success, the handler should return @c 1. If the handler failed, +// the returned value should be @c 0. +// +type yaml_write_handler_t func(emitter *yaml_emitter_t, buffer []byte) error + +type yaml_emitter_state_t int + +// The emitter states. +const ( + // Expect STREAM-START. + yaml_EMIT_STREAM_START_STATE yaml_emitter_state_t = iota + + yaml_EMIT_FIRST_DOCUMENT_START_STATE // Expect the first DOCUMENT-START or STREAM-END. + yaml_EMIT_DOCUMENT_START_STATE // Expect DOCUMENT-START or STREAM-END. + yaml_EMIT_DOCUMENT_CONTENT_STATE // Expect the content of a document. + yaml_EMIT_DOCUMENT_END_STATE // Expect DOCUMENT-END. + yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE // Expect the first item of a flow sequence. + yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE // Expect an item of a flow sequence. + yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE // Expect the first key of a flow mapping. + yaml_EMIT_FLOW_MAPPING_KEY_STATE // Expect a key of a flow mapping. + yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE // Expect a value for a simple key of a flow mapping. + yaml_EMIT_FLOW_MAPPING_VALUE_STATE // Expect a value of a flow mapping. + yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE // Expect the first item of a block sequence. + yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE // Expect an item of a block sequence. + yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE // Expect the first key of a block mapping. + yaml_EMIT_BLOCK_MAPPING_KEY_STATE // Expect the key of a block mapping. + yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE // Expect a value for a simple key of a block mapping. + yaml_EMIT_BLOCK_MAPPING_VALUE_STATE // Expect a value of a block mapping. + yaml_EMIT_END_STATE // Expect nothing. +) + +// The emitter structure. +// +// All members are internal. Manage the structure using the @c yaml_emitter_ +// family of functions. +type yaml_emitter_t struct { + + // Error handling + + error yaml_error_type_t // Error type. + problem string // Error description. + + // Writer stuff + + write_handler yaml_write_handler_t // Write handler. + + output_buffer *[]byte // String output data. + output_file io.Writer // File output data. + + buffer []byte // The working buffer. + buffer_pos int // The current position of the buffer. + + raw_buffer []byte // The raw buffer. + raw_buffer_pos int // The current position of the buffer. + + encoding yaml_encoding_t // The stream encoding. + + // Emitter stuff + + canonical bool // If the output is in the canonical style? + best_indent int // The number of indentation spaces. + best_width int // The preferred width of the output lines. + unicode bool // Allow unescaped non-ASCII characters? + line_break yaml_break_t // The preferred line break. + + state yaml_emitter_state_t // The current emitter state. + states []yaml_emitter_state_t // The stack of states. + + events []yaml_event_t // The event queue. + events_head int // The head of the event queue. + + indents []int // The stack of indentation levels. + + tag_directives []yaml_tag_directive_t // The list of tag directives. + + indent int // The current indentation level. + + flow_level int // The current flow level. + + root_context bool // Is it the document root context? + sequence_context bool // Is it a sequence context? + mapping_context bool // Is it a mapping context? + simple_key_context bool // Is it a simple mapping key context? + + line int // The current line. + column int // The current column. + whitespace bool // If the last character was a whitespace? + indention bool // If the last character was an indentation character (' ', '-', '?', ':')? + open_ended bool // If an explicit document end is required? + + // Anchor analysis. + anchor_data struct { + anchor []byte // The anchor value. + alias bool // Is it an alias? + } + + // Tag analysis. + tag_data struct { + handle []byte // The tag handle. + suffix []byte // The tag suffix. + } + + // Scalar analysis. + scalar_data struct { + value []byte // The scalar value. + multiline bool // Does the scalar contain line breaks? + flow_plain_allowed bool // Can the scalar be expessed in the flow plain style? + block_plain_allowed bool // Can the scalar be expressed in the block plain style? + single_quoted_allowed bool // Can the scalar be expressed in the single quoted style? + block_allowed bool // Can the scalar be expressed in the literal or folded styles? + style yaml_scalar_style_t // The output style. + } + + // Dumper stuff + + opened bool // If the stream was already opened? + closed bool // If the stream was already closed? + + // The information associated with the document nodes. + anchors *struct { + references int // The number of references. + anchor int // The anchor id. + serialized bool // If the node has been emitted? + } + + last_anchor_id int // The last assigned anchor id. + + document *yaml_document_t // The currently emitted document. +} diff --git a/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/yamlprivateh.go b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/yamlprivateh.go new file mode 100644 index 0000000000000..8110ce3c37a6b --- /dev/null +++ b/staging/src/k8s.io/client-go/1.4/_vendor/gopkg.in/yaml.v2/yamlprivateh.go @@ -0,0 +1,173 @@ +package yaml + +const ( + // The size of the input raw buffer. + input_raw_buffer_size = 512 + + // The size of the input buffer. + // It should be possible to decode the whole raw buffer. + input_buffer_size = input_raw_buffer_size * 3 + + // The size of the output buffer. + output_buffer_size = 128 + + // The size of the output raw buffer. + // It should be possible to encode the whole output buffer. + output_raw_buffer_size = (output_buffer_size*2 + 2) + + // The size of other stacks and queues. + initial_stack_size = 16 + initial_queue_size = 16 + initial_string_size = 16 +) + +// Check if the character at the specified position is an alphabetical +// character, a digit, '_', or '-'. +func is_alpha(b []byte, i int) bool { + return b[i] >= '0' && b[i] <= '9' || b[i] >= 'A' && b[i] <= 'Z' || b[i] >= 'a' && b[i] <= 'z' || b[i] == '_' || b[i] == '-' +} + +// Check if the character at the specified position is a digit. +func is_digit(b []byte, i int) bool { + return b[i] >= '0' && b[i] <= '9' +} + +// Get the value of a digit. +func as_digit(b []byte, i int) int { + return int(b[i]) - '0' +} + +// Check if the character at the specified position is a hex-digit. +func is_hex(b []byte, i int) bool { + return b[i] >= '0' && b[i] <= '9' || b[i] >= 'A' && b[i] <= 'F' || b[i] >= 'a' && b[i] <= 'f' +} + +// Get the value of a hex-digit. +func as_hex(b []byte, i int) int { + bi := b[i] + if bi >= 'A' && bi <= 'F' { + return int(bi) - 'A' + 10 + } + if bi >= 'a' && bi <= 'f' { + return int(bi) - 'a' + 10 + } + return int(bi) - '0' +} + +// Check if the character is ASCII. +func is_ascii(b []byte, i int) bool { + return b[i] <= 0x7F +} + +// Check if the character at the start of the buffer can be printed unescaped. +func is_printable(b []byte, i int) bool { + return ((b[i] == 0x0A) || // . == #x0A + (b[i] >= 0x20 && b[i] <= 0x7E) || // #x20 <= . <= #x7E + (b[i] == 0xC2 && b[i+1] >= 0xA0) || // #0xA0 <= . <= #xD7FF + (b[i] > 0xC2 && b[i] < 0xED) || + (b[i] == 0xED && b[i+1] < 0xA0) || + (b[i] == 0xEE) || + (b[i] == 0xEF && // #xE000 <= . <= #xFFFD + !(b[i+1] == 0xBB && b[i+2] == 0xBF) && // && . != #xFEFF + !(b[i+1] == 0xBF && (b[i+2] == 0xBE || b[i+2] == 0xBF)))) +} + +// Check if the character at the specified position is NUL. +func is_z(b []byte, i int) bool { + return b[i] == 0x00 +} + +// Check if the beginning of the buffer is a BOM. +func is_bom(b []byte, i int) bool { + return b[0] == 0xEF && b[1] == 0xBB && b[2] == 0xBF +} + +// Check if the character at the specified position is space. +func is_space(b []byte, i int) bool { + return b[i] == ' ' +} + +// Check if the character at the specified position is tab. +func is_tab(b []byte, i int) bool { + return b[i] == '\t' +} + +// Check if the character at the specified position is blank (space or tab). +func is_blank(b []byte, i int) bool { + //return is_space(b, i) || is_tab(b, i) + return b[i] == ' ' || b[i] == '\t' +} + +// Check if the character at the specified position is a line break. +func is_break(b []byte, i int) bool { + return (b[i] == '\r' || // CR (#xD) + b[i] == '\n' || // LF (#xA) + b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9) // PS (#x2029) +} + +func is_crlf(b []byte, i int) bool { + return b[i] == '\r' && b[i+1] == '\n' +} + +// Check if the character is a line break or NUL. +func is_breakz(b []byte, i int) bool { + //return is_break(b, i) || is_z(b, i) + return ( // is_break: + b[i] == '\r' || // CR (#xD) + b[i] == '\n' || // LF (#xA) + b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) + // is_z: + b[i] == 0) +} + +// Check if the character is a line break, space, or NUL. +func is_spacez(b []byte, i int) bool { + //return is_space(b, i) || is_breakz(b, i) + return ( // is_space: + b[i] == ' ' || + // is_breakz: + b[i] == '\r' || // CR (#xD) + b[i] == '\n' || // LF (#xA) + b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) + b[i] == 0) +} + +// Check if the character is a line break, space, tab, or NUL. +func is_blankz(b []byte, i int) bool { + //return is_blank(b, i) || is_breakz(b, i) + return ( // is_blank: + b[i] == ' ' || b[i] == '\t' || + // is_breakz: + b[i] == '\r' || // CR (#xD) + b[i] == '\n' || // LF (#xA) + b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) + b[i] == 0) +} + +// Determine the width of the character. +func width(b byte) int { + // Don't replace these by a switch without first + // confirming that it is being inlined. + if b&0x80 == 0x00 { + return 1 + } + if b&0xE0 == 0xC0 { + return 2 + } + if b&0xF0 == 0xE0 { + return 3 + } + if b&0xF8 == 0xF0 { + return 4 + } + return 0 + +} diff --git a/staging/src/k8s.io/client-go/1.4/discovery/client_test.go b/staging/src/k8s.io/client-go/1.4/discovery/client_test.go index c5b7780a57a91..c898b2e4ee734 100644 --- a/staging/src/k8s.io/client-go/1.4/discovery/client_test.go +++ b/staging/src/k8s.io/client-go/1.4/discovery/client_test.go @@ -154,17 +154,17 @@ func TestGetServerResources(t *testing.T) { stable := unversioned.APIResourceList{ GroupVersion: "v1", APIResources: []unversioned.APIResource{ - {"pods", true, "Pod"}, - {"services", true, "Service"}, - {"namespaces", false, "Namespace"}, + {Name: "pods", Namespaced: true, Kind: "Pod"}, + {Name: "services", Namespaced: true, Kind: "Service"}, + {Name: "namespaces", Namespaced: false, Kind: "Namespace"}, }, } beta := unversioned.APIResourceList{ GroupVersion: "extensions/v1", APIResources: []unversioned.APIResource{ - {"deployments", true, "Deployment"}, - {"ingresses", true, "Ingress"}, - {"jobs", true, "Job"}, + {Name: "deployments", Namespaced: true, Kind: "Deployment"}, + {Name: "ingresses", Namespaced: true, Kind: "Ingress"}, + {Name: "jobs", Namespaced: true, Kind: "Job"}, }, } tests := []struct { diff --git a/staging/src/k8s.io/client-go/1.4/pkg/api/mapper.go b/staging/src/k8s.io/client-go/1.4/pkg/api/mapper.go index bc994387621eb..96c4ac4dc2773 100644 --- a/staging/src/k8s.io/client-go/1.4/pkg/api/mapper.go +++ b/staging/src/k8s.io/client-go/1.4/pkg/api/mapper.go @@ -21,6 +21,7 @@ import ( "k8s.io/client-go/1.4/pkg/api/meta" "k8s.io/client-go/1.4/pkg/api/unversioned" + "k8s.io/client-go/1.4/pkg/runtime" "k8s.io/client-go/1.4/pkg/util/sets" ) @@ -34,14 +35,21 @@ func RegisterRESTMapper(m meta.RESTMapper) { RESTMapper = append(RESTMapper.(meta.MultiRESTMapper), m) } +// Instantiates a DefaultRESTMapper based on types registered in api.Scheme func NewDefaultRESTMapper(defaultGroupVersions []unversioned.GroupVersion, interfacesFunc meta.VersionInterfacesFunc, importPathPrefix string, ignoredKinds, rootScoped sets.String) *meta.DefaultRESTMapper { + return NewDefaultRESTMapperFromScheme(defaultGroupVersions, interfacesFunc, importPathPrefix, ignoredKinds, rootScoped, Scheme) +} + +// Instantiates a DefaultRESTMapper based on types registered in the given scheme. +func NewDefaultRESTMapperFromScheme(defaultGroupVersions []unversioned.GroupVersion, interfacesFunc meta.VersionInterfacesFunc, + importPathPrefix string, ignoredKinds, rootScoped sets.String, scheme *runtime.Scheme) *meta.DefaultRESTMapper { mapper := meta.NewDefaultRESTMapper(defaultGroupVersions, interfacesFunc) // enumerate all supported versions, get the kinds, and register with the mapper how to address // our resources. for _, gv := range defaultGroupVersions { - for kind, oType := range Scheme.KnownTypes(gv) { + for kind, oType := range scheme.KnownTypes(gv) { gvk := gv.WithKind(kind) // TODO: Remove import path check. // We check the import path because we currently stuff both "api" and "extensions" objects diff --git a/staging/src/k8s.io/client-go/1.4/pkg/api/types.generated.go b/staging/src/k8s.io/client-go/1.4/pkg/api/types.generated.go index ce1a66446b41b..c942b9f067afb 100644 --- a/staging/src/k8s.io/client-go/1.4/pkg/api/types.generated.go +++ b/staging/src/k8s.io/client-go/1.4/pkg/api/types.generated.go @@ -34519,13 +34519,14 @@ func (x *EndpointAddress) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2661 := !z.EncBinary() yy2arr2661 := z.EncBasicHandle().StructToArray - var yyq2661 [3]bool + var yyq2661 [4]bool _, _, _ = yysep2661, yyq2661, yy2arr2661 const yyr2661 bool = false yyq2661[1] = x.Hostname != "" + yyq2661[2] = x.NodeName != nil var yynn2661 int if yyr2661 || yy2arr2661 { - r.EncodeArrayStart(3) + r.EncodeArrayStart(4) } else { yynn2661 = 2 for _, b := range yyq2661 { @@ -34580,6 +34581,41 @@ func (x *EndpointAddress) CodecEncodeSelf(e *codec1978.Encoder) { } } } + if yyr2661 || yy2arr2661 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2661[2] { + if x.NodeName == nil { + r.EncodeNil() + } else { + yy2669 := *x.NodeName + yym2670 := z.EncBinary() + _ = yym2670 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(yy2669)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2661[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("nodeName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.NodeName == nil { + r.EncodeNil() + } else { + yy2671 := *x.NodeName + yym2672 := z.EncBinary() + _ = yym2672 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(yy2671)) + } + } + } + } if yyr2661 || yy2arr2661 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.TargetRef == nil { @@ -34610,25 +34646,25 @@ func (x *EndpointAddress) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2669 := z.DecBinary() - _ = yym2669 + yym2674 := z.DecBinary() + _ = yym2674 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2670 := r.ContainerType() - if yyct2670 == codecSelferValueTypeMap1234 { - yyl2670 := r.ReadMapStart() - if yyl2670 == 0 { + yyct2675 := r.ContainerType() + if yyct2675 == codecSelferValueTypeMap1234 { + yyl2675 := r.ReadMapStart() + if yyl2675 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2670, d) + x.codecDecodeSelfFromMap(yyl2675, d) } - } else if yyct2670 == codecSelferValueTypeArray1234 { - yyl2670 := r.ReadArrayStart() - if yyl2670 == 0 { + } else if yyct2675 == codecSelferValueTypeArray1234 { + yyl2675 := r.ReadArrayStart() + if yyl2675 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2670, d) + x.codecDecodeSelfFromArray(yyl2675, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -34640,12 +34676,12 @@ func (x *EndpointAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2671Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2671Slc - var yyhl2671 bool = l >= 0 - for yyj2671 := 0; ; yyj2671++ { - if yyhl2671 { - if yyj2671 >= l { + var yys2676Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2676Slc + var yyhl2676 bool = l >= 0 + for yyj2676 := 0; ; yyj2676++ { + if yyhl2676 { + if yyj2676 >= l { break } } else { @@ -34654,10 +34690,10 @@ func (x *EndpointAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2671Slc = r.DecodeBytes(yys2671Slc, true, true) - yys2671 := string(yys2671Slc) + yys2676Slc = r.DecodeBytes(yys2676Slc, true, true) + yys2676 := string(yys2676Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2671 { + switch yys2676 { case "IP": if r.TryDecodeAsNil() { x.IP = "" @@ -34670,6 +34706,22 @@ func (x *EndpointAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } else { x.Hostname = string(r.DecodeString()) } + case "nodeName": + if r.TryDecodeAsNil() { + if x.NodeName != nil { + x.NodeName = nil + } + } else { + if x.NodeName == nil { + x.NodeName = new(string) + } + yym2680 := z.DecBinary() + _ = yym2680 + if false { + } else { + *((*string)(x.NodeName)) = r.DecodeString() + } + } case "TargetRef": if r.TryDecodeAsNil() { if x.TargetRef != nil { @@ -34682,9 +34734,9 @@ func (x *EndpointAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.TargetRef.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2671) - } // end switch yys2671 - } // end for yyj2671 + z.DecStructFieldNotFound(-1, yys2676) + } // end switch yys2676 + } // end for yyj2676 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -34692,16 +34744,16 @@ func (x *EndpointAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2675 int - var yyb2675 bool - var yyhl2675 bool = l >= 0 - yyj2675++ - if yyhl2675 { - yyb2675 = yyj2675 > l + var yyj2682 int + var yyb2682 bool + var yyhl2682 bool = l >= 0 + yyj2682++ + if yyhl2682 { + yyb2682 = yyj2682 > l } else { - yyb2675 = r.CheckBreak() + yyb2682 = r.CheckBreak() } - if yyb2675 { + if yyb2682 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34711,13 +34763,13 @@ func (x *EndpointAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.IP = string(r.DecodeString()) } - yyj2675++ - if yyhl2675 { - yyb2675 = yyj2675 > l + yyj2682++ + if yyhl2682 { + yyb2682 = yyj2682 > l } else { - yyb2675 = r.CheckBreak() + yyb2682 = r.CheckBreak() } - if yyb2675 { + if yyb2682 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34727,13 +34779,39 @@ func (x *EndpointAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Hostname = string(r.DecodeString()) } - yyj2675++ - if yyhl2675 { - yyb2675 = yyj2675 > l + yyj2682++ + if yyhl2682 { + yyb2682 = yyj2682 > l + } else { + yyb2682 = r.CheckBreak() + } + if yyb2682 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.NodeName != nil { + x.NodeName = nil + } + } else { + if x.NodeName == nil { + x.NodeName = new(string) + } + yym2686 := z.DecBinary() + _ = yym2686 + if false { + } else { + *((*string)(x.NodeName)) = r.DecodeString() + } + } + yyj2682++ + if yyhl2682 { + yyb2682 = yyj2682 > l } else { - yyb2675 = r.CheckBreak() + yyb2682 = r.CheckBreak() } - if yyb2675 { + if yyb2682 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34749,17 +34827,17 @@ func (x *EndpointAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) x.TargetRef.CodecDecodeSelf(d) } for { - yyj2675++ - if yyhl2675 { - yyb2675 = yyj2675 > l + yyj2682++ + if yyhl2682 { + yyb2682 = yyj2682 > l } else { - yyb2675 = r.CheckBreak() + yyb2682 = r.CheckBreak() } - if yyb2675 { + if yyb2682 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2675-1, "") + z.DecStructFieldNotFound(yyj2682-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -34771,33 +34849,33 @@ func (x *EndpointPort) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2679 := z.EncBinary() - _ = yym2679 + yym2688 := z.EncBinary() + _ = yym2688 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2680 := !z.EncBinary() - yy2arr2680 := z.EncBasicHandle().StructToArray - var yyq2680 [3]bool - _, _, _ = yysep2680, yyq2680, yy2arr2680 - const yyr2680 bool = false - var yynn2680 int - if yyr2680 || yy2arr2680 { + yysep2689 := !z.EncBinary() + yy2arr2689 := z.EncBasicHandle().StructToArray + var yyq2689 [3]bool + _, _, _ = yysep2689, yyq2689, yy2arr2689 + const yyr2689 bool = false + var yynn2689 int + if yyr2689 || yy2arr2689 { r.EncodeArrayStart(3) } else { - yynn2680 = 3 - for _, b := range yyq2680 { + yynn2689 = 3 + for _, b := range yyq2689 { if b { - yynn2680++ + yynn2689++ } } - r.EncodeMapStart(yynn2680) - yynn2680 = 0 + r.EncodeMapStart(yynn2689) + yynn2689 = 0 } - if yyr2680 || yy2arr2680 { + if yyr2689 || yy2arr2689 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2682 := z.EncBinary() - _ = yym2682 + yym2691 := z.EncBinary() + _ = yym2691 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -34806,17 +34884,17 @@ func (x *EndpointPort) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2683 := z.EncBinary() - _ = yym2683 + yym2692 := z.EncBinary() + _ = yym2692 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } - if yyr2680 || yy2arr2680 { + if yyr2689 || yy2arr2689 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2685 := z.EncBinary() - _ = yym2685 + yym2694 := z.EncBinary() + _ = yym2694 if false { } else { r.EncodeInt(int64(x.Port)) @@ -34825,14 +34903,14 @@ func (x *EndpointPort) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Port")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2686 := z.EncBinary() - _ = yym2686 + yym2695 := z.EncBinary() + _ = yym2695 if false { } else { r.EncodeInt(int64(x.Port)) } } - if yyr2680 || yy2arr2680 { + if yyr2689 || yy2arr2689 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Protocol.CodecEncodeSelf(e) } else { @@ -34841,7 +34919,7 @@ func (x *EndpointPort) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Protocol.CodecEncodeSelf(e) } - if yyr2680 || yy2arr2680 { + if yyr2689 || yy2arr2689 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -34854,25 +34932,25 @@ func (x *EndpointPort) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2688 := z.DecBinary() - _ = yym2688 + yym2697 := z.DecBinary() + _ = yym2697 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2689 := r.ContainerType() - if yyct2689 == codecSelferValueTypeMap1234 { - yyl2689 := r.ReadMapStart() - if yyl2689 == 0 { + yyct2698 := r.ContainerType() + if yyct2698 == codecSelferValueTypeMap1234 { + yyl2698 := r.ReadMapStart() + if yyl2698 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2689, d) + x.codecDecodeSelfFromMap(yyl2698, d) } - } else if yyct2689 == codecSelferValueTypeArray1234 { - yyl2689 := r.ReadArrayStart() - if yyl2689 == 0 { + } else if yyct2698 == codecSelferValueTypeArray1234 { + yyl2698 := r.ReadArrayStart() + if yyl2698 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2689, d) + x.codecDecodeSelfFromArray(yyl2698, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -34884,12 +34962,12 @@ func (x *EndpointPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2690Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2690Slc - var yyhl2690 bool = l >= 0 - for yyj2690 := 0; ; yyj2690++ { - if yyhl2690 { - if yyj2690 >= l { + var yys2699Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2699Slc + var yyhl2699 bool = l >= 0 + for yyj2699 := 0; ; yyj2699++ { + if yyhl2699 { + if yyj2699 >= l { break } } else { @@ -34898,10 +34976,10 @@ func (x *EndpointPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2690Slc = r.DecodeBytes(yys2690Slc, true, true) - yys2690 := string(yys2690Slc) + yys2699Slc = r.DecodeBytes(yys2699Slc, true, true) + yys2699 := string(yys2699Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2690 { + switch yys2699 { case "Name": if r.TryDecodeAsNil() { x.Name = "" @@ -34921,9 +34999,9 @@ func (x *EndpointPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Protocol = Protocol(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys2690) - } // end switch yys2690 - } // end for yyj2690 + z.DecStructFieldNotFound(-1, yys2699) + } // end switch yys2699 + } // end for yyj2699 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -34931,16 +35009,16 @@ func (x *EndpointPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2694 int - var yyb2694 bool - var yyhl2694 bool = l >= 0 - yyj2694++ - if yyhl2694 { - yyb2694 = yyj2694 > l + var yyj2703 int + var yyb2703 bool + var yyhl2703 bool = l >= 0 + yyj2703++ + if yyhl2703 { + yyb2703 = yyj2703 > l } else { - yyb2694 = r.CheckBreak() + yyb2703 = r.CheckBreak() } - if yyb2694 { + if yyb2703 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34950,13 +35028,13 @@ func (x *EndpointPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Name = string(r.DecodeString()) } - yyj2694++ - if yyhl2694 { - yyb2694 = yyj2694 > l + yyj2703++ + if yyhl2703 { + yyb2703 = yyj2703 > l } else { - yyb2694 = r.CheckBreak() + yyb2703 = r.CheckBreak() } - if yyb2694 { + if yyb2703 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34966,13 +35044,13 @@ func (x *EndpointPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Port = int32(r.DecodeInt(32)) } - yyj2694++ - if yyhl2694 { - yyb2694 = yyj2694 > l + yyj2703++ + if yyhl2703 { + yyb2703 = yyj2703 > l } else { - yyb2694 = r.CheckBreak() + yyb2703 = r.CheckBreak() } - if yyb2694 { + if yyb2703 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34983,17 +35061,17 @@ func (x *EndpointPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Protocol = Protocol(r.DecodeString()) } for { - yyj2694++ - if yyhl2694 { - yyb2694 = yyj2694 > l + yyj2703++ + if yyhl2703 { + yyb2703 = yyj2703 > l } else { - yyb2694 = r.CheckBreak() + yyb2703 = r.CheckBreak() } - if yyb2694 { + if yyb2703 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2694-1, "") + z.DecStructFieldNotFound(yyj2703-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -35005,37 +35083,37 @@ func (x *EndpointsList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2698 := z.EncBinary() - _ = yym2698 + yym2707 := z.EncBinary() + _ = yym2707 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2699 := !z.EncBinary() - yy2arr2699 := z.EncBasicHandle().StructToArray - var yyq2699 [4]bool - _, _, _ = yysep2699, yyq2699, yy2arr2699 - const yyr2699 bool = false - yyq2699[0] = x.Kind != "" - yyq2699[1] = x.APIVersion != "" - yyq2699[2] = true - var yynn2699 int - if yyr2699 || yy2arr2699 { + yysep2708 := !z.EncBinary() + yy2arr2708 := z.EncBasicHandle().StructToArray + var yyq2708 [4]bool + _, _, _ = yysep2708, yyq2708, yy2arr2708 + const yyr2708 bool = false + yyq2708[0] = x.Kind != "" + yyq2708[1] = x.APIVersion != "" + yyq2708[2] = true + var yynn2708 int + if yyr2708 || yy2arr2708 { r.EncodeArrayStart(4) } else { - yynn2699 = 1 - for _, b := range yyq2699 { + yynn2708 = 1 + for _, b := range yyq2708 { if b { - yynn2699++ + yynn2708++ } } - r.EncodeMapStart(yynn2699) - yynn2699 = 0 + r.EncodeMapStart(yynn2708) + yynn2708 = 0 } - if yyr2699 || yy2arr2699 { + if yyr2708 || yy2arr2708 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2699[0] { - yym2701 := z.EncBinary() - _ = yym2701 + if yyq2708[0] { + yym2710 := z.EncBinary() + _ = yym2710 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -35044,23 +35122,23 @@ func (x *EndpointsList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2699[0] { + if yyq2708[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2702 := z.EncBinary() - _ = yym2702 + yym2711 := z.EncBinary() + _ = yym2711 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2699 || yy2arr2699 { + if yyr2708 || yy2arr2708 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2699[1] { - yym2704 := z.EncBinary() - _ = yym2704 + if yyq2708[1] { + yym2713 := z.EncBinary() + _ = yym2713 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -35069,54 +35147,54 @@ func (x *EndpointsList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2699[1] { + if yyq2708[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2705 := z.EncBinary() - _ = yym2705 + yym2714 := z.EncBinary() + _ = yym2714 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2699 || yy2arr2699 { + if yyr2708 || yy2arr2708 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2699[2] { - yy2707 := &x.ListMeta - yym2708 := z.EncBinary() - _ = yym2708 + if yyq2708[2] { + yy2716 := &x.ListMeta + yym2717 := z.EncBinary() + _ = yym2717 if false { - } else if z.HasExtensions() && z.EncExt(yy2707) { + } else if z.HasExtensions() && z.EncExt(yy2716) { } else { - z.EncFallback(yy2707) + z.EncFallback(yy2716) } } else { r.EncodeNil() } } else { - if yyq2699[2] { + if yyq2708[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2709 := &x.ListMeta - yym2710 := z.EncBinary() - _ = yym2710 + yy2718 := &x.ListMeta + yym2719 := z.EncBinary() + _ = yym2719 if false { - } else if z.HasExtensions() && z.EncExt(yy2709) { + } else if z.HasExtensions() && z.EncExt(yy2718) { } else { - z.EncFallback(yy2709) + z.EncFallback(yy2718) } } } - if yyr2699 || yy2arr2699 { + if yyr2708 || yy2arr2708 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym2712 := z.EncBinary() - _ = yym2712 + yym2721 := z.EncBinary() + _ = yym2721 if false { } else { h.encSliceEndpoints(([]Endpoints)(x.Items), e) @@ -35129,15 +35207,15 @@ func (x *EndpointsList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym2713 := z.EncBinary() - _ = yym2713 + yym2722 := z.EncBinary() + _ = yym2722 if false { } else { h.encSliceEndpoints(([]Endpoints)(x.Items), e) } } } - if yyr2699 || yy2arr2699 { + if yyr2708 || yy2arr2708 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -35150,25 +35228,25 @@ func (x *EndpointsList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2714 := z.DecBinary() - _ = yym2714 + yym2723 := z.DecBinary() + _ = yym2723 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2715 := r.ContainerType() - if yyct2715 == codecSelferValueTypeMap1234 { - yyl2715 := r.ReadMapStart() - if yyl2715 == 0 { + yyct2724 := r.ContainerType() + if yyct2724 == codecSelferValueTypeMap1234 { + yyl2724 := r.ReadMapStart() + if yyl2724 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2715, d) + x.codecDecodeSelfFromMap(yyl2724, d) } - } else if yyct2715 == codecSelferValueTypeArray1234 { - yyl2715 := r.ReadArrayStart() - if yyl2715 == 0 { + } else if yyct2724 == codecSelferValueTypeArray1234 { + yyl2724 := r.ReadArrayStart() + if yyl2724 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2715, d) + x.codecDecodeSelfFromArray(yyl2724, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -35180,12 +35258,12 @@ func (x *EndpointsList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2716Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2716Slc - var yyhl2716 bool = l >= 0 - for yyj2716 := 0; ; yyj2716++ { - if yyhl2716 { - if yyj2716 >= l { + var yys2725Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2725Slc + var yyhl2725 bool = l >= 0 + for yyj2725 := 0; ; yyj2725++ { + if yyhl2725 { + if yyj2725 >= l { break } } else { @@ -35194,10 +35272,10 @@ func (x *EndpointsList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2716Slc = r.DecodeBytes(yys2716Slc, true, true) - yys2716 := string(yys2716Slc) + yys2725Slc = r.DecodeBytes(yys2725Slc, true, true) + yys2725 := string(yys2725Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2716 { + switch yys2725 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -35214,31 +35292,31 @@ func (x *EndpointsList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv2719 := &x.ListMeta - yym2720 := z.DecBinary() - _ = yym2720 + yyv2728 := &x.ListMeta + yym2729 := z.DecBinary() + _ = yym2729 if false { - } else if z.HasExtensions() && z.DecExt(yyv2719) { + } else if z.HasExtensions() && z.DecExt(yyv2728) { } else { - z.DecFallback(yyv2719, false) + z.DecFallback(yyv2728, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2721 := &x.Items - yym2722 := z.DecBinary() - _ = yym2722 + yyv2730 := &x.Items + yym2731 := z.DecBinary() + _ = yym2731 if false { } else { - h.decSliceEndpoints((*[]Endpoints)(yyv2721), d) + h.decSliceEndpoints((*[]Endpoints)(yyv2730), d) } } default: - z.DecStructFieldNotFound(-1, yys2716) - } // end switch yys2716 - } // end for yyj2716 + z.DecStructFieldNotFound(-1, yys2725) + } // end switch yys2725 + } // end for yyj2725 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -35246,16 +35324,16 @@ func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2723 int - var yyb2723 bool - var yyhl2723 bool = l >= 0 - yyj2723++ - if yyhl2723 { - yyb2723 = yyj2723 > l + var yyj2732 int + var yyb2732 bool + var yyhl2732 bool = l >= 0 + yyj2732++ + if yyhl2732 { + yyb2732 = yyj2732 > l } else { - yyb2723 = r.CheckBreak() + yyb2732 = r.CheckBreak() } - if yyb2723 { + if yyb2732 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35265,13 +35343,13 @@ func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2723++ - if yyhl2723 { - yyb2723 = yyj2723 > l + yyj2732++ + if yyhl2732 { + yyb2732 = yyj2732 > l } else { - yyb2723 = r.CheckBreak() + yyb2732 = r.CheckBreak() } - if yyb2723 { + if yyb2732 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35281,13 +35359,13 @@ func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2723++ - if yyhl2723 { - yyb2723 = yyj2723 > l + yyj2732++ + if yyhl2732 { + yyb2732 = yyj2732 > l } else { - yyb2723 = r.CheckBreak() + yyb2732 = r.CheckBreak() } - if yyb2723 { + if yyb2732 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35295,22 +35373,22 @@ func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv2726 := &x.ListMeta - yym2727 := z.DecBinary() - _ = yym2727 + yyv2735 := &x.ListMeta + yym2736 := z.DecBinary() + _ = yym2736 if false { - } else if z.HasExtensions() && z.DecExt(yyv2726) { + } else if z.HasExtensions() && z.DecExt(yyv2735) { } else { - z.DecFallback(yyv2726, false) + z.DecFallback(yyv2735, false) } } - yyj2723++ - if yyhl2723 { - yyb2723 = yyj2723 > l + yyj2732++ + if yyhl2732 { + yyb2732 = yyj2732 > l } else { - yyb2723 = r.CheckBreak() + yyb2732 = r.CheckBreak() } - if yyb2723 { + if yyb2732 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35318,26 +35396,26 @@ func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2728 := &x.Items - yym2729 := z.DecBinary() - _ = yym2729 + yyv2737 := &x.Items + yym2738 := z.DecBinary() + _ = yym2738 if false { } else { - h.decSliceEndpoints((*[]Endpoints)(yyv2728), d) + h.decSliceEndpoints((*[]Endpoints)(yyv2737), d) } } for { - yyj2723++ - if yyhl2723 { - yyb2723 = yyj2723 > l + yyj2732++ + if yyhl2732 { + yyb2732 = yyj2732 > l } else { - yyb2723 = r.CheckBreak() + yyb2732 = r.CheckBreak() } - if yyb2723 { + if yyb2732 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2723-1, "") + z.DecStructFieldNotFound(yyj2732-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -35349,38 +35427,38 @@ func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2730 := z.EncBinary() - _ = yym2730 + yym2739 := z.EncBinary() + _ = yym2739 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2731 := !z.EncBinary() - yy2arr2731 := z.EncBasicHandle().StructToArray - var yyq2731 [4]bool - _, _, _ = yysep2731, yyq2731, yy2arr2731 - const yyr2731 bool = false - yyq2731[0] = x.PodCIDR != "" - yyq2731[1] = x.ExternalID != "" - yyq2731[2] = x.ProviderID != "" - yyq2731[3] = x.Unschedulable != false - var yynn2731 int - if yyr2731 || yy2arr2731 { + yysep2740 := !z.EncBinary() + yy2arr2740 := z.EncBasicHandle().StructToArray + var yyq2740 [4]bool + _, _, _ = yysep2740, yyq2740, yy2arr2740 + const yyr2740 bool = false + yyq2740[0] = x.PodCIDR != "" + yyq2740[1] = x.ExternalID != "" + yyq2740[2] = x.ProviderID != "" + yyq2740[3] = x.Unschedulable != false + var yynn2740 int + if yyr2740 || yy2arr2740 { r.EncodeArrayStart(4) } else { - yynn2731 = 0 - for _, b := range yyq2731 { + yynn2740 = 0 + for _, b := range yyq2740 { if b { - yynn2731++ + yynn2740++ } } - r.EncodeMapStart(yynn2731) - yynn2731 = 0 + r.EncodeMapStart(yynn2740) + yynn2740 = 0 } - if yyr2731 || yy2arr2731 { + if yyr2740 || yy2arr2740 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2731[0] { - yym2733 := z.EncBinary() - _ = yym2733 + if yyq2740[0] { + yym2742 := z.EncBinary() + _ = yym2742 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR)) @@ -35389,23 +35467,23 @@ func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2731[0] { + if yyq2740[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podCIDR")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2734 := z.EncBinary() - _ = yym2734 + yym2743 := z.EncBinary() + _ = yym2743 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR)) } } } - if yyr2731 || yy2arr2731 { + if yyr2740 || yy2arr2740 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2731[1] { - yym2736 := z.EncBinary() - _ = yym2736 + if yyq2740[1] { + yym2745 := z.EncBinary() + _ = yym2745 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ExternalID)) @@ -35414,23 +35492,23 @@ func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2731[1] { + if yyq2740[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("externalID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2737 := z.EncBinary() - _ = yym2737 + yym2746 := z.EncBinary() + _ = yym2746 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ExternalID)) } } } - if yyr2731 || yy2arr2731 { + if yyr2740 || yy2arr2740 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2731[2] { - yym2739 := z.EncBinary() - _ = yym2739 + if yyq2740[2] { + yym2748 := z.EncBinary() + _ = yym2748 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ProviderID)) @@ -35439,23 +35517,23 @@ func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2731[2] { + if yyq2740[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("providerID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2740 := z.EncBinary() - _ = yym2740 + yym2749 := z.EncBinary() + _ = yym2749 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ProviderID)) } } } - if yyr2731 || yy2arr2731 { + if yyr2740 || yy2arr2740 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2731[3] { - yym2742 := z.EncBinary() - _ = yym2742 + if yyq2740[3] { + yym2751 := z.EncBinary() + _ = yym2751 if false { } else { r.EncodeBool(bool(x.Unschedulable)) @@ -35464,19 +35542,19 @@ func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq2731[3] { + if yyq2740[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("unschedulable")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2743 := z.EncBinary() - _ = yym2743 + yym2752 := z.EncBinary() + _ = yym2752 if false { } else { r.EncodeBool(bool(x.Unschedulable)) } } } - if yyr2731 || yy2arr2731 { + if yyr2740 || yy2arr2740 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -35489,25 +35567,25 @@ func (x *NodeSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2744 := z.DecBinary() - _ = yym2744 + yym2753 := z.DecBinary() + _ = yym2753 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2745 := r.ContainerType() - if yyct2745 == codecSelferValueTypeMap1234 { - yyl2745 := r.ReadMapStart() - if yyl2745 == 0 { + yyct2754 := r.ContainerType() + if yyct2754 == codecSelferValueTypeMap1234 { + yyl2754 := r.ReadMapStart() + if yyl2754 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2745, d) + x.codecDecodeSelfFromMap(yyl2754, d) } - } else if yyct2745 == codecSelferValueTypeArray1234 { - yyl2745 := r.ReadArrayStart() - if yyl2745 == 0 { + } else if yyct2754 == codecSelferValueTypeArray1234 { + yyl2754 := r.ReadArrayStart() + if yyl2754 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2745, d) + x.codecDecodeSelfFromArray(yyl2754, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -35519,12 +35597,12 @@ func (x *NodeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2746Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2746Slc - var yyhl2746 bool = l >= 0 - for yyj2746 := 0; ; yyj2746++ { - if yyhl2746 { - if yyj2746 >= l { + var yys2755Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2755Slc + var yyhl2755 bool = l >= 0 + for yyj2755 := 0; ; yyj2755++ { + if yyhl2755 { + if yyj2755 >= l { break } } else { @@ -35533,10 +35611,10 @@ func (x *NodeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2746Slc = r.DecodeBytes(yys2746Slc, true, true) - yys2746 := string(yys2746Slc) + yys2755Slc = r.DecodeBytes(yys2755Slc, true, true) + yys2755 := string(yys2755Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2746 { + switch yys2755 { case "podCIDR": if r.TryDecodeAsNil() { x.PodCIDR = "" @@ -35562,9 +35640,9 @@ func (x *NodeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Unschedulable = bool(r.DecodeBool()) } default: - z.DecStructFieldNotFound(-1, yys2746) - } // end switch yys2746 - } // end for yyj2746 + z.DecStructFieldNotFound(-1, yys2755) + } // end switch yys2755 + } // end for yyj2755 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -35572,16 +35650,16 @@ func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2751 int - var yyb2751 bool - var yyhl2751 bool = l >= 0 - yyj2751++ - if yyhl2751 { - yyb2751 = yyj2751 > l + var yyj2760 int + var yyb2760 bool + var yyhl2760 bool = l >= 0 + yyj2760++ + if yyhl2760 { + yyb2760 = yyj2760 > l } else { - yyb2751 = r.CheckBreak() + yyb2760 = r.CheckBreak() } - if yyb2751 { + if yyb2760 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35591,13 +35669,13 @@ func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.PodCIDR = string(r.DecodeString()) } - yyj2751++ - if yyhl2751 { - yyb2751 = yyj2751 > l + yyj2760++ + if yyhl2760 { + yyb2760 = yyj2760 > l } else { - yyb2751 = r.CheckBreak() + yyb2760 = r.CheckBreak() } - if yyb2751 { + if yyb2760 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35607,13 +35685,13 @@ func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.ExternalID = string(r.DecodeString()) } - yyj2751++ - if yyhl2751 { - yyb2751 = yyj2751 > l + yyj2760++ + if yyhl2760 { + yyb2760 = yyj2760 > l } else { - yyb2751 = r.CheckBreak() + yyb2760 = r.CheckBreak() } - if yyb2751 { + if yyb2760 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35623,13 +35701,13 @@ func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.ProviderID = string(r.DecodeString()) } - yyj2751++ - if yyhl2751 { - yyb2751 = yyj2751 > l + yyj2760++ + if yyhl2760 { + yyb2760 = yyj2760 > l } else { - yyb2751 = r.CheckBreak() + yyb2760 = r.CheckBreak() } - if yyb2751 { + if yyb2760 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35640,17 +35718,17 @@ func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Unschedulable = bool(r.DecodeBool()) } for { - yyj2751++ - if yyhl2751 { - yyb2751 = yyj2751 > l + yyj2760++ + if yyhl2760 { + yyb2760 = yyj2760 > l } else { - yyb2751 = r.CheckBreak() + yyb2760 = r.CheckBreak() } - if yyb2751 { + if yyb2760 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2751-1, "") + z.DecStructFieldNotFound(yyj2760-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -35662,33 +35740,33 @@ func (x *DaemonEndpoint) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2756 := z.EncBinary() - _ = yym2756 + yym2765 := z.EncBinary() + _ = yym2765 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2757 := !z.EncBinary() - yy2arr2757 := z.EncBasicHandle().StructToArray - var yyq2757 [1]bool - _, _, _ = yysep2757, yyq2757, yy2arr2757 - const yyr2757 bool = false - var yynn2757 int - if yyr2757 || yy2arr2757 { + yysep2766 := !z.EncBinary() + yy2arr2766 := z.EncBasicHandle().StructToArray + var yyq2766 [1]bool + _, _, _ = yysep2766, yyq2766, yy2arr2766 + const yyr2766 bool = false + var yynn2766 int + if yyr2766 || yy2arr2766 { r.EncodeArrayStart(1) } else { - yynn2757 = 1 - for _, b := range yyq2757 { + yynn2766 = 1 + for _, b := range yyq2766 { if b { - yynn2757++ + yynn2766++ } } - r.EncodeMapStart(yynn2757) - yynn2757 = 0 + r.EncodeMapStart(yynn2766) + yynn2766 = 0 } - if yyr2757 || yy2arr2757 { + if yyr2766 || yy2arr2766 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2759 := z.EncBinary() - _ = yym2759 + yym2768 := z.EncBinary() + _ = yym2768 if false { } else { r.EncodeInt(int64(x.Port)) @@ -35697,14 +35775,14 @@ func (x *DaemonEndpoint) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Port")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2760 := z.EncBinary() - _ = yym2760 + yym2769 := z.EncBinary() + _ = yym2769 if false { } else { r.EncodeInt(int64(x.Port)) } } - if yyr2757 || yy2arr2757 { + if yyr2766 || yy2arr2766 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -35717,25 +35795,25 @@ func (x *DaemonEndpoint) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2761 := z.DecBinary() - _ = yym2761 + yym2770 := z.DecBinary() + _ = yym2770 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2762 := r.ContainerType() - if yyct2762 == codecSelferValueTypeMap1234 { - yyl2762 := r.ReadMapStart() - if yyl2762 == 0 { + yyct2771 := r.ContainerType() + if yyct2771 == codecSelferValueTypeMap1234 { + yyl2771 := r.ReadMapStart() + if yyl2771 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2762, d) + x.codecDecodeSelfFromMap(yyl2771, d) } - } else if yyct2762 == codecSelferValueTypeArray1234 { - yyl2762 := r.ReadArrayStart() - if yyl2762 == 0 { + } else if yyct2771 == codecSelferValueTypeArray1234 { + yyl2771 := r.ReadArrayStart() + if yyl2771 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2762, d) + x.codecDecodeSelfFromArray(yyl2771, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -35747,12 +35825,12 @@ func (x *DaemonEndpoint) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2763Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2763Slc - var yyhl2763 bool = l >= 0 - for yyj2763 := 0; ; yyj2763++ { - if yyhl2763 { - if yyj2763 >= l { + var yys2772Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2772Slc + var yyhl2772 bool = l >= 0 + for yyj2772 := 0; ; yyj2772++ { + if yyhl2772 { + if yyj2772 >= l { break } } else { @@ -35761,10 +35839,10 @@ func (x *DaemonEndpoint) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2763Slc = r.DecodeBytes(yys2763Slc, true, true) - yys2763 := string(yys2763Slc) + yys2772Slc = r.DecodeBytes(yys2772Slc, true, true) + yys2772 := string(yys2772Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2763 { + switch yys2772 { case "Port": if r.TryDecodeAsNil() { x.Port = 0 @@ -35772,9 +35850,9 @@ func (x *DaemonEndpoint) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Port = int32(r.DecodeInt(32)) } default: - z.DecStructFieldNotFound(-1, yys2763) - } // end switch yys2763 - } // end for yyj2763 + z.DecStructFieldNotFound(-1, yys2772) + } // end switch yys2772 + } // end for yyj2772 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -35782,16 +35860,16 @@ func (x *DaemonEndpoint) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2765 int - var yyb2765 bool - var yyhl2765 bool = l >= 0 - yyj2765++ - if yyhl2765 { - yyb2765 = yyj2765 > l + var yyj2774 int + var yyb2774 bool + var yyhl2774 bool = l >= 0 + yyj2774++ + if yyhl2774 { + yyb2774 = yyj2774 > l } else { - yyb2765 = r.CheckBreak() + yyb2774 = r.CheckBreak() } - if yyb2765 { + if yyb2774 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35802,17 +35880,17 @@ func (x *DaemonEndpoint) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Port = int32(r.DecodeInt(32)) } for { - yyj2765++ - if yyhl2765 { - yyb2765 = yyj2765 > l + yyj2774++ + if yyhl2774 { + yyb2774 = yyj2774 > l } else { - yyb2765 = r.CheckBreak() + yyb2774 = r.CheckBreak() } - if yyb2765 { + if yyb2774 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2765-1, "") + z.DecStructFieldNotFound(yyj2774-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -35824,48 +35902,48 @@ func (x *NodeDaemonEndpoints) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2767 := z.EncBinary() - _ = yym2767 + yym2776 := z.EncBinary() + _ = yym2776 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2768 := !z.EncBinary() - yy2arr2768 := z.EncBasicHandle().StructToArray - var yyq2768 [1]bool - _, _, _ = yysep2768, yyq2768, yy2arr2768 - const yyr2768 bool = false - yyq2768[0] = true - var yynn2768 int - if yyr2768 || yy2arr2768 { + yysep2777 := !z.EncBinary() + yy2arr2777 := z.EncBasicHandle().StructToArray + var yyq2777 [1]bool + _, _, _ = yysep2777, yyq2777, yy2arr2777 + const yyr2777 bool = false + yyq2777[0] = true + var yynn2777 int + if yyr2777 || yy2arr2777 { r.EncodeArrayStart(1) } else { - yynn2768 = 0 - for _, b := range yyq2768 { + yynn2777 = 0 + for _, b := range yyq2777 { if b { - yynn2768++ + yynn2777++ } } - r.EncodeMapStart(yynn2768) - yynn2768 = 0 + r.EncodeMapStart(yynn2777) + yynn2777 = 0 } - if yyr2768 || yy2arr2768 { + if yyr2777 || yy2arr2777 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2768[0] { - yy2770 := &x.KubeletEndpoint - yy2770.CodecEncodeSelf(e) + if yyq2777[0] { + yy2779 := &x.KubeletEndpoint + yy2779.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2768[0] { + if yyq2777[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeletEndpoint")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2771 := &x.KubeletEndpoint - yy2771.CodecEncodeSelf(e) + yy2780 := &x.KubeletEndpoint + yy2780.CodecEncodeSelf(e) } } - if yyr2768 || yy2arr2768 { + if yyr2777 || yy2arr2777 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -35878,25 +35956,25 @@ func (x *NodeDaemonEndpoints) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2772 := z.DecBinary() - _ = yym2772 + yym2781 := z.DecBinary() + _ = yym2781 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2773 := r.ContainerType() - if yyct2773 == codecSelferValueTypeMap1234 { - yyl2773 := r.ReadMapStart() - if yyl2773 == 0 { + yyct2782 := r.ContainerType() + if yyct2782 == codecSelferValueTypeMap1234 { + yyl2782 := r.ReadMapStart() + if yyl2782 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2773, d) + x.codecDecodeSelfFromMap(yyl2782, d) } - } else if yyct2773 == codecSelferValueTypeArray1234 { - yyl2773 := r.ReadArrayStart() - if yyl2773 == 0 { + } else if yyct2782 == codecSelferValueTypeArray1234 { + yyl2782 := r.ReadArrayStart() + if yyl2782 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2773, d) + x.codecDecodeSelfFromArray(yyl2782, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -35908,12 +35986,12 @@ func (x *NodeDaemonEndpoints) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2774Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2774Slc - var yyhl2774 bool = l >= 0 - for yyj2774 := 0; ; yyj2774++ { - if yyhl2774 { - if yyj2774 >= l { + var yys2783Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2783Slc + var yyhl2783 bool = l >= 0 + for yyj2783 := 0; ; yyj2783++ { + if yyhl2783 { + if yyj2783 >= l { break } } else { @@ -35922,21 +36000,21 @@ func (x *NodeDaemonEndpoints) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2774Slc = r.DecodeBytes(yys2774Slc, true, true) - yys2774 := string(yys2774Slc) + yys2783Slc = r.DecodeBytes(yys2783Slc, true, true) + yys2783 := string(yys2783Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2774 { + switch yys2783 { case "kubeletEndpoint": if r.TryDecodeAsNil() { x.KubeletEndpoint = DaemonEndpoint{} } else { - yyv2775 := &x.KubeletEndpoint - yyv2775.CodecDecodeSelf(d) + yyv2784 := &x.KubeletEndpoint + yyv2784.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2774) - } // end switch yys2774 - } // end for yyj2774 + z.DecStructFieldNotFound(-1, yys2783) + } // end switch yys2783 + } // end for yyj2783 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -35944,16 +36022,16 @@ func (x *NodeDaemonEndpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2776 int - var yyb2776 bool - var yyhl2776 bool = l >= 0 - yyj2776++ - if yyhl2776 { - yyb2776 = yyj2776 > l + var yyj2785 int + var yyb2785 bool + var yyhl2785 bool = l >= 0 + yyj2785++ + if yyhl2785 { + yyb2785 = yyj2785 > l } else { - yyb2776 = r.CheckBreak() + yyb2785 = r.CheckBreak() } - if yyb2776 { + if yyb2785 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35961,21 +36039,21 @@ func (x *NodeDaemonEndpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.KubeletEndpoint = DaemonEndpoint{} } else { - yyv2777 := &x.KubeletEndpoint - yyv2777.CodecDecodeSelf(d) + yyv2786 := &x.KubeletEndpoint + yyv2786.CodecDecodeSelf(d) } for { - yyj2776++ - if yyhl2776 { - yyb2776 = yyj2776 > l + yyj2785++ + if yyhl2785 { + yyb2785 = yyj2785 > l } else { - yyb2776 = r.CheckBreak() + yyb2785 = r.CheckBreak() } - if yyb2776 { + if yyb2785 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2776-1, "") + z.DecStructFieldNotFound(yyj2785-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -35987,33 +36065,33 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2778 := z.EncBinary() - _ = yym2778 + yym2787 := z.EncBinary() + _ = yym2787 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2779 := !z.EncBinary() - yy2arr2779 := z.EncBasicHandle().StructToArray - var yyq2779 [10]bool - _, _, _ = yysep2779, yyq2779, yy2arr2779 - const yyr2779 bool = false - var yynn2779 int - if yyr2779 || yy2arr2779 { + yysep2788 := !z.EncBinary() + yy2arr2788 := z.EncBasicHandle().StructToArray + var yyq2788 [10]bool + _, _, _ = yysep2788, yyq2788, yy2arr2788 + const yyr2788 bool = false + var yynn2788 int + if yyr2788 || yy2arr2788 { r.EncodeArrayStart(10) } else { - yynn2779 = 10 - for _, b := range yyq2779 { + yynn2788 = 10 + for _, b := range yyq2788 { if b { - yynn2779++ + yynn2788++ } } - r.EncodeMapStart(yynn2779) - yynn2779 = 0 + r.EncodeMapStart(yynn2788) + yynn2788 = 0 } - if yyr2779 || yy2arr2779 { + if yyr2788 || yy2arr2788 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2781 := z.EncBinary() - _ = yym2781 + yym2790 := z.EncBinary() + _ = yym2790 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.MachineID)) @@ -36022,17 +36100,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("machineID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2782 := z.EncBinary() - _ = yym2782 + yym2791 := z.EncBinary() + _ = yym2791 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.MachineID)) } } - if yyr2779 || yy2arr2779 { + if yyr2788 || yy2arr2788 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2784 := z.EncBinary() - _ = yym2784 + yym2793 := z.EncBinary() + _ = yym2793 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SystemUUID)) @@ -36041,17 +36119,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("systemUUID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2785 := z.EncBinary() - _ = yym2785 + yym2794 := z.EncBinary() + _ = yym2794 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SystemUUID)) } } - if yyr2779 || yy2arr2779 { + if yyr2788 || yy2arr2788 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2787 := z.EncBinary() - _ = yym2787 + yym2796 := z.EncBinary() + _ = yym2796 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.BootID)) @@ -36060,17 +36138,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("bootID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2788 := z.EncBinary() - _ = yym2788 + yym2797 := z.EncBinary() + _ = yym2797 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.BootID)) } } - if yyr2779 || yy2arr2779 { + if yyr2788 || yy2arr2788 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2790 := z.EncBinary() - _ = yym2790 + yym2799 := z.EncBinary() + _ = yym2799 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KernelVersion)) @@ -36079,17 +36157,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kernelVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2791 := z.EncBinary() - _ = yym2791 + yym2800 := z.EncBinary() + _ = yym2800 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KernelVersion)) } } - if yyr2779 || yy2arr2779 { + if yyr2788 || yy2arr2788 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2793 := z.EncBinary() - _ = yym2793 + yym2802 := z.EncBinary() + _ = yym2802 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.OSImage)) @@ -36098,17 +36176,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("osImage")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2794 := z.EncBinary() - _ = yym2794 + yym2803 := z.EncBinary() + _ = yym2803 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.OSImage)) } } - if yyr2779 || yy2arr2779 { + if yyr2788 || yy2arr2788 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2796 := z.EncBinary() - _ = yym2796 + yym2805 := z.EncBinary() + _ = yym2805 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContainerRuntimeVersion)) @@ -36117,17 +36195,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("containerRuntimeVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2797 := z.EncBinary() - _ = yym2797 + yym2806 := z.EncBinary() + _ = yym2806 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContainerRuntimeVersion)) } } - if yyr2779 || yy2arr2779 { + if yyr2788 || yy2arr2788 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2799 := z.EncBinary() - _ = yym2799 + yym2808 := z.EncBinary() + _ = yym2808 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KubeletVersion)) @@ -36136,17 +36214,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeletVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2800 := z.EncBinary() - _ = yym2800 + yym2809 := z.EncBinary() + _ = yym2809 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KubeletVersion)) } } - if yyr2779 || yy2arr2779 { + if yyr2788 || yy2arr2788 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2802 := z.EncBinary() - _ = yym2802 + yym2811 := z.EncBinary() + _ = yym2811 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KubeProxyVersion)) @@ -36155,17 +36233,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeProxyVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2803 := z.EncBinary() - _ = yym2803 + yym2812 := z.EncBinary() + _ = yym2812 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KubeProxyVersion)) } } - if yyr2779 || yy2arr2779 { + if yyr2788 || yy2arr2788 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2805 := z.EncBinary() - _ = yym2805 + yym2814 := z.EncBinary() + _ = yym2814 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.OperatingSystem)) @@ -36174,17 +36252,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("operatingSystem")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2806 := z.EncBinary() - _ = yym2806 + yym2815 := z.EncBinary() + _ = yym2815 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.OperatingSystem)) } } - if yyr2779 || yy2arr2779 { + if yyr2788 || yy2arr2788 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2808 := z.EncBinary() - _ = yym2808 + yym2817 := z.EncBinary() + _ = yym2817 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Architecture)) @@ -36193,14 +36271,14 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("architecture")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2809 := z.EncBinary() - _ = yym2809 + yym2818 := z.EncBinary() + _ = yym2818 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Architecture)) } } - if yyr2779 || yy2arr2779 { + if yyr2788 || yy2arr2788 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -36213,25 +36291,25 @@ func (x *NodeSystemInfo) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2810 := z.DecBinary() - _ = yym2810 + yym2819 := z.DecBinary() + _ = yym2819 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2811 := r.ContainerType() - if yyct2811 == codecSelferValueTypeMap1234 { - yyl2811 := r.ReadMapStart() - if yyl2811 == 0 { + yyct2820 := r.ContainerType() + if yyct2820 == codecSelferValueTypeMap1234 { + yyl2820 := r.ReadMapStart() + if yyl2820 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2811, d) + x.codecDecodeSelfFromMap(yyl2820, d) } - } else if yyct2811 == codecSelferValueTypeArray1234 { - yyl2811 := r.ReadArrayStart() - if yyl2811 == 0 { + } else if yyct2820 == codecSelferValueTypeArray1234 { + yyl2820 := r.ReadArrayStart() + if yyl2820 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2811, d) + x.codecDecodeSelfFromArray(yyl2820, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -36243,12 +36321,12 @@ func (x *NodeSystemInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2812Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2812Slc - var yyhl2812 bool = l >= 0 - for yyj2812 := 0; ; yyj2812++ { - if yyhl2812 { - if yyj2812 >= l { + var yys2821Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2821Slc + var yyhl2821 bool = l >= 0 + for yyj2821 := 0; ; yyj2821++ { + if yyhl2821 { + if yyj2821 >= l { break } } else { @@ -36257,10 +36335,10 @@ func (x *NodeSystemInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2812Slc = r.DecodeBytes(yys2812Slc, true, true) - yys2812 := string(yys2812Slc) + yys2821Slc = r.DecodeBytes(yys2821Slc, true, true) + yys2821 := string(yys2821Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2812 { + switch yys2821 { case "machineID": if r.TryDecodeAsNil() { x.MachineID = "" @@ -36322,9 +36400,9 @@ func (x *NodeSystemInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Architecture = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys2812) - } // end switch yys2812 - } // end for yyj2812 + z.DecStructFieldNotFound(-1, yys2821) + } // end switch yys2821 + } // end for yyj2821 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -36332,16 +36410,16 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2823 int - var yyb2823 bool - var yyhl2823 bool = l >= 0 - yyj2823++ - if yyhl2823 { - yyb2823 = yyj2823 > l + var yyj2832 int + var yyb2832 bool + var yyhl2832 bool = l >= 0 + yyj2832++ + if yyhl2832 { + yyb2832 = yyj2832 > l } else { - yyb2823 = r.CheckBreak() + yyb2832 = r.CheckBreak() } - if yyb2823 { + if yyb2832 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36351,13 +36429,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.MachineID = string(r.DecodeString()) } - yyj2823++ - if yyhl2823 { - yyb2823 = yyj2823 > l + yyj2832++ + if yyhl2832 { + yyb2832 = yyj2832 > l } else { - yyb2823 = r.CheckBreak() + yyb2832 = r.CheckBreak() } - if yyb2823 { + if yyb2832 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36367,13 +36445,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.SystemUUID = string(r.DecodeString()) } - yyj2823++ - if yyhl2823 { - yyb2823 = yyj2823 > l + yyj2832++ + if yyhl2832 { + yyb2832 = yyj2832 > l } else { - yyb2823 = r.CheckBreak() + yyb2832 = r.CheckBreak() } - if yyb2823 { + if yyb2832 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36383,13 +36461,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.BootID = string(r.DecodeString()) } - yyj2823++ - if yyhl2823 { - yyb2823 = yyj2823 > l + yyj2832++ + if yyhl2832 { + yyb2832 = yyj2832 > l } else { - yyb2823 = r.CheckBreak() + yyb2832 = r.CheckBreak() } - if yyb2823 { + if yyb2832 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36399,13 +36477,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.KernelVersion = string(r.DecodeString()) } - yyj2823++ - if yyhl2823 { - yyb2823 = yyj2823 > l + yyj2832++ + if yyhl2832 { + yyb2832 = yyj2832 > l } else { - yyb2823 = r.CheckBreak() + yyb2832 = r.CheckBreak() } - if yyb2823 { + if yyb2832 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36415,13 +36493,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.OSImage = string(r.DecodeString()) } - yyj2823++ - if yyhl2823 { - yyb2823 = yyj2823 > l + yyj2832++ + if yyhl2832 { + yyb2832 = yyj2832 > l } else { - yyb2823 = r.CheckBreak() + yyb2832 = r.CheckBreak() } - if yyb2823 { + if yyb2832 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36431,13 +36509,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.ContainerRuntimeVersion = string(r.DecodeString()) } - yyj2823++ - if yyhl2823 { - yyb2823 = yyj2823 > l + yyj2832++ + if yyhl2832 { + yyb2832 = yyj2832 > l } else { - yyb2823 = r.CheckBreak() + yyb2832 = r.CheckBreak() } - if yyb2823 { + if yyb2832 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36447,13 +36525,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.KubeletVersion = string(r.DecodeString()) } - yyj2823++ - if yyhl2823 { - yyb2823 = yyj2823 > l + yyj2832++ + if yyhl2832 { + yyb2832 = yyj2832 > l } else { - yyb2823 = r.CheckBreak() + yyb2832 = r.CheckBreak() } - if yyb2823 { + if yyb2832 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36463,13 +36541,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.KubeProxyVersion = string(r.DecodeString()) } - yyj2823++ - if yyhl2823 { - yyb2823 = yyj2823 > l + yyj2832++ + if yyhl2832 { + yyb2832 = yyj2832 > l } else { - yyb2823 = r.CheckBreak() + yyb2832 = r.CheckBreak() } - if yyb2823 { + if yyb2832 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36479,13 +36557,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.OperatingSystem = string(r.DecodeString()) } - yyj2823++ - if yyhl2823 { - yyb2823 = yyj2823 > l + yyj2832++ + if yyhl2832 { + yyb2832 = yyj2832 > l } else { - yyb2823 = r.CheckBreak() + yyb2832 = r.CheckBreak() } - if yyb2823 { + if yyb2832 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36496,17 +36574,17 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Architecture = string(r.DecodeString()) } for { - yyj2823++ - if yyhl2823 { - yyb2823 = yyj2823 > l + yyj2832++ + if yyhl2832 { + yyb2832 = yyj2832 > l } else { - yyb2823 = r.CheckBreak() + yyb2832 = r.CheckBreak() } - if yyb2823 { + if yyb2832 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2823-1, "") + z.DecStructFieldNotFound(yyj2832-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -36518,42 +36596,42 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2834 := z.EncBinary() - _ = yym2834 + yym2843 := z.EncBinary() + _ = yym2843 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2835 := !z.EncBinary() - yy2arr2835 := z.EncBasicHandle().StructToArray - var yyq2835 [10]bool - _, _, _ = yysep2835, yyq2835, yy2arr2835 - const yyr2835 bool = false - yyq2835[0] = len(x.Capacity) != 0 - yyq2835[1] = len(x.Allocatable) != 0 - yyq2835[2] = x.Phase != "" - yyq2835[3] = len(x.Conditions) != 0 - yyq2835[4] = len(x.Addresses) != 0 - yyq2835[5] = true - yyq2835[6] = true - yyq2835[7] = len(x.Images) != 0 - yyq2835[8] = len(x.VolumesInUse) != 0 - yyq2835[9] = len(x.VolumesAttached) != 0 - var yynn2835 int - if yyr2835 || yy2arr2835 { + yysep2844 := !z.EncBinary() + yy2arr2844 := z.EncBasicHandle().StructToArray + var yyq2844 [10]bool + _, _, _ = yysep2844, yyq2844, yy2arr2844 + const yyr2844 bool = false + yyq2844[0] = len(x.Capacity) != 0 + yyq2844[1] = len(x.Allocatable) != 0 + yyq2844[2] = x.Phase != "" + yyq2844[3] = len(x.Conditions) != 0 + yyq2844[4] = len(x.Addresses) != 0 + yyq2844[5] = true + yyq2844[6] = true + yyq2844[7] = len(x.Images) != 0 + yyq2844[8] = len(x.VolumesInUse) != 0 + yyq2844[9] = len(x.VolumesAttached) != 0 + var yynn2844 int + if yyr2844 || yy2arr2844 { r.EncodeArrayStart(10) } else { - yynn2835 = 0 - for _, b := range yyq2835 { + yynn2844 = 0 + for _, b := range yyq2844 { if b { - yynn2835++ + yynn2844++ } } - r.EncodeMapStart(yynn2835) - yynn2835 = 0 + r.EncodeMapStart(yynn2844) + yynn2844 = 0 } - if yyr2835 || yy2arr2835 { + if yyr2844 || yy2arr2844 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2835[0] { + if yyq2844[0] { if x.Capacity == nil { r.EncodeNil() } else { @@ -36563,7 +36641,7 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2835[0] { + if yyq2844[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("capacity")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -36574,9 +36652,9 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2835 || yy2arr2835 { + if yyr2844 || yy2arr2844 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2835[1] { + if yyq2844[1] { if x.Allocatable == nil { r.EncodeNil() } else { @@ -36586,7 +36664,7 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2835[1] { + if yyq2844[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("allocatable")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -36597,29 +36675,29 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2835 || yy2arr2835 { + if yyr2844 || yy2arr2844 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2835[2] { + if yyq2844[2] { x.Phase.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2835[2] { + if yyq2844[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("phase")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Phase.CodecEncodeSelf(e) } } - if yyr2835 || yy2arr2835 { + if yyr2844 || yy2arr2844 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2835[3] { + if yyq2844[3] { if x.Conditions == nil { r.EncodeNil() } else { - yym2840 := z.EncBinary() - _ = yym2840 + yym2849 := z.EncBinary() + _ = yym2849 if false { } else { h.encSliceNodeCondition(([]NodeCondition)(x.Conditions), e) @@ -36629,15 +36707,15 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2835[3] { + if yyq2844[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("conditions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Conditions == nil { r.EncodeNil() } else { - yym2841 := z.EncBinary() - _ = yym2841 + yym2850 := z.EncBinary() + _ = yym2850 if false { } else { h.encSliceNodeCondition(([]NodeCondition)(x.Conditions), e) @@ -36645,14 +36723,14 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2835 || yy2arr2835 { + if yyr2844 || yy2arr2844 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2835[4] { + if yyq2844[4] { if x.Addresses == nil { r.EncodeNil() } else { - yym2843 := z.EncBinary() - _ = yym2843 + yym2852 := z.EncBinary() + _ = yym2852 if false { } else { h.encSliceNodeAddress(([]NodeAddress)(x.Addresses), e) @@ -36662,15 +36740,15 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2835[4] { + if yyq2844[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("addresses")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Addresses == nil { r.EncodeNil() } else { - yym2844 := z.EncBinary() - _ = yym2844 + yym2853 := z.EncBinary() + _ = yym2853 if false { } else { h.encSliceNodeAddress(([]NodeAddress)(x.Addresses), e) @@ -36678,48 +36756,48 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2835 || yy2arr2835 { + if yyr2844 || yy2arr2844 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2835[5] { - yy2846 := &x.DaemonEndpoints - yy2846.CodecEncodeSelf(e) + if yyq2844[5] { + yy2855 := &x.DaemonEndpoints + yy2855.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2835[5] { + if yyq2844[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("daemonEndpoints")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2847 := &x.DaemonEndpoints - yy2847.CodecEncodeSelf(e) + yy2856 := &x.DaemonEndpoints + yy2856.CodecEncodeSelf(e) } } - if yyr2835 || yy2arr2835 { + if yyr2844 || yy2arr2844 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2835[6] { - yy2849 := &x.NodeInfo - yy2849.CodecEncodeSelf(e) + if yyq2844[6] { + yy2858 := &x.NodeInfo + yy2858.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2835[6] { + if yyq2844[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nodeInfo")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2850 := &x.NodeInfo - yy2850.CodecEncodeSelf(e) + yy2859 := &x.NodeInfo + yy2859.CodecEncodeSelf(e) } } - if yyr2835 || yy2arr2835 { + if yyr2844 || yy2arr2844 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2835[7] { + if yyq2844[7] { if x.Images == nil { r.EncodeNil() } else { - yym2852 := z.EncBinary() - _ = yym2852 + yym2861 := z.EncBinary() + _ = yym2861 if false { } else { h.encSliceContainerImage(([]ContainerImage)(x.Images), e) @@ -36729,15 +36807,15 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2835[7] { + if yyq2844[7] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("images")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Images == nil { r.EncodeNil() } else { - yym2853 := z.EncBinary() - _ = yym2853 + yym2862 := z.EncBinary() + _ = yym2862 if false { } else { h.encSliceContainerImage(([]ContainerImage)(x.Images), e) @@ -36745,14 +36823,14 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2835 || yy2arr2835 { + if yyr2844 || yy2arr2844 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2835[8] { + if yyq2844[8] { if x.VolumesInUse == nil { r.EncodeNil() } else { - yym2855 := z.EncBinary() - _ = yym2855 + yym2864 := z.EncBinary() + _ = yym2864 if false { } else { h.encSliceUniqueVolumeName(([]UniqueVolumeName)(x.VolumesInUse), e) @@ -36762,15 +36840,15 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2835[8] { + if yyq2844[8] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("volumesInUse")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.VolumesInUse == nil { r.EncodeNil() } else { - yym2856 := z.EncBinary() - _ = yym2856 + yym2865 := z.EncBinary() + _ = yym2865 if false { } else { h.encSliceUniqueVolumeName(([]UniqueVolumeName)(x.VolumesInUse), e) @@ -36778,14 +36856,14 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2835 || yy2arr2835 { + if yyr2844 || yy2arr2844 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2835[9] { + if yyq2844[9] { if x.VolumesAttached == nil { r.EncodeNil() } else { - yym2858 := z.EncBinary() - _ = yym2858 + yym2867 := z.EncBinary() + _ = yym2867 if false { } else { h.encSliceAttachedVolume(([]AttachedVolume)(x.VolumesAttached), e) @@ -36795,15 +36873,15 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2835[9] { + if yyq2844[9] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("volumesAttached")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.VolumesAttached == nil { r.EncodeNil() } else { - yym2859 := z.EncBinary() - _ = yym2859 + yym2868 := z.EncBinary() + _ = yym2868 if false { } else { h.encSliceAttachedVolume(([]AttachedVolume)(x.VolumesAttached), e) @@ -36811,7 +36889,7 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2835 || yy2arr2835 { + if yyr2844 || yy2arr2844 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -36824,25 +36902,25 @@ func (x *NodeStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2860 := z.DecBinary() - _ = yym2860 + yym2869 := z.DecBinary() + _ = yym2869 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2861 := r.ContainerType() - if yyct2861 == codecSelferValueTypeMap1234 { - yyl2861 := r.ReadMapStart() - if yyl2861 == 0 { + yyct2870 := r.ContainerType() + if yyct2870 == codecSelferValueTypeMap1234 { + yyl2870 := r.ReadMapStart() + if yyl2870 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2861, d) + x.codecDecodeSelfFromMap(yyl2870, d) } - } else if yyct2861 == codecSelferValueTypeArray1234 { - yyl2861 := r.ReadArrayStart() - if yyl2861 == 0 { + } else if yyct2870 == codecSelferValueTypeArray1234 { + yyl2870 := r.ReadArrayStart() + if yyl2870 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2861, d) + x.codecDecodeSelfFromArray(yyl2870, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -36854,12 +36932,12 @@ func (x *NodeStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2862Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2862Slc - var yyhl2862 bool = l >= 0 - for yyj2862 := 0; ; yyj2862++ { - if yyhl2862 { - if yyj2862 >= l { + var yys2871Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2871Slc + var yyhl2871 bool = l >= 0 + for yyj2871 := 0; ; yyj2871++ { + if yyhl2871 { + if yyj2871 >= l { break } } else { @@ -36868,23 +36946,23 @@ func (x *NodeStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2862Slc = r.DecodeBytes(yys2862Slc, true, true) - yys2862 := string(yys2862Slc) + yys2871Slc = r.DecodeBytes(yys2871Slc, true, true) + yys2871 := string(yys2871Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2862 { + switch yys2871 { case "capacity": if r.TryDecodeAsNil() { x.Capacity = nil } else { - yyv2863 := &x.Capacity - yyv2863.CodecDecodeSelf(d) + yyv2872 := &x.Capacity + yyv2872.CodecDecodeSelf(d) } case "allocatable": if r.TryDecodeAsNil() { x.Allocatable = nil } else { - yyv2864 := &x.Allocatable - yyv2864.CodecDecodeSelf(d) + yyv2873 := &x.Allocatable + yyv2873.CodecDecodeSelf(d) } case "phase": if r.TryDecodeAsNil() { @@ -36896,80 +36974,80 @@ func (x *NodeStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv2866 := &x.Conditions - yym2867 := z.DecBinary() - _ = yym2867 + yyv2875 := &x.Conditions + yym2876 := z.DecBinary() + _ = yym2876 if false { } else { - h.decSliceNodeCondition((*[]NodeCondition)(yyv2866), d) + h.decSliceNodeCondition((*[]NodeCondition)(yyv2875), d) } } case "addresses": if r.TryDecodeAsNil() { x.Addresses = nil } else { - yyv2868 := &x.Addresses - yym2869 := z.DecBinary() - _ = yym2869 + yyv2877 := &x.Addresses + yym2878 := z.DecBinary() + _ = yym2878 if false { } else { - h.decSliceNodeAddress((*[]NodeAddress)(yyv2868), d) + h.decSliceNodeAddress((*[]NodeAddress)(yyv2877), d) } } case "daemonEndpoints": if r.TryDecodeAsNil() { x.DaemonEndpoints = NodeDaemonEndpoints{} } else { - yyv2870 := &x.DaemonEndpoints - yyv2870.CodecDecodeSelf(d) + yyv2879 := &x.DaemonEndpoints + yyv2879.CodecDecodeSelf(d) } case "nodeInfo": if r.TryDecodeAsNil() { x.NodeInfo = NodeSystemInfo{} } else { - yyv2871 := &x.NodeInfo - yyv2871.CodecDecodeSelf(d) + yyv2880 := &x.NodeInfo + yyv2880.CodecDecodeSelf(d) } case "images": if r.TryDecodeAsNil() { x.Images = nil } else { - yyv2872 := &x.Images - yym2873 := z.DecBinary() - _ = yym2873 + yyv2881 := &x.Images + yym2882 := z.DecBinary() + _ = yym2882 if false { } else { - h.decSliceContainerImage((*[]ContainerImage)(yyv2872), d) + h.decSliceContainerImage((*[]ContainerImage)(yyv2881), d) } } case "volumesInUse": if r.TryDecodeAsNil() { x.VolumesInUse = nil } else { - yyv2874 := &x.VolumesInUse - yym2875 := z.DecBinary() - _ = yym2875 + yyv2883 := &x.VolumesInUse + yym2884 := z.DecBinary() + _ = yym2884 if false { } else { - h.decSliceUniqueVolumeName((*[]UniqueVolumeName)(yyv2874), d) + h.decSliceUniqueVolumeName((*[]UniqueVolumeName)(yyv2883), d) } } case "volumesAttached": if r.TryDecodeAsNil() { x.VolumesAttached = nil } else { - yyv2876 := &x.VolumesAttached - yym2877 := z.DecBinary() - _ = yym2877 + yyv2885 := &x.VolumesAttached + yym2886 := z.DecBinary() + _ = yym2886 if false { } else { - h.decSliceAttachedVolume((*[]AttachedVolume)(yyv2876), d) + h.decSliceAttachedVolume((*[]AttachedVolume)(yyv2885), d) } } default: - z.DecStructFieldNotFound(-1, yys2862) - } // end switch yys2862 - } // end for yyj2862 + z.DecStructFieldNotFound(-1, yys2871) + } // end switch yys2871 + } // end for yyj2871 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -36977,16 +37055,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2878 int - var yyb2878 bool - var yyhl2878 bool = l >= 0 - yyj2878++ - if yyhl2878 { - yyb2878 = yyj2878 > l + var yyj2887 int + var yyb2887 bool + var yyhl2887 bool = l >= 0 + yyj2887++ + if yyhl2887 { + yyb2887 = yyj2887 > l } else { - yyb2878 = r.CheckBreak() + yyb2887 = r.CheckBreak() } - if yyb2878 { + if yyb2887 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36994,16 +37072,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Capacity = nil } else { - yyv2879 := &x.Capacity - yyv2879.CodecDecodeSelf(d) + yyv2888 := &x.Capacity + yyv2888.CodecDecodeSelf(d) } - yyj2878++ - if yyhl2878 { - yyb2878 = yyj2878 > l + yyj2887++ + if yyhl2887 { + yyb2887 = yyj2887 > l } else { - yyb2878 = r.CheckBreak() + yyb2887 = r.CheckBreak() } - if yyb2878 { + if yyb2887 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37011,16 +37089,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Allocatable = nil } else { - yyv2880 := &x.Allocatable - yyv2880.CodecDecodeSelf(d) + yyv2889 := &x.Allocatable + yyv2889.CodecDecodeSelf(d) } - yyj2878++ - if yyhl2878 { - yyb2878 = yyj2878 > l + yyj2887++ + if yyhl2887 { + yyb2887 = yyj2887 > l } else { - yyb2878 = r.CheckBreak() + yyb2887 = r.CheckBreak() } - if yyb2878 { + if yyb2887 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37030,13 +37108,13 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Phase = NodePhase(r.DecodeString()) } - yyj2878++ - if yyhl2878 { - yyb2878 = yyj2878 > l + yyj2887++ + if yyhl2887 { + yyb2887 = yyj2887 > l } else { - yyb2878 = r.CheckBreak() + yyb2887 = r.CheckBreak() } - if yyb2878 { + if yyb2887 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37044,21 +37122,21 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv2882 := &x.Conditions - yym2883 := z.DecBinary() - _ = yym2883 + yyv2891 := &x.Conditions + yym2892 := z.DecBinary() + _ = yym2892 if false { } else { - h.decSliceNodeCondition((*[]NodeCondition)(yyv2882), d) + h.decSliceNodeCondition((*[]NodeCondition)(yyv2891), d) } } - yyj2878++ - if yyhl2878 { - yyb2878 = yyj2878 > l + yyj2887++ + if yyhl2887 { + yyb2887 = yyj2887 > l } else { - yyb2878 = r.CheckBreak() + yyb2887 = r.CheckBreak() } - if yyb2878 { + if yyb2887 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37066,21 +37144,21 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Addresses = nil } else { - yyv2884 := &x.Addresses - yym2885 := z.DecBinary() - _ = yym2885 + yyv2893 := &x.Addresses + yym2894 := z.DecBinary() + _ = yym2894 if false { } else { - h.decSliceNodeAddress((*[]NodeAddress)(yyv2884), d) + h.decSliceNodeAddress((*[]NodeAddress)(yyv2893), d) } } - yyj2878++ - if yyhl2878 { - yyb2878 = yyj2878 > l + yyj2887++ + if yyhl2887 { + yyb2887 = yyj2887 > l } else { - yyb2878 = r.CheckBreak() + yyb2887 = r.CheckBreak() } - if yyb2878 { + if yyb2887 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37088,16 +37166,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.DaemonEndpoints = NodeDaemonEndpoints{} } else { - yyv2886 := &x.DaemonEndpoints - yyv2886.CodecDecodeSelf(d) + yyv2895 := &x.DaemonEndpoints + yyv2895.CodecDecodeSelf(d) } - yyj2878++ - if yyhl2878 { - yyb2878 = yyj2878 > l + yyj2887++ + if yyhl2887 { + yyb2887 = yyj2887 > l } else { - yyb2878 = r.CheckBreak() + yyb2887 = r.CheckBreak() } - if yyb2878 { + if yyb2887 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37105,16 +37183,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.NodeInfo = NodeSystemInfo{} } else { - yyv2887 := &x.NodeInfo - yyv2887.CodecDecodeSelf(d) + yyv2896 := &x.NodeInfo + yyv2896.CodecDecodeSelf(d) } - yyj2878++ - if yyhl2878 { - yyb2878 = yyj2878 > l + yyj2887++ + if yyhl2887 { + yyb2887 = yyj2887 > l } else { - yyb2878 = r.CheckBreak() + yyb2887 = r.CheckBreak() } - if yyb2878 { + if yyb2887 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37122,21 +37200,21 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Images = nil } else { - yyv2888 := &x.Images - yym2889 := z.DecBinary() - _ = yym2889 + yyv2897 := &x.Images + yym2898 := z.DecBinary() + _ = yym2898 if false { } else { - h.decSliceContainerImage((*[]ContainerImage)(yyv2888), d) + h.decSliceContainerImage((*[]ContainerImage)(yyv2897), d) } } - yyj2878++ - if yyhl2878 { - yyb2878 = yyj2878 > l + yyj2887++ + if yyhl2887 { + yyb2887 = yyj2887 > l } else { - yyb2878 = r.CheckBreak() + yyb2887 = r.CheckBreak() } - if yyb2878 { + if yyb2887 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37144,21 +37222,21 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.VolumesInUse = nil } else { - yyv2890 := &x.VolumesInUse - yym2891 := z.DecBinary() - _ = yym2891 + yyv2899 := &x.VolumesInUse + yym2900 := z.DecBinary() + _ = yym2900 if false { } else { - h.decSliceUniqueVolumeName((*[]UniqueVolumeName)(yyv2890), d) + h.decSliceUniqueVolumeName((*[]UniqueVolumeName)(yyv2899), d) } } - yyj2878++ - if yyhl2878 { - yyb2878 = yyj2878 > l + yyj2887++ + if yyhl2887 { + yyb2887 = yyj2887 > l } else { - yyb2878 = r.CheckBreak() + yyb2887 = r.CheckBreak() } - if yyb2878 { + if yyb2887 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37166,26 +37244,26 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.VolumesAttached = nil } else { - yyv2892 := &x.VolumesAttached - yym2893 := z.DecBinary() - _ = yym2893 + yyv2901 := &x.VolumesAttached + yym2902 := z.DecBinary() + _ = yym2902 if false { } else { - h.decSliceAttachedVolume((*[]AttachedVolume)(yyv2892), d) + h.decSliceAttachedVolume((*[]AttachedVolume)(yyv2901), d) } } for { - yyj2878++ - if yyhl2878 { - yyb2878 = yyj2878 > l + yyj2887++ + if yyhl2887 { + yyb2887 = yyj2887 > l } else { - yyb2878 = r.CheckBreak() + yyb2887 = r.CheckBreak() } - if yyb2878 { + if yyb2887 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2878-1, "") + z.DecStructFieldNotFound(yyj2887-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -37194,8 +37272,8 @@ func (x UniqueVolumeName) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym2894 := z.EncBinary() - _ = yym2894 + yym2903 := z.EncBinary() + _ = yym2903 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -37207,8 +37285,8 @@ func (x *UniqueVolumeName) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2895 := z.DecBinary() - _ = yym2895 + yym2904 := z.DecBinary() + _ = yym2904 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -37223,30 +37301,30 @@ func (x *AttachedVolume) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2896 := z.EncBinary() - _ = yym2896 + yym2905 := z.EncBinary() + _ = yym2905 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2897 := !z.EncBinary() - yy2arr2897 := z.EncBasicHandle().StructToArray - var yyq2897 [2]bool - _, _, _ = yysep2897, yyq2897, yy2arr2897 - const yyr2897 bool = false - var yynn2897 int - if yyr2897 || yy2arr2897 { + yysep2906 := !z.EncBinary() + yy2arr2906 := z.EncBasicHandle().StructToArray + var yyq2906 [2]bool + _, _, _ = yysep2906, yyq2906, yy2arr2906 + const yyr2906 bool = false + var yynn2906 int + if yyr2906 || yy2arr2906 { r.EncodeArrayStart(2) } else { - yynn2897 = 2 - for _, b := range yyq2897 { + yynn2906 = 2 + for _, b := range yyq2906 { if b { - yynn2897++ + yynn2906++ } } - r.EncodeMapStart(yynn2897) - yynn2897 = 0 + r.EncodeMapStart(yynn2906) + yynn2906 = 0 } - if yyr2897 || yy2arr2897 { + if yyr2906 || yy2arr2906 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Name.CodecEncodeSelf(e) } else { @@ -37255,10 +37333,10 @@ func (x *AttachedVolume) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Name.CodecEncodeSelf(e) } - if yyr2897 || yy2arr2897 { + if yyr2906 || yy2arr2906 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2900 := z.EncBinary() - _ = yym2900 + yym2909 := z.EncBinary() + _ = yym2909 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.DevicePath)) @@ -37267,14 +37345,14 @@ func (x *AttachedVolume) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("devicePath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2901 := z.EncBinary() - _ = yym2901 + yym2910 := z.EncBinary() + _ = yym2910 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.DevicePath)) } } - if yyr2897 || yy2arr2897 { + if yyr2906 || yy2arr2906 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -37287,25 +37365,25 @@ func (x *AttachedVolume) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2902 := z.DecBinary() - _ = yym2902 + yym2911 := z.DecBinary() + _ = yym2911 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2903 := r.ContainerType() - if yyct2903 == codecSelferValueTypeMap1234 { - yyl2903 := r.ReadMapStart() - if yyl2903 == 0 { + yyct2912 := r.ContainerType() + if yyct2912 == codecSelferValueTypeMap1234 { + yyl2912 := r.ReadMapStart() + if yyl2912 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2903, d) + x.codecDecodeSelfFromMap(yyl2912, d) } - } else if yyct2903 == codecSelferValueTypeArray1234 { - yyl2903 := r.ReadArrayStart() - if yyl2903 == 0 { + } else if yyct2912 == codecSelferValueTypeArray1234 { + yyl2912 := r.ReadArrayStart() + if yyl2912 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2903, d) + x.codecDecodeSelfFromArray(yyl2912, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -37317,12 +37395,12 @@ func (x *AttachedVolume) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2904Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2904Slc - var yyhl2904 bool = l >= 0 - for yyj2904 := 0; ; yyj2904++ { - if yyhl2904 { - if yyj2904 >= l { + var yys2913Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2913Slc + var yyhl2913 bool = l >= 0 + for yyj2913 := 0; ; yyj2913++ { + if yyhl2913 { + if yyj2913 >= l { break } } else { @@ -37331,10 +37409,10 @@ func (x *AttachedVolume) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2904Slc = r.DecodeBytes(yys2904Slc, true, true) - yys2904 := string(yys2904Slc) + yys2913Slc = r.DecodeBytes(yys2913Slc, true, true) + yys2913 := string(yys2913Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2904 { + switch yys2913 { case "name": if r.TryDecodeAsNil() { x.Name = "" @@ -37348,9 +37426,9 @@ func (x *AttachedVolume) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.DevicePath = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys2904) - } // end switch yys2904 - } // end for yyj2904 + z.DecStructFieldNotFound(-1, yys2913) + } // end switch yys2913 + } // end for yyj2913 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -37358,16 +37436,16 @@ func (x *AttachedVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2907 int - var yyb2907 bool - var yyhl2907 bool = l >= 0 - yyj2907++ - if yyhl2907 { - yyb2907 = yyj2907 > l + var yyj2916 int + var yyb2916 bool + var yyhl2916 bool = l >= 0 + yyj2916++ + if yyhl2916 { + yyb2916 = yyj2916 > l } else { - yyb2907 = r.CheckBreak() + yyb2916 = r.CheckBreak() } - if yyb2907 { + if yyb2916 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37377,13 +37455,13 @@ func (x *AttachedVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Name = UniqueVolumeName(r.DecodeString()) } - yyj2907++ - if yyhl2907 { - yyb2907 = yyj2907 > l + yyj2916++ + if yyhl2916 { + yyb2916 = yyj2916 > l } else { - yyb2907 = r.CheckBreak() + yyb2916 = r.CheckBreak() } - if yyb2907 { + if yyb2916 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37394,17 +37472,17 @@ func (x *AttachedVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.DevicePath = string(r.DecodeString()) } for { - yyj2907++ - if yyhl2907 { - yyb2907 = yyj2907 > l + yyj2916++ + if yyhl2916 { + yyb2916 = yyj2916 > l } else { - yyb2907 = r.CheckBreak() + yyb2916 = r.CheckBreak() } - if yyb2907 { + if yyb2916 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2907-1, "") + z.DecStructFieldNotFound(yyj2916-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -37416,38 +37494,38 @@ func (x *AvoidPods) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2910 := z.EncBinary() - _ = yym2910 + yym2919 := z.EncBinary() + _ = yym2919 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2911 := !z.EncBinary() - yy2arr2911 := z.EncBasicHandle().StructToArray - var yyq2911 [1]bool - _, _, _ = yysep2911, yyq2911, yy2arr2911 - const yyr2911 bool = false - yyq2911[0] = len(x.PreferAvoidPods) != 0 - var yynn2911 int - if yyr2911 || yy2arr2911 { + yysep2920 := !z.EncBinary() + yy2arr2920 := z.EncBasicHandle().StructToArray + var yyq2920 [1]bool + _, _, _ = yysep2920, yyq2920, yy2arr2920 + const yyr2920 bool = false + yyq2920[0] = len(x.PreferAvoidPods) != 0 + var yynn2920 int + if yyr2920 || yy2arr2920 { r.EncodeArrayStart(1) } else { - yynn2911 = 0 - for _, b := range yyq2911 { + yynn2920 = 0 + for _, b := range yyq2920 { if b { - yynn2911++ + yynn2920++ } } - r.EncodeMapStart(yynn2911) - yynn2911 = 0 + r.EncodeMapStart(yynn2920) + yynn2920 = 0 } - if yyr2911 || yy2arr2911 { + if yyr2920 || yy2arr2920 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2911[0] { + if yyq2920[0] { if x.PreferAvoidPods == nil { r.EncodeNil() } else { - yym2913 := z.EncBinary() - _ = yym2913 + yym2922 := z.EncBinary() + _ = yym2922 if false { } else { h.encSlicePreferAvoidPodsEntry(([]PreferAvoidPodsEntry)(x.PreferAvoidPods), e) @@ -37457,15 +37535,15 @@ func (x *AvoidPods) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2911[0] { + if yyq2920[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("preferAvoidPods")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.PreferAvoidPods == nil { r.EncodeNil() } else { - yym2914 := z.EncBinary() - _ = yym2914 + yym2923 := z.EncBinary() + _ = yym2923 if false { } else { h.encSlicePreferAvoidPodsEntry(([]PreferAvoidPodsEntry)(x.PreferAvoidPods), e) @@ -37473,7 +37551,7 @@ func (x *AvoidPods) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2911 || yy2arr2911 { + if yyr2920 || yy2arr2920 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -37486,25 +37564,25 @@ func (x *AvoidPods) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2915 := z.DecBinary() - _ = yym2915 + yym2924 := z.DecBinary() + _ = yym2924 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2916 := r.ContainerType() - if yyct2916 == codecSelferValueTypeMap1234 { - yyl2916 := r.ReadMapStart() - if yyl2916 == 0 { + yyct2925 := r.ContainerType() + if yyct2925 == codecSelferValueTypeMap1234 { + yyl2925 := r.ReadMapStart() + if yyl2925 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2916, d) + x.codecDecodeSelfFromMap(yyl2925, d) } - } else if yyct2916 == codecSelferValueTypeArray1234 { - yyl2916 := r.ReadArrayStart() - if yyl2916 == 0 { + } else if yyct2925 == codecSelferValueTypeArray1234 { + yyl2925 := r.ReadArrayStart() + if yyl2925 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2916, d) + x.codecDecodeSelfFromArray(yyl2925, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -37516,12 +37594,12 @@ func (x *AvoidPods) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2917Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2917Slc - var yyhl2917 bool = l >= 0 - for yyj2917 := 0; ; yyj2917++ { - if yyhl2917 { - if yyj2917 >= l { + var yys2926Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2926Slc + var yyhl2926 bool = l >= 0 + for yyj2926 := 0; ; yyj2926++ { + if yyhl2926 { + if yyj2926 >= l { break } } else { @@ -37530,26 +37608,26 @@ func (x *AvoidPods) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2917Slc = r.DecodeBytes(yys2917Slc, true, true) - yys2917 := string(yys2917Slc) + yys2926Slc = r.DecodeBytes(yys2926Slc, true, true) + yys2926 := string(yys2926Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2917 { + switch yys2926 { case "preferAvoidPods": if r.TryDecodeAsNil() { x.PreferAvoidPods = nil } else { - yyv2918 := &x.PreferAvoidPods - yym2919 := z.DecBinary() - _ = yym2919 + yyv2927 := &x.PreferAvoidPods + yym2928 := z.DecBinary() + _ = yym2928 if false { } else { - h.decSlicePreferAvoidPodsEntry((*[]PreferAvoidPodsEntry)(yyv2918), d) + h.decSlicePreferAvoidPodsEntry((*[]PreferAvoidPodsEntry)(yyv2927), d) } } default: - z.DecStructFieldNotFound(-1, yys2917) - } // end switch yys2917 - } // end for yyj2917 + z.DecStructFieldNotFound(-1, yys2926) + } // end switch yys2926 + } // end for yyj2926 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -37557,16 +37635,16 @@ func (x *AvoidPods) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2920 int - var yyb2920 bool - var yyhl2920 bool = l >= 0 - yyj2920++ - if yyhl2920 { - yyb2920 = yyj2920 > l + var yyj2929 int + var yyb2929 bool + var yyhl2929 bool = l >= 0 + yyj2929++ + if yyhl2929 { + yyb2929 = yyj2929 > l } else { - yyb2920 = r.CheckBreak() + yyb2929 = r.CheckBreak() } - if yyb2920 { + if yyb2929 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37574,26 +37652,26 @@ func (x *AvoidPods) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.PreferAvoidPods = nil } else { - yyv2921 := &x.PreferAvoidPods - yym2922 := z.DecBinary() - _ = yym2922 + yyv2930 := &x.PreferAvoidPods + yym2931 := z.DecBinary() + _ = yym2931 if false { } else { - h.decSlicePreferAvoidPodsEntry((*[]PreferAvoidPodsEntry)(yyv2921), d) + h.decSlicePreferAvoidPodsEntry((*[]PreferAvoidPodsEntry)(yyv2930), d) } } for { - yyj2920++ - if yyhl2920 { - yyb2920 = yyj2920 > l + yyj2929++ + if yyhl2929 { + yyb2929 = yyj2929 > l } else { - yyb2920 = r.CheckBreak() + yyb2929 = r.CheckBreak() } - if yyb2920 { + if yyb2929 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2920-1, "") + z.DecStructFieldNotFound(yyj2929-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -37605,85 +37683,85 @@ func (x *PreferAvoidPodsEntry) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2923 := z.EncBinary() - _ = yym2923 + yym2932 := z.EncBinary() + _ = yym2932 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2924 := !z.EncBinary() - yy2arr2924 := z.EncBasicHandle().StructToArray - var yyq2924 [4]bool - _, _, _ = yysep2924, yyq2924, yy2arr2924 - const yyr2924 bool = false - yyq2924[1] = true - yyq2924[2] = x.Reason != "" - yyq2924[3] = x.Message != "" - var yynn2924 int - if yyr2924 || yy2arr2924 { + yysep2933 := !z.EncBinary() + yy2arr2933 := z.EncBasicHandle().StructToArray + var yyq2933 [4]bool + _, _, _ = yysep2933, yyq2933, yy2arr2933 + const yyr2933 bool = false + yyq2933[1] = true + yyq2933[2] = x.Reason != "" + yyq2933[3] = x.Message != "" + var yynn2933 int + if yyr2933 || yy2arr2933 { r.EncodeArrayStart(4) } else { - yynn2924 = 1 - for _, b := range yyq2924 { + yynn2933 = 1 + for _, b := range yyq2933 { if b { - yynn2924++ + yynn2933++ } } - r.EncodeMapStart(yynn2924) - yynn2924 = 0 + r.EncodeMapStart(yynn2933) + yynn2933 = 0 } - if yyr2924 || yy2arr2924 { + if yyr2933 || yy2arr2933 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy2926 := &x.PodSignature - yy2926.CodecEncodeSelf(e) + yy2935 := &x.PodSignature + yy2935.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podSignature")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2927 := &x.PodSignature - yy2927.CodecEncodeSelf(e) + yy2936 := &x.PodSignature + yy2936.CodecEncodeSelf(e) } - if yyr2924 || yy2arr2924 { + if yyr2933 || yy2arr2933 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2924[1] { - yy2929 := &x.EvictionTime - yym2930 := z.EncBinary() - _ = yym2930 + if yyq2933[1] { + yy2938 := &x.EvictionTime + yym2939 := z.EncBinary() + _ = yym2939 if false { - } else if z.HasExtensions() && z.EncExt(yy2929) { - } else if yym2930 { - z.EncBinaryMarshal(yy2929) - } else if !yym2930 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2929) + } else if z.HasExtensions() && z.EncExt(yy2938) { + } else if yym2939 { + z.EncBinaryMarshal(yy2938) + } else if !yym2939 && z.IsJSONHandle() { + z.EncJSONMarshal(yy2938) } else { - z.EncFallback(yy2929) + z.EncFallback(yy2938) } } else { r.EncodeNil() } } else { - if yyq2924[1] { + if yyq2933[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("evictionTime")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2931 := &x.EvictionTime - yym2932 := z.EncBinary() - _ = yym2932 + yy2940 := &x.EvictionTime + yym2941 := z.EncBinary() + _ = yym2941 if false { - } else if z.HasExtensions() && z.EncExt(yy2931) { - } else if yym2932 { - z.EncBinaryMarshal(yy2931) - } else if !yym2932 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2931) + } else if z.HasExtensions() && z.EncExt(yy2940) { + } else if yym2941 { + z.EncBinaryMarshal(yy2940) + } else if !yym2941 && z.IsJSONHandle() { + z.EncJSONMarshal(yy2940) } else { - z.EncFallback(yy2931) + z.EncFallback(yy2940) } } } - if yyr2924 || yy2arr2924 { + if yyr2933 || yy2arr2933 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2924[2] { - yym2934 := z.EncBinary() - _ = yym2934 + if yyq2933[2] { + yym2943 := z.EncBinary() + _ = yym2943 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) @@ -37692,23 +37770,23 @@ func (x *PreferAvoidPodsEntry) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2924[2] { + if yyq2933[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("reason")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2935 := z.EncBinary() - _ = yym2935 + yym2944 := z.EncBinary() + _ = yym2944 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) } } } - if yyr2924 || yy2arr2924 { + if yyr2933 || yy2arr2933 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2924[3] { - yym2937 := z.EncBinary() - _ = yym2937 + if yyq2933[3] { + yym2946 := z.EncBinary() + _ = yym2946 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) @@ -37717,19 +37795,19 @@ func (x *PreferAvoidPodsEntry) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2924[3] { + if yyq2933[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("message")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2938 := z.EncBinary() - _ = yym2938 + yym2947 := z.EncBinary() + _ = yym2947 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) } } } - if yyr2924 || yy2arr2924 { + if yyr2933 || yy2arr2933 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -37742,25 +37820,25 @@ func (x *PreferAvoidPodsEntry) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2939 := z.DecBinary() - _ = yym2939 + yym2948 := z.DecBinary() + _ = yym2948 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2940 := r.ContainerType() - if yyct2940 == codecSelferValueTypeMap1234 { - yyl2940 := r.ReadMapStart() - if yyl2940 == 0 { + yyct2949 := r.ContainerType() + if yyct2949 == codecSelferValueTypeMap1234 { + yyl2949 := r.ReadMapStart() + if yyl2949 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2940, d) + x.codecDecodeSelfFromMap(yyl2949, d) } - } else if yyct2940 == codecSelferValueTypeArray1234 { - yyl2940 := r.ReadArrayStart() - if yyl2940 == 0 { + } else if yyct2949 == codecSelferValueTypeArray1234 { + yyl2949 := r.ReadArrayStart() + if yyl2949 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2940, d) + x.codecDecodeSelfFromArray(yyl2949, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -37772,12 +37850,12 @@ func (x *PreferAvoidPodsEntry) codecDecodeSelfFromMap(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2941Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2941Slc - var yyhl2941 bool = l >= 0 - for yyj2941 := 0; ; yyj2941++ { - if yyhl2941 { - if yyj2941 >= l { + var yys2950Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2950Slc + var yyhl2950 bool = l >= 0 + for yyj2950 := 0; ; yyj2950++ { + if yyhl2950 { + if yyj2950 >= l { break } } else { @@ -37786,32 +37864,32 @@ func (x *PreferAvoidPodsEntry) codecDecodeSelfFromMap(l int, d *codec1978.Decode } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2941Slc = r.DecodeBytes(yys2941Slc, true, true) - yys2941 := string(yys2941Slc) + yys2950Slc = r.DecodeBytes(yys2950Slc, true, true) + yys2950 := string(yys2950Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2941 { + switch yys2950 { case "podSignature": if r.TryDecodeAsNil() { x.PodSignature = PodSignature{} } else { - yyv2942 := &x.PodSignature - yyv2942.CodecDecodeSelf(d) + yyv2951 := &x.PodSignature + yyv2951.CodecDecodeSelf(d) } case "evictionTime": if r.TryDecodeAsNil() { x.EvictionTime = pkg2_unversioned.Time{} } else { - yyv2943 := &x.EvictionTime - yym2944 := z.DecBinary() - _ = yym2944 + yyv2952 := &x.EvictionTime + yym2953 := z.DecBinary() + _ = yym2953 if false { - } else if z.HasExtensions() && z.DecExt(yyv2943) { - } else if yym2944 { - z.DecBinaryUnmarshal(yyv2943) - } else if !yym2944 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv2943) + } else if z.HasExtensions() && z.DecExt(yyv2952) { + } else if yym2953 { + z.DecBinaryUnmarshal(yyv2952) + } else if !yym2953 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv2952) } else { - z.DecFallback(yyv2943, false) + z.DecFallback(yyv2952, false) } } case "reason": @@ -37827,9 +37905,9 @@ func (x *PreferAvoidPodsEntry) codecDecodeSelfFromMap(l int, d *codec1978.Decode x.Message = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys2941) - } // end switch yys2941 - } // end for yyj2941 + z.DecStructFieldNotFound(-1, yys2950) + } // end switch yys2950 + } // end for yyj2950 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -37837,16 +37915,16 @@ func (x *PreferAvoidPodsEntry) codecDecodeSelfFromArray(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2947 int - var yyb2947 bool - var yyhl2947 bool = l >= 0 - yyj2947++ - if yyhl2947 { - yyb2947 = yyj2947 > l + var yyj2956 int + var yyb2956 bool + var yyhl2956 bool = l >= 0 + yyj2956++ + if yyhl2956 { + yyb2956 = yyj2956 > l } else { - yyb2947 = r.CheckBreak() + yyb2956 = r.CheckBreak() } - if yyb2947 { + if yyb2956 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37854,16 +37932,16 @@ func (x *PreferAvoidPodsEntry) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.PodSignature = PodSignature{} } else { - yyv2948 := &x.PodSignature - yyv2948.CodecDecodeSelf(d) + yyv2957 := &x.PodSignature + yyv2957.CodecDecodeSelf(d) } - yyj2947++ - if yyhl2947 { - yyb2947 = yyj2947 > l + yyj2956++ + if yyhl2956 { + yyb2956 = yyj2956 > l } else { - yyb2947 = r.CheckBreak() + yyb2956 = r.CheckBreak() } - if yyb2947 { + if yyb2956 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37871,26 +37949,26 @@ func (x *PreferAvoidPodsEntry) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.EvictionTime = pkg2_unversioned.Time{} } else { - yyv2949 := &x.EvictionTime - yym2950 := z.DecBinary() - _ = yym2950 + yyv2958 := &x.EvictionTime + yym2959 := z.DecBinary() + _ = yym2959 if false { - } else if z.HasExtensions() && z.DecExt(yyv2949) { - } else if yym2950 { - z.DecBinaryUnmarshal(yyv2949) - } else if !yym2950 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv2949) + } else if z.HasExtensions() && z.DecExt(yyv2958) { + } else if yym2959 { + z.DecBinaryUnmarshal(yyv2958) + } else if !yym2959 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv2958) } else { - z.DecFallback(yyv2949, false) + z.DecFallback(yyv2958, false) } } - yyj2947++ - if yyhl2947 { - yyb2947 = yyj2947 > l + yyj2956++ + if yyhl2956 { + yyb2956 = yyj2956 > l } else { - yyb2947 = r.CheckBreak() + yyb2956 = r.CheckBreak() } - if yyb2947 { + if yyb2956 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37900,13 +37978,13 @@ func (x *PreferAvoidPodsEntry) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.Reason = string(r.DecodeString()) } - yyj2947++ - if yyhl2947 { - yyb2947 = yyj2947 > l + yyj2956++ + if yyhl2956 { + yyb2956 = yyj2956 > l } else { - yyb2947 = r.CheckBreak() + yyb2956 = r.CheckBreak() } - if yyb2947 { + if yyb2956 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37917,17 +37995,17 @@ func (x *PreferAvoidPodsEntry) codecDecodeSelfFromArray(l int, d *codec1978.Deco x.Message = string(r.DecodeString()) } for { - yyj2947++ - if yyhl2947 { - yyb2947 = yyj2947 > l + yyj2956++ + if yyhl2956 { + yyb2956 = yyj2956 > l } else { - yyb2947 = r.CheckBreak() + yyb2956 = r.CheckBreak() } - if yyb2947 { + if yyb2956 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2947-1, "") + z.DecStructFieldNotFound(yyj2956-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -37939,33 +38017,33 @@ func (x *PodSignature) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2953 := z.EncBinary() - _ = yym2953 + yym2962 := z.EncBinary() + _ = yym2962 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2954 := !z.EncBinary() - yy2arr2954 := z.EncBasicHandle().StructToArray - var yyq2954 [1]bool - _, _, _ = yysep2954, yyq2954, yy2arr2954 - const yyr2954 bool = false - yyq2954[0] = x.PodController != nil - var yynn2954 int - if yyr2954 || yy2arr2954 { + yysep2963 := !z.EncBinary() + yy2arr2963 := z.EncBasicHandle().StructToArray + var yyq2963 [1]bool + _, _, _ = yysep2963, yyq2963, yy2arr2963 + const yyr2963 bool = false + yyq2963[0] = x.PodController != nil + var yynn2963 int + if yyr2963 || yy2arr2963 { r.EncodeArrayStart(1) } else { - yynn2954 = 0 - for _, b := range yyq2954 { + yynn2963 = 0 + for _, b := range yyq2963 { if b { - yynn2954++ + yynn2963++ } } - r.EncodeMapStart(yynn2954) - yynn2954 = 0 + r.EncodeMapStart(yynn2963) + yynn2963 = 0 } - if yyr2954 || yy2arr2954 { + if yyr2963 || yy2arr2963 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2954[0] { + if yyq2963[0] { if x.PodController == nil { r.EncodeNil() } else { @@ -37975,7 +38053,7 @@ func (x *PodSignature) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2954[0] { + if yyq2963[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podController")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -37986,7 +38064,7 @@ func (x *PodSignature) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2954 || yy2arr2954 { + if yyr2963 || yy2arr2963 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -37999,25 +38077,25 @@ func (x *PodSignature) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2956 := z.DecBinary() - _ = yym2956 + yym2965 := z.DecBinary() + _ = yym2965 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2957 := r.ContainerType() - if yyct2957 == codecSelferValueTypeMap1234 { - yyl2957 := r.ReadMapStart() - if yyl2957 == 0 { + yyct2966 := r.ContainerType() + if yyct2966 == codecSelferValueTypeMap1234 { + yyl2966 := r.ReadMapStart() + if yyl2966 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2957, d) + x.codecDecodeSelfFromMap(yyl2966, d) } - } else if yyct2957 == codecSelferValueTypeArray1234 { - yyl2957 := r.ReadArrayStart() - if yyl2957 == 0 { + } else if yyct2966 == codecSelferValueTypeArray1234 { + yyl2966 := r.ReadArrayStart() + if yyl2966 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2957, d) + x.codecDecodeSelfFromArray(yyl2966, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -38029,12 +38107,12 @@ func (x *PodSignature) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2958Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2958Slc - var yyhl2958 bool = l >= 0 - for yyj2958 := 0; ; yyj2958++ { - if yyhl2958 { - if yyj2958 >= l { + var yys2967Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2967Slc + var yyhl2967 bool = l >= 0 + for yyj2967 := 0; ; yyj2967++ { + if yyhl2967 { + if yyj2967 >= l { break } } else { @@ -38043,10 +38121,10 @@ func (x *PodSignature) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2958Slc = r.DecodeBytes(yys2958Slc, true, true) - yys2958 := string(yys2958Slc) + yys2967Slc = r.DecodeBytes(yys2967Slc, true, true) + yys2967 := string(yys2967Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2958 { + switch yys2967 { case "podController": if r.TryDecodeAsNil() { if x.PodController != nil { @@ -38059,9 +38137,9 @@ func (x *PodSignature) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.PodController.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2958) - } // end switch yys2958 - } // end for yyj2958 + z.DecStructFieldNotFound(-1, yys2967) + } // end switch yys2967 + } // end for yyj2967 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -38069,16 +38147,16 @@ func (x *PodSignature) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2960 int - var yyb2960 bool - var yyhl2960 bool = l >= 0 - yyj2960++ - if yyhl2960 { - yyb2960 = yyj2960 > l + var yyj2969 int + var yyb2969 bool + var yyhl2969 bool = l >= 0 + yyj2969++ + if yyhl2969 { + yyb2969 = yyj2969 > l } else { - yyb2960 = r.CheckBreak() + yyb2969 = r.CheckBreak() } - if yyb2960 { + if yyb2969 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38094,17 +38172,17 @@ func (x *PodSignature) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.PodController.CodecDecodeSelf(d) } for { - yyj2960++ - if yyhl2960 { - yyb2960 = yyj2960 > l + yyj2969++ + if yyhl2969 { + yyb2969 = yyj2969 > l } else { - yyb2960 = r.CheckBreak() + yyb2969 = r.CheckBreak() } - if yyb2960 { + if yyb2969 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2960-1, "") + z.DecStructFieldNotFound(yyj2969-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -38116,37 +38194,37 @@ func (x *ContainerImage) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2962 := z.EncBinary() - _ = yym2962 + yym2971 := z.EncBinary() + _ = yym2971 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2963 := !z.EncBinary() - yy2arr2963 := z.EncBasicHandle().StructToArray - var yyq2963 [2]bool - _, _, _ = yysep2963, yyq2963, yy2arr2963 - const yyr2963 bool = false - yyq2963[1] = x.SizeBytes != 0 - var yynn2963 int - if yyr2963 || yy2arr2963 { + yysep2972 := !z.EncBinary() + yy2arr2972 := z.EncBasicHandle().StructToArray + var yyq2972 [2]bool + _, _, _ = yysep2972, yyq2972, yy2arr2972 + const yyr2972 bool = false + yyq2972[1] = x.SizeBytes != 0 + var yynn2972 int + if yyr2972 || yy2arr2972 { r.EncodeArrayStart(2) } else { - yynn2963 = 1 - for _, b := range yyq2963 { + yynn2972 = 1 + for _, b := range yyq2972 { if b { - yynn2963++ + yynn2972++ } } - r.EncodeMapStart(yynn2963) - yynn2963 = 0 + r.EncodeMapStart(yynn2972) + yynn2972 = 0 } - if yyr2963 || yy2arr2963 { + if yyr2972 || yy2arr2972 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Names == nil { r.EncodeNil() } else { - yym2965 := z.EncBinary() - _ = yym2965 + yym2974 := z.EncBinary() + _ = yym2974 if false { } else { z.F.EncSliceStringV(x.Names, false, e) @@ -38159,19 +38237,19 @@ func (x *ContainerImage) CodecEncodeSelf(e *codec1978.Encoder) { if x.Names == nil { r.EncodeNil() } else { - yym2966 := z.EncBinary() - _ = yym2966 + yym2975 := z.EncBinary() + _ = yym2975 if false { } else { z.F.EncSliceStringV(x.Names, false, e) } } } - if yyr2963 || yy2arr2963 { + if yyr2972 || yy2arr2972 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2963[1] { - yym2968 := z.EncBinary() - _ = yym2968 + if yyq2972[1] { + yym2977 := z.EncBinary() + _ = yym2977 if false { } else { r.EncodeInt(int64(x.SizeBytes)) @@ -38180,19 +38258,19 @@ func (x *ContainerImage) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq2963[1] { + if yyq2972[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("sizeBytes")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2969 := z.EncBinary() - _ = yym2969 + yym2978 := z.EncBinary() + _ = yym2978 if false { } else { r.EncodeInt(int64(x.SizeBytes)) } } } - if yyr2963 || yy2arr2963 { + if yyr2972 || yy2arr2972 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -38205,25 +38283,25 @@ func (x *ContainerImage) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2970 := z.DecBinary() - _ = yym2970 + yym2979 := z.DecBinary() + _ = yym2979 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2971 := r.ContainerType() - if yyct2971 == codecSelferValueTypeMap1234 { - yyl2971 := r.ReadMapStart() - if yyl2971 == 0 { + yyct2980 := r.ContainerType() + if yyct2980 == codecSelferValueTypeMap1234 { + yyl2980 := r.ReadMapStart() + if yyl2980 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2971, d) + x.codecDecodeSelfFromMap(yyl2980, d) } - } else if yyct2971 == codecSelferValueTypeArray1234 { - yyl2971 := r.ReadArrayStart() - if yyl2971 == 0 { + } else if yyct2980 == codecSelferValueTypeArray1234 { + yyl2980 := r.ReadArrayStart() + if yyl2980 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2971, d) + x.codecDecodeSelfFromArray(yyl2980, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -38235,12 +38313,12 @@ func (x *ContainerImage) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2972Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2972Slc - var yyhl2972 bool = l >= 0 - for yyj2972 := 0; ; yyj2972++ { - if yyhl2972 { - if yyj2972 >= l { + var yys2981Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2981Slc + var yyhl2981 bool = l >= 0 + for yyj2981 := 0; ; yyj2981++ { + if yyhl2981 { + if yyj2981 >= l { break } } else { @@ -38249,20 +38327,20 @@ func (x *ContainerImage) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2972Slc = r.DecodeBytes(yys2972Slc, true, true) - yys2972 := string(yys2972Slc) + yys2981Slc = r.DecodeBytes(yys2981Slc, true, true) + yys2981 := string(yys2981Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2972 { + switch yys2981 { case "names": if r.TryDecodeAsNil() { x.Names = nil } else { - yyv2973 := &x.Names - yym2974 := z.DecBinary() - _ = yym2974 + yyv2982 := &x.Names + yym2983 := z.DecBinary() + _ = yym2983 if false { } else { - z.F.DecSliceStringX(yyv2973, false, d) + z.F.DecSliceStringX(yyv2982, false, d) } } case "sizeBytes": @@ -38272,9 +38350,9 @@ func (x *ContainerImage) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.SizeBytes = int64(r.DecodeInt(64)) } default: - z.DecStructFieldNotFound(-1, yys2972) - } // end switch yys2972 - } // end for yyj2972 + z.DecStructFieldNotFound(-1, yys2981) + } // end switch yys2981 + } // end for yyj2981 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -38282,16 +38360,16 @@ func (x *ContainerImage) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2976 int - var yyb2976 bool - var yyhl2976 bool = l >= 0 - yyj2976++ - if yyhl2976 { - yyb2976 = yyj2976 > l + var yyj2985 int + var yyb2985 bool + var yyhl2985 bool = l >= 0 + yyj2985++ + if yyhl2985 { + yyb2985 = yyj2985 > l } else { - yyb2976 = r.CheckBreak() + yyb2985 = r.CheckBreak() } - if yyb2976 { + if yyb2985 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38299,21 +38377,21 @@ func (x *ContainerImage) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Names = nil } else { - yyv2977 := &x.Names - yym2978 := z.DecBinary() - _ = yym2978 + yyv2986 := &x.Names + yym2987 := z.DecBinary() + _ = yym2987 if false { } else { - z.F.DecSliceStringX(yyv2977, false, d) + z.F.DecSliceStringX(yyv2986, false, d) } } - yyj2976++ - if yyhl2976 { - yyb2976 = yyj2976 > l + yyj2985++ + if yyhl2985 { + yyb2985 = yyj2985 > l } else { - yyb2976 = r.CheckBreak() + yyb2985 = r.CheckBreak() } - if yyb2976 { + if yyb2985 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38324,17 +38402,17 @@ func (x *ContainerImage) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.SizeBytes = int64(r.DecodeInt(64)) } for { - yyj2976++ - if yyhl2976 { - yyb2976 = yyj2976 > l + yyj2985++ + if yyhl2985 { + yyb2985 = yyj2985 > l } else { - yyb2976 = r.CheckBreak() + yyb2985 = r.CheckBreak() } - if yyb2976 { + if yyb2985 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2976-1, "") + z.DecStructFieldNotFound(yyj2985-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -38343,8 +38421,8 @@ func (x NodePhase) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym2980 := z.EncBinary() - _ = yym2980 + yym2989 := z.EncBinary() + _ = yym2989 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -38356,8 +38434,8 @@ func (x *NodePhase) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2981 := z.DecBinary() - _ = yym2981 + yym2990 := z.DecBinary() + _ = yym2990 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -38369,8 +38447,8 @@ func (x NodeConditionType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym2982 := z.EncBinary() - _ = yym2982 + yym2991 := z.EncBinary() + _ = yym2991 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -38382,8 +38460,8 @@ func (x *NodeConditionType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2983 := z.DecBinary() - _ = yym2983 + yym2992 := z.DecBinary() + _ = yym2992 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -38398,34 +38476,34 @@ func (x *NodeCondition) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2984 := z.EncBinary() - _ = yym2984 + yym2993 := z.EncBinary() + _ = yym2993 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2985 := !z.EncBinary() - yy2arr2985 := z.EncBasicHandle().StructToArray - var yyq2985 [6]bool - _, _, _ = yysep2985, yyq2985, yy2arr2985 - const yyr2985 bool = false - yyq2985[2] = true - yyq2985[3] = true - yyq2985[4] = x.Reason != "" - yyq2985[5] = x.Message != "" - var yynn2985 int - if yyr2985 || yy2arr2985 { + yysep2994 := !z.EncBinary() + yy2arr2994 := z.EncBasicHandle().StructToArray + var yyq2994 [6]bool + _, _, _ = yysep2994, yyq2994, yy2arr2994 + const yyr2994 bool = false + yyq2994[2] = true + yyq2994[3] = true + yyq2994[4] = x.Reason != "" + yyq2994[5] = x.Message != "" + var yynn2994 int + if yyr2994 || yy2arr2994 { r.EncodeArrayStart(6) } else { - yynn2985 = 2 - for _, b := range yyq2985 { + yynn2994 = 2 + for _, b := range yyq2994 { if b { - yynn2985++ + yynn2994++ } } - r.EncodeMapStart(yynn2985) - yynn2985 = 0 + r.EncodeMapStart(yynn2994) + yynn2994 = 0 } - if yyr2985 || yy2arr2985 { + if yyr2994 || yy2arr2994 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Type.CodecEncodeSelf(e) } else { @@ -38434,7 +38512,7 @@ func (x *NodeCondition) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } - if yyr2985 || yy2arr2985 { + if yyr2994 || yy2arr2994 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Status.CodecEncodeSelf(e) } else { @@ -38443,85 +38521,85 @@ func (x *NodeCondition) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Status.CodecEncodeSelf(e) } - if yyr2985 || yy2arr2985 { + if yyr2994 || yy2arr2994 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2985[2] { - yy2989 := &x.LastHeartbeatTime - yym2990 := z.EncBinary() - _ = yym2990 + if yyq2994[2] { + yy2998 := &x.LastHeartbeatTime + yym2999 := z.EncBinary() + _ = yym2999 if false { - } else if z.HasExtensions() && z.EncExt(yy2989) { - } else if yym2990 { - z.EncBinaryMarshal(yy2989) - } else if !yym2990 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2989) + } else if z.HasExtensions() && z.EncExt(yy2998) { + } else if yym2999 { + z.EncBinaryMarshal(yy2998) + } else if !yym2999 && z.IsJSONHandle() { + z.EncJSONMarshal(yy2998) } else { - z.EncFallback(yy2989) + z.EncFallback(yy2998) } } else { r.EncodeNil() } } else { - if yyq2985[2] { + if yyq2994[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("lastHeartbeatTime")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2991 := &x.LastHeartbeatTime - yym2992 := z.EncBinary() - _ = yym2992 + yy3000 := &x.LastHeartbeatTime + yym3001 := z.EncBinary() + _ = yym3001 if false { - } else if z.HasExtensions() && z.EncExt(yy2991) { - } else if yym2992 { - z.EncBinaryMarshal(yy2991) - } else if !yym2992 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2991) + } else if z.HasExtensions() && z.EncExt(yy3000) { + } else if yym3001 { + z.EncBinaryMarshal(yy3000) + } else if !yym3001 && z.IsJSONHandle() { + z.EncJSONMarshal(yy3000) } else { - z.EncFallback(yy2991) + z.EncFallback(yy3000) } } } - if yyr2985 || yy2arr2985 { + if yyr2994 || yy2arr2994 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2985[3] { - yy2994 := &x.LastTransitionTime - yym2995 := z.EncBinary() - _ = yym2995 + if yyq2994[3] { + yy3003 := &x.LastTransitionTime + yym3004 := z.EncBinary() + _ = yym3004 if false { - } else if z.HasExtensions() && z.EncExt(yy2994) { - } else if yym2995 { - z.EncBinaryMarshal(yy2994) - } else if !yym2995 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2994) + } else if z.HasExtensions() && z.EncExt(yy3003) { + } else if yym3004 { + z.EncBinaryMarshal(yy3003) + } else if !yym3004 && z.IsJSONHandle() { + z.EncJSONMarshal(yy3003) } else { - z.EncFallback(yy2994) + z.EncFallback(yy3003) } } else { r.EncodeNil() } } else { - if yyq2985[3] { + if yyq2994[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2996 := &x.LastTransitionTime - yym2997 := z.EncBinary() - _ = yym2997 + yy3005 := &x.LastTransitionTime + yym3006 := z.EncBinary() + _ = yym3006 if false { - } else if z.HasExtensions() && z.EncExt(yy2996) { - } else if yym2997 { - z.EncBinaryMarshal(yy2996) - } else if !yym2997 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2996) + } else if z.HasExtensions() && z.EncExt(yy3005) { + } else if yym3006 { + z.EncBinaryMarshal(yy3005) + } else if !yym3006 && z.IsJSONHandle() { + z.EncJSONMarshal(yy3005) } else { - z.EncFallback(yy2996) + z.EncFallback(yy3005) } } } - if yyr2985 || yy2arr2985 { + if yyr2994 || yy2arr2994 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2985[4] { - yym2999 := z.EncBinary() - _ = yym2999 + if yyq2994[4] { + yym3008 := z.EncBinary() + _ = yym3008 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) @@ -38530,23 +38608,23 @@ func (x *NodeCondition) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2985[4] { + if yyq2994[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("reason")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3000 := z.EncBinary() - _ = yym3000 + yym3009 := z.EncBinary() + _ = yym3009 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) } } } - if yyr2985 || yy2arr2985 { + if yyr2994 || yy2arr2994 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2985[5] { - yym3002 := z.EncBinary() - _ = yym3002 + if yyq2994[5] { + yym3011 := z.EncBinary() + _ = yym3011 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) @@ -38555,19 +38633,19 @@ func (x *NodeCondition) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2985[5] { + if yyq2994[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("message")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3003 := z.EncBinary() - _ = yym3003 + yym3012 := z.EncBinary() + _ = yym3012 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) } } } - if yyr2985 || yy2arr2985 { + if yyr2994 || yy2arr2994 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -38580,25 +38658,25 @@ func (x *NodeCondition) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3004 := z.DecBinary() - _ = yym3004 + yym3013 := z.DecBinary() + _ = yym3013 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3005 := r.ContainerType() - if yyct3005 == codecSelferValueTypeMap1234 { - yyl3005 := r.ReadMapStart() - if yyl3005 == 0 { + yyct3014 := r.ContainerType() + if yyct3014 == codecSelferValueTypeMap1234 { + yyl3014 := r.ReadMapStart() + if yyl3014 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3005, d) + x.codecDecodeSelfFromMap(yyl3014, d) } - } else if yyct3005 == codecSelferValueTypeArray1234 { - yyl3005 := r.ReadArrayStart() - if yyl3005 == 0 { + } else if yyct3014 == codecSelferValueTypeArray1234 { + yyl3014 := r.ReadArrayStart() + if yyl3014 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3005, d) + x.codecDecodeSelfFromArray(yyl3014, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -38610,12 +38688,12 @@ func (x *NodeCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3006Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3006Slc - var yyhl3006 bool = l >= 0 - for yyj3006 := 0; ; yyj3006++ { - if yyhl3006 { - if yyj3006 >= l { + var yys3015Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3015Slc + var yyhl3015 bool = l >= 0 + for yyj3015 := 0; ; yyj3015++ { + if yyhl3015 { + if yyj3015 >= l { break } } else { @@ -38624,10 +38702,10 @@ func (x *NodeCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3006Slc = r.DecodeBytes(yys3006Slc, true, true) - yys3006 := string(yys3006Slc) + yys3015Slc = r.DecodeBytes(yys3015Slc, true, true) + yys3015 := string(yys3015Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3006 { + switch yys3015 { case "type": if r.TryDecodeAsNil() { x.Type = "" @@ -38644,34 +38722,34 @@ func (x *NodeCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.LastHeartbeatTime = pkg2_unversioned.Time{} } else { - yyv3009 := &x.LastHeartbeatTime - yym3010 := z.DecBinary() - _ = yym3010 + yyv3018 := &x.LastHeartbeatTime + yym3019 := z.DecBinary() + _ = yym3019 if false { - } else if z.HasExtensions() && z.DecExt(yyv3009) { - } else if yym3010 { - z.DecBinaryUnmarshal(yyv3009) - } else if !yym3010 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3009) + } else if z.HasExtensions() && z.DecExt(yyv3018) { + } else if yym3019 { + z.DecBinaryUnmarshal(yyv3018) + } else if !yym3019 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3018) } else { - z.DecFallback(yyv3009, false) + z.DecFallback(yyv3018, false) } } case "lastTransitionTime": if r.TryDecodeAsNil() { x.LastTransitionTime = pkg2_unversioned.Time{} } else { - yyv3011 := &x.LastTransitionTime - yym3012 := z.DecBinary() - _ = yym3012 + yyv3020 := &x.LastTransitionTime + yym3021 := z.DecBinary() + _ = yym3021 if false { - } else if z.HasExtensions() && z.DecExt(yyv3011) { - } else if yym3012 { - z.DecBinaryUnmarshal(yyv3011) - } else if !yym3012 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3011) + } else if z.HasExtensions() && z.DecExt(yyv3020) { + } else if yym3021 { + z.DecBinaryUnmarshal(yyv3020) + } else if !yym3021 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3020) } else { - z.DecFallback(yyv3011, false) + z.DecFallback(yyv3020, false) } } case "reason": @@ -38687,9 +38765,9 @@ func (x *NodeCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Message = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3006) - } // end switch yys3006 - } // end for yyj3006 + z.DecStructFieldNotFound(-1, yys3015) + } // end switch yys3015 + } // end for yyj3015 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -38697,16 +38775,16 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3015 int - var yyb3015 bool - var yyhl3015 bool = l >= 0 - yyj3015++ - if yyhl3015 { - yyb3015 = yyj3015 > l + var yyj3024 int + var yyb3024 bool + var yyhl3024 bool = l >= 0 + yyj3024++ + if yyhl3024 { + yyb3024 = yyj3024 > l } else { - yyb3015 = r.CheckBreak() + yyb3024 = r.CheckBreak() } - if yyb3015 { + if yyb3024 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38716,13 +38794,13 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Type = NodeConditionType(r.DecodeString()) } - yyj3015++ - if yyhl3015 { - yyb3015 = yyj3015 > l + yyj3024++ + if yyhl3024 { + yyb3024 = yyj3024 > l } else { - yyb3015 = r.CheckBreak() + yyb3024 = r.CheckBreak() } - if yyb3015 { + if yyb3024 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38732,13 +38810,13 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Status = ConditionStatus(r.DecodeString()) } - yyj3015++ - if yyhl3015 { - yyb3015 = yyj3015 > l + yyj3024++ + if yyhl3024 { + yyb3024 = yyj3024 > l } else { - yyb3015 = r.CheckBreak() + yyb3024 = r.CheckBreak() } - if yyb3015 { + if yyb3024 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38746,26 +38824,26 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.LastHeartbeatTime = pkg2_unversioned.Time{} } else { - yyv3018 := &x.LastHeartbeatTime - yym3019 := z.DecBinary() - _ = yym3019 + yyv3027 := &x.LastHeartbeatTime + yym3028 := z.DecBinary() + _ = yym3028 if false { - } else if z.HasExtensions() && z.DecExt(yyv3018) { - } else if yym3019 { - z.DecBinaryUnmarshal(yyv3018) - } else if !yym3019 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3018) + } else if z.HasExtensions() && z.DecExt(yyv3027) { + } else if yym3028 { + z.DecBinaryUnmarshal(yyv3027) + } else if !yym3028 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3027) } else { - z.DecFallback(yyv3018, false) + z.DecFallback(yyv3027, false) } } - yyj3015++ - if yyhl3015 { - yyb3015 = yyj3015 > l + yyj3024++ + if yyhl3024 { + yyb3024 = yyj3024 > l } else { - yyb3015 = r.CheckBreak() + yyb3024 = r.CheckBreak() } - if yyb3015 { + if yyb3024 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38773,26 +38851,26 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.LastTransitionTime = pkg2_unversioned.Time{} } else { - yyv3020 := &x.LastTransitionTime - yym3021 := z.DecBinary() - _ = yym3021 + yyv3029 := &x.LastTransitionTime + yym3030 := z.DecBinary() + _ = yym3030 if false { - } else if z.HasExtensions() && z.DecExt(yyv3020) { - } else if yym3021 { - z.DecBinaryUnmarshal(yyv3020) - } else if !yym3021 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3020) + } else if z.HasExtensions() && z.DecExt(yyv3029) { + } else if yym3030 { + z.DecBinaryUnmarshal(yyv3029) + } else if !yym3030 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3029) } else { - z.DecFallback(yyv3020, false) + z.DecFallback(yyv3029, false) } } - yyj3015++ - if yyhl3015 { - yyb3015 = yyj3015 > l + yyj3024++ + if yyhl3024 { + yyb3024 = yyj3024 > l } else { - yyb3015 = r.CheckBreak() + yyb3024 = r.CheckBreak() } - if yyb3015 { + if yyb3024 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38802,13 +38880,13 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Reason = string(r.DecodeString()) } - yyj3015++ - if yyhl3015 { - yyb3015 = yyj3015 > l + yyj3024++ + if yyhl3024 { + yyb3024 = yyj3024 > l } else { - yyb3015 = r.CheckBreak() + yyb3024 = r.CheckBreak() } - if yyb3015 { + if yyb3024 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38819,17 +38897,17 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Message = string(r.DecodeString()) } for { - yyj3015++ - if yyhl3015 { - yyb3015 = yyj3015 > l + yyj3024++ + if yyhl3024 { + yyb3024 = yyj3024 > l } else { - yyb3015 = r.CheckBreak() + yyb3024 = r.CheckBreak() } - if yyb3015 { + if yyb3024 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3015-1, "") + z.DecStructFieldNotFound(yyj3024-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -38838,8 +38916,8 @@ func (x NodeAddressType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym3024 := z.EncBinary() - _ = yym3024 + yym3033 := z.EncBinary() + _ = yym3033 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -38851,8 +38929,8 @@ func (x *NodeAddressType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3025 := z.DecBinary() - _ = yym3025 + yym3034 := z.DecBinary() + _ = yym3034 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -38867,30 +38945,30 @@ func (x *NodeAddress) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3026 := z.EncBinary() - _ = yym3026 + yym3035 := z.EncBinary() + _ = yym3035 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3027 := !z.EncBinary() - yy2arr3027 := z.EncBasicHandle().StructToArray - var yyq3027 [2]bool - _, _, _ = yysep3027, yyq3027, yy2arr3027 - const yyr3027 bool = false - var yynn3027 int - if yyr3027 || yy2arr3027 { + yysep3036 := !z.EncBinary() + yy2arr3036 := z.EncBasicHandle().StructToArray + var yyq3036 [2]bool + _, _, _ = yysep3036, yyq3036, yy2arr3036 + const yyr3036 bool = false + var yynn3036 int + if yyr3036 || yy2arr3036 { r.EncodeArrayStart(2) } else { - yynn3027 = 2 - for _, b := range yyq3027 { + yynn3036 = 2 + for _, b := range yyq3036 { if b { - yynn3027++ + yynn3036++ } } - r.EncodeMapStart(yynn3027) - yynn3027 = 0 + r.EncodeMapStart(yynn3036) + yynn3036 = 0 } - if yyr3027 || yy2arr3027 { + if yyr3036 || yy2arr3036 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Type.CodecEncodeSelf(e) } else { @@ -38899,10 +38977,10 @@ func (x *NodeAddress) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } - if yyr3027 || yy2arr3027 { + if yyr3036 || yy2arr3036 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3030 := z.EncBinary() - _ = yym3030 + yym3039 := z.EncBinary() + _ = yym3039 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Address)) @@ -38911,14 +38989,14 @@ func (x *NodeAddress) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("address")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3031 := z.EncBinary() - _ = yym3031 + yym3040 := z.EncBinary() + _ = yym3040 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Address)) } } - if yyr3027 || yy2arr3027 { + if yyr3036 || yy2arr3036 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -38931,25 +39009,25 @@ func (x *NodeAddress) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3032 := z.DecBinary() - _ = yym3032 + yym3041 := z.DecBinary() + _ = yym3041 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3033 := r.ContainerType() - if yyct3033 == codecSelferValueTypeMap1234 { - yyl3033 := r.ReadMapStart() - if yyl3033 == 0 { + yyct3042 := r.ContainerType() + if yyct3042 == codecSelferValueTypeMap1234 { + yyl3042 := r.ReadMapStart() + if yyl3042 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3033, d) + x.codecDecodeSelfFromMap(yyl3042, d) } - } else if yyct3033 == codecSelferValueTypeArray1234 { - yyl3033 := r.ReadArrayStart() - if yyl3033 == 0 { + } else if yyct3042 == codecSelferValueTypeArray1234 { + yyl3042 := r.ReadArrayStart() + if yyl3042 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3033, d) + x.codecDecodeSelfFromArray(yyl3042, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -38961,12 +39039,12 @@ func (x *NodeAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3034Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3034Slc - var yyhl3034 bool = l >= 0 - for yyj3034 := 0; ; yyj3034++ { - if yyhl3034 { - if yyj3034 >= l { + var yys3043Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3043Slc + var yyhl3043 bool = l >= 0 + for yyj3043 := 0; ; yyj3043++ { + if yyhl3043 { + if yyj3043 >= l { break } } else { @@ -38975,10 +39053,10 @@ func (x *NodeAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3034Slc = r.DecodeBytes(yys3034Slc, true, true) - yys3034 := string(yys3034Slc) + yys3043Slc = r.DecodeBytes(yys3043Slc, true, true) + yys3043 := string(yys3043Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3034 { + switch yys3043 { case "type": if r.TryDecodeAsNil() { x.Type = "" @@ -38992,9 +39070,9 @@ func (x *NodeAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Address = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3034) - } // end switch yys3034 - } // end for yyj3034 + z.DecStructFieldNotFound(-1, yys3043) + } // end switch yys3043 + } // end for yyj3043 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -39002,16 +39080,16 @@ func (x *NodeAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3037 int - var yyb3037 bool - var yyhl3037 bool = l >= 0 - yyj3037++ - if yyhl3037 { - yyb3037 = yyj3037 > l + var yyj3046 int + var yyb3046 bool + var yyhl3046 bool = l >= 0 + yyj3046++ + if yyhl3046 { + yyb3046 = yyj3046 > l } else { - yyb3037 = r.CheckBreak() + yyb3046 = r.CheckBreak() } - if yyb3037 { + if yyb3046 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39021,13 +39099,13 @@ func (x *NodeAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Type = NodeAddressType(r.DecodeString()) } - yyj3037++ - if yyhl3037 { - yyb3037 = yyj3037 > l + yyj3046++ + if yyhl3046 { + yyb3046 = yyj3046 > l } else { - yyb3037 = r.CheckBreak() + yyb3046 = r.CheckBreak() } - if yyb3037 { + if yyb3046 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39038,17 +39116,17 @@ func (x *NodeAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Address = string(r.DecodeString()) } for { - yyj3037++ - if yyhl3037 { - yyb3037 = yyj3037 > l + yyj3046++ + if yyhl3046 { + yyb3046 = yyj3046 > l } else { - yyb3037 = r.CheckBreak() + yyb3046 = r.CheckBreak() } - if yyb3037 { + if yyb3046 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3037-1, "") + z.DecStructFieldNotFound(yyj3046-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -39060,33 +39138,33 @@ func (x *NodeResources) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3040 := z.EncBinary() - _ = yym3040 + yym3049 := z.EncBinary() + _ = yym3049 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3041 := !z.EncBinary() - yy2arr3041 := z.EncBasicHandle().StructToArray - var yyq3041 [1]bool - _, _, _ = yysep3041, yyq3041, yy2arr3041 - const yyr3041 bool = false - yyq3041[0] = len(x.Capacity) != 0 - var yynn3041 int - if yyr3041 || yy2arr3041 { + yysep3050 := !z.EncBinary() + yy2arr3050 := z.EncBasicHandle().StructToArray + var yyq3050 [1]bool + _, _, _ = yysep3050, yyq3050, yy2arr3050 + const yyr3050 bool = false + yyq3050[0] = len(x.Capacity) != 0 + var yynn3050 int + if yyr3050 || yy2arr3050 { r.EncodeArrayStart(1) } else { - yynn3041 = 0 - for _, b := range yyq3041 { + yynn3050 = 0 + for _, b := range yyq3050 { if b { - yynn3041++ + yynn3050++ } } - r.EncodeMapStart(yynn3041) - yynn3041 = 0 + r.EncodeMapStart(yynn3050) + yynn3050 = 0 } - if yyr3041 || yy2arr3041 { + if yyr3050 || yy2arr3050 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3041[0] { + if yyq3050[0] { if x.Capacity == nil { r.EncodeNil() } else { @@ -39096,7 +39174,7 @@ func (x *NodeResources) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3041[0] { + if yyq3050[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("capacity")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -39107,7 +39185,7 @@ func (x *NodeResources) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3041 || yy2arr3041 { + if yyr3050 || yy2arr3050 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -39120,25 +39198,25 @@ func (x *NodeResources) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3043 := z.DecBinary() - _ = yym3043 + yym3052 := z.DecBinary() + _ = yym3052 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3044 := r.ContainerType() - if yyct3044 == codecSelferValueTypeMap1234 { - yyl3044 := r.ReadMapStart() - if yyl3044 == 0 { + yyct3053 := r.ContainerType() + if yyct3053 == codecSelferValueTypeMap1234 { + yyl3053 := r.ReadMapStart() + if yyl3053 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3044, d) + x.codecDecodeSelfFromMap(yyl3053, d) } - } else if yyct3044 == codecSelferValueTypeArray1234 { - yyl3044 := r.ReadArrayStart() - if yyl3044 == 0 { + } else if yyct3053 == codecSelferValueTypeArray1234 { + yyl3053 := r.ReadArrayStart() + if yyl3053 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3044, d) + x.codecDecodeSelfFromArray(yyl3053, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -39150,12 +39228,12 @@ func (x *NodeResources) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3045Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3045Slc - var yyhl3045 bool = l >= 0 - for yyj3045 := 0; ; yyj3045++ { - if yyhl3045 { - if yyj3045 >= l { + var yys3054Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3054Slc + var yyhl3054 bool = l >= 0 + for yyj3054 := 0; ; yyj3054++ { + if yyhl3054 { + if yyj3054 >= l { break } } else { @@ -39164,21 +39242,21 @@ func (x *NodeResources) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3045Slc = r.DecodeBytes(yys3045Slc, true, true) - yys3045 := string(yys3045Slc) + yys3054Slc = r.DecodeBytes(yys3054Slc, true, true) + yys3054 := string(yys3054Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3045 { + switch yys3054 { case "capacity": if r.TryDecodeAsNil() { x.Capacity = nil } else { - yyv3046 := &x.Capacity - yyv3046.CodecDecodeSelf(d) + yyv3055 := &x.Capacity + yyv3055.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3045) - } // end switch yys3045 - } // end for yyj3045 + z.DecStructFieldNotFound(-1, yys3054) + } // end switch yys3054 + } // end for yyj3054 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -39186,16 +39264,16 @@ func (x *NodeResources) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3047 int - var yyb3047 bool - var yyhl3047 bool = l >= 0 - yyj3047++ - if yyhl3047 { - yyb3047 = yyj3047 > l + var yyj3056 int + var yyb3056 bool + var yyhl3056 bool = l >= 0 + yyj3056++ + if yyhl3056 { + yyb3056 = yyj3056 > l } else { - yyb3047 = r.CheckBreak() + yyb3056 = r.CheckBreak() } - if yyb3047 { + if yyb3056 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39203,21 +39281,21 @@ func (x *NodeResources) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Capacity = nil } else { - yyv3048 := &x.Capacity - yyv3048.CodecDecodeSelf(d) + yyv3057 := &x.Capacity + yyv3057.CodecDecodeSelf(d) } for { - yyj3047++ - if yyhl3047 { - yyb3047 = yyj3047 > l + yyj3056++ + if yyhl3056 { + yyb3056 = yyj3056 > l } else { - yyb3047 = r.CheckBreak() + yyb3056 = r.CheckBreak() } - if yyb3047 { + if yyb3056 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3047-1, "") + z.DecStructFieldNotFound(yyj3056-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -39226,8 +39304,8 @@ func (x ResourceName) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym3049 := z.EncBinary() - _ = yym3049 + yym3058 := z.EncBinary() + _ = yym3058 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -39239,8 +39317,8 @@ func (x *ResourceName) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3050 := z.DecBinary() - _ = yym3050 + yym3059 := z.DecBinary() + _ = yym3059 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -39255,8 +39333,8 @@ func (x ResourceList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3051 := z.EncBinary() - _ = yym3051 + yym3060 := z.EncBinary() + _ = yym3060 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -39269,8 +39347,8 @@ func (x *ResourceList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3052 := z.DecBinary() - _ = yym3052 + yym3061 := z.DecBinary() + _ = yym3061 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -39285,39 +39363,39 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3053 := z.EncBinary() - _ = yym3053 + yym3062 := z.EncBinary() + _ = yym3062 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3054 := !z.EncBinary() - yy2arr3054 := z.EncBasicHandle().StructToArray - var yyq3054 [5]bool - _, _, _ = yysep3054, yyq3054, yy2arr3054 - const yyr3054 bool = false - yyq3054[0] = x.Kind != "" - yyq3054[1] = x.APIVersion != "" - yyq3054[2] = true - yyq3054[3] = true - yyq3054[4] = true - var yynn3054 int - if yyr3054 || yy2arr3054 { + yysep3063 := !z.EncBinary() + yy2arr3063 := z.EncBasicHandle().StructToArray + var yyq3063 [5]bool + _, _, _ = yysep3063, yyq3063, yy2arr3063 + const yyr3063 bool = false + yyq3063[0] = x.Kind != "" + yyq3063[1] = x.APIVersion != "" + yyq3063[2] = true + yyq3063[3] = true + yyq3063[4] = true + var yynn3063 int + if yyr3063 || yy2arr3063 { r.EncodeArrayStart(5) } else { - yynn3054 = 0 - for _, b := range yyq3054 { + yynn3063 = 0 + for _, b := range yyq3063 { if b { - yynn3054++ + yynn3063++ } } - r.EncodeMapStart(yynn3054) - yynn3054 = 0 + r.EncodeMapStart(yynn3063) + yynn3063 = 0 } - if yyr3054 || yy2arr3054 { + if yyr3063 || yy2arr3063 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3054[0] { - yym3056 := z.EncBinary() - _ = yym3056 + if yyq3063[0] { + yym3065 := z.EncBinary() + _ = yym3065 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -39326,23 +39404,23 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3054[0] { + if yyq3063[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3057 := z.EncBinary() - _ = yym3057 + yym3066 := z.EncBinary() + _ = yym3066 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3054 || yy2arr3054 { + if yyr3063 || yy2arr3063 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3054[1] { - yym3059 := z.EncBinary() - _ = yym3059 + if yyq3063[1] { + yym3068 := z.EncBinary() + _ = yym3068 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -39351,70 +39429,70 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3054[1] { + if yyq3063[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3060 := z.EncBinary() - _ = yym3060 + yym3069 := z.EncBinary() + _ = yym3069 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3054 || yy2arr3054 { + if yyr3063 || yy2arr3063 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3054[2] { - yy3062 := &x.ObjectMeta - yy3062.CodecEncodeSelf(e) + if yyq3063[2] { + yy3071 := &x.ObjectMeta + yy3071.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3054[2] { + if yyq3063[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3063 := &x.ObjectMeta - yy3063.CodecEncodeSelf(e) + yy3072 := &x.ObjectMeta + yy3072.CodecEncodeSelf(e) } } - if yyr3054 || yy2arr3054 { + if yyr3063 || yy2arr3063 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3054[3] { - yy3065 := &x.Spec - yy3065.CodecEncodeSelf(e) + if yyq3063[3] { + yy3074 := &x.Spec + yy3074.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3054[3] { + if yyq3063[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3066 := &x.Spec - yy3066.CodecEncodeSelf(e) + yy3075 := &x.Spec + yy3075.CodecEncodeSelf(e) } } - if yyr3054 || yy2arr3054 { + if yyr3063 || yy2arr3063 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3054[4] { - yy3068 := &x.Status - yy3068.CodecEncodeSelf(e) + if yyq3063[4] { + yy3077 := &x.Status + yy3077.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3054[4] { + if yyq3063[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3069 := &x.Status - yy3069.CodecEncodeSelf(e) + yy3078 := &x.Status + yy3078.CodecEncodeSelf(e) } } - if yyr3054 || yy2arr3054 { + if yyr3063 || yy2arr3063 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -39427,25 +39505,25 @@ func (x *Node) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3070 := z.DecBinary() - _ = yym3070 + yym3079 := z.DecBinary() + _ = yym3079 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3071 := r.ContainerType() - if yyct3071 == codecSelferValueTypeMap1234 { - yyl3071 := r.ReadMapStart() - if yyl3071 == 0 { + yyct3080 := r.ContainerType() + if yyct3080 == codecSelferValueTypeMap1234 { + yyl3080 := r.ReadMapStart() + if yyl3080 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3071, d) + x.codecDecodeSelfFromMap(yyl3080, d) } - } else if yyct3071 == codecSelferValueTypeArray1234 { - yyl3071 := r.ReadArrayStart() - if yyl3071 == 0 { + } else if yyct3080 == codecSelferValueTypeArray1234 { + yyl3080 := r.ReadArrayStart() + if yyl3080 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3071, d) + x.codecDecodeSelfFromArray(yyl3080, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -39457,12 +39535,12 @@ func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3072Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3072Slc - var yyhl3072 bool = l >= 0 - for yyj3072 := 0; ; yyj3072++ { - if yyhl3072 { - if yyj3072 >= l { + var yys3081Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3081Slc + var yyhl3081 bool = l >= 0 + for yyj3081 := 0; ; yyj3081++ { + if yyhl3081 { + if yyj3081 >= l { break } } else { @@ -39471,10 +39549,10 @@ func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3072Slc = r.DecodeBytes(yys3072Slc, true, true) - yys3072 := string(yys3072Slc) + yys3081Slc = r.DecodeBytes(yys3081Slc, true, true) + yys3081 := string(yys3081Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3072 { + switch yys3081 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -39491,27 +39569,27 @@ func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3075 := &x.ObjectMeta - yyv3075.CodecDecodeSelf(d) + yyv3084 := &x.ObjectMeta + yyv3084.CodecDecodeSelf(d) } case "spec": if r.TryDecodeAsNil() { x.Spec = NodeSpec{} } else { - yyv3076 := &x.Spec - yyv3076.CodecDecodeSelf(d) + yyv3085 := &x.Spec + yyv3085.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = NodeStatus{} } else { - yyv3077 := &x.Status - yyv3077.CodecDecodeSelf(d) + yyv3086 := &x.Status + yyv3086.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3072) - } // end switch yys3072 - } // end for yyj3072 + z.DecStructFieldNotFound(-1, yys3081) + } // end switch yys3081 + } // end for yyj3081 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -39519,16 +39597,16 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3078 int - var yyb3078 bool - var yyhl3078 bool = l >= 0 - yyj3078++ - if yyhl3078 { - yyb3078 = yyj3078 > l + var yyj3087 int + var yyb3087 bool + var yyhl3087 bool = l >= 0 + yyj3087++ + if yyhl3087 { + yyb3087 = yyj3087 > l } else { - yyb3078 = r.CheckBreak() + yyb3087 = r.CheckBreak() } - if yyb3078 { + if yyb3087 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39538,13 +39616,13 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3078++ - if yyhl3078 { - yyb3078 = yyj3078 > l + yyj3087++ + if yyhl3087 { + yyb3087 = yyj3087 > l } else { - yyb3078 = r.CheckBreak() + yyb3087 = r.CheckBreak() } - if yyb3078 { + if yyb3087 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39554,13 +39632,13 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3078++ - if yyhl3078 { - yyb3078 = yyj3078 > l + yyj3087++ + if yyhl3087 { + yyb3087 = yyj3087 > l } else { - yyb3078 = r.CheckBreak() + yyb3087 = r.CheckBreak() } - if yyb3078 { + if yyb3087 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39568,16 +39646,16 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3081 := &x.ObjectMeta - yyv3081.CodecDecodeSelf(d) + yyv3090 := &x.ObjectMeta + yyv3090.CodecDecodeSelf(d) } - yyj3078++ - if yyhl3078 { - yyb3078 = yyj3078 > l + yyj3087++ + if yyhl3087 { + yyb3087 = yyj3087 > l } else { - yyb3078 = r.CheckBreak() + yyb3087 = r.CheckBreak() } - if yyb3078 { + if yyb3087 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39585,16 +39663,16 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = NodeSpec{} } else { - yyv3082 := &x.Spec - yyv3082.CodecDecodeSelf(d) + yyv3091 := &x.Spec + yyv3091.CodecDecodeSelf(d) } - yyj3078++ - if yyhl3078 { - yyb3078 = yyj3078 > l + yyj3087++ + if yyhl3087 { + yyb3087 = yyj3087 > l } else { - yyb3078 = r.CheckBreak() + yyb3087 = r.CheckBreak() } - if yyb3078 { + if yyb3087 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39602,21 +39680,21 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = NodeStatus{} } else { - yyv3083 := &x.Status - yyv3083.CodecDecodeSelf(d) + yyv3092 := &x.Status + yyv3092.CodecDecodeSelf(d) } for { - yyj3078++ - if yyhl3078 { - yyb3078 = yyj3078 > l + yyj3087++ + if yyhl3087 { + yyb3087 = yyj3087 > l } else { - yyb3078 = r.CheckBreak() + yyb3087 = r.CheckBreak() } - if yyb3078 { + if yyb3087 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3078-1, "") + z.DecStructFieldNotFound(yyj3087-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -39628,37 +39706,37 @@ func (x *NodeList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3084 := z.EncBinary() - _ = yym3084 + yym3093 := z.EncBinary() + _ = yym3093 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3085 := !z.EncBinary() - yy2arr3085 := z.EncBasicHandle().StructToArray - var yyq3085 [4]bool - _, _, _ = yysep3085, yyq3085, yy2arr3085 - const yyr3085 bool = false - yyq3085[0] = x.Kind != "" - yyq3085[1] = x.APIVersion != "" - yyq3085[2] = true - var yynn3085 int - if yyr3085 || yy2arr3085 { + yysep3094 := !z.EncBinary() + yy2arr3094 := z.EncBasicHandle().StructToArray + var yyq3094 [4]bool + _, _, _ = yysep3094, yyq3094, yy2arr3094 + const yyr3094 bool = false + yyq3094[0] = x.Kind != "" + yyq3094[1] = x.APIVersion != "" + yyq3094[2] = true + var yynn3094 int + if yyr3094 || yy2arr3094 { r.EncodeArrayStart(4) } else { - yynn3085 = 1 - for _, b := range yyq3085 { + yynn3094 = 1 + for _, b := range yyq3094 { if b { - yynn3085++ + yynn3094++ } } - r.EncodeMapStart(yynn3085) - yynn3085 = 0 + r.EncodeMapStart(yynn3094) + yynn3094 = 0 } - if yyr3085 || yy2arr3085 { + if yyr3094 || yy2arr3094 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3085[0] { - yym3087 := z.EncBinary() - _ = yym3087 + if yyq3094[0] { + yym3096 := z.EncBinary() + _ = yym3096 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -39667,23 +39745,23 @@ func (x *NodeList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3085[0] { + if yyq3094[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3088 := z.EncBinary() - _ = yym3088 + yym3097 := z.EncBinary() + _ = yym3097 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3085 || yy2arr3085 { + if yyr3094 || yy2arr3094 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3085[1] { - yym3090 := z.EncBinary() - _ = yym3090 + if yyq3094[1] { + yym3099 := z.EncBinary() + _ = yym3099 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -39692,54 +39770,54 @@ func (x *NodeList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3085[1] { + if yyq3094[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3091 := z.EncBinary() - _ = yym3091 + yym3100 := z.EncBinary() + _ = yym3100 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3085 || yy2arr3085 { + if yyr3094 || yy2arr3094 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3085[2] { - yy3093 := &x.ListMeta - yym3094 := z.EncBinary() - _ = yym3094 + if yyq3094[2] { + yy3102 := &x.ListMeta + yym3103 := z.EncBinary() + _ = yym3103 if false { - } else if z.HasExtensions() && z.EncExt(yy3093) { + } else if z.HasExtensions() && z.EncExt(yy3102) { } else { - z.EncFallback(yy3093) + z.EncFallback(yy3102) } } else { r.EncodeNil() } } else { - if yyq3085[2] { + if yyq3094[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3095 := &x.ListMeta - yym3096 := z.EncBinary() - _ = yym3096 + yy3104 := &x.ListMeta + yym3105 := z.EncBinary() + _ = yym3105 if false { - } else if z.HasExtensions() && z.EncExt(yy3095) { + } else if z.HasExtensions() && z.EncExt(yy3104) { } else { - z.EncFallback(yy3095) + z.EncFallback(yy3104) } } } - if yyr3085 || yy2arr3085 { + if yyr3094 || yy2arr3094 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym3098 := z.EncBinary() - _ = yym3098 + yym3107 := z.EncBinary() + _ = yym3107 if false { } else { h.encSliceNode(([]Node)(x.Items), e) @@ -39752,15 +39830,15 @@ func (x *NodeList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym3099 := z.EncBinary() - _ = yym3099 + yym3108 := z.EncBinary() + _ = yym3108 if false { } else { h.encSliceNode(([]Node)(x.Items), e) } } } - if yyr3085 || yy2arr3085 { + if yyr3094 || yy2arr3094 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -39773,25 +39851,25 @@ func (x *NodeList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3100 := z.DecBinary() - _ = yym3100 + yym3109 := z.DecBinary() + _ = yym3109 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3101 := r.ContainerType() - if yyct3101 == codecSelferValueTypeMap1234 { - yyl3101 := r.ReadMapStart() - if yyl3101 == 0 { + yyct3110 := r.ContainerType() + if yyct3110 == codecSelferValueTypeMap1234 { + yyl3110 := r.ReadMapStart() + if yyl3110 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3101, d) + x.codecDecodeSelfFromMap(yyl3110, d) } - } else if yyct3101 == codecSelferValueTypeArray1234 { - yyl3101 := r.ReadArrayStart() - if yyl3101 == 0 { + } else if yyct3110 == codecSelferValueTypeArray1234 { + yyl3110 := r.ReadArrayStart() + if yyl3110 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3101, d) + x.codecDecodeSelfFromArray(yyl3110, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -39803,12 +39881,12 @@ func (x *NodeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3102Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3102Slc - var yyhl3102 bool = l >= 0 - for yyj3102 := 0; ; yyj3102++ { - if yyhl3102 { - if yyj3102 >= l { + var yys3111Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3111Slc + var yyhl3111 bool = l >= 0 + for yyj3111 := 0; ; yyj3111++ { + if yyhl3111 { + if yyj3111 >= l { break } } else { @@ -39817,10 +39895,10 @@ func (x *NodeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3102Slc = r.DecodeBytes(yys3102Slc, true, true) - yys3102 := string(yys3102Slc) + yys3111Slc = r.DecodeBytes(yys3111Slc, true, true) + yys3111 := string(yys3111Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3102 { + switch yys3111 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -39837,31 +39915,31 @@ func (x *NodeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3105 := &x.ListMeta - yym3106 := z.DecBinary() - _ = yym3106 + yyv3114 := &x.ListMeta + yym3115 := z.DecBinary() + _ = yym3115 if false { - } else if z.HasExtensions() && z.DecExt(yyv3105) { + } else if z.HasExtensions() && z.DecExt(yyv3114) { } else { - z.DecFallback(yyv3105, false) + z.DecFallback(yyv3114, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3107 := &x.Items - yym3108 := z.DecBinary() - _ = yym3108 + yyv3116 := &x.Items + yym3117 := z.DecBinary() + _ = yym3117 if false { } else { - h.decSliceNode((*[]Node)(yyv3107), d) + h.decSliceNode((*[]Node)(yyv3116), d) } } default: - z.DecStructFieldNotFound(-1, yys3102) - } // end switch yys3102 - } // end for yyj3102 + z.DecStructFieldNotFound(-1, yys3111) + } // end switch yys3111 + } // end for yyj3111 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -39869,16 +39947,16 @@ func (x *NodeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3109 int - var yyb3109 bool - var yyhl3109 bool = l >= 0 - yyj3109++ - if yyhl3109 { - yyb3109 = yyj3109 > l + var yyj3118 int + var yyb3118 bool + var yyhl3118 bool = l >= 0 + yyj3118++ + if yyhl3118 { + yyb3118 = yyj3118 > l } else { - yyb3109 = r.CheckBreak() + yyb3118 = r.CheckBreak() } - if yyb3109 { + if yyb3118 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39888,13 +39966,13 @@ func (x *NodeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3109++ - if yyhl3109 { - yyb3109 = yyj3109 > l + yyj3118++ + if yyhl3118 { + yyb3118 = yyj3118 > l } else { - yyb3109 = r.CheckBreak() + yyb3118 = r.CheckBreak() } - if yyb3109 { + if yyb3118 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39904,13 +39982,13 @@ func (x *NodeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3109++ - if yyhl3109 { - yyb3109 = yyj3109 > l + yyj3118++ + if yyhl3118 { + yyb3118 = yyj3118 > l } else { - yyb3109 = r.CheckBreak() + yyb3118 = r.CheckBreak() } - if yyb3109 { + if yyb3118 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39918,22 +39996,22 @@ func (x *NodeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3112 := &x.ListMeta - yym3113 := z.DecBinary() - _ = yym3113 + yyv3121 := &x.ListMeta + yym3122 := z.DecBinary() + _ = yym3122 if false { - } else if z.HasExtensions() && z.DecExt(yyv3112) { + } else if z.HasExtensions() && z.DecExt(yyv3121) { } else { - z.DecFallback(yyv3112, false) + z.DecFallback(yyv3121, false) } } - yyj3109++ - if yyhl3109 { - yyb3109 = yyj3109 > l + yyj3118++ + if yyhl3118 { + yyb3118 = yyj3118 > l } else { - yyb3109 = r.CheckBreak() + yyb3118 = r.CheckBreak() } - if yyb3109 { + if yyb3118 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39941,26 +40019,26 @@ func (x *NodeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3114 := &x.Items - yym3115 := z.DecBinary() - _ = yym3115 + yyv3123 := &x.Items + yym3124 := z.DecBinary() + _ = yym3124 if false { } else { - h.decSliceNode((*[]Node)(yyv3114), d) + h.decSliceNode((*[]Node)(yyv3123), d) } } for { - yyj3109++ - if yyhl3109 { - yyb3109 = yyj3109 > l + yyj3118++ + if yyhl3118 { + yyb3118 = yyj3118 > l } else { - yyb3109 = r.CheckBreak() + yyb3118 = r.CheckBreak() } - if yyb3109 { + if yyb3118 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3109-1, "") + z.DecStructFieldNotFound(yyj3118-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -39972,36 +40050,36 @@ func (x *NamespaceSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3116 := z.EncBinary() - _ = yym3116 + yym3125 := z.EncBinary() + _ = yym3125 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3117 := !z.EncBinary() - yy2arr3117 := z.EncBasicHandle().StructToArray - var yyq3117 [1]bool - _, _, _ = yysep3117, yyq3117, yy2arr3117 - const yyr3117 bool = false - var yynn3117 int - if yyr3117 || yy2arr3117 { + yysep3126 := !z.EncBinary() + yy2arr3126 := z.EncBasicHandle().StructToArray + var yyq3126 [1]bool + _, _, _ = yysep3126, yyq3126, yy2arr3126 + const yyr3126 bool = false + var yynn3126 int + if yyr3126 || yy2arr3126 { r.EncodeArrayStart(1) } else { - yynn3117 = 1 - for _, b := range yyq3117 { + yynn3126 = 1 + for _, b := range yyq3126 { if b { - yynn3117++ + yynn3126++ } } - r.EncodeMapStart(yynn3117) - yynn3117 = 0 + r.EncodeMapStart(yynn3126) + yynn3126 = 0 } - if yyr3117 || yy2arr3117 { + if yyr3126 || yy2arr3126 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Finalizers == nil { r.EncodeNil() } else { - yym3119 := z.EncBinary() - _ = yym3119 + yym3128 := z.EncBinary() + _ = yym3128 if false { } else { h.encSliceFinalizerName(([]FinalizerName)(x.Finalizers), e) @@ -40014,15 +40092,15 @@ func (x *NamespaceSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x.Finalizers == nil { r.EncodeNil() } else { - yym3120 := z.EncBinary() - _ = yym3120 + yym3129 := z.EncBinary() + _ = yym3129 if false { } else { h.encSliceFinalizerName(([]FinalizerName)(x.Finalizers), e) } } } - if yyr3117 || yy2arr3117 { + if yyr3126 || yy2arr3126 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -40035,25 +40113,25 @@ func (x *NamespaceSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3121 := z.DecBinary() - _ = yym3121 + yym3130 := z.DecBinary() + _ = yym3130 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3122 := r.ContainerType() - if yyct3122 == codecSelferValueTypeMap1234 { - yyl3122 := r.ReadMapStart() - if yyl3122 == 0 { + yyct3131 := r.ContainerType() + if yyct3131 == codecSelferValueTypeMap1234 { + yyl3131 := r.ReadMapStart() + if yyl3131 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3122, d) + x.codecDecodeSelfFromMap(yyl3131, d) } - } else if yyct3122 == codecSelferValueTypeArray1234 { - yyl3122 := r.ReadArrayStart() - if yyl3122 == 0 { + } else if yyct3131 == codecSelferValueTypeArray1234 { + yyl3131 := r.ReadArrayStart() + if yyl3131 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3122, d) + x.codecDecodeSelfFromArray(yyl3131, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -40065,12 +40143,12 @@ func (x *NamespaceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3123Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3123Slc - var yyhl3123 bool = l >= 0 - for yyj3123 := 0; ; yyj3123++ { - if yyhl3123 { - if yyj3123 >= l { + var yys3132Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3132Slc + var yyhl3132 bool = l >= 0 + for yyj3132 := 0; ; yyj3132++ { + if yyhl3132 { + if yyj3132 >= l { break } } else { @@ -40079,26 +40157,26 @@ func (x *NamespaceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3123Slc = r.DecodeBytes(yys3123Slc, true, true) - yys3123 := string(yys3123Slc) + yys3132Slc = r.DecodeBytes(yys3132Slc, true, true) + yys3132 := string(yys3132Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3123 { + switch yys3132 { case "Finalizers": if r.TryDecodeAsNil() { x.Finalizers = nil } else { - yyv3124 := &x.Finalizers - yym3125 := z.DecBinary() - _ = yym3125 + yyv3133 := &x.Finalizers + yym3134 := z.DecBinary() + _ = yym3134 if false { } else { - h.decSliceFinalizerName((*[]FinalizerName)(yyv3124), d) + h.decSliceFinalizerName((*[]FinalizerName)(yyv3133), d) } } default: - z.DecStructFieldNotFound(-1, yys3123) - } // end switch yys3123 - } // end for yyj3123 + z.DecStructFieldNotFound(-1, yys3132) + } // end switch yys3132 + } // end for yyj3132 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -40106,16 +40184,16 @@ func (x *NamespaceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3126 int - var yyb3126 bool - var yyhl3126 bool = l >= 0 - yyj3126++ - if yyhl3126 { - yyb3126 = yyj3126 > l + var yyj3135 int + var yyb3135 bool + var yyhl3135 bool = l >= 0 + yyj3135++ + if yyhl3135 { + yyb3135 = yyj3135 > l } else { - yyb3126 = r.CheckBreak() + yyb3135 = r.CheckBreak() } - if yyb3126 { + if yyb3135 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40123,26 +40201,26 @@ func (x *NamespaceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Finalizers = nil } else { - yyv3127 := &x.Finalizers - yym3128 := z.DecBinary() - _ = yym3128 + yyv3136 := &x.Finalizers + yym3137 := z.DecBinary() + _ = yym3137 if false { } else { - h.decSliceFinalizerName((*[]FinalizerName)(yyv3127), d) + h.decSliceFinalizerName((*[]FinalizerName)(yyv3136), d) } } for { - yyj3126++ - if yyhl3126 { - yyb3126 = yyj3126 > l + yyj3135++ + if yyhl3135 { + yyb3135 = yyj3135 > l } else { - yyb3126 = r.CheckBreak() + yyb3135 = r.CheckBreak() } - if yyb3126 { + if yyb3135 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3126-1, "") + z.DecStructFieldNotFound(yyj3135-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -40151,8 +40229,8 @@ func (x FinalizerName) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym3129 := z.EncBinary() - _ = yym3129 + yym3138 := z.EncBinary() + _ = yym3138 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -40164,8 +40242,8 @@ func (x *FinalizerName) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3130 := z.DecBinary() - _ = yym3130 + yym3139 := z.DecBinary() + _ = yym3139 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -40180,46 +40258,46 @@ func (x *NamespaceStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3131 := z.EncBinary() - _ = yym3131 + yym3140 := z.EncBinary() + _ = yym3140 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3132 := !z.EncBinary() - yy2arr3132 := z.EncBasicHandle().StructToArray - var yyq3132 [1]bool - _, _, _ = yysep3132, yyq3132, yy2arr3132 - const yyr3132 bool = false - yyq3132[0] = x.Phase != "" - var yynn3132 int - if yyr3132 || yy2arr3132 { + yysep3141 := !z.EncBinary() + yy2arr3141 := z.EncBasicHandle().StructToArray + var yyq3141 [1]bool + _, _, _ = yysep3141, yyq3141, yy2arr3141 + const yyr3141 bool = false + yyq3141[0] = x.Phase != "" + var yynn3141 int + if yyr3141 || yy2arr3141 { r.EncodeArrayStart(1) } else { - yynn3132 = 0 - for _, b := range yyq3132 { + yynn3141 = 0 + for _, b := range yyq3141 { if b { - yynn3132++ + yynn3141++ } } - r.EncodeMapStart(yynn3132) - yynn3132 = 0 + r.EncodeMapStart(yynn3141) + yynn3141 = 0 } - if yyr3132 || yy2arr3132 { + if yyr3141 || yy2arr3141 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3132[0] { + if yyq3141[0] { x.Phase.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3132[0] { + if yyq3141[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("phase")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Phase.CodecEncodeSelf(e) } } - if yyr3132 || yy2arr3132 { + if yyr3141 || yy2arr3141 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -40232,25 +40310,25 @@ func (x *NamespaceStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3134 := z.DecBinary() - _ = yym3134 + yym3143 := z.DecBinary() + _ = yym3143 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3135 := r.ContainerType() - if yyct3135 == codecSelferValueTypeMap1234 { - yyl3135 := r.ReadMapStart() - if yyl3135 == 0 { + yyct3144 := r.ContainerType() + if yyct3144 == codecSelferValueTypeMap1234 { + yyl3144 := r.ReadMapStart() + if yyl3144 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3135, d) + x.codecDecodeSelfFromMap(yyl3144, d) } - } else if yyct3135 == codecSelferValueTypeArray1234 { - yyl3135 := r.ReadArrayStart() - if yyl3135 == 0 { + } else if yyct3144 == codecSelferValueTypeArray1234 { + yyl3144 := r.ReadArrayStart() + if yyl3144 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3135, d) + x.codecDecodeSelfFromArray(yyl3144, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -40262,12 +40340,12 @@ func (x *NamespaceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3136Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3136Slc - var yyhl3136 bool = l >= 0 - for yyj3136 := 0; ; yyj3136++ { - if yyhl3136 { - if yyj3136 >= l { + var yys3145Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3145Slc + var yyhl3145 bool = l >= 0 + for yyj3145 := 0; ; yyj3145++ { + if yyhl3145 { + if yyj3145 >= l { break } } else { @@ -40276,10 +40354,10 @@ func (x *NamespaceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3136Slc = r.DecodeBytes(yys3136Slc, true, true) - yys3136 := string(yys3136Slc) + yys3145Slc = r.DecodeBytes(yys3145Slc, true, true) + yys3145 := string(yys3145Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3136 { + switch yys3145 { case "phase": if r.TryDecodeAsNil() { x.Phase = "" @@ -40287,9 +40365,9 @@ func (x *NamespaceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Phase = NamespacePhase(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3136) - } // end switch yys3136 - } // end for yyj3136 + z.DecStructFieldNotFound(-1, yys3145) + } // end switch yys3145 + } // end for yyj3145 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -40297,16 +40375,16 @@ func (x *NamespaceStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3138 int - var yyb3138 bool - var yyhl3138 bool = l >= 0 - yyj3138++ - if yyhl3138 { - yyb3138 = yyj3138 > l + var yyj3147 int + var yyb3147 bool + var yyhl3147 bool = l >= 0 + yyj3147++ + if yyhl3147 { + yyb3147 = yyj3147 > l } else { - yyb3138 = r.CheckBreak() + yyb3147 = r.CheckBreak() } - if yyb3138 { + if yyb3147 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40317,17 +40395,17 @@ func (x *NamespaceStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) x.Phase = NamespacePhase(r.DecodeString()) } for { - yyj3138++ - if yyhl3138 { - yyb3138 = yyj3138 > l + yyj3147++ + if yyhl3147 { + yyb3147 = yyj3147 > l } else { - yyb3138 = r.CheckBreak() + yyb3147 = r.CheckBreak() } - if yyb3138 { + if yyb3147 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3138-1, "") + z.DecStructFieldNotFound(yyj3147-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -40336,8 +40414,8 @@ func (x NamespacePhase) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym3140 := z.EncBinary() - _ = yym3140 + yym3149 := z.EncBinary() + _ = yym3149 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -40349,8 +40427,8 @@ func (x *NamespacePhase) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3141 := z.DecBinary() - _ = yym3141 + yym3150 := z.DecBinary() + _ = yym3150 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -40365,39 +40443,39 @@ func (x *Namespace) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3142 := z.EncBinary() - _ = yym3142 + yym3151 := z.EncBinary() + _ = yym3151 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3143 := !z.EncBinary() - yy2arr3143 := z.EncBasicHandle().StructToArray - var yyq3143 [5]bool - _, _, _ = yysep3143, yyq3143, yy2arr3143 - const yyr3143 bool = false - yyq3143[0] = x.Kind != "" - yyq3143[1] = x.APIVersion != "" - yyq3143[2] = true - yyq3143[3] = true - yyq3143[4] = true - var yynn3143 int - if yyr3143 || yy2arr3143 { + yysep3152 := !z.EncBinary() + yy2arr3152 := z.EncBasicHandle().StructToArray + var yyq3152 [5]bool + _, _, _ = yysep3152, yyq3152, yy2arr3152 + const yyr3152 bool = false + yyq3152[0] = x.Kind != "" + yyq3152[1] = x.APIVersion != "" + yyq3152[2] = true + yyq3152[3] = true + yyq3152[4] = true + var yynn3152 int + if yyr3152 || yy2arr3152 { r.EncodeArrayStart(5) } else { - yynn3143 = 0 - for _, b := range yyq3143 { + yynn3152 = 0 + for _, b := range yyq3152 { if b { - yynn3143++ + yynn3152++ } } - r.EncodeMapStart(yynn3143) - yynn3143 = 0 + r.EncodeMapStart(yynn3152) + yynn3152 = 0 } - if yyr3143 || yy2arr3143 { + if yyr3152 || yy2arr3152 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3143[0] { - yym3145 := z.EncBinary() - _ = yym3145 + if yyq3152[0] { + yym3154 := z.EncBinary() + _ = yym3154 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -40406,23 +40484,23 @@ func (x *Namespace) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3143[0] { + if yyq3152[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3146 := z.EncBinary() - _ = yym3146 + yym3155 := z.EncBinary() + _ = yym3155 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3143 || yy2arr3143 { + if yyr3152 || yy2arr3152 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3143[1] { - yym3148 := z.EncBinary() - _ = yym3148 + if yyq3152[1] { + yym3157 := z.EncBinary() + _ = yym3157 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -40431,70 +40509,70 @@ func (x *Namespace) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3143[1] { + if yyq3152[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3149 := z.EncBinary() - _ = yym3149 + yym3158 := z.EncBinary() + _ = yym3158 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3143 || yy2arr3143 { + if yyr3152 || yy2arr3152 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3143[2] { - yy3151 := &x.ObjectMeta - yy3151.CodecEncodeSelf(e) + if yyq3152[2] { + yy3160 := &x.ObjectMeta + yy3160.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3143[2] { + if yyq3152[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3152 := &x.ObjectMeta - yy3152.CodecEncodeSelf(e) + yy3161 := &x.ObjectMeta + yy3161.CodecEncodeSelf(e) } } - if yyr3143 || yy2arr3143 { + if yyr3152 || yy2arr3152 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3143[3] { - yy3154 := &x.Spec - yy3154.CodecEncodeSelf(e) + if yyq3152[3] { + yy3163 := &x.Spec + yy3163.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3143[3] { + if yyq3152[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3155 := &x.Spec - yy3155.CodecEncodeSelf(e) + yy3164 := &x.Spec + yy3164.CodecEncodeSelf(e) } } - if yyr3143 || yy2arr3143 { + if yyr3152 || yy2arr3152 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3143[4] { - yy3157 := &x.Status - yy3157.CodecEncodeSelf(e) + if yyq3152[4] { + yy3166 := &x.Status + yy3166.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3143[4] { + if yyq3152[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3158 := &x.Status - yy3158.CodecEncodeSelf(e) + yy3167 := &x.Status + yy3167.CodecEncodeSelf(e) } } - if yyr3143 || yy2arr3143 { + if yyr3152 || yy2arr3152 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -40507,25 +40585,25 @@ func (x *Namespace) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3159 := z.DecBinary() - _ = yym3159 + yym3168 := z.DecBinary() + _ = yym3168 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3160 := r.ContainerType() - if yyct3160 == codecSelferValueTypeMap1234 { - yyl3160 := r.ReadMapStart() - if yyl3160 == 0 { + yyct3169 := r.ContainerType() + if yyct3169 == codecSelferValueTypeMap1234 { + yyl3169 := r.ReadMapStart() + if yyl3169 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3160, d) + x.codecDecodeSelfFromMap(yyl3169, d) } - } else if yyct3160 == codecSelferValueTypeArray1234 { - yyl3160 := r.ReadArrayStart() - if yyl3160 == 0 { + } else if yyct3169 == codecSelferValueTypeArray1234 { + yyl3169 := r.ReadArrayStart() + if yyl3169 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3160, d) + x.codecDecodeSelfFromArray(yyl3169, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -40537,12 +40615,12 @@ func (x *Namespace) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3161Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3161Slc - var yyhl3161 bool = l >= 0 - for yyj3161 := 0; ; yyj3161++ { - if yyhl3161 { - if yyj3161 >= l { + var yys3170Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3170Slc + var yyhl3170 bool = l >= 0 + for yyj3170 := 0; ; yyj3170++ { + if yyhl3170 { + if yyj3170 >= l { break } } else { @@ -40551,10 +40629,10 @@ func (x *Namespace) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3161Slc = r.DecodeBytes(yys3161Slc, true, true) - yys3161 := string(yys3161Slc) + yys3170Slc = r.DecodeBytes(yys3170Slc, true, true) + yys3170 := string(yys3170Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3161 { + switch yys3170 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -40571,27 +40649,27 @@ func (x *Namespace) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3164 := &x.ObjectMeta - yyv3164.CodecDecodeSelf(d) + yyv3173 := &x.ObjectMeta + yyv3173.CodecDecodeSelf(d) } case "spec": if r.TryDecodeAsNil() { x.Spec = NamespaceSpec{} } else { - yyv3165 := &x.Spec - yyv3165.CodecDecodeSelf(d) + yyv3174 := &x.Spec + yyv3174.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = NamespaceStatus{} } else { - yyv3166 := &x.Status - yyv3166.CodecDecodeSelf(d) + yyv3175 := &x.Status + yyv3175.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3161) - } // end switch yys3161 - } // end for yyj3161 + z.DecStructFieldNotFound(-1, yys3170) + } // end switch yys3170 + } // end for yyj3170 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -40599,16 +40677,16 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3167 int - var yyb3167 bool - var yyhl3167 bool = l >= 0 - yyj3167++ - if yyhl3167 { - yyb3167 = yyj3167 > l + var yyj3176 int + var yyb3176 bool + var yyhl3176 bool = l >= 0 + yyj3176++ + if yyhl3176 { + yyb3176 = yyj3176 > l } else { - yyb3167 = r.CheckBreak() + yyb3176 = r.CheckBreak() } - if yyb3167 { + if yyb3176 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40618,13 +40696,13 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3167++ - if yyhl3167 { - yyb3167 = yyj3167 > l + yyj3176++ + if yyhl3176 { + yyb3176 = yyj3176 > l } else { - yyb3167 = r.CheckBreak() + yyb3176 = r.CheckBreak() } - if yyb3167 { + if yyb3176 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40634,13 +40712,13 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3167++ - if yyhl3167 { - yyb3167 = yyj3167 > l + yyj3176++ + if yyhl3176 { + yyb3176 = yyj3176 > l } else { - yyb3167 = r.CheckBreak() + yyb3176 = r.CheckBreak() } - if yyb3167 { + if yyb3176 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40648,16 +40726,16 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3170 := &x.ObjectMeta - yyv3170.CodecDecodeSelf(d) + yyv3179 := &x.ObjectMeta + yyv3179.CodecDecodeSelf(d) } - yyj3167++ - if yyhl3167 { - yyb3167 = yyj3167 > l + yyj3176++ + if yyhl3176 { + yyb3176 = yyj3176 > l } else { - yyb3167 = r.CheckBreak() + yyb3176 = r.CheckBreak() } - if yyb3167 { + if yyb3176 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40665,16 +40743,16 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = NamespaceSpec{} } else { - yyv3171 := &x.Spec - yyv3171.CodecDecodeSelf(d) + yyv3180 := &x.Spec + yyv3180.CodecDecodeSelf(d) } - yyj3167++ - if yyhl3167 { - yyb3167 = yyj3167 > l + yyj3176++ + if yyhl3176 { + yyb3176 = yyj3176 > l } else { - yyb3167 = r.CheckBreak() + yyb3176 = r.CheckBreak() } - if yyb3167 { + if yyb3176 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40682,21 +40760,21 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = NamespaceStatus{} } else { - yyv3172 := &x.Status - yyv3172.CodecDecodeSelf(d) + yyv3181 := &x.Status + yyv3181.CodecDecodeSelf(d) } for { - yyj3167++ - if yyhl3167 { - yyb3167 = yyj3167 > l + yyj3176++ + if yyhl3176 { + yyb3176 = yyj3176 > l } else { - yyb3167 = r.CheckBreak() + yyb3176 = r.CheckBreak() } - if yyb3167 { + if yyb3176 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3167-1, "") + z.DecStructFieldNotFound(yyj3176-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -40708,37 +40786,37 @@ func (x *NamespaceList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3173 := z.EncBinary() - _ = yym3173 + yym3182 := z.EncBinary() + _ = yym3182 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3174 := !z.EncBinary() - yy2arr3174 := z.EncBasicHandle().StructToArray - var yyq3174 [4]bool - _, _, _ = yysep3174, yyq3174, yy2arr3174 - const yyr3174 bool = false - yyq3174[0] = x.Kind != "" - yyq3174[1] = x.APIVersion != "" - yyq3174[2] = true - var yynn3174 int - if yyr3174 || yy2arr3174 { + yysep3183 := !z.EncBinary() + yy2arr3183 := z.EncBasicHandle().StructToArray + var yyq3183 [4]bool + _, _, _ = yysep3183, yyq3183, yy2arr3183 + const yyr3183 bool = false + yyq3183[0] = x.Kind != "" + yyq3183[1] = x.APIVersion != "" + yyq3183[2] = true + var yynn3183 int + if yyr3183 || yy2arr3183 { r.EncodeArrayStart(4) } else { - yynn3174 = 1 - for _, b := range yyq3174 { + yynn3183 = 1 + for _, b := range yyq3183 { if b { - yynn3174++ + yynn3183++ } } - r.EncodeMapStart(yynn3174) - yynn3174 = 0 + r.EncodeMapStart(yynn3183) + yynn3183 = 0 } - if yyr3174 || yy2arr3174 { + if yyr3183 || yy2arr3183 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3174[0] { - yym3176 := z.EncBinary() - _ = yym3176 + if yyq3183[0] { + yym3185 := z.EncBinary() + _ = yym3185 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -40747,23 +40825,23 @@ func (x *NamespaceList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3174[0] { + if yyq3183[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3177 := z.EncBinary() - _ = yym3177 + yym3186 := z.EncBinary() + _ = yym3186 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3174 || yy2arr3174 { + if yyr3183 || yy2arr3183 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3174[1] { - yym3179 := z.EncBinary() - _ = yym3179 + if yyq3183[1] { + yym3188 := z.EncBinary() + _ = yym3188 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -40772,54 +40850,54 @@ func (x *NamespaceList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3174[1] { + if yyq3183[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3180 := z.EncBinary() - _ = yym3180 + yym3189 := z.EncBinary() + _ = yym3189 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3174 || yy2arr3174 { + if yyr3183 || yy2arr3183 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3174[2] { - yy3182 := &x.ListMeta - yym3183 := z.EncBinary() - _ = yym3183 + if yyq3183[2] { + yy3191 := &x.ListMeta + yym3192 := z.EncBinary() + _ = yym3192 if false { - } else if z.HasExtensions() && z.EncExt(yy3182) { + } else if z.HasExtensions() && z.EncExt(yy3191) { } else { - z.EncFallback(yy3182) + z.EncFallback(yy3191) } } else { r.EncodeNil() } } else { - if yyq3174[2] { + if yyq3183[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3184 := &x.ListMeta - yym3185 := z.EncBinary() - _ = yym3185 + yy3193 := &x.ListMeta + yym3194 := z.EncBinary() + _ = yym3194 if false { - } else if z.HasExtensions() && z.EncExt(yy3184) { + } else if z.HasExtensions() && z.EncExt(yy3193) { } else { - z.EncFallback(yy3184) + z.EncFallback(yy3193) } } } - if yyr3174 || yy2arr3174 { + if yyr3183 || yy2arr3183 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym3187 := z.EncBinary() - _ = yym3187 + yym3196 := z.EncBinary() + _ = yym3196 if false { } else { h.encSliceNamespace(([]Namespace)(x.Items), e) @@ -40832,15 +40910,15 @@ func (x *NamespaceList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym3188 := z.EncBinary() - _ = yym3188 + yym3197 := z.EncBinary() + _ = yym3197 if false { } else { h.encSliceNamespace(([]Namespace)(x.Items), e) } } } - if yyr3174 || yy2arr3174 { + if yyr3183 || yy2arr3183 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -40853,25 +40931,25 @@ func (x *NamespaceList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3189 := z.DecBinary() - _ = yym3189 + yym3198 := z.DecBinary() + _ = yym3198 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3190 := r.ContainerType() - if yyct3190 == codecSelferValueTypeMap1234 { - yyl3190 := r.ReadMapStart() - if yyl3190 == 0 { + yyct3199 := r.ContainerType() + if yyct3199 == codecSelferValueTypeMap1234 { + yyl3199 := r.ReadMapStart() + if yyl3199 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3190, d) + x.codecDecodeSelfFromMap(yyl3199, d) } - } else if yyct3190 == codecSelferValueTypeArray1234 { - yyl3190 := r.ReadArrayStart() - if yyl3190 == 0 { + } else if yyct3199 == codecSelferValueTypeArray1234 { + yyl3199 := r.ReadArrayStart() + if yyl3199 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3190, d) + x.codecDecodeSelfFromArray(yyl3199, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -40883,12 +40961,12 @@ func (x *NamespaceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3191Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3191Slc - var yyhl3191 bool = l >= 0 - for yyj3191 := 0; ; yyj3191++ { - if yyhl3191 { - if yyj3191 >= l { + var yys3200Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3200Slc + var yyhl3200 bool = l >= 0 + for yyj3200 := 0; ; yyj3200++ { + if yyhl3200 { + if yyj3200 >= l { break } } else { @@ -40897,10 +40975,10 @@ func (x *NamespaceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3191Slc = r.DecodeBytes(yys3191Slc, true, true) - yys3191 := string(yys3191Slc) + yys3200Slc = r.DecodeBytes(yys3200Slc, true, true) + yys3200 := string(yys3200Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3191 { + switch yys3200 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -40917,31 +40995,31 @@ func (x *NamespaceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3194 := &x.ListMeta - yym3195 := z.DecBinary() - _ = yym3195 + yyv3203 := &x.ListMeta + yym3204 := z.DecBinary() + _ = yym3204 if false { - } else if z.HasExtensions() && z.DecExt(yyv3194) { + } else if z.HasExtensions() && z.DecExt(yyv3203) { } else { - z.DecFallback(yyv3194, false) + z.DecFallback(yyv3203, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3196 := &x.Items - yym3197 := z.DecBinary() - _ = yym3197 + yyv3205 := &x.Items + yym3206 := z.DecBinary() + _ = yym3206 if false { } else { - h.decSliceNamespace((*[]Namespace)(yyv3196), d) + h.decSliceNamespace((*[]Namespace)(yyv3205), d) } } default: - z.DecStructFieldNotFound(-1, yys3191) - } // end switch yys3191 - } // end for yyj3191 + z.DecStructFieldNotFound(-1, yys3200) + } // end switch yys3200 + } // end for yyj3200 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -40949,16 +41027,16 @@ func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3198 int - var yyb3198 bool - var yyhl3198 bool = l >= 0 - yyj3198++ - if yyhl3198 { - yyb3198 = yyj3198 > l + var yyj3207 int + var yyb3207 bool + var yyhl3207 bool = l >= 0 + yyj3207++ + if yyhl3207 { + yyb3207 = yyj3207 > l } else { - yyb3198 = r.CheckBreak() + yyb3207 = r.CheckBreak() } - if yyb3198 { + if yyb3207 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40968,13 +41046,13 @@ func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3198++ - if yyhl3198 { - yyb3198 = yyj3198 > l + yyj3207++ + if yyhl3207 { + yyb3207 = yyj3207 > l } else { - yyb3198 = r.CheckBreak() + yyb3207 = r.CheckBreak() } - if yyb3198 { + if yyb3207 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40984,13 +41062,13 @@ func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3198++ - if yyhl3198 { - yyb3198 = yyj3198 > l + yyj3207++ + if yyhl3207 { + yyb3207 = yyj3207 > l } else { - yyb3198 = r.CheckBreak() + yyb3207 = r.CheckBreak() } - if yyb3198 { + if yyb3207 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40998,22 +41076,22 @@ func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3201 := &x.ListMeta - yym3202 := z.DecBinary() - _ = yym3202 + yyv3210 := &x.ListMeta + yym3211 := z.DecBinary() + _ = yym3211 if false { - } else if z.HasExtensions() && z.DecExt(yyv3201) { + } else if z.HasExtensions() && z.DecExt(yyv3210) { } else { - z.DecFallback(yyv3201, false) + z.DecFallback(yyv3210, false) } } - yyj3198++ - if yyhl3198 { - yyb3198 = yyj3198 > l + yyj3207++ + if yyhl3207 { + yyb3207 = yyj3207 > l } else { - yyb3198 = r.CheckBreak() + yyb3207 = r.CheckBreak() } - if yyb3198 { + if yyb3207 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41021,26 +41099,26 @@ func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3203 := &x.Items - yym3204 := z.DecBinary() - _ = yym3204 + yyv3212 := &x.Items + yym3213 := z.DecBinary() + _ = yym3213 if false { } else { - h.decSliceNamespace((*[]Namespace)(yyv3203), d) + h.decSliceNamespace((*[]Namespace)(yyv3212), d) } } for { - yyj3198++ - if yyhl3198 { - yyb3198 = yyj3198 > l + yyj3207++ + if yyhl3207 { + yyb3207 = yyj3207 > l } else { - yyb3198 = r.CheckBreak() + yyb3207 = r.CheckBreak() } - if yyb3198 { + if yyb3207 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3198-1, "") + z.DecStructFieldNotFound(yyj3207-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -41052,37 +41130,37 @@ func (x *Binding) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3205 := z.EncBinary() - _ = yym3205 + yym3214 := z.EncBinary() + _ = yym3214 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3206 := !z.EncBinary() - yy2arr3206 := z.EncBasicHandle().StructToArray - var yyq3206 [4]bool - _, _, _ = yysep3206, yyq3206, yy2arr3206 - const yyr3206 bool = false - yyq3206[0] = x.Kind != "" - yyq3206[1] = x.APIVersion != "" - yyq3206[2] = true - var yynn3206 int - if yyr3206 || yy2arr3206 { + yysep3215 := !z.EncBinary() + yy2arr3215 := z.EncBasicHandle().StructToArray + var yyq3215 [4]bool + _, _, _ = yysep3215, yyq3215, yy2arr3215 + const yyr3215 bool = false + yyq3215[0] = x.Kind != "" + yyq3215[1] = x.APIVersion != "" + yyq3215[2] = true + var yynn3215 int + if yyr3215 || yy2arr3215 { r.EncodeArrayStart(4) } else { - yynn3206 = 1 - for _, b := range yyq3206 { + yynn3215 = 1 + for _, b := range yyq3215 { if b { - yynn3206++ + yynn3215++ } } - r.EncodeMapStart(yynn3206) - yynn3206 = 0 + r.EncodeMapStart(yynn3215) + yynn3215 = 0 } - if yyr3206 || yy2arr3206 { + if yyr3215 || yy2arr3215 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3206[0] { - yym3208 := z.EncBinary() - _ = yym3208 + if yyq3215[0] { + yym3217 := z.EncBinary() + _ = yym3217 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -41091,23 +41169,23 @@ func (x *Binding) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3206[0] { + if yyq3215[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3209 := z.EncBinary() - _ = yym3209 + yym3218 := z.EncBinary() + _ = yym3218 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3206 || yy2arr3206 { + if yyr3215 || yy2arr3215 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3206[1] { - yym3211 := z.EncBinary() - _ = yym3211 + if yyq3215[1] { + yym3220 := z.EncBinary() + _ = yym3220 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -41116,47 +41194,47 @@ func (x *Binding) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3206[1] { + if yyq3215[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3212 := z.EncBinary() - _ = yym3212 + yym3221 := z.EncBinary() + _ = yym3221 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3206 || yy2arr3206 { + if yyr3215 || yy2arr3215 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3206[2] { - yy3214 := &x.ObjectMeta - yy3214.CodecEncodeSelf(e) + if yyq3215[2] { + yy3223 := &x.ObjectMeta + yy3223.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3206[2] { + if yyq3215[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3215 := &x.ObjectMeta - yy3215.CodecEncodeSelf(e) + yy3224 := &x.ObjectMeta + yy3224.CodecEncodeSelf(e) } } - if yyr3206 || yy2arr3206 { + if yyr3215 || yy2arr3215 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3217 := &x.Target - yy3217.CodecEncodeSelf(e) + yy3226 := &x.Target + yy3226.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("target")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3218 := &x.Target - yy3218.CodecEncodeSelf(e) + yy3227 := &x.Target + yy3227.CodecEncodeSelf(e) } - if yyr3206 || yy2arr3206 { + if yyr3215 || yy2arr3215 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -41169,25 +41247,25 @@ func (x *Binding) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3219 := z.DecBinary() - _ = yym3219 + yym3228 := z.DecBinary() + _ = yym3228 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3220 := r.ContainerType() - if yyct3220 == codecSelferValueTypeMap1234 { - yyl3220 := r.ReadMapStart() - if yyl3220 == 0 { + yyct3229 := r.ContainerType() + if yyct3229 == codecSelferValueTypeMap1234 { + yyl3229 := r.ReadMapStart() + if yyl3229 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3220, d) + x.codecDecodeSelfFromMap(yyl3229, d) } - } else if yyct3220 == codecSelferValueTypeArray1234 { - yyl3220 := r.ReadArrayStart() - if yyl3220 == 0 { + } else if yyct3229 == codecSelferValueTypeArray1234 { + yyl3229 := r.ReadArrayStart() + if yyl3229 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3220, d) + x.codecDecodeSelfFromArray(yyl3229, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -41199,12 +41277,12 @@ func (x *Binding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3221Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3221Slc - var yyhl3221 bool = l >= 0 - for yyj3221 := 0; ; yyj3221++ { - if yyhl3221 { - if yyj3221 >= l { + var yys3230Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3230Slc + var yyhl3230 bool = l >= 0 + for yyj3230 := 0; ; yyj3230++ { + if yyhl3230 { + if yyj3230 >= l { break } } else { @@ -41213,10 +41291,10 @@ func (x *Binding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3221Slc = r.DecodeBytes(yys3221Slc, true, true) - yys3221 := string(yys3221Slc) + yys3230Slc = r.DecodeBytes(yys3230Slc, true, true) + yys3230 := string(yys3230Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3221 { + switch yys3230 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -41233,20 +41311,20 @@ func (x *Binding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3224 := &x.ObjectMeta - yyv3224.CodecDecodeSelf(d) + yyv3233 := &x.ObjectMeta + yyv3233.CodecDecodeSelf(d) } case "target": if r.TryDecodeAsNil() { x.Target = ObjectReference{} } else { - yyv3225 := &x.Target - yyv3225.CodecDecodeSelf(d) + yyv3234 := &x.Target + yyv3234.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3221) - } // end switch yys3221 - } // end for yyj3221 + z.DecStructFieldNotFound(-1, yys3230) + } // end switch yys3230 + } // end for yyj3230 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -41254,16 +41332,16 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3226 int - var yyb3226 bool - var yyhl3226 bool = l >= 0 - yyj3226++ - if yyhl3226 { - yyb3226 = yyj3226 > l + var yyj3235 int + var yyb3235 bool + var yyhl3235 bool = l >= 0 + yyj3235++ + if yyhl3235 { + yyb3235 = yyj3235 > l } else { - yyb3226 = r.CheckBreak() + yyb3235 = r.CheckBreak() } - if yyb3226 { + if yyb3235 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41273,13 +41351,13 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3226++ - if yyhl3226 { - yyb3226 = yyj3226 > l + yyj3235++ + if yyhl3235 { + yyb3235 = yyj3235 > l } else { - yyb3226 = r.CheckBreak() + yyb3235 = r.CheckBreak() } - if yyb3226 { + if yyb3235 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41289,13 +41367,13 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3226++ - if yyhl3226 { - yyb3226 = yyj3226 > l + yyj3235++ + if yyhl3235 { + yyb3235 = yyj3235 > l } else { - yyb3226 = r.CheckBreak() + yyb3235 = r.CheckBreak() } - if yyb3226 { + if yyb3235 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41303,16 +41381,16 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3229 := &x.ObjectMeta - yyv3229.CodecDecodeSelf(d) + yyv3238 := &x.ObjectMeta + yyv3238.CodecDecodeSelf(d) } - yyj3226++ - if yyhl3226 { - yyb3226 = yyj3226 > l + yyj3235++ + if yyhl3235 { + yyb3235 = yyj3235 > l } else { - yyb3226 = r.CheckBreak() + yyb3235 = r.CheckBreak() } - if yyb3226 { + if yyb3235 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41320,21 +41398,21 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Target = ObjectReference{} } else { - yyv3230 := &x.Target - yyv3230.CodecDecodeSelf(d) + yyv3239 := &x.Target + yyv3239.CodecDecodeSelf(d) } for { - yyj3226++ - if yyhl3226 { - yyb3226 = yyj3226 > l + yyj3235++ + if yyhl3235 { + yyb3235 = yyj3235 > l } else { - yyb3226 = r.CheckBreak() + yyb3235 = r.CheckBreak() } - if yyb3226 { + if yyb3235 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3226-1, "") + z.DecStructFieldNotFound(yyj3235-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -41346,68 +41424,68 @@ func (x *Preconditions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3231 := z.EncBinary() - _ = yym3231 + yym3240 := z.EncBinary() + _ = yym3240 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3232 := !z.EncBinary() - yy2arr3232 := z.EncBasicHandle().StructToArray - var yyq3232 [1]bool - _, _, _ = yysep3232, yyq3232, yy2arr3232 - const yyr3232 bool = false - yyq3232[0] = x.UID != nil - var yynn3232 int - if yyr3232 || yy2arr3232 { + yysep3241 := !z.EncBinary() + yy2arr3241 := z.EncBasicHandle().StructToArray + var yyq3241 [1]bool + _, _, _ = yysep3241, yyq3241, yy2arr3241 + const yyr3241 bool = false + yyq3241[0] = x.UID != nil + var yynn3241 int + if yyr3241 || yy2arr3241 { r.EncodeArrayStart(1) } else { - yynn3232 = 0 - for _, b := range yyq3232 { + yynn3241 = 0 + for _, b := range yyq3241 { if b { - yynn3232++ + yynn3241++ } } - r.EncodeMapStart(yynn3232) - yynn3232 = 0 + r.EncodeMapStart(yynn3241) + yynn3241 = 0 } - if yyr3232 || yy2arr3232 { + if yyr3241 || yy2arr3241 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3232[0] { + if yyq3241[0] { if x.UID == nil { r.EncodeNil() } else { - yy3234 := *x.UID - yym3235 := z.EncBinary() - _ = yym3235 + yy3243 := *x.UID + yym3244 := z.EncBinary() + _ = yym3244 if false { - } else if z.HasExtensions() && z.EncExt(yy3234) { + } else if z.HasExtensions() && z.EncExt(yy3243) { } else { - r.EncodeString(codecSelferC_UTF81234, string(yy3234)) + r.EncodeString(codecSelferC_UTF81234, string(yy3243)) } } } else { r.EncodeNil() } } else { - if yyq3232[0] { + if yyq3241[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("uid")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.UID == nil { r.EncodeNil() } else { - yy3236 := *x.UID - yym3237 := z.EncBinary() - _ = yym3237 + yy3245 := *x.UID + yym3246 := z.EncBinary() + _ = yym3246 if false { - } else if z.HasExtensions() && z.EncExt(yy3236) { + } else if z.HasExtensions() && z.EncExt(yy3245) { } else { - r.EncodeString(codecSelferC_UTF81234, string(yy3236)) + r.EncodeString(codecSelferC_UTF81234, string(yy3245)) } } } } - if yyr3232 || yy2arr3232 { + if yyr3241 || yy2arr3241 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -41420,25 +41498,25 @@ func (x *Preconditions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3238 := z.DecBinary() - _ = yym3238 + yym3247 := z.DecBinary() + _ = yym3247 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3239 := r.ContainerType() - if yyct3239 == codecSelferValueTypeMap1234 { - yyl3239 := r.ReadMapStart() - if yyl3239 == 0 { + yyct3248 := r.ContainerType() + if yyct3248 == codecSelferValueTypeMap1234 { + yyl3248 := r.ReadMapStart() + if yyl3248 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3239, d) + x.codecDecodeSelfFromMap(yyl3248, d) } - } else if yyct3239 == codecSelferValueTypeArray1234 { - yyl3239 := r.ReadArrayStart() - if yyl3239 == 0 { + } else if yyct3248 == codecSelferValueTypeArray1234 { + yyl3248 := r.ReadArrayStart() + if yyl3248 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3239, d) + x.codecDecodeSelfFromArray(yyl3248, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -41450,12 +41528,12 @@ func (x *Preconditions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3240Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3240Slc - var yyhl3240 bool = l >= 0 - for yyj3240 := 0; ; yyj3240++ { - if yyhl3240 { - if yyj3240 >= l { + var yys3249Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3249Slc + var yyhl3249 bool = l >= 0 + for yyj3249 := 0; ; yyj3249++ { + if yyhl3249 { + if yyj3249 >= l { break } } else { @@ -41464,10 +41542,10 @@ func (x *Preconditions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3240Slc = r.DecodeBytes(yys3240Slc, true, true) - yys3240 := string(yys3240Slc) + yys3249Slc = r.DecodeBytes(yys3249Slc, true, true) + yys3249 := string(yys3249Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3240 { + switch yys3249 { case "uid": if r.TryDecodeAsNil() { if x.UID != nil { @@ -41477,8 +41555,8 @@ func (x *Preconditions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.UID == nil { x.UID = new(pkg1_types.UID) } - yym3242 := z.DecBinary() - _ = yym3242 + yym3251 := z.DecBinary() + _ = yym3251 if false { } else if z.HasExtensions() && z.DecExt(x.UID) { } else { @@ -41486,9 +41564,9 @@ func (x *Preconditions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } default: - z.DecStructFieldNotFound(-1, yys3240) - } // end switch yys3240 - } // end for yyj3240 + z.DecStructFieldNotFound(-1, yys3249) + } // end switch yys3249 + } // end for yyj3249 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -41496,16 +41574,16 @@ func (x *Preconditions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3243 int - var yyb3243 bool - var yyhl3243 bool = l >= 0 - yyj3243++ - if yyhl3243 { - yyb3243 = yyj3243 > l + var yyj3252 int + var yyb3252 bool + var yyhl3252 bool = l >= 0 + yyj3252++ + if yyhl3252 { + yyb3252 = yyj3252 > l } else { - yyb3243 = r.CheckBreak() + yyb3252 = r.CheckBreak() } - if yyb3243 { + if yyb3252 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41518,8 +41596,8 @@ func (x *Preconditions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.UID == nil { x.UID = new(pkg1_types.UID) } - yym3245 := z.DecBinary() - _ = yym3245 + yym3254 := z.DecBinary() + _ = yym3254 if false { } else if z.HasExtensions() && z.DecExt(x.UID) { } else { @@ -41527,17 +41605,17 @@ func (x *Preconditions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } } for { - yyj3243++ - if yyhl3243 { - yyb3243 = yyj3243 > l + yyj3252++ + if yyhl3252 { + yyb3252 = yyj3252 > l } else { - yyb3243 = r.CheckBreak() + yyb3252 = r.CheckBreak() } - if yyb3243 { + if yyb3252 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3243-1, "") + z.DecStructFieldNotFound(yyj3252-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -41549,39 +41627,39 @@ func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3246 := z.EncBinary() - _ = yym3246 + yym3255 := z.EncBinary() + _ = yym3255 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3247 := !z.EncBinary() - yy2arr3247 := z.EncBasicHandle().StructToArray - var yyq3247 [5]bool - _, _, _ = yysep3247, yyq3247, yy2arr3247 - const yyr3247 bool = false - yyq3247[0] = x.Kind != "" - yyq3247[1] = x.APIVersion != "" - yyq3247[2] = x.GracePeriodSeconds != nil - yyq3247[3] = x.Preconditions != nil - yyq3247[4] = x.OrphanDependents != nil - var yynn3247 int - if yyr3247 || yy2arr3247 { + yysep3256 := !z.EncBinary() + yy2arr3256 := z.EncBasicHandle().StructToArray + var yyq3256 [5]bool + _, _, _ = yysep3256, yyq3256, yy2arr3256 + const yyr3256 bool = false + yyq3256[0] = x.Kind != "" + yyq3256[1] = x.APIVersion != "" + yyq3256[2] = x.GracePeriodSeconds != nil + yyq3256[3] = x.Preconditions != nil + yyq3256[4] = x.OrphanDependents != nil + var yynn3256 int + if yyr3256 || yy2arr3256 { r.EncodeArrayStart(5) } else { - yynn3247 = 0 - for _, b := range yyq3247 { + yynn3256 = 0 + for _, b := range yyq3256 { if b { - yynn3247++ + yynn3256++ } } - r.EncodeMapStart(yynn3247) - yynn3247 = 0 + r.EncodeMapStart(yynn3256) + yynn3256 = 0 } - if yyr3247 || yy2arr3247 { + if yyr3256 || yy2arr3256 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3247[0] { - yym3249 := z.EncBinary() - _ = yym3249 + if yyq3256[0] { + yym3258 := z.EncBinary() + _ = yym3258 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -41590,23 +41668,23 @@ func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3247[0] { + if yyq3256[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3250 := z.EncBinary() - _ = yym3250 + yym3259 := z.EncBinary() + _ = yym3259 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3247 || yy2arr3247 { + if yyr3256 || yy2arr3256 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3247[1] { - yym3252 := z.EncBinary() - _ = yym3252 + if yyq3256[1] { + yym3261 := z.EncBinary() + _ = yym3261 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -41615,56 +41693,56 @@ func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3247[1] { + if yyq3256[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3253 := z.EncBinary() - _ = yym3253 + yym3262 := z.EncBinary() + _ = yym3262 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3247 || yy2arr3247 { + if yyr3256 || yy2arr3256 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3247[2] { + if yyq3256[2] { if x.GracePeriodSeconds == nil { r.EncodeNil() } else { - yy3255 := *x.GracePeriodSeconds - yym3256 := z.EncBinary() - _ = yym3256 + yy3264 := *x.GracePeriodSeconds + yym3265 := z.EncBinary() + _ = yym3265 if false { } else { - r.EncodeInt(int64(yy3255)) + r.EncodeInt(int64(yy3264)) } } } else { r.EncodeNil() } } else { - if yyq3247[2] { + if yyq3256[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("gracePeriodSeconds")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.GracePeriodSeconds == nil { r.EncodeNil() } else { - yy3257 := *x.GracePeriodSeconds - yym3258 := z.EncBinary() - _ = yym3258 + yy3266 := *x.GracePeriodSeconds + yym3267 := z.EncBinary() + _ = yym3267 if false { } else { - r.EncodeInt(int64(yy3257)) + r.EncodeInt(int64(yy3266)) } } } } - if yyr3247 || yy2arr3247 { + if yyr3256 || yy2arr3256 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3247[3] { + if yyq3256[3] { if x.Preconditions == nil { r.EncodeNil() } else { @@ -41674,7 +41752,7 @@ func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3247[3] { + if yyq3256[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("preconditions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -41685,42 +41763,42 @@ func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3247 || yy2arr3247 { + if yyr3256 || yy2arr3256 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3247[4] { + if yyq3256[4] { if x.OrphanDependents == nil { r.EncodeNil() } else { - yy3261 := *x.OrphanDependents - yym3262 := z.EncBinary() - _ = yym3262 + yy3270 := *x.OrphanDependents + yym3271 := z.EncBinary() + _ = yym3271 if false { } else { - r.EncodeBool(bool(yy3261)) + r.EncodeBool(bool(yy3270)) } } } else { r.EncodeNil() } } else { - if yyq3247[4] { + if yyq3256[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("orphanDependents")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.OrphanDependents == nil { r.EncodeNil() } else { - yy3263 := *x.OrphanDependents - yym3264 := z.EncBinary() - _ = yym3264 + yy3272 := *x.OrphanDependents + yym3273 := z.EncBinary() + _ = yym3273 if false { } else { - r.EncodeBool(bool(yy3263)) + r.EncodeBool(bool(yy3272)) } } } } - if yyr3247 || yy2arr3247 { + if yyr3256 || yy2arr3256 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -41733,25 +41811,25 @@ func (x *DeleteOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3265 := z.DecBinary() - _ = yym3265 + yym3274 := z.DecBinary() + _ = yym3274 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3266 := r.ContainerType() - if yyct3266 == codecSelferValueTypeMap1234 { - yyl3266 := r.ReadMapStart() - if yyl3266 == 0 { + yyct3275 := r.ContainerType() + if yyct3275 == codecSelferValueTypeMap1234 { + yyl3275 := r.ReadMapStart() + if yyl3275 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3266, d) + x.codecDecodeSelfFromMap(yyl3275, d) } - } else if yyct3266 == codecSelferValueTypeArray1234 { - yyl3266 := r.ReadArrayStart() - if yyl3266 == 0 { + } else if yyct3275 == codecSelferValueTypeArray1234 { + yyl3275 := r.ReadArrayStart() + if yyl3275 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3266, d) + x.codecDecodeSelfFromArray(yyl3275, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -41763,12 +41841,12 @@ func (x *DeleteOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3267Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3267Slc - var yyhl3267 bool = l >= 0 - for yyj3267 := 0; ; yyj3267++ { - if yyhl3267 { - if yyj3267 >= l { + var yys3276Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3276Slc + var yyhl3276 bool = l >= 0 + for yyj3276 := 0; ; yyj3276++ { + if yyhl3276 { + if yyj3276 >= l { break } } else { @@ -41777,10 +41855,10 @@ func (x *DeleteOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3267Slc = r.DecodeBytes(yys3267Slc, true, true) - yys3267 := string(yys3267Slc) + yys3276Slc = r.DecodeBytes(yys3276Slc, true, true) + yys3276 := string(yys3276Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3267 { + switch yys3276 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -41802,8 +41880,8 @@ func (x *DeleteOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.GracePeriodSeconds == nil { x.GracePeriodSeconds = new(int64) } - yym3271 := z.DecBinary() - _ = yym3271 + yym3280 := z.DecBinary() + _ = yym3280 if false { } else { *((*int64)(x.GracePeriodSeconds)) = int64(r.DecodeInt(64)) @@ -41829,17 +41907,17 @@ func (x *DeleteOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.OrphanDependents == nil { x.OrphanDependents = new(bool) } - yym3274 := z.DecBinary() - _ = yym3274 + yym3283 := z.DecBinary() + _ = yym3283 if false { } else { *((*bool)(x.OrphanDependents)) = r.DecodeBool() } } default: - z.DecStructFieldNotFound(-1, yys3267) - } // end switch yys3267 - } // end for yyj3267 + z.DecStructFieldNotFound(-1, yys3276) + } // end switch yys3276 + } // end for yyj3276 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -41847,16 +41925,16 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3275 int - var yyb3275 bool - var yyhl3275 bool = l >= 0 - yyj3275++ - if yyhl3275 { - yyb3275 = yyj3275 > l + var yyj3284 int + var yyb3284 bool + var yyhl3284 bool = l >= 0 + yyj3284++ + if yyhl3284 { + yyb3284 = yyj3284 > l } else { - yyb3275 = r.CheckBreak() + yyb3284 = r.CheckBreak() } - if yyb3275 { + if yyb3284 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41866,13 +41944,13 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3275++ - if yyhl3275 { - yyb3275 = yyj3275 > l + yyj3284++ + if yyhl3284 { + yyb3284 = yyj3284 > l } else { - yyb3275 = r.CheckBreak() + yyb3284 = r.CheckBreak() } - if yyb3275 { + if yyb3284 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41882,13 +41960,13 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3275++ - if yyhl3275 { - yyb3275 = yyj3275 > l + yyj3284++ + if yyhl3284 { + yyb3284 = yyj3284 > l } else { - yyb3275 = r.CheckBreak() + yyb3284 = r.CheckBreak() } - if yyb3275 { + if yyb3284 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41901,20 +41979,20 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.GracePeriodSeconds == nil { x.GracePeriodSeconds = new(int64) } - yym3279 := z.DecBinary() - _ = yym3279 + yym3288 := z.DecBinary() + _ = yym3288 if false { } else { *((*int64)(x.GracePeriodSeconds)) = int64(r.DecodeInt(64)) } } - yyj3275++ - if yyhl3275 { - yyb3275 = yyj3275 > l + yyj3284++ + if yyhl3284 { + yyb3284 = yyj3284 > l } else { - yyb3275 = r.CheckBreak() + yyb3284 = r.CheckBreak() } - if yyb3275 { + if yyb3284 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41929,13 +42007,13 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.Preconditions.CodecDecodeSelf(d) } - yyj3275++ - if yyhl3275 { - yyb3275 = yyj3275 > l + yyj3284++ + if yyhl3284 { + yyb3284 = yyj3284 > l } else { - yyb3275 = r.CheckBreak() + yyb3284 = r.CheckBreak() } - if yyb3275 { + if yyb3284 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41948,25 +42026,25 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.OrphanDependents == nil { x.OrphanDependents = new(bool) } - yym3282 := z.DecBinary() - _ = yym3282 + yym3291 := z.DecBinary() + _ = yym3291 if false { } else { *((*bool)(x.OrphanDependents)) = r.DecodeBool() } } for { - yyj3275++ - if yyhl3275 { - yyb3275 = yyj3275 > l + yyj3284++ + if yyhl3284 { + yyb3284 = yyj3284 > l } else { - yyb3275 = r.CheckBreak() + yyb3284 = r.CheckBreak() } - if yyb3275 { + if yyb3284 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3275-1, "") + z.DecStructFieldNotFound(yyj3284-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -41978,36 +42056,36 @@ func (x *ExportOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3283 := z.EncBinary() - _ = yym3283 + yym3292 := z.EncBinary() + _ = yym3292 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3284 := !z.EncBinary() - yy2arr3284 := z.EncBasicHandle().StructToArray - var yyq3284 [4]bool - _, _, _ = yysep3284, yyq3284, yy2arr3284 - const yyr3284 bool = false - yyq3284[0] = x.Kind != "" - yyq3284[1] = x.APIVersion != "" - var yynn3284 int - if yyr3284 || yy2arr3284 { + yysep3293 := !z.EncBinary() + yy2arr3293 := z.EncBasicHandle().StructToArray + var yyq3293 [4]bool + _, _, _ = yysep3293, yyq3293, yy2arr3293 + const yyr3293 bool = false + yyq3293[0] = x.Kind != "" + yyq3293[1] = x.APIVersion != "" + var yynn3293 int + if yyr3293 || yy2arr3293 { r.EncodeArrayStart(4) } else { - yynn3284 = 2 - for _, b := range yyq3284 { + yynn3293 = 2 + for _, b := range yyq3293 { if b { - yynn3284++ + yynn3293++ } } - r.EncodeMapStart(yynn3284) - yynn3284 = 0 + r.EncodeMapStart(yynn3293) + yynn3293 = 0 } - if yyr3284 || yy2arr3284 { + if yyr3293 || yy2arr3293 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3284[0] { - yym3286 := z.EncBinary() - _ = yym3286 + if yyq3293[0] { + yym3295 := z.EncBinary() + _ = yym3295 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -42016,23 +42094,23 @@ func (x *ExportOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3284[0] { + if yyq3293[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3287 := z.EncBinary() - _ = yym3287 + yym3296 := z.EncBinary() + _ = yym3296 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3284 || yy2arr3284 { + if yyr3293 || yy2arr3293 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3284[1] { - yym3289 := z.EncBinary() - _ = yym3289 + if yyq3293[1] { + yym3298 := z.EncBinary() + _ = yym3298 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -42041,22 +42119,22 @@ func (x *ExportOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3284[1] { + if yyq3293[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3290 := z.EncBinary() - _ = yym3290 + yym3299 := z.EncBinary() + _ = yym3299 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3284 || yy2arr3284 { + if yyr3293 || yy2arr3293 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3292 := z.EncBinary() - _ = yym3292 + yym3301 := z.EncBinary() + _ = yym3301 if false { } else { r.EncodeBool(bool(x.Export)) @@ -42065,17 +42143,17 @@ func (x *ExportOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("export")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3293 := z.EncBinary() - _ = yym3293 + yym3302 := z.EncBinary() + _ = yym3302 if false { } else { r.EncodeBool(bool(x.Export)) } } - if yyr3284 || yy2arr3284 { + if yyr3293 || yy2arr3293 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3295 := z.EncBinary() - _ = yym3295 + yym3304 := z.EncBinary() + _ = yym3304 if false { } else { r.EncodeBool(bool(x.Exact)) @@ -42084,14 +42162,14 @@ func (x *ExportOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("exact")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3296 := z.EncBinary() - _ = yym3296 + yym3305 := z.EncBinary() + _ = yym3305 if false { } else { r.EncodeBool(bool(x.Exact)) } } - if yyr3284 || yy2arr3284 { + if yyr3293 || yy2arr3293 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -42104,25 +42182,25 @@ func (x *ExportOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3297 := z.DecBinary() - _ = yym3297 + yym3306 := z.DecBinary() + _ = yym3306 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3298 := r.ContainerType() - if yyct3298 == codecSelferValueTypeMap1234 { - yyl3298 := r.ReadMapStart() - if yyl3298 == 0 { + yyct3307 := r.ContainerType() + if yyct3307 == codecSelferValueTypeMap1234 { + yyl3307 := r.ReadMapStart() + if yyl3307 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3298, d) + x.codecDecodeSelfFromMap(yyl3307, d) } - } else if yyct3298 == codecSelferValueTypeArray1234 { - yyl3298 := r.ReadArrayStart() - if yyl3298 == 0 { + } else if yyct3307 == codecSelferValueTypeArray1234 { + yyl3307 := r.ReadArrayStart() + if yyl3307 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3298, d) + x.codecDecodeSelfFromArray(yyl3307, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -42134,12 +42212,12 @@ func (x *ExportOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3299Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3299Slc - var yyhl3299 bool = l >= 0 - for yyj3299 := 0; ; yyj3299++ { - if yyhl3299 { - if yyj3299 >= l { + var yys3308Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3308Slc + var yyhl3308 bool = l >= 0 + for yyj3308 := 0; ; yyj3308++ { + if yyhl3308 { + if yyj3308 >= l { break } } else { @@ -42148,10 +42226,10 @@ func (x *ExportOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3299Slc = r.DecodeBytes(yys3299Slc, true, true) - yys3299 := string(yys3299Slc) + yys3308Slc = r.DecodeBytes(yys3308Slc, true, true) + yys3308 := string(yys3308Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3299 { + switch yys3308 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -42177,9 +42255,9 @@ func (x *ExportOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Exact = bool(r.DecodeBool()) } default: - z.DecStructFieldNotFound(-1, yys3299) - } // end switch yys3299 - } // end for yyj3299 + z.DecStructFieldNotFound(-1, yys3308) + } // end switch yys3308 + } // end for yyj3308 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -42187,16 +42265,16 @@ func (x *ExportOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3304 int - var yyb3304 bool - var yyhl3304 bool = l >= 0 - yyj3304++ - if yyhl3304 { - yyb3304 = yyj3304 > l + var yyj3313 int + var yyb3313 bool + var yyhl3313 bool = l >= 0 + yyj3313++ + if yyhl3313 { + yyb3313 = yyj3313 > l } else { - yyb3304 = r.CheckBreak() + yyb3313 = r.CheckBreak() } - if yyb3304 { + if yyb3313 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42206,13 +42284,13 @@ func (x *ExportOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3304++ - if yyhl3304 { - yyb3304 = yyj3304 > l + yyj3313++ + if yyhl3313 { + yyb3313 = yyj3313 > l } else { - yyb3304 = r.CheckBreak() + yyb3313 = r.CheckBreak() } - if yyb3304 { + if yyb3313 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42222,13 +42300,13 @@ func (x *ExportOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3304++ - if yyhl3304 { - yyb3304 = yyj3304 > l + yyj3313++ + if yyhl3313 { + yyb3313 = yyj3313 > l } else { - yyb3304 = r.CheckBreak() + yyb3313 = r.CheckBreak() } - if yyb3304 { + if yyb3313 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42238,13 +42316,13 @@ func (x *ExportOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Export = bool(r.DecodeBool()) } - yyj3304++ - if yyhl3304 { - yyb3304 = yyj3304 > l + yyj3313++ + if yyhl3313 { + yyb3313 = yyj3313 > l } else { - yyb3304 = r.CheckBreak() + yyb3313 = r.CheckBreak() } - if yyb3304 { + if yyb3313 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42255,17 +42333,17 @@ func (x *ExportOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Exact = bool(r.DecodeBool()) } for { - yyj3304++ - if yyhl3304 { - yyb3304 = yyj3304 > l + yyj3313++ + if yyhl3313 { + yyb3313 = yyj3313 > l } else { - yyb3304 = r.CheckBreak() + yyb3313 = r.CheckBreak() } - if yyb3304 { + if yyb3313 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3304-1, "") + z.DecStructFieldNotFound(yyj3313-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -42277,36 +42355,36 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3309 := z.EncBinary() - _ = yym3309 + yym3318 := z.EncBinary() + _ = yym3318 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3310 := !z.EncBinary() - yy2arr3310 := z.EncBasicHandle().StructToArray - var yyq3310 [7]bool - _, _, _ = yysep3310, yyq3310, yy2arr3310 - const yyr3310 bool = false - yyq3310[0] = x.Kind != "" - yyq3310[1] = x.APIVersion != "" - var yynn3310 int - if yyr3310 || yy2arr3310 { + yysep3319 := !z.EncBinary() + yy2arr3319 := z.EncBasicHandle().StructToArray + var yyq3319 [7]bool + _, _, _ = yysep3319, yyq3319, yy2arr3319 + const yyr3319 bool = false + yyq3319[0] = x.Kind != "" + yyq3319[1] = x.APIVersion != "" + var yynn3319 int + if yyr3319 || yy2arr3319 { r.EncodeArrayStart(7) } else { - yynn3310 = 5 - for _, b := range yyq3310 { + yynn3319 = 5 + for _, b := range yyq3319 { if b { - yynn3310++ + yynn3319++ } } - r.EncodeMapStart(yynn3310) - yynn3310 = 0 + r.EncodeMapStart(yynn3319) + yynn3319 = 0 } - if yyr3310 || yy2arr3310 { + if yyr3319 || yy2arr3319 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3310[0] { - yym3312 := z.EncBinary() - _ = yym3312 + if yyq3319[0] { + yym3321 := z.EncBinary() + _ = yym3321 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -42315,23 +42393,23 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3310[0] { + if yyq3319[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3313 := z.EncBinary() - _ = yym3313 + yym3322 := z.EncBinary() + _ = yym3322 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3310 || yy2arr3310 { + if yyr3319 || yy2arr3319 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3310[1] { - yym3315 := z.EncBinary() - _ = yym3315 + if yyq3319[1] { + yym3324 := z.EncBinary() + _ = yym3324 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -42340,25 +42418,25 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3310[1] { + if yyq3319[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3316 := z.EncBinary() - _ = yym3316 + yym3325 := z.EncBinary() + _ = yym3325 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3310 || yy2arr3310 { + if yyr3319 || yy2arr3319 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.LabelSelector == nil { r.EncodeNil() } else { - yym3318 := z.EncBinary() - _ = yym3318 + yym3327 := z.EncBinary() + _ = yym3327 if false { } else if z.HasExtensions() && z.EncExt(x.LabelSelector) { } else { @@ -42372,8 +42450,8 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x.LabelSelector == nil { r.EncodeNil() } else { - yym3319 := z.EncBinary() - _ = yym3319 + yym3328 := z.EncBinary() + _ = yym3328 if false { } else if z.HasExtensions() && z.EncExt(x.LabelSelector) { } else { @@ -42381,13 +42459,13 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3310 || yy2arr3310 { + if yyr3319 || yy2arr3319 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.FieldSelector == nil { r.EncodeNil() } else { - yym3321 := z.EncBinary() - _ = yym3321 + yym3330 := z.EncBinary() + _ = yym3330 if false { } else if z.HasExtensions() && z.EncExt(x.FieldSelector) { } else { @@ -42401,8 +42479,8 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x.FieldSelector == nil { r.EncodeNil() } else { - yym3322 := z.EncBinary() - _ = yym3322 + yym3331 := z.EncBinary() + _ = yym3331 if false { } else if z.HasExtensions() && z.EncExt(x.FieldSelector) { } else { @@ -42410,10 +42488,10 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3310 || yy2arr3310 { + if yyr3319 || yy2arr3319 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3324 := z.EncBinary() - _ = yym3324 + yym3333 := z.EncBinary() + _ = yym3333 if false { } else { r.EncodeBool(bool(x.Watch)) @@ -42422,17 +42500,17 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Watch")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3325 := z.EncBinary() - _ = yym3325 + yym3334 := z.EncBinary() + _ = yym3334 if false { } else { r.EncodeBool(bool(x.Watch)) } } - if yyr3310 || yy2arr3310 { + if yyr3319 || yy2arr3319 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3327 := z.EncBinary() - _ = yym3327 + yym3336 := z.EncBinary() + _ = yym3336 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) @@ -42441,24 +42519,24 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("ResourceVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3328 := z.EncBinary() - _ = yym3328 + yym3337 := z.EncBinary() + _ = yym3337 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) } } - if yyr3310 || yy2arr3310 { + if yyr3319 || yy2arr3319 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.TimeoutSeconds == nil { r.EncodeNil() } else { - yy3330 := *x.TimeoutSeconds - yym3331 := z.EncBinary() - _ = yym3331 + yy3339 := *x.TimeoutSeconds + yym3340 := z.EncBinary() + _ = yym3340 if false { } else { - r.EncodeInt(int64(yy3330)) + r.EncodeInt(int64(yy3339)) } } } else { @@ -42468,16 +42546,16 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x.TimeoutSeconds == nil { r.EncodeNil() } else { - yy3332 := *x.TimeoutSeconds - yym3333 := z.EncBinary() - _ = yym3333 + yy3341 := *x.TimeoutSeconds + yym3342 := z.EncBinary() + _ = yym3342 if false { } else { - r.EncodeInt(int64(yy3332)) + r.EncodeInt(int64(yy3341)) } } } - if yyr3310 || yy2arr3310 { + if yyr3319 || yy2arr3319 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -42490,25 +42568,25 @@ func (x *ListOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3334 := z.DecBinary() - _ = yym3334 + yym3343 := z.DecBinary() + _ = yym3343 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3335 := r.ContainerType() - if yyct3335 == codecSelferValueTypeMap1234 { - yyl3335 := r.ReadMapStart() - if yyl3335 == 0 { + yyct3344 := r.ContainerType() + if yyct3344 == codecSelferValueTypeMap1234 { + yyl3344 := r.ReadMapStart() + if yyl3344 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3335, d) + x.codecDecodeSelfFromMap(yyl3344, d) } - } else if yyct3335 == codecSelferValueTypeArray1234 { - yyl3335 := r.ReadArrayStart() - if yyl3335 == 0 { + } else if yyct3344 == codecSelferValueTypeArray1234 { + yyl3344 := r.ReadArrayStart() + if yyl3344 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3335, d) + x.codecDecodeSelfFromArray(yyl3344, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -42520,12 +42598,12 @@ func (x *ListOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3336Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3336Slc - var yyhl3336 bool = l >= 0 - for yyj3336 := 0; ; yyj3336++ { - if yyhl3336 { - if yyj3336 >= l { + var yys3345Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3345Slc + var yyhl3345 bool = l >= 0 + for yyj3345 := 0; ; yyj3345++ { + if yyhl3345 { + if yyj3345 >= l { break } } else { @@ -42534,10 +42612,10 @@ func (x *ListOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3336Slc = r.DecodeBytes(yys3336Slc, true, true) - yys3336 := string(yys3336Slc) + yys3345Slc = r.DecodeBytes(yys3345Slc, true, true) + yys3345 := string(yys3345Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3336 { + switch yys3345 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -42554,26 +42632,26 @@ func (x *ListOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.LabelSelector = nil } else { - yyv3339 := &x.LabelSelector - yym3340 := z.DecBinary() - _ = yym3340 + yyv3348 := &x.LabelSelector + yym3349 := z.DecBinary() + _ = yym3349 if false { - } else if z.HasExtensions() && z.DecExt(yyv3339) { + } else if z.HasExtensions() && z.DecExt(yyv3348) { } else { - z.DecFallback(yyv3339, true) + z.DecFallback(yyv3348, true) } } case "FieldSelector": if r.TryDecodeAsNil() { x.FieldSelector = nil } else { - yyv3341 := &x.FieldSelector - yym3342 := z.DecBinary() - _ = yym3342 + yyv3350 := &x.FieldSelector + yym3351 := z.DecBinary() + _ = yym3351 if false { - } else if z.HasExtensions() && z.DecExt(yyv3341) { + } else if z.HasExtensions() && z.DecExt(yyv3350) { } else { - z.DecFallback(yyv3341, true) + z.DecFallback(yyv3350, true) } } case "Watch": @@ -42597,17 +42675,17 @@ func (x *ListOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.TimeoutSeconds == nil { x.TimeoutSeconds = new(int64) } - yym3346 := z.DecBinary() - _ = yym3346 + yym3355 := z.DecBinary() + _ = yym3355 if false { } else { *((*int64)(x.TimeoutSeconds)) = int64(r.DecodeInt(64)) } } default: - z.DecStructFieldNotFound(-1, yys3336) - } // end switch yys3336 - } // end for yyj3336 + z.DecStructFieldNotFound(-1, yys3345) + } // end switch yys3345 + } // end for yyj3345 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -42615,16 +42693,16 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3347 int - var yyb3347 bool - var yyhl3347 bool = l >= 0 - yyj3347++ - if yyhl3347 { - yyb3347 = yyj3347 > l + var yyj3356 int + var yyb3356 bool + var yyhl3356 bool = l >= 0 + yyj3356++ + if yyhl3356 { + yyb3356 = yyj3356 > l } else { - yyb3347 = r.CheckBreak() + yyb3356 = r.CheckBreak() } - if yyb3347 { + if yyb3356 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42634,13 +42712,13 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3347++ - if yyhl3347 { - yyb3347 = yyj3347 > l + yyj3356++ + if yyhl3356 { + yyb3356 = yyj3356 > l } else { - yyb3347 = r.CheckBreak() + yyb3356 = r.CheckBreak() } - if yyb3347 { + if yyb3356 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42650,13 +42728,13 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3347++ - if yyhl3347 { - yyb3347 = yyj3347 > l + yyj3356++ + if yyhl3356 { + yyb3356 = yyj3356 > l } else { - yyb3347 = r.CheckBreak() + yyb3356 = r.CheckBreak() } - if yyb3347 { + if yyb3356 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42664,22 +42742,22 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.LabelSelector = nil } else { - yyv3350 := &x.LabelSelector - yym3351 := z.DecBinary() - _ = yym3351 + yyv3359 := &x.LabelSelector + yym3360 := z.DecBinary() + _ = yym3360 if false { - } else if z.HasExtensions() && z.DecExt(yyv3350) { + } else if z.HasExtensions() && z.DecExt(yyv3359) { } else { - z.DecFallback(yyv3350, true) + z.DecFallback(yyv3359, true) } } - yyj3347++ - if yyhl3347 { - yyb3347 = yyj3347 > l + yyj3356++ + if yyhl3356 { + yyb3356 = yyj3356 > l } else { - yyb3347 = r.CheckBreak() + yyb3356 = r.CheckBreak() } - if yyb3347 { + if yyb3356 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42687,22 +42765,22 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.FieldSelector = nil } else { - yyv3352 := &x.FieldSelector - yym3353 := z.DecBinary() - _ = yym3353 + yyv3361 := &x.FieldSelector + yym3362 := z.DecBinary() + _ = yym3362 if false { - } else if z.HasExtensions() && z.DecExt(yyv3352) { + } else if z.HasExtensions() && z.DecExt(yyv3361) { } else { - z.DecFallback(yyv3352, true) + z.DecFallback(yyv3361, true) } } - yyj3347++ - if yyhl3347 { - yyb3347 = yyj3347 > l + yyj3356++ + if yyhl3356 { + yyb3356 = yyj3356 > l } else { - yyb3347 = r.CheckBreak() + yyb3356 = r.CheckBreak() } - if yyb3347 { + if yyb3356 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42712,13 +42790,13 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Watch = bool(r.DecodeBool()) } - yyj3347++ - if yyhl3347 { - yyb3347 = yyj3347 > l + yyj3356++ + if yyhl3356 { + yyb3356 = yyj3356 > l } else { - yyb3347 = r.CheckBreak() + yyb3356 = r.CheckBreak() } - if yyb3347 { + if yyb3356 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42728,13 +42806,13 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.ResourceVersion = string(r.DecodeString()) } - yyj3347++ - if yyhl3347 { - yyb3347 = yyj3347 > l + yyj3356++ + if yyhl3356 { + yyb3356 = yyj3356 > l } else { - yyb3347 = r.CheckBreak() + yyb3356 = r.CheckBreak() } - if yyb3347 { + if yyb3356 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42747,25 +42825,25 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.TimeoutSeconds == nil { x.TimeoutSeconds = new(int64) } - yym3357 := z.DecBinary() - _ = yym3357 + yym3366 := z.DecBinary() + _ = yym3366 if false { } else { *((*int64)(x.TimeoutSeconds)) = int64(r.DecodeInt(64)) } } for { - yyj3347++ - if yyhl3347 { - yyb3347 = yyj3347 > l + yyj3356++ + if yyhl3356 { + yyb3356 = yyj3356 > l } else { - yyb3347 = r.CheckBreak() + yyb3356 = r.CheckBreak() } - if yyb3347 { + if yyb3356 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3347-1, "") + z.DecStructFieldNotFound(yyj3356-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -42777,36 +42855,36 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3358 := z.EncBinary() - _ = yym3358 + yym3367 := z.EncBinary() + _ = yym3367 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3359 := !z.EncBinary() - yy2arr3359 := z.EncBasicHandle().StructToArray - var yyq3359 [10]bool - _, _, _ = yysep3359, yyq3359, yy2arr3359 - const yyr3359 bool = false - yyq3359[0] = x.Kind != "" - yyq3359[1] = x.APIVersion != "" - var yynn3359 int - if yyr3359 || yy2arr3359 { + yysep3368 := !z.EncBinary() + yy2arr3368 := z.EncBasicHandle().StructToArray + var yyq3368 [10]bool + _, _, _ = yysep3368, yyq3368, yy2arr3368 + const yyr3368 bool = false + yyq3368[0] = x.Kind != "" + yyq3368[1] = x.APIVersion != "" + var yynn3368 int + if yyr3368 || yy2arr3368 { r.EncodeArrayStart(10) } else { - yynn3359 = 8 - for _, b := range yyq3359 { + yynn3368 = 8 + for _, b := range yyq3368 { if b { - yynn3359++ + yynn3368++ } } - r.EncodeMapStart(yynn3359) - yynn3359 = 0 + r.EncodeMapStart(yynn3368) + yynn3368 = 0 } - if yyr3359 || yy2arr3359 { + if yyr3368 || yy2arr3368 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3359[0] { - yym3361 := z.EncBinary() - _ = yym3361 + if yyq3368[0] { + yym3370 := z.EncBinary() + _ = yym3370 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -42815,23 +42893,23 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3359[0] { + if yyq3368[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3362 := z.EncBinary() - _ = yym3362 + yym3371 := z.EncBinary() + _ = yym3371 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3359 || yy2arr3359 { + if yyr3368 || yy2arr3368 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3359[1] { - yym3364 := z.EncBinary() - _ = yym3364 + if yyq3368[1] { + yym3373 := z.EncBinary() + _ = yym3373 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -42840,22 +42918,22 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3359[1] { + if yyq3368[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3365 := z.EncBinary() - _ = yym3365 + yym3374 := z.EncBinary() + _ = yym3374 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3359 || yy2arr3359 { + if yyr3368 || yy2arr3368 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3367 := z.EncBinary() - _ = yym3367 + yym3376 := z.EncBinary() + _ = yym3376 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) @@ -42864,17 +42942,17 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Container")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3368 := z.EncBinary() - _ = yym3368 + yym3377 := z.EncBinary() + _ = yym3377 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) } } - if yyr3359 || yy2arr3359 { + if yyr3368 || yy2arr3368 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3370 := z.EncBinary() - _ = yym3370 + yym3379 := z.EncBinary() + _ = yym3379 if false { } else { r.EncodeBool(bool(x.Follow)) @@ -42883,17 +42961,17 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Follow")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3371 := z.EncBinary() - _ = yym3371 + yym3380 := z.EncBinary() + _ = yym3380 if false { } else { r.EncodeBool(bool(x.Follow)) } } - if yyr3359 || yy2arr3359 { + if yyr3368 || yy2arr3368 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3373 := z.EncBinary() - _ = yym3373 + yym3382 := z.EncBinary() + _ = yym3382 if false { } else { r.EncodeBool(bool(x.Previous)) @@ -42902,24 +42980,24 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Previous")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3374 := z.EncBinary() - _ = yym3374 + yym3383 := z.EncBinary() + _ = yym3383 if false { } else { r.EncodeBool(bool(x.Previous)) } } - if yyr3359 || yy2arr3359 { + if yyr3368 || yy2arr3368 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.SinceSeconds == nil { r.EncodeNil() } else { - yy3376 := *x.SinceSeconds - yym3377 := z.EncBinary() - _ = yym3377 + yy3385 := *x.SinceSeconds + yym3386 := z.EncBinary() + _ = yym3386 if false { } else { - r.EncodeInt(int64(yy3376)) + r.EncodeInt(int64(yy3385)) } } } else { @@ -42929,27 +43007,27 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x.SinceSeconds == nil { r.EncodeNil() } else { - yy3378 := *x.SinceSeconds - yym3379 := z.EncBinary() - _ = yym3379 + yy3387 := *x.SinceSeconds + yym3388 := z.EncBinary() + _ = yym3388 if false { } else { - r.EncodeInt(int64(yy3378)) + r.EncodeInt(int64(yy3387)) } } } - if yyr3359 || yy2arr3359 { + if yyr3368 || yy2arr3368 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.SinceTime == nil { r.EncodeNil() } else { - yym3381 := z.EncBinary() - _ = yym3381 + yym3390 := z.EncBinary() + _ = yym3390 if false { } else if z.HasExtensions() && z.EncExt(x.SinceTime) { - } else if yym3381 { + } else if yym3390 { z.EncBinaryMarshal(x.SinceTime) - } else if !yym3381 && z.IsJSONHandle() { + } else if !yym3390 && z.IsJSONHandle() { z.EncJSONMarshal(x.SinceTime) } else { z.EncFallback(x.SinceTime) @@ -42962,23 +43040,23 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x.SinceTime == nil { r.EncodeNil() } else { - yym3382 := z.EncBinary() - _ = yym3382 + yym3391 := z.EncBinary() + _ = yym3391 if false { } else if z.HasExtensions() && z.EncExt(x.SinceTime) { - } else if yym3382 { + } else if yym3391 { z.EncBinaryMarshal(x.SinceTime) - } else if !yym3382 && z.IsJSONHandle() { + } else if !yym3391 && z.IsJSONHandle() { z.EncJSONMarshal(x.SinceTime) } else { z.EncFallback(x.SinceTime) } } } - if yyr3359 || yy2arr3359 { + if yyr3368 || yy2arr3368 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3384 := z.EncBinary() - _ = yym3384 + yym3393 := z.EncBinary() + _ = yym3393 if false { } else { r.EncodeBool(bool(x.Timestamps)) @@ -42987,24 +43065,24 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Timestamps")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3385 := z.EncBinary() - _ = yym3385 + yym3394 := z.EncBinary() + _ = yym3394 if false { } else { r.EncodeBool(bool(x.Timestamps)) } } - if yyr3359 || yy2arr3359 { + if yyr3368 || yy2arr3368 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.TailLines == nil { r.EncodeNil() } else { - yy3387 := *x.TailLines - yym3388 := z.EncBinary() - _ = yym3388 + yy3396 := *x.TailLines + yym3397 := z.EncBinary() + _ = yym3397 if false { } else { - r.EncodeInt(int64(yy3387)) + r.EncodeInt(int64(yy3396)) } } } else { @@ -43014,26 +43092,26 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x.TailLines == nil { r.EncodeNil() } else { - yy3389 := *x.TailLines - yym3390 := z.EncBinary() - _ = yym3390 + yy3398 := *x.TailLines + yym3399 := z.EncBinary() + _ = yym3399 if false { } else { - r.EncodeInt(int64(yy3389)) + r.EncodeInt(int64(yy3398)) } } } - if yyr3359 || yy2arr3359 { + if yyr3368 || yy2arr3368 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.LimitBytes == nil { r.EncodeNil() } else { - yy3392 := *x.LimitBytes - yym3393 := z.EncBinary() - _ = yym3393 + yy3401 := *x.LimitBytes + yym3402 := z.EncBinary() + _ = yym3402 if false { } else { - r.EncodeInt(int64(yy3392)) + r.EncodeInt(int64(yy3401)) } } } else { @@ -43043,16 +43121,16 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x.LimitBytes == nil { r.EncodeNil() } else { - yy3394 := *x.LimitBytes - yym3395 := z.EncBinary() - _ = yym3395 + yy3403 := *x.LimitBytes + yym3404 := z.EncBinary() + _ = yym3404 if false { } else { - r.EncodeInt(int64(yy3394)) + r.EncodeInt(int64(yy3403)) } } } - if yyr3359 || yy2arr3359 { + if yyr3368 || yy2arr3368 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -43065,25 +43143,25 @@ func (x *PodLogOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3396 := z.DecBinary() - _ = yym3396 + yym3405 := z.DecBinary() + _ = yym3405 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3397 := r.ContainerType() - if yyct3397 == codecSelferValueTypeMap1234 { - yyl3397 := r.ReadMapStart() - if yyl3397 == 0 { + yyct3406 := r.ContainerType() + if yyct3406 == codecSelferValueTypeMap1234 { + yyl3406 := r.ReadMapStart() + if yyl3406 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3397, d) + x.codecDecodeSelfFromMap(yyl3406, d) } - } else if yyct3397 == codecSelferValueTypeArray1234 { - yyl3397 := r.ReadArrayStart() - if yyl3397 == 0 { + } else if yyct3406 == codecSelferValueTypeArray1234 { + yyl3406 := r.ReadArrayStart() + if yyl3406 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3397, d) + x.codecDecodeSelfFromArray(yyl3406, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -43095,12 +43173,12 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3398Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3398Slc - var yyhl3398 bool = l >= 0 - for yyj3398 := 0; ; yyj3398++ { - if yyhl3398 { - if yyj3398 >= l { + var yys3407Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3407Slc + var yyhl3407 bool = l >= 0 + for yyj3407 := 0; ; yyj3407++ { + if yyhl3407 { + if yyj3407 >= l { break } } else { @@ -43109,10 +43187,10 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3398Slc = r.DecodeBytes(yys3398Slc, true, true) - yys3398 := string(yys3398Slc) + yys3407Slc = r.DecodeBytes(yys3407Slc, true, true) + yys3407 := string(yys3407Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3398 { + switch yys3407 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -43152,8 +43230,8 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.SinceSeconds == nil { x.SinceSeconds = new(int64) } - yym3405 := z.DecBinary() - _ = yym3405 + yym3414 := z.DecBinary() + _ = yym3414 if false { } else { *((*int64)(x.SinceSeconds)) = int64(r.DecodeInt(64)) @@ -43168,13 +43246,13 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.SinceTime == nil { x.SinceTime = new(pkg2_unversioned.Time) } - yym3407 := z.DecBinary() - _ = yym3407 + yym3416 := z.DecBinary() + _ = yym3416 if false { } else if z.HasExtensions() && z.DecExt(x.SinceTime) { - } else if yym3407 { + } else if yym3416 { z.DecBinaryUnmarshal(x.SinceTime) - } else if !yym3407 && z.IsJSONHandle() { + } else if !yym3416 && z.IsJSONHandle() { z.DecJSONUnmarshal(x.SinceTime) } else { z.DecFallback(x.SinceTime, false) @@ -43195,8 +43273,8 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.TailLines == nil { x.TailLines = new(int64) } - yym3410 := z.DecBinary() - _ = yym3410 + yym3419 := z.DecBinary() + _ = yym3419 if false { } else { *((*int64)(x.TailLines)) = int64(r.DecodeInt(64)) @@ -43211,17 +43289,17 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.LimitBytes == nil { x.LimitBytes = new(int64) } - yym3412 := z.DecBinary() - _ = yym3412 + yym3421 := z.DecBinary() + _ = yym3421 if false { } else { *((*int64)(x.LimitBytes)) = int64(r.DecodeInt(64)) } } default: - z.DecStructFieldNotFound(-1, yys3398) - } // end switch yys3398 - } // end for yyj3398 + z.DecStructFieldNotFound(-1, yys3407) + } // end switch yys3407 + } // end for yyj3407 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -43229,16 +43307,16 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3413 int - var yyb3413 bool - var yyhl3413 bool = l >= 0 - yyj3413++ - if yyhl3413 { - yyb3413 = yyj3413 > l + var yyj3422 int + var yyb3422 bool + var yyhl3422 bool = l >= 0 + yyj3422++ + if yyhl3422 { + yyb3422 = yyj3422 > l } else { - yyb3413 = r.CheckBreak() + yyb3422 = r.CheckBreak() } - if yyb3413 { + if yyb3422 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43248,13 +43326,13 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3413++ - if yyhl3413 { - yyb3413 = yyj3413 > l + yyj3422++ + if yyhl3422 { + yyb3422 = yyj3422 > l } else { - yyb3413 = r.CheckBreak() + yyb3422 = r.CheckBreak() } - if yyb3413 { + if yyb3422 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43264,13 +43342,13 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3413++ - if yyhl3413 { - yyb3413 = yyj3413 > l + yyj3422++ + if yyhl3422 { + yyb3422 = yyj3422 > l } else { - yyb3413 = r.CheckBreak() + yyb3422 = r.CheckBreak() } - if yyb3413 { + if yyb3422 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43280,13 +43358,13 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Container = string(r.DecodeString()) } - yyj3413++ - if yyhl3413 { - yyb3413 = yyj3413 > l + yyj3422++ + if yyhl3422 { + yyb3422 = yyj3422 > l } else { - yyb3413 = r.CheckBreak() + yyb3422 = r.CheckBreak() } - if yyb3413 { + if yyb3422 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43296,13 +43374,13 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Follow = bool(r.DecodeBool()) } - yyj3413++ - if yyhl3413 { - yyb3413 = yyj3413 > l + yyj3422++ + if yyhl3422 { + yyb3422 = yyj3422 > l } else { - yyb3413 = r.CheckBreak() + yyb3422 = r.CheckBreak() } - if yyb3413 { + if yyb3422 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43312,13 +43390,13 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Previous = bool(r.DecodeBool()) } - yyj3413++ - if yyhl3413 { - yyb3413 = yyj3413 > l + yyj3422++ + if yyhl3422 { + yyb3422 = yyj3422 > l } else { - yyb3413 = r.CheckBreak() + yyb3422 = r.CheckBreak() } - if yyb3413 { + if yyb3422 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43331,20 +43409,20 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.SinceSeconds == nil { x.SinceSeconds = new(int64) } - yym3420 := z.DecBinary() - _ = yym3420 + yym3429 := z.DecBinary() + _ = yym3429 if false { } else { *((*int64)(x.SinceSeconds)) = int64(r.DecodeInt(64)) } } - yyj3413++ - if yyhl3413 { - yyb3413 = yyj3413 > l + yyj3422++ + if yyhl3422 { + yyb3422 = yyj3422 > l } else { - yyb3413 = r.CheckBreak() + yyb3422 = r.CheckBreak() } - if yyb3413 { + if yyb3422 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43357,25 +43435,25 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.SinceTime == nil { x.SinceTime = new(pkg2_unversioned.Time) } - yym3422 := z.DecBinary() - _ = yym3422 + yym3431 := z.DecBinary() + _ = yym3431 if false { } else if z.HasExtensions() && z.DecExt(x.SinceTime) { - } else if yym3422 { + } else if yym3431 { z.DecBinaryUnmarshal(x.SinceTime) - } else if !yym3422 && z.IsJSONHandle() { + } else if !yym3431 && z.IsJSONHandle() { z.DecJSONUnmarshal(x.SinceTime) } else { z.DecFallback(x.SinceTime, false) } } - yyj3413++ - if yyhl3413 { - yyb3413 = yyj3413 > l + yyj3422++ + if yyhl3422 { + yyb3422 = yyj3422 > l } else { - yyb3413 = r.CheckBreak() + yyb3422 = r.CheckBreak() } - if yyb3413 { + if yyb3422 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43385,13 +43463,13 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Timestamps = bool(r.DecodeBool()) } - yyj3413++ - if yyhl3413 { - yyb3413 = yyj3413 > l + yyj3422++ + if yyhl3422 { + yyb3422 = yyj3422 > l } else { - yyb3413 = r.CheckBreak() + yyb3422 = r.CheckBreak() } - if yyb3413 { + if yyb3422 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43404,20 +43482,20 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.TailLines == nil { x.TailLines = new(int64) } - yym3425 := z.DecBinary() - _ = yym3425 + yym3434 := z.DecBinary() + _ = yym3434 if false { } else { *((*int64)(x.TailLines)) = int64(r.DecodeInt(64)) } } - yyj3413++ - if yyhl3413 { - yyb3413 = yyj3413 > l + yyj3422++ + if yyhl3422 { + yyb3422 = yyj3422 > l } else { - yyb3413 = r.CheckBreak() + yyb3422 = r.CheckBreak() } - if yyb3413 { + if yyb3422 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43430,25 +43508,25 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.LimitBytes == nil { x.LimitBytes = new(int64) } - yym3427 := z.DecBinary() - _ = yym3427 + yym3436 := z.DecBinary() + _ = yym3436 if false { } else { *((*int64)(x.LimitBytes)) = int64(r.DecodeInt(64)) } } for { - yyj3413++ - if yyhl3413 { - yyb3413 = yyj3413 > l + yyj3422++ + if yyhl3422 { + yyb3422 = yyj3422 > l } else { - yyb3413 = r.CheckBreak() + yyb3422 = r.CheckBreak() } - if yyb3413 { + if yyb3422 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3413-1, "") + z.DecStructFieldNotFound(yyj3422-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -43460,41 +43538,41 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3428 := z.EncBinary() - _ = yym3428 + yym3437 := z.EncBinary() + _ = yym3437 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3429 := !z.EncBinary() - yy2arr3429 := z.EncBasicHandle().StructToArray - var yyq3429 [7]bool - _, _, _ = yysep3429, yyq3429, yy2arr3429 - const yyr3429 bool = false - yyq3429[0] = x.Kind != "" - yyq3429[1] = x.APIVersion != "" - yyq3429[2] = x.Stdin != false - yyq3429[3] = x.Stdout != false - yyq3429[4] = x.Stderr != false - yyq3429[5] = x.TTY != false - yyq3429[6] = x.Container != "" - var yynn3429 int - if yyr3429 || yy2arr3429 { + yysep3438 := !z.EncBinary() + yy2arr3438 := z.EncBasicHandle().StructToArray + var yyq3438 [7]bool + _, _, _ = yysep3438, yyq3438, yy2arr3438 + const yyr3438 bool = false + yyq3438[0] = x.Kind != "" + yyq3438[1] = x.APIVersion != "" + yyq3438[2] = x.Stdin != false + yyq3438[3] = x.Stdout != false + yyq3438[4] = x.Stderr != false + yyq3438[5] = x.TTY != false + yyq3438[6] = x.Container != "" + var yynn3438 int + if yyr3438 || yy2arr3438 { r.EncodeArrayStart(7) } else { - yynn3429 = 0 - for _, b := range yyq3429 { + yynn3438 = 0 + for _, b := range yyq3438 { if b { - yynn3429++ + yynn3438++ } } - r.EncodeMapStart(yynn3429) - yynn3429 = 0 + r.EncodeMapStart(yynn3438) + yynn3438 = 0 } - if yyr3429 || yy2arr3429 { + if yyr3438 || yy2arr3438 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3429[0] { - yym3431 := z.EncBinary() - _ = yym3431 + if yyq3438[0] { + yym3440 := z.EncBinary() + _ = yym3440 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -43503,23 +43581,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3429[0] { + if yyq3438[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3432 := z.EncBinary() - _ = yym3432 + yym3441 := z.EncBinary() + _ = yym3441 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3429 || yy2arr3429 { + if yyr3438 || yy2arr3438 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3429[1] { - yym3434 := z.EncBinary() - _ = yym3434 + if yyq3438[1] { + yym3443 := z.EncBinary() + _ = yym3443 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -43528,23 +43606,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3429[1] { + if yyq3438[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3435 := z.EncBinary() - _ = yym3435 + yym3444 := z.EncBinary() + _ = yym3444 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3429 || yy2arr3429 { + if yyr3438 || yy2arr3438 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3429[2] { - yym3437 := z.EncBinary() - _ = yym3437 + if yyq3438[2] { + yym3446 := z.EncBinary() + _ = yym3446 if false { } else { r.EncodeBool(bool(x.Stdin)) @@ -43553,23 +43631,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq3429[2] { + if yyq3438[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("stdin")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3438 := z.EncBinary() - _ = yym3438 + yym3447 := z.EncBinary() + _ = yym3447 if false { } else { r.EncodeBool(bool(x.Stdin)) } } } - if yyr3429 || yy2arr3429 { + if yyr3438 || yy2arr3438 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3429[3] { - yym3440 := z.EncBinary() - _ = yym3440 + if yyq3438[3] { + yym3449 := z.EncBinary() + _ = yym3449 if false { } else { r.EncodeBool(bool(x.Stdout)) @@ -43578,23 +43656,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq3429[3] { + if yyq3438[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("stdout")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3441 := z.EncBinary() - _ = yym3441 + yym3450 := z.EncBinary() + _ = yym3450 if false { } else { r.EncodeBool(bool(x.Stdout)) } } } - if yyr3429 || yy2arr3429 { + if yyr3438 || yy2arr3438 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3429[4] { - yym3443 := z.EncBinary() - _ = yym3443 + if yyq3438[4] { + yym3452 := z.EncBinary() + _ = yym3452 if false { } else { r.EncodeBool(bool(x.Stderr)) @@ -43603,23 +43681,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq3429[4] { + if yyq3438[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("stderr")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3444 := z.EncBinary() - _ = yym3444 + yym3453 := z.EncBinary() + _ = yym3453 if false { } else { r.EncodeBool(bool(x.Stderr)) } } } - if yyr3429 || yy2arr3429 { + if yyr3438 || yy2arr3438 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3429[5] { - yym3446 := z.EncBinary() - _ = yym3446 + if yyq3438[5] { + yym3455 := z.EncBinary() + _ = yym3455 if false { } else { r.EncodeBool(bool(x.TTY)) @@ -43628,23 +43706,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq3429[5] { + if yyq3438[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("tty")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3447 := z.EncBinary() - _ = yym3447 + yym3456 := z.EncBinary() + _ = yym3456 if false { } else { r.EncodeBool(bool(x.TTY)) } } } - if yyr3429 || yy2arr3429 { + if yyr3438 || yy2arr3438 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3429[6] { - yym3449 := z.EncBinary() - _ = yym3449 + if yyq3438[6] { + yym3458 := z.EncBinary() + _ = yym3458 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) @@ -43653,19 +43731,19 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3429[6] { + if yyq3438[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("container")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3450 := z.EncBinary() - _ = yym3450 + yym3459 := z.EncBinary() + _ = yym3459 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) } } } - if yyr3429 || yy2arr3429 { + if yyr3438 || yy2arr3438 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -43678,25 +43756,25 @@ func (x *PodAttachOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3451 := z.DecBinary() - _ = yym3451 + yym3460 := z.DecBinary() + _ = yym3460 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3452 := r.ContainerType() - if yyct3452 == codecSelferValueTypeMap1234 { - yyl3452 := r.ReadMapStart() - if yyl3452 == 0 { + yyct3461 := r.ContainerType() + if yyct3461 == codecSelferValueTypeMap1234 { + yyl3461 := r.ReadMapStart() + if yyl3461 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3452, d) + x.codecDecodeSelfFromMap(yyl3461, d) } - } else if yyct3452 == codecSelferValueTypeArray1234 { - yyl3452 := r.ReadArrayStart() - if yyl3452 == 0 { + } else if yyct3461 == codecSelferValueTypeArray1234 { + yyl3461 := r.ReadArrayStart() + if yyl3461 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3452, d) + x.codecDecodeSelfFromArray(yyl3461, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -43708,12 +43786,12 @@ func (x *PodAttachOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3453Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3453Slc - var yyhl3453 bool = l >= 0 - for yyj3453 := 0; ; yyj3453++ { - if yyhl3453 { - if yyj3453 >= l { + var yys3462Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3462Slc + var yyhl3462 bool = l >= 0 + for yyj3462 := 0; ; yyj3462++ { + if yyhl3462 { + if yyj3462 >= l { break } } else { @@ -43722,10 +43800,10 @@ func (x *PodAttachOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3453Slc = r.DecodeBytes(yys3453Slc, true, true) - yys3453 := string(yys3453Slc) + yys3462Slc = r.DecodeBytes(yys3462Slc, true, true) + yys3462 := string(yys3462Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3453 { + switch yys3462 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -43769,9 +43847,9 @@ func (x *PodAttachOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Container = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3453) - } // end switch yys3453 - } // end for yyj3453 + z.DecStructFieldNotFound(-1, yys3462) + } // end switch yys3462 + } // end for yyj3462 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -43779,16 +43857,16 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3461 int - var yyb3461 bool - var yyhl3461 bool = l >= 0 - yyj3461++ - if yyhl3461 { - yyb3461 = yyj3461 > l + var yyj3470 int + var yyb3470 bool + var yyhl3470 bool = l >= 0 + yyj3470++ + if yyhl3470 { + yyb3470 = yyj3470 > l } else { - yyb3461 = r.CheckBreak() + yyb3470 = r.CheckBreak() } - if yyb3461 { + if yyb3470 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43798,13 +43876,13 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj3461++ - if yyhl3461 { - yyb3461 = yyj3461 > l + yyj3470++ + if yyhl3470 { + yyb3470 = yyj3470 > l } else { - yyb3461 = r.CheckBreak() + yyb3470 = r.CheckBreak() } - if yyb3461 { + if yyb3470 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43814,13 +43892,13 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj3461++ - if yyhl3461 { - yyb3461 = yyj3461 > l + yyj3470++ + if yyhl3470 { + yyb3470 = yyj3470 > l } else { - yyb3461 = r.CheckBreak() + yyb3470 = r.CheckBreak() } - if yyb3461 { + if yyb3470 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43830,13 +43908,13 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Stdin = bool(r.DecodeBool()) } - yyj3461++ - if yyhl3461 { - yyb3461 = yyj3461 > l + yyj3470++ + if yyhl3470 { + yyb3470 = yyj3470 > l } else { - yyb3461 = r.CheckBreak() + yyb3470 = r.CheckBreak() } - if yyb3461 { + if yyb3470 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43846,13 +43924,13 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Stdout = bool(r.DecodeBool()) } - yyj3461++ - if yyhl3461 { - yyb3461 = yyj3461 > l + yyj3470++ + if yyhl3470 { + yyb3470 = yyj3470 > l } else { - yyb3461 = r.CheckBreak() + yyb3470 = r.CheckBreak() } - if yyb3461 { + if yyb3470 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43862,13 +43940,13 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Stderr = bool(r.DecodeBool()) } - yyj3461++ - if yyhl3461 { - yyb3461 = yyj3461 > l + yyj3470++ + if yyhl3470 { + yyb3470 = yyj3470 > l } else { - yyb3461 = r.CheckBreak() + yyb3470 = r.CheckBreak() } - if yyb3461 { + if yyb3470 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43878,13 +43956,13 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.TTY = bool(r.DecodeBool()) } - yyj3461++ - if yyhl3461 { - yyb3461 = yyj3461 > l + yyj3470++ + if yyhl3470 { + yyb3470 = yyj3470 > l } else { - yyb3461 = r.CheckBreak() + yyb3470 = r.CheckBreak() } - if yyb3461 { + if yyb3470 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43895,17 +43973,17 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) x.Container = string(r.DecodeString()) } for { - yyj3461++ - if yyhl3461 { - yyb3461 = yyj3461 > l + yyj3470++ + if yyhl3470 { + yyb3470 = yyj3470 > l } else { - yyb3461 = r.CheckBreak() + yyb3470 = r.CheckBreak() } - if yyb3461 { + if yyb3470 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3461-1, "") + z.DecStructFieldNotFound(yyj3470-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -43917,36 +43995,36 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3469 := z.EncBinary() - _ = yym3469 + yym3478 := z.EncBinary() + _ = yym3478 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3470 := !z.EncBinary() - yy2arr3470 := z.EncBasicHandle().StructToArray - var yyq3470 [8]bool - _, _, _ = yysep3470, yyq3470, yy2arr3470 - const yyr3470 bool = false - yyq3470[0] = x.Kind != "" - yyq3470[1] = x.APIVersion != "" - var yynn3470 int - if yyr3470 || yy2arr3470 { + yysep3479 := !z.EncBinary() + yy2arr3479 := z.EncBasicHandle().StructToArray + var yyq3479 [8]bool + _, _, _ = yysep3479, yyq3479, yy2arr3479 + const yyr3479 bool = false + yyq3479[0] = x.Kind != "" + yyq3479[1] = x.APIVersion != "" + var yynn3479 int + if yyr3479 || yy2arr3479 { r.EncodeArrayStart(8) } else { - yynn3470 = 6 - for _, b := range yyq3470 { + yynn3479 = 6 + for _, b := range yyq3479 { if b { - yynn3470++ + yynn3479++ } } - r.EncodeMapStart(yynn3470) - yynn3470 = 0 + r.EncodeMapStart(yynn3479) + yynn3479 = 0 } - if yyr3470 || yy2arr3470 { + if yyr3479 || yy2arr3479 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3470[0] { - yym3472 := z.EncBinary() - _ = yym3472 + if yyq3479[0] { + yym3481 := z.EncBinary() + _ = yym3481 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -43955,23 +44033,23 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3470[0] { + if yyq3479[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3473 := z.EncBinary() - _ = yym3473 + yym3482 := z.EncBinary() + _ = yym3482 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3470 || yy2arr3470 { + if yyr3479 || yy2arr3479 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3470[1] { - yym3475 := z.EncBinary() - _ = yym3475 + if yyq3479[1] { + yym3484 := z.EncBinary() + _ = yym3484 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -43980,22 +44058,22 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3470[1] { + if yyq3479[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3476 := z.EncBinary() - _ = yym3476 + yym3485 := z.EncBinary() + _ = yym3485 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3470 || yy2arr3470 { + if yyr3479 || yy2arr3479 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3478 := z.EncBinary() - _ = yym3478 + yym3487 := z.EncBinary() + _ = yym3487 if false { } else { r.EncodeBool(bool(x.Stdin)) @@ -44004,17 +44082,17 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Stdin")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3479 := z.EncBinary() - _ = yym3479 + yym3488 := z.EncBinary() + _ = yym3488 if false { } else { r.EncodeBool(bool(x.Stdin)) } } - if yyr3470 || yy2arr3470 { + if yyr3479 || yy2arr3479 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3481 := z.EncBinary() - _ = yym3481 + yym3490 := z.EncBinary() + _ = yym3490 if false { } else { r.EncodeBool(bool(x.Stdout)) @@ -44023,17 +44101,17 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Stdout")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3482 := z.EncBinary() - _ = yym3482 + yym3491 := z.EncBinary() + _ = yym3491 if false { } else { r.EncodeBool(bool(x.Stdout)) } } - if yyr3470 || yy2arr3470 { + if yyr3479 || yy2arr3479 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3484 := z.EncBinary() - _ = yym3484 + yym3493 := z.EncBinary() + _ = yym3493 if false { } else { r.EncodeBool(bool(x.Stderr)) @@ -44042,17 +44120,17 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Stderr")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3485 := z.EncBinary() - _ = yym3485 + yym3494 := z.EncBinary() + _ = yym3494 if false { } else { r.EncodeBool(bool(x.Stderr)) } } - if yyr3470 || yy2arr3470 { + if yyr3479 || yy2arr3479 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3487 := z.EncBinary() - _ = yym3487 + yym3496 := z.EncBinary() + _ = yym3496 if false { } else { r.EncodeBool(bool(x.TTY)) @@ -44061,17 +44139,17 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("TTY")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3488 := z.EncBinary() - _ = yym3488 + yym3497 := z.EncBinary() + _ = yym3497 if false { } else { r.EncodeBool(bool(x.TTY)) } } - if yyr3470 || yy2arr3470 { + if yyr3479 || yy2arr3479 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3490 := z.EncBinary() - _ = yym3490 + yym3499 := z.EncBinary() + _ = yym3499 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) @@ -44080,20 +44158,20 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Container")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3491 := z.EncBinary() - _ = yym3491 + yym3500 := z.EncBinary() + _ = yym3500 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) } } - if yyr3470 || yy2arr3470 { + if yyr3479 || yy2arr3479 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Command == nil { r.EncodeNil() } else { - yym3493 := z.EncBinary() - _ = yym3493 + yym3502 := z.EncBinary() + _ = yym3502 if false { } else { z.F.EncSliceStringV(x.Command, false, e) @@ -44106,15 +44184,15 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x.Command == nil { r.EncodeNil() } else { - yym3494 := z.EncBinary() - _ = yym3494 + yym3503 := z.EncBinary() + _ = yym3503 if false { } else { z.F.EncSliceStringV(x.Command, false, e) } } } - if yyr3470 || yy2arr3470 { + if yyr3479 || yy2arr3479 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -44127,25 +44205,25 @@ func (x *PodExecOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3495 := z.DecBinary() - _ = yym3495 + yym3504 := z.DecBinary() + _ = yym3504 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3496 := r.ContainerType() - if yyct3496 == codecSelferValueTypeMap1234 { - yyl3496 := r.ReadMapStart() - if yyl3496 == 0 { + yyct3505 := r.ContainerType() + if yyct3505 == codecSelferValueTypeMap1234 { + yyl3505 := r.ReadMapStart() + if yyl3505 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3496, d) + x.codecDecodeSelfFromMap(yyl3505, d) } - } else if yyct3496 == codecSelferValueTypeArray1234 { - yyl3496 := r.ReadArrayStart() - if yyl3496 == 0 { + } else if yyct3505 == codecSelferValueTypeArray1234 { + yyl3505 := r.ReadArrayStart() + if yyl3505 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3496, d) + x.codecDecodeSelfFromArray(yyl3505, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -44157,12 +44235,12 @@ func (x *PodExecOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3497Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3497Slc - var yyhl3497 bool = l >= 0 - for yyj3497 := 0; ; yyj3497++ { - if yyhl3497 { - if yyj3497 >= l { + var yys3506Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3506Slc + var yyhl3506 bool = l >= 0 + for yyj3506 := 0; ; yyj3506++ { + if yyhl3506 { + if yyj3506 >= l { break } } else { @@ -44171,10 +44249,10 @@ func (x *PodExecOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3497Slc = r.DecodeBytes(yys3497Slc, true, true) - yys3497 := string(yys3497Slc) + yys3506Slc = r.DecodeBytes(yys3506Slc, true, true) + yys3506 := string(yys3506Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3497 { + switch yys3506 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -44221,18 +44299,18 @@ func (x *PodExecOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Command = nil } else { - yyv3505 := &x.Command - yym3506 := z.DecBinary() - _ = yym3506 + yyv3514 := &x.Command + yym3515 := z.DecBinary() + _ = yym3515 if false { } else { - z.F.DecSliceStringX(yyv3505, false, d) + z.F.DecSliceStringX(yyv3514, false, d) } } default: - z.DecStructFieldNotFound(-1, yys3497) - } // end switch yys3497 - } // end for yyj3497 + z.DecStructFieldNotFound(-1, yys3506) + } // end switch yys3506 + } // end for yyj3506 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -44240,16 +44318,16 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3507 int - var yyb3507 bool - var yyhl3507 bool = l >= 0 - yyj3507++ - if yyhl3507 { - yyb3507 = yyj3507 > l + var yyj3516 int + var yyb3516 bool + var yyhl3516 bool = l >= 0 + yyj3516++ + if yyhl3516 { + yyb3516 = yyj3516 > l } else { - yyb3507 = r.CheckBreak() + yyb3516 = r.CheckBreak() } - if yyb3507 { + if yyb3516 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44259,13 +44337,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3507++ - if yyhl3507 { - yyb3507 = yyj3507 > l + yyj3516++ + if yyhl3516 { + yyb3516 = yyj3516 > l } else { - yyb3507 = r.CheckBreak() + yyb3516 = r.CheckBreak() } - if yyb3507 { + if yyb3516 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44275,13 +44353,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3507++ - if yyhl3507 { - yyb3507 = yyj3507 > l + yyj3516++ + if yyhl3516 { + yyb3516 = yyj3516 > l } else { - yyb3507 = r.CheckBreak() + yyb3516 = r.CheckBreak() } - if yyb3507 { + if yyb3516 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44291,13 +44369,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Stdin = bool(r.DecodeBool()) } - yyj3507++ - if yyhl3507 { - yyb3507 = yyj3507 > l + yyj3516++ + if yyhl3516 { + yyb3516 = yyj3516 > l } else { - yyb3507 = r.CheckBreak() + yyb3516 = r.CheckBreak() } - if yyb3507 { + if yyb3516 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44307,13 +44385,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Stdout = bool(r.DecodeBool()) } - yyj3507++ - if yyhl3507 { - yyb3507 = yyj3507 > l + yyj3516++ + if yyhl3516 { + yyb3516 = yyj3516 > l } else { - yyb3507 = r.CheckBreak() + yyb3516 = r.CheckBreak() } - if yyb3507 { + if yyb3516 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44323,13 +44401,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Stderr = bool(r.DecodeBool()) } - yyj3507++ - if yyhl3507 { - yyb3507 = yyj3507 > l + yyj3516++ + if yyhl3516 { + yyb3516 = yyj3516 > l } else { - yyb3507 = r.CheckBreak() + yyb3516 = r.CheckBreak() } - if yyb3507 { + if yyb3516 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44339,13 +44417,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.TTY = bool(r.DecodeBool()) } - yyj3507++ - if yyhl3507 { - yyb3507 = yyj3507 > l + yyj3516++ + if yyhl3516 { + yyb3516 = yyj3516 > l } else { - yyb3507 = r.CheckBreak() + yyb3516 = r.CheckBreak() } - if yyb3507 { + if yyb3516 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44355,13 +44433,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Container = string(r.DecodeString()) } - yyj3507++ - if yyhl3507 { - yyb3507 = yyj3507 > l + yyj3516++ + if yyhl3516 { + yyb3516 = yyj3516 > l } else { - yyb3507 = r.CheckBreak() + yyb3516 = r.CheckBreak() } - if yyb3507 { + if yyb3516 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44369,26 +44447,26 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Command = nil } else { - yyv3515 := &x.Command - yym3516 := z.DecBinary() - _ = yym3516 + yyv3524 := &x.Command + yym3525 := z.DecBinary() + _ = yym3525 if false { } else { - z.F.DecSliceStringX(yyv3515, false, d) + z.F.DecSliceStringX(yyv3524, false, d) } } for { - yyj3507++ - if yyhl3507 { - yyb3507 = yyj3507 > l + yyj3516++ + if yyhl3516 { + yyb3516 = yyj3516 > l } else { - yyb3507 = r.CheckBreak() + yyb3516 = r.CheckBreak() } - if yyb3507 { + if yyb3516 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3507-1, "") + z.DecStructFieldNotFound(yyj3516-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -44400,36 +44478,36 @@ func (x *PodProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3517 := z.EncBinary() - _ = yym3517 + yym3526 := z.EncBinary() + _ = yym3526 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3518 := !z.EncBinary() - yy2arr3518 := z.EncBasicHandle().StructToArray - var yyq3518 [3]bool - _, _, _ = yysep3518, yyq3518, yy2arr3518 - const yyr3518 bool = false - yyq3518[0] = x.Kind != "" - yyq3518[1] = x.APIVersion != "" - var yynn3518 int - if yyr3518 || yy2arr3518 { + yysep3527 := !z.EncBinary() + yy2arr3527 := z.EncBasicHandle().StructToArray + var yyq3527 [3]bool + _, _, _ = yysep3527, yyq3527, yy2arr3527 + const yyr3527 bool = false + yyq3527[0] = x.Kind != "" + yyq3527[1] = x.APIVersion != "" + var yynn3527 int + if yyr3527 || yy2arr3527 { r.EncodeArrayStart(3) } else { - yynn3518 = 1 - for _, b := range yyq3518 { + yynn3527 = 1 + for _, b := range yyq3527 { if b { - yynn3518++ + yynn3527++ } } - r.EncodeMapStart(yynn3518) - yynn3518 = 0 + r.EncodeMapStart(yynn3527) + yynn3527 = 0 } - if yyr3518 || yy2arr3518 { + if yyr3527 || yy2arr3527 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3518[0] { - yym3520 := z.EncBinary() - _ = yym3520 + if yyq3527[0] { + yym3529 := z.EncBinary() + _ = yym3529 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -44438,23 +44516,23 @@ func (x *PodProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3518[0] { + if yyq3527[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3521 := z.EncBinary() - _ = yym3521 + yym3530 := z.EncBinary() + _ = yym3530 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3518 || yy2arr3518 { + if yyr3527 || yy2arr3527 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3518[1] { - yym3523 := z.EncBinary() - _ = yym3523 + if yyq3527[1] { + yym3532 := z.EncBinary() + _ = yym3532 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -44463,22 +44541,22 @@ func (x *PodProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3518[1] { + if yyq3527[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3524 := z.EncBinary() - _ = yym3524 + yym3533 := z.EncBinary() + _ = yym3533 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3518 || yy2arr3518 { + if yyr3527 || yy2arr3527 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3526 := z.EncBinary() - _ = yym3526 + yym3535 := z.EncBinary() + _ = yym3535 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) @@ -44487,14 +44565,14 @@ func (x *PodProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Path")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3527 := z.EncBinary() - _ = yym3527 + yym3536 := z.EncBinary() + _ = yym3536 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) } } - if yyr3518 || yy2arr3518 { + if yyr3527 || yy2arr3527 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -44507,25 +44585,25 @@ func (x *PodProxyOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3528 := z.DecBinary() - _ = yym3528 + yym3537 := z.DecBinary() + _ = yym3537 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3529 := r.ContainerType() - if yyct3529 == codecSelferValueTypeMap1234 { - yyl3529 := r.ReadMapStart() - if yyl3529 == 0 { + yyct3538 := r.ContainerType() + if yyct3538 == codecSelferValueTypeMap1234 { + yyl3538 := r.ReadMapStart() + if yyl3538 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3529, d) + x.codecDecodeSelfFromMap(yyl3538, d) } - } else if yyct3529 == codecSelferValueTypeArray1234 { - yyl3529 := r.ReadArrayStart() - if yyl3529 == 0 { + } else if yyct3538 == codecSelferValueTypeArray1234 { + yyl3538 := r.ReadArrayStart() + if yyl3538 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3529, d) + x.codecDecodeSelfFromArray(yyl3538, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -44537,12 +44615,12 @@ func (x *PodProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3530Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3530Slc - var yyhl3530 bool = l >= 0 - for yyj3530 := 0; ; yyj3530++ { - if yyhl3530 { - if yyj3530 >= l { + var yys3539Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3539Slc + var yyhl3539 bool = l >= 0 + for yyj3539 := 0; ; yyj3539++ { + if yyhl3539 { + if yyj3539 >= l { break } } else { @@ -44551,10 +44629,10 @@ func (x *PodProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3530Slc = r.DecodeBytes(yys3530Slc, true, true) - yys3530 := string(yys3530Slc) + yys3539Slc = r.DecodeBytes(yys3539Slc, true, true) + yys3539 := string(yys3539Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3530 { + switch yys3539 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -44574,9 +44652,9 @@ func (x *PodProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Path = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3530) - } // end switch yys3530 - } // end for yyj3530 + z.DecStructFieldNotFound(-1, yys3539) + } // end switch yys3539 + } // end for yyj3539 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -44584,16 +44662,16 @@ func (x *PodProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3534 int - var yyb3534 bool - var yyhl3534 bool = l >= 0 - yyj3534++ - if yyhl3534 { - yyb3534 = yyj3534 > l + var yyj3543 int + var yyb3543 bool + var yyhl3543 bool = l >= 0 + yyj3543++ + if yyhl3543 { + yyb3543 = yyj3543 > l } else { - yyb3534 = r.CheckBreak() + yyb3543 = r.CheckBreak() } - if yyb3534 { + if yyb3543 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44603,13 +44681,13 @@ func (x *PodProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj3534++ - if yyhl3534 { - yyb3534 = yyj3534 > l + yyj3543++ + if yyhl3543 { + yyb3543 = yyj3543 > l } else { - yyb3534 = r.CheckBreak() + yyb3543 = r.CheckBreak() } - if yyb3534 { + if yyb3543 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44619,13 +44697,13 @@ func (x *PodProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj3534++ - if yyhl3534 { - yyb3534 = yyj3534 > l + yyj3543++ + if yyhl3543 { + yyb3543 = yyj3543 > l } else { - yyb3534 = r.CheckBreak() + yyb3543 = r.CheckBreak() } - if yyb3534 { + if yyb3543 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44636,17 +44714,17 @@ func (x *PodProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) x.Path = string(r.DecodeString()) } for { - yyj3534++ - if yyhl3534 { - yyb3534 = yyj3534 > l + yyj3543++ + if yyhl3543 { + yyb3543 = yyj3543 > l } else { - yyb3534 = r.CheckBreak() + yyb3543 = r.CheckBreak() } - if yyb3534 { + if yyb3543 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3534-1, "") + z.DecStructFieldNotFound(yyj3543-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -44658,36 +44736,36 @@ func (x *NodeProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3538 := z.EncBinary() - _ = yym3538 + yym3547 := z.EncBinary() + _ = yym3547 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3539 := !z.EncBinary() - yy2arr3539 := z.EncBasicHandle().StructToArray - var yyq3539 [3]bool - _, _, _ = yysep3539, yyq3539, yy2arr3539 - const yyr3539 bool = false - yyq3539[0] = x.Kind != "" - yyq3539[1] = x.APIVersion != "" - var yynn3539 int - if yyr3539 || yy2arr3539 { + yysep3548 := !z.EncBinary() + yy2arr3548 := z.EncBasicHandle().StructToArray + var yyq3548 [3]bool + _, _, _ = yysep3548, yyq3548, yy2arr3548 + const yyr3548 bool = false + yyq3548[0] = x.Kind != "" + yyq3548[1] = x.APIVersion != "" + var yynn3548 int + if yyr3548 || yy2arr3548 { r.EncodeArrayStart(3) } else { - yynn3539 = 1 - for _, b := range yyq3539 { + yynn3548 = 1 + for _, b := range yyq3548 { if b { - yynn3539++ + yynn3548++ } } - r.EncodeMapStart(yynn3539) - yynn3539 = 0 + r.EncodeMapStart(yynn3548) + yynn3548 = 0 } - if yyr3539 || yy2arr3539 { + if yyr3548 || yy2arr3548 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3539[0] { - yym3541 := z.EncBinary() - _ = yym3541 + if yyq3548[0] { + yym3550 := z.EncBinary() + _ = yym3550 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -44696,23 +44774,23 @@ func (x *NodeProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3539[0] { + if yyq3548[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3542 := z.EncBinary() - _ = yym3542 + yym3551 := z.EncBinary() + _ = yym3551 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3539 || yy2arr3539 { + if yyr3548 || yy2arr3548 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3539[1] { - yym3544 := z.EncBinary() - _ = yym3544 + if yyq3548[1] { + yym3553 := z.EncBinary() + _ = yym3553 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -44721,22 +44799,22 @@ func (x *NodeProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3539[1] { + if yyq3548[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3545 := z.EncBinary() - _ = yym3545 + yym3554 := z.EncBinary() + _ = yym3554 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3539 || yy2arr3539 { + if yyr3548 || yy2arr3548 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3547 := z.EncBinary() - _ = yym3547 + yym3556 := z.EncBinary() + _ = yym3556 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) @@ -44745,14 +44823,14 @@ func (x *NodeProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Path")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3548 := z.EncBinary() - _ = yym3548 + yym3557 := z.EncBinary() + _ = yym3557 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) } } - if yyr3539 || yy2arr3539 { + if yyr3548 || yy2arr3548 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -44765,25 +44843,25 @@ func (x *NodeProxyOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3549 := z.DecBinary() - _ = yym3549 + yym3558 := z.DecBinary() + _ = yym3558 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3550 := r.ContainerType() - if yyct3550 == codecSelferValueTypeMap1234 { - yyl3550 := r.ReadMapStart() - if yyl3550 == 0 { + yyct3559 := r.ContainerType() + if yyct3559 == codecSelferValueTypeMap1234 { + yyl3559 := r.ReadMapStart() + if yyl3559 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3550, d) + x.codecDecodeSelfFromMap(yyl3559, d) } - } else if yyct3550 == codecSelferValueTypeArray1234 { - yyl3550 := r.ReadArrayStart() - if yyl3550 == 0 { + } else if yyct3559 == codecSelferValueTypeArray1234 { + yyl3559 := r.ReadArrayStart() + if yyl3559 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3550, d) + x.codecDecodeSelfFromArray(yyl3559, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -44795,12 +44873,12 @@ func (x *NodeProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3551Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3551Slc - var yyhl3551 bool = l >= 0 - for yyj3551 := 0; ; yyj3551++ { - if yyhl3551 { - if yyj3551 >= l { + var yys3560Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3560Slc + var yyhl3560 bool = l >= 0 + for yyj3560 := 0; ; yyj3560++ { + if yyhl3560 { + if yyj3560 >= l { break } } else { @@ -44809,10 +44887,10 @@ func (x *NodeProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3551Slc = r.DecodeBytes(yys3551Slc, true, true) - yys3551 := string(yys3551Slc) + yys3560Slc = r.DecodeBytes(yys3560Slc, true, true) + yys3560 := string(yys3560Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3551 { + switch yys3560 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -44832,9 +44910,9 @@ func (x *NodeProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Path = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3551) - } // end switch yys3551 - } // end for yyj3551 + z.DecStructFieldNotFound(-1, yys3560) + } // end switch yys3560 + } // end for yyj3560 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -44842,16 +44920,16 @@ func (x *NodeProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3555 int - var yyb3555 bool - var yyhl3555 bool = l >= 0 - yyj3555++ - if yyhl3555 { - yyb3555 = yyj3555 > l + var yyj3564 int + var yyb3564 bool + var yyhl3564 bool = l >= 0 + yyj3564++ + if yyhl3564 { + yyb3564 = yyj3564 > l } else { - yyb3555 = r.CheckBreak() + yyb3564 = r.CheckBreak() } - if yyb3555 { + if yyb3564 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44861,13 +44939,13 @@ func (x *NodeProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj3555++ - if yyhl3555 { - yyb3555 = yyj3555 > l + yyj3564++ + if yyhl3564 { + yyb3564 = yyj3564 > l } else { - yyb3555 = r.CheckBreak() + yyb3564 = r.CheckBreak() } - if yyb3555 { + if yyb3564 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44877,13 +44955,13 @@ func (x *NodeProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj3555++ - if yyhl3555 { - yyb3555 = yyj3555 > l + yyj3564++ + if yyhl3564 { + yyb3564 = yyj3564 > l } else { - yyb3555 = r.CheckBreak() + yyb3564 = r.CheckBreak() } - if yyb3555 { + if yyb3564 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44894,17 +44972,17 @@ func (x *NodeProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) x.Path = string(r.DecodeString()) } for { - yyj3555++ - if yyhl3555 { - yyb3555 = yyj3555 > l + yyj3564++ + if yyhl3564 { + yyb3564 = yyj3564 > l } else { - yyb3555 = r.CheckBreak() + yyb3564 = r.CheckBreak() } - if yyb3555 { + if yyb3564 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3555-1, "") + z.DecStructFieldNotFound(yyj3564-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -44916,36 +44994,36 @@ func (x *ServiceProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3559 := z.EncBinary() - _ = yym3559 + yym3568 := z.EncBinary() + _ = yym3568 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3560 := !z.EncBinary() - yy2arr3560 := z.EncBasicHandle().StructToArray - var yyq3560 [3]bool - _, _, _ = yysep3560, yyq3560, yy2arr3560 - const yyr3560 bool = false - yyq3560[0] = x.Kind != "" - yyq3560[1] = x.APIVersion != "" - var yynn3560 int - if yyr3560 || yy2arr3560 { + yysep3569 := !z.EncBinary() + yy2arr3569 := z.EncBasicHandle().StructToArray + var yyq3569 [3]bool + _, _, _ = yysep3569, yyq3569, yy2arr3569 + const yyr3569 bool = false + yyq3569[0] = x.Kind != "" + yyq3569[1] = x.APIVersion != "" + var yynn3569 int + if yyr3569 || yy2arr3569 { r.EncodeArrayStart(3) } else { - yynn3560 = 1 - for _, b := range yyq3560 { + yynn3569 = 1 + for _, b := range yyq3569 { if b { - yynn3560++ + yynn3569++ } } - r.EncodeMapStart(yynn3560) - yynn3560 = 0 + r.EncodeMapStart(yynn3569) + yynn3569 = 0 } - if yyr3560 || yy2arr3560 { + if yyr3569 || yy2arr3569 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3560[0] { - yym3562 := z.EncBinary() - _ = yym3562 + if yyq3569[0] { + yym3571 := z.EncBinary() + _ = yym3571 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -44954,23 +45032,23 @@ func (x *ServiceProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3560[0] { + if yyq3569[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3563 := z.EncBinary() - _ = yym3563 + yym3572 := z.EncBinary() + _ = yym3572 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3560 || yy2arr3560 { + if yyr3569 || yy2arr3569 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3560[1] { - yym3565 := z.EncBinary() - _ = yym3565 + if yyq3569[1] { + yym3574 := z.EncBinary() + _ = yym3574 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -44979,22 +45057,22 @@ func (x *ServiceProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3560[1] { + if yyq3569[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3566 := z.EncBinary() - _ = yym3566 + yym3575 := z.EncBinary() + _ = yym3575 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3560 || yy2arr3560 { + if yyr3569 || yy2arr3569 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3568 := z.EncBinary() - _ = yym3568 + yym3577 := z.EncBinary() + _ = yym3577 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) @@ -45003,14 +45081,14 @@ func (x *ServiceProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Path")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3569 := z.EncBinary() - _ = yym3569 + yym3578 := z.EncBinary() + _ = yym3578 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) } } - if yyr3560 || yy2arr3560 { + if yyr3569 || yy2arr3569 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -45023,25 +45101,25 @@ func (x *ServiceProxyOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3570 := z.DecBinary() - _ = yym3570 + yym3579 := z.DecBinary() + _ = yym3579 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3571 := r.ContainerType() - if yyct3571 == codecSelferValueTypeMap1234 { - yyl3571 := r.ReadMapStart() - if yyl3571 == 0 { + yyct3580 := r.ContainerType() + if yyct3580 == codecSelferValueTypeMap1234 { + yyl3580 := r.ReadMapStart() + if yyl3580 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3571, d) + x.codecDecodeSelfFromMap(yyl3580, d) } - } else if yyct3571 == codecSelferValueTypeArray1234 { - yyl3571 := r.ReadArrayStart() - if yyl3571 == 0 { + } else if yyct3580 == codecSelferValueTypeArray1234 { + yyl3580 := r.ReadArrayStart() + if yyl3580 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3571, d) + x.codecDecodeSelfFromArray(yyl3580, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -45053,12 +45131,12 @@ func (x *ServiceProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3572Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3572Slc - var yyhl3572 bool = l >= 0 - for yyj3572 := 0; ; yyj3572++ { - if yyhl3572 { - if yyj3572 >= l { + var yys3581Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3581Slc + var yyhl3581 bool = l >= 0 + for yyj3581 := 0; ; yyj3581++ { + if yyhl3581 { + if yyj3581 >= l { break } } else { @@ -45067,10 +45145,10 @@ func (x *ServiceProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3572Slc = r.DecodeBytes(yys3572Slc, true, true) - yys3572 := string(yys3572Slc) + yys3581Slc = r.DecodeBytes(yys3581Slc, true, true) + yys3581 := string(yys3581Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3572 { + switch yys3581 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -45090,9 +45168,9 @@ func (x *ServiceProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder x.Path = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3572) - } // end switch yys3572 - } // end for yyj3572 + z.DecStructFieldNotFound(-1, yys3581) + } // end switch yys3581 + } // end for yyj3581 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -45100,16 +45178,16 @@ func (x *ServiceProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3576 int - var yyb3576 bool - var yyhl3576 bool = l >= 0 - yyj3576++ - if yyhl3576 { - yyb3576 = yyj3576 > l + var yyj3585 int + var yyb3585 bool + var yyhl3585 bool = l >= 0 + yyj3585++ + if yyhl3585 { + yyb3585 = yyj3585 > l } else { - yyb3576 = r.CheckBreak() + yyb3585 = r.CheckBreak() } - if yyb3576 { + if yyb3585 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45119,13 +45197,13 @@ func (x *ServiceProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.Kind = string(r.DecodeString()) } - yyj3576++ - if yyhl3576 { - yyb3576 = yyj3576 > l + yyj3585++ + if yyhl3585 { + yyb3585 = yyj3585 > l } else { - yyb3576 = r.CheckBreak() + yyb3585 = r.CheckBreak() } - if yyb3576 { + if yyb3585 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45135,13 +45213,13 @@ func (x *ServiceProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.APIVersion = string(r.DecodeString()) } - yyj3576++ - if yyhl3576 { - yyb3576 = yyj3576 > l + yyj3585++ + if yyhl3585 { + yyb3585 = yyj3585 > l } else { - yyb3576 = r.CheckBreak() + yyb3585 = r.CheckBreak() } - if yyb3576 { + if yyb3585 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45152,17 +45230,17 @@ func (x *ServiceProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decod x.Path = string(r.DecodeString()) } for { - yyj3576++ - if yyhl3576 { - yyb3576 = yyj3576 > l + yyj3585++ + if yyhl3585 { + yyb3585 = yyj3585 > l } else { - yyb3576 = r.CheckBreak() + yyb3585 = r.CheckBreak() } - if yyb3576 { + if yyb3585 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3576-1, "") + z.DecStructFieldNotFound(yyj3585-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -45174,34 +45252,34 @@ func (x *OwnerReference) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3580 := z.EncBinary() - _ = yym3580 + yym3589 := z.EncBinary() + _ = yym3589 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3581 := !z.EncBinary() - yy2arr3581 := z.EncBasicHandle().StructToArray - var yyq3581 [5]bool - _, _, _ = yysep3581, yyq3581, yy2arr3581 - const yyr3581 bool = false - yyq3581[4] = x.Controller != nil - var yynn3581 int - if yyr3581 || yy2arr3581 { + yysep3590 := !z.EncBinary() + yy2arr3590 := z.EncBasicHandle().StructToArray + var yyq3590 [5]bool + _, _, _ = yysep3590, yyq3590, yy2arr3590 + const yyr3590 bool = false + yyq3590[4] = x.Controller != nil + var yynn3590 int + if yyr3590 || yy2arr3590 { r.EncodeArrayStart(5) } else { - yynn3581 = 4 - for _, b := range yyq3581 { + yynn3590 = 4 + for _, b := range yyq3590 { if b { - yynn3581++ + yynn3590++ } } - r.EncodeMapStart(yynn3581) - yynn3581 = 0 + r.EncodeMapStart(yynn3590) + yynn3590 = 0 } - if yyr3581 || yy2arr3581 { + if yyr3590 || yy2arr3590 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3583 := z.EncBinary() - _ = yym3583 + yym3592 := z.EncBinary() + _ = yym3592 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -45210,17 +45288,17 @@ func (x *OwnerReference) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3584 := z.EncBinary() - _ = yym3584 + yym3593 := z.EncBinary() + _ = yym3593 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } - if yyr3581 || yy2arr3581 { + if yyr3590 || yy2arr3590 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3586 := z.EncBinary() - _ = yym3586 + yym3595 := z.EncBinary() + _ = yym3595 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -45229,17 +45307,17 @@ func (x *OwnerReference) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3587 := z.EncBinary() - _ = yym3587 + yym3596 := z.EncBinary() + _ = yym3596 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } - if yyr3581 || yy2arr3581 { + if yyr3590 || yy2arr3590 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3589 := z.EncBinary() - _ = yym3589 + yym3598 := z.EncBinary() + _ = yym3598 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -45248,17 +45326,17 @@ func (x *OwnerReference) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3590 := z.EncBinary() - _ = yym3590 + yym3599 := z.EncBinary() + _ = yym3599 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } - if yyr3581 || yy2arr3581 { + if yyr3590 || yy2arr3590 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3592 := z.EncBinary() - _ = yym3592 + yym3601 := z.EncBinary() + _ = yym3601 if false { } else if z.HasExtensions() && z.EncExt(x.UID) { } else { @@ -45268,50 +45346,50 @@ func (x *OwnerReference) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("uid")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3593 := z.EncBinary() - _ = yym3593 + yym3602 := z.EncBinary() + _ = yym3602 if false { } else if z.HasExtensions() && z.EncExt(x.UID) { } else { r.EncodeString(codecSelferC_UTF81234, string(x.UID)) } } - if yyr3581 || yy2arr3581 { + if yyr3590 || yy2arr3590 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3581[4] { + if yyq3590[4] { if x.Controller == nil { r.EncodeNil() } else { - yy3595 := *x.Controller - yym3596 := z.EncBinary() - _ = yym3596 + yy3604 := *x.Controller + yym3605 := z.EncBinary() + _ = yym3605 if false { } else { - r.EncodeBool(bool(yy3595)) + r.EncodeBool(bool(yy3604)) } } } else { r.EncodeNil() } } else { - if yyq3581[4] { + if yyq3590[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("controller")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Controller == nil { r.EncodeNil() } else { - yy3597 := *x.Controller - yym3598 := z.EncBinary() - _ = yym3598 + yy3606 := *x.Controller + yym3607 := z.EncBinary() + _ = yym3607 if false { } else { - r.EncodeBool(bool(yy3597)) + r.EncodeBool(bool(yy3606)) } } } } - if yyr3581 || yy2arr3581 { + if yyr3590 || yy2arr3590 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -45324,25 +45402,25 @@ func (x *OwnerReference) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3599 := z.DecBinary() - _ = yym3599 + yym3608 := z.DecBinary() + _ = yym3608 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3600 := r.ContainerType() - if yyct3600 == codecSelferValueTypeMap1234 { - yyl3600 := r.ReadMapStart() - if yyl3600 == 0 { + yyct3609 := r.ContainerType() + if yyct3609 == codecSelferValueTypeMap1234 { + yyl3609 := r.ReadMapStart() + if yyl3609 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3600, d) + x.codecDecodeSelfFromMap(yyl3609, d) } - } else if yyct3600 == codecSelferValueTypeArray1234 { - yyl3600 := r.ReadArrayStart() - if yyl3600 == 0 { + } else if yyct3609 == codecSelferValueTypeArray1234 { + yyl3609 := r.ReadArrayStart() + if yyl3609 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3600, d) + x.codecDecodeSelfFromArray(yyl3609, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -45354,12 +45432,12 @@ func (x *OwnerReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3601Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3601Slc - var yyhl3601 bool = l >= 0 - for yyj3601 := 0; ; yyj3601++ { - if yyhl3601 { - if yyj3601 >= l { + var yys3610Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3610Slc + var yyhl3610 bool = l >= 0 + for yyj3610 := 0; ; yyj3610++ { + if yyhl3610 { + if yyj3610 >= l { break } } else { @@ -45368,10 +45446,10 @@ func (x *OwnerReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3601Slc = r.DecodeBytes(yys3601Slc, true, true) - yys3601 := string(yys3601Slc) + yys3610Slc = r.DecodeBytes(yys3610Slc, true, true) + yys3610 := string(yys3610Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3601 { + switch yys3610 { case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" @@ -45405,17 +45483,17 @@ func (x *OwnerReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.Controller == nil { x.Controller = new(bool) } - yym3607 := z.DecBinary() - _ = yym3607 + yym3616 := z.DecBinary() + _ = yym3616 if false { } else { *((*bool)(x.Controller)) = r.DecodeBool() } } default: - z.DecStructFieldNotFound(-1, yys3601) - } // end switch yys3601 - } // end for yyj3601 + z.DecStructFieldNotFound(-1, yys3610) + } // end switch yys3610 + } // end for yyj3610 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -45423,16 +45501,16 @@ func (x *OwnerReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3608 int - var yyb3608 bool - var yyhl3608 bool = l >= 0 - yyj3608++ - if yyhl3608 { - yyb3608 = yyj3608 > l + var yyj3617 int + var yyb3617 bool + var yyhl3617 bool = l >= 0 + yyj3617++ + if yyhl3617 { + yyb3617 = yyj3617 > l } else { - yyb3608 = r.CheckBreak() + yyb3617 = r.CheckBreak() } - if yyb3608 { + if yyb3617 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45442,13 +45520,13 @@ func (x *OwnerReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3608++ - if yyhl3608 { - yyb3608 = yyj3608 > l + yyj3617++ + if yyhl3617 { + yyb3617 = yyj3617 > l } else { - yyb3608 = r.CheckBreak() + yyb3617 = r.CheckBreak() } - if yyb3608 { + if yyb3617 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45458,13 +45536,13 @@ func (x *OwnerReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3608++ - if yyhl3608 { - yyb3608 = yyj3608 > l + yyj3617++ + if yyhl3617 { + yyb3617 = yyj3617 > l } else { - yyb3608 = r.CheckBreak() + yyb3617 = r.CheckBreak() } - if yyb3608 { + if yyb3617 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45474,13 +45552,13 @@ func (x *OwnerReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Name = string(r.DecodeString()) } - yyj3608++ - if yyhl3608 { - yyb3608 = yyj3608 > l + yyj3617++ + if yyhl3617 { + yyb3617 = yyj3617 > l } else { - yyb3608 = r.CheckBreak() + yyb3617 = r.CheckBreak() } - if yyb3608 { + if yyb3617 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45490,13 +45568,13 @@ func (x *OwnerReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.UID = pkg1_types.UID(r.DecodeString()) } - yyj3608++ - if yyhl3608 { - yyb3608 = yyj3608 > l + yyj3617++ + if yyhl3617 { + yyb3617 = yyj3617 > l } else { - yyb3608 = r.CheckBreak() + yyb3617 = r.CheckBreak() } - if yyb3608 { + if yyb3617 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45509,25 +45587,25 @@ func (x *OwnerReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.Controller == nil { x.Controller = new(bool) } - yym3614 := z.DecBinary() - _ = yym3614 + yym3623 := z.DecBinary() + _ = yym3623 if false { } else { *((*bool)(x.Controller)) = r.DecodeBool() } } for { - yyj3608++ - if yyhl3608 { - yyb3608 = yyj3608 > l + yyj3617++ + if yyhl3617 { + yyb3617 = yyj3617 > l } else { - yyb3608 = r.CheckBreak() + yyb3617 = r.CheckBreak() } - if yyb3608 { + if yyb3617 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3608-1, "") + z.DecStructFieldNotFound(yyj3617-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -45539,41 +45617,41 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3615 := z.EncBinary() - _ = yym3615 + yym3624 := z.EncBinary() + _ = yym3624 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3616 := !z.EncBinary() - yy2arr3616 := z.EncBasicHandle().StructToArray - var yyq3616 [7]bool - _, _, _ = yysep3616, yyq3616, yy2arr3616 - const yyr3616 bool = false - yyq3616[0] = x.Kind != "" - yyq3616[1] = x.Namespace != "" - yyq3616[2] = x.Name != "" - yyq3616[3] = x.UID != "" - yyq3616[4] = x.APIVersion != "" - yyq3616[5] = x.ResourceVersion != "" - yyq3616[6] = x.FieldPath != "" - var yynn3616 int - if yyr3616 || yy2arr3616 { + yysep3625 := !z.EncBinary() + yy2arr3625 := z.EncBasicHandle().StructToArray + var yyq3625 [7]bool + _, _, _ = yysep3625, yyq3625, yy2arr3625 + const yyr3625 bool = false + yyq3625[0] = x.Kind != "" + yyq3625[1] = x.Namespace != "" + yyq3625[2] = x.Name != "" + yyq3625[3] = x.UID != "" + yyq3625[4] = x.APIVersion != "" + yyq3625[5] = x.ResourceVersion != "" + yyq3625[6] = x.FieldPath != "" + var yynn3625 int + if yyr3625 || yy2arr3625 { r.EncodeArrayStart(7) } else { - yynn3616 = 0 - for _, b := range yyq3616 { + yynn3625 = 0 + for _, b := range yyq3625 { if b { - yynn3616++ + yynn3625++ } } - r.EncodeMapStart(yynn3616) - yynn3616 = 0 + r.EncodeMapStart(yynn3625) + yynn3625 = 0 } - if yyr3616 || yy2arr3616 { + if yyr3625 || yy2arr3625 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3616[0] { - yym3618 := z.EncBinary() - _ = yym3618 + if yyq3625[0] { + yym3627 := z.EncBinary() + _ = yym3627 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -45582,23 +45660,23 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3616[0] { + if yyq3625[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3619 := z.EncBinary() - _ = yym3619 + yym3628 := z.EncBinary() + _ = yym3628 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3616 || yy2arr3616 { + if yyr3625 || yy2arr3625 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3616[1] { - yym3621 := z.EncBinary() - _ = yym3621 + if yyq3625[1] { + yym3630 := z.EncBinary() + _ = yym3630 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) @@ -45607,23 +45685,23 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3616[1] { + if yyq3625[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("namespace")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3622 := z.EncBinary() - _ = yym3622 + yym3631 := z.EncBinary() + _ = yym3631 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) } } } - if yyr3616 || yy2arr3616 { + if yyr3625 || yy2arr3625 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3616[2] { - yym3624 := z.EncBinary() - _ = yym3624 + if yyq3625[2] { + yym3633 := z.EncBinary() + _ = yym3633 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -45632,23 +45710,23 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3616[2] { + if yyq3625[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3625 := z.EncBinary() - _ = yym3625 + yym3634 := z.EncBinary() + _ = yym3634 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } } - if yyr3616 || yy2arr3616 { + if yyr3625 || yy2arr3625 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3616[3] { - yym3627 := z.EncBinary() - _ = yym3627 + if yyq3625[3] { + yym3636 := z.EncBinary() + _ = yym3636 if false { } else if z.HasExtensions() && z.EncExt(x.UID) { } else { @@ -45658,12 +45736,12 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3616[3] { + if yyq3625[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("uid")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3628 := z.EncBinary() - _ = yym3628 + yym3637 := z.EncBinary() + _ = yym3637 if false { } else if z.HasExtensions() && z.EncExt(x.UID) { } else { @@ -45671,11 +45749,11 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3616 || yy2arr3616 { + if yyr3625 || yy2arr3625 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3616[4] { - yym3630 := z.EncBinary() - _ = yym3630 + if yyq3625[4] { + yym3639 := z.EncBinary() + _ = yym3639 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -45684,23 +45762,23 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3616[4] { + if yyq3625[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3631 := z.EncBinary() - _ = yym3631 + yym3640 := z.EncBinary() + _ = yym3640 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3616 || yy2arr3616 { + if yyr3625 || yy2arr3625 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3616[5] { - yym3633 := z.EncBinary() - _ = yym3633 + if yyq3625[5] { + yym3642 := z.EncBinary() + _ = yym3642 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) @@ -45709,23 +45787,23 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3616[5] { + if yyq3625[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("resourceVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3634 := z.EncBinary() - _ = yym3634 + yym3643 := z.EncBinary() + _ = yym3643 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) } } } - if yyr3616 || yy2arr3616 { + if yyr3625 || yy2arr3625 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3616[6] { - yym3636 := z.EncBinary() - _ = yym3636 + if yyq3625[6] { + yym3645 := z.EncBinary() + _ = yym3645 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FieldPath)) @@ -45734,19 +45812,19 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3616[6] { + if yyq3625[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("fieldPath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3637 := z.EncBinary() - _ = yym3637 + yym3646 := z.EncBinary() + _ = yym3646 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FieldPath)) } } } - if yyr3616 || yy2arr3616 { + if yyr3625 || yy2arr3625 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -45759,25 +45837,25 @@ func (x *ObjectReference) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3638 := z.DecBinary() - _ = yym3638 + yym3647 := z.DecBinary() + _ = yym3647 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3639 := r.ContainerType() - if yyct3639 == codecSelferValueTypeMap1234 { - yyl3639 := r.ReadMapStart() - if yyl3639 == 0 { + yyct3648 := r.ContainerType() + if yyct3648 == codecSelferValueTypeMap1234 { + yyl3648 := r.ReadMapStart() + if yyl3648 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3639, d) + x.codecDecodeSelfFromMap(yyl3648, d) } - } else if yyct3639 == codecSelferValueTypeArray1234 { - yyl3639 := r.ReadArrayStart() - if yyl3639 == 0 { + } else if yyct3648 == codecSelferValueTypeArray1234 { + yyl3648 := r.ReadArrayStart() + if yyl3648 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3639, d) + x.codecDecodeSelfFromArray(yyl3648, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -45789,12 +45867,12 @@ func (x *ObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3640Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3640Slc - var yyhl3640 bool = l >= 0 - for yyj3640 := 0; ; yyj3640++ { - if yyhl3640 { - if yyj3640 >= l { + var yys3649Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3649Slc + var yyhl3649 bool = l >= 0 + for yyj3649 := 0; ; yyj3649++ { + if yyhl3649 { + if yyj3649 >= l { break } } else { @@ -45803,10 +45881,10 @@ func (x *ObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3640Slc = r.DecodeBytes(yys3640Slc, true, true) - yys3640 := string(yys3640Slc) + yys3649Slc = r.DecodeBytes(yys3649Slc, true, true) + yys3649 := string(yys3649Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3640 { + switch yys3649 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -45850,9 +45928,9 @@ func (x *ObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.FieldPath = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3640) - } // end switch yys3640 - } // end for yyj3640 + z.DecStructFieldNotFound(-1, yys3649) + } // end switch yys3649 + } // end for yyj3649 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -45860,16 +45938,16 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3648 int - var yyb3648 bool - var yyhl3648 bool = l >= 0 - yyj3648++ - if yyhl3648 { - yyb3648 = yyj3648 > l + var yyj3657 int + var yyb3657 bool + var yyhl3657 bool = l >= 0 + yyj3657++ + if yyhl3657 { + yyb3657 = yyj3657 > l } else { - yyb3648 = r.CheckBreak() + yyb3657 = r.CheckBreak() } - if yyb3648 { + if yyb3657 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45879,13 +45957,13 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj3648++ - if yyhl3648 { - yyb3648 = yyj3648 > l + yyj3657++ + if yyhl3657 { + yyb3657 = yyj3657 > l } else { - yyb3648 = r.CheckBreak() + yyb3657 = r.CheckBreak() } - if yyb3648 { + if yyb3657 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45895,13 +45973,13 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Namespace = string(r.DecodeString()) } - yyj3648++ - if yyhl3648 { - yyb3648 = yyj3648 > l + yyj3657++ + if yyhl3657 { + yyb3657 = yyj3657 > l } else { - yyb3648 = r.CheckBreak() + yyb3657 = r.CheckBreak() } - if yyb3648 { + if yyb3657 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45911,13 +45989,13 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Name = string(r.DecodeString()) } - yyj3648++ - if yyhl3648 { - yyb3648 = yyj3648 > l + yyj3657++ + if yyhl3657 { + yyb3657 = yyj3657 > l } else { - yyb3648 = r.CheckBreak() + yyb3657 = r.CheckBreak() } - if yyb3648 { + if yyb3657 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45927,13 +46005,13 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.UID = pkg1_types.UID(r.DecodeString()) } - yyj3648++ - if yyhl3648 { - yyb3648 = yyj3648 > l + yyj3657++ + if yyhl3657 { + yyb3657 = yyj3657 > l } else { - yyb3648 = r.CheckBreak() + yyb3657 = r.CheckBreak() } - if yyb3648 { + if yyb3657 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45943,13 +46021,13 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj3648++ - if yyhl3648 { - yyb3648 = yyj3648 > l + yyj3657++ + if yyhl3657 { + yyb3657 = yyj3657 > l } else { - yyb3648 = r.CheckBreak() + yyb3657 = r.CheckBreak() } - if yyb3648 { + if yyb3657 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45959,13 +46037,13 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.ResourceVersion = string(r.DecodeString()) } - yyj3648++ - if yyhl3648 { - yyb3648 = yyj3648 > l + yyj3657++ + if yyhl3657 { + yyb3657 = yyj3657 > l } else { - yyb3648 = r.CheckBreak() + yyb3657 = r.CheckBreak() } - if yyb3648 { + if yyb3657 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45976,17 +46054,17 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) x.FieldPath = string(r.DecodeString()) } for { - yyj3648++ - if yyhl3648 { - yyb3648 = yyj3648 > l + yyj3657++ + if yyhl3657 { + yyb3657 = yyj3657 > l } else { - yyb3648 = r.CheckBreak() + yyb3657 = r.CheckBreak() } - if yyb3648 { + if yyb3657 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3648-1, "") + z.DecStructFieldNotFound(yyj3657-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -45998,33 +46076,33 @@ func (x *LocalObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3656 := z.EncBinary() - _ = yym3656 + yym3665 := z.EncBinary() + _ = yym3665 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3657 := !z.EncBinary() - yy2arr3657 := z.EncBasicHandle().StructToArray - var yyq3657 [1]bool - _, _, _ = yysep3657, yyq3657, yy2arr3657 - const yyr3657 bool = false - var yynn3657 int - if yyr3657 || yy2arr3657 { + yysep3666 := !z.EncBinary() + yy2arr3666 := z.EncBasicHandle().StructToArray + var yyq3666 [1]bool + _, _, _ = yysep3666, yyq3666, yy2arr3666 + const yyr3666 bool = false + var yynn3666 int + if yyr3666 || yy2arr3666 { r.EncodeArrayStart(1) } else { - yynn3657 = 1 - for _, b := range yyq3657 { + yynn3666 = 1 + for _, b := range yyq3666 { if b { - yynn3657++ + yynn3666++ } } - r.EncodeMapStart(yynn3657) - yynn3657 = 0 + r.EncodeMapStart(yynn3666) + yynn3666 = 0 } - if yyr3657 || yy2arr3657 { + if yyr3666 || yy2arr3666 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3659 := z.EncBinary() - _ = yym3659 + yym3668 := z.EncBinary() + _ = yym3668 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -46033,14 +46111,14 @@ func (x *LocalObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3660 := z.EncBinary() - _ = yym3660 + yym3669 := z.EncBinary() + _ = yym3669 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } - if yyr3657 || yy2arr3657 { + if yyr3666 || yy2arr3666 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -46053,25 +46131,25 @@ func (x *LocalObjectReference) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3661 := z.DecBinary() - _ = yym3661 + yym3670 := z.DecBinary() + _ = yym3670 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3662 := r.ContainerType() - if yyct3662 == codecSelferValueTypeMap1234 { - yyl3662 := r.ReadMapStart() - if yyl3662 == 0 { + yyct3671 := r.ContainerType() + if yyct3671 == codecSelferValueTypeMap1234 { + yyl3671 := r.ReadMapStart() + if yyl3671 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3662, d) + x.codecDecodeSelfFromMap(yyl3671, d) } - } else if yyct3662 == codecSelferValueTypeArray1234 { - yyl3662 := r.ReadArrayStart() - if yyl3662 == 0 { + } else if yyct3671 == codecSelferValueTypeArray1234 { + yyl3671 := r.ReadArrayStart() + if yyl3671 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3662, d) + x.codecDecodeSelfFromArray(yyl3671, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -46083,12 +46161,12 @@ func (x *LocalObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3663Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3663Slc - var yyhl3663 bool = l >= 0 - for yyj3663 := 0; ; yyj3663++ { - if yyhl3663 { - if yyj3663 >= l { + var yys3672Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3672Slc + var yyhl3672 bool = l >= 0 + for yyj3672 := 0; ; yyj3672++ { + if yyhl3672 { + if yyj3672 >= l { break } } else { @@ -46097,10 +46175,10 @@ func (x *LocalObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decode } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3663Slc = r.DecodeBytes(yys3663Slc, true, true) - yys3663 := string(yys3663Slc) + yys3672Slc = r.DecodeBytes(yys3672Slc, true, true) + yys3672 := string(yys3672Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3663 { + switch yys3672 { case "Name": if r.TryDecodeAsNil() { x.Name = "" @@ -46108,9 +46186,9 @@ func (x *LocalObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decode x.Name = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3663) - } // end switch yys3663 - } // end for yyj3663 + z.DecStructFieldNotFound(-1, yys3672) + } // end switch yys3672 + } // end for yyj3672 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -46118,16 +46196,16 @@ func (x *LocalObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3665 int - var yyb3665 bool - var yyhl3665 bool = l >= 0 - yyj3665++ - if yyhl3665 { - yyb3665 = yyj3665 > l + var yyj3674 int + var yyb3674 bool + var yyhl3674 bool = l >= 0 + yyj3674++ + if yyhl3674 { + yyb3674 = yyj3674 > l } else { - yyb3665 = r.CheckBreak() + yyb3674 = r.CheckBreak() } - if yyb3665 { + if yyb3674 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46138,17 +46216,17 @@ func (x *LocalObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Deco x.Name = string(r.DecodeString()) } for { - yyj3665++ - if yyhl3665 { - yyb3665 = yyj3665 > l + yyj3674++ + if yyhl3674 { + yyb3674 = yyj3674 > l } else { - yyb3665 = r.CheckBreak() + yyb3674 = r.CheckBreak() } - if yyb3665 { + if yyb3674 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3665-1, "") + z.DecStructFieldNotFound(yyj3674-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46160,37 +46238,37 @@ func (x *SerializedReference) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3667 := z.EncBinary() - _ = yym3667 + yym3676 := z.EncBinary() + _ = yym3676 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3668 := !z.EncBinary() - yy2arr3668 := z.EncBasicHandle().StructToArray - var yyq3668 [3]bool - _, _, _ = yysep3668, yyq3668, yy2arr3668 - const yyr3668 bool = false - yyq3668[0] = x.Kind != "" - yyq3668[1] = x.APIVersion != "" - yyq3668[2] = true - var yynn3668 int - if yyr3668 || yy2arr3668 { + yysep3677 := !z.EncBinary() + yy2arr3677 := z.EncBasicHandle().StructToArray + var yyq3677 [3]bool + _, _, _ = yysep3677, yyq3677, yy2arr3677 + const yyr3677 bool = false + yyq3677[0] = x.Kind != "" + yyq3677[1] = x.APIVersion != "" + yyq3677[2] = true + var yynn3677 int + if yyr3677 || yy2arr3677 { r.EncodeArrayStart(3) } else { - yynn3668 = 0 - for _, b := range yyq3668 { + yynn3677 = 0 + for _, b := range yyq3677 { if b { - yynn3668++ + yynn3677++ } } - r.EncodeMapStart(yynn3668) - yynn3668 = 0 + r.EncodeMapStart(yynn3677) + yynn3677 = 0 } - if yyr3668 || yy2arr3668 { + if yyr3677 || yy2arr3677 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3668[0] { - yym3670 := z.EncBinary() - _ = yym3670 + if yyq3677[0] { + yym3679 := z.EncBinary() + _ = yym3679 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -46199,23 +46277,23 @@ func (x *SerializedReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3668[0] { + if yyq3677[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3671 := z.EncBinary() - _ = yym3671 + yym3680 := z.EncBinary() + _ = yym3680 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3668 || yy2arr3668 { + if yyr3677 || yy2arr3677 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3668[1] { - yym3673 := z.EncBinary() - _ = yym3673 + if yyq3677[1] { + yym3682 := z.EncBinary() + _ = yym3682 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -46224,36 +46302,36 @@ func (x *SerializedReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3668[1] { + if yyq3677[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3674 := z.EncBinary() - _ = yym3674 + yym3683 := z.EncBinary() + _ = yym3683 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3668 || yy2arr3668 { + if yyr3677 || yy2arr3677 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3668[2] { - yy3676 := &x.Reference - yy3676.CodecEncodeSelf(e) + if yyq3677[2] { + yy3685 := &x.Reference + yy3685.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3668[2] { + if yyq3677[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("reference")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3677 := &x.Reference - yy3677.CodecEncodeSelf(e) + yy3686 := &x.Reference + yy3686.CodecEncodeSelf(e) } } - if yyr3668 || yy2arr3668 { + if yyr3677 || yy2arr3677 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -46266,25 +46344,25 @@ func (x *SerializedReference) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3678 := z.DecBinary() - _ = yym3678 + yym3687 := z.DecBinary() + _ = yym3687 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3679 := r.ContainerType() - if yyct3679 == codecSelferValueTypeMap1234 { - yyl3679 := r.ReadMapStart() - if yyl3679 == 0 { + yyct3688 := r.ContainerType() + if yyct3688 == codecSelferValueTypeMap1234 { + yyl3688 := r.ReadMapStart() + if yyl3688 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3679, d) + x.codecDecodeSelfFromMap(yyl3688, d) } - } else if yyct3679 == codecSelferValueTypeArray1234 { - yyl3679 := r.ReadArrayStart() - if yyl3679 == 0 { + } else if yyct3688 == codecSelferValueTypeArray1234 { + yyl3688 := r.ReadArrayStart() + if yyl3688 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3679, d) + x.codecDecodeSelfFromArray(yyl3688, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -46296,12 +46374,12 @@ func (x *SerializedReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3680Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3680Slc - var yyhl3680 bool = l >= 0 - for yyj3680 := 0; ; yyj3680++ { - if yyhl3680 { - if yyj3680 >= l { + var yys3689Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3689Slc + var yyhl3689 bool = l >= 0 + for yyj3689 := 0; ; yyj3689++ { + if yyhl3689 { + if yyj3689 >= l { break } } else { @@ -46310,10 +46388,10 @@ func (x *SerializedReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3680Slc = r.DecodeBytes(yys3680Slc, true, true) - yys3680 := string(yys3680Slc) + yys3689Slc = r.DecodeBytes(yys3689Slc, true, true) + yys3689 := string(yys3689Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3680 { + switch yys3689 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -46330,13 +46408,13 @@ func (x *SerializedReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Reference = ObjectReference{} } else { - yyv3683 := &x.Reference - yyv3683.CodecDecodeSelf(d) + yyv3692 := &x.Reference + yyv3692.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3680) - } // end switch yys3680 - } // end for yyj3680 + z.DecStructFieldNotFound(-1, yys3689) + } // end switch yys3689 + } // end for yyj3689 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -46344,16 +46422,16 @@ func (x *SerializedReference) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3684 int - var yyb3684 bool - var yyhl3684 bool = l >= 0 - yyj3684++ - if yyhl3684 { - yyb3684 = yyj3684 > l + var yyj3693 int + var yyb3693 bool + var yyhl3693 bool = l >= 0 + yyj3693++ + if yyhl3693 { + yyb3693 = yyj3693 > l } else { - yyb3684 = r.CheckBreak() + yyb3693 = r.CheckBreak() } - if yyb3684 { + if yyb3693 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46363,13 +46441,13 @@ func (x *SerializedReference) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.Kind = string(r.DecodeString()) } - yyj3684++ - if yyhl3684 { - yyb3684 = yyj3684 > l + yyj3693++ + if yyhl3693 { + yyb3693 = yyj3693 > l } else { - yyb3684 = r.CheckBreak() + yyb3693 = r.CheckBreak() } - if yyb3684 { + if yyb3693 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46379,13 +46457,13 @@ func (x *SerializedReference) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.APIVersion = string(r.DecodeString()) } - yyj3684++ - if yyhl3684 { - yyb3684 = yyj3684 > l + yyj3693++ + if yyhl3693 { + yyb3693 = yyj3693 > l } else { - yyb3684 = r.CheckBreak() + yyb3693 = r.CheckBreak() } - if yyb3684 { + if yyb3693 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46393,21 +46471,21 @@ func (x *SerializedReference) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Reference = ObjectReference{} } else { - yyv3687 := &x.Reference - yyv3687.CodecDecodeSelf(d) + yyv3696 := &x.Reference + yyv3696.CodecDecodeSelf(d) } for { - yyj3684++ - if yyhl3684 { - yyb3684 = yyj3684 > l + yyj3693++ + if yyhl3693 { + yyb3693 = yyj3693 > l } else { - yyb3684 = r.CheckBreak() + yyb3693 = r.CheckBreak() } - if yyb3684 { + if yyb3693 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3684-1, "") + z.DecStructFieldNotFound(yyj3693-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46419,36 +46497,36 @@ func (x *EventSource) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3688 := z.EncBinary() - _ = yym3688 + yym3697 := z.EncBinary() + _ = yym3697 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3689 := !z.EncBinary() - yy2arr3689 := z.EncBasicHandle().StructToArray - var yyq3689 [2]bool - _, _, _ = yysep3689, yyq3689, yy2arr3689 - const yyr3689 bool = false - yyq3689[0] = x.Component != "" - yyq3689[1] = x.Host != "" - var yynn3689 int - if yyr3689 || yy2arr3689 { + yysep3698 := !z.EncBinary() + yy2arr3698 := z.EncBasicHandle().StructToArray + var yyq3698 [2]bool + _, _, _ = yysep3698, yyq3698, yy2arr3698 + const yyr3698 bool = false + yyq3698[0] = x.Component != "" + yyq3698[1] = x.Host != "" + var yynn3698 int + if yyr3698 || yy2arr3698 { r.EncodeArrayStart(2) } else { - yynn3689 = 0 - for _, b := range yyq3689 { + yynn3698 = 0 + for _, b := range yyq3698 { if b { - yynn3689++ + yynn3698++ } } - r.EncodeMapStart(yynn3689) - yynn3689 = 0 + r.EncodeMapStart(yynn3698) + yynn3698 = 0 } - if yyr3689 || yy2arr3689 { + if yyr3698 || yy2arr3698 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3689[0] { - yym3691 := z.EncBinary() - _ = yym3691 + if yyq3698[0] { + yym3700 := z.EncBinary() + _ = yym3700 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Component)) @@ -46457,23 +46535,23 @@ func (x *EventSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3689[0] { + if yyq3698[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("component")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3692 := z.EncBinary() - _ = yym3692 + yym3701 := z.EncBinary() + _ = yym3701 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Component)) } } } - if yyr3689 || yy2arr3689 { + if yyr3698 || yy2arr3698 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3689[1] { - yym3694 := z.EncBinary() - _ = yym3694 + if yyq3698[1] { + yym3703 := z.EncBinary() + _ = yym3703 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Host)) @@ -46482,19 +46560,19 @@ func (x *EventSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3689[1] { + if yyq3698[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("host")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3695 := z.EncBinary() - _ = yym3695 + yym3704 := z.EncBinary() + _ = yym3704 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Host)) } } } - if yyr3689 || yy2arr3689 { + if yyr3698 || yy2arr3698 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -46507,25 +46585,25 @@ func (x *EventSource) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3696 := z.DecBinary() - _ = yym3696 + yym3705 := z.DecBinary() + _ = yym3705 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3697 := r.ContainerType() - if yyct3697 == codecSelferValueTypeMap1234 { - yyl3697 := r.ReadMapStart() - if yyl3697 == 0 { + yyct3706 := r.ContainerType() + if yyct3706 == codecSelferValueTypeMap1234 { + yyl3706 := r.ReadMapStart() + if yyl3706 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3697, d) + x.codecDecodeSelfFromMap(yyl3706, d) } - } else if yyct3697 == codecSelferValueTypeArray1234 { - yyl3697 := r.ReadArrayStart() - if yyl3697 == 0 { + } else if yyct3706 == codecSelferValueTypeArray1234 { + yyl3706 := r.ReadArrayStart() + if yyl3706 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3697, d) + x.codecDecodeSelfFromArray(yyl3706, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -46537,12 +46615,12 @@ func (x *EventSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3698Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3698Slc - var yyhl3698 bool = l >= 0 - for yyj3698 := 0; ; yyj3698++ { - if yyhl3698 { - if yyj3698 >= l { + var yys3707Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3707Slc + var yyhl3707 bool = l >= 0 + for yyj3707 := 0; ; yyj3707++ { + if yyhl3707 { + if yyj3707 >= l { break } } else { @@ -46551,10 +46629,10 @@ func (x *EventSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3698Slc = r.DecodeBytes(yys3698Slc, true, true) - yys3698 := string(yys3698Slc) + yys3707Slc = r.DecodeBytes(yys3707Slc, true, true) + yys3707 := string(yys3707Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3698 { + switch yys3707 { case "component": if r.TryDecodeAsNil() { x.Component = "" @@ -46568,9 +46646,9 @@ func (x *EventSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Host = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3698) - } // end switch yys3698 - } // end for yyj3698 + z.DecStructFieldNotFound(-1, yys3707) + } // end switch yys3707 + } // end for yyj3707 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -46578,16 +46656,16 @@ func (x *EventSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3701 int - var yyb3701 bool - var yyhl3701 bool = l >= 0 - yyj3701++ - if yyhl3701 { - yyb3701 = yyj3701 > l + var yyj3710 int + var yyb3710 bool + var yyhl3710 bool = l >= 0 + yyj3710++ + if yyhl3710 { + yyb3710 = yyj3710 > l } else { - yyb3701 = r.CheckBreak() + yyb3710 = r.CheckBreak() } - if yyb3701 { + if yyb3710 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46597,13 +46675,13 @@ func (x *EventSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Component = string(r.DecodeString()) } - yyj3701++ - if yyhl3701 { - yyb3701 = yyj3701 > l + yyj3710++ + if yyhl3710 { + yyb3710 = yyj3710 > l } else { - yyb3701 = r.CheckBreak() + yyb3710 = r.CheckBreak() } - if yyb3701 { + if yyb3710 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46614,17 +46692,17 @@ func (x *EventSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Host = string(r.DecodeString()) } for { - yyj3701++ - if yyhl3701 { - yyb3701 = yyj3701 > l + yyj3710++ + if yyhl3710 { + yyb3710 = yyj3710 > l } else { - yyb3701 = r.CheckBreak() + yyb3710 = r.CheckBreak() } - if yyb3701 { + if yyb3710 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3701-1, "") + z.DecStructFieldNotFound(yyj3710-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46636,45 +46714,45 @@ func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3704 := z.EncBinary() - _ = yym3704 + yym3713 := z.EncBinary() + _ = yym3713 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3705 := !z.EncBinary() - yy2arr3705 := z.EncBasicHandle().StructToArray - var yyq3705 [11]bool - _, _, _ = yysep3705, yyq3705, yy2arr3705 - const yyr3705 bool = false - yyq3705[0] = x.Kind != "" - yyq3705[1] = x.APIVersion != "" - yyq3705[2] = true - yyq3705[3] = true - yyq3705[4] = x.Reason != "" - yyq3705[5] = x.Message != "" - yyq3705[6] = true - yyq3705[7] = true - yyq3705[8] = true - yyq3705[9] = x.Count != 0 - yyq3705[10] = x.Type != "" - var yynn3705 int - if yyr3705 || yy2arr3705 { + yysep3714 := !z.EncBinary() + yy2arr3714 := z.EncBasicHandle().StructToArray + var yyq3714 [11]bool + _, _, _ = yysep3714, yyq3714, yy2arr3714 + const yyr3714 bool = false + yyq3714[0] = x.Kind != "" + yyq3714[1] = x.APIVersion != "" + yyq3714[2] = true + yyq3714[3] = true + yyq3714[4] = x.Reason != "" + yyq3714[5] = x.Message != "" + yyq3714[6] = true + yyq3714[7] = true + yyq3714[8] = true + yyq3714[9] = x.Count != 0 + yyq3714[10] = x.Type != "" + var yynn3714 int + if yyr3714 || yy2arr3714 { r.EncodeArrayStart(11) } else { - yynn3705 = 0 - for _, b := range yyq3705 { + yynn3714 = 0 + for _, b := range yyq3714 { if b { - yynn3705++ + yynn3714++ } } - r.EncodeMapStart(yynn3705) - yynn3705 = 0 + r.EncodeMapStart(yynn3714) + yynn3714 = 0 } - if yyr3705 || yy2arr3705 { + if yyr3714 || yy2arr3714 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3705[0] { - yym3707 := z.EncBinary() - _ = yym3707 + if yyq3714[0] { + yym3716 := z.EncBinary() + _ = yym3716 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -46683,23 +46761,23 @@ func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3705[0] { + if yyq3714[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3708 := z.EncBinary() - _ = yym3708 + yym3717 := z.EncBinary() + _ = yym3717 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3705 || yy2arr3705 { + if yyr3714 || yy2arr3714 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3705[1] { - yym3710 := z.EncBinary() - _ = yym3710 + if yyq3714[1] { + yym3719 := z.EncBinary() + _ = yym3719 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -46708,57 +46786,57 @@ func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3705[1] { + if yyq3714[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3711 := z.EncBinary() - _ = yym3711 + yym3720 := z.EncBinary() + _ = yym3720 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3705 || yy2arr3705 { + if yyr3714 || yy2arr3714 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3705[2] { - yy3713 := &x.ObjectMeta - yy3713.CodecEncodeSelf(e) + if yyq3714[2] { + yy3722 := &x.ObjectMeta + yy3722.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3705[2] { + if yyq3714[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3714 := &x.ObjectMeta - yy3714.CodecEncodeSelf(e) + yy3723 := &x.ObjectMeta + yy3723.CodecEncodeSelf(e) } } - if yyr3705 || yy2arr3705 { + if yyr3714 || yy2arr3714 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3705[3] { - yy3716 := &x.InvolvedObject - yy3716.CodecEncodeSelf(e) + if yyq3714[3] { + yy3725 := &x.InvolvedObject + yy3725.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3705[3] { + if yyq3714[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("involvedObject")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3717 := &x.InvolvedObject - yy3717.CodecEncodeSelf(e) + yy3726 := &x.InvolvedObject + yy3726.CodecEncodeSelf(e) } } - if yyr3705 || yy2arr3705 { + if yyr3714 || yy2arr3714 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3705[4] { - yym3719 := z.EncBinary() - _ = yym3719 + if yyq3714[4] { + yym3728 := z.EncBinary() + _ = yym3728 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) @@ -46767,23 +46845,23 @@ func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3705[4] { + if yyq3714[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("reason")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3720 := z.EncBinary() - _ = yym3720 + yym3729 := z.EncBinary() + _ = yym3729 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) } } } - if yyr3705 || yy2arr3705 { + if yyr3714 || yy2arr3714 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3705[5] { - yym3722 := z.EncBinary() - _ = yym3722 + if yyq3714[5] { + yym3731 := z.EncBinary() + _ = yym3731 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) @@ -46792,114 +46870,114 @@ func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3705[5] { + if yyq3714[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("message")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3723 := z.EncBinary() - _ = yym3723 + yym3732 := z.EncBinary() + _ = yym3732 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) } } } - if yyr3705 || yy2arr3705 { + if yyr3714 || yy2arr3714 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3705[6] { - yy3725 := &x.Source - yy3725.CodecEncodeSelf(e) + if yyq3714[6] { + yy3734 := &x.Source + yy3734.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3705[6] { + if yyq3714[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("source")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3726 := &x.Source - yy3726.CodecEncodeSelf(e) + yy3735 := &x.Source + yy3735.CodecEncodeSelf(e) } } - if yyr3705 || yy2arr3705 { + if yyr3714 || yy2arr3714 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3705[7] { - yy3728 := &x.FirstTimestamp - yym3729 := z.EncBinary() - _ = yym3729 + if yyq3714[7] { + yy3737 := &x.FirstTimestamp + yym3738 := z.EncBinary() + _ = yym3738 if false { - } else if z.HasExtensions() && z.EncExt(yy3728) { - } else if yym3729 { - z.EncBinaryMarshal(yy3728) - } else if !yym3729 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3728) + } else if z.HasExtensions() && z.EncExt(yy3737) { + } else if yym3738 { + z.EncBinaryMarshal(yy3737) + } else if !yym3738 && z.IsJSONHandle() { + z.EncJSONMarshal(yy3737) } else { - z.EncFallback(yy3728) + z.EncFallback(yy3737) } } else { r.EncodeNil() } } else { - if yyq3705[7] { + if yyq3714[7] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("firstTimestamp")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3730 := &x.FirstTimestamp - yym3731 := z.EncBinary() - _ = yym3731 + yy3739 := &x.FirstTimestamp + yym3740 := z.EncBinary() + _ = yym3740 if false { - } else if z.HasExtensions() && z.EncExt(yy3730) { - } else if yym3731 { - z.EncBinaryMarshal(yy3730) - } else if !yym3731 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3730) + } else if z.HasExtensions() && z.EncExt(yy3739) { + } else if yym3740 { + z.EncBinaryMarshal(yy3739) + } else if !yym3740 && z.IsJSONHandle() { + z.EncJSONMarshal(yy3739) } else { - z.EncFallback(yy3730) + z.EncFallback(yy3739) } } } - if yyr3705 || yy2arr3705 { + if yyr3714 || yy2arr3714 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3705[8] { - yy3733 := &x.LastTimestamp - yym3734 := z.EncBinary() - _ = yym3734 + if yyq3714[8] { + yy3742 := &x.LastTimestamp + yym3743 := z.EncBinary() + _ = yym3743 if false { - } else if z.HasExtensions() && z.EncExt(yy3733) { - } else if yym3734 { - z.EncBinaryMarshal(yy3733) - } else if !yym3734 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3733) + } else if z.HasExtensions() && z.EncExt(yy3742) { + } else if yym3743 { + z.EncBinaryMarshal(yy3742) + } else if !yym3743 && z.IsJSONHandle() { + z.EncJSONMarshal(yy3742) } else { - z.EncFallback(yy3733) + z.EncFallback(yy3742) } } else { r.EncodeNil() } } else { - if yyq3705[8] { + if yyq3714[8] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("lastTimestamp")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3735 := &x.LastTimestamp - yym3736 := z.EncBinary() - _ = yym3736 + yy3744 := &x.LastTimestamp + yym3745 := z.EncBinary() + _ = yym3745 if false { - } else if z.HasExtensions() && z.EncExt(yy3735) { - } else if yym3736 { - z.EncBinaryMarshal(yy3735) - } else if !yym3736 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3735) + } else if z.HasExtensions() && z.EncExt(yy3744) { + } else if yym3745 { + z.EncBinaryMarshal(yy3744) + } else if !yym3745 && z.IsJSONHandle() { + z.EncJSONMarshal(yy3744) } else { - z.EncFallback(yy3735) + z.EncFallback(yy3744) } } } - if yyr3705 || yy2arr3705 { + if yyr3714 || yy2arr3714 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3705[9] { - yym3738 := z.EncBinary() - _ = yym3738 + if yyq3714[9] { + yym3747 := z.EncBinary() + _ = yym3747 if false { } else { r.EncodeInt(int64(x.Count)) @@ -46908,23 +46986,23 @@ func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq3705[9] { + if yyq3714[9] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("count")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3739 := z.EncBinary() - _ = yym3739 + yym3748 := z.EncBinary() + _ = yym3748 if false { } else { r.EncodeInt(int64(x.Count)) } } } - if yyr3705 || yy2arr3705 { + if yyr3714 || yy2arr3714 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3705[10] { - yym3741 := z.EncBinary() - _ = yym3741 + if yyq3714[10] { + yym3750 := z.EncBinary() + _ = yym3750 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Type)) @@ -46933,19 +47011,19 @@ func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3705[10] { + if yyq3714[10] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("type")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3742 := z.EncBinary() - _ = yym3742 + yym3751 := z.EncBinary() + _ = yym3751 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Type)) } } } - if yyr3705 || yy2arr3705 { + if yyr3714 || yy2arr3714 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -46958,25 +47036,25 @@ func (x *Event) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3743 := z.DecBinary() - _ = yym3743 + yym3752 := z.DecBinary() + _ = yym3752 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3744 := r.ContainerType() - if yyct3744 == codecSelferValueTypeMap1234 { - yyl3744 := r.ReadMapStart() - if yyl3744 == 0 { + yyct3753 := r.ContainerType() + if yyct3753 == codecSelferValueTypeMap1234 { + yyl3753 := r.ReadMapStart() + if yyl3753 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3744, d) + x.codecDecodeSelfFromMap(yyl3753, d) } - } else if yyct3744 == codecSelferValueTypeArray1234 { - yyl3744 := r.ReadArrayStart() - if yyl3744 == 0 { + } else if yyct3753 == codecSelferValueTypeArray1234 { + yyl3753 := r.ReadArrayStart() + if yyl3753 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3744, d) + x.codecDecodeSelfFromArray(yyl3753, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -46988,12 +47066,12 @@ func (x *Event) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3745Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3745Slc - var yyhl3745 bool = l >= 0 - for yyj3745 := 0; ; yyj3745++ { - if yyhl3745 { - if yyj3745 >= l { + var yys3754Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3754Slc + var yyhl3754 bool = l >= 0 + for yyj3754 := 0; ; yyj3754++ { + if yyhl3754 { + if yyj3754 >= l { break } } else { @@ -47002,10 +47080,10 @@ func (x *Event) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3745Slc = r.DecodeBytes(yys3745Slc, true, true) - yys3745 := string(yys3745Slc) + yys3754Slc = r.DecodeBytes(yys3754Slc, true, true) + yys3754 := string(yys3754Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3745 { + switch yys3754 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -47022,15 +47100,15 @@ func (x *Event) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3748 := &x.ObjectMeta - yyv3748.CodecDecodeSelf(d) + yyv3757 := &x.ObjectMeta + yyv3757.CodecDecodeSelf(d) } case "involvedObject": if r.TryDecodeAsNil() { x.InvolvedObject = ObjectReference{} } else { - yyv3749 := &x.InvolvedObject - yyv3749.CodecDecodeSelf(d) + yyv3758 := &x.InvolvedObject + yyv3758.CodecDecodeSelf(d) } case "reason": if r.TryDecodeAsNil() { @@ -47048,41 +47126,41 @@ func (x *Event) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Source = EventSource{} } else { - yyv3752 := &x.Source - yyv3752.CodecDecodeSelf(d) + yyv3761 := &x.Source + yyv3761.CodecDecodeSelf(d) } case "firstTimestamp": if r.TryDecodeAsNil() { x.FirstTimestamp = pkg2_unversioned.Time{} } else { - yyv3753 := &x.FirstTimestamp - yym3754 := z.DecBinary() - _ = yym3754 + yyv3762 := &x.FirstTimestamp + yym3763 := z.DecBinary() + _ = yym3763 if false { - } else if z.HasExtensions() && z.DecExt(yyv3753) { - } else if yym3754 { - z.DecBinaryUnmarshal(yyv3753) - } else if !yym3754 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3753) + } else if z.HasExtensions() && z.DecExt(yyv3762) { + } else if yym3763 { + z.DecBinaryUnmarshal(yyv3762) + } else if !yym3763 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3762) } else { - z.DecFallback(yyv3753, false) + z.DecFallback(yyv3762, false) } } case "lastTimestamp": if r.TryDecodeAsNil() { x.LastTimestamp = pkg2_unversioned.Time{} } else { - yyv3755 := &x.LastTimestamp - yym3756 := z.DecBinary() - _ = yym3756 + yyv3764 := &x.LastTimestamp + yym3765 := z.DecBinary() + _ = yym3765 if false { - } else if z.HasExtensions() && z.DecExt(yyv3755) { - } else if yym3756 { - z.DecBinaryUnmarshal(yyv3755) - } else if !yym3756 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3755) + } else if z.HasExtensions() && z.DecExt(yyv3764) { + } else if yym3765 { + z.DecBinaryUnmarshal(yyv3764) + } else if !yym3765 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3764) } else { - z.DecFallback(yyv3755, false) + z.DecFallback(yyv3764, false) } } case "count": @@ -47098,9 +47176,9 @@ func (x *Event) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Type = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3745) - } // end switch yys3745 - } // end for yyj3745 + z.DecStructFieldNotFound(-1, yys3754) + } // end switch yys3754 + } // end for yyj3754 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -47108,16 +47186,16 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3759 int - var yyb3759 bool - var yyhl3759 bool = l >= 0 - yyj3759++ - if yyhl3759 { - yyb3759 = yyj3759 > l + var yyj3768 int + var yyb3768 bool + var yyhl3768 bool = l >= 0 + yyj3768++ + if yyhl3768 { + yyb3768 = yyj3768 > l } else { - yyb3759 = r.CheckBreak() + yyb3768 = r.CheckBreak() } - if yyb3759 { + if yyb3768 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47127,13 +47205,13 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3759++ - if yyhl3759 { - yyb3759 = yyj3759 > l + yyj3768++ + if yyhl3768 { + yyb3768 = yyj3768 > l } else { - yyb3759 = r.CheckBreak() + yyb3768 = r.CheckBreak() } - if yyb3759 { + if yyb3768 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47143,13 +47221,13 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3759++ - if yyhl3759 { - yyb3759 = yyj3759 > l + yyj3768++ + if yyhl3768 { + yyb3768 = yyj3768 > l } else { - yyb3759 = r.CheckBreak() + yyb3768 = r.CheckBreak() } - if yyb3759 { + if yyb3768 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47157,16 +47235,16 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3762 := &x.ObjectMeta - yyv3762.CodecDecodeSelf(d) + yyv3771 := &x.ObjectMeta + yyv3771.CodecDecodeSelf(d) } - yyj3759++ - if yyhl3759 { - yyb3759 = yyj3759 > l + yyj3768++ + if yyhl3768 { + yyb3768 = yyj3768 > l } else { - yyb3759 = r.CheckBreak() + yyb3768 = r.CheckBreak() } - if yyb3759 { + if yyb3768 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47174,16 +47252,16 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.InvolvedObject = ObjectReference{} } else { - yyv3763 := &x.InvolvedObject - yyv3763.CodecDecodeSelf(d) + yyv3772 := &x.InvolvedObject + yyv3772.CodecDecodeSelf(d) } - yyj3759++ - if yyhl3759 { - yyb3759 = yyj3759 > l + yyj3768++ + if yyhl3768 { + yyb3768 = yyj3768 > l } else { - yyb3759 = r.CheckBreak() + yyb3768 = r.CheckBreak() } - if yyb3759 { + if yyb3768 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47193,13 +47271,13 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Reason = string(r.DecodeString()) } - yyj3759++ - if yyhl3759 { - yyb3759 = yyj3759 > l + yyj3768++ + if yyhl3768 { + yyb3768 = yyj3768 > l } else { - yyb3759 = r.CheckBreak() + yyb3768 = r.CheckBreak() } - if yyb3759 { + if yyb3768 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47209,13 +47287,13 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Message = string(r.DecodeString()) } - yyj3759++ - if yyhl3759 { - yyb3759 = yyj3759 > l + yyj3768++ + if yyhl3768 { + yyb3768 = yyj3768 > l } else { - yyb3759 = r.CheckBreak() + yyb3768 = r.CheckBreak() } - if yyb3759 { + if yyb3768 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47223,16 +47301,16 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Source = EventSource{} } else { - yyv3766 := &x.Source - yyv3766.CodecDecodeSelf(d) + yyv3775 := &x.Source + yyv3775.CodecDecodeSelf(d) } - yyj3759++ - if yyhl3759 { - yyb3759 = yyj3759 > l + yyj3768++ + if yyhl3768 { + yyb3768 = yyj3768 > l } else { - yyb3759 = r.CheckBreak() + yyb3768 = r.CheckBreak() } - if yyb3759 { + if yyb3768 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47240,26 +47318,26 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.FirstTimestamp = pkg2_unversioned.Time{} } else { - yyv3767 := &x.FirstTimestamp - yym3768 := z.DecBinary() - _ = yym3768 + yyv3776 := &x.FirstTimestamp + yym3777 := z.DecBinary() + _ = yym3777 if false { - } else if z.HasExtensions() && z.DecExt(yyv3767) { - } else if yym3768 { - z.DecBinaryUnmarshal(yyv3767) - } else if !yym3768 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3767) + } else if z.HasExtensions() && z.DecExt(yyv3776) { + } else if yym3777 { + z.DecBinaryUnmarshal(yyv3776) + } else if !yym3777 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3776) } else { - z.DecFallback(yyv3767, false) + z.DecFallback(yyv3776, false) } } - yyj3759++ - if yyhl3759 { - yyb3759 = yyj3759 > l + yyj3768++ + if yyhl3768 { + yyb3768 = yyj3768 > l } else { - yyb3759 = r.CheckBreak() + yyb3768 = r.CheckBreak() } - if yyb3759 { + if yyb3768 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47267,26 +47345,26 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.LastTimestamp = pkg2_unversioned.Time{} } else { - yyv3769 := &x.LastTimestamp - yym3770 := z.DecBinary() - _ = yym3770 + yyv3778 := &x.LastTimestamp + yym3779 := z.DecBinary() + _ = yym3779 if false { - } else if z.HasExtensions() && z.DecExt(yyv3769) { - } else if yym3770 { - z.DecBinaryUnmarshal(yyv3769) - } else if !yym3770 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3769) + } else if z.HasExtensions() && z.DecExt(yyv3778) { + } else if yym3779 { + z.DecBinaryUnmarshal(yyv3778) + } else if !yym3779 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3778) } else { - z.DecFallback(yyv3769, false) + z.DecFallback(yyv3778, false) } } - yyj3759++ - if yyhl3759 { - yyb3759 = yyj3759 > l + yyj3768++ + if yyhl3768 { + yyb3768 = yyj3768 > l } else { - yyb3759 = r.CheckBreak() + yyb3768 = r.CheckBreak() } - if yyb3759 { + if yyb3768 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47296,13 +47374,13 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Count = int32(r.DecodeInt(32)) } - yyj3759++ - if yyhl3759 { - yyb3759 = yyj3759 > l + yyj3768++ + if yyhl3768 { + yyb3768 = yyj3768 > l } else { - yyb3759 = r.CheckBreak() + yyb3768 = r.CheckBreak() } - if yyb3759 { + if yyb3768 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47313,17 +47391,17 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Type = string(r.DecodeString()) } for { - yyj3759++ - if yyhl3759 { - yyb3759 = yyj3759 > l + yyj3768++ + if yyhl3768 { + yyb3768 = yyj3768 > l } else { - yyb3759 = r.CheckBreak() + yyb3768 = r.CheckBreak() } - if yyb3759 { + if yyb3768 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3759-1, "") + z.DecStructFieldNotFound(yyj3768-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -47335,37 +47413,37 @@ func (x *EventList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3773 := z.EncBinary() - _ = yym3773 + yym3782 := z.EncBinary() + _ = yym3782 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3774 := !z.EncBinary() - yy2arr3774 := z.EncBasicHandle().StructToArray - var yyq3774 [4]bool - _, _, _ = yysep3774, yyq3774, yy2arr3774 - const yyr3774 bool = false - yyq3774[0] = x.Kind != "" - yyq3774[1] = x.APIVersion != "" - yyq3774[2] = true - var yynn3774 int - if yyr3774 || yy2arr3774 { + yysep3783 := !z.EncBinary() + yy2arr3783 := z.EncBasicHandle().StructToArray + var yyq3783 [4]bool + _, _, _ = yysep3783, yyq3783, yy2arr3783 + const yyr3783 bool = false + yyq3783[0] = x.Kind != "" + yyq3783[1] = x.APIVersion != "" + yyq3783[2] = true + var yynn3783 int + if yyr3783 || yy2arr3783 { r.EncodeArrayStart(4) } else { - yynn3774 = 1 - for _, b := range yyq3774 { + yynn3783 = 1 + for _, b := range yyq3783 { if b { - yynn3774++ + yynn3783++ } } - r.EncodeMapStart(yynn3774) - yynn3774 = 0 + r.EncodeMapStart(yynn3783) + yynn3783 = 0 } - if yyr3774 || yy2arr3774 { + if yyr3783 || yy2arr3783 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3774[0] { - yym3776 := z.EncBinary() - _ = yym3776 + if yyq3783[0] { + yym3785 := z.EncBinary() + _ = yym3785 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -47374,23 +47452,23 @@ func (x *EventList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3774[0] { + if yyq3783[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3777 := z.EncBinary() - _ = yym3777 + yym3786 := z.EncBinary() + _ = yym3786 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3774 || yy2arr3774 { + if yyr3783 || yy2arr3783 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3774[1] { - yym3779 := z.EncBinary() - _ = yym3779 + if yyq3783[1] { + yym3788 := z.EncBinary() + _ = yym3788 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -47399,54 +47477,54 @@ func (x *EventList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3774[1] { + if yyq3783[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3780 := z.EncBinary() - _ = yym3780 + yym3789 := z.EncBinary() + _ = yym3789 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3774 || yy2arr3774 { + if yyr3783 || yy2arr3783 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3774[2] { - yy3782 := &x.ListMeta - yym3783 := z.EncBinary() - _ = yym3783 + if yyq3783[2] { + yy3791 := &x.ListMeta + yym3792 := z.EncBinary() + _ = yym3792 if false { - } else if z.HasExtensions() && z.EncExt(yy3782) { + } else if z.HasExtensions() && z.EncExt(yy3791) { } else { - z.EncFallback(yy3782) + z.EncFallback(yy3791) } } else { r.EncodeNil() } } else { - if yyq3774[2] { + if yyq3783[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3784 := &x.ListMeta - yym3785 := z.EncBinary() - _ = yym3785 + yy3793 := &x.ListMeta + yym3794 := z.EncBinary() + _ = yym3794 if false { - } else if z.HasExtensions() && z.EncExt(yy3784) { + } else if z.HasExtensions() && z.EncExt(yy3793) { } else { - z.EncFallback(yy3784) + z.EncFallback(yy3793) } } } - if yyr3774 || yy2arr3774 { + if yyr3783 || yy2arr3783 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym3787 := z.EncBinary() - _ = yym3787 + yym3796 := z.EncBinary() + _ = yym3796 if false { } else { h.encSliceEvent(([]Event)(x.Items), e) @@ -47459,15 +47537,15 @@ func (x *EventList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym3788 := z.EncBinary() - _ = yym3788 + yym3797 := z.EncBinary() + _ = yym3797 if false { } else { h.encSliceEvent(([]Event)(x.Items), e) } } } - if yyr3774 || yy2arr3774 { + if yyr3783 || yy2arr3783 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -47480,25 +47558,25 @@ func (x *EventList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3789 := z.DecBinary() - _ = yym3789 + yym3798 := z.DecBinary() + _ = yym3798 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3790 := r.ContainerType() - if yyct3790 == codecSelferValueTypeMap1234 { - yyl3790 := r.ReadMapStart() - if yyl3790 == 0 { + yyct3799 := r.ContainerType() + if yyct3799 == codecSelferValueTypeMap1234 { + yyl3799 := r.ReadMapStart() + if yyl3799 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3790, d) + x.codecDecodeSelfFromMap(yyl3799, d) } - } else if yyct3790 == codecSelferValueTypeArray1234 { - yyl3790 := r.ReadArrayStart() - if yyl3790 == 0 { + } else if yyct3799 == codecSelferValueTypeArray1234 { + yyl3799 := r.ReadArrayStart() + if yyl3799 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3790, d) + x.codecDecodeSelfFromArray(yyl3799, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -47510,12 +47588,12 @@ func (x *EventList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3791Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3791Slc - var yyhl3791 bool = l >= 0 - for yyj3791 := 0; ; yyj3791++ { - if yyhl3791 { - if yyj3791 >= l { + var yys3800Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3800Slc + var yyhl3800 bool = l >= 0 + for yyj3800 := 0; ; yyj3800++ { + if yyhl3800 { + if yyj3800 >= l { break } } else { @@ -47524,10 +47602,10 @@ func (x *EventList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3791Slc = r.DecodeBytes(yys3791Slc, true, true) - yys3791 := string(yys3791Slc) + yys3800Slc = r.DecodeBytes(yys3800Slc, true, true) + yys3800 := string(yys3800Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3791 { + switch yys3800 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -47544,31 +47622,31 @@ func (x *EventList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3794 := &x.ListMeta - yym3795 := z.DecBinary() - _ = yym3795 + yyv3803 := &x.ListMeta + yym3804 := z.DecBinary() + _ = yym3804 if false { - } else if z.HasExtensions() && z.DecExt(yyv3794) { + } else if z.HasExtensions() && z.DecExt(yyv3803) { } else { - z.DecFallback(yyv3794, false) + z.DecFallback(yyv3803, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3796 := &x.Items - yym3797 := z.DecBinary() - _ = yym3797 + yyv3805 := &x.Items + yym3806 := z.DecBinary() + _ = yym3806 if false { } else { - h.decSliceEvent((*[]Event)(yyv3796), d) + h.decSliceEvent((*[]Event)(yyv3805), d) } } default: - z.DecStructFieldNotFound(-1, yys3791) - } // end switch yys3791 - } // end for yyj3791 + z.DecStructFieldNotFound(-1, yys3800) + } // end switch yys3800 + } // end for yyj3800 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -47576,16 +47654,16 @@ func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3798 int - var yyb3798 bool - var yyhl3798 bool = l >= 0 - yyj3798++ - if yyhl3798 { - yyb3798 = yyj3798 > l + var yyj3807 int + var yyb3807 bool + var yyhl3807 bool = l >= 0 + yyj3807++ + if yyhl3807 { + yyb3807 = yyj3807 > l } else { - yyb3798 = r.CheckBreak() + yyb3807 = r.CheckBreak() } - if yyb3798 { + if yyb3807 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47595,13 +47673,13 @@ func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3798++ - if yyhl3798 { - yyb3798 = yyj3798 > l + yyj3807++ + if yyhl3807 { + yyb3807 = yyj3807 > l } else { - yyb3798 = r.CheckBreak() + yyb3807 = r.CheckBreak() } - if yyb3798 { + if yyb3807 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47611,13 +47689,13 @@ func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3798++ - if yyhl3798 { - yyb3798 = yyj3798 > l + yyj3807++ + if yyhl3807 { + yyb3807 = yyj3807 > l } else { - yyb3798 = r.CheckBreak() + yyb3807 = r.CheckBreak() } - if yyb3798 { + if yyb3807 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47625,22 +47703,22 @@ func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3801 := &x.ListMeta - yym3802 := z.DecBinary() - _ = yym3802 + yyv3810 := &x.ListMeta + yym3811 := z.DecBinary() + _ = yym3811 if false { - } else if z.HasExtensions() && z.DecExt(yyv3801) { + } else if z.HasExtensions() && z.DecExt(yyv3810) { } else { - z.DecFallback(yyv3801, false) + z.DecFallback(yyv3810, false) } } - yyj3798++ - if yyhl3798 { - yyb3798 = yyj3798 > l + yyj3807++ + if yyhl3807 { + yyb3807 = yyj3807 > l } else { - yyb3798 = r.CheckBreak() + yyb3807 = r.CheckBreak() } - if yyb3798 { + if yyb3807 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47648,26 +47726,26 @@ func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3803 := &x.Items - yym3804 := z.DecBinary() - _ = yym3804 + yyv3812 := &x.Items + yym3813 := z.DecBinary() + _ = yym3813 if false { } else { - h.decSliceEvent((*[]Event)(yyv3803), d) + h.decSliceEvent((*[]Event)(yyv3812), d) } } for { - yyj3798++ - if yyhl3798 { - yyb3798 = yyj3798 > l + yyj3807++ + if yyhl3807 { + yyb3807 = yyj3807 > l } else { - yyb3798 = r.CheckBreak() + yyb3807 = r.CheckBreak() } - if yyb3798 { + if yyb3807 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3798-1, "") + z.DecStructFieldNotFound(yyj3807-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -47679,37 +47757,37 @@ func (x *List) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3805 := z.EncBinary() - _ = yym3805 + yym3814 := z.EncBinary() + _ = yym3814 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3806 := !z.EncBinary() - yy2arr3806 := z.EncBasicHandle().StructToArray - var yyq3806 [4]bool - _, _, _ = yysep3806, yyq3806, yy2arr3806 - const yyr3806 bool = false - yyq3806[0] = x.Kind != "" - yyq3806[1] = x.APIVersion != "" - yyq3806[2] = true - var yynn3806 int - if yyr3806 || yy2arr3806 { + yysep3815 := !z.EncBinary() + yy2arr3815 := z.EncBasicHandle().StructToArray + var yyq3815 [4]bool + _, _, _ = yysep3815, yyq3815, yy2arr3815 + const yyr3815 bool = false + yyq3815[0] = x.Kind != "" + yyq3815[1] = x.APIVersion != "" + yyq3815[2] = true + var yynn3815 int + if yyr3815 || yy2arr3815 { r.EncodeArrayStart(4) } else { - yynn3806 = 1 - for _, b := range yyq3806 { + yynn3815 = 1 + for _, b := range yyq3815 { if b { - yynn3806++ + yynn3815++ } } - r.EncodeMapStart(yynn3806) - yynn3806 = 0 + r.EncodeMapStart(yynn3815) + yynn3815 = 0 } - if yyr3806 || yy2arr3806 { + if yyr3815 || yy2arr3815 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3806[0] { - yym3808 := z.EncBinary() - _ = yym3808 + if yyq3815[0] { + yym3817 := z.EncBinary() + _ = yym3817 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -47718,23 +47796,23 @@ func (x *List) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3806[0] { + if yyq3815[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3809 := z.EncBinary() - _ = yym3809 + yym3818 := z.EncBinary() + _ = yym3818 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3806 || yy2arr3806 { + if yyr3815 || yy2arr3815 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3806[1] { - yym3811 := z.EncBinary() - _ = yym3811 + if yyq3815[1] { + yym3820 := z.EncBinary() + _ = yym3820 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -47743,54 +47821,54 @@ func (x *List) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3806[1] { + if yyq3815[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3812 := z.EncBinary() - _ = yym3812 + yym3821 := z.EncBinary() + _ = yym3821 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3806 || yy2arr3806 { + if yyr3815 || yy2arr3815 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3806[2] { - yy3814 := &x.ListMeta - yym3815 := z.EncBinary() - _ = yym3815 + if yyq3815[2] { + yy3823 := &x.ListMeta + yym3824 := z.EncBinary() + _ = yym3824 if false { - } else if z.HasExtensions() && z.EncExt(yy3814) { + } else if z.HasExtensions() && z.EncExt(yy3823) { } else { - z.EncFallback(yy3814) + z.EncFallback(yy3823) } } else { r.EncodeNil() } } else { - if yyq3806[2] { + if yyq3815[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3816 := &x.ListMeta - yym3817 := z.EncBinary() - _ = yym3817 + yy3825 := &x.ListMeta + yym3826 := z.EncBinary() + _ = yym3826 if false { - } else if z.HasExtensions() && z.EncExt(yy3816) { + } else if z.HasExtensions() && z.EncExt(yy3825) { } else { - z.EncFallback(yy3816) + z.EncFallback(yy3825) } } } - if yyr3806 || yy2arr3806 { + if yyr3815 || yy2arr3815 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym3819 := z.EncBinary() - _ = yym3819 + yym3828 := z.EncBinary() + _ = yym3828 if false { } else { h.encSliceruntime_Object(([]pkg7_runtime.Object)(x.Items), e) @@ -47803,15 +47881,15 @@ func (x *List) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym3820 := z.EncBinary() - _ = yym3820 + yym3829 := z.EncBinary() + _ = yym3829 if false { } else { h.encSliceruntime_Object(([]pkg7_runtime.Object)(x.Items), e) } } } - if yyr3806 || yy2arr3806 { + if yyr3815 || yy2arr3815 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -47824,25 +47902,25 @@ func (x *List) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3821 := z.DecBinary() - _ = yym3821 + yym3830 := z.DecBinary() + _ = yym3830 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3822 := r.ContainerType() - if yyct3822 == codecSelferValueTypeMap1234 { - yyl3822 := r.ReadMapStart() - if yyl3822 == 0 { + yyct3831 := r.ContainerType() + if yyct3831 == codecSelferValueTypeMap1234 { + yyl3831 := r.ReadMapStart() + if yyl3831 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3822, d) + x.codecDecodeSelfFromMap(yyl3831, d) } - } else if yyct3822 == codecSelferValueTypeArray1234 { - yyl3822 := r.ReadArrayStart() - if yyl3822 == 0 { + } else if yyct3831 == codecSelferValueTypeArray1234 { + yyl3831 := r.ReadArrayStart() + if yyl3831 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3822, d) + x.codecDecodeSelfFromArray(yyl3831, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -47854,12 +47932,12 @@ func (x *List) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3823Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3823Slc - var yyhl3823 bool = l >= 0 - for yyj3823 := 0; ; yyj3823++ { - if yyhl3823 { - if yyj3823 >= l { + var yys3832Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3832Slc + var yyhl3832 bool = l >= 0 + for yyj3832 := 0; ; yyj3832++ { + if yyhl3832 { + if yyj3832 >= l { break } } else { @@ -47868,10 +47946,10 @@ func (x *List) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3823Slc = r.DecodeBytes(yys3823Slc, true, true) - yys3823 := string(yys3823Slc) + yys3832Slc = r.DecodeBytes(yys3832Slc, true, true) + yys3832 := string(yys3832Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3823 { + switch yys3832 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -47888,31 +47966,31 @@ func (x *List) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3826 := &x.ListMeta - yym3827 := z.DecBinary() - _ = yym3827 + yyv3835 := &x.ListMeta + yym3836 := z.DecBinary() + _ = yym3836 if false { - } else if z.HasExtensions() && z.DecExt(yyv3826) { + } else if z.HasExtensions() && z.DecExt(yyv3835) { } else { - z.DecFallback(yyv3826, false) + z.DecFallback(yyv3835, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3828 := &x.Items - yym3829 := z.DecBinary() - _ = yym3829 + yyv3837 := &x.Items + yym3838 := z.DecBinary() + _ = yym3838 if false { } else { - h.decSliceruntime_Object((*[]pkg7_runtime.Object)(yyv3828), d) + h.decSliceruntime_Object((*[]pkg7_runtime.Object)(yyv3837), d) } } default: - z.DecStructFieldNotFound(-1, yys3823) - } // end switch yys3823 - } // end for yyj3823 + z.DecStructFieldNotFound(-1, yys3832) + } // end switch yys3832 + } // end for yyj3832 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -47920,16 +47998,16 @@ func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3830 int - var yyb3830 bool - var yyhl3830 bool = l >= 0 - yyj3830++ - if yyhl3830 { - yyb3830 = yyj3830 > l + var yyj3839 int + var yyb3839 bool + var yyhl3839 bool = l >= 0 + yyj3839++ + if yyhl3839 { + yyb3839 = yyj3839 > l } else { - yyb3830 = r.CheckBreak() + yyb3839 = r.CheckBreak() } - if yyb3830 { + if yyb3839 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47939,13 +48017,13 @@ func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3830++ - if yyhl3830 { - yyb3830 = yyj3830 > l + yyj3839++ + if yyhl3839 { + yyb3839 = yyj3839 > l } else { - yyb3830 = r.CheckBreak() + yyb3839 = r.CheckBreak() } - if yyb3830 { + if yyb3839 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47955,13 +48033,13 @@ func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3830++ - if yyhl3830 { - yyb3830 = yyj3830 > l + yyj3839++ + if yyhl3839 { + yyb3839 = yyj3839 > l } else { - yyb3830 = r.CheckBreak() + yyb3839 = r.CheckBreak() } - if yyb3830 { + if yyb3839 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47969,22 +48047,22 @@ func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3833 := &x.ListMeta - yym3834 := z.DecBinary() - _ = yym3834 + yyv3842 := &x.ListMeta + yym3843 := z.DecBinary() + _ = yym3843 if false { - } else if z.HasExtensions() && z.DecExt(yyv3833) { + } else if z.HasExtensions() && z.DecExt(yyv3842) { } else { - z.DecFallback(yyv3833, false) + z.DecFallback(yyv3842, false) } } - yyj3830++ - if yyhl3830 { - yyb3830 = yyj3830 > l + yyj3839++ + if yyhl3839 { + yyb3839 = yyj3839 > l } else { - yyb3830 = r.CheckBreak() + yyb3839 = r.CheckBreak() } - if yyb3830 { + if yyb3839 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47992,26 +48070,26 @@ func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3835 := &x.Items - yym3836 := z.DecBinary() - _ = yym3836 + yyv3844 := &x.Items + yym3845 := z.DecBinary() + _ = yym3845 if false { } else { - h.decSliceruntime_Object((*[]pkg7_runtime.Object)(yyv3835), d) + h.decSliceruntime_Object((*[]pkg7_runtime.Object)(yyv3844), d) } } for { - yyj3830++ - if yyhl3830 { - yyb3830 = yyj3830 > l + yyj3839++ + if yyhl3839 { + yyb3839 = yyj3839 > l } else { - yyb3830 = r.CheckBreak() + yyb3839 = r.CheckBreak() } - if yyb3830 { + if yyb3839 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3830-1, "") + z.DecStructFieldNotFound(yyj3839-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -48020,8 +48098,8 @@ func (x LimitType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym3837 := z.EncBinary() - _ = yym3837 + yym3846 := z.EncBinary() + _ = yym3846 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -48033,8 +48111,8 @@ func (x *LimitType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3838 := z.DecBinary() - _ = yym3838 + yym3847 := z.DecBinary() + _ = yym3847 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -48049,53 +48127,53 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3839 := z.EncBinary() - _ = yym3839 + yym3848 := z.EncBinary() + _ = yym3848 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3840 := !z.EncBinary() - yy2arr3840 := z.EncBasicHandle().StructToArray - var yyq3840 [6]bool - _, _, _ = yysep3840, yyq3840, yy2arr3840 - const yyr3840 bool = false - yyq3840[0] = x.Type != "" - yyq3840[1] = len(x.Max) != 0 - yyq3840[2] = len(x.Min) != 0 - yyq3840[3] = len(x.Default) != 0 - yyq3840[4] = len(x.DefaultRequest) != 0 - yyq3840[5] = len(x.MaxLimitRequestRatio) != 0 - var yynn3840 int - if yyr3840 || yy2arr3840 { + yysep3849 := !z.EncBinary() + yy2arr3849 := z.EncBasicHandle().StructToArray + var yyq3849 [6]bool + _, _, _ = yysep3849, yyq3849, yy2arr3849 + const yyr3849 bool = false + yyq3849[0] = x.Type != "" + yyq3849[1] = len(x.Max) != 0 + yyq3849[2] = len(x.Min) != 0 + yyq3849[3] = len(x.Default) != 0 + yyq3849[4] = len(x.DefaultRequest) != 0 + yyq3849[5] = len(x.MaxLimitRequestRatio) != 0 + var yynn3849 int + if yyr3849 || yy2arr3849 { r.EncodeArrayStart(6) } else { - yynn3840 = 0 - for _, b := range yyq3840 { + yynn3849 = 0 + for _, b := range yyq3849 { if b { - yynn3840++ + yynn3849++ } } - r.EncodeMapStart(yynn3840) - yynn3840 = 0 + r.EncodeMapStart(yynn3849) + yynn3849 = 0 } - if yyr3840 || yy2arr3840 { + if yyr3849 || yy2arr3849 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3840[0] { + if yyq3849[0] { x.Type.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3840[0] { + if yyq3849[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("type")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } } - if yyr3840 || yy2arr3840 { + if yyr3849 || yy2arr3849 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3840[1] { + if yyq3849[1] { if x.Max == nil { r.EncodeNil() } else { @@ -48105,7 +48183,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3840[1] { + if yyq3849[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("max")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -48116,9 +48194,9 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3840 || yy2arr3840 { + if yyr3849 || yy2arr3849 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3840[2] { + if yyq3849[2] { if x.Min == nil { r.EncodeNil() } else { @@ -48128,7 +48206,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3840[2] { + if yyq3849[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("min")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -48139,9 +48217,9 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3840 || yy2arr3840 { + if yyr3849 || yy2arr3849 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3840[3] { + if yyq3849[3] { if x.Default == nil { r.EncodeNil() } else { @@ -48151,7 +48229,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3840[3] { + if yyq3849[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("default")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -48162,9 +48240,9 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3840 || yy2arr3840 { + if yyr3849 || yy2arr3849 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3840[4] { + if yyq3849[4] { if x.DefaultRequest == nil { r.EncodeNil() } else { @@ -48174,7 +48252,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3840[4] { + if yyq3849[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("defaultRequest")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -48185,9 +48263,9 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3840 || yy2arr3840 { + if yyr3849 || yy2arr3849 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3840[5] { + if yyq3849[5] { if x.MaxLimitRequestRatio == nil { r.EncodeNil() } else { @@ -48197,7 +48275,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3840[5] { + if yyq3849[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("maxLimitRequestRatio")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -48208,7 +48286,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3840 || yy2arr3840 { + if yyr3849 || yy2arr3849 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -48221,25 +48299,25 @@ func (x *LimitRangeItem) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3847 := z.DecBinary() - _ = yym3847 + yym3856 := z.DecBinary() + _ = yym3856 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3848 := r.ContainerType() - if yyct3848 == codecSelferValueTypeMap1234 { - yyl3848 := r.ReadMapStart() - if yyl3848 == 0 { + yyct3857 := r.ContainerType() + if yyct3857 == codecSelferValueTypeMap1234 { + yyl3857 := r.ReadMapStart() + if yyl3857 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3848, d) + x.codecDecodeSelfFromMap(yyl3857, d) } - } else if yyct3848 == codecSelferValueTypeArray1234 { - yyl3848 := r.ReadArrayStart() - if yyl3848 == 0 { + } else if yyct3857 == codecSelferValueTypeArray1234 { + yyl3857 := r.ReadArrayStart() + if yyl3857 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3848, d) + x.codecDecodeSelfFromArray(yyl3857, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -48251,12 +48329,12 @@ func (x *LimitRangeItem) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3849Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3849Slc - var yyhl3849 bool = l >= 0 - for yyj3849 := 0; ; yyj3849++ { - if yyhl3849 { - if yyj3849 >= l { + var yys3858Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3858Slc + var yyhl3858 bool = l >= 0 + for yyj3858 := 0; ; yyj3858++ { + if yyhl3858 { + if yyj3858 >= l { break } } else { @@ -48265,10 +48343,10 @@ func (x *LimitRangeItem) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3849Slc = r.DecodeBytes(yys3849Slc, true, true) - yys3849 := string(yys3849Slc) + yys3858Slc = r.DecodeBytes(yys3858Slc, true, true) + yys3858 := string(yys3858Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3849 { + switch yys3858 { case "type": if r.TryDecodeAsNil() { x.Type = "" @@ -48279,41 +48357,41 @@ func (x *LimitRangeItem) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Max = nil } else { - yyv3851 := &x.Max - yyv3851.CodecDecodeSelf(d) + yyv3860 := &x.Max + yyv3860.CodecDecodeSelf(d) } case "min": if r.TryDecodeAsNil() { x.Min = nil } else { - yyv3852 := &x.Min - yyv3852.CodecDecodeSelf(d) + yyv3861 := &x.Min + yyv3861.CodecDecodeSelf(d) } case "default": if r.TryDecodeAsNil() { x.Default = nil } else { - yyv3853 := &x.Default - yyv3853.CodecDecodeSelf(d) + yyv3862 := &x.Default + yyv3862.CodecDecodeSelf(d) } case "defaultRequest": if r.TryDecodeAsNil() { x.DefaultRequest = nil } else { - yyv3854 := &x.DefaultRequest - yyv3854.CodecDecodeSelf(d) + yyv3863 := &x.DefaultRequest + yyv3863.CodecDecodeSelf(d) } case "maxLimitRequestRatio": if r.TryDecodeAsNil() { x.MaxLimitRequestRatio = nil } else { - yyv3855 := &x.MaxLimitRequestRatio - yyv3855.CodecDecodeSelf(d) + yyv3864 := &x.MaxLimitRequestRatio + yyv3864.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3849) - } // end switch yys3849 - } // end for yyj3849 + z.DecStructFieldNotFound(-1, yys3858) + } // end switch yys3858 + } // end for yyj3858 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -48321,16 +48399,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3856 int - var yyb3856 bool - var yyhl3856 bool = l >= 0 - yyj3856++ - if yyhl3856 { - yyb3856 = yyj3856 > l + var yyj3865 int + var yyb3865 bool + var yyhl3865 bool = l >= 0 + yyj3865++ + if yyhl3865 { + yyb3865 = yyj3865 > l } else { - yyb3856 = r.CheckBreak() + yyb3865 = r.CheckBreak() } - if yyb3856 { + if yyb3865 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48340,13 +48418,13 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Type = LimitType(r.DecodeString()) } - yyj3856++ - if yyhl3856 { - yyb3856 = yyj3856 > l + yyj3865++ + if yyhl3865 { + yyb3865 = yyj3865 > l } else { - yyb3856 = r.CheckBreak() + yyb3865 = r.CheckBreak() } - if yyb3856 { + if yyb3865 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48354,16 +48432,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Max = nil } else { - yyv3858 := &x.Max - yyv3858.CodecDecodeSelf(d) + yyv3867 := &x.Max + yyv3867.CodecDecodeSelf(d) } - yyj3856++ - if yyhl3856 { - yyb3856 = yyj3856 > l + yyj3865++ + if yyhl3865 { + yyb3865 = yyj3865 > l } else { - yyb3856 = r.CheckBreak() + yyb3865 = r.CheckBreak() } - if yyb3856 { + if yyb3865 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48371,16 +48449,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Min = nil } else { - yyv3859 := &x.Min - yyv3859.CodecDecodeSelf(d) + yyv3868 := &x.Min + yyv3868.CodecDecodeSelf(d) } - yyj3856++ - if yyhl3856 { - yyb3856 = yyj3856 > l + yyj3865++ + if yyhl3865 { + yyb3865 = yyj3865 > l } else { - yyb3856 = r.CheckBreak() + yyb3865 = r.CheckBreak() } - if yyb3856 { + if yyb3865 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48388,16 +48466,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Default = nil } else { - yyv3860 := &x.Default - yyv3860.CodecDecodeSelf(d) + yyv3869 := &x.Default + yyv3869.CodecDecodeSelf(d) } - yyj3856++ - if yyhl3856 { - yyb3856 = yyj3856 > l + yyj3865++ + if yyhl3865 { + yyb3865 = yyj3865 > l } else { - yyb3856 = r.CheckBreak() + yyb3865 = r.CheckBreak() } - if yyb3856 { + if yyb3865 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48405,16 +48483,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.DefaultRequest = nil } else { - yyv3861 := &x.DefaultRequest - yyv3861.CodecDecodeSelf(d) + yyv3870 := &x.DefaultRequest + yyv3870.CodecDecodeSelf(d) } - yyj3856++ - if yyhl3856 { - yyb3856 = yyj3856 > l + yyj3865++ + if yyhl3865 { + yyb3865 = yyj3865 > l } else { - yyb3856 = r.CheckBreak() + yyb3865 = r.CheckBreak() } - if yyb3856 { + if yyb3865 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48422,21 +48500,21 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.MaxLimitRequestRatio = nil } else { - yyv3862 := &x.MaxLimitRequestRatio - yyv3862.CodecDecodeSelf(d) + yyv3871 := &x.MaxLimitRequestRatio + yyv3871.CodecDecodeSelf(d) } for { - yyj3856++ - if yyhl3856 { - yyb3856 = yyj3856 > l + yyj3865++ + if yyhl3865 { + yyb3865 = yyj3865 > l } else { - yyb3856 = r.CheckBreak() + yyb3865 = r.CheckBreak() } - if yyb3856 { + if yyb3865 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3856-1, "") + z.DecStructFieldNotFound(yyj3865-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -48448,36 +48526,36 @@ func (x *LimitRangeSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3863 := z.EncBinary() - _ = yym3863 + yym3872 := z.EncBinary() + _ = yym3872 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3864 := !z.EncBinary() - yy2arr3864 := z.EncBasicHandle().StructToArray - var yyq3864 [1]bool - _, _, _ = yysep3864, yyq3864, yy2arr3864 - const yyr3864 bool = false - var yynn3864 int - if yyr3864 || yy2arr3864 { + yysep3873 := !z.EncBinary() + yy2arr3873 := z.EncBasicHandle().StructToArray + var yyq3873 [1]bool + _, _, _ = yysep3873, yyq3873, yy2arr3873 + const yyr3873 bool = false + var yynn3873 int + if yyr3873 || yy2arr3873 { r.EncodeArrayStart(1) } else { - yynn3864 = 1 - for _, b := range yyq3864 { + yynn3873 = 1 + for _, b := range yyq3873 { if b { - yynn3864++ + yynn3873++ } } - r.EncodeMapStart(yynn3864) - yynn3864 = 0 + r.EncodeMapStart(yynn3873) + yynn3873 = 0 } - if yyr3864 || yy2arr3864 { + if yyr3873 || yy2arr3873 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Limits == nil { r.EncodeNil() } else { - yym3866 := z.EncBinary() - _ = yym3866 + yym3875 := z.EncBinary() + _ = yym3875 if false { } else { h.encSliceLimitRangeItem(([]LimitRangeItem)(x.Limits), e) @@ -48490,15 +48568,15 @@ func (x *LimitRangeSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x.Limits == nil { r.EncodeNil() } else { - yym3867 := z.EncBinary() - _ = yym3867 + yym3876 := z.EncBinary() + _ = yym3876 if false { } else { h.encSliceLimitRangeItem(([]LimitRangeItem)(x.Limits), e) } } } - if yyr3864 || yy2arr3864 { + if yyr3873 || yy2arr3873 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -48511,25 +48589,25 @@ func (x *LimitRangeSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3868 := z.DecBinary() - _ = yym3868 + yym3877 := z.DecBinary() + _ = yym3877 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3869 := r.ContainerType() - if yyct3869 == codecSelferValueTypeMap1234 { - yyl3869 := r.ReadMapStart() - if yyl3869 == 0 { + yyct3878 := r.ContainerType() + if yyct3878 == codecSelferValueTypeMap1234 { + yyl3878 := r.ReadMapStart() + if yyl3878 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3869, d) + x.codecDecodeSelfFromMap(yyl3878, d) } - } else if yyct3869 == codecSelferValueTypeArray1234 { - yyl3869 := r.ReadArrayStart() - if yyl3869 == 0 { + } else if yyct3878 == codecSelferValueTypeArray1234 { + yyl3878 := r.ReadArrayStart() + if yyl3878 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3869, d) + x.codecDecodeSelfFromArray(yyl3878, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -48541,12 +48619,12 @@ func (x *LimitRangeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3870Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3870Slc - var yyhl3870 bool = l >= 0 - for yyj3870 := 0; ; yyj3870++ { - if yyhl3870 { - if yyj3870 >= l { + var yys3879Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3879Slc + var yyhl3879 bool = l >= 0 + for yyj3879 := 0; ; yyj3879++ { + if yyhl3879 { + if yyj3879 >= l { break } } else { @@ -48555,26 +48633,26 @@ func (x *LimitRangeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3870Slc = r.DecodeBytes(yys3870Slc, true, true) - yys3870 := string(yys3870Slc) + yys3879Slc = r.DecodeBytes(yys3879Slc, true, true) + yys3879 := string(yys3879Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3870 { + switch yys3879 { case "limits": if r.TryDecodeAsNil() { x.Limits = nil } else { - yyv3871 := &x.Limits - yym3872 := z.DecBinary() - _ = yym3872 + yyv3880 := &x.Limits + yym3881 := z.DecBinary() + _ = yym3881 if false { } else { - h.decSliceLimitRangeItem((*[]LimitRangeItem)(yyv3871), d) + h.decSliceLimitRangeItem((*[]LimitRangeItem)(yyv3880), d) } } default: - z.DecStructFieldNotFound(-1, yys3870) - } // end switch yys3870 - } // end for yyj3870 + z.DecStructFieldNotFound(-1, yys3879) + } // end switch yys3879 + } // end for yyj3879 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -48582,16 +48660,16 @@ func (x *LimitRangeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3873 int - var yyb3873 bool - var yyhl3873 bool = l >= 0 - yyj3873++ - if yyhl3873 { - yyb3873 = yyj3873 > l + var yyj3882 int + var yyb3882 bool + var yyhl3882 bool = l >= 0 + yyj3882++ + if yyhl3882 { + yyb3882 = yyj3882 > l } else { - yyb3873 = r.CheckBreak() + yyb3882 = r.CheckBreak() } - if yyb3873 { + if yyb3882 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48599,26 +48677,26 @@ func (x *LimitRangeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Limits = nil } else { - yyv3874 := &x.Limits - yym3875 := z.DecBinary() - _ = yym3875 + yyv3883 := &x.Limits + yym3884 := z.DecBinary() + _ = yym3884 if false { } else { - h.decSliceLimitRangeItem((*[]LimitRangeItem)(yyv3874), d) + h.decSliceLimitRangeItem((*[]LimitRangeItem)(yyv3883), d) } } for { - yyj3873++ - if yyhl3873 { - yyb3873 = yyj3873 > l + yyj3882++ + if yyhl3882 { + yyb3882 = yyj3882 > l } else { - yyb3873 = r.CheckBreak() + yyb3882 = r.CheckBreak() } - if yyb3873 { + if yyb3882 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3873-1, "") + z.DecStructFieldNotFound(yyj3882-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -48630,38 +48708,38 @@ func (x *LimitRange) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3876 := z.EncBinary() - _ = yym3876 + yym3885 := z.EncBinary() + _ = yym3885 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3877 := !z.EncBinary() - yy2arr3877 := z.EncBasicHandle().StructToArray - var yyq3877 [4]bool - _, _, _ = yysep3877, yyq3877, yy2arr3877 - const yyr3877 bool = false - yyq3877[0] = x.Kind != "" - yyq3877[1] = x.APIVersion != "" - yyq3877[2] = true - yyq3877[3] = true - var yynn3877 int - if yyr3877 || yy2arr3877 { + yysep3886 := !z.EncBinary() + yy2arr3886 := z.EncBasicHandle().StructToArray + var yyq3886 [4]bool + _, _, _ = yysep3886, yyq3886, yy2arr3886 + const yyr3886 bool = false + yyq3886[0] = x.Kind != "" + yyq3886[1] = x.APIVersion != "" + yyq3886[2] = true + yyq3886[3] = true + var yynn3886 int + if yyr3886 || yy2arr3886 { r.EncodeArrayStart(4) } else { - yynn3877 = 0 - for _, b := range yyq3877 { + yynn3886 = 0 + for _, b := range yyq3886 { if b { - yynn3877++ + yynn3886++ } } - r.EncodeMapStart(yynn3877) - yynn3877 = 0 + r.EncodeMapStart(yynn3886) + yynn3886 = 0 } - if yyr3877 || yy2arr3877 { + if yyr3886 || yy2arr3886 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3877[0] { - yym3879 := z.EncBinary() - _ = yym3879 + if yyq3886[0] { + yym3888 := z.EncBinary() + _ = yym3888 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -48670,23 +48748,23 @@ func (x *LimitRange) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3877[0] { + if yyq3886[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3880 := z.EncBinary() - _ = yym3880 + yym3889 := z.EncBinary() + _ = yym3889 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3877 || yy2arr3877 { + if yyr3886 || yy2arr3886 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3877[1] { - yym3882 := z.EncBinary() - _ = yym3882 + if yyq3886[1] { + yym3891 := z.EncBinary() + _ = yym3891 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -48695,53 +48773,53 @@ func (x *LimitRange) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3877[1] { + if yyq3886[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3883 := z.EncBinary() - _ = yym3883 + yym3892 := z.EncBinary() + _ = yym3892 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3877 || yy2arr3877 { + if yyr3886 || yy2arr3886 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3877[2] { - yy3885 := &x.ObjectMeta - yy3885.CodecEncodeSelf(e) + if yyq3886[2] { + yy3894 := &x.ObjectMeta + yy3894.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3877[2] { + if yyq3886[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3886 := &x.ObjectMeta - yy3886.CodecEncodeSelf(e) + yy3895 := &x.ObjectMeta + yy3895.CodecEncodeSelf(e) } } - if yyr3877 || yy2arr3877 { + if yyr3886 || yy2arr3886 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3877[3] { - yy3888 := &x.Spec - yy3888.CodecEncodeSelf(e) + if yyq3886[3] { + yy3897 := &x.Spec + yy3897.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3877[3] { + if yyq3886[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3889 := &x.Spec - yy3889.CodecEncodeSelf(e) + yy3898 := &x.Spec + yy3898.CodecEncodeSelf(e) } } - if yyr3877 || yy2arr3877 { + if yyr3886 || yy2arr3886 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -48754,25 +48832,25 @@ func (x *LimitRange) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3890 := z.DecBinary() - _ = yym3890 + yym3899 := z.DecBinary() + _ = yym3899 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3891 := r.ContainerType() - if yyct3891 == codecSelferValueTypeMap1234 { - yyl3891 := r.ReadMapStart() - if yyl3891 == 0 { + yyct3900 := r.ContainerType() + if yyct3900 == codecSelferValueTypeMap1234 { + yyl3900 := r.ReadMapStart() + if yyl3900 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3891, d) + x.codecDecodeSelfFromMap(yyl3900, d) } - } else if yyct3891 == codecSelferValueTypeArray1234 { - yyl3891 := r.ReadArrayStart() - if yyl3891 == 0 { + } else if yyct3900 == codecSelferValueTypeArray1234 { + yyl3900 := r.ReadArrayStart() + if yyl3900 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3891, d) + x.codecDecodeSelfFromArray(yyl3900, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -48784,12 +48862,12 @@ func (x *LimitRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3892Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3892Slc - var yyhl3892 bool = l >= 0 - for yyj3892 := 0; ; yyj3892++ { - if yyhl3892 { - if yyj3892 >= l { + var yys3901Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3901Slc + var yyhl3901 bool = l >= 0 + for yyj3901 := 0; ; yyj3901++ { + if yyhl3901 { + if yyj3901 >= l { break } } else { @@ -48798,10 +48876,10 @@ func (x *LimitRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3892Slc = r.DecodeBytes(yys3892Slc, true, true) - yys3892 := string(yys3892Slc) + yys3901Slc = r.DecodeBytes(yys3901Slc, true, true) + yys3901 := string(yys3901Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3892 { + switch yys3901 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -48818,20 +48896,20 @@ func (x *LimitRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3895 := &x.ObjectMeta - yyv3895.CodecDecodeSelf(d) + yyv3904 := &x.ObjectMeta + yyv3904.CodecDecodeSelf(d) } case "spec": if r.TryDecodeAsNil() { x.Spec = LimitRangeSpec{} } else { - yyv3896 := &x.Spec - yyv3896.CodecDecodeSelf(d) + yyv3905 := &x.Spec + yyv3905.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3892) - } // end switch yys3892 - } // end for yyj3892 + z.DecStructFieldNotFound(-1, yys3901) + } // end switch yys3901 + } // end for yyj3901 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -48839,16 +48917,16 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3897 int - var yyb3897 bool - var yyhl3897 bool = l >= 0 - yyj3897++ - if yyhl3897 { - yyb3897 = yyj3897 > l + var yyj3906 int + var yyb3906 bool + var yyhl3906 bool = l >= 0 + yyj3906++ + if yyhl3906 { + yyb3906 = yyj3906 > l } else { - yyb3897 = r.CheckBreak() + yyb3906 = r.CheckBreak() } - if yyb3897 { + if yyb3906 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48858,13 +48936,13 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3897++ - if yyhl3897 { - yyb3897 = yyj3897 > l + yyj3906++ + if yyhl3906 { + yyb3906 = yyj3906 > l } else { - yyb3897 = r.CheckBreak() + yyb3906 = r.CheckBreak() } - if yyb3897 { + if yyb3906 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48874,13 +48952,13 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3897++ - if yyhl3897 { - yyb3897 = yyj3897 > l + yyj3906++ + if yyhl3906 { + yyb3906 = yyj3906 > l } else { - yyb3897 = r.CheckBreak() + yyb3906 = r.CheckBreak() } - if yyb3897 { + if yyb3906 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48888,16 +48966,16 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3900 := &x.ObjectMeta - yyv3900.CodecDecodeSelf(d) + yyv3909 := &x.ObjectMeta + yyv3909.CodecDecodeSelf(d) } - yyj3897++ - if yyhl3897 { - yyb3897 = yyj3897 > l + yyj3906++ + if yyhl3906 { + yyb3906 = yyj3906 > l } else { - yyb3897 = r.CheckBreak() + yyb3906 = r.CheckBreak() } - if yyb3897 { + if yyb3906 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48905,21 +48983,21 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = LimitRangeSpec{} } else { - yyv3901 := &x.Spec - yyv3901.CodecDecodeSelf(d) + yyv3910 := &x.Spec + yyv3910.CodecDecodeSelf(d) } for { - yyj3897++ - if yyhl3897 { - yyb3897 = yyj3897 > l + yyj3906++ + if yyhl3906 { + yyb3906 = yyj3906 > l } else { - yyb3897 = r.CheckBreak() + yyb3906 = r.CheckBreak() } - if yyb3897 { + if yyb3906 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3897-1, "") + z.DecStructFieldNotFound(yyj3906-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -48931,37 +49009,37 @@ func (x *LimitRangeList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3902 := z.EncBinary() - _ = yym3902 + yym3911 := z.EncBinary() + _ = yym3911 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3903 := !z.EncBinary() - yy2arr3903 := z.EncBasicHandle().StructToArray - var yyq3903 [4]bool - _, _, _ = yysep3903, yyq3903, yy2arr3903 - const yyr3903 bool = false - yyq3903[0] = x.Kind != "" - yyq3903[1] = x.APIVersion != "" - yyq3903[2] = true - var yynn3903 int - if yyr3903 || yy2arr3903 { + yysep3912 := !z.EncBinary() + yy2arr3912 := z.EncBasicHandle().StructToArray + var yyq3912 [4]bool + _, _, _ = yysep3912, yyq3912, yy2arr3912 + const yyr3912 bool = false + yyq3912[0] = x.Kind != "" + yyq3912[1] = x.APIVersion != "" + yyq3912[2] = true + var yynn3912 int + if yyr3912 || yy2arr3912 { r.EncodeArrayStart(4) } else { - yynn3903 = 1 - for _, b := range yyq3903 { + yynn3912 = 1 + for _, b := range yyq3912 { if b { - yynn3903++ + yynn3912++ } } - r.EncodeMapStart(yynn3903) - yynn3903 = 0 + r.EncodeMapStart(yynn3912) + yynn3912 = 0 } - if yyr3903 || yy2arr3903 { + if yyr3912 || yy2arr3912 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3903[0] { - yym3905 := z.EncBinary() - _ = yym3905 + if yyq3912[0] { + yym3914 := z.EncBinary() + _ = yym3914 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -48970,23 +49048,23 @@ func (x *LimitRangeList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3903[0] { + if yyq3912[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3906 := z.EncBinary() - _ = yym3906 + yym3915 := z.EncBinary() + _ = yym3915 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3903 || yy2arr3903 { + if yyr3912 || yy2arr3912 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3903[1] { - yym3908 := z.EncBinary() - _ = yym3908 + if yyq3912[1] { + yym3917 := z.EncBinary() + _ = yym3917 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -48995,54 +49073,54 @@ func (x *LimitRangeList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3903[1] { + if yyq3912[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3909 := z.EncBinary() - _ = yym3909 + yym3918 := z.EncBinary() + _ = yym3918 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3903 || yy2arr3903 { + if yyr3912 || yy2arr3912 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3903[2] { - yy3911 := &x.ListMeta - yym3912 := z.EncBinary() - _ = yym3912 + if yyq3912[2] { + yy3920 := &x.ListMeta + yym3921 := z.EncBinary() + _ = yym3921 if false { - } else if z.HasExtensions() && z.EncExt(yy3911) { + } else if z.HasExtensions() && z.EncExt(yy3920) { } else { - z.EncFallback(yy3911) + z.EncFallback(yy3920) } } else { r.EncodeNil() } } else { - if yyq3903[2] { + if yyq3912[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3913 := &x.ListMeta - yym3914 := z.EncBinary() - _ = yym3914 + yy3922 := &x.ListMeta + yym3923 := z.EncBinary() + _ = yym3923 if false { - } else if z.HasExtensions() && z.EncExt(yy3913) { + } else if z.HasExtensions() && z.EncExt(yy3922) { } else { - z.EncFallback(yy3913) + z.EncFallback(yy3922) } } } - if yyr3903 || yy2arr3903 { + if yyr3912 || yy2arr3912 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym3916 := z.EncBinary() - _ = yym3916 + yym3925 := z.EncBinary() + _ = yym3925 if false { } else { h.encSliceLimitRange(([]LimitRange)(x.Items), e) @@ -49055,15 +49133,15 @@ func (x *LimitRangeList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym3917 := z.EncBinary() - _ = yym3917 + yym3926 := z.EncBinary() + _ = yym3926 if false { } else { h.encSliceLimitRange(([]LimitRange)(x.Items), e) } } } - if yyr3903 || yy2arr3903 { + if yyr3912 || yy2arr3912 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -49076,25 +49154,25 @@ func (x *LimitRangeList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3918 := z.DecBinary() - _ = yym3918 + yym3927 := z.DecBinary() + _ = yym3927 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3919 := r.ContainerType() - if yyct3919 == codecSelferValueTypeMap1234 { - yyl3919 := r.ReadMapStart() - if yyl3919 == 0 { + yyct3928 := r.ContainerType() + if yyct3928 == codecSelferValueTypeMap1234 { + yyl3928 := r.ReadMapStart() + if yyl3928 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3919, d) + x.codecDecodeSelfFromMap(yyl3928, d) } - } else if yyct3919 == codecSelferValueTypeArray1234 { - yyl3919 := r.ReadArrayStart() - if yyl3919 == 0 { + } else if yyct3928 == codecSelferValueTypeArray1234 { + yyl3928 := r.ReadArrayStart() + if yyl3928 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3919, d) + x.codecDecodeSelfFromArray(yyl3928, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -49106,12 +49184,12 @@ func (x *LimitRangeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3920Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3920Slc - var yyhl3920 bool = l >= 0 - for yyj3920 := 0; ; yyj3920++ { - if yyhl3920 { - if yyj3920 >= l { + var yys3929Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3929Slc + var yyhl3929 bool = l >= 0 + for yyj3929 := 0; ; yyj3929++ { + if yyhl3929 { + if yyj3929 >= l { break } } else { @@ -49120,10 +49198,10 @@ func (x *LimitRangeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3920Slc = r.DecodeBytes(yys3920Slc, true, true) - yys3920 := string(yys3920Slc) + yys3929Slc = r.DecodeBytes(yys3929Slc, true, true) + yys3929 := string(yys3929Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3920 { + switch yys3929 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -49140,31 +49218,31 @@ func (x *LimitRangeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3923 := &x.ListMeta - yym3924 := z.DecBinary() - _ = yym3924 + yyv3932 := &x.ListMeta + yym3933 := z.DecBinary() + _ = yym3933 if false { - } else if z.HasExtensions() && z.DecExt(yyv3923) { + } else if z.HasExtensions() && z.DecExt(yyv3932) { } else { - z.DecFallback(yyv3923, false) + z.DecFallback(yyv3932, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3925 := &x.Items - yym3926 := z.DecBinary() - _ = yym3926 + yyv3934 := &x.Items + yym3935 := z.DecBinary() + _ = yym3935 if false { } else { - h.decSliceLimitRange((*[]LimitRange)(yyv3925), d) + h.decSliceLimitRange((*[]LimitRange)(yyv3934), d) } } default: - z.DecStructFieldNotFound(-1, yys3920) - } // end switch yys3920 - } // end for yyj3920 + z.DecStructFieldNotFound(-1, yys3929) + } // end switch yys3929 + } // end for yyj3929 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -49172,16 +49250,16 @@ func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3927 int - var yyb3927 bool - var yyhl3927 bool = l >= 0 - yyj3927++ - if yyhl3927 { - yyb3927 = yyj3927 > l + var yyj3936 int + var yyb3936 bool + var yyhl3936 bool = l >= 0 + yyj3936++ + if yyhl3936 { + yyb3936 = yyj3936 > l } else { - yyb3927 = r.CheckBreak() + yyb3936 = r.CheckBreak() } - if yyb3927 { + if yyb3936 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49191,13 +49269,13 @@ func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3927++ - if yyhl3927 { - yyb3927 = yyj3927 > l + yyj3936++ + if yyhl3936 { + yyb3936 = yyj3936 > l } else { - yyb3927 = r.CheckBreak() + yyb3936 = r.CheckBreak() } - if yyb3927 { + if yyb3936 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49207,13 +49285,13 @@ func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3927++ - if yyhl3927 { - yyb3927 = yyj3927 > l + yyj3936++ + if yyhl3936 { + yyb3936 = yyj3936 > l } else { - yyb3927 = r.CheckBreak() + yyb3936 = r.CheckBreak() } - if yyb3927 { + if yyb3936 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49221,22 +49299,22 @@ func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3930 := &x.ListMeta - yym3931 := z.DecBinary() - _ = yym3931 + yyv3939 := &x.ListMeta + yym3940 := z.DecBinary() + _ = yym3940 if false { - } else if z.HasExtensions() && z.DecExt(yyv3930) { + } else if z.HasExtensions() && z.DecExt(yyv3939) { } else { - z.DecFallback(yyv3930, false) + z.DecFallback(yyv3939, false) } } - yyj3927++ - if yyhl3927 { - yyb3927 = yyj3927 > l + yyj3936++ + if yyhl3936 { + yyb3936 = yyj3936 > l } else { - yyb3927 = r.CheckBreak() + yyb3936 = r.CheckBreak() } - if yyb3927 { + if yyb3936 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49244,26 +49322,26 @@ func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3932 := &x.Items - yym3933 := z.DecBinary() - _ = yym3933 + yyv3941 := &x.Items + yym3942 := z.DecBinary() + _ = yym3942 if false { } else { - h.decSliceLimitRange((*[]LimitRange)(yyv3932), d) + h.decSliceLimitRange((*[]LimitRange)(yyv3941), d) } } for { - yyj3927++ - if yyhl3927 { - yyb3927 = yyj3927 > l + yyj3936++ + if yyhl3936 { + yyb3936 = yyj3936 > l } else { - yyb3927 = r.CheckBreak() + yyb3936 = r.CheckBreak() } - if yyb3927 { + if yyb3936 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3927-1, "") + z.DecStructFieldNotFound(yyj3936-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -49272,8 +49350,8 @@ func (x ResourceQuotaScope) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym3934 := z.EncBinary() - _ = yym3934 + yym3943 := z.EncBinary() + _ = yym3943 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -49285,8 +49363,8 @@ func (x *ResourceQuotaScope) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3935 := z.DecBinary() - _ = yym3935 + yym3944 := z.DecBinary() + _ = yym3944 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -49301,34 +49379,34 @@ func (x *ResourceQuotaSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3936 := z.EncBinary() - _ = yym3936 + yym3945 := z.EncBinary() + _ = yym3945 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3937 := !z.EncBinary() - yy2arr3937 := z.EncBasicHandle().StructToArray - var yyq3937 [2]bool - _, _, _ = yysep3937, yyq3937, yy2arr3937 - const yyr3937 bool = false - yyq3937[0] = len(x.Hard) != 0 - yyq3937[1] = len(x.Scopes) != 0 - var yynn3937 int - if yyr3937 || yy2arr3937 { + yysep3946 := !z.EncBinary() + yy2arr3946 := z.EncBasicHandle().StructToArray + var yyq3946 [2]bool + _, _, _ = yysep3946, yyq3946, yy2arr3946 + const yyr3946 bool = false + yyq3946[0] = len(x.Hard) != 0 + yyq3946[1] = len(x.Scopes) != 0 + var yynn3946 int + if yyr3946 || yy2arr3946 { r.EncodeArrayStart(2) } else { - yynn3937 = 0 - for _, b := range yyq3937 { + yynn3946 = 0 + for _, b := range yyq3946 { if b { - yynn3937++ + yynn3946++ } } - r.EncodeMapStart(yynn3937) - yynn3937 = 0 + r.EncodeMapStart(yynn3946) + yynn3946 = 0 } - if yyr3937 || yy2arr3937 { + if yyr3946 || yy2arr3946 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3937[0] { + if yyq3946[0] { if x.Hard == nil { r.EncodeNil() } else { @@ -49338,7 +49416,7 @@ func (x *ResourceQuotaSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3937[0] { + if yyq3946[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hard")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -49349,14 +49427,14 @@ func (x *ResourceQuotaSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3937 || yy2arr3937 { + if yyr3946 || yy2arr3946 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3937[1] { + if yyq3946[1] { if x.Scopes == nil { r.EncodeNil() } else { - yym3940 := z.EncBinary() - _ = yym3940 + yym3949 := z.EncBinary() + _ = yym3949 if false { } else { h.encSliceResourceQuotaScope(([]ResourceQuotaScope)(x.Scopes), e) @@ -49366,15 +49444,15 @@ func (x *ResourceQuotaSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3937[1] { + if yyq3946[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("scopes")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Scopes == nil { r.EncodeNil() } else { - yym3941 := z.EncBinary() - _ = yym3941 + yym3950 := z.EncBinary() + _ = yym3950 if false { } else { h.encSliceResourceQuotaScope(([]ResourceQuotaScope)(x.Scopes), e) @@ -49382,7 +49460,7 @@ func (x *ResourceQuotaSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3937 || yy2arr3937 { + if yyr3946 || yy2arr3946 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -49395,25 +49473,25 @@ func (x *ResourceQuotaSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3942 := z.DecBinary() - _ = yym3942 + yym3951 := z.DecBinary() + _ = yym3951 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3943 := r.ContainerType() - if yyct3943 == codecSelferValueTypeMap1234 { - yyl3943 := r.ReadMapStart() - if yyl3943 == 0 { + yyct3952 := r.ContainerType() + if yyct3952 == codecSelferValueTypeMap1234 { + yyl3952 := r.ReadMapStart() + if yyl3952 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3943, d) + x.codecDecodeSelfFromMap(yyl3952, d) } - } else if yyct3943 == codecSelferValueTypeArray1234 { - yyl3943 := r.ReadArrayStart() - if yyl3943 == 0 { + } else if yyct3952 == codecSelferValueTypeArray1234 { + yyl3952 := r.ReadArrayStart() + if yyl3952 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3943, d) + x.codecDecodeSelfFromArray(yyl3952, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -49425,12 +49503,12 @@ func (x *ResourceQuotaSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3944Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3944Slc - var yyhl3944 bool = l >= 0 - for yyj3944 := 0; ; yyj3944++ { - if yyhl3944 { - if yyj3944 >= l { + var yys3953Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3953Slc + var yyhl3953 bool = l >= 0 + for yyj3953 := 0; ; yyj3953++ { + if yyhl3953 { + if yyj3953 >= l { break } } else { @@ -49439,33 +49517,33 @@ func (x *ResourceQuotaSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3944Slc = r.DecodeBytes(yys3944Slc, true, true) - yys3944 := string(yys3944Slc) + yys3953Slc = r.DecodeBytes(yys3953Slc, true, true) + yys3953 := string(yys3953Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3944 { + switch yys3953 { case "hard": if r.TryDecodeAsNil() { x.Hard = nil } else { - yyv3945 := &x.Hard - yyv3945.CodecDecodeSelf(d) + yyv3954 := &x.Hard + yyv3954.CodecDecodeSelf(d) } case "scopes": if r.TryDecodeAsNil() { x.Scopes = nil } else { - yyv3946 := &x.Scopes - yym3947 := z.DecBinary() - _ = yym3947 + yyv3955 := &x.Scopes + yym3956 := z.DecBinary() + _ = yym3956 if false { } else { - h.decSliceResourceQuotaScope((*[]ResourceQuotaScope)(yyv3946), d) + h.decSliceResourceQuotaScope((*[]ResourceQuotaScope)(yyv3955), d) } } default: - z.DecStructFieldNotFound(-1, yys3944) - } // end switch yys3944 - } // end for yyj3944 + z.DecStructFieldNotFound(-1, yys3953) + } // end switch yys3953 + } // end for yyj3953 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -49473,16 +49551,16 @@ func (x *ResourceQuotaSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3948 int - var yyb3948 bool - var yyhl3948 bool = l >= 0 - yyj3948++ - if yyhl3948 { - yyb3948 = yyj3948 > l + var yyj3957 int + var yyb3957 bool + var yyhl3957 bool = l >= 0 + yyj3957++ + if yyhl3957 { + yyb3957 = yyj3957 > l } else { - yyb3948 = r.CheckBreak() + yyb3957 = r.CheckBreak() } - if yyb3948 { + if yyb3957 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49490,16 +49568,16 @@ func (x *ResourceQuotaSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Hard = nil } else { - yyv3949 := &x.Hard - yyv3949.CodecDecodeSelf(d) + yyv3958 := &x.Hard + yyv3958.CodecDecodeSelf(d) } - yyj3948++ - if yyhl3948 { - yyb3948 = yyj3948 > l + yyj3957++ + if yyhl3957 { + yyb3957 = yyj3957 > l } else { - yyb3948 = r.CheckBreak() + yyb3957 = r.CheckBreak() } - if yyb3948 { + if yyb3957 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49507,26 +49585,26 @@ func (x *ResourceQuotaSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Scopes = nil } else { - yyv3950 := &x.Scopes - yym3951 := z.DecBinary() - _ = yym3951 + yyv3959 := &x.Scopes + yym3960 := z.DecBinary() + _ = yym3960 if false { } else { - h.decSliceResourceQuotaScope((*[]ResourceQuotaScope)(yyv3950), d) + h.decSliceResourceQuotaScope((*[]ResourceQuotaScope)(yyv3959), d) } } for { - yyj3948++ - if yyhl3948 { - yyb3948 = yyj3948 > l + yyj3957++ + if yyhl3957 { + yyb3957 = yyj3957 > l } else { - yyb3948 = r.CheckBreak() + yyb3957 = r.CheckBreak() } - if yyb3948 { + if yyb3957 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3948-1, "") + z.DecStructFieldNotFound(yyj3957-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -49538,34 +49616,34 @@ func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3952 := z.EncBinary() - _ = yym3952 + yym3961 := z.EncBinary() + _ = yym3961 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3953 := !z.EncBinary() - yy2arr3953 := z.EncBasicHandle().StructToArray - var yyq3953 [2]bool - _, _, _ = yysep3953, yyq3953, yy2arr3953 - const yyr3953 bool = false - yyq3953[0] = len(x.Hard) != 0 - yyq3953[1] = len(x.Used) != 0 - var yynn3953 int - if yyr3953 || yy2arr3953 { + yysep3962 := !z.EncBinary() + yy2arr3962 := z.EncBasicHandle().StructToArray + var yyq3962 [2]bool + _, _, _ = yysep3962, yyq3962, yy2arr3962 + const yyr3962 bool = false + yyq3962[0] = len(x.Hard) != 0 + yyq3962[1] = len(x.Used) != 0 + var yynn3962 int + if yyr3962 || yy2arr3962 { r.EncodeArrayStart(2) } else { - yynn3953 = 0 - for _, b := range yyq3953 { + yynn3962 = 0 + for _, b := range yyq3962 { if b { - yynn3953++ + yynn3962++ } } - r.EncodeMapStart(yynn3953) - yynn3953 = 0 + r.EncodeMapStart(yynn3962) + yynn3962 = 0 } - if yyr3953 || yy2arr3953 { + if yyr3962 || yy2arr3962 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3953[0] { + if yyq3962[0] { if x.Hard == nil { r.EncodeNil() } else { @@ -49575,7 +49653,7 @@ func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3953[0] { + if yyq3962[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hard")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -49586,9 +49664,9 @@ func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3953 || yy2arr3953 { + if yyr3962 || yy2arr3962 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3953[1] { + if yyq3962[1] { if x.Used == nil { r.EncodeNil() } else { @@ -49598,7 +49676,7 @@ func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3953[1] { + if yyq3962[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("used")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -49609,7 +49687,7 @@ func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3953 || yy2arr3953 { + if yyr3962 || yy2arr3962 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -49622,25 +49700,25 @@ func (x *ResourceQuotaStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3956 := z.DecBinary() - _ = yym3956 + yym3965 := z.DecBinary() + _ = yym3965 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3957 := r.ContainerType() - if yyct3957 == codecSelferValueTypeMap1234 { - yyl3957 := r.ReadMapStart() - if yyl3957 == 0 { + yyct3966 := r.ContainerType() + if yyct3966 == codecSelferValueTypeMap1234 { + yyl3966 := r.ReadMapStart() + if yyl3966 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3957, d) + x.codecDecodeSelfFromMap(yyl3966, d) } - } else if yyct3957 == codecSelferValueTypeArray1234 { - yyl3957 := r.ReadArrayStart() - if yyl3957 == 0 { + } else if yyct3966 == codecSelferValueTypeArray1234 { + yyl3966 := r.ReadArrayStart() + if yyl3966 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3957, d) + x.codecDecodeSelfFromArray(yyl3966, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -49652,12 +49730,12 @@ func (x *ResourceQuotaStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3958Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3958Slc - var yyhl3958 bool = l >= 0 - for yyj3958 := 0; ; yyj3958++ { - if yyhl3958 { - if yyj3958 >= l { + var yys3967Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3967Slc + var yyhl3967 bool = l >= 0 + for yyj3967 := 0; ; yyj3967++ { + if yyhl3967 { + if yyj3967 >= l { break } } else { @@ -49666,28 +49744,28 @@ func (x *ResourceQuotaStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3958Slc = r.DecodeBytes(yys3958Slc, true, true) - yys3958 := string(yys3958Slc) + yys3967Slc = r.DecodeBytes(yys3967Slc, true, true) + yys3967 := string(yys3967Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3958 { + switch yys3967 { case "hard": if r.TryDecodeAsNil() { x.Hard = nil } else { - yyv3959 := &x.Hard - yyv3959.CodecDecodeSelf(d) + yyv3968 := &x.Hard + yyv3968.CodecDecodeSelf(d) } case "used": if r.TryDecodeAsNil() { x.Used = nil } else { - yyv3960 := &x.Used - yyv3960.CodecDecodeSelf(d) + yyv3969 := &x.Used + yyv3969.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3958) - } // end switch yys3958 - } // end for yyj3958 + z.DecStructFieldNotFound(-1, yys3967) + } // end switch yys3967 + } // end for yyj3967 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -49695,16 +49773,16 @@ func (x *ResourceQuotaStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3961 int - var yyb3961 bool - var yyhl3961 bool = l >= 0 - yyj3961++ - if yyhl3961 { - yyb3961 = yyj3961 > l + var yyj3970 int + var yyb3970 bool + var yyhl3970 bool = l >= 0 + yyj3970++ + if yyhl3970 { + yyb3970 = yyj3970 > l } else { - yyb3961 = r.CheckBreak() + yyb3970 = r.CheckBreak() } - if yyb3961 { + if yyb3970 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49712,16 +49790,16 @@ func (x *ResourceQuotaStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Hard = nil } else { - yyv3962 := &x.Hard - yyv3962.CodecDecodeSelf(d) + yyv3971 := &x.Hard + yyv3971.CodecDecodeSelf(d) } - yyj3961++ - if yyhl3961 { - yyb3961 = yyj3961 > l + yyj3970++ + if yyhl3970 { + yyb3970 = yyj3970 > l } else { - yyb3961 = r.CheckBreak() + yyb3970 = r.CheckBreak() } - if yyb3961 { + if yyb3970 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49729,21 +49807,21 @@ func (x *ResourceQuotaStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Used = nil } else { - yyv3963 := &x.Used - yyv3963.CodecDecodeSelf(d) + yyv3972 := &x.Used + yyv3972.CodecDecodeSelf(d) } for { - yyj3961++ - if yyhl3961 { - yyb3961 = yyj3961 > l + yyj3970++ + if yyhl3970 { + yyb3970 = yyj3970 > l } else { - yyb3961 = r.CheckBreak() + yyb3970 = r.CheckBreak() } - if yyb3961 { + if yyb3970 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3961-1, "") + z.DecStructFieldNotFound(yyj3970-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -49755,39 +49833,39 @@ func (x *ResourceQuota) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3964 := z.EncBinary() - _ = yym3964 + yym3973 := z.EncBinary() + _ = yym3973 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3965 := !z.EncBinary() - yy2arr3965 := z.EncBasicHandle().StructToArray - var yyq3965 [5]bool - _, _, _ = yysep3965, yyq3965, yy2arr3965 - const yyr3965 bool = false - yyq3965[0] = x.Kind != "" - yyq3965[1] = x.APIVersion != "" - yyq3965[2] = true - yyq3965[3] = true - yyq3965[4] = true - var yynn3965 int - if yyr3965 || yy2arr3965 { + yysep3974 := !z.EncBinary() + yy2arr3974 := z.EncBasicHandle().StructToArray + var yyq3974 [5]bool + _, _, _ = yysep3974, yyq3974, yy2arr3974 + const yyr3974 bool = false + yyq3974[0] = x.Kind != "" + yyq3974[1] = x.APIVersion != "" + yyq3974[2] = true + yyq3974[3] = true + yyq3974[4] = true + var yynn3974 int + if yyr3974 || yy2arr3974 { r.EncodeArrayStart(5) } else { - yynn3965 = 0 - for _, b := range yyq3965 { + yynn3974 = 0 + for _, b := range yyq3974 { if b { - yynn3965++ + yynn3974++ } } - r.EncodeMapStart(yynn3965) - yynn3965 = 0 + r.EncodeMapStart(yynn3974) + yynn3974 = 0 } - if yyr3965 || yy2arr3965 { + if yyr3974 || yy2arr3974 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3965[0] { - yym3967 := z.EncBinary() - _ = yym3967 + if yyq3974[0] { + yym3976 := z.EncBinary() + _ = yym3976 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -49796,23 +49874,23 @@ func (x *ResourceQuota) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3965[0] { + if yyq3974[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3968 := z.EncBinary() - _ = yym3968 + yym3977 := z.EncBinary() + _ = yym3977 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3965 || yy2arr3965 { + if yyr3974 || yy2arr3974 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3965[1] { - yym3970 := z.EncBinary() - _ = yym3970 + if yyq3974[1] { + yym3979 := z.EncBinary() + _ = yym3979 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -49821,70 +49899,70 @@ func (x *ResourceQuota) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3965[1] { + if yyq3974[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3971 := z.EncBinary() - _ = yym3971 + yym3980 := z.EncBinary() + _ = yym3980 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3965 || yy2arr3965 { + if yyr3974 || yy2arr3974 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3965[2] { - yy3973 := &x.ObjectMeta - yy3973.CodecEncodeSelf(e) + if yyq3974[2] { + yy3982 := &x.ObjectMeta + yy3982.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3965[2] { + if yyq3974[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3974 := &x.ObjectMeta - yy3974.CodecEncodeSelf(e) + yy3983 := &x.ObjectMeta + yy3983.CodecEncodeSelf(e) } } - if yyr3965 || yy2arr3965 { + if yyr3974 || yy2arr3974 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3965[3] { - yy3976 := &x.Spec - yy3976.CodecEncodeSelf(e) + if yyq3974[3] { + yy3985 := &x.Spec + yy3985.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3965[3] { + if yyq3974[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3977 := &x.Spec - yy3977.CodecEncodeSelf(e) + yy3986 := &x.Spec + yy3986.CodecEncodeSelf(e) } } - if yyr3965 || yy2arr3965 { + if yyr3974 || yy2arr3974 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3965[4] { - yy3979 := &x.Status - yy3979.CodecEncodeSelf(e) + if yyq3974[4] { + yy3988 := &x.Status + yy3988.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3965[4] { + if yyq3974[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3980 := &x.Status - yy3980.CodecEncodeSelf(e) + yy3989 := &x.Status + yy3989.CodecEncodeSelf(e) } } - if yyr3965 || yy2arr3965 { + if yyr3974 || yy2arr3974 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -49897,25 +49975,25 @@ func (x *ResourceQuota) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3981 := z.DecBinary() - _ = yym3981 + yym3990 := z.DecBinary() + _ = yym3990 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3982 := r.ContainerType() - if yyct3982 == codecSelferValueTypeMap1234 { - yyl3982 := r.ReadMapStart() - if yyl3982 == 0 { + yyct3991 := r.ContainerType() + if yyct3991 == codecSelferValueTypeMap1234 { + yyl3991 := r.ReadMapStart() + if yyl3991 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3982, d) + x.codecDecodeSelfFromMap(yyl3991, d) } - } else if yyct3982 == codecSelferValueTypeArray1234 { - yyl3982 := r.ReadArrayStart() - if yyl3982 == 0 { + } else if yyct3991 == codecSelferValueTypeArray1234 { + yyl3991 := r.ReadArrayStart() + if yyl3991 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3982, d) + x.codecDecodeSelfFromArray(yyl3991, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -49927,12 +50005,12 @@ func (x *ResourceQuota) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3983Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3983Slc - var yyhl3983 bool = l >= 0 - for yyj3983 := 0; ; yyj3983++ { - if yyhl3983 { - if yyj3983 >= l { + var yys3992Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3992Slc + var yyhl3992 bool = l >= 0 + for yyj3992 := 0; ; yyj3992++ { + if yyhl3992 { + if yyj3992 >= l { break } } else { @@ -49941,10 +50019,10 @@ func (x *ResourceQuota) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3983Slc = r.DecodeBytes(yys3983Slc, true, true) - yys3983 := string(yys3983Slc) + yys3992Slc = r.DecodeBytes(yys3992Slc, true, true) + yys3992 := string(yys3992Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3983 { + switch yys3992 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -49961,27 +50039,27 @@ func (x *ResourceQuota) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3986 := &x.ObjectMeta - yyv3986.CodecDecodeSelf(d) + yyv3995 := &x.ObjectMeta + yyv3995.CodecDecodeSelf(d) } case "spec": if r.TryDecodeAsNil() { x.Spec = ResourceQuotaSpec{} } else { - yyv3987 := &x.Spec - yyv3987.CodecDecodeSelf(d) + yyv3996 := &x.Spec + yyv3996.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ResourceQuotaStatus{} } else { - yyv3988 := &x.Status - yyv3988.CodecDecodeSelf(d) + yyv3997 := &x.Status + yyv3997.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3983) - } // end switch yys3983 - } // end for yyj3983 + z.DecStructFieldNotFound(-1, yys3992) + } // end switch yys3992 + } // end for yyj3992 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -49989,16 +50067,16 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3989 int - var yyb3989 bool - var yyhl3989 bool = l >= 0 - yyj3989++ - if yyhl3989 { - yyb3989 = yyj3989 > l + var yyj3998 int + var yyb3998 bool + var yyhl3998 bool = l >= 0 + yyj3998++ + if yyhl3998 { + yyb3998 = yyj3998 > l } else { - yyb3989 = r.CheckBreak() + yyb3998 = r.CheckBreak() } - if yyb3989 { + if yyb3998 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50008,13 +50086,13 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3989++ - if yyhl3989 { - yyb3989 = yyj3989 > l + yyj3998++ + if yyhl3998 { + yyb3998 = yyj3998 > l } else { - yyb3989 = r.CheckBreak() + yyb3998 = r.CheckBreak() } - if yyb3989 { + if yyb3998 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50024,13 +50102,13 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3989++ - if yyhl3989 { - yyb3989 = yyj3989 > l + yyj3998++ + if yyhl3998 { + yyb3998 = yyj3998 > l } else { - yyb3989 = r.CheckBreak() + yyb3998 = r.CheckBreak() } - if yyb3989 { + if yyb3998 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50038,16 +50116,16 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3992 := &x.ObjectMeta - yyv3992.CodecDecodeSelf(d) + yyv4001 := &x.ObjectMeta + yyv4001.CodecDecodeSelf(d) } - yyj3989++ - if yyhl3989 { - yyb3989 = yyj3989 > l + yyj3998++ + if yyhl3998 { + yyb3998 = yyj3998 > l } else { - yyb3989 = r.CheckBreak() + yyb3998 = r.CheckBreak() } - if yyb3989 { + if yyb3998 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50055,16 +50133,16 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ResourceQuotaSpec{} } else { - yyv3993 := &x.Spec - yyv3993.CodecDecodeSelf(d) + yyv4002 := &x.Spec + yyv4002.CodecDecodeSelf(d) } - yyj3989++ - if yyhl3989 { - yyb3989 = yyj3989 > l + yyj3998++ + if yyhl3998 { + yyb3998 = yyj3998 > l } else { - yyb3989 = r.CheckBreak() + yyb3998 = r.CheckBreak() } - if yyb3989 { + if yyb3998 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50072,21 +50150,21 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ResourceQuotaStatus{} } else { - yyv3994 := &x.Status - yyv3994.CodecDecodeSelf(d) + yyv4003 := &x.Status + yyv4003.CodecDecodeSelf(d) } for { - yyj3989++ - if yyhl3989 { - yyb3989 = yyj3989 > l + yyj3998++ + if yyhl3998 { + yyb3998 = yyj3998 > l } else { - yyb3989 = r.CheckBreak() + yyb3998 = r.CheckBreak() } - if yyb3989 { + if yyb3998 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3989-1, "") + z.DecStructFieldNotFound(yyj3998-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -50098,37 +50176,37 @@ func (x *ResourceQuotaList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3995 := z.EncBinary() - _ = yym3995 + yym4004 := z.EncBinary() + _ = yym4004 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3996 := !z.EncBinary() - yy2arr3996 := z.EncBasicHandle().StructToArray - var yyq3996 [4]bool - _, _, _ = yysep3996, yyq3996, yy2arr3996 - const yyr3996 bool = false - yyq3996[0] = x.Kind != "" - yyq3996[1] = x.APIVersion != "" - yyq3996[2] = true - var yynn3996 int - if yyr3996 || yy2arr3996 { + yysep4005 := !z.EncBinary() + yy2arr4005 := z.EncBasicHandle().StructToArray + var yyq4005 [4]bool + _, _, _ = yysep4005, yyq4005, yy2arr4005 + const yyr4005 bool = false + yyq4005[0] = x.Kind != "" + yyq4005[1] = x.APIVersion != "" + yyq4005[2] = true + var yynn4005 int + if yyr4005 || yy2arr4005 { r.EncodeArrayStart(4) } else { - yynn3996 = 1 - for _, b := range yyq3996 { + yynn4005 = 1 + for _, b := range yyq4005 { if b { - yynn3996++ + yynn4005++ } } - r.EncodeMapStart(yynn3996) - yynn3996 = 0 + r.EncodeMapStart(yynn4005) + yynn4005 = 0 } - if yyr3996 || yy2arr3996 { + if yyr4005 || yy2arr4005 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3996[0] { - yym3998 := z.EncBinary() - _ = yym3998 + if yyq4005[0] { + yym4007 := z.EncBinary() + _ = yym4007 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -50137,23 +50215,23 @@ func (x *ResourceQuotaList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3996[0] { + if yyq4005[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3999 := z.EncBinary() - _ = yym3999 + yym4008 := z.EncBinary() + _ = yym4008 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3996 || yy2arr3996 { + if yyr4005 || yy2arr4005 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3996[1] { - yym4001 := z.EncBinary() - _ = yym4001 + if yyq4005[1] { + yym4010 := z.EncBinary() + _ = yym4010 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -50162,54 +50240,54 @@ func (x *ResourceQuotaList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3996[1] { + if yyq4005[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4002 := z.EncBinary() - _ = yym4002 + yym4011 := z.EncBinary() + _ = yym4011 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3996 || yy2arr3996 { + if yyr4005 || yy2arr4005 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3996[2] { - yy4004 := &x.ListMeta - yym4005 := z.EncBinary() - _ = yym4005 + if yyq4005[2] { + yy4013 := &x.ListMeta + yym4014 := z.EncBinary() + _ = yym4014 if false { - } else if z.HasExtensions() && z.EncExt(yy4004) { + } else if z.HasExtensions() && z.EncExt(yy4013) { } else { - z.EncFallback(yy4004) + z.EncFallback(yy4013) } } else { r.EncodeNil() } } else { - if yyq3996[2] { + if yyq4005[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4006 := &x.ListMeta - yym4007 := z.EncBinary() - _ = yym4007 + yy4015 := &x.ListMeta + yym4016 := z.EncBinary() + _ = yym4016 if false { - } else if z.HasExtensions() && z.EncExt(yy4006) { + } else if z.HasExtensions() && z.EncExt(yy4015) { } else { - z.EncFallback(yy4006) + z.EncFallback(yy4015) } } } - if yyr3996 || yy2arr3996 { + if yyr4005 || yy2arr4005 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym4009 := z.EncBinary() - _ = yym4009 + yym4018 := z.EncBinary() + _ = yym4018 if false { } else { h.encSliceResourceQuota(([]ResourceQuota)(x.Items), e) @@ -50222,15 +50300,15 @@ func (x *ResourceQuotaList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym4010 := z.EncBinary() - _ = yym4010 + yym4019 := z.EncBinary() + _ = yym4019 if false { } else { h.encSliceResourceQuota(([]ResourceQuota)(x.Items), e) } } } - if yyr3996 || yy2arr3996 { + if yyr4005 || yy2arr4005 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -50243,25 +50321,25 @@ func (x *ResourceQuotaList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4011 := z.DecBinary() - _ = yym4011 + yym4020 := z.DecBinary() + _ = yym4020 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4012 := r.ContainerType() - if yyct4012 == codecSelferValueTypeMap1234 { - yyl4012 := r.ReadMapStart() - if yyl4012 == 0 { + yyct4021 := r.ContainerType() + if yyct4021 == codecSelferValueTypeMap1234 { + yyl4021 := r.ReadMapStart() + if yyl4021 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4012, d) + x.codecDecodeSelfFromMap(yyl4021, d) } - } else if yyct4012 == codecSelferValueTypeArray1234 { - yyl4012 := r.ReadArrayStart() - if yyl4012 == 0 { + } else if yyct4021 == codecSelferValueTypeArray1234 { + yyl4021 := r.ReadArrayStart() + if yyl4021 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4012, d) + x.codecDecodeSelfFromArray(yyl4021, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -50273,12 +50351,12 @@ func (x *ResourceQuotaList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4013Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4013Slc - var yyhl4013 bool = l >= 0 - for yyj4013 := 0; ; yyj4013++ { - if yyhl4013 { - if yyj4013 >= l { + var yys4022Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys4022Slc + var yyhl4022 bool = l >= 0 + for yyj4022 := 0; ; yyj4022++ { + if yyhl4022 { + if yyj4022 >= l { break } } else { @@ -50287,10 +50365,10 @@ func (x *ResourceQuotaList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4013Slc = r.DecodeBytes(yys4013Slc, true, true) - yys4013 := string(yys4013Slc) + yys4022Slc = r.DecodeBytes(yys4022Slc, true, true) + yys4022 := string(yys4022Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4013 { + switch yys4022 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -50307,31 +50385,31 @@ func (x *ResourceQuotaList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv4016 := &x.ListMeta - yym4017 := z.DecBinary() - _ = yym4017 + yyv4025 := &x.ListMeta + yym4026 := z.DecBinary() + _ = yym4026 if false { - } else if z.HasExtensions() && z.DecExt(yyv4016) { + } else if z.HasExtensions() && z.DecExt(yyv4025) { } else { - z.DecFallback(yyv4016, false) + z.DecFallback(yyv4025, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4018 := &x.Items - yym4019 := z.DecBinary() - _ = yym4019 + yyv4027 := &x.Items + yym4028 := z.DecBinary() + _ = yym4028 if false { } else { - h.decSliceResourceQuota((*[]ResourceQuota)(yyv4018), d) + h.decSliceResourceQuota((*[]ResourceQuota)(yyv4027), d) } } default: - z.DecStructFieldNotFound(-1, yys4013) - } // end switch yys4013 - } // end for yyj4013 + z.DecStructFieldNotFound(-1, yys4022) + } // end switch yys4022 + } // end for yyj4022 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -50339,16 +50417,16 @@ func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4020 int - var yyb4020 bool - var yyhl4020 bool = l >= 0 - yyj4020++ - if yyhl4020 { - yyb4020 = yyj4020 > l + var yyj4029 int + var yyb4029 bool + var yyhl4029 bool = l >= 0 + yyj4029++ + if yyhl4029 { + yyb4029 = yyj4029 > l } else { - yyb4020 = r.CheckBreak() + yyb4029 = r.CheckBreak() } - if yyb4020 { + if yyb4029 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50358,13 +50436,13 @@ func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder } else { x.Kind = string(r.DecodeString()) } - yyj4020++ - if yyhl4020 { - yyb4020 = yyj4020 > l + yyj4029++ + if yyhl4029 { + yyb4029 = yyj4029 > l } else { - yyb4020 = r.CheckBreak() + yyb4029 = r.CheckBreak() } - if yyb4020 { + if yyb4029 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50374,13 +50452,13 @@ func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder } else { x.APIVersion = string(r.DecodeString()) } - yyj4020++ - if yyhl4020 { - yyb4020 = yyj4020 > l + yyj4029++ + if yyhl4029 { + yyb4029 = yyj4029 > l } else { - yyb4020 = r.CheckBreak() + yyb4029 = r.CheckBreak() } - if yyb4020 { + if yyb4029 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50388,22 +50466,22 @@ func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv4023 := &x.ListMeta - yym4024 := z.DecBinary() - _ = yym4024 + yyv4032 := &x.ListMeta + yym4033 := z.DecBinary() + _ = yym4033 if false { - } else if z.HasExtensions() && z.DecExt(yyv4023) { + } else if z.HasExtensions() && z.DecExt(yyv4032) { } else { - z.DecFallback(yyv4023, false) + z.DecFallback(yyv4032, false) } } - yyj4020++ - if yyhl4020 { - yyb4020 = yyj4020 > l + yyj4029++ + if yyhl4029 { + yyb4029 = yyj4029 > l } else { - yyb4020 = r.CheckBreak() + yyb4029 = r.CheckBreak() } - if yyb4020 { + if yyb4029 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50411,26 +50489,26 @@ func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4025 := &x.Items - yym4026 := z.DecBinary() - _ = yym4026 + yyv4034 := &x.Items + yym4035 := z.DecBinary() + _ = yym4035 if false { } else { - h.decSliceResourceQuota((*[]ResourceQuota)(yyv4025), d) + h.decSliceResourceQuota((*[]ResourceQuota)(yyv4034), d) } } for { - yyj4020++ - if yyhl4020 { - yyb4020 = yyj4020 > l + yyj4029++ + if yyhl4029 { + yyb4029 = yyj4029 > l } else { - yyb4020 = r.CheckBreak() + yyb4029 = r.CheckBreak() } - if yyb4020 { + if yyb4029 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4020-1, "") + z.DecStructFieldNotFound(yyj4029-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -50442,39 +50520,39 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4027 := z.EncBinary() - _ = yym4027 + yym4036 := z.EncBinary() + _ = yym4036 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4028 := !z.EncBinary() - yy2arr4028 := z.EncBasicHandle().StructToArray - var yyq4028 [5]bool - _, _, _ = yysep4028, yyq4028, yy2arr4028 - const yyr4028 bool = false - yyq4028[0] = x.Kind != "" - yyq4028[1] = x.APIVersion != "" - yyq4028[2] = true - yyq4028[3] = len(x.Data) != 0 - yyq4028[4] = x.Type != "" - var yynn4028 int - if yyr4028 || yy2arr4028 { + yysep4037 := !z.EncBinary() + yy2arr4037 := z.EncBasicHandle().StructToArray + var yyq4037 [5]bool + _, _, _ = yysep4037, yyq4037, yy2arr4037 + const yyr4037 bool = false + yyq4037[0] = x.Kind != "" + yyq4037[1] = x.APIVersion != "" + yyq4037[2] = true + yyq4037[3] = len(x.Data) != 0 + yyq4037[4] = x.Type != "" + var yynn4037 int + if yyr4037 || yy2arr4037 { r.EncodeArrayStart(5) } else { - yynn4028 = 0 - for _, b := range yyq4028 { + yynn4037 = 0 + for _, b := range yyq4037 { if b { - yynn4028++ + yynn4037++ } } - r.EncodeMapStart(yynn4028) - yynn4028 = 0 + r.EncodeMapStart(yynn4037) + yynn4037 = 0 } - if yyr4028 || yy2arr4028 { + if yyr4037 || yy2arr4037 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4028[0] { - yym4030 := z.EncBinary() - _ = yym4030 + if yyq4037[0] { + yym4039 := z.EncBinary() + _ = yym4039 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -50483,23 +50561,23 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4028[0] { + if yyq4037[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4031 := z.EncBinary() - _ = yym4031 + yym4040 := z.EncBinary() + _ = yym4040 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr4028 || yy2arr4028 { + if yyr4037 || yy2arr4037 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4028[1] { - yym4033 := z.EncBinary() - _ = yym4033 + if yyq4037[1] { + yym4042 := z.EncBinary() + _ = yym4042 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -50508,43 +50586,43 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4028[1] { + if yyq4037[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4034 := z.EncBinary() - _ = yym4034 + yym4043 := z.EncBinary() + _ = yym4043 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr4028 || yy2arr4028 { + if yyr4037 || yy2arr4037 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4028[2] { - yy4036 := &x.ObjectMeta - yy4036.CodecEncodeSelf(e) + if yyq4037[2] { + yy4045 := &x.ObjectMeta + yy4045.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq4028[2] { + if yyq4037[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4037 := &x.ObjectMeta - yy4037.CodecEncodeSelf(e) + yy4046 := &x.ObjectMeta + yy4046.CodecEncodeSelf(e) } } - if yyr4028 || yy2arr4028 { + if yyr4037 || yy2arr4037 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4028[3] { + if yyq4037[3] { if x.Data == nil { r.EncodeNil() } else { - yym4039 := z.EncBinary() - _ = yym4039 + yym4048 := z.EncBinary() + _ = yym4048 if false { } else { h.encMapstringSliceuint8((map[string][]uint8)(x.Data), e) @@ -50554,15 +50632,15 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4028[3] { + if yyq4037[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("data")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Data == nil { r.EncodeNil() } else { - yym4040 := z.EncBinary() - _ = yym4040 + yym4049 := z.EncBinary() + _ = yym4049 if false { } else { h.encMapstringSliceuint8((map[string][]uint8)(x.Data), e) @@ -50570,22 +50648,22 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4028 || yy2arr4028 { + if yyr4037 || yy2arr4037 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4028[4] { + if yyq4037[4] { x.Type.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4028[4] { + if yyq4037[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("type")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } } - if yyr4028 || yy2arr4028 { + if yyr4037 || yy2arr4037 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -50598,25 +50676,25 @@ func (x *Secret) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4042 := z.DecBinary() - _ = yym4042 + yym4051 := z.DecBinary() + _ = yym4051 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4043 := r.ContainerType() - if yyct4043 == codecSelferValueTypeMap1234 { - yyl4043 := r.ReadMapStart() - if yyl4043 == 0 { + yyct4052 := r.ContainerType() + if yyct4052 == codecSelferValueTypeMap1234 { + yyl4052 := r.ReadMapStart() + if yyl4052 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4043, d) + x.codecDecodeSelfFromMap(yyl4052, d) } - } else if yyct4043 == codecSelferValueTypeArray1234 { - yyl4043 := r.ReadArrayStart() - if yyl4043 == 0 { + } else if yyct4052 == codecSelferValueTypeArray1234 { + yyl4052 := r.ReadArrayStart() + if yyl4052 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4043, d) + x.codecDecodeSelfFromArray(yyl4052, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -50628,12 +50706,12 @@ func (x *Secret) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4044Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4044Slc - var yyhl4044 bool = l >= 0 - for yyj4044 := 0; ; yyj4044++ { - if yyhl4044 { - if yyj4044 >= l { + var yys4053Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys4053Slc + var yyhl4053 bool = l >= 0 + for yyj4053 := 0; ; yyj4053++ { + if yyhl4053 { + if yyj4053 >= l { break } } else { @@ -50642,10 +50720,10 @@ func (x *Secret) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4044Slc = r.DecodeBytes(yys4044Slc, true, true) - yys4044 := string(yys4044Slc) + yys4053Slc = r.DecodeBytes(yys4053Slc, true, true) + yys4053 := string(yys4053Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4044 { + switch yys4053 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -50662,19 +50740,19 @@ func (x *Secret) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv4047 := &x.ObjectMeta - yyv4047.CodecDecodeSelf(d) + yyv4056 := &x.ObjectMeta + yyv4056.CodecDecodeSelf(d) } case "data": if r.TryDecodeAsNil() { x.Data = nil } else { - yyv4048 := &x.Data - yym4049 := z.DecBinary() - _ = yym4049 + yyv4057 := &x.Data + yym4058 := z.DecBinary() + _ = yym4058 if false { } else { - h.decMapstringSliceuint8((*map[string][]uint8)(yyv4048), d) + h.decMapstringSliceuint8((*map[string][]uint8)(yyv4057), d) } } case "type": @@ -50684,9 +50762,9 @@ func (x *Secret) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Type = SecretType(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys4044) - } // end switch yys4044 - } // end for yyj4044 + z.DecStructFieldNotFound(-1, yys4053) + } // end switch yys4053 + } // end for yyj4053 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -50694,16 +50772,16 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4051 int - var yyb4051 bool - var yyhl4051 bool = l >= 0 - yyj4051++ - if yyhl4051 { - yyb4051 = yyj4051 > l + var yyj4060 int + var yyb4060 bool + var yyhl4060 bool = l >= 0 + yyj4060++ + if yyhl4060 { + yyb4060 = yyj4060 > l } else { - yyb4051 = r.CheckBreak() + yyb4060 = r.CheckBreak() } - if yyb4051 { + if yyb4060 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50713,13 +50791,13 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj4051++ - if yyhl4051 { - yyb4051 = yyj4051 > l + yyj4060++ + if yyhl4060 { + yyb4060 = yyj4060 > l } else { - yyb4051 = r.CheckBreak() + yyb4060 = r.CheckBreak() } - if yyb4051 { + if yyb4060 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50729,13 +50807,13 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj4051++ - if yyhl4051 { - yyb4051 = yyj4051 > l + yyj4060++ + if yyhl4060 { + yyb4060 = yyj4060 > l } else { - yyb4051 = r.CheckBreak() + yyb4060 = r.CheckBreak() } - if yyb4051 { + if yyb4060 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50743,16 +50821,16 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv4054 := &x.ObjectMeta - yyv4054.CodecDecodeSelf(d) + yyv4063 := &x.ObjectMeta + yyv4063.CodecDecodeSelf(d) } - yyj4051++ - if yyhl4051 { - yyb4051 = yyj4051 > l + yyj4060++ + if yyhl4060 { + yyb4060 = yyj4060 > l } else { - yyb4051 = r.CheckBreak() + yyb4060 = r.CheckBreak() } - if yyb4051 { + if yyb4060 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50760,21 +50838,21 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Data = nil } else { - yyv4055 := &x.Data - yym4056 := z.DecBinary() - _ = yym4056 + yyv4064 := &x.Data + yym4065 := z.DecBinary() + _ = yym4065 if false { } else { - h.decMapstringSliceuint8((*map[string][]uint8)(yyv4055), d) + h.decMapstringSliceuint8((*map[string][]uint8)(yyv4064), d) } } - yyj4051++ - if yyhl4051 { - yyb4051 = yyj4051 > l + yyj4060++ + if yyhl4060 { + yyb4060 = yyj4060 > l } else { - yyb4051 = r.CheckBreak() + yyb4060 = r.CheckBreak() } - if yyb4051 { + if yyb4060 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50785,17 +50863,17 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Type = SecretType(r.DecodeString()) } for { - yyj4051++ - if yyhl4051 { - yyb4051 = yyj4051 > l + yyj4060++ + if yyhl4060 { + yyb4060 = yyj4060 > l } else { - yyb4051 = r.CheckBreak() + yyb4060 = r.CheckBreak() } - if yyb4051 { + if yyb4060 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4051-1, "") + z.DecStructFieldNotFound(yyj4060-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -50804,8 +50882,8 @@ func (x SecretType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym4058 := z.EncBinary() - _ = yym4058 + yym4067 := z.EncBinary() + _ = yym4067 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -50817,8 +50895,8 @@ func (x *SecretType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4059 := z.DecBinary() - _ = yym4059 + yym4068 := z.DecBinary() + _ = yym4068 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -50833,37 +50911,37 @@ func (x *SecretList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4060 := z.EncBinary() - _ = yym4060 + yym4069 := z.EncBinary() + _ = yym4069 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4061 := !z.EncBinary() - yy2arr4061 := z.EncBasicHandle().StructToArray - var yyq4061 [4]bool - _, _, _ = yysep4061, yyq4061, yy2arr4061 - const yyr4061 bool = false - yyq4061[0] = x.Kind != "" - yyq4061[1] = x.APIVersion != "" - yyq4061[2] = true - var yynn4061 int - if yyr4061 || yy2arr4061 { + yysep4070 := !z.EncBinary() + yy2arr4070 := z.EncBasicHandle().StructToArray + var yyq4070 [4]bool + _, _, _ = yysep4070, yyq4070, yy2arr4070 + const yyr4070 bool = false + yyq4070[0] = x.Kind != "" + yyq4070[1] = x.APIVersion != "" + yyq4070[2] = true + var yynn4070 int + if yyr4070 || yy2arr4070 { r.EncodeArrayStart(4) } else { - yynn4061 = 1 - for _, b := range yyq4061 { + yynn4070 = 1 + for _, b := range yyq4070 { if b { - yynn4061++ + yynn4070++ } } - r.EncodeMapStart(yynn4061) - yynn4061 = 0 + r.EncodeMapStart(yynn4070) + yynn4070 = 0 } - if yyr4061 || yy2arr4061 { + if yyr4070 || yy2arr4070 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4061[0] { - yym4063 := z.EncBinary() - _ = yym4063 + if yyq4070[0] { + yym4072 := z.EncBinary() + _ = yym4072 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -50872,23 +50950,23 @@ func (x *SecretList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4061[0] { + if yyq4070[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4064 := z.EncBinary() - _ = yym4064 + yym4073 := z.EncBinary() + _ = yym4073 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr4061 || yy2arr4061 { + if yyr4070 || yy2arr4070 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4061[1] { - yym4066 := z.EncBinary() - _ = yym4066 + if yyq4070[1] { + yym4075 := z.EncBinary() + _ = yym4075 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -50897,54 +50975,54 @@ func (x *SecretList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4061[1] { + if yyq4070[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4067 := z.EncBinary() - _ = yym4067 + yym4076 := z.EncBinary() + _ = yym4076 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr4061 || yy2arr4061 { + if yyr4070 || yy2arr4070 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4061[2] { - yy4069 := &x.ListMeta - yym4070 := z.EncBinary() - _ = yym4070 + if yyq4070[2] { + yy4078 := &x.ListMeta + yym4079 := z.EncBinary() + _ = yym4079 if false { - } else if z.HasExtensions() && z.EncExt(yy4069) { + } else if z.HasExtensions() && z.EncExt(yy4078) { } else { - z.EncFallback(yy4069) + z.EncFallback(yy4078) } } else { r.EncodeNil() } } else { - if yyq4061[2] { + if yyq4070[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4071 := &x.ListMeta - yym4072 := z.EncBinary() - _ = yym4072 + yy4080 := &x.ListMeta + yym4081 := z.EncBinary() + _ = yym4081 if false { - } else if z.HasExtensions() && z.EncExt(yy4071) { + } else if z.HasExtensions() && z.EncExt(yy4080) { } else { - z.EncFallback(yy4071) + z.EncFallback(yy4080) } } } - if yyr4061 || yy2arr4061 { + if yyr4070 || yy2arr4070 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym4074 := z.EncBinary() - _ = yym4074 + yym4083 := z.EncBinary() + _ = yym4083 if false { } else { h.encSliceSecret(([]Secret)(x.Items), e) @@ -50957,15 +51035,15 @@ func (x *SecretList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym4075 := z.EncBinary() - _ = yym4075 + yym4084 := z.EncBinary() + _ = yym4084 if false { } else { h.encSliceSecret(([]Secret)(x.Items), e) } } } - if yyr4061 || yy2arr4061 { + if yyr4070 || yy2arr4070 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -50978,25 +51056,25 @@ func (x *SecretList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4076 := z.DecBinary() - _ = yym4076 + yym4085 := z.DecBinary() + _ = yym4085 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4077 := r.ContainerType() - if yyct4077 == codecSelferValueTypeMap1234 { - yyl4077 := r.ReadMapStart() - if yyl4077 == 0 { + yyct4086 := r.ContainerType() + if yyct4086 == codecSelferValueTypeMap1234 { + yyl4086 := r.ReadMapStart() + if yyl4086 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4077, d) + x.codecDecodeSelfFromMap(yyl4086, d) } - } else if yyct4077 == codecSelferValueTypeArray1234 { - yyl4077 := r.ReadArrayStart() - if yyl4077 == 0 { + } else if yyct4086 == codecSelferValueTypeArray1234 { + yyl4086 := r.ReadArrayStart() + if yyl4086 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4077, d) + x.codecDecodeSelfFromArray(yyl4086, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -51008,12 +51086,12 @@ func (x *SecretList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4078Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4078Slc - var yyhl4078 bool = l >= 0 - for yyj4078 := 0; ; yyj4078++ { - if yyhl4078 { - if yyj4078 >= l { + var yys4087Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys4087Slc + var yyhl4087 bool = l >= 0 + for yyj4087 := 0; ; yyj4087++ { + if yyhl4087 { + if yyj4087 >= l { break } } else { @@ -51022,10 +51100,10 @@ func (x *SecretList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4078Slc = r.DecodeBytes(yys4078Slc, true, true) - yys4078 := string(yys4078Slc) + yys4087Slc = r.DecodeBytes(yys4087Slc, true, true) + yys4087 := string(yys4087Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4078 { + switch yys4087 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -51042,31 +51120,31 @@ func (x *SecretList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv4081 := &x.ListMeta - yym4082 := z.DecBinary() - _ = yym4082 + yyv4090 := &x.ListMeta + yym4091 := z.DecBinary() + _ = yym4091 if false { - } else if z.HasExtensions() && z.DecExt(yyv4081) { + } else if z.HasExtensions() && z.DecExt(yyv4090) { } else { - z.DecFallback(yyv4081, false) + z.DecFallback(yyv4090, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4083 := &x.Items - yym4084 := z.DecBinary() - _ = yym4084 + yyv4092 := &x.Items + yym4093 := z.DecBinary() + _ = yym4093 if false { } else { - h.decSliceSecret((*[]Secret)(yyv4083), d) + h.decSliceSecret((*[]Secret)(yyv4092), d) } } default: - z.DecStructFieldNotFound(-1, yys4078) - } // end switch yys4078 - } // end for yyj4078 + z.DecStructFieldNotFound(-1, yys4087) + } // end switch yys4087 + } // end for yyj4087 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -51074,16 +51152,16 @@ func (x *SecretList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4085 int - var yyb4085 bool - var yyhl4085 bool = l >= 0 - yyj4085++ - if yyhl4085 { - yyb4085 = yyj4085 > l + var yyj4094 int + var yyb4094 bool + var yyhl4094 bool = l >= 0 + yyj4094++ + if yyhl4094 { + yyb4094 = yyj4094 > l } else { - yyb4085 = r.CheckBreak() + yyb4094 = r.CheckBreak() } - if yyb4085 { + if yyb4094 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51093,13 +51171,13 @@ func (x *SecretList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj4085++ - if yyhl4085 { - yyb4085 = yyj4085 > l + yyj4094++ + if yyhl4094 { + yyb4094 = yyj4094 > l } else { - yyb4085 = r.CheckBreak() + yyb4094 = r.CheckBreak() } - if yyb4085 { + if yyb4094 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51109,13 +51187,13 @@ func (x *SecretList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj4085++ - if yyhl4085 { - yyb4085 = yyj4085 > l + yyj4094++ + if yyhl4094 { + yyb4094 = yyj4094 > l } else { - yyb4085 = r.CheckBreak() + yyb4094 = r.CheckBreak() } - if yyb4085 { + if yyb4094 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51123,22 +51201,22 @@ func (x *SecretList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv4088 := &x.ListMeta - yym4089 := z.DecBinary() - _ = yym4089 + yyv4097 := &x.ListMeta + yym4098 := z.DecBinary() + _ = yym4098 if false { - } else if z.HasExtensions() && z.DecExt(yyv4088) { + } else if z.HasExtensions() && z.DecExt(yyv4097) { } else { - z.DecFallback(yyv4088, false) + z.DecFallback(yyv4097, false) } } - yyj4085++ - if yyhl4085 { - yyb4085 = yyj4085 > l + yyj4094++ + if yyhl4094 { + yyb4094 = yyj4094 > l } else { - yyb4085 = r.CheckBreak() + yyb4094 = r.CheckBreak() } - if yyb4085 { + if yyb4094 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51146,26 +51224,26 @@ func (x *SecretList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4090 := &x.Items - yym4091 := z.DecBinary() - _ = yym4091 + yyv4099 := &x.Items + yym4100 := z.DecBinary() + _ = yym4100 if false { } else { - h.decSliceSecret((*[]Secret)(yyv4090), d) + h.decSliceSecret((*[]Secret)(yyv4099), d) } } for { - yyj4085++ - if yyhl4085 { - yyb4085 = yyj4085 > l + yyj4094++ + if yyhl4094 { + yyb4094 = yyj4094 > l } else { - yyb4085 = r.CheckBreak() + yyb4094 = r.CheckBreak() } - if yyb4085 { + if yyb4094 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4085-1, "") + z.DecStructFieldNotFound(yyj4094-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -51177,38 +51255,38 @@ func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4092 := z.EncBinary() - _ = yym4092 + yym4101 := z.EncBinary() + _ = yym4101 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4093 := !z.EncBinary() - yy2arr4093 := z.EncBasicHandle().StructToArray - var yyq4093 [4]bool - _, _, _ = yysep4093, yyq4093, yy2arr4093 - const yyr4093 bool = false - yyq4093[0] = x.Kind != "" - yyq4093[1] = x.APIVersion != "" - yyq4093[2] = true - yyq4093[3] = len(x.Data) != 0 - var yynn4093 int - if yyr4093 || yy2arr4093 { + yysep4102 := !z.EncBinary() + yy2arr4102 := z.EncBasicHandle().StructToArray + var yyq4102 [4]bool + _, _, _ = yysep4102, yyq4102, yy2arr4102 + const yyr4102 bool = false + yyq4102[0] = x.Kind != "" + yyq4102[1] = x.APIVersion != "" + yyq4102[2] = true + yyq4102[3] = len(x.Data) != 0 + var yynn4102 int + if yyr4102 || yy2arr4102 { r.EncodeArrayStart(4) } else { - yynn4093 = 0 - for _, b := range yyq4093 { + yynn4102 = 0 + for _, b := range yyq4102 { if b { - yynn4093++ + yynn4102++ } } - r.EncodeMapStart(yynn4093) - yynn4093 = 0 + r.EncodeMapStart(yynn4102) + yynn4102 = 0 } - if yyr4093 || yy2arr4093 { + if yyr4102 || yy2arr4102 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4093[0] { - yym4095 := z.EncBinary() - _ = yym4095 + if yyq4102[0] { + yym4104 := z.EncBinary() + _ = yym4104 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -51217,23 +51295,23 @@ func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4093[0] { + if yyq4102[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4096 := z.EncBinary() - _ = yym4096 + yym4105 := z.EncBinary() + _ = yym4105 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr4093 || yy2arr4093 { + if yyr4102 || yy2arr4102 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4093[1] { - yym4098 := z.EncBinary() - _ = yym4098 + if yyq4102[1] { + yym4107 := z.EncBinary() + _ = yym4107 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -51242,43 +51320,43 @@ func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4093[1] { + if yyq4102[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4099 := z.EncBinary() - _ = yym4099 + yym4108 := z.EncBinary() + _ = yym4108 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr4093 || yy2arr4093 { + if yyr4102 || yy2arr4102 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4093[2] { - yy4101 := &x.ObjectMeta - yy4101.CodecEncodeSelf(e) + if yyq4102[2] { + yy4110 := &x.ObjectMeta + yy4110.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq4093[2] { + if yyq4102[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4102 := &x.ObjectMeta - yy4102.CodecEncodeSelf(e) + yy4111 := &x.ObjectMeta + yy4111.CodecEncodeSelf(e) } } - if yyr4093 || yy2arr4093 { + if yyr4102 || yy2arr4102 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4093[3] { + if yyq4102[3] { if x.Data == nil { r.EncodeNil() } else { - yym4104 := z.EncBinary() - _ = yym4104 + yym4113 := z.EncBinary() + _ = yym4113 if false { } else { z.F.EncMapStringStringV(x.Data, false, e) @@ -51288,15 +51366,15 @@ func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4093[3] { + if yyq4102[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("data")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Data == nil { r.EncodeNil() } else { - yym4105 := z.EncBinary() - _ = yym4105 + yym4114 := z.EncBinary() + _ = yym4114 if false { } else { z.F.EncMapStringStringV(x.Data, false, e) @@ -51304,7 +51382,7 @@ func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4093 || yy2arr4093 { + if yyr4102 || yy2arr4102 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -51317,25 +51395,25 @@ func (x *ConfigMap) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4106 := z.DecBinary() - _ = yym4106 + yym4115 := z.DecBinary() + _ = yym4115 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4107 := r.ContainerType() - if yyct4107 == codecSelferValueTypeMap1234 { - yyl4107 := r.ReadMapStart() - if yyl4107 == 0 { + yyct4116 := r.ContainerType() + if yyct4116 == codecSelferValueTypeMap1234 { + yyl4116 := r.ReadMapStart() + if yyl4116 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4107, d) + x.codecDecodeSelfFromMap(yyl4116, d) } - } else if yyct4107 == codecSelferValueTypeArray1234 { - yyl4107 := r.ReadArrayStart() - if yyl4107 == 0 { + } else if yyct4116 == codecSelferValueTypeArray1234 { + yyl4116 := r.ReadArrayStart() + if yyl4116 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4107, d) + x.codecDecodeSelfFromArray(yyl4116, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -51347,12 +51425,12 @@ func (x *ConfigMap) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4108Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4108Slc - var yyhl4108 bool = l >= 0 - for yyj4108 := 0; ; yyj4108++ { - if yyhl4108 { - if yyj4108 >= l { + var yys4117Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys4117Slc + var yyhl4117 bool = l >= 0 + for yyj4117 := 0; ; yyj4117++ { + if yyhl4117 { + if yyj4117 >= l { break } } else { @@ -51361,10 +51439,10 @@ func (x *ConfigMap) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4108Slc = r.DecodeBytes(yys4108Slc, true, true) - yys4108 := string(yys4108Slc) + yys4117Slc = r.DecodeBytes(yys4117Slc, true, true) + yys4117 := string(yys4117Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4108 { + switch yys4117 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -51381,25 +51459,25 @@ func (x *ConfigMap) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv4111 := &x.ObjectMeta - yyv4111.CodecDecodeSelf(d) + yyv4120 := &x.ObjectMeta + yyv4120.CodecDecodeSelf(d) } case "data": if r.TryDecodeAsNil() { x.Data = nil } else { - yyv4112 := &x.Data - yym4113 := z.DecBinary() - _ = yym4113 + yyv4121 := &x.Data + yym4122 := z.DecBinary() + _ = yym4122 if false { } else { - z.F.DecMapStringStringX(yyv4112, false, d) + z.F.DecMapStringStringX(yyv4121, false, d) } } default: - z.DecStructFieldNotFound(-1, yys4108) - } // end switch yys4108 - } // end for yyj4108 + z.DecStructFieldNotFound(-1, yys4117) + } // end switch yys4117 + } // end for yyj4117 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -51407,16 +51485,16 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4114 int - var yyb4114 bool - var yyhl4114 bool = l >= 0 - yyj4114++ - if yyhl4114 { - yyb4114 = yyj4114 > l + var yyj4123 int + var yyb4123 bool + var yyhl4123 bool = l >= 0 + yyj4123++ + if yyhl4123 { + yyb4123 = yyj4123 > l } else { - yyb4114 = r.CheckBreak() + yyb4123 = r.CheckBreak() } - if yyb4114 { + if yyb4123 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51426,13 +51504,13 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj4114++ - if yyhl4114 { - yyb4114 = yyj4114 > l + yyj4123++ + if yyhl4123 { + yyb4123 = yyj4123 > l } else { - yyb4114 = r.CheckBreak() + yyb4123 = r.CheckBreak() } - if yyb4114 { + if yyb4123 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51442,13 +51520,13 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj4114++ - if yyhl4114 { - yyb4114 = yyj4114 > l + yyj4123++ + if yyhl4123 { + yyb4123 = yyj4123 > l } else { - yyb4114 = r.CheckBreak() + yyb4123 = r.CheckBreak() } - if yyb4114 { + if yyb4123 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51456,16 +51534,16 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv4117 := &x.ObjectMeta - yyv4117.CodecDecodeSelf(d) + yyv4126 := &x.ObjectMeta + yyv4126.CodecDecodeSelf(d) } - yyj4114++ - if yyhl4114 { - yyb4114 = yyj4114 > l + yyj4123++ + if yyhl4123 { + yyb4123 = yyj4123 > l } else { - yyb4114 = r.CheckBreak() + yyb4123 = r.CheckBreak() } - if yyb4114 { + if yyb4123 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51473,26 +51551,26 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Data = nil } else { - yyv4118 := &x.Data - yym4119 := z.DecBinary() - _ = yym4119 + yyv4127 := &x.Data + yym4128 := z.DecBinary() + _ = yym4128 if false { } else { - z.F.DecMapStringStringX(yyv4118, false, d) + z.F.DecMapStringStringX(yyv4127, false, d) } } for { - yyj4114++ - if yyhl4114 { - yyb4114 = yyj4114 > l + yyj4123++ + if yyhl4123 { + yyb4123 = yyj4123 > l } else { - yyb4114 = r.CheckBreak() + yyb4123 = r.CheckBreak() } - if yyb4114 { + if yyb4123 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4114-1, "") + z.DecStructFieldNotFound(yyj4123-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -51504,37 +51582,37 @@ func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4120 := z.EncBinary() - _ = yym4120 + yym4129 := z.EncBinary() + _ = yym4129 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4121 := !z.EncBinary() - yy2arr4121 := z.EncBasicHandle().StructToArray - var yyq4121 [4]bool - _, _, _ = yysep4121, yyq4121, yy2arr4121 - const yyr4121 bool = false - yyq4121[0] = x.Kind != "" - yyq4121[1] = x.APIVersion != "" - yyq4121[2] = true - var yynn4121 int - if yyr4121 || yy2arr4121 { + yysep4130 := !z.EncBinary() + yy2arr4130 := z.EncBasicHandle().StructToArray + var yyq4130 [4]bool + _, _, _ = yysep4130, yyq4130, yy2arr4130 + const yyr4130 bool = false + yyq4130[0] = x.Kind != "" + yyq4130[1] = x.APIVersion != "" + yyq4130[2] = true + var yynn4130 int + if yyr4130 || yy2arr4130 { r.EncodeArrayStart(4) } else { - yynn4121 = 1 - for _, b := range yyq4121 { + yynn4130 = 1 + for _, b := range yyq4130 { if b { - yynn4121++ + yynn4130++ } } - r.EncodeMapStart(yynn4121) - yynn4121 = 0 + r.EncodeMapStart(yynn4130) + yynn4130 = 0 } - if yyr4121 || yy2arr4121 { + if yyr4130 || yy2arr4130 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4121[0] { - yym4123 := z.EncBinary() - _ = yym4123 + if yyq4130[0] { + yym4132 := z.EncBinary() + _ = yym4132 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -51543,23 +51621,23 @@ func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4121[0] { + if yyq4130[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4124 := z.EncBinary() - _ = yym4124 + yym4133 := z.EncBinary() + _ = yym4133 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr4121 || yy2arr4121 { + if yyr4130 || yy2arr4130 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4121[1] { - yym4126 := z.EncBinary() - _ = yym4126 + if yyq4130[1] { + yym4135 := z.EncBinary() + _ = yym4135 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -51568,54 +51646,54 @@ func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4121[1] { + if yyq4130[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4127 := z.EncBinary() - _ = yym4127 + yym4136 := z.EncBinary() + _ = yym4136 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr4121 || yy2arr4121 { + if yyr4130 || yy2arr4130 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4121[2] { - yy4129 := &x.ListMeta - yym4130 := z.EncBinary() - _ = yym4130 + if yyq4130[2] { + yy4138 := &x.ListMeta + yym4139 := z.EncBinary() + _ = yym4139 if false { - } else if z.HasExtensions() && z.EncExt(yy4129) { + } else if z.HasExtensions() && z.EncExt(yy4138) { } else { - z.EncFallback(yy4129) + z.EncFallback(yy4138) } } else { r.EncodeNil() } } else { - if yyq4121[2] { + if yyq4130[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4131 := &x.ListMeta - yym4132 := z.EncBinary() - _ = yym4132 + yy4140 := &x.ListMeta + yym4141 := z.EncBinary() + _ = yym4141 if false { - } else if z.HasExtensions() && z.EncExt(yy4131) { + } else if z.HasExtensions() && z.EncExt(yy4140) { } else { - z.EncFallback(yy4131) + z.EncFallback(yy4140) } } } - if yyr4121 || yy2arr4121 { + if yyr4130 || yy2arr4130 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym4134 := z.EncBinary() - _ = yym4134 + yym4143 := z.EncBinary() + _ = yym4143 if false { } else { h.encSliceConfigMap(([]ConfigMap)(x.Items), e) @@ -51628,15 +51706,15 @@ func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym4135 := z.EncBinary() - _ = yym4135 + yym4144 := z.EncBinary() + _ = yym4144 if false { } else { h.encSliceConfigMap(([]ConfigMap)(x.Items), e) } } } - if yyr4121 || yy2arr4121 { + if yyr4130 || yy2arr4130 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -51649,25 +51727,25 @@ func (x *ConfigMapList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4136 := z.DecBinary() - _ = yym4136 + yym4145 := z.DecBinary() + _ = yym4145 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4137 := r.ContainerType() - if yyct4137 == codecSelferValueTypeMap1234 { - yyl4137 := r.ReadMapStart() - if yyl4137 == 0 { + yyct4146 := r.ContainerType() + if yyct4146 == codecSelferValueTypeMap1234 { + yyl4146 := r.ReadMapStart() + if yyl4146 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4137, d) + x.codecDecodeSelfFromMap(yyl4146, d) } - } else if yyct4137 == codecSelferValueTypeArray1234 { - yyl4137 := r.ReadArrayStart() - if yyl4137 == 0 { + } else if yyct4146 == codecSelferValueTypeArray1234 { + yyl4146 := r.ReadArrayStart() + if yyl4146 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4137, d) + x.codecDecodeSelfFromArray(yyl4146, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -51679,12 +51757,12 @@ func (x *ConfigMapList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4138Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4138Slc - var yyhl4138 bool = l >= 0 - for yyj4138 := 0; ; yyj4138++ { - if yyhl4138 { - if yyj4138 >= l { + var yys4147Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys4147Slc + var yyhl4147 bool = l >= 0 + for yyj4147 := 0; ; yyj4147++ { + if yyhl4147 { + if yyj4147 >= l { break } } else { @@ -51693,10 +51771,10 @@ func (x *ConfigMapList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4138Slc = r.DecodeBytes(yys4138Slc, true, true) - yys4138 := string(yys4138Slc) + yys4147Slc = r.DecodeBytes(yys4147Slc, true, true) + yys4147 := string(yys4147Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4138 { + switch yys4147 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -51713,31 +51791,31 @@ func (x *ConfigMapList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv4141 := &x.ListMeta - yym4142 := z.DecBinary() - _ = yym4142 + yyv4150 := &x.ListMeta + yym4151 := z.DecBinary() + _ = yym4151 if false { - } else if z.HasExtensions() && z.DecExt(yyv4141) { + } else if z.HasExtensions() && z.DecExt(yyv4150) { } else { - z.DecFallback(yyv4141, false) + z.DecFallback(yyv4150, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4143 := &x.Items - yym4144 := z.DecBinary() - _ = yym4144 + yyv4152 := &x.Items + yym4153 := z.DecBinary() + _ = yym4153 if false { } else { - h.decSliceConfigMap((*[]ConfigMap)(yyv4143), d) + h.decSliceConfigMap((*[]ConfigMap)(yyv4152), d) } } default: - z.DecStructFieldNotFound(-1, yys4138) - } // end switch yys4138 - } // end for yyj4138 + z.DecStructFieldNotFound(-1, yys4147) + } // end switch yys4147 + } // end for yyj4147 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -51745,16 +51823,16 @@ func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4145 int - var yyb4145 bool - var yyhl4145 bool = l >= 0 - yyj4145++ - if yyhl4145 { - yyb4145 = yyj4145 > l + var yyj4154 int + var yyb4154 bool + var yyhl4154 bool = l >= 0 + yyj4154++ + if yyhl4154 { + yyb4154 = yyj4154 > l } else { - yyb4145 = r.CheckBreak() + yyb4154 = r.CheckBreak() } - if yyb4145 { + if yyb4154 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51764,13 +51842,13 @@ func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj4145++ - if yyhl4145 { - yyb4145 = yyj4145 > l + yyj4154++ + if yyhl4154 { + yyb4154 = yyj4154 > l } else { - yyb4145 = r.CheckBreak() + yyb4154 = r.CheckBreak() } - if yyb4145 { + if yyb4154 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51780,13 +51858,13 @@ func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj4145++ - if yyhl4145 { - yyb4145 = yyj4145 > l + yyj4154++ + if yyhl4154 { + yyb4154 = yyj4154 > l } else { - yyb4145 = r.CheckBreak() + yyb4154 = r.CheckBreak() } - if yyb4145 { + if yyb4154 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51794,22 +51872,22 @@ func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv4148 := &x.ListMeta - yym4149 := z.DecBinary() - _ = yym4149 + yyv4157 := &x.ListMeta + yym4158 := z.DecBinary() + _ = yym4158 if false { - } else if z.HasExtensions() && z.DecExt(yyv4148) { + } else if z.HasExtensions() && z.DecExt(yyv4157) { } else { - z.DecFallback(yyv4148, false) + z.DecFallback(yyv4157, false) } } - yyj4145++ - if yyhl4145 { - yyb4145 = yyj4145 > l + yyj4154++ + if yyhl4154 { + yyb4154 = yyj4154 > l } else { - yyb4145 = r.CheckBreak() + yyb4154 = r.CheckBreak() } - if yyb4145 { + if yyb4154 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51817,26 +51895,26 @@ func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4150 := &x.Items - yym4151 := z.DecBinary() - _ = yym4151 + yyv4159 := &x.Items + yym4160 := z.DecBinary() + _ = yym4160 if false { } else { - h.decSliceConfigMap((*[]ConfigMap)(yyv4150), d) + h.decSliceConfigMap((*[]ConfigMap)(yyv4159), d) } } for { - yyj4145++ - if yyhl4145 { - yyb4145 = yyj4145 > l + yyj4154++ + if yyhl4154 { + yyb4154 = yyj4154 > l } else { - yyb4145 = r.CheckBreak() + yyb4154 = r.CheckBreak() } - if yyb4145 { + if yyb4154 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4145-1, "") + z.DecStructFieldNotFound(yyj4154-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -51845,8 +51923,8 @@ func (x PatchType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym4152 := z.EncBinary() - _ = yym4152 + yym4161 := z.EncBinary() + _ = yym4161 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -51858,8 +51936,8 @@ func (x *PatchType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4153 := z.DecBinary() - _ = yym4153 + yym4162 := z.DecBinary() + _ = yym4162 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -51871,8 +51949,8 @@ func (x ComponentConditionType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym4154 := z.EncBinary() - _ = yym4154 + yym4163 := z.EncBinary() + _ = yym4163 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -51884,8 +51962,8 @@ func (x *ComponentConditionType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4155 := z.DecBinary() - _ = yym4155 + yym4164 := z.DecBinary() + _ = yym4164 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -51900,32 +51978,32 @@ func (x *ComponentCondition) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4156 := z.EncBinary() - _ = yym4156 + yym4165 := z.EncBinary() + _ = yym4165 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4157 := !z.EncBinary() - yy2arr4157 := z.EncBasicHandle().StructToArray - var yyq4157 [4]bool - _, _, _ = yysep4157, yyq4157, yy2arr4157 - const yyr4157 bool = false - yyq4157[2] = x.Message != "" - yyq4157[3] = x.Error != "" - var yynn4157 int - if yyr4157 || yy2arr4157 { + yysep4166 := !z.EncBinary() + yy2arr4166 := z.EncBasicHandle().StructToArray + var yyq4166 [4]bool + _, _, _ = yysep4166, yyq4166, yy2arr4166 + const yyr4166 bool = false + yyq4166[2] = x.Message != "" + yyq4166[3] = x.Error != "" + var yynn4166 int + if yyr4166 || yy2arr4166 { r.EncodeArrayStart(4) } else { - yynn4157 = 2 - for _, b := range yyq4157 { + yynn4166 = 2 + for _, b := range yyq4166 { if b { - yynn4157++ + yynn4166++ } } - r.EncodeMapStart(yynn4157) - yynn4157 = 0 + r.EncodeMapStart(yynn4166) + yynn4166 = 0 } - if yyr4157 || yy2arr4157 { + if yyr4166 || yy2arr4166 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Type.CodecEncodeSelf(e) } else { @@ -51934,7 +52012,7 @@ func (x *ComponentCondition) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } - if yyr4157 || yy2arr4157 { + if yyr4166 || yy2arr4166 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Status.CodecEncodeSelf(e) } else { @@ -51943,11 +52021,11 @@ func (x *ComponentCondition) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Status.CodecEncodeSelf(e) } - if yyr4157 || yy2arr4157 { + if yyr4166 || yy2arr4166 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4157[2] { - yym4161 := z.EncBinary() - _ = yym4161 + if yyq4166[2] { + yym4170 := z.EncBinary() + _ = yym4170 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) @@ -51956,23 +52034,23 @@ func (x *ComponentCondition) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4157[2] { + if yyq4166[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("message")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4162 := z.EncBinary() - _ = yym4162 + yym4171 := z.EncBinary() + _ = yym4171 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) } } } - if yyr4157 || yy2arr4157 { + if yyr4166 || yy2arr4166 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4157[3] { - yym4164 := z.EncBinary() - _ = yym4164 + if yyq4166[3] { + yym4173 := z.EncBinary() + _ = yym4173 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Error)) @@ -51981,19 +52059,19 @@ func (x *ComponentCondition) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4157[3] { + if yyq4166[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("error")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4165 := z.EncBinary() - _ = yym4165 + yym4174 := z.EncBinary() + _ = yym4174 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Error)) } } } - if yyr4157 || yy2arr4157 { + if yyr4166 || yy2arr4166 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -52006,25 +52084,25 @@ func (x *ComponentCondition) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4166 := z.DecBinary() - _ = yym4166 + yym4175 := z.DecBinary() + _ = yym4175 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4167 := r.ContainerType() - if yyct4167 == codecSelferValueTypeMap1234 { - yyl4167 := r.ReadMapStart() - if yyl4167 == 0 { + yyct4176 := r.ContainerType() + if yyct4176 == codecSelferValueTypeMap1234 { + yyl4176 := r.ReadMapStart() + if yyl4176 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4167, d) + x.codecDecodeSelfFromMap(yyl4176, d) } - } else if yyct4167 == codecSelferValueTypeArray1234 { - yyl4167 := r.ReadArrayStart() - if yyl4167 == 0 { + } else if yyct4176 == codecSelferValueTypeArray1234 { + yyl4176 := r.ReadArrayStart() + if yyl4176 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4167, d) + x.codecDecodeSelfFromArray(yyl4176, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -52036,12 +52114,12 @@ func (x *ComponentCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4168Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4168Slc - var yyhl4168 bool = l >= 0 - for yyj4168 := 0; ; yyj4168++ { - if yyhl4168 { - if yyj4168 >= l { + var yys4177Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys4177Slc + var yyhl4177 bool = l >= 0 + for yyj4177 := 0; ; yyj4177++ { + if yyhl4177 { + if yyj4177 >= l { break } } else { @@ -52050,10 +52128,10 @@ func (x *ComponentCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4168Slc = r.DecodeBytes(yys4168Slc, true, true) - yys4168 := string(yys4168Slc) + yys4177Slc = r.DecodeBytes(yys4177Slc, true, true) + yys4177 := string(yys4177Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4168 { + switch yys4177 { case "type": if r.TryDecodeAsNil() { x.Type = "" @@ -52079,9 +52157,9 @@ func (x *ComponentCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) x.Error = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys4168) - } // end switch yys4168 - } // end for yyj4168 + z.DecStructFieldNotFound(-1, yys4177) + } // end switch yys4177 + } // end for yyj4177 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -52089,16 +52167,16 @@ func (x *ComponentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4173 int - var yyb4173 bool - var yyhl4173 bool = l >= 0 - yyj4173++ - if yyhl4173 { - yyb4173 = yyj4173 > l + var yyj4182 int + var yyb4182 bool + var yyhl4182 bool = l >= 0 + yyj4182++ + if yyhl4182 { + yyb4182 = yyj4182 > l } else { - yyb4173 = r.CheckBreak() + yyb4182 = r.CheckBreak() } - if yyb4173 { + if yyb4182 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52108,13 +52186,13 @@ func (x *ComponentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decode } else { x.Type = ComponentConditionType(r.DecodeString()) } - yyj4173++ - if yyhl4173 { - yyb4173 = yyj4173 > l + yyj4182++ + if yyhl4182 { + yyb4182 = yyj4182 > l } else { - yyb4173 = r.CheckBreak() + yyb4182 = r.CheckBreak() } - if yyb4173 { + if yyb4182 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52124,13 +52202,13 @@ func (x *ComponentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decode } else { x.Status = ConditionStatus(r.DecodeString()) } - yyj4173++ - if yyhl4173 { - yyb4173 = yyj4173 > l + yyj4182++ + if yyhl4182 { + yyb4182 = yyj4182 > l } else { - yyb4173 = r.CheckBreak() + yyb4182 = r.CheckBreak() } - if yyb4173 { + if yyb4182 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52140,13 +52218,13 @@ func (x *ComponentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decode } else { x.Message = string(r.DecodeString()) } - yyj4173++ - if yyhl4173 { - yyb4173 = yyj4173 > l + yyj4182++ + if yyhl4182 { + yyb4182 = yyj4182 > l } else { - yyb4173 = r.CheckBreak() + yyb4182 = r.CheckBreak() } - if yyb4173 { + if yyb4182 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52157,17 +52235,17 @@ func (x *ComponentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decode x.Error = string(r.DecodeString()) } for { - yyj4173++ - if yyhl4173 { - yyb4173 = yyj4173 > l + yyj4182++ + if yyhl4182 { + yyb4182 = yyj4182 > l } else { - yyb4173 = r.CheckBreak() + yyb4182 = r.CheckBreak() } - if yyb4173 { + if yyb4182 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4173-1, "") + z.DecStructFieldNotFound(yyj4182-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -52179,38 +52257,38 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4178 := z.EncBinary() - _ = yym4178 + yym4187 := z.EncBinary() + _ = yym4187 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4179 := !z.EncBinary() - yy2arr4179 := z.EncBasicHandle().StructToArray - var yyq4179 [4]bool - _, _, _ = yysep4179, yyq4179, yy2arr4179 - const yyr4179 bool = false - yyq4179[0] = x.Kind != "" - yyq4179[1] = x.APIVersion != "" - yyq4179[2] = true - yyq4179[3] = len(x.Conditions) != 0 - var yynn4179 int - if yyr4179 || yy2arr4179 { + yysep4188 := !z.EncBinary() + yy2arr4188 := z.EncBasicHandle().StructToArray + var yyq4188 [4]bool + _, _, _ = yysep4188, yyq4188, yy2arr4188 + const yyr4188 bool = false + yyq4188[0] = x.Kind != "" + yyq4188[1] = x.APIVersion != "" + yyq4188[2] = true + yyq4188[3] = len(x.Conditions) != 0 + var yynn4188 int + if yyr4188 || yy2arr4188 { r.EncodeArrayStart(4) } else { - yynn4179 = 0 - for _, b := range yyq4179 { + yynn4188 = 0 + for _, b := range yyq4188 { if b { - yynn4179++ + yynn4188++ } } - r.EncodeMapStart(yynn4179) - yynn4179 = 0 + r.EncodeMapStart(yynn4188) + yynn4188 = 0 } - if yyr4179 || yy2arr4179 { + if yyr4188 || yy2arr4188 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4179[0] { - yym4181 := z.EncBinary() - _ = yym4181 + if yyq4188[0] { + yym4190 := z.EncBinary() + _ = yym4190 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -52219,23 +52297,23 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4179[0] { + if yyq4188[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4182 := z.EncBinary() - _ = yym4182 + yym4191 := z.EncBinary() + _ = yym4191 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr4179 || yy2arr4179 { + if yyr4188 || yy2arr4188 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4179[1] { - yym4184 := z.EncBinary() - _ = yym4184 + if yyq4188[1] { + yym4193 := z.EncBinary() + _ = yym4193 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -52244,43 +52322,43 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4179[1] { + if yyq4188[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4185 := z.EncBinary() - _ = yym4185 + yym4194 := z.EncBinary() + _ = yym4194 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr4179 || yy2arr4179 { + if yyr4188 || yy2arr4188 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4179[2] { - yy4187 := &x.ObjectMeta - yy4187.CodecEncodeSelf(e) + if yyq4188[2] { + yy4196 := &x.ObjectMeta + yy4196.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq4179[2] { + if yyq4188[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4188 := &x.ObjectMeta - yy4188.CodecEncodeSelf(e) + yy4197 := &x.ObjectMeta + yy4197.CodecEncodeSelf(e) } } - if yyr4179 || yy2arr4179 { + if yyr4188 || yy2arr4188 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4179[3] { + if yyq4188[3] { if x.Conditions == nil { r.EncodeNil() } else { - yym4190 := z.EncBinary() - _ = yym4190 + yym4199 := z.EncBinary() + _ = yym4199 if false { } else { h.encSliceComponentCondition(([]ComponentCondition)(x.Conditions), e) @@ -52290,15 +52368,15 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4179[3] { + if yyq4188[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("conditions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Conditions == nil { r.EncodeNil() } else { - yym4191 := z.EncBinary() - _ = yym4191 + yym4200 := z.EncBinary() + _ = yym4200 if false { } else { h.encSliceComponentCondition(([]ComponentCondition)(x.Conditions), e) @@ -52306,7 +52384,7 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4179 || yy2arr4179 { + if yyr4188 || yy2arr4188 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -52319,25 +52397,25 @@ func (x *ComponentStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4192 := z.DecBinary() - _ = yym4192 + yym4201 := z.DecBinary() + _ = yym4201 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4193 := r.ContainerType() - if yyct4193 == codecSelferValueTypeMap1234 { - yyl4193 := r.ReadMapStart() - if yyl4193 == 0 { + yyct4202 := r.ContainerType() + if yyct4202 == codecSelferValueTypeMap1234 { + yyl4202 := r.ReadMapStart() + if yyl4202 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4193, d) + x.codecDecodeSelfFromMap(yyl4202, d) } - } else if yyct4193 == codecSelferValueTypeArray1234 { - yyl4193 := r.ReadArrayStart() - if yyl4193 == 0 { + } else if yyct4202 == codecSelferValueTypeArray1234 { + yyl4202 := r.ReadArrayStart() + if yyl4202 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4193, d) + x.codecDecodeSelfFromArray(yyl4202, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -52349,12 +52427,12 @@ func (x *ComponentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4194Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4194Slc - var yyhl4194 bool = l >= 0 - for yyj4194 := 0; ; yyj4194++ { - if yyhl4194 { - if yyj4194 >= l { + var yys4203Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys4203Slc + var yyhl4203 bool = l >= 0 + for yyj4203 := 0; ; yyj4203++ { + if yyhl4203 { + if yyj4203 >= l { break } } else { @@ -52363,10 +52441,10 @@ func (x *ComponentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4194Slc = r.DecodeBytes(yys4194Slc, true, true) - yys4194 := string(yys4194Slc) + yys4203Slc = r.DecodeBytes(yys4203Slc, true, true) + yys4203 := string(yys4203Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4194 { + switch yys4203 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -52383,25 +52461,25 @@ func (x *ComponentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv4197 := &x.ObjectMeta - yyv4197.CodecDecodeSelf(d) + yyv4206 := &x.ObjectMeta + yyv4206.CodecDecodeSelf(d) } case "conditions": if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv4198 := &x.Conditions - yym4199 := z.DecBinary() - _ = yym4199 + yyv4207 := &x.Conditions + yym4208 := z.DecBinary() + _ = yym4208 if false { } else { - h.decSliceComponentCondition((*[]ComponentCondition)(yyv4198), d) + h.decSliceComponentCondition((*[]ComponentCondition)(yyv4207), d) } } default: - z.DecStructFieldNotFound(-1, yys4194) - } // end switch yys4194 - } // end for yyj4194 + z.DecStructFieldNotFound(-1, yys4203) + } // end switch yys4203 + } // end for yyj4203 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -52409,16 +52487,16 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4200 int - var yyb4200 bool - var yyhl4200 bool = l >= 0 - yyj4200++ - if yyhl4200 { - yyb4200 = yyj4200 > l + var yyj4209 int + var yyb4209 bool + var yyhl4209 bool = l >= 0 + yyj4209++ + if yyhl4209 { + yyb4209 = yyj4209 > l } else { - yyb4200 = r.CheckBreak() + yyb4209 = r.CheckBreak() } - if yyb4200 { + if yyb4209 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52428,13 +52506,13 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj4200++ - if yyhl4200 { - yyb4200 = yyj4200 > l + yyj4209++ + if yyhl4209 { + yyb4209 = yyj4209 > l } else { - yyb4200 = r.CheckBreak() + yyb4209 = r.CheckBreak() } - if yyb4200 { + if yyb4209 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52444,13 +52522,13 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj4200++ - if yyhl4200 { - yyb4200 = yyj4200 > l + yyj4209++ + if yyhl4209 { + yyb4209 = yyj4209 > l } else { - yyb4200 = r.CheckBreak() + yyb4209 = r.CheckBreak() } - if yyb4200 { + if yyb4209 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52458,16 +52536,16 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv4203 := &x.ObjectMeta - yyv4203.CodecDecodeSelf(d) + yyv4212 := &x.ObjectMeta + yyv4212.CodecDecodeSelf(d) } - yyj4200++ - if yyhl4200 { - yyb4200 = yyj4200 > l + yyj4209++ + if yyhl4209 { + yyb4209 = yyj4209 > l } else { - yyb4200 = r.CheckBreak() + yyb4209 = r.CheckBreak() } - if yyb4200 { + if yyb4209 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52475,26 +52553,26 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv4204 := &x.Conditions - yym4205 := z.DecBinary() - _ = yym4205 + yyv4213 := &x.Conditions + yym4214 := z.DecBinary() + _ = yym4214 if false { } else { - h.decSliceComponentCondition((*[]ComponentCondition)(yyv4204), d) + h.decSliceComponentCondition((*[]ComponentCondition)(yyv4213), d) } } for { - yyj4200++ - if yyhl4200 { - yyb4200 = yyj4200 > l + yyj4209++ + if yyhl4209 { + yyb4209 = yyj4209 > l } else { - yyb4200 = r.CheckBreak() + yyb4209 = r.CheckBreak() } - if yyb4200 { + if yyb4209 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4200-1, "") + z.DecStructFieldNotFound(yyj4209-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -52506,37 +52584,37 @@ func (x *ComponentStatusList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4206 := z.EncBinary() - _ = yym4206 + yym4215 := z.EncBinary() + _ = yym4215 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4207 := !z.EncBinary() - yy2arr4207 := z.EncBasicHandle().StructToArray - var yyq4207 [4]bool - _, _, _ = yysep4207, yyq4207, yy2arr4207 - const yyr4207 bool = false - yyq4207[0] = x.Kind != "" - yyq4207[1] = x.APIVersion != "" - yyq4207[2] = true - var yynn4207 int - if yyr4207 || yy2arr4207 { + yysep4216 := !z.EncBinary() + yy2arr4216 := z.EncBasicHandle().StructToArray + var yyq4216 [4]bool + _, _, _ = yysep4216, yyq4216, yy2arr4216 + const yyr4216 bool = false + yyq4216[0] = x.Kind != "" + yyq4216[1] = x.APIVersion != "" + yyq4216[2] = true + var yynn4216 int + if yyr4216 || yy2arr4216 { r.EncodeArrayStart(4) } else { - yynn4207 = 1 - for _, b := range yyq4207 { + yynn4216 = 1 + for _, b := range yyq4216 { if b { - yynn4207++ + yynn4216++ } } - r.EncodeMapStart(yynn4207) - yynn4207 = 0 + r.EncodeMapStart(yynn4216) + yynn4216 = 0 } - if yyr4207 || yy2arr4207 { + if yyr4216 || yy2arr4216 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4207[0] { - yym4209 := z.EncBinary() - _ = yym4209 + if yyq4216[0] { + yym4218 := z.EncBinary() + _ = yym4218 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -52545,23 +52623,23 @@ func (x *ComponentStatusList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4207[0] { + if yyq4216[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4210 := z.EncBinary() - _ = yym4210 + yym4219 := z.EncBinary() + _ = yym4219 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr4207 || yy2arr4207 { + if yyr4216 || yy2arr4216 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4207[1] { - yym4212 := z.EncBinary() - _ = yym4212 + if yyq4216[1] { + yym4221 := z.EncBinary() + _ = yym4221 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -52570,54 +52648,54 @@ func (x *ComponentStatusList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4207[1] { + if yyq4216[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4213 := z.EncBinary() - _ = yym4213 + yym4222 := z.EncBinary() + _ = yym4222 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr4207 || yy2arr4207 { + if yyr4216 || yy2arr4216 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4207[2] { - yy4215 := &x.ListMeta - yym4216 := z.EncBinary() - _ = yym4216 + if yyq4216[2] { + yy4224 := &x.ListMeta + yym4225 := z.EncBinary() + _ = yym4225 if false { - } else if z.HasExtensions() && z.EncExt(yy4215) { + } else if z.HasExtensions() && z.EncExt(yy4224) { } else { - z.EncFallback(yy4215) + z.EncFallback(yy4224) } } else { r.EncodeNil() } } else { - if yyq4207[2] { + if yyq4216[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4217 := &x.ListMeta - yym4218 := z.EncBinary() - _ = yym4218 + yy4226 := &x.ListMeta + yym4227 := z.EncBinary() + _ = yym4227 if false { - } else if z.HasExtensions() && z.EncExt(yy4217) { + } else if z.HasExtensions() && z.EncExt(yy4226) { } else { - z.EncFallback(yy4217) + z.EncFallback(yy4226) } } } - if yyr4207 || yy2arr4207 { + if yyr4216 || yy2arr4216 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym4220 := z.EncBinary() - _ = yym4220 + yym4229 := z.EncBinary() + _ = yym4229 if false { } else { h.encSliceComponentStatus(([]ComponentStatus)(x.Items), e) @@ -52630,15 +52708,15 @@ func (x *ComponentStatusList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym4221 := z.EncBinary() - _ = yym4221 + yym4230 := z.EncBinary() + _ = yym4230 if false { } else { h.encSliceComponentStatus(([]ComponentStatus)(x.Items), e) } } } - if yyr4207 || yy2arr4207 { + if yyr4216 || yy2arr4216 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -52651,25 +52729,25 @@ func (x *ComponentStatusList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4222 := z.DecBinary() - _ = yym4222 + yym4231 := z.DecBinary() + _ = yym4231 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4223 := r.ContainerType() - if yyct4223 == codecSelferValueTypeMap1234 { - yyl4223 := r.ReadMapStart() - if yyl4223 == 0 { + yyct4232 := r.ContainerType() + if yyct4232 == codecSelferValueTypeMap1234 { + yyl4232 := r.ReadMapStart() + if yyl4232 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4223, d) + x.codecDecodeSelfFromMap(yyl4232, d) } - } else if yyct4223 == codecSelferValueTypeArray1234 { - yyl4223 := r.ReadArrayStart() - if yyl4223 == 0 { + } else if yyct4232 == codecSelferValueTypeArray1234 { + yyl4232 := r.ReadArrayStart() + if yyl4232 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4223, d) + x.codecDecodeSelfFromArray(yyl4232, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -52681,12 +52759,12 @@ func (x *ComponentStatusList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4224Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4224Slc - var yyhl4224 bool = l >= 0 - for yyj4224 := 0; ; yyj4224++ { - if yyhl4224 { - if yyj4224 >= l { + var yys4233Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys4233Slc + var yyhl4233 bool = l >= 0 + for yyj4233 := 0; ; yyj4233++ { + if yyhl4233 { + if yyj4233 >= l { break } } else { @@ -52695,10 +52773,10 @@ func (x *ComponentStatusList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4224Slc = r.DecodeBytes(yys4224Slc, true, true) - yys4224 := string(yys4224Slc) + yys4233Slc = r.DecodeBytes(yys4233Slc, true, true) + yys4233 := string(yys4233Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4224 { + switch yys4233 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -52715,31 +52793,31 @@ func (x *ComponentStatusList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv4227 := &x.ListMeta - yym4228 := z.DecBinary() - _ = yym4228 + yyv4236 := &x.ListMeta + yym4237 := z.DecBinary() + _ = yym4237 if false { - } else if z.HasExtensions() && z.DecExt(yyv4227) { + } else if z.HasExtensions() && z.DecExt(yyv4236) { } else { - z.DecFallback(yyv4227, false) + z.DecFallback(yyv4236, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4229 := &x.Items - yym4230 := z.DecBinary() - _ = yym4230 + yyv4238 := &x.Items + yym4239 := z.DecBinary() + _ = yym4239 if false { } else { - h.decSliceComponentStatus((*[]ComponentStatus)(yyv4229), d) + h.decSliceComponentStatus((*[]ComponentStatus)(yyv4238), d) } } default: - z.DecStructFieldNotFound(-1, yys4224) - } // end switch yys4224 - } // end for yyj4224 + z.DecStructFieldNotFound(-1, yys4233) + } // end switch yys4233 + } // end for yyj4233 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -52747,16 +52825,16 @@ func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4231 int - var yyb4231 bool - var yyhl4231 bool = l >= 0 - yyj4231++ - if yyhl4231 { - yyb4231 = yyj4231 > l + var yyj4240 int + var yyb4240 bool + var yyhl4240 bool = l >= 0 + yyj4240++ + if yyhl4240 { + yyb4240 = yyj4240 > l } else { - yyb4231 = r.CheckBreak() + yyb4240 = r.CheckBreak() } - if yyb4231 { + if yyb4240 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52766,13 +52844,13 @@ func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.Kind = string(r.DecodeString()) } - yyj4231++ - if yyhl4231 { - yyb4231 = yyj4231 > l + yyj4240++ + if yyhl4240 { + yyb4240 = yyj4240 > l } else { - yyb4231 = r.CheckBreak() + yyb4240 = r.CheckBreak() } - if yyb4231 { + if yyb4240 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52782,13 +52860,13 @@ func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.APIVersion = string(r.DecodeString()) } - yyj4231++ - if yyhl4231 { - yyb4231 = yyj4231 > l + yyj4240++ + if yyhl4240 { + yyb4240 = yyj4240 > l } else { - yyb4231 = r.CheckBreak() + yyb4240 = r.CheckBreak() } - if yyb4231 { + if yyb4240 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52796,22 +52874,22 @@ func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv4234 := &x.ListMeta - yym4235 := z.DecBinary() - _ = yym4235 + yyv4243 := &x.ListMeta + yym4244 := z.DecBinary() + _ = yym4244 if false { - } else if z.HasExtensions() && z.DecExt(yyv4234) { + } else if z.HasExtensions() && z.DecExt(yyv4243) { } else { - z.DecFallback(yyv4234, false) + z.DecFallback(yyv4243, false) } } - yyj4231++ - if yyhl4231 { - yyb4231 = yyj4231 > l + yyj4240++ + if yyhl4240 { + yyb4240 = yyj4240 > l } else { - yyb4231 = r.CheckBreak() + yyb4240 = r.CheckBreak() } - if yyb4231 { + if yyb4240 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52819,26 +52897,26 @@ func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4236 := &x.Items - yym4237 := z.DecBinary() - _ = yym4237 + yyv4245 := &x.Items + yym4246 := z.DecBinary() + _ = yym4246 if false { } else { - h.decSliceComponentStatus((*[]ComponentStatus)(yyv4236), d) + h.decSliceComponentStatus((*[]ComponentStatus)(yyv4245), d) } } for { - yyj4231++ - if yyhl4231 { - yyb4231 = yyj4231 > l + yyj4240++ + if yyhl4240 { + yyb4240 = yyj4240 > l } else { - yyb4231 = r.CheckBreak() + yyb4240 = r.CheckBreak() } - if yyb4231 { + if yyb4240 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4231-1, "") + z.DecStructFieldNotFound(yyj4240-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -52850,38 +52928,38 @@ func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4238 := z.EncBinary() - _ = yym4238 + yym4247 := z.EncBinary() + _ = yym4247 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4239 := !z.EncBinary() - yy2arr4239 := z.EncBasicHandle().StructToArray - var yyq4239 [6]bool - _, _, _ = yysep4239, yyq4239, yy2arr4239 - const yyr4239 bool = false - yyq4239[0] = x.Capabilities != nil - yyq4239[1] = x.Privileged != nil - yyq4239[2] = x.SELinuxOptions != nil - yyq4239[3] = x.RunAsUser != nil - yyq4239[4] = x.RunAsNonRoot != nil - yyq4239[5] = x.ReadOnlyRootFilesystem != nil - var yynn4239 int - if yyr4239 || yy2arr4239 { + yysep4248 := !z.EncBinary() + yy2arr4248 := z.EncBasicHandle().StructToArray + var yyq4248 [6]bool + _, _, _ = yysep4248, yyq4248, yy2arr4248 + const yyr4248 bool = false + yyq4248[0] = x.Capabilities != nil + yyq4248[1] = x.Privileged != nil + yyq4248[2] = x.SELinuxOptions != nil + yyq4248[3] = x.RunAsUser != nil + yyq4248[4] = x.RunAsNonRoot != nil + yyq4248[5] = x.ReadOnlyRootFilesystem != nil + var yynn4248 int + if yyr4248 || yy2arr4248 { r.EncodeArrayStart(6) } else { - yynn4239 = 0 - for _, b := range yyq4239 { + yynn4248 = 0 + for _, b := range yyq4248 { if b { - yynn4239++ + yynn4248++ } } - r.EncodeMapStart(yynn4239) - yynn4239 = 0 + r.EncodeMapStart(yynn4248) + yynn4248 = 0 } - if yyr4239 || yy2arr4239 { + if yyr4248 || yy2arr4248 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4239[0] { + if yyq4248[0] { if x.Capabilities == nil { r.EncodeNil() } else { @@ -52891,7 +52969,7 @@ func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4239[0] { + if yyq4248[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("capabilities")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -52902,44 +52980,44 @@ func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4239 || yy2arr4239 { + if yyr4248 || yy2arr4248 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4239[1] { + if yyq4248[1] { if x.Privileged == nil { r.EncodeNil() } else { - yy4242 := *x.Privileged - yym4243 := z.EncBinary() - _ = yym4243 + yy4251 := *x.Privileged + yym4252 := z.EncBinary() + _ = yym4252 if false { } else { - r.EncodeBool(bool(yy4242)) + r.EncodeBool(bool(yy4251)) } } } else { r.EncodeNil() } } else { - if yyq4239[1] { + if yyq4248[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("privileged")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Privileged == nil { r.EncodeNil() } else { - yy4244 := *x.Privileged - yym4245 := z.EncBinary() - _ = yym4245 + yy4253 := *x.Privileged + yym4254 := z.EncBinary() + _ = yym4254 if false { } else { - r.EncodeBool(bool(yy4244)) + r.EncodeBool(bool(yy4253)) } } } } - if yyr4239 || yy2arr4239 { + if yyr4248 || yy2arr4248 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4239[2] { + if yyq4248[2] { if x.SELinuxOptions == nil { r.EncodeNil() } else { @@ -52949,7 +53027,7 @@ func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4239[2] { + if yyq4248[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("seLinuxOptions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -52960,112 +53038,112 @@ func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4239 || yy2arr4239 { + if yyr4248 || yy2arr4248 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4239[3] { + if yyq4248[3] { if x.RunAsUser == nil { r.EncodeNil() } else { - yy4248 := *x.RunAsUser - yym4249 := z.EncBinary() - _ = yym4249 + yy4257 := *x.RunAsUser + yym4258 := z.EncBinary() + _ = yym4258 if false { } else { - r.EncodeInt(int64(yy4248)) + r.EncodeInt(int64(yy4257)) } } } else { r.EncodeNil() } } else { - if yyq4239[3] { + if yyq4248[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("runAsUser")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.RunAsUser == nil { r.EncodeNil() } else { - yy4250 := *x.RunAsUser - yym4251 := z.EncBinary() - _ = yym4251 + yy4259 := *x.RunAsUser + yym4260 := z.EncBinary() + _ = yym4260 if false { } else { - r.EncodeInt(int64(yy4250)) + r.EncodeInt(int64(yy4259)) } } } } - if yyr4239 || yy2arr4239 { + if yyr4248 || yy2arr4248 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4239[4] { + if yyq4248[4] { if x.RunAsNonRoot == nil { r.EncodeNil() } else { - yy4253 := *x.RunAsNonRoot - yym4254 := z.EncBinary() - _ = yym4254 + yy4262 := *x.RunAsNonRoot + yym4263 := z.EncBinary() + _ = yym4263 if false { } else { - r.EncodeBool(bool(yy4253)) + r.EncodeBool(bool(yy4262)) } } } else { r.EncodeNil() } } else { - if yyq4239[4] { + if yyq4248[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("runAsNonRoot")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.RunAsNonRoot == nil { r.EncodeNil() } else { - yy4255 := *x.RunAsNonRoot - yym4256 := z.EncBinary() - _ = yym4256 + yy4264 := *x.RunAsNonRoot + yym4265 := z.EncBinary() + _ = yym4265 if false { } else { - r.EncodeBool(bool(yy4255)) + r.EncodeBool(bool(yy4264)) } } } } - if yyr4239 || yy2arr4239 { + if yyr4248 || yy2arr4248 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4239[5] { + if yyq4248[5] { if x.ReadOnlyRootFilesystem == nil { r.EncodeNil() } else { - yy4258 := *x.ReadOnlyRootFilesystem - yym4259 := z.EncBinary() - _ = yym4259 + yy4267 := *x.ReadOnlyRootFilesystem + yym4268 := z.EncBinary() + _ = yym4268 if false { } else { - r.EncodeBool(bool(yy4258)) + r.EncodeBool(bool(yy4267)) } } } else { r.EncodeNil() } } else { - if yyq4239[5] { + if yyq4248[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("readOnlyRootFilesystem")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.ReadOnlyRootFilesystem == nil { r.EncodeNil() } else { - yy4260 := *x.ReadOnlyRootFilesystem - yym4261 := z.EncBinary() - _ = yym4261 + yy4269 := *x.ReadOnlyRootFilesystem + yym4270 := z.EncBinary() + _ = yym4270 if false { } else { - r.EncodeBool(bool(yy4260)) + r.EncodeBool(bool(yy4269)) } } } } - if yyr4239 || yy2arr4239 { + if yyr4248 || yy2arr4248 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -53078,25 +53156,25 @@ func (x *SecurityContext) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4262 := z.DecBinary() - _ = yym4262 + yym4271 := z.DecBinary() + _ = yym4271 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4263 := r.ContainerType() - if yyct4263 == codecSelferValueTypeMap1234 { - yyl4263 := r.ReadMapStart() - if yyl4263 == 0 { + yyct4272 := r.ContainerType() + if yyct4272 == codecSelferValueTypeMap1234 { + yyl4272 := r.ReadMapStart() + if yyl4272 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4263, d) + x.codecDecodeSelfFromMap(yyl4272, d) } - } else if yyct4263 == codecSelferValueTypeArray1234 { - yyl4263 := r.ReadArrayStart() - if yyl4263 == 0 { + } else if yyct4272 == codecSelferValueTypeArray1234 { + yyl4272 := r.ReadArrayStart() + if yyl4272 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4263, d) + x.codecDecodeSelfFromArray(yyl4272, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -53108,12 +53186,12 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4264Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4264Slc - var yyhl4264 bool = l >= 0 - for yyj4264 := 0; ; yyj4264++ { - if yyhl4264 { - if yyj4264 >= l { + var yys4273Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys4273Slc + var yyhl4273 bool = l >= 0 + for yyj4273 := 0; ; yyj4273++ { + if yyhl4273 { + if yyj4273 >= l { break } } else { @@ -53122,10 +53200,10 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4264Slc = r.DecodeBytes(yys4264Slc, true, true) - yys4264 := string(yys4264Slc) + yys4273Slc = r.DecodeBytes(yys4273Slc, true, true) + yys4273 := string(yys4273Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4264 { + switch yys4273 { case "capabilities": if r.TryDecodeAsNil() { if x.Capabilities != nil { @@ -53146,8 +53224,8 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.Privileged == nil { x.Privileged = new(bool) } - yym4267 := z.DecBinary() - _ = yym4267 + yym4276 := z.DecBinary() + _ = yym4276 if false { } else { *((*bool)(x.Privileged)) = r.DecodeBool() @@ -53173,8 +53251,8 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.RunAsUser == nil { x.RunAsUser = new(int64) } - yym4270 := z.DecBinary() - _ = yym4270 + yym4279 := z.DecBinary() + _ = yym4279 if false { } else { *((*int64)(x.RunAsUser)) = int64(r.DecodeInt(64)) @@ -53189,8 +53267,8 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.RunAsNonRoot == nil { x.RunAsNonRoot = new(bool) } - yym4272 := z.DecBinary() - _ = yym4272 + yym4281 := z.DecBinary() + _ = yym4281 if false { } else { *((*bool)(x.RunAsNonRoot)) = r.DecodeBool() @@ -53205,17 +53283,17 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.ReadOnlyRootFilesystem == nil { x.ReadOnlyRootFilesystem = new(bool) } - yym4274 := z.DecBinary() - _ = yym4274 + yym4283 := z.DecBinary() + _ = yym4283 if false { } else { *((*bool)(x.ReadOnlyRootFilesystem)) = r.DecodeBool() } } default: - z.DecStructFieldNotFound(-1, yys4264) - } // end switch yys4264 - } // end for yyj4264 + z.DecStructFieldNotFound(-1, yys4273) + } // end switch yys4273 + } // end for yyj4273 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -53223,16 +53301,16 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4275 int - var yyb4275 bool - var yyhl4275 bool = l >= 0 - yyj4275++ - if yyhl4275 { - yyb4275 = yyj4275 > l + var yyj4284 int + var yyb4284 bool + var yyhl4284 bool = l >= 0 + yyj4284++ + if yyhl4284 { + yyb4284 = yyj4284 > l } else { - yyb4275 = r.CheckBreak() + yyb4284 = r.CheckBreak() } - if yyb4275 { + if yyb4284 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53247,13 +53325,13 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } x.Capabilities.CodecDecodeSelf(d) } - yyj4275++ - if yyhl4275 { - yyb4275 = yyj4275 > l + yyj4284++ + if yyhl4284 { + yyb4284 = yyj4284 > l } else { - yyb4275 = r.CheckBreak() + yyb4284 = r.CheckBreak() } - if yyb4275 { + if yyb4284 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53266,20 +53344,20 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if x.Privileged == nil { x.Privileged = new(bool) } - yym4278 := z.DecBinary() - _ = yym4278 + yym4287 := z.DecBinary() + _ = yym4287 if false { } else { *((*bool)(x.Privileged)) = r.DecodeBool() } } - yyj4275++ - if yyhl4275 { - yyb4275 = yyj4275 > l + yyj4284++ + if yyhl4284 { + yyb4284 = yyj4284 > l } else { - yyb4275 = r.CheckBreak() + yyb4284 = r.CheckBreak() } - if yyb4275 { + if yyb4284 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53294,13 +53372,13 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } x.SELinuxOptions.CodecDecodeSelf(d) } - yyj4275++ - if yyhl4275 { - yyb4275 = yyj4275 > l + yyj4284++ + if yyhl4284 { + yyb4284 = yyj4284 > l } else { - yyb4275 = r.CheckBreak() + yyb4284 = r.CheckBreak() } - if yyb4275 { + if yyb4284 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53313,20 +53391,20 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if x.RunAsUser == nil { x.RunAsUser = new(int64) } - yym4281 := z.DecBinary() - _ = yym4281 + yym4290 := z.DecBinary() + _ = yym4290 if false { } else { *((*int64)(x.RunAsUser)) = int64(r.DecodeInt(64)) } } - yyj4275++ - if yyhl4275 { - yyb4275 = yyj4275 > l + yyj4284++ + if yyhl4284 { + yyb4284 = yyj4284 > l } else { - yyb4275 = r.CheckBreak() + yyb4284 = r.CheckBreak() } - if yyb4275 { + if yyb4284 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53339,20 +53417,20 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if x.RunAsNonRoot == nil { x.RunAsNonRoot = new(bool) } - yym4283 := z.DecBinary() - _ = yym4283 + yym4292 := z.DecBinary() + _ = yym4292 if false { } else { *((*bool)(x.RunAsNonRoot)) = r.DecodeBool() } } - yyj4275++ - if yyhl4275 { - yyb4275 = yyj4275 > l + yyj4284++ + if yyhl4284 { + yyb4284 = yyj4284 > l } else { - yyb4275 = r.CheckBreak() + yyb4284 = r.CheckBreak() } - if yyb4275 { + if yyb4284 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53365,25 +53443,25 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if x.ReadOnlyRootFilesystem == nil { x.ReadOnlyRootFilesystem = new(bool) } - yym4285 := z.DecBinary() - _ = yym4285 + yym4294 := z.DecBinary() + _ = yym4294 if false { } else { *((*bool)(x.ReadOnlyRootFilesystem)) = r.DecodeBool() } } for { - yyj4275++ - if yyhl4275 { - yyb4275 = yyj4275 > l + yyj4284++ + if yyhl4284 { + yyb4284 = yyj4284 > l } else { - yyb4275 = r.CheckBreak() + yyb4284 = r.CheckBreak() } - if yyb4275 { + if yyb4284 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4275-1, "") + z.DecStructFieldNotFound(yyj4284-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -53395,38 +53473,38 @@ func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4286 := z.EncBinary() - _ = yym4286 + yym4295 := z.EncBinary() + _ = yym4295 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4287 := !z.EncBinary() - yy2arr4287 := z.EncBasicHandle().StructToArray - var yyq4287 [4]bool - _, _, _ = yysep4287, yyq4287, yy2arr4287 - const yyr4287 bool = false - yyq4287[0] = x.User != "" - yyq4287[1] = x.Role != "" - yyq4287[2] = x.Type != "" - yyq4287[3] = x.Level != "" - var yynn4287 int - if yyr4287 || yy2arr4287 { + yysep4296 := !z.EncBinary() + yy2arr4296 := z.EncBasicHandle().StructToArray + var yyq4296 [4]bool + _, _, _ = yysep4296, yyq4296, yy2arr4296 + const yyr4296 bool = false + yyq4296[0] = x.User != "" + yyq4296[1] = x.Role != "" + yyq4296[2] = x.Type != "" + yyq4296[3] = x.Level != "" + var yynn4296 int + if yyr4296 || yy2arr4296 { r.EncodeArrayStart(4) } else { - yynn4287 = 0 - for _, b := range yyq4287 { + yynn4296 = 0 + for _, b := range yyq4296 { if b { - yynn4287++ + yynn4296++ } } - r.EncodeMapStart(yynn4287) - yynn4287 = 0 + r.EncodeMapStart(yynn4296) + yynn4296 = 0 } - if yyr4287 || yy2arr4287 { + if yyr4296 || yy2arr4296 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4287[0] { - yym4289 := z.EncBinary() - _ = yym4289 + if yyq4296[0] { + yym4298 := z.EncBinary() + _ = yym4298 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.User)) @@ -53435,23 +53513,23 @@ func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4287[0] { + if yyq4296[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("user")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4290 := z.EncBinary() - _ = yym4290 + yym4299 := z.EncBinary() + _ = yym4299 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.User)) } } } - if yyr4287 || yy2arr4287 { + if yyr4296 || yy2arr4296 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4287[1] { - yym4292 := z.EncBinary() - _ = yym4292 + if yyq4296[1] { + yym4301 := z.EncBinary() + _ = yym4301 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Role)) @@ -53460,23 +53538,23 @@ func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4287[1] { + if yyq4296[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("role")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4293 := z.EncBinary() - _ = yym4293 + yym4302 := z.EncBinary() + _ = yym4302 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Role)) } } } - if yyr4287 || yy2arr4287 { + if yyr4296 || yy2arr4296 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4287[2] { - yym4295 := z.EncBinary() - _ = yym4295 + if yyq4296[2] { + yym4304 := z.EncBinary() + _ = yym4304 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Type)) @@ -53485,23 +53563,23 @@ func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4287[2] { + if yyq4296[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("type")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4296 := z.EncBinary() - _ = yym4296 + yym4305 := z.EncBinary() + _ = yym4305 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Type)) } } } - if yyr4287 || yy2arr4287 { + if yyr4296 || yy2arr4296 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4287[3] { - yym4298 := z.EncBinary() - _ = yym4298 + if yyq4296[3] { + yym4307 := z.EncBinary() + _ = yym4307 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Level)) @@ -53510,19 +53588,19 @@ func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4287[3] { + if yyq4296[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("level")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4299 := z.EncBinary() - _ = yym4299 + yym4308 := z.EncBinary() + _ = yym4308 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Level)) } } } - if yyr4287 || yy2arr4287 { + if yyr4296 || yy2arr4296 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -53535,25 +53613,25 @@ func (x *SELinuxOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4300 := z.DecBinary() - _ = yym4300 + yym4309 := z.DecBinary() + _ = yym4309 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4301 := r.ContainerType() - if yyct4301 == codecSelferValueTypeMap1234 { - yyl4301 := r.ReadMapStart() - if yyl4301 == 0 { + yyct4310 := r.ContainerType() + if yyct4310 == codecSelferValueTypeMap1234 { + yyl4310 := r.ReadMapStart() + if yyl4310 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4301, d) + x.codecDecodeSelfFromMap(yyl4310, d) } - } else if yyct4301 == codecSelferValueTypeArray1234 { - yyl4301 := r.ReadArrayStart() - if yyl4301 == 0 { + } else if yyct4310 == codecSelferValueTypeArray1234 { + yyl4310 := r.ReadArrayStart() + if yyl4310 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4301, d) + x.codecDecodeSelfFromArray(yyl4310, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -53565,12 +53643,12 @@ func (x *SELinuxOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4302Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4302Slc - var yyhl4302 bool = l >= 0 - for yyj4302 := 0; ; yyj4302++ { - if yyhl4302 { - if yyj4302 >= l { + var yys4311Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys4311Slc + var yyhl4311 bool = l >= 0 + for yyj4311 := 0; ; yyj4311++ { + if yyhl4311 { + if yyj4311 >= l { break } } else { @@ -53579,10 +53657,10 @@ func (x *SELinuxOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4302Slc = r.DecodeBytes(yys4302Slc, true, true) - yys4302 := string(yys4302Slc) + yys4311Slc = r.DecodeBytes(yys4311Slc, true, true) + yys4311 := string(yys4311Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4302 { + switch yys4311 { case "user": if r.TryDecodeAsNil() { x.User = "" @@ -53608,9 +53686,9 @@ func (x *SELinuxOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Level = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys4302) - } // end switch yys4302 - } // end for yyj4302 + z.DecStructFieldNotFound(-1, yys4311) + } // end switch yys4311 + } // end for yyj4311 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -53618,16 +53696,16 @@ func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4307 int - var yyb4307 bool - var yyhl4307 bool = l >= 0 - yyj4307++ - if yyhl4307 { - yyb4307 = yyj4307 > l + var yyj4316 int + var yyb4316 bool + var yyhl4316 bool = l >= 0 + yyj4316++ + if yyhl4316 { + yyb4316 = yyj4316 > l } else { - yyb4307 = r.CheckBreak() + yyb4316 = r.CheckBreak() } - if yyb4307 { + if yyb4316 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53637,13 +53715,13 @@ func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.User = string(r.DecodeString()) } - yyj4307++ - if yyhl4307 { - yyb4307 = yyj4307 > l + yyj4316++ + if yyhl4316 { + yyb4316 = yyj4316 > l } else { - yyb4307 = r.CheckBreak() + yyb4316 = r.CheckBreak() } - if yyb4307 { + if yyb4316 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53653,13 +53731,13 @@ func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Role = string(r.DecodeString()) } - yyj4307++ - if yyhl4307 { - yyb4307 = yyj4307 > l + yyj4316++ + if yyhl4316 { + yyb4316 = yyj4316 > l } else { - yyb4307 = r.CheckBreak() + yyb4316 = r.CheckBreak() } - if yyb4307 { + if yyb4316 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53669,13 +53747,13 @@ func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Type = string(r.DecodeString()) } - yyj4307++ - if yyhl4307 { - yyb4307 = yyj4307 > l + yyj4316++ + if yyhl4316 { + yyb4316 = yyj4316 > l } else { - yyb4307 = r.CheckBreak() + yyb4316 = r.CheckBreak() } - if yyb4307 { + if yyb4316 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53686,17 +53764,17 @@ func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Level = string(r.DecodeString()) } for { - yyj4307++ - if yyhl4307 { - yyb4307 = yyj4307 > l + yyj4316++ + if yyhl4316 { + yyb4316 = yyj4316 > l } else { - yyb4307 = r.CheckBreak() + yyb4316 = r.CheckBreak() } - if yyb4307 { + if yyb4316 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4307-1, "") + z.DecStructFieldNotFound(yyj4316-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -53708,37 +53786,37 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4312 := z.EncBinary() - _ = yym4312 + yym4321 := z.EncBinary() + _ = yym4321 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4313 := !z.EncBinary() - yy2arr4313 := z.EncBasicHandle().StructToArray - var yyq4313 [5]bool - _, _, _ = yysep4313, yyq4313, yy2arr4313 - const yyr4313 bool = false - yyq4313[0] = x.Kind != "" - yyq4313[1] = x.APIVersion != "" - yyq4313[2] = true - var yynn4313 int - if yyr4313 || yy2arr4313 { + yysep4322 := !z.EncBinary() + yy2arr4322 := z.EncBasicHandle().StructToArray + var yyq4322 [5]bool + _, _, _ = yysep4322, yyq4322, yy2arr4322 + const yyr4322 bool = false + yyq4322[0] = x.Kind != "" + yyq4322[1] = x.APIVersion != "" + yyq4322[2] = true + var yynn4322 int + if yyr4322 || yy2arr4322 { r.EncodeArrayStart(5) } else { - yynn4313 = 2 - for _, b := range yyq4313 { + yynn4322 = 2 + for _, b := range yyq4322 { if b { - yynn4313++ + yynn4322++ } } - r.EncodeMapStart(yynn4313) - yynn4313 = 0 + r.EncodeMapStart(yynn4322) + yynn4322 = 0 } - if yyr4313 || yy2arr4313 { + if yyr4322 || yy2arr4322 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4313[0] { - yym4315 := z.EncBinary() - _ = yym4315 + if yyq4322[0] { + yym4324 := z.EncBinary() + _ = yym4324 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -53747,23 +53825,23 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4313[0] { + if yyq4322[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4316 := z.EncBinary() - _ = yym4316 + yym4325 := z.EncBinary() + _ = yym4325 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr4313 || yy2arr4313 { + if yyr4322 || yy2arr4322 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4313[1] { - yym4318 := z.EncBinary() - _ = yym4318 + if yyq4322[1] { + yym4327 := z.EncBinary() + _ = yym4327 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -53772,39 +53850,39 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4313[1] { + if yyq4322[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4319 := z.EncBinary() - _ = yym4319 + yym4328 := z.EncBinary() + _ = yym4328 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr4313 || yy2arr4313 { + if yyr4322 || yy2arr4322 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4313[2] { - yy4321 := &x.ObjectMeta - yy4321.CodecEncodeSelf(e) + if yyq4322[2] { + yy4330 := &x.ObjectMeta + yy4330.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq4313[2] { + if yyq4322[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4322 := &x.ObjectMeta - yy4322.CodecEncodeSelf(e) + yy4331 := &x.ObjectMeta + yy4331.CodecEncodeSelf(e) } } - if yyr4313 || yy2arr4313 { + if yyr4322 || yy2arr4322 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym4324 := z.EncBinary() - _ = yym4324 + yym4333 := z.EncBinary() + _ = yym4333 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Range)) @@ -53813,20 +53891,20 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("range")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4325 := z.EncBinary() - _ = yym4325 + yym4334 := z.EncBinary() + _ = yym4334 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Range)) } } - if yyr4313 || yy2arr4313 { + if yyr4322 || yy2arr4322 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Data == nil { r.EncodeNil() } else { - yym4327 := z.EncBinary() - _ = yym4327 + yym4336 := z.EncBinary() + _ = yym4336 if false { } else { r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data)) @@ -53839,15 +53917,15 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { if x.Data == nil { r.EncodeNil() } else { - yym4328 := z.EncBinary() - _ = yym4328 + yym4337 := z.EncBinary() + _ = yym4337 if false { } else { r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data)) } } } - if yyr4313 || yy2arr4313 { + if yyr4322 || yy2arr4322 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -53860,25 +53938,25 @@ func (x *RangeAllocation) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4329 := z.DecBinary() - _ = yym4329 + yym4338 := z.DecBinary() + _ = yym4338 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4330 := r.ContainerType() - if yyct4330 == codecSelferValueTypeMap1234 { - yyl4330 := r.ReadMapStart() - if yyl4330 == 0 { + yyct4339 := r.ContainerType() + if yyct4339 == codecSelferValueTypeMap1234 { + yyl4339 := r.ReadMapStart() + if yyl4339 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4330, d) + x.codecDecodeSelfFromMap(yyl4339, d) } - } else if yyct4330 == codecSelferValueTypeArray1234 { - yyl4330 := r.ReadArrayStart() - if yyl4330 == 0 { + } else if yyct4339 == codecSelferValueTypeArray1234 { + yyl4339 := r.ReadArrayStart() + if yyl4339 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4330, d) + x.codecDecodeSelfFromArray(yyl4339, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -53890,12 +53968,12 @@ func (x *RangeAllocation) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4331Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4331Slc - var yyhl4331 bool = l >= 0 - for yyj4331 := 0; ; yyj4331++ { - if yyhl4331 { - if yyj4331 >= l { + var yys4340Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys4340Slc + var yyhl4340 bool = l >= 0 + for yyj4340 := 0; ; yyj4340++ { + if yyhl4340 { + if yyj4340 >= l { break } } else { @@ -53904,10 +53982,10 @@ func (x *RangeAllocation) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4331Slc = r.DecodeBytes(yys4331Slc, true, true) - yys4331 := string(yys4331Slc) + yys4340Slc = r.DecodeBytes(yys4340Slc, true, true) + yys4340 := string(yys4340Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4331 { + switch yys4340 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -53924,8 +54002,8 @@ func (x *RangeAllocation) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv4334 := &x.ObjectMeta - yyv4334.CodecDecodeSelf(d) + yyv4343 := &x.ObjectMeta + yyv4343.CodecDecodeSelf(d) } case "range": if r.TryDecodeAsNil() { @@ -53937,18 +54015,18 @@ func (x *RangeAllocation) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Data = nil } else { - yyv4336 := &x.Data - yym4337 := z.DecBinary() - _ = yym4337 + yyv4345 := &x.Data + yym4346 := z.DecBinary() + _ = yym4346 if false { } else { - *yyv4336 = r.DecodeBytes(*(*[]byte)(yyv4336), false, false) + *yyv4345 = r.DecodeBytes(*(*[]byte)(yyv4345), false, false) } } default: - z.DecStructFieldNotFound(-1, yys4331) - } // end switch yys4331 - } // end for yyj4331 + z.DecStructFieldNotFound(-1, yys4340) + } // end switch yys4340 + } // end for yyj4340 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -53956,16 +54034,16 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4338 int - var yyb4338 bool - var yyhl4338 bool = l >= 0 - yyj4338++ - if yyhl4338 { - yyb4338 = yyj4338 > l + var yyj4347 int + var yyb4347 bool + var yyhl4347 bool = l >= 0 + yyj4347++ + if yyhl4347 { + yyb4347 = yyj4347 > l } else { - yyb4338 = r.CheckBreak() + yyb4347 = r.CheckBreak() } - if yyb4338 { + if yyb4347 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53975,13 +54053,13 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj4338++ - if yyhl4338 { - yyb4338 = yyj4338 > l + yyj4347++ + if yyhl4347 { + yyb4347 = yyj4347 > l } else { - yyb4338 = r.CheckBreak() + yyb4347 = r.CheckBreak() } - if yyb4338 { + if yyb4347 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53991,13 +54069,13 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj4338++ - if yyhl4338 { - yyb4338 = yyj4338 > l + yyj4347++ + if yyhl4347 { + yyb4347 = yyj4347 > l } else { - yyb4338 = r.CheckBreak() + yyb4347 = r.CheckBreak() } - if yyb4338 { + if yyb4347 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -54005,16 +54083,16 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv4341 := &x.ObjectMeta - yyv4341.CodecDecodeSelf(d) + yyv4350 := &x.ObjectMeta + yyv4350.CodecDecodeSelf(d) } - yyj4338++ - if yyhl4338 { - yyb4338 = yyj4338 > l + yyj4347++ + if yyhl4347 { + yyb4347 = yyj4347 > l } else { - yyb4338 = r.CheckBreak() + yyb4347 = r.CheckBreak() } - if yyb4338 { + if yyb4347 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -54024,13 +54102,13 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Range = string(r.DecodeString()) } - yyj4338++ - if yyhl4338 { - yyb4338 = yyj4338 > l + yyj4347++ + if yyhl4347 { + yyb4347 = yyj4347 > l } else { - yyb4338 = r.CheckBreak() + yyb4347 = r.CheckBreak() } - if yyb4338 { + if yyb4347 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -54038,26 +54116,26 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Data = nil } else { - yyv4343 := &x.Data - yym4344 := z.DecBinary() - _ = yym4344 + yyv4352 := &x.Data + yym4353 := z.DecBinary() + _ = yym4353 if false { } else { - *yyv4343 = r.DecodeBytes(*(*[]byte)(yyv4343), false, false) + *yyv4352 = r.DecodeBytes(*(*[]byte)(yyv4352), false, false) } } for { - yyj4338++ - if yyhl4338 { - yyb4338 = yyj4338 > l + yyj4347++ + if yyhl4347 { + yyb4347 = yyj4347 > l } else { - yyb4338 = r.CheckBreak() + yyb4347 = r.CheckBreak() } - if yyb4338 { + if yyb4347 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4338-1, "") + z.DecStructFieldNotFound(yyj4347-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -54067,10 +54145,10 @@ func (x codecSelfer1234) encSliceOwnerReference(v []OwnerReference, e *codec1978 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4345 := range v { + for _, yyv4354 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4346 := &yyv4345 - yy4346.CodecEncodeSelf(e) + yy4355 := &yyv4354 + yy4355.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -54080,83 +54158,83 @@ func (x codecSelfer1234) decSliceOwnerReference(v *[]OwnerReference, d *codec197 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4347 := *v - yyh4347, yyl4347 := z.DecSliceHelperStart() - var yyc4347 bool - if yyl4347 == 0 { - if yyv4347 == nil { - yyv4347 = []OwnerReference{} - yyc4347 = true - } else if len(yyv4347) != 0 { - yyv4347 = yyv4347[:0] - yyc4347 = true + yyv4356 := *v + yyh4356, yyl4356 := z.DecSliceHelperStart() + var yyc4356 bool + if yyl4356 == 0 { + if yyv4356 == nil { + yyv4356 = []OwnerReference{} + yyc4356 = true + } else if len(yyv4356) != 0 { + yyv4356 = yyv4356[:0] + yyc4356 = true } - } else if yyl4347 > 0 { - var yyrr4347, yyrl4347 int - var yyrt4347 bool - if yyl4347 > cap(yyv4347) { + } else if yyl4356 > 0 { + var yyrr4356, yyrl4356 int + var yyrt4356 bool + if yyl4356 > cap(yyv4356) { - yyrg4347 := len(yyv4347) > 0 - yyv24347 := yyv4347 - yyrl4347, yyrt4347 = z.DecInferLen(yyl4347, z.DecBasicHandle().MaxInitLen, 72) - if yyrt4347 { - if yyrl4347 <= cap(yyv4347) { - yyv4347 = yyv4347[:yyrl4347] + yyrg4356 := len(yyv4356) > 0 + yyv24356 := yyv4356 + yyrl4356, yyrt4356 = z.DecInferLen(yyl4356, z.DecBasicHandle().MaxInitLen, 72) + if yyrt4356 { + if yyrl4356 <= cap(yyv4356) { + yyv4356 = yyv4356[:yyrl4356] } else { - yyv4347 = make([]OwnerReference, yyrl4347) + yyv4356 = make([]OwnerReference, yyrl4356) } } else { - yyv4347 = make([]OwnerReference, yyrl4347) + yyv4356 = make([]OwnerReference, yyrl4356) } - yyc4347 = true - yyrr4347 = len(yyv4347) - if yyrg4347 { - copy(yyv4347, yyv24347) + yyc4356 = true + yyrr4356 = len(yyv4356) + if yyrg4356 { + copy(yyv4356, yyv24356) } - } else if yyl4347 != len(yyv4347) { - yyv4347 = yyv4347[:yyl4347] - yyc4347 = true + } else if yyl4356 != len(yyv4356) { + yyv4356 = yyv4356[:yyl4356] + yyc4356 = true } - yyj4347 := 0 - for ; yyj4347 < yyrr4347; yyj4347++ { - yyh4347.ElemContainerState(yyj4347) + yyj4356 := 0 + for ; yyj4356 < yyrr4356; yyj4356++ { + yyh4356.ElemContainerState(yyj4356) if r.TryDecodeAsNil() { - yyv4347[yyj4347] = OwnerReference{} + yyv4356[yyj4356] = OwnerReference{} } else { - yyv4348 := &yyv4347[yyj4347] - yyv4348.CodecDecodeSelf(d) + yyv4357 := &yyv4356[yyj4356] + yyv4357.CodecDecodeSelf(d) } } - if yyrt4347 { - for ; yyj4347 < yyl4347; yyj4347++ { - yyv4347 = append(yyv4347, OwnerReference{}) - yyh4347.ElemContainerState(yyj4347) + if yyrt4356 { + for ; yyj4356 < yyl4356; yyj4356++ { + yyv4356 = append(yyv4356, OwnerReference{}) + yyh4356.ElemContainerState(yyj4356) if r.TryDecodeAsNil() { - yyv4347[yyj4347] = OwnerReference{} + yyv4356[yyj4356] = OwnerReference{} } else { - yyv4349 := &yyv4347[yyj4347] - yyv4349.CodecDecodeSelf(d) + yyv4358 := &yyv4356[yyj4356] + yyv4358.CodecDecodeSelf(d) } } } } else { - yyj4347 := 0 - for ; !r.CheckBreak(); yyj4347++ { + yyj4356 := 0 + for ; !r.CheckBreak(); yyj4356++ { - if yyj4347 >= len(yyv4347) { - yyv4347 = append(yyv4347, OwnerReference{}) // var yyz4347 OwnerReference - yyc4347 = true + if yyj4356 >= len(yyv4356) { + yyv4356 = append(yyv4356, OwnerReference{}) // var yyz4356 OwnerReference + yyc4356 = true } - yyh4347.ElemContainerState(yyj4347) - if yyj4347 < len(yyv4347) { + yyh4356.ElemContainerState(yyj4356) + if yyj4356 < len(yyv4356) { if r.TryDecodeAsNil() { - yyv4347[yyj4347] = OwnerReference{} + yyv4356[yyj4356] = OwnerReference{} } else { - yyv4350 := &yyv4347[yyj4347] - yyv4350.CodecDecodeSelf(d) + yyv4359 := &yyv4356[yyj4356] + yyv4359.CodecDecodeSelf(d) } } else { @@ -54164,17 +54242,17 @@ func (x codecSelfer1234) decSliceOwnerReference(v *[]OwnerReference, d *codec197 } } - if yyj4347 < len(yyv4347) { - yyv4347 = yyv4347[:yyj4347] - yyc4347 = true - } else if yyj4347 == 0 && yyv4347 == nil { - yyv4347 = []OwnerReference{} - yyc4347 = true + if yyj4356 < len(yyv4356) { + yyv4356 = yyv4356[:yyj4356] + yyc4356 = true + } else if yyj4356 == 0 && yyv4356 == nil { + yyv4356 = []OwnerReference{} + yyc4356 = true } } - yyh4347.End() - if yyc4347 { - *v = yyv4347 + yyh4356.End() + if yyc4356 { + *v = yyv4356 } } @@ -54183,9 +54261,9 @@ func (x codecSelfer1234) encSlicePersistentVolumeAccessMode(v []PersistentVolume z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4351 := range v { + for _, yyv4360 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yyv4351.CodecEncodeSelf(e) + yyv4360.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -54195,75 +54273,75 @@ func (x codecSelfer1234) decSlicePersistentVolumeAccessMode(v *[]PersistentVolum z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4352 := *v - yyh4352, yyl4352 := z.DecSliceHelperStart() - var yyc4352 bool - if yyl4352 == 0 { - if yyv4352 == nil { - yyv4352 = []PersistentVolumeAccessMode{} - yyc4352 = true - } else if len(yyv4352) != 0 { - yyv4352 = yyv4352[:0] - yyc4352 = true + yyv4361 := *v + yyh4361, yyl4361 := z.DecSliceHelperStart() + var yyc4361 bool + if yyl4361 == 0 { + if yyv4361 == nil { + yyv4361 = []PersistentVolumeAccessMode{} + yyc4361 = true + } else if len(yyv4361) != 0 { + yyv4361 = yyv4361[:0] + yyc4361 = true } - } else if yyl4352 > 0 { - var yyrr4352, yyrl4352 int - var yyrt4352 bool - if yyl4352 > cap(yyv4352) { + } else if yyl4361 > 0 { + var yyrr4361, yyrl4361 int + var yyrt4361 bool + if yyl4361 > cap(yyv4361) { - yyrl4352, yyrt4352 = z.DecInferLen(yyl4352, z.DecBasicHandle().MaxInitLen, 16) - if yyrt4352 { - if yyrl4352 <= cap(yyv4352) { - yyv4352 = yyv4352[:yyrl4352] + yyrl4361, yyrt4361 = z.DecInferLen(yyl4361, z.DecBasicHandle().MaxInitLen, 16) + if yyrt4361 { + if yyrl4361 <= cap(yyv4361) { + yyv4361 = yyv4361[:yyrl4361] } else { - yyv4352 = make([]PersistentVolumeAccessMode, yyrl4352) + yyv4361 = make([]PersistentVolumeAccessMode, yyrl4361) } } else { - yyv4352 = make([]PersistentVolumeAccessMode, yyrl4352) + yyv4361 = make([]PersistentVolumeAccessMode, yyrl4361) } - yyc4352 = true - yyrr4352 = len(yyv4352) - } else if yyl4352 != len(yyv4352) { - yyv4352 = yyv4352[:yyl4352] - yyc4352 = true + yyc4361 = true + yyrr4361 = len(yyv4361) + } else if yyl4361 != len(yyv4361) { + yyv4361 = yyv4361[:yyl4361] + yyc4361 = true } - yyj4352 := 0 - for ; yyj4352 < yyrr4352; yyj4352++ { - yyh4352.ElemContainerState(yyj4352) + yyj4361 := 0 + for ; yyj4361 < yyrr4361; yyj4361++ { + yyh4361.ElemContainerState(yyj4361) if r.TryDecodeAsNil() { - yyv4352[yyj4352] = "" + yyv4361[yyj4361] = "" } else { - yyv4352[yyj4352] = PersistentVolumeAccessMode(r.DecodeString()) + yyv4361[yyj4361] = PersistentVolumeAccessMode(r.DecodeString()) } } - if yyrt4352 { - for ; yyj4352 < yyl4352; yyj4352++ { - yyv4352 = append(yyv4352, "") - yyh4352.ElemContainerState(yyj4352) + if yyrt4361 { + for ; yyj4361 < yyl4361; yyj4361++ { + yyv4361 = append(yyv4361, "") + yyh4361.ElemContainerState(yyj4361) if r.TryDecodeAsNil() { - yyv4352[yyj4352] = "" + yyv4361[yyj4361] = "" } else { - yyv4352[yyj4352] = PersistentVolumeAccessMode(r.DecodeString()) + yyv4361[yyj4361] = PersistentVolumeAccessMode(r.DecodeString()) } } } } else { - yyj4352 := 0 - for ; !r.CheckBreak(); yyj4352++ { + yyj4361 := 0 + for ; !r.CheckBreak(); yyj4361++ { - if yyj4352 >= len(yyv4352) { - yyv4352 = append(yyv4352, "") // var yyz4352 PersistentVolumeAccessMode - yyc4352 = true + if yyj4361 >= len(yyv4361) { + yyv4361 = append(yyv4361, "") // var yyz4361 PersistentVolumeAccessMode + yyc4361 = true } - yyh4352.ElemContainerState(yyj4352) - if yyj4352 < len(yyv4352) { + yyh4361.ElemContainerState(yyj4361) + if yyj4361 < len(yyv4361) { if r.TryDecodeAsNil() { - yyv4352[yyj4352] = "" + yyv4361[yyj4361] = "" } else { - yyv4352[yyj4352] = PersistentVolumeAccessMode(r.DecodeString()) + yyv4361[yyj4361] = PersistentVolumeAccessMode(r.DecodeString()) } } else { @@ -54271,17 +54349,17 @@ func (x codecSelfer1234) decSlicePersistentVolumeAccessMode(v *[]PersistentVolum } } - if yyj4352 < len(yyv4352) { - yyv4352 = yyv4352[:yyj4352] - yyc4352 = true - } else if yyj4352 == 0 && yyv4352 == nil { - yyv4352 = []PersistentVolumeAccessMode{} - yyc4352 = true + if yyj4361 < len(yyv4361) { + yyv4361 = yyv4361[:yyj4361] + yyc4361 = true + } else if yyj4361 == 0 && yyv4361 == nil { + yyv4361 = []PersistentVolumeAccessMode{} + yyc4361 = true } } - yyh4352.End() - if yyc4352 { - *v = yyv4352 + yyh4361.End() + if yyc4361 { + *v = yyv4361 } } @@ -54290,10 +54368,10 @@ func (x codecSelfer1234) encSlicePersistentVolume(v []PersistentVolume, e *codec z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4356 := range v { + for _, yyv4365 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4357 := &yyv4356 - yy4357.CodecEncodeSelf(e) + yy4366 := &yyv4365 + yy4366.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -54303,83 +54381,83 @@ func (x codecSelfer1234) decSlicePersistentVolume(v *[]PersistentVolume, d *code z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4358 := *v - yyh4358, yyl4358 := z.DecSliceHelperStart() - var yyc4358 bool - if yyl4358 == 0 { - if yyv4358 == nil { - yyv4358 = []PersistentVolume{} - yyc4358 = true - } else if len(yyv4358) != 0 { - yyv4358 = yyv4358[:0] - yyc4358 = true + yyv4367 := *v + yyh4367, yyl4367 := z.DecSliceHelperStart() + var yyc4367 bool + if yyl4367 == 0 { + if yyv4367 == nil { + yyv4367 = []PersistentVolume{} + yyc4367 = true + } else if len(yyv4367) != 0 { + yyv4367 = yyv4367[:0] + yyc4367 = true } - } else if yyl4358 > 0 { - var yyrr4358, yyrl4358 int - var yyrt4358 bool - if yyl4358 > cap(yyv4358) { + } else if yyl4367 > 0 { + var yyrr4367, yyrl4367 int + var yyrt4367 bool + if yyl4367 > cap(yyv4367) { - yyrg4358 := len(yyv4358) > 0 - yyv24358 := yyv4358 - yyrl4358, yyrt4358 = z.DecInferLen(yyl4358, z.DecBasicHandle().MaxInitLen, 456) - if yyrt4358 { - if yyrl4358 <= cap(yyv4358) { - yyv4358 = yyv4358[:yyrl4358] + yyrg4367 := len(yyv4367) > 0 + yyv24367 := yyv4367 + yyrl4367, yyrt4367 = z.DecInferLen(yyl4367, z.DecBasicHandle().MaxInitLen, 456) + if yyrt4367 { + if yyrl4367 <= cap(yyv4367) { + yyv4367 = yyv4367[:yyrl4367] } else { - yyv4358 = make([]PersistentVolume, yyrl4358) + yyv4367 = make([]PersistentVolume, yyrl4367) } } else { - yyv4358 = make([]PersistentVolume, yyrl4358) + yyv4367 = make([]PersistentVolume, yyrl4367) } - yyc4358 = true - yyrr4358 = len(yyv4358) - if yyrg4358 { - copy(yyv4358, yyv24358) + yyc4367 = true + yyrr4367 = len(yyv4367) + if yyrg4367 { + copy(yyv4367, yyv24367) } - } else if yyl4358 != len(yyv4358) { - yyv4358 = yyv4358[:yyl4358] - yyc4358 = true + } else if yyl4367 != len(yyv4367) { + yyv4367 = yyv4367[:yyl4367] + yyc4367 = true } - yyj4358 := 0 - for ; yyj4358 < yyrr4358; yyj4358++ { - yyh4358.ElemContainerState(yyj4358) + yyj4367 := 0 + for ; yyj4367 < yyrr4367; yyj4367++ { + yyh4367.ElemContainerState(yyj4367) if r.TryDecodeAsNil() { - yyv4358[yyj4358] = PersistentVolume{} + yyv4367[yyj4367] = PersistentVolume{} } else { - yyv4359 := &yyv4358[yyj4358] - yyv4359.CodecDecodeSelf(d) + yyv4368 := &yyv4367[yyj4367] + yyv4368.CodecDecodeSelf(d) } } - if yyrt4358 { - for ; yyj4358 < yyl4358; yyj4358++ { - yyv4358 = append(yyv4358, PersistentVolume{}) - yyh4358.ElemContainerState(yyj4358) + if yyrt4367 { + for ; yyj4367 < yyl4367; yyj4367++ { + yyv4367 = append(yyv4367, PersistentVolume{}) + yyh4367.ElemContainerState(yyj4367) if r.TryDecodeAsNil() { - yyv4358[yyj4358] = PersistentVolume{} + yyv4367[yyj4367] = PersistentVolume{} } else { - yyv4360 := &yyv4358[yyj4358] - yyv4360.CodecDecodeSelf(d) + yyv4369 := &yyv4367[yyj4367] + yyv4369.CodecDecodeSelf(d) } } } } else { - yyj4358 := 0 - for ; !r.CheckBreak(); yyj4358++ { + yyj4367 := 0 + for ; !r.CheckBreak(); yyj4367++ { - if yyj4358 >= len(yyv4358) { - yyv4358 = append(yyv4358, PersistentVolume{}) // var yyz4358 PersistentVolume - yyc4358 = true + if yyj4367 >= len(yyv4367) { + yyv4367 = append(yyv4367, PersistentVolume{}) // var yyz4367 PersistentVolume + yyc4367 = true } - yyh4358.ElemContainerState(yyj4358) - if yyj4358 < len(yyv4358) { + yyh4367.ElemContainerState(yyj4367) + if yyj4367 < len(yyv4367) { if r.TryDecodeAsNil() { - yyv4358[yyj4358] = PersistentVolume{} + yyv4367[yyj4367] = PersistentVolume{} } else { - yyv4361 := &yyv4358[yyj4358] - yyv4361.CodecDecodeSelf(d) + yyv4370 := &yyv4367[yyj4367] + yyv4370.CodecDecodeSelf(d) } } else { @@ -54387,17 +54465,17 @@ func (x codecSelfer1234) decSlicePersistentVolume(v *[]PersistentVolume, d *code } } - if yyj4358 < len(yyv4358) { - yyv4358 = yyv4358[:yyj4358] - yyc4358 = true - } else if yyj4358 == 0 && yyv4358 == nil { - yyv4358 = []PersistentVolume{} - yyc4358 = true + if yyj4367 < len(yyv4367) { + yyv4367 = yyv4367[:yyj4367] + yyc4367 = true + } else if yyj4367 == 0 && yyv4367 == nil { + yyv4367 = []PersistentVolume{} + yyc4367 = true } } - yyh4358.End() - if yyc4358 { - *v = yyv4358 + yyh4367.End() + if yyc4367 { + *v = yyv4367 } } @@ -54406,10 +54484,10 @@ func (x codecSelfer1234) encSlicePersistentVolumeClaim(v []PersistentVolumeClaim z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4362 := range v { + for _, yyv4371 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4363 := &yyv4362 - yy4363.CodecEncodeSelf(e) + yy4372 := &yyv4371 + yy4372.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -54419,83 +54497,83 @@ func (x codecSelfer1234) decSlicePersistentVolumeClaim(v *[]PersistentVolumeClai z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4364 := *v - yyh4364, yyl4364 := z.DecSliceHelperStart() - var yyc4364 bool - if yyl4364 == 0 { - if yyv4364 == nil { - yyv4364 = []PersistentVolumeClaim{} - yyc4364 = true - } else if len(yyv4364) != 0 { - yyv4364 = yyv4364[:0] - yyc4364 = true + yyv4373 := *v + yyh4373, yyl4373 := z.DecSliceHelperStart() + var yyc4373 bool + if yyl4373 == 0 { + if yyv4373 == nil { + yyv4373 = []PersistentVolumeClaim{} + yyc4373 = true + } else if len(yyv4373) != 0 { + yyv4373 = yyv4373[:0] + yyc4373 = true } - } else if yyl4364 > 0 { - var yyrr4364, yyrl4364 int - var yyrt4364 bool - if yyl4364 > cap(yyv4364) { + } else if yyl4373 > 0 { + var yyrr4373, yyrl4373 int + var yyrt4373 bool + if yyl4373 > cap(yyv4373) { - yyrg4364 := len(yyv4364) > 0 - yyv24364 := yyv4364 - yyrl4364, yyrt4364 = z.DecInferLen(yyl4364, z.DecBasicHandle().MaxInitLen, 352) - if yyrt4364 { - if yyrl4364 <= cap(yyv4364) { - yyv4364 = yyv4364[:yyrl4364] + yyrg4373 := len(yyv4373) > 0 + yyv24373 := yyv4373 + yyrl4373, yyrt4373 = z.DecInferLen(yyl4373, z.DecBasicHandle().MaxInitLen, 352) + if yyrt4373 { + if yyrl4373 <= cap(yyv4373) { + yyv4373 = yyv4373[:yyrl4373] } else { - yyv4364 = make([]PersistentVolumeClaim, yyrl4364) + yyv4373 = make([]PersistentVolumeClaim, yyrl4373) } } else { - yyv4364 = make([]PersistentVolumeClaim, yyrl4364) + yyv4373 = make([]PersistentVolumeClaim, yyrl4373) } - yyc4364 = true - yyrr4364 = len(yyv4364) - if yyrg4364 { - copy(yyv4364, yyv24364) + yyc4373 = true + yyrr4373 = len(yyv4373) + if yyrg4373 { + copy(yyv4373, yyv24373) } - } else if yyl4364 != len(yyv4364) { - yyv4364 = yyv4364[:yyl4364] - yyc4364 = true + } else if yyl4373 != len(yyv4373) { + yyv4373 = yyv4373[:yyl4373] + yyc4373 = true } - yyj4364 := 0 - for ; yyj4364 < yyrr4364; yyj4364++ { - yyh4364.ElemContainerState(yyj4364) + yyj4373 := 0 + for ; yyj4373 < yyrr4373; yyj4373++ { + yyh4373.ElemContainerState(yyj4373) if r.TryDecodeAsNil() { - yyv4364[yyj4364] = PersistentVolumeClaim{} + yyv4373[yyj4373] = PersistentVolumeClaim{} } else { - yyv4365 := &yyv4364[yyj4364] - yyv4365.CodecDecodeSelf(d) + yyv4374 := &yyv4373[yyj4373] + yyv4374.CodecDecodeSelf(d) } } - if yyrt4364 { - for ; yyj4364 < yyl4364; yyj4364++ { - yyv4364 = append(yyv4364, PersistentVolumeClaim{}) - yyh4364.ElemContainerState(yyj4364) + if yyrt4373 { + for ; yyj4373 < yyl4373; yyj4373++ { + yyv4373 = append(yyv4373, PersistentVolumeClaim{}) + yyh4373.ElemContainerState(yyj4373) if r.TryDecodeAsNil() { - yyv4364[yyj4364] = PersistentVolumeClaim{} + yyv4373[yyj4373] = PersistentVolumeClaim{} } else { - yyv4366 := &yyv4364[yyj4364] - yyv4366.CodecDecodeSelf(d) + yyv4375 := &yyv4373[yyj4373] + yyv4375.CodecDecodeSelf(d) } } } } else { - yyj4364 := 0 - for ; !r.CheckBreak(); yyj4364++ { + yyj4373 := 0 + for ; !r.CheckBreak(); yyj4373++ { - if yyj4364 >= len(yyv4364) { - yyv4364 = append(yyv4364, PersistentVolumeClaim{}) // var yyz4364 PersistentVolumeClaim - yyc4364 = true + if yyj4373 >= len(yyv4373) { + yyv4373 = append(yyv4373, PersistentVolumeClaim{}) // var yyz4373 PersistentVolumeClaim + yyc4373 = true } - yyh4364.ElemContainerState(yyj4364) - if yyj4364 < len(yyv4364) { + yyh4373.ElemContainerState(yyj4373) + if yyj4373 < len(yyv4373) { if r.TryDecodeAsNil() { - yyv4364[yyj4364] = PersistentVolumeClaim{} + yyv4373[yyj4373] = PersistentVolumeClaim{} } else { - yyv4367 := &yyv4364[yyj4364] - yyv4367.CodecDecodeSelf(d) + yyv4376 := &yyv4373[yyj4373] + yyv4376.CodecDecodeSelf(d) } } else { @@ -54503,17 +54581,17 @@ func (x codecSelfer1234) decSlicePersistentVolumeClaim(v *[]PersistentVolumeClai } } - if yyj4364 < len(yyv4364) { - yyv4364 = yyv4364[:yyj4364] - yyc4364 = true - } else if yyj4364 == 0 && yyv4364 == nil { - yyv4364 = []PersistentVolumeClaim{} - yyc4364 = true + if yyj4373 < len(yyv4373) { + yyv4373 = yyv4373[:yyj4373] + yyc4373 = true + } else if yyj4373 == 0 && yyv4373 == nil { + yyv4373 = []PersistentVolumeClaim{} + yyc4373 = true } } - yyh4364.End() - if yyc4364 { - *v = yyv4364 + yyh4373.End() + if yyc4373 { + *v = yyv4373 } } @@ -54522,10 +54600,10 @@ func (x codecSelfer1234) encSliceKeyToPath(v []KeyToPath, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4368 := range v { + for _, yyv4377 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4369 := &yyv4368 - yy4369.CodecEncodeSelf(e) + yy4378 := &yyv4377 + yy4378.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -54535,83 +54613,83 @@ func (x codecSelfer1234) decSliceKeyToPath(v *[]KeyToPath, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4370 := *v - yyh4370, yyl4370 := z.DecSliceHelperStart() - var yyc4370 bool - if yyl4370 == 0 { - if yyv4370 == nil { - yyv4370 = []KeyToPath{} - yyc4370 = true - } else if len(yyv4370) != 0 { - yyv4370 = yyv4370[:0] - yyc4370 = true + yyv4379 := *v + yyh4379, yyl4379 := z.DecSliceHelperStart() + var yyc4379 bool + if yyl4379 == 0 { + if yyv4379 == nil { + yyv4379 = []KeyToPath{} + yyc4379 = true + } else if len(yyv4379) != 0 { + yyv4379 = yyv4379[:0] + yyc4379 = true } - } else if yyl4370 > 0 { - var yyrr4370, yyrl4370 int - var yyrt4370 bool - if yyl4370 > cap(yyv4370) { + } else if yyl4379 > 0 { + var yyrr4379, yyrl4379 int + var yyrt4379 bool + if yyl4379 > cap(yyv4379) { - yyrg4370 := len(yyv4370) > 0 - yyv24370 := yyv4370 - yyrl4370, yyrt4370 = z.DecInferLen(yyl4370, z.DecBasicHandle().MaxInitLen, 32) - if yyrt4370 { - if yyrl4370 <= cap(yyv4370) { - yyv4370 = yyv4370[:yyrl4370] + yyrg4379 := len(yyv4379) > 0 + yyv24379 := yyv4379 + yyrl4379, yyrt4379 = z.DecInferLen(yyl4379, z.DecBasicHandle().MaxInitLen, 32) + if yyrt4379 { + if yyrl4379 <= cap(yyv4379) { + yyv4379 = yyv4379[:yyrl4379] } else { - yyv4370 = make([]KeyToPath, yyrl4370) + yyv4379 = make([]KeyToPath, yyrl4379) } } else { - yyv4370 = make([]KeyToPath, yyrl4370) + yyv4379 = make([]KeyToPath, yyrl4379) } - yyc4370 = true - yyrr4370 = len(yyv4370) - if yyrg4370 { - copy(yyv4370, yyv24370) + yyc4379 = true + yyrr4379 = len(yyv4379) + if yyrg4379 { + copy(yyv4379, yyv24379) } - } else if yyl4370 != len(yyv4370) { - yyv4370 = yyv4370[:yyl4370] - yyc4370 = true + } else if yyl4379 != len(yyv4379) { + yyv4379 = yyv4379[:yyl4379] + yyc4379 = true } - yyj4370 := 0 - for ; yyj4370 < yyrr4370; yyj4370++ { - yyh4370.ElemContainerState(yyj4370) + yyj4379 := 0 + for ; yyj4379 < yyrr4379; yyj4379++ { + yyh4379.ElemContainerState(yyj4379) if r.TryDecodeAsNil() { - yyv4370[yyj4370] = KeyToPath{} + yyv4379[yyj4379] = KeyToPath{} } else { - yyv4371 := &yyv4370[yyj4370] - yyv4371.CodecDecodeSelf(d) + yyv4380 := &yyv4379[yyj4379] + yyv4380.CodecDecodeSelf(d) } } - if yyrt4370 { - for ; yyj4370 < yyl4370; yyj4370++ { - yyv4370 = append(yyv4370, KeyToPath{}) - yyh4370.ElemContainerState(yyj4370) + if yyrt4379 { + for ; yyj4379 < yyl4379; yyj4379++ { + yyv4379 = append(yyv4379, KeyToPath{}) + yyh4379.ElemContainerState(yyj4379) if r.TryDecodeAsNil() { - yyv4370[yyj4370] = KeyToPath{} + yyv4379[yyj4379] = KeyToPath{} } else { - yyv4372 := &yyv4370[yyj4370] - yyv4372.CodecDecodeSelf(d) + yyv4381 := &yyv4379[yyj4379] + yyv4381.CodecDecodeSelf(d) } } } } else { - yyj4370 := 0 - for ; !r.CheckBreak(); yyj4370++ { + yyj4379 := 0 + for ; !r.CheckBreak(); yyj4379++ { - if yyj4370 >= len(yyv4370) { - yyv4370 = append(yyv4370, KeyToPath{}) // var yyz4370 KeyToPath - yyc4370 = true + if yyj4379 >= len(yyv4379) { + yyv4379 = append(yyv4379, KeyToPath{}) // var yyz4379 KeyToPath + yyc4379 = true } - yyh4370.ElemContainerState(yyj4370) - if yyj4370 < len(yyv4370) { + yyh4379.ElemContainerState(yyj4379) + if yyj4379 < len(yyv4379) { if r.TryDecodeAsNil() { - yyv4370[yyj4370] = KeyToPath{} + yyv4379[yyj4379] = KeyToPath{} } else { - yyv4373 := &yyv4370[yyj4370] - yyv4373.CodecDecodeSelf(d) + yyv4382 := &yyv4379[yyj4379] + yyv4382.CodecDecodeSelf(d) } } else { @@ -54619,17 +54697,17 @@ func (x codecSelfer1234) decSliceKeyToPath(v *[]KeyToPath, d *codec1978.Decoder) } } - if yyj4370 < len(yyv4370) { - yyv4370 = yyv4370[:yyj4370] - yyc4370 = true - } else if yyj4370 == 0 && yyv4370 == nil { - yyv4370 = []KeyToPath{} - yyc4370 = true + if yyj4379 < len(yyv4379) { + yyv4379 = yyv4379[:yyj4379] + yyc4379 = true + } else if yyj4379 == 0 && yyv4379 == nil { + yyv4379 = []KeyToPath{} + yyc4379 = true } } - yyh4370.End() - if yyc4370 { - *v = yyv4370 + yyh4379.End() + if yyc4379 { + *v = yyv4379 } } @@ -54638,10 +54716,10 @@ func (x codecSelfer1234) encSliceDownwardAPIVolumeFile(v []DownwardAPIVolumeFile z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4374 := range v { + for _, yyv4383 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4375 := &yyv4374 - yy4375.CodecEncodeSelf(e) + yy4384 := &yyv4383 + yy4384.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -54651,83 +54729,83 @@ func (x codecSelfer1234) decSliceDownwardAPIVolumeFile(v *[]DownwardAPIVolumeFil z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4376 := *v - yyh4376, yyl4376 := z.DecSliceHelperStart() - var yyc4376 bool - if yyl4376 == 0 { - if yyv4376 == nil { - yyv4376 = []DownwardAPIVolumeFile{} - yyc4376 = true - } else if len(yyv4376) != 0 { - yyv4376 = yyv4376[:0] - yyc4376 = true + yyv4385 := *v + yyh4385, yyl4385 := z.DecSliceHelperStart() + var yyc4385 bool + if yyl4385 == 0 { + if yyv4385 == nil { + yyv4385 = []DownwardAPIVolumeFile{} + yyc4385 = true + } else if len(yyv4385) != 0 { + yyv4385 = yyv4385[:0] + yyc4385 = true } - } else if yyl4376 > 0 { - var yyrr4376, yyrl4376 int - var yyrt4376 bool - if yyl4376 > cap(yyv4376) { + } else if yyl4385 > 0 { + var yyrr4385, yyrl4385 int + var yyrt4385 bool + if yyl4385 > cap(yyv4385) { - yyrg4376 := len(yyv4376) > 0 - yyv24376 := yyv4376 - yyrl4376, yyrt4376 = z.DecInferLen(yyl4376, z.DecBasicHandle().MaxInitLen, 32) - if yyrt4376 { - if yyrl4376 <= cap(yyv4376) { - yyv4376 = yyv4376[:yyrl4376] + yyrg4385 := len(yyv4385) > 0 + yyv24385 := yyv4385 + yyrl4385, yyrt4385 = z.DecInferLen(yyl4385, z.DecBasicHandle().MaxInitLen, 32) + if yyrt4385 { + if yyrl4385 <= cap(yyv4385) { + yyv4385 = yyv4385[:yyrl4385] } else { - yyv4376 = make([]DownwardAPIVolumeFile, yyrl4376) + yyv4385 = make([]DownwardAPIVolumeFile, yyrl4385) } } else { - yyv4376 = make([]DownwardAPIVolumeFile, yyrl4376) + yyv4385 = make([]DownwardAPIVolumeFile, yyrl4385) } - yyc4376 = true - yyrr4376 = len(yyv4376) - if yyrg4376 { - copy(yyv4376, yyv24376) + yyc4385 = true + yyrr4385 = len(yyv4385) + if yyrg4385 { + copy(yyv4385, yyv24385) } - } else if yyl4376 != len(yyv4376) { - yyv4376 = yyv4376[:yyl4376] - yyc4376 = true + } else if yyl4385 != len(yyv4385) { + yyv4385 = yyv4385[:yyl4385] + yyc4385 = true } - yyj4376 := 0 - for ; yyj4376 < yyrr4376; yyj4376++ { - yyh4376.ElemContainerState(yyj4376) + yyj4385 := 0 + for ; yyj4385 < yyrr4385; yyj4385++ { + yyh4385.ElemContainerState(yyj4385) if r.TryDecodeAsNil() { - yyv4376[yyj4376] = DownwardAPIVolumeFile{} + yyv4385[yyj4385] = DownwardAPIVolumeFile{} } else { - yyv4377 := &yyv4376[yyj4376] - yyv4377.CodecDecodeSelf(d) + yyv4386 := &yyv4385[yyj4385] + yyv4386.CodecDecodeSelf(d) } } - if yyrt4376 { - for ; yyj4376 < yyl4376; yyj4376++ { - yyv4376 = append(yyv4376, DownwardAPIVolumeFile{}) - yyh4376.ElemContainerState(yyj4376) + if yyrt4385 { + for ; yyj4385 < yyl4385; yyj4385++ { + yyv4385 = append(yyv4385, DownwardAPIVolumeFile{}) + yyh4385.ElemContainerState(yyj4385) if r.TryDecodeAsNil() { - yyv4376[yyj4376] = DownwardAPIVolumeFile{} + yyv4385[yyj4385] = DownwardAPIVolumeFile{} } else { - yyv4378 := &yyv4376[yyj4376] - yyv4378.CodecDecodeSelf(d) + yyv4387 := &yyv4385[yyj4385] + yyv4387.CodecDecodeSelf(d) } } } } else { - yyj4376 := 0 - for ; !r.CheckBreak(); yyj4376++ { + yyj4385 := 0 + for ; !r.CheckBreak(); yyj4385++ { - if yyj4376 >= len(yyv4376) { - yyv4376 = append(yyv4376, DownwardAPIVolumeFile{}) // var yyz4376 DownwardAPIVolumeFile - yyc4376 = true + if yyj4385 >= len(yyv4385) { + yyv4385 = append(yyv4385, DownwardAPIVolumeFile{}) // var yyz4385 DownwardAPIVolumeFile + yyc4385 = true } - yyh4376.ElemContainerState(yyj4376) - if yyj4376 < len(yyv4376) { + yyh4385.ElemContainerState(yyj4385) + if yyj4385 < len(yyv4385) { if r.TryDecodeAsNil() { - yyv4376[yyj4376] = DownwardAPIVolumeFile{} + yyv4385[yyj4385] = DownwardAPIVolumeFile{} } else { - yyv4379 := &yyv4376[yyj4376] - yyv4379.CodecDecodeSelf(d) + yyv4388 := &yyv4385[yyj4385] + yyv4388.CodecDecodeSelf(d) } } else { @@ -54735,17 +54813,17 @@ func (x codecSelfer1234) decSliceDownwardAPIVolumeFile(v *[]DownwardAPIVolumeFil } } - if yyj4376 < len(yyv4376) { - yyv4376 = yyv4376[:yyj4376] - yyc4376 = true - } else if yyj4376 == 0 && yyv4376 == nil { - yyv4376 = []DownwardAPIVolumeFile{} - yyc4376 = true + if yyj4385 < len(yyv4385) { + yyv4385 = yyv4385[:yyj4385] + yyc4385 = true + } else if yyj4385 == 0 && yyv4385 == nil { + yyv4385 = []DownwardAPIVolumeFile{} + yyc4385 = true } } - yyh4376.End() - if yyc4376 { - *v = yyv4376 + yyh4385.End() + if yyc4385 { + *v = yyv4385 } } @@ -54754,10 +54832,10 @@ func (x codecSelfer1234) encSliceHTTPHeader(v []HTTPHeader, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4380 := range v { + for _, yyv4389 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4381 := &yyv4380 - yy4381.CodecEncodeSelf(e) + yy4390 := &yyv4389 + yy4390.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -54767,83 +54845,83 @@ func (x codecSelfer1234) decSliceHTTPHeader(v *[]HTTPHeader, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4382 := *v - yyh4382, yyl4382 := z.DecSliceHelperStart() - var yyc4382 bool - if yyl4382 == 0 { - if yyv4382 == nil { - yyv4382 = []HTTPHeader{} - yyc4382 = true - } else if len(yyv4382) != 0 { - yyv4382 = yyv4382[:0] - yyc4382 = true + yyv4391 := *v + yyh4391, yyl4391 := z.DecSliceHelperStart() + var yyc4391 bool + if yyl4391 == 0 { + if yyv4391 == nil { + yyv4391 = []HTTPHeader{} + yyc4391 = true + } else if len(yyv4391) != 0 { + yyv4391 = yyv4391[:0] + yyc4391 = true } - } else if yyl4382 > 0 { - var yyrr4382, yyrl4382 int - var yyrt4382 bool - if yyl4382 > cap(yyv4382) { + } else if yyl4391 > 0 { + var yyrr4391, yyrl4391 int + var yyrt4391 bool + if yyl4391 > cap(yyv4391) { - yyrg4382 := len(yyv4382) > 0 - yyv24382 := yyv4382 - yyrl4382, yyrt4382 = z.DecInferLen(yyl4382, z.DecBasicHandle().MaxInitLen, 32) - if yyrt4382 { - if yyrl4382 <= cap(yyv4382) { - yyv4382 = yyv4382[:yyrl4382] + yyrg4391 := len(yyv4391) > 0 + yyv24391 := yyv4391 + yyrl4391, yyrt4391 = z.DecInferLen(yyl4391, z.DecBasicHandle().MaxInitLen, 32) + if yyrt4391 { + if yyrl4391 <= cap(yyv4391) { + yyv4391 = yyv4391[:yyrl4391] } else { - yyv4382 = make([]HTTPHeader, yyrl4382) + yyv4391 = make([]HTTPHeader, yyrl4391) } } else { - yyv4382 = make([]HTTPHeader, yyrl4382) + yyv4391 = make([]HTTPHeader, yyrl4391) } - yyc4382 = true - yyrr4382 = len(yyv4382) - if yyrg4382 { - copy(yyv4382, yyv24382) + yyc4391 = true + yyrr4391 = len(yyv4391) + if yyrg4391 { + copy(yyv4391, yyv24391) } - } else if yyl4382 != len(yyv4382) { - yyv4382 = yyv4382[:yyl4382] - yyc4382 = true + } else if yyl4391 != len(yyv4391) { + yyv4391 = yyv4391[:yyl4391] + yyc4391 = true } - yyj4382 := 0 - for ; yyj4382 < yyrr4382; yyj4382++ { - yyh4382.ElemContainerState(yyj4382) + yyj4391 := 0 + for ; yyj4391 < yyrr4391; yyj4391++ { + yyh4391.ElemContainerState(yyj4391) if r.TryDecodeAsNil() { - yyv4382[yyj4382] = HTTPHeader{} + yyv4391[yyj4391] = HTTPHeader{} } else { - yyv4383 := &yyv4382[yyj4382] - yyv4383.CodecDecodeSelf(d) + yyv4392 := &yyv4391[yyj4391] + yyv4392.CodecDecodeSelf(d) } } - if yyrt4382 { - for ; yyj4382 < yyl4382; yyj4382++ { - yyv4382 = append(yyv4382, HTTPHeader{}) - yyh4382.ElemContainerState(yyj4382) + if yyrt4391 { + for ; yyj4391 < yyl4391; yyj4391++ { + yyv4391 = append(yyv4391, HTTPHeader{}) + yyh4391.ElemContainerState(yyj4391) if r.TryDecodeAsNil() { - yyv4382[yyj4382] = HTTPHeader{} + yyv4391[yyj4391] = HTTPHeader{} } else { - yyv4384 := &yyv4382[yyj4382] - yyv4384.CodecDecodeSelf(d) + yyv4393 := &yyv4391[yyj4391] + yyv4393.CodecDecodeSelf(d) } } } } else { - yyj4382 := 0 - for ; !r.CheckBreak(); yyj4382++ { + yyj4391 := 0 + for ; !r.CheckBreak(); yyj4391++ { - if yyj4382 >= len(yyv4382) { - yyv4382 = append(yyv4382, HTTPHeader{}) // var yyz4382 HTTPHeader - yyc4382 = true + if yyj4391 >= len(yyv4391) { + yyv4391 = append(yyv4391, HTTPHeader{}) // var yyz4391 HTTPHeader + yyc4391 = true } - yyh4382.ElemContainerState(yyj4382) - if yyj4382 < len(yyv4382) { + yyh4391.ElemContainerState(yyj4391) + if yyj4391 < len(yyv4391) { if r.TryDecodeAsNil() { - yyv4382[yyj4382] = HTTPHeader{} + yyv4391[yyj4391] = HTTPHeader{} } else { - yyv4385 := &yyv4382[yyj4382] - yyv4385.CodecDecodeSelf(d) + yyv4394 := &yyv4391[yyj4391] + yyv4394.CodecDecodeSelf(d) } } else { @@ -54851,17 +54929,17 @@ func (x codecSelfer1234) decSliceHTTPHeader(v *[]HTTPHeader, d *codec1978.Decode } } - if yyj4382 < len(yyv4382) { - yyv4382 = yyv4382[:yyj4382] - yyc4382 = true - } else if yyj4382 == 0 && yyv4382 == nil { - yyv4382 = []HTTPHeader{} - yyc4382 = true + if yyj4391 < len(yyv4391) { + yyv4391 = yyv4391[:yyj4391] + yyc4391 = true + } else if yyj4391 == 0 && yyv4391 == nil { + yyv4391 = []HTTPHeader{} + yyc4391 = true } } - yyh4382.End() - if yyc4382 { - *v = yyv4382 + yyh4391.End() + if yyc4391 { + *v = yyv4391 } } @@ -54870,9 +54948,9 @@ func (x codecSelfer1234) encSliceCapability(v []Capability, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4386 := range v { + for _, yyv4395 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yyv4386.CodecEncodeSelf(e) + yyv4395.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -54882,75 +54960,75 @@ func (x codecSelfer1234) decSliceCapability(v *[]Capability, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4387 := *v - yyh4387, yyl4387 := z.DecSliceHelperStart() - var yyc4387 bool - if yyl4387 == 0 { - if yyv4387 == nil { - yyv4387 = []Capability{} - yyc4387 = true - } else if len(yyv4387) != 0 { - yyv4387 = yyv4387[:0] - yyc4387 = true + yyv4396 := *v + yyh4396, yyl4396 := z.DecSliceHelperStart() + var yyc4396 bool + if yyl4396 == 0 { + if yyv4396 == nil { + yyv4396 = []Capability{} + yyc4396 = true + } else if len(yyv4396) != 0 { + yyv4396 = yyv4396[:0] + yyc4396 = true } - } else if yyl4387 > 0 { - var yyrr4387, yyrl4387 int - var yyrt4387 bool - if yyl4387 > cap(yyv4387) { + } else if yyl4396 > 0 { + var yyrr4396, yyrl4396 int + var yyrt4396 bool + if yyl4396 > cap(yyv4396) { - yyrl4387, yyrt4387 = z.DecInferLen(yyl4387, z.DecBasicHandle().MaxInitLen, 16) - if yyrt4387 { - if yyrl4387 <= cap(yyv4387) { - yyv4387 = yyv4387[:yyrl4387] + yyrl4396, yyrt4396 = z.DecInferLen(yyl4396, z.DecBasicHandle().MaxInitLen, 16) + if yyrt4396 { + if yyrl4396 <= cap(yyv4396) { + yyv4396 = yyv4396[:yyrl4396] } else { - yyv4387 = make([]Capability, yyrl4387) + yyv4396 = make([]Capability, yyrl4396) } } else { - yyv4387 = make([]Capability, yyrl4387) + yyv4396 = make([]Capability, yyrl4396) } - yyc4387 = true - yyrr4387 = len(yyv4387) - } else if yyl4387 != len(yyv4387) { - yyv4387 = yyv4387[:yyl4387] - yyc4387 = true + yyc4396 = true + yyrr4396 = len(yyv4396) + } else if yyl4396 != len(yyv4396) { + yyv4396 = yyv4396[:yyl4396] + yyc4396 = true } - yyj4387 := 0 - for ; yyj4387 < yyrr4387; yyj4387++ { - yyh4387.ElemContainerState(yyj4387) + yyj4396 := 0 + for ; yyj4396 < yyrr4396; yyj4396++ { + yyh4396.ElemContainerState(yyj4396) if r.TryDecodeAsNil() { - yyv4387[yyj4387] = "" + yyv4396[yyj4396] = "" } else { - yyv4387[yyj4387] = Capability(r.DecodeString()) + yyv4396[yyj4396] = Capability(r.DecodeString()) } } - if yyrt4387 { - for ; yyj4387 < yyl4387; yyj4387++ { - yyv4387 = append(yyv4387, "") - yyh4387.ElemContainerState(yyj4387) + if yyrt4396 { + for ; yyj4396 < yyl4396; yyj4396++ { + yyv4396 = append(yyv4396, "") + yyh4396.ElemContainerState(yyj4396) if r.TryDecodeAsNil() { - yyv4387[yyj4387] = "" + yyv4396[yyj4396] = "" } else { - yyv4387[yyj4387] = Capability(r.DecodeString()) + yyv4396[yyj4396] = Capability(r.DecodeString()) } } } } else { - yyj4387 := 0 - for ; !r.CheckBreak(); yyj4387++ { + yyj4396 := 0 + for ; !r.CheckBreak(); yyj4396++ { - if yyj4387 >= len(yyv4387) { - yyv4387 = append(yyv4387, "") // var yyz4387 Capability - yyc4387 = true + if yyj4396 >= len(yyv4396) { + yyv4396 = append(yyv4396, "") // var yyz4396 Capability + yyc4396 = true } - yyh4387.ElemContainerState(yyj4387) - if yyj4387 < len(yyv4387) { + yyh4396.ElemContainerState(yyj4396) + if yyj4396 < len(yyv4396) { if r.TryDecodeAsNil() { - yyv4387[yyj4387] = "" + yyv4396[yyj4396] = "" } else { - yyv4387[yyj4387] = Capability(r.DecodeString()) + yyv4396[yyj4396] = Capability(r.DecodeString()) } } else { @@ -54958,17 +55036,17 @@ func (x codecSelfer1234) decSliceCapability(v *[]Capability, d *codec1978.Decode } } - if yyj4387 < len(yyv4387) { - yyv4387 = yyv4387[:yyj4387] - yyc4387 = true - } else if yyj4387 == 0 && yyv4387 == nil { - yyv4387 = []Capability{} - yyc4387 = true + if yyj4396 < len(yyv4396) { + yyv4396 = yyv4396[:yyj4396] + yyc4396 = true + } else if yyj4396 == 0 && yyv4396 == nil { + yyv4396 = []Capability{} + yyc4396 = true } } - yyh4387.End() - if yyc4387 { - *v = yyv4387 + yyh4396.End() + if yyc4396 { + *v = yyv4396 } } @@ -54977,10 +55055,10 @@ func (x codecSelfer1234) encSliceContainerPort(v []ContainerPort, e *codec1978.E z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4391 := range v { + for _, yyv4400 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4392 := &yyv4391 - yy4392.CodecEncodeSelf(e) + yy4401 := &yyv4400 + yy4401.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -54990,83 +55068,83 @@ func (x codecSelfer1234) decSliceContainerPort(v *[]ContainerPort, d *codec1978. z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4393 := *v - yyh4393, yyl4393 := z.DecSliceHelperStart() - var yyc4393 bool - if yyl4393 == 0 { - if yyv4393 == nil { - yyv4393 = []ContainerPort{} - yyc4393 = true - } else if len(yyv4393) != 0 { - yyv4393 = yyv4393[:0] - yyc4393 = true + yyv4402 := *v + yyh4402, yyl4402 := z.DecSliceHelperStart() + var yyc4402 bool + if yyl4402 == 0 { + if yyv4402 == nil { + yyv4402 = []ContainerPort{} + yyc4402 = true + } else if len(yyv4402) != 0 { + yyv4402 = yyv4402[:0] + yyc4402 = true } - } else if yyl4393 > 0 { - var yyrr4393, yyrl4393 int - var yyrt4393 bool - if yyl4393 > cap(yyv4393) { + } else if yyl4402 > 0 { + var yyrr4402, yyrl4402 int + var yyrt4402 bool + if yyl4402 > cap(yyv4402) { - yyrg4393 := len(yyv4393) > 0 - yyv24393 := yyv4393 - yyrl4393, yyrt4393 = z.DecInferLen(yyl4393, z.DecBasicHandle().MaxInitLen, 56) - if yyrt4393 { - if yyrl4393 <= cap(yyv4393) { - yyv4393 = yyv4393[:yyrl4393] + yyrg4402 := len(yyv4402) > 0 + yyv24402 := yyv4402 + yyrl4402, yyrt4402 = z.DecInferLen(yyl4402, z.DecBasicHandle().MaxInitLen, 56) + if yyrt4402 { + if yyrl4402 <= cap(yyv4402) { + yyv4402 = yyv4402[:yyrl4402] } else { - yyv4393 = make([]ContainerPort, yyrl4393) + yyv4402 = make([]ContainerPort, yyrl4402) } } else { - yyv4393 = make([]ContainerPort, yyrl4393) + yyv4402 = make([]ContainerPort, yyrl4402) } - yyc4393 = true - yyrr4393 = len(yyv4393) - if yyrg4393 { - copy(yyv4393, yyv24393) + yyc4402 = true + yyrr4402 = len(yyv4402) + if yyrg4402 { + copy(yyv4402, yyv24402) } - } else if yyl4393 != len(yyv4393) { - yyv4393 = yyv4393[:yyl4393] - yyc4393 = true + } else if yyl4402 != len(yyv4402) { + yyv4402 = yyv4402[:yyl4402] + yyc4402 = true } - yyj4393 := 0 - for ; yyj4393 < yyrr4393; yyj4393++ { - yyh4393.ElemContainerState(yyj4393) + yyj4402 := 0 + for ; yyj4402 < yyrr4402; yyj4402++ { + yyh4402.ElemContainerState(yyj4402) if r.TryDecodeAsNil() { - yyv4393[yyj4393] = ContainerPort{} + yyv4402[yyj4402] = ContainerPort{} } else { - yyv4394 := &yyv4393[yyj4393] - yyv4394.CodecDecodeSelf(d) + yyv4403 := &yyv4402[yyj4402] + yyv4403.CodecDecodeSelf(d) } } - if yyrt4393 { - for ; yyj4393 < yyl4393; yyj4393++ { - yyv4393 = append(yyv4393, ContainerPort{}) - yyh4393.ElemContainerState(yyj4393) + if yyrt4402 { + for ; yyj4402 < yyl4402; yyj4402++ { + yyv4402 = append(yyv4402, ContainerPort{}) + yyh4402.ElemContainerState(yyj4402) if r.TryDecodeAsNil() { - yyv4393[yyj4393] = ContainerPort{} + yyv4402[yyj4402] = ContainerPort{} } else { - yyv4395 := &yyv4393[yyj4393] - yyv4395.CodecDecodeSelf(d) + yyv4404 := &yyv4402[yyj4402] + yyv4404.CodecDecodeSelf(d) } } } } else { - yyj4393 := 0 - for ; !r.CheckBreak(); yyj4393++ { + yyj4402 := 0 + for ; !r.CheckBreak(); yyj4402++ { - if yyj4393 >= len(yyv4393) { - yyv4393 = append(yyv4393, ContainerPort{}) // var yyz4393 ContainerPort - yyc4393 = true + if yyj4402 >= len(yyv4402) { + yyv4402 = append(yyv4402, ContainerPort{}) // var yyz4402 ContainerPort + yyc4402 = true } - yyh4393.ElemContainerState(yyj4393) - if yyj4393 < len(yyv4393) { + yyh4402.ElemContainerState(yyj4402) + if yyj4402 < len(yyv4402) { if r.TryDecodeAsNil() { - yyv4393[yyj4393] = ContainerPort{} + yyv4402[yyj4402] = ContainerPort{} } else { - yyv4396 := &yyv4393[yyj4393] - yyv4396.CodecDecodeSelf(d) + yyv4405 := &yyv4402[yyj4402] + yyv4405.CodecDecodeSelf(d) } } else { @@ -55074,17 +55152,17 @@ func (x codecSelfer1234) decSliceContainerPort(v *[]ContainerPort, d *codec1978. } } - if yyj4393 < len(yyv4393) { - yyv4393 = yyv4393[:yyj4393] - yyc4393 = true - } else if yyj4393 == 0 && yyv4393 == nil { - yyv4393 = []ContainerPort{} - yyc4393 = true + if yyj4402 < len(yyv4402) { + yyv4402 = yyv4402[:yyj4402] + yyc4402 = true + } else if yyj4402 == 0 && yyv4402 == nil { + yyv4402 = []ContainerPort{} + yyc4402 = true } } - yyh4393.End() - if yyc4393 { - *v = yyv4393 + yyh4402.End() + if yyc4402 { + *v = yyv4402 } } @@ -55093,10 +55171,10 @@ func (x codecSelfer1234) encSliceEnvVar(v []EnvVar, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4397 := range v { + for _, yyv4406 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4398 := &yyv4397 - yy4398.CodecEncodeSelf(e) + yy4407 := &yyv4406 + yy4407.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -55106,83 +55184,83 @@ func (x codecSelfer1234) decSliceEnvVar(v *[]EnvVar, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4399 := *v - yyh4399, yyl4399 := z.DecSliceHelperStart() - var yyc4399 bool - if yyl4399 == 0 { - if yyv4399 == nil { - yyv4399 = []EnvVar{} - yyc4399 = true - } else if len(yyv4399) != 0 { - yyv4399 = yyv4399[:0] - yyc4399 = true + yyv4408 := *v + yyh4408, yyl4408 := z.DecSliceHelperStart() + var yyc4408 bool + if yyl4408 == 0 { + if yyv4408 == nil { + yyv4408 = []EnvVar{} + yyc4408 = true + } else if len(yyv4408) != 0 { + yyv4408 = yyv4408[:0] + yyc4408 = true } - } else if yyl4399 > 0 { - var yyrr4399, yyrl4399 int - var yyrt4399 bool - if yyl4399 > cap(yyv4399) { + } else if yyl4408 > 0 { + var yyrr4408, yyrl4408 int + var yyrt4408 bool + if yyl4408 > cap(yyv4408) { - yyrg4399 := len(yyv4399) > 0 - yyv24399 := yyv4399 - yyrl4399, yyrt4399 = z.DecInferLen(yyl4399, z.DecBasicHandle().MaxInitLen, 40) - if yyrt4399 { - if yyrl4399 <= cap(yyv4399) { - yyv4399 = yyv4399[:yyrl4399] + yyrg4408 := len(yyv4408) > 0 + yyv24408 := yyv4408 + yyrl4408, yyrt4408 = z.DecInferLen(yyl4408, z.DecBasicHandle().MaxInitLen, 40) + if yyrt4408 { + if yyrl4408 <= cap(yyv4408) { + yyv4408 = yyv4408[:yyrl4408] } else { - yyv4399 = make([]EnvVar, yyrl4399) + yyv4408 = make([]EnvVar, yyrl4408) } } else { - yyv4399 = make([]EnvVar, yyrl4399) + yyv4408 = make([]EnvVar, yyrl4408) } - yyc4399 = true - yyrr4399 = len(yyv4399) - if yyrg4399 { - copy(yyv4399, yyv24399) + yyc4408 = true + yyrr4408 = len(yyv4408) + if yyrg4408 { + copy(yyv4408, yyv24408) } - } else if yyl4399 != len(yyv4399) { - yyv4399 = yyv4399[:yyl4399] - yyc4399 = true + } else if yyl4408 != len(yyv4408) { + yyv4408 = yyv4408[:yyl4408] + yyc4408 = true } - yyj4399 := 0 - for ; yyj4399 < yyrr4399; yyj4399++ { - yyh4399.ElemContainerState(yyj4399) + yyj4408 := 0 + for ; yyj4408 < yyrr4408; yyj4408++ { + yyh4408.ElemContainerState(yyj4408) if r.TryDecodeAsNil() { - yyv4399[yyj4399] = EnvVar{} + yyv4408[yyj4408] = EnvVar{} } else { - yyv4400 := &yyv4399[yyj4399] - yyv4400.CodecDecodeSelf(d) + yyv4409 := &yyv4408[yyj4408] + yyv4409.CodecDecodeSelf(d) } } - if yyrt4399 { - for ; yyj4399 < yyl4399; yyj4399++ { - yyv4399 = append(yyv4399, EnvVar{}) - yyh4399.ElemContainerState(yyj4399) + if yyrt4408 { + for ; yyj4408 < yyl4408; yyj4408++ { + yyv4408 = append(yyv4408, EnvVar{}) + yyh4408.ElemContainerState(yyj4408) if r.TryDecodeAsNil() { - yyv4399[yyj4399] = EnvVar{} + yyv4408[yyj4408] = EnvVar{} } else { - yyv4401 := &yyv4399[yyj4399] - yyv4401.CodecDecodeSelf(d) + yyv4410 := &yyv4408[yyj4408] + yyv4410.CodecDecodeSelf(d) } } } } else { - yyj4399 := 0 - for ; !r.CheckBreak(); yyj4399++ { + yyj4408 := 0 + for ; !r.CheckBreak(); yyj4408++ { - if yyj4399 >= len(yyv4399) { - yyv4399 = append(yyv4399, EnvVar{}) // var yyz4399 EnvVar - yyc4399 = true + if yyj4408 >= len(yyv4408) { + yyv4408 = append(yyv4408, EnvVar{}) // var yyz4408 EnvVar + yyc4408 = true } - yyh4399.ElemContainerState(yyj4399) - if yyj4399 < len(yyv4399) { + yyh4408.ElemContainerState(yyj4408) + if yyj4408 < len(yyv4408) { if r.TryDecodeAsNil() { - yyv4399[yyj4399] = EnvVar{} + yyv4408[yyj4408] = EnvVar{} } else { - yyv4402 := &yyv4399[yyj4399] - yyv4402.CodecDecodeSelf(d) + yyv4411 := &yyv4408[yyj4408] + yyv4411.CodecDecodeSelf(d) } } else { @@ -55190,17 +55268,17 @@ func (x codecSelfer1234) decSliceEnvVar(v *[]EnvVar, d *codec1978.Decoder) { } } - if yyj4399 < len(yyv4399) { - yyv4399 = yyv4399[:yyj4399] - yyc4399 = true - } else if yyj4399 == 0 && yyv4399 == nil { - yyv4399 = []EnvVar{} - yyc4399 = true + if yyj4408 < len(yyv4408) { + yyv4408 = yyv4408[:yyj4408] + yyc4408 = true + } else if yyj4408 == 0 && yyv4408 == nil { + yyv4408 = []EnvVar{} + yyc4408 = true } } - yyh4399.End() - if yyc4399 { - *v = yyv4399 + yyh4408.End() + if yyc4408 { + *v = yyv4408 } } @@ -55209,10 +55287,10 @@ func (x codecSelfer1234) encSliceVolumeMount(v []VolumeMount, e *codec1978.Encod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4403 := range v { + for _, yyv4412 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4404 := &yyv4403 - yy4404.CodecEncodeSelf(e) + yy4413 := &yyv4412 + yy4413.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -55222,83 +55300,83 @@ func (x codecSelfer1234) decSliceVolumeMount(v *[]VolumeMount, d *codec1978.Deco z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4405 := *v - yyh4405, yyl4405 := z.DecSliceHelperStart() - var yyc4405 bool - if yyl4405 == 0 { - if yyv4405 == nil { - yyv4405 = []VolumeMount{} - yyc4405 = true - } else if len(yyv4405) != 0 { - yyv4405 = yyv4405[:0] - yyc4405 = true + yyv4414 := *v + yyh4414, yyl4414 := z.DecSliceHelperStart() + var yyc4414 bool + if yyl4414 == 0 { + if yyv4414 == nil { + yyv4414 = []VolumeMount{} + yyc4414 = true + } else if len(yyv4414) != 0 { + yyv4414 = yyv4414[:0] + yyc4414 = true } - } else if yyl4405 > 0 { - var yyrr4405, yyrl4405 int - var yyrt4405 bool - if yyl4405 > cap(yyv4405) { + } else if yyl4414 > 0 { + var yyrr4414, yyrl4414 int + var yyrt4414 bool + if yyl4414 > cap(yyv4414) { - yyrg4405 := len(yyv4405) > 0 - yyv24405 := yyv4405 - yyrl4405, yyrt4405 = z.DecInferLen(yyl4405, z.DecBasicHandle().MaxInitLen, 56) - if yyrt4405 { - if yyrl4405 <= cap(yyv4405) { - yyv4405 = yyv4405[:yyrl4405] + yyrg4414 := len(yyv4414) > 0 + yyv24414 := yyv4414 + yyrl4414, yyrt4414 = z.DecInferLen(yyl4414, z.DecBasicHandle().MaxInitLen, 56) + if yyrt4414 { + if yyrl4414 <= cap(yyv4414) { + yyv4414 = yyv4414[:yyrl4414] } else { - yyv4405 = make([]VolumeMount, yyrl4405) + yyv4414 = make([]VolumeMount, yyrl4414) } } else { - yyv4405 = make([]VolumeMount, yyrl4405) + yyv4414 = make([]VolumeMount, yyrl4414) } - yyc4405 = true - yyrr4405 = len(yyv4405) - if yyrg4405 { - copy(yyv4405, yyv24405) + yyc4414 = true + yyrr4414 = len(yyv4414) + if yyrg4414 { + copy(yyv4414, yyv24414) } - } else if yyl4405 != len(yyv4405) { - yyv4405 = yyv4405[:yyl4405] - yyc4405 = true + } else if yyl4414 != len(yyv4414) { + yyv4414 = yyv4414[:yyl4414] + yyc4414 = true } - yyj4405 := 0 - for ; yyj4405 < yyrr4405; yyj4405++ { - yyh4405.ElemContainerState(yyj4405) + yyj4414 := 0 + for ; yyj4414 < yyrr4414; yyj4414++ { + yyh4414.ElemContainerState(yyj4414) if r.TryDecodeAsNil() { - yyv4405[yyj4405] = VolumeMount{} + yyv4414[yyj4414] = VolumeMount{} } else { - yyv4406 := &yyv4405[yyj4405] - yyv4406.CodecDecodeSelf(d) + yyv4415 := &yyv4414[yyj4414] + yyv4415.CodecDecodeSelf(d) } } - if yyrt4405 { - for ; yyj4405 < yyl4405; yyj4405++ { - yyv4405 = append(yyv4405, VolumeMount{}) - yyh4405.ElemContainerState(yyj4405) + if yyrt4414 { + for ; yyj4414 < yyl4414; yyj4414++ { + yyv4414 = append(yyv4414, VolumeMount{}) + yyh4414.ElemContainerState(yyj4414) if r.TryDecodeAsNil() { - yyv4405[yyj4405] = VolumeMount{} + yyv4414[yyj4414] = VolumeMount{} } else { - yyv4407 := &yyv4405[yyj4405] - yyv4407.CodecDecodeSelf(d) + yyv4416 := &yyv4414[yyj4414] + yyv4416.CodecDecodeSelf(d) } } } } else { - yyj4405 := 0 - for ; !r.CheckBreak(); yyj4405++ { + yyj4414 := 0 + for ; !r.CheckBreak(); yyj4414++ { - if yyj4405 >= len(yyv4405) { - yyv4405 = append(yyv4405, VolumeMount{}) // var yyz4405 VolumeMount - yyc4405 = true + if yyj4414 >= len(yyv4414) { + yyv4414 = append(yyv4414, VolumeMount{}) // var yyz4414 VolumeMount + yyc4414 = true } - yyh4405.ElemContainerState(yyj4405) - if yyj4405 < len(yyv4405) { + yyh4414.ElemContainerState(yyj4414) + if yyj4414 < len(yyv4414) { if r.TryDecodeAsNil() { - yyv4405[yyj4405] = VolumeMount{} + yyv4414[yyj4414] = VolumeMount{} } else { - yyv4408 := &yyv4405[yyj4405] - yyv4408.CodecDecodeSelf(d) + yyv4417 := &yyv4414[yyj4414] + yyv4417.CodecDecodeSelf(d) } } else { @@ -55306,17 +55384,17 @@ func (x codecSelfer1234) decSliceVolumeMount(v *[]VolumeMount, d *codec1978.Deco } } - if yyj4405 < len(yyv4405) { - yyv4405 = yyv4405[:yyj4405] - yyc4405 = true - } else if yyj4405 == 0 && yyv4405 == nil { - yyv4405 = []VolumeMount{} - yyc4405 = true + if yyj4414 < len(yyv4414) { + yyv4414 = yyv4414[:yyj4414] + yyc4414 = true + } else if yyj4414 == 0 && yyv4414 == nil { + yyv4414 = []VolumeMount{} + yyc4414 = true } } - yyh4405.End() - if yyc4405 { - *v = yyv4405 + yyh4414.End() + if yyc4414 { + *v = yyv4414 } } @@ -55325,10 +55403,10 @@ func (x codecSelfer1234) encSlicePod(v []Pod, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4409 := range v { + for _, yyv4418 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4410 := &yyv4409 - yy4410.CodecEncodeSelf(e) + yy4419 := &yyv4418 + yy4419.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -55338,83 +55416,83 @@ func (x codecSelfer1234) decSlicePod(v *[]Pod, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4411 := *v - yyh4411, yyl4411 := z.DecSliceHelperStart() - var yyc4411 bool - if yyl4411 == 0 { - if yyv4411 == nil { - yyv4411 = []Pod{} - yyc4411 = true - } else if len(yyv4411) != 0 { - yyv4411 = yyv4411[:0] - yyc4411 = true + yyv4420 := *v + yyh4420, yyl4420 := z.DecSliceHelperStart() + var yyc4420 bool + if yyl4420 == 0 { + if yyv4420 == nil { + yyv4420 = []Pod{} + yyc4420 = true + } else if len(yyv4420) != 0 { + yyv4420 = yyv4420[:0] + yyc4420 = true } - } else if yyl4411 > 0 { - var yyrr4411, yyrl4411 int - var yyrt4411 bool - if yyl4411 > cap(yyv4411) { + } else if yyl4420 > 0 { + var yyrr4420, yyrl4420 int + var yyrt4420 bool + if yyl4420 > cap(yyv4420) { - yyrg4411 := len(yyv4411) > 0 - yyv24411 := yyv4411 - yyrl4411, yyrt4411 = z.DecInferLen(yyl4411, z.DecBasicHandle().MaxInitLen, 624) - if yyrt4411 { - if yyrl4411 <= cap(yyv4411) { - yyv4411 = yyv4411[:yyrl4411] + yyrg4420 := len(yyv4420) > 0 + yyv24420 := yyv4420 + yyrl4420, yyrt4420 = z.DecInferLen(yyl4420, z.DecBasicHandle().MaxInitLen, 624) + if yyrt4420 { + if yyrl4420 <= cap(yyv4420) { + yyv4420 = yyv4420[:yyrl4420] } else { - yyv4411 = make([]Pod, yyrl4411) + yyv4420 = make([]Pod, yyrl4420) } } else { - yyv4411 = make([]Pod, yyrl4411) + yyv4420 = make([]Pod, yyrl4420) } - yyc4411 = true - yyrr4411 = len(yyv4411) - if yyrg4411 { - copy(yyv4411, yyv24411) + yyc4420 = true + yyrr4420 = len(yyv4420) + if yyrg4420 { + copy(yyv4420, yyv24420) } - } else if yyl4411 != len(yyv4411) { - yyv4411 = yyv4411[:yyl4411] - yyc4411 = true + } else if yyl4420 != len(yyv4420) { + yyv4420 = yyv4420[:yyl4420] + yyc4420 = true } - yyj4411 := 0 - for ; yyj4411 < yyrr4411; yyj4411++ { - yyh4411.ElemContainerState(yyj4411) + yyj4420 := 0 + for ; yyj4420 < yyrr4420; yyj4420++ { + yyh4420.ElemContainerState(yyj4420) if r.TryDecodeAsNil() { - yyv4411[yyj4411] = Pod{} + yyv4420[yyj4420] = Pod{} } else { - yyv4412 := &yyv4411[yyj4411] - yyv4412.CodecDecodeSelf(d) + yyv4421 := &yyv4420[yyj4420] + yyv4421.CodecDecodeSelf(d) } } - if yyrt4411 { - for ; yyj4411 < yyl4411; yyj4411++ { - yyv4411 = append(yyv4411, Pod{}) - yyh4411.ElemContainerState(yyj4411) + if yyrt4420 { + for ; yyj4420 < yyl4420; yyj4420++ { + yyv4420 = append(yyv4420, Pod{}) + yyh4420.ElemContainerState(yyj4420) if r.TryDecodeAsNil() { - yyv4411[yyj4411] = Pod{} + yyv4420[yyj4420] = Pod{} } else { - yyv4413 := &yyv4411[yyj4411] - yyv4413.CodecDecodeSelf(d) + yyv4422 := &yyv4420[yyj4420] + yyv4422.CodecDecodeSelf(d) } } } } else { - yyj4411 := 0 - for ; !r.CheckBreak(); yyj4411++ { + yyj4420 := 0 + for ; !r.CheckBreak(); yyj4420++ { - if yyj4411 >= len(yyv4411) { - yyv4411 = append(yyv4411, Pod{}) // var yyz4411 Pod - yyc4411 = true + if yyj4420 >= len(yyv4420) { + yyv4420 = append(yyv4420, Pod{}) // var yyz4420 Pod + yyc4420 = true } - yyh4411.ElemContainerState(yyj4411) - if yyj4411 < len(yyv4411) { + yyh4420.ElemContainerState(yyj4420) + if yyj4420 < len(yyv4420) { if r.TryDecodeAsNil() { - yyv4411[yyj4411] = Pod{} + yyv4420[yyj4420] = Pod{} } else { - yyv4414 := &yyv4411[yyj4411] - yyv4414.CodecDecodeSelf(d) + yyv4423 := &yyv4420[yyj4420] + yyv4423.CodecDecodeSelf(d) } } else { @@ -55422,17 +55500,17 @@ func (x codecSelfer1234) decSlicePod(v *[]Pod, d *codec1978.Decoder) { } } - if yyj4411 < len(yyv4411) { - yyv4411 = yyv4411[:yyj4411] - yyc4411 = true - } else if yyj4411 == 0 && yyv4411 == nil { - yyv4411 = []Pod{} - yyc4411 = true + if yyj4420 < len(yyv4420) { + yyv4420 = yyv4420[:yyj4420] + yyc4420 = true + } else if yyj4420 == 0 && yyv4420 == nil { + yyv4420 = []Pod{} + yyc4420 = true } } - yyh4411.End() - if yyc4411 { - *v = yyv4411 + yyh4420.End() + if yyc4420 { + *v = yyv4420 } } @@ -55441,10 +55519,10 @@ func (x codecSelfer1234) encSliceNodeSelectorTerm(v []NodeSelectorTerm, e *codec z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4415 := range v { + for _, yyv4424 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4416 := &yyv4415 - yy4416.CodecEncodeSelf(e) + yy4425 := &yyv4424 + yy4425.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -55454,83 +55532,83 @@ func (x codecSelfer1234) decSliceNodeSelectorTerm(v *[]NodeSelectorTerm, d *code z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4417 := *v - yyh4417, yyl4417 := z.DecSliceHelperStart() - var yyc4417 bool - if yyl4417 == 0 { - if yyv4417 == nil { - yyv4417 = []NodeSelectorTerm{} - yyc4417 = true - } else if len(yyv4417) != 0 { - yyv4417 = yyv4417[:0] - yyc4417 = true + yyv4426 := *v + yyh4426, yyl4426 := z.DecSliceHelperStart() + var yyc4426 bool + if yyl4426 == 0 { + if yyv4426 == nil { + yyv4426 = []NodeSelectorTerm{} + yyc4426 = true + } else if len(yyv4426) != 0 { + yyv4426 = yyv4426[:0] + yyc4426 = true } - } else if yyl4417 > 0 { - var yyrr4417, yyrl4417 int - var yyrt4417 bool - if yyl4417 > cap(yyv4417) { + } else if yyl4426 > 0 { + var yyrr4426, yyrl4426 int + var yyrt4426 bool + if yyl4426 > cap(yyv4426) { - yyrg4417 := len(yyv4417) > 0 - yyv24417 := yyv4417 - yyrl4417, yyrt4417 = z.DecInferLen(yyl4417, z.DecBasicHandle().MaxInitLen, 24) - if yyrt4417 { - if yyrl4417 <= cap(yyv4417) { - yyv4417 = yyv4417[:yyrl4417] + yyrg4426 := len(yyv4426) > 0 + yyv24426 := yyv4426 + yyrl4426, yyrt4426 = z.DecInferLen(yyl4426, z.DecBasicHandle().MaxInitLen, 24) + if yyrt4426 { + if yyrl4426 <= cap(yyv4426) { + yyv4426 = yyv4426[:yyrl4426] } else { - yyv4417 = make([]NodeSelectorTerm, yyrl4417) + yyv4426 = make([]NodeSelectorTerm, yyrl4426) } } else { - yyv4417 = make([]NodeSelectorTerm, yyrl4417) + yyv4426 = make([]NodeSelectorTerm, yyrl4426) } - yyc4417 = true - yyrr4417 = len(yyv4417) - if yyrg4417 { - copy(yyv4417, yyv24417) + yyc4426 = true + yyrr4426 = len(yyv4426) + if yyrg4426 { + copy(yyv4426, yyv24426) } - } else if yyl4417 != len(yyv4417) { - yyv4417 = yyv4417[:yyl4417] - yyc4417 = true + } else if yyl4426 != len(yyv4426) { + yyv4426 = yyv4426[:yyl4426] + yyc4426 = true } - yyj4417 := 0 - for ; yyj4417 < yyrr4417; yyj4417++ { - yyh4417.ElemContainerState(yyj4417) + yyj4426 := 0 + for ; yyj4426 < yyrr4426; yyj4426++ { + yyh4426.ElemContainerState(yyj4426) if r.TryDecodeAsNil() { - yyv4417[yyj4417] = NodeSelectorTerm{} + yyv4426[yyj4426] = NodeSelectorTerm{} } else { - yyv4418 := &yyv4417[yyj4417] - yyv4418.CodecDecodeSelf(d) + yyv4427 := &yyv4426[yyj4426] + yyv4427.CodecDecodeSelf(d) } } - if yyrt4417 { - for ; yyj4417 < yyl4417; yyj4417++ { - yyv4417 = append(yyv4417, NodeSelectorTerm{}) - yyh4417.ElemContainerState(yyj4417) + if yyrt4426 { + for ; yyj4426 < yyl4426; yyj4426++ { + yyv4426 = append(yyv4426, NodeSelectorTerm{}) + yyh4426.ElemContainerState(yyj4426) if r.TryDecodeAsNil() { - yyv4417[yyj4417] = NodeSelectorTerm{} + yyv4426[yyj4426] = NodeSelectorTerm{} } else { - yyv4419 := &yyv4417[yyj4417] - yyv4419.CodecDecodeSelf(d) + yyv4428 := &yyv4426[yyj4426] + yyv4428.CodecDecodeSelf(d) } } } } else { - yyj4417 := 0 - for ; !r.CheckBreak(); yyj4417++ { + yyj4426 := 0 + for ; !r.CheckBreak(); yyj4426++ { - if yyj4417 >= len(yyv4417) { - yyv4417 = append(yyv4417, NodeSelectorTerm{}) // var yyz4417 NodeSelectorTerm - yyc4417 = true + if yyj4426 >= len(yyv4426) { + yyv4426 = append(yyv4426, NodeSelectorTerm{}) // var yyz4426 NodeSelectorTerm + yyc4426 = true } - yyh4417.ElemContainerState(yyj4417) - if yyj4417 < len(yyv4417) { + yyh4426.ElemContainerState(yyj4426) + if yyj4426 < len(yyv4426) { if r.TryDecodeAsNil() { - yyv4417[yyj4417] = NodeSelectorTerm{} + yyv4426[yyj4426] = NodeSelectorTerm{} } else { - yyv4420 := &yyv4417[yyj4417] - yyv4420.CodecDecodeSelf(d) + yyv4429 := &yyv4426[yyj4426] + yyv4429.CodecDecodeSelf(d) } } else { @@ -55538,17 +55616,17 @@ func (x codecSelfer1234) decSliceNodeSelectorTerm(v *[]NodeSelectorTerm, d *code } } - if yyj4417 < len(yyv4417) { - yyv4417 = yyv4417[:yyj4417] - yyc4417 = true - } else if yyj4417 == 0 && yyv4417 == nil { - yyv4417 = []NodeSelectorTerm{} - yyc4417 = true + if yyj4426 < len(yyv4426) { + yyv4426 = yyv4426[:yyj4426] + yyc4426 = true + } else if yyj4426 == 0 && yyv4426 == nil { + yyv4426 = []NodeSelectorTerm{} + yyc4426 = true } } - yyh4417.End() - if yyc4417 { - *v = yyv4417 + yyh4426.End() + if yyc4426 { + *v = yyv4426 } } @@ -55557,10 +55635,10 @@ func (x codecSelfer1234) encSliceNodeSelectorRequirement(v []NodeSelectorRequire z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4421 := range v { + for _, yyv4430 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4422 := &yyv4421 - yy4422.CodecEncodeSelf(e) + yy4431 := &yyv4430 + yy4431.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -55570,83 +55648,83 @@ func (x codecSelfer1234) decSliceNodeSelectorRequirement(v *[]NodeSelectorRequir z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4423 := *v - yyh4423, yyl4423 := z.DecSliceHelperStart() - var yyc4423 bool - if yyl4423 == 0 { - if yyv4423 == nil { - yyv4423 = []NodeSelectorRequirement{} - yyc4423 = true - } else if len(yyv4423) != 0 { - yyv4423 = yyv4423[:0] - yyc4423 = true + yyv4432 := *v + yyh4432, yyl4432 := z.DecSliceHelperStart() + var yyc4432 bool + if yyl4432 == 0 { + if yyv4432 == nil { + yyv4432 = []NodeSelectorRequirement{} + yyc4432 = true + } else if len(yyv4432) != 0 { + yyv4432 = yyv4432[:0] + yyc4432 = true } - } else if yyl4423 > 0 { - var yyrr4423, yyrl4423 int - var yyrt4423 bool - if yyl4423 > cap(yyv4423) { + } else if yyl4432 > 0 { + var yyrr4432, yyrl4432 int + var yyrt4432 bool + if yyl4432 > cap(yyv4432) { - yyrg4423 := len(yyv4423) > 0 - yyv24423 := yyv4423 - yyrl4423, yyrt4423 = z.DecInferLen(yyl4423, z.DecBasicHandle().MaxInitLen, 56) - if yyrt4423 { - if yyrl4423 <= cap(yyv4423) { - yyv4423 = yyv4423[:yyrl4423] + yyrg4432 := len(yyv4432) > 0 + yyv24432 := yyv4432 + yyrl4432, yyrt4432 = z.DecInferLen(yyl4432, z.DecBasicHandle().MaxInitLen, 56) + if yyrt4432 { + if yyrl4432 <= cap(yyv4432) { + yyv4432 = yyv4432[:yyrl4432] } else { - yyv4423 = make([]NodeSelectorRequirement, yyrl4423) + yyv4432 = make([]NodeSelectorRequirement, yyrl4432) } } else { - yyv4423 = make([]NodeSelectorRequirement, yyrl4423) + yyv4432 = make([]NodeSelectorRequirement, yyrl4432) } - yyc4423 = true - yyrr4423 = len(yyv4423) - if yyrg4423 { - copy(yyv4423, yyv24423) + yyc4432 = true + yyrr4432 = len(yyv4432) + if yyrg4432 { + copy(yyv4432, yyv24432) } - } else if yyl4423 != len(yyv4423) { - yyv4423 = yyv4423[:yyl4423] - yyc4423 = true + } else if yyl4432 != len(yyv4432) { + yyv4432 = yyv4432[:yyl4432] + yyc4432 = true } - yyj4423 := 0 - for ; yyj4423 < yyrr4423; yyj4423++ { - yyh4423.ElemContainerState(yyj4423) + yyj4432 := 0 + for ; yyj4432 < yyrr4432; yyj4432++ { + yyh4432.ElemContainerState(yyj4432) if r.TryDecodeAsNil() { - yyv4423[yyj4423] = NodeSelectorRequirement{} + yyv4432[yyj4432] = NodeSelectorRequirement{} } else { - yyv4424 := &yyv4423[yyj4423] - yyv4424.CodecDecodeSelf(d) + yyv4433 := &yyv4432[yyj4432] + yyv4433.CodecDecodeSelf(d) } } - if yyrt4423 { - for ; yyj4423 < yyl4423; yyj4423++ { - yyv4423 = append(yyv4423, NodeSelectorRequirement{}) - yyh4423.ElemContainerState(yyj4423) + if yyrt4432 { + for ; yyj4432 < yyl4432; yyj4432++ { + yyv4432 = append(yyv4432, NodeSelectorRequirement{}) + yyh4432.ElemContainerState(yyj4432) if r.TryDecodeAsNil() { - yyv4423[yyj4423] = NodeSelectorRequirement{} + yyv4432[yyj4432] = NodeSelectorRequirement{} } else { - yyv4425 := &yyv4423[yyj4423] - yyv4425.CodecDecodeSelf(d) + yyv4434 := &yyv4432[yyj4432] + yyv4434.CodecDecodeSelf(d) } } } } else { - yyj4423 := 0 - for ; !r.CheckBreak(); yyj4423++ { + yyj4432 := 0 + for ; !r.CheckBreak(); yyj4432++ { - if yyj4423 >= len(yyv4423) { - yyv4423 = append(yyv4423, NodeSelectorRequirement{}) // var yyz4423 NodeSelectorRequirement - yyc4423 = true + if yyj4432 >= len(yyv4432) { + yyv4432 = append(yyv4432, NodeSelectorRequirement{}) // var yyz4432 NodeSelectorRequirement + yyc4432 = true } - yyh4423.ElemContainerState(yyj4423) - if yyj4423 < len(yyv4423) { + yyh4432.ElemContainerState(yyj4432) + if yyj4432 < len(yyv4432) { if r.TryDecodeAsNil() { - yyv4423[yyj4423] = NodeSelectorRequirement{} + yyv4432[yyj4432] = NodeSelectorRequirement{} } else { - yyv4426 := &yyv4423[yyj4423] - yyv4426.CodecDecodeSelf(d) + yyv4435 := &yyv4432[yyj4432] + yyv4435.CodecDecodeSelf(d) } } else { @@ -55654,17 +55732,17 @@ func (x codecSelfer1234) decSliceNodeSelectorRequirement(v *[]NodeSelectorRequir } } - if yyj4423 < len(yyv4423) { - yyv4423 = yyv4423[:yyj4423] - yyc4423 = true - } else if yyj4423 == 0 && yyv4423 == nil { - yyv4423 = []NodeSelectorRequirement{} - yyc4423 = true + if yyj4432 < len(yyv4432) { + yyv4432 = yyv4432[:yyj4432] + yyc4432 = true + } else if yyj4432 == 0 && yyv4432 == nil { + yyv4432 = []NodeSelectorRequirement{} + yyc4432 = true } } - yyh4423.End() - if yyc4423 { - *v = yyv4423 + yyh4432.End() + if yyc4432 { + *v = yyv4432 } } @@ -55673,10 +55751,10 @@ func (x codecSelfer1234) encSlicePodAffinityTerm(v []PodAffinityTerm, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4427 := range v { + for _, yyv4436 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4428 := &yyv4427 - yy4428.CodecEncodeSelf(e) + yy4437 := &yyv4436 + yy4437.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -55686,83 +55764,83 @@ func (x codecSelfer1234) decSlicePodAffinityTerm(v *[]PodAffinityTerm, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4429 := *v - yyh4429, yyl4429 := z.DecSliceHelperStart() - var yyc4429 bool - if yyl4429 == 0 { - if yyv4429 == nil { - yyv4429 = []PodAffinityTerm{} - yyc4429 = true - } else if len(yyv4429) != 0 { - yyv4429 = yyv4429[:0] - yyc4429 = true + yyv4438 := *v + yyh4438, yyl4438 := z.DecSliceHelperStart() + var yyc4438 bool + if yyl4438 == 0 { + if yyv4438 == nil { + yyv4438 = []PodAffinityTerm{} + yyc4438 = true + } else if len(yyv4438) != 0 { + yyv4438 = yyv4438[:0] + yyc4438 = true } - } else if yyl4429 > 0 { - var yyrr4429, yyrl4429 int - var yyrt4429 bool - if yyl4429 > cap(yyv4429) { + } else if yyl4438 > 0 { + var yyrr4438, yyrl4438 int + var yyrt4438 bool + if yyl4438 > cap(yyv4438) { - yyrg4429 := len(yyv4429) > 0 - yyv24429 := yyv4429 - yyrl4429, yyrt4429 = z.DecInferLen(yyl4429, z.DecBasicHandle().MaxInitLen, 48) - if yyrt4429 { - if yyrl4429 <= cap(yyv4429) { - yyv4429 = yyv4429[:yyrl4429] + yyrg4438 := len(yyv4438) > 0 + yyv24438 := yyv4438 + yyrl4438, yyrt4438 = z.DecInferLen(yyl4438, z.DecBasicHandle().MaxInitLen, 48) + if yyrt4438 { + if yyrl4438 <= cap(yyv4438) { + yyv4438 = yyv4438[:yyrl4438] } else { - yyv4429 = make([]PodAffinityTerm, yyrl4429) + yyv4438 = make([]PodAffinityTerm, yyrl4438) } } else { - yyv4429 = make([]PodAffinityTerm, yyrl4429) + yyv4438 = make([]PodAffinityTerm, yyrl4438) } - yyc4429 = true - yyrr4429 = len(yyv4429) - if yyrg4429 { - copy(yyv4429, yyv24429) + yyc4438 = true + yyrr4438 = len(yyv4438) + if yyrg4438 { + copy(yyv4438, yyv24438) } - } else if yyl4429 != len(yyv4429) { - yyv4429 = yyv4429[:yyl4429] - yyc4429 = true + } else if yyl4438 != len(yyv4438) { + yyv4438 = yyv4438[:yyl4438] + yyc4438 = true } - yyj4429 := 0 - for ; yyj4429 < yyrr4429; yyj4429++ { - yyh4429.ElemContainerState(yyj4429) + yyj4438 := 0 + for ; yyj4438 < yyrr4438; yyj4438++ { + yyh4438.ElemContainerState(yyj4438) if r.TryDecodeAsNil() { - yyv4429[yyj4429] = PodAffinityTerm{} + yyv4438[yyj4438] = PodAffinityTerm{} } else { - yyv4430 := &yyv4429[yyj4429] - yyv4430.CodecDecodeSelf(d) + yyv4439 := &yyv4438[yyj4438] + yyv4439.CodecDecodeSelf(d) } } - if yyrt4429 { - for ; yyj4429 < yyl4429; yyj4429++ { - yyv4429 = append(yyv4429, PodAffinityTerm{}) - yyh4429.ElemContainerState(yyj4429) + if yyrt4438 { + for ; yyj4438 < yyl4438; yyj4438++ { + yyv4438 = append(yyv4438, PodAffinityTerm{}) + yyh4438.ElemContainerState(yyj4438) if r.TryDecodeAsNil() { - yyv4429[yyj4429] = PodAffinityTerm{} + yyv4438[yyj4438] = PodAffinityTerm{} } else { - yyv4431 := &yyv4429[yyj4429] - yyv4431.CodecDecodeSelf(d) + yyv4440 := &yyv4438[yyj4438] + yyv4440.CodecDecodeSelf(d) } } } } else { - yyj4429 := 0 - for ; !r.CheckBreak(); yyj4429++ { + yyj4438 := 0 + for ; !r.CheckBreak(); yyj4438++ { - if yyj4429 >= len(yyv4429) { - yyv4429 = append(yyv4429, PodAffinityTerm{}) // var yyz4429 PodAffinityTerm - yyc4429 = true + if yyj4438 >= len(yyv4438) { + yyv4438 = append(yyv4438, PodAffinityTerm{}) // var yyz4438 PodAffinityTerm + yyc4438 = true } - yyh4429.ElemContainerState(yyj4429) - if yyj4429 < len(yyv4429) { + yyh4438.ElemContainerState(yyj4438) + if yyj4438 < len(yyv4438) { if r.TryDecodeAsNil() { - yyv4429[yyj4429] = PodAffinityTerm{} + yyv4438[yyj4438] = PodAffinityTerm{} } else { - yyv4432 := &yyv4429[yyj4429] - yyv4432.CodecDecodeSelf(d) + yyv4441 := &yyv4438[yyj4438] + yyv4441.CodecDecodeSelf(d) } } else { @@ -55770,17 +55848,17 @@ func (x codecSelfer1234) decSlicePodAffinityTerm(v *[]PodAffinityTerm, d *codec1 } } - if yyj4429 < len(yyv4429) { - yyv4429 = yyv4429[:yyj4429] - yyc4429 = true - } else if yyj4429 == 0 && yyv4429 == nil { - yyv4429 = []PodAffinityTerm{} - yyc4429 = true + if yyj4438 < len(yyv4438) { + yyv4438 = yyv4438[:yyj4438] + yyc4438 = true + } else if yyj4438 == 0 && yyv4438 == nil { + yyv4438 = []PodAffinityTerm{} + yyc4438 = true } } - yyh4429.End() - if yyc4429 { - *v = yyv4429 + yyh4438.End() + if yyc4438 { + *v = yyv4438 } } @@ -55789,10 +55867,10 @@ func (x codecSelfer1234) encSliceWeightedPodAffinityTerm(v []WeightedPodAffinity z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4433 := range v { + for _, yyv4442 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4434 := &yyv4433 - yy4434.CodecEncodeSelf(e) + yy4443 := &yyv4442 + yy4443.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -55802,83 +55880,83 @@ func (x codecSelfer1234) decSliceWeightedPodAffinityTerm(v *[]WeightedPodAffinit z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4435 := *v - yyh4435, yyl4435 := z.DecSliceHelperStart() - var yyc4435 bool - if yyl4435 == 0 { - if yyv4435 == nil { - yyv4435 = []WeightedPodAffinityTerm{} - yyc4435 = true - } else if len(yyv4435) != 0 { - yyv4435 = yyv4435[:0] - yyc4435 = true + yyv4444 := *v + yyh4444, yyl4444 := z.DecSliceHelperStart() + var yyc4444 bool + if yyl4444 == 0 { + if yyv4444 == nil { + yyv4444 = []WeightedPodAffinityTerm{} + yyc4444 = true + } else if len(yyv4444) != 0 { + yyv4444 = yyv4444[:0] + yyc4444 = true } - } else if yyl4435 > 0 { - var yyrr4435, yyrl4435 int - var yyrt4435 bool - if yyl4435 > cap(yyv4435) { + } else if yyl4444 > 0 { + var yyrr4444, yyrl4444 int + var yyrt4444 bool + if yyl4444 > cap(yyv4444) { - yyrg4435 := len(yyv4435) > 0 - yyv24435 := yyv4435 - yyrl4435, yyrt4435 = z.DecInferLen(yyl4435, z.DecBasicHandle().MaxInitLen, 56) - if yyrt4435 { - if yyrl4435 <= cap(yyv4435) { - yyv4435 = yyv4435[:yyrl4435] + yyrg4444 := len(yyv4444) > 0 + yyv24444 := yyv4444 + yyrl4444, yyrt4444 = z.DecInferLen(yyl4444, z.DecBasicHandle().MaxInitLen, 56) + if yyrt4444 { + if yyrl4444 <= cap(yyv4444) { + yyv4444 = yyv4444[:yyrl4444] } else { - yyv4435 = make([]WeightedPodAffinityTerm, yyrl4435) + yyv4444 = make([]WeightedPodAffinityTerm, yyrl4444) } } else { - yyv4435 = make([]WeightedPodAffinityTerm, yyrl4435) + yyv4444 = make([]WeightedPodAffinityTerm, yyrl4444) } - yyc4435 = true - yyrr4435 = len(yyv4435) - if yyrg4435 { - copy(yyv4435, yyv24435) + yyc4444 = true + yyrr4444 = len(yyv4444) + if yyrg4444 { + copy(yyv4444, yyv24444) } - } else if yyl4435 != len(yyv4435) { - yyv4435 = yyv4435[:yyl4435] - yyc4435 = true + } else if yyl4444 != len(yyv4444) { + yyv4444 = yyv4444[:yyl4444] + yyc4444 = true } - yyj4435 := 0 - for ; yyj4435 < yyrr4435; yyj4435++ { - yyh4435.ElemContainerState(yyj4435) + yyj4444 := 0 + for ; yyj4444 < yyrr4444; yyj4444++ { + yyh4444.ElemContainerState(yyj4444) if r.TryDecodeAsNil() { - yyv4435[yyj4435] = WeightedPodAffinityTerm{} + yyv4444[yyj4444] = WeightedPodAffinityTerm{} } else { - yyv4436 := &yyv4435[yyj4435] - yyv4436.CodecDecodeSelf(d) + yyv4445 := &yyv4444[yyj4444] + yyv4445.CodecDecodeSelf(d) } } - if yyrt4435 { - for ; yyj4435 < yyl4435; yyj4435++ { - yyv4435 = append(yyv4435, WeightedPodAffinityTerm{}) - yyh4435.ElemContainerState(yyj4435) + if yyrt4444 { + for ; yyj4444 < yyl4444; yyj4444++ { + yyv4444 = append(yyv4444, WeightedPodAffinityTerm{}) + yyh4444.ElemContainerState(yyj4444) if r.TryDecodeAsNil() { - yyv4435[yyj4435] = WeightedPodAffinityTerm{} + yyv4444[yyj4444] = WeightedPodAffinityTerm{} } else { - yyv4437 := &yyv4435[yyj4435] - yyv4437.CodecDecodeSelf(d) + yyv4446 := &yyv4444[yyj4444] + yyv4446.CodecDecodeSelf(d) } } } } else { - yyj4435 := 0 - for ; !r.CheckBreak(); yyj4435++ { + yyj4444 := 0 + for ; !r.CheckBreak(); yyj4444++ { - if yyj4435 >= len(yyv4435) { - yyv4435 = append(yyv4435, WeightedPodAffinityTerm{}) // var yyz4435 WeightedPodAffinityTerm - yyc4435 = true + if yyj4444 >= len(yyv4444) { + yyv4444 = append(yyv4444, WeightedPodAffinityTerm{}) // var yyz4444 WeightedPodAffinityTerm + yyc4444 = true } - yyh4435.ElemContainerState(yyj4435) - if yyj4435 < len(yyv4435) { + yyh4444.ElemContainerState(yyj4444) + if yyj4444 < len(yyv4444) { if r.TryDecodeAsNil() { - yyv4435[yyj4435] = WeightedPodAffinityTerm{} + yyv4444[yyj4444] = WeightedPodAffinityTerm{} } else { - yyv4438 := &yyv4435[yyj4435] - yyv4438.CodecDecodeSelf(d) + yyv4447 := &yyv4444[yyj4444] + yyv4447.CodecDecodeSelf(d) } } else { @@ -55886,17 +55964,17 @@ func (x codecSelfer1234) decSliceWeightedPodAffinityTerm(v *[]WeightedPodAffinit } } - if yyj4435 < len(yyv4435) { - yyv4435 = yyv4435[:yyj4435] - yyc4435 = true - } else if yyj4435 == 0 && yyv4435 == nil { - yyv4435 = []WeightedPodAffinityTerm{} - yyc4435 = true + if yyj4444 < len(yyv4444) { + yyv4444 = yyv4444[:yyj4444] + yyc4444 = true + } else if yyj4444 == 0 && yyv4444 == nil { + yyv4444 = []WeightedPodAffinityTerm{} + yyc4444 = true } } - yyh4435.End() - if yyc4435 { - *v = yyv4435 + yyh4444.End() + if yyc4444 { + *v = yyv4444 } } @@ -55905,10 +55983,10 @@ func (x codecSelfer1234) encSlicePreferredSchedulingTerm(v []PreferredScheduling z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4439 := range v { + for _, yyv4448 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4440 := &yyv4439 - yy4440.CodecEncodeSelf(e) + yy4449 := &yyv4448 + yy4449.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -55918,83 +55996,83 @@ func (x codecSelfer1234) decSlicePreferredSchedulingTerm(v *[]PreferredSchedulin z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4441 := *v - yyh4441, yyl4441 := z.DecSliceHelperStart() - var yyc4441 bool - if yyl4441 == 0 { - if yyv4441 == nil { - yyv4441 = []PreferredSchedulingTerm{} - yyc4441 = true - } else if len(yyv4441) != 0 { - yyv4441 = yyv4441[:0] - yyc4441 = true + yyv4450 := *v + yyh4450, yyl4450 := z.DecSliceHelperStart() + var yyc4450 bool + if yyl4450 == 0 { + if yyv4450 == nil { + yyv4450 = []PreferredSchedulingTerm{} + yyc4450 = true + } else if len(yyv4450) != 0 { + yyv4450 = yyv4450[:0] + yyc4450 = true } - } else if yyl4441 > 0 { - var yyrr4441, yyrl4441 int - var yyrt4441 bool - if yyl4441 > cap(yyv4441) { + } else if yyl4450 > 0 { + var yyrr4450, yyrl4450 int + var yyrt4450 bool + if yyl4450 > cap(yyv4450) { - yyrg4441 := len(yyv4441) > 0 - yyv24441 := yyv4441 - yyrl4441, yyrt4441 = z.DecInferLen(yyl4441, z.DecBasicHandle().MaxInitLen, 32) - if yyrt4441 { - if yyrl4441 <= cap(yyv4441) { - yyv4441 = yyv4441[:yyrl4441] + yyrg4450 := len(yyv4450) > 0 + yyv24450 := yyv4450 + yyrl4450, yyrt4450 = z.DecInferLen(yyl4450, z.DecBasicHandle().MaxInitLen, 32) + if yyrt4450 { + if yyrl4450 <= cap(yyv4450) { + yyv4450 = yyv4450[:yyrl4450] } else { - yyv4441 = make([]PreferredSchedulingTerm, yyrl4441) + yyv4450 = make([]PreferredSchedulingTerm, yyrl4450) } } else { - yyv4441 = make([]PreferredSchedulingTerm, yyrl4441) + yyv4450 = make([]PreferredSchedulingTerm, yyrl4450) } - yyc4441 = true - yyrr4441 = len(yyv4441) - if yyrg4441 { - copy(yyv4441, yyv24441) + yyc4450 = true + yyrr4450 = len(yyv4450) + if yyrg4450 { + copy(yyv4450, yyv24450) } - } else if yyl4441 != len(yyv4441) { - yyv4441 = yyv4441[:yyl4441] - yyc4441 = true + } else if yyl4450 != len(yyv4450) { + yyv4450 = yyv4450[:yyl4450] + yyc4450 = true } - yyj4441 := 0 - for ; yyj4441 < yyrr4441; yyj4441++ { - yyh4441.ElemContainerState(yyj4441) + yyj4450 := 0 + for ; yyj4450 < yyrr4450; yyj4450++ { + yyh4450.ElemContainerState(yyj4450) if r.TryDecodeAsNil() { - yyv4441[yyj4441] = PreferredSchedulingTerm{} + yyv4450[yyj4450] = PreferredSchedulingTerm{} } else { - yyv4442 := &yyv4441[yyj4441] - yyv4442.CodecDecodeSelf(d) + yyv4451 := &yyv4450[yyj4450] + yyv4451.CodecDecodeSelf(d) } } - if yyrt4441 { - for ; yyj4441 < yyl4441; yyj4441++ { - yyv4441 = append(yyv4441, PreferredSchedulingTerm{}) - yyh4441.ElemContainerState(yyj4441) + if yyrt4450 { + for ; yyj4450 < yyl4450; yyj4450++ { + yyv4450 = append(yyv4450, PreferredSchedulingTerm{}) + yyh4450.ElemContainerState(yyj4450) if r.TryDecodeAsNil() { - yyv4441[yyj4441] = PreferredSchedulingTerm{} + yyv4450[yyj4450] = PreferredSchedulingTerm{} } else { - yyv4443 := &yyv4441[yyj4441] - yyv4443.CodecDecodeSelf(d) + yyv4452 := &yyv4450[yyj4450] + yyv4452.CodecDecodeSelf(d) } } } } else { - yyj4441 := 0 - for ; !r.CheckBreak(); yyj4441++ { + yyj4450 := 0 + for ; !r.CheckBreak(); yyj4450++ { - if yyj4441 >= len(yyv4441) { - yyv4441 = append(yyv4441, PreferredSchedulingTerm{}) // var yyz4441 PreferredSchedulingTerm - yyc4441 = true + if yyj4450 >= len(yyv4450) { + yyv4450 = append(yyv4450, PreferredSchedulingTerm{}) // var yyz4450 PreferredSchedulingTerm + yyc4450 = true } - yyh4441.ElemContainerState(yyj4441) - if yyj4441 < len(yyv4441) { + yyh4450.ElemContainerState(yyj4450) + if yyj4450 < len(yyv4450) { if r.TryDecodeAsNil() { - yyv4441[yyj4441] = PreferredSchedulingTerm{} + yyv4450[yyj4450] = PreferredSchedulingTerm{} } else { - yyv4444 := &yyv4441[yyj4441] - yyv4444.CodecDecodeSelf(d) + yyv4453 := &yyv4450[yyj4450] + yyv4453.CodecDecodeSelf(d) } } else { @@ -56002,17 +56080,17 @@ func (x codecSelfer1234) decSlicePreferredSchedulingTerm(v *[]PreferredSchedulin } } - if yyj4441 < len(yyv4441) { - yyv4441 = yyv4441[:yyj4441] - yyc4441 = true - } else if yyj4441 == 0 && yyv4441 == nil { - yyv4441 = []PreferredSchedulingTerm{} - yyc4441 = true + if yyj4450 < len(yyv4450) { + yyv4450 = yyv4450[:yyj4450] + yyc4450 = true + } else if yyj4450 == 0 && yyv4450 == nil { + yyv4450 = []PreferredSchedulingTerm{} + yyc4450 = true } } - yyh4441.End() - if yyc4441 { - *v = yyv4441 + yyh4450.End() + if yyc4450 { + *v = yyv4450 } } @@ -56021,10 +56099,10 @@ func (x codecSelfer1234) encSliceVolume(v []Volume, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4445 := range v { + for _, yyv4454 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4446 := &yyv4445 - yy4446.CodecEncodeSelf(e) + yy4455 := &yyv4454 + yy4455.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56034,83 +56112,83 @@ func (x codecSelfer1234) decSliceVolume(v *[]Volume, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4447 := *v - yyh4447, yyl4447 := z.DecSliceHelperStart() - var yyc4447 bool - if yyl4447 == 0 { - if yyv4447 == nil { - yyv4447 = []Volume{} - yyc4447 = true - } else if len(yyv4447) != 0 { - yyv4447 = yyv4447[:0] - yyc4447 = true + yyv4456 := *v + yyh4456, yyl4456 := z.DecSliceHelperStart() + var yyc4456 bool + if yyl4456 == 0 { + if yyv4456 == nil { + yyv4456 = []Volume{} + yyc4456 = true + } else if len(yyv4456) != 0 { + yyv4456 = yyv4456[:0] + yyc4456 = true } - } else if yyl4447 > 0 { - var yyrr4447, yyrl4447 int - var yyrt4447 bool - if yyl4447 > cap(yyv4447) { + } else if yyl4456 > 0 { + var yyrr4456, yyrl4456 int + var yyrt4456 bool + if yyl4456 > cap(yyv4456) { - yyrg4447 := len(yyv4447) > 0 - yyv24447 := yyv4447 - yyrl4447, yyrt4447 = z.DecInferLen(yyl4447, z.DecBasicHandle().MaxInitLen, 176) - if yyrt4447 { - if yyrl4447 <= cap(yyv4447) { - yyv4447 = yyv4447[:yyrl4447] + yyrg4456 := len(yyv4456) > 0 + yyv24456 := yyv4456 + yyrl4456, yyrt4456 = z.DecInferLen(yyl4456, z.DecBasicHandle().MaxInitLen, 176) + if yyrt4456 { + if yyrl4456 <= cap(yyv4456) { + yyv4456 = yyv4456[:yyrl4456] } else { - yyv4447 = make([]Volume, yyrl4447) + yyv4456 = make([]Volume, yyrl4456) } } else { - yyv4447 = make([]Volume, yyrl4447) + yyv4456 = make([]Volume, yyrl4456) } - yyc4447 = true - yyrr4447 = len(yyv4447) - if yyrg4447 { - copy(yyv4447, yyv24447) + yyc4456 = true + yyrr4456 = len(yyv4456) + if yyrg4456 { + copy(yyv4456, yyv24456) } - } else if yyl4447 != len(yyv4447) { - yyv4447 = yyv4447[:yyl4447] - yyc4447 = true + } else if yyl4456 != len(yyv4456) { + yyv4456 = yyv4456[:yyl4456] + yyc4456 = true } - yyj4447 := 0 - for ; yyj4447 < yyrr4447; yyj4447++ { - yyh4447.ElemContainerState(yyj4447) + yyj4456 := 0 + for ; yyj4456 < yyrr4456; yyj4456++ { + yyh4456.ElemContainerState(yyj4456) if r.TryDecodeAsNil() { - yyv4447[yyj4447] = Volume{} + yyv4456[yyj4456] = Volume{} } else { - yyv4448 := &yyv4447[yyj4447] - yyv4448.CodecDecodeSelf(d) + yyv4457 := &yyv4456[yyj4456] + yyv4457.CodecDecodeSelf(d) } } - if yyrt4447 { - for ; yyj4447 < yyl4447; yyj4447++ { - yyv4447 = append(yyv4447, Volume{}) - yyh4447.ElemContainerState(yyj4447) + if yyrt4456 { + for ; yyj4456 < yyl4456; yyj4456++ { + yyv4456 = append(yyv4456, Volume{}) + yyh4456.ElemContainerState(yyj4456) if r.TryDecodeAsNil() { - yyv4447[yyj4447] = Volume{} + yyv4456[yyj4456] = Volume{} } else { - yyv4449 := &yyv4447[yyj4447] - yyv4449.CodecDecodeSelf(d) + yyv4458 := &yyv4456[yyj4456] + yyv4458.CodecDecodeSelf(d) } } } } else { - yyj4447 := 0 - for ; !r.CheckBreak(); yyj4447++ { + yyj4456 := 0 + for ; !r.CheckBreak(); yyj4456++ { - if yyj4447 >= len(yyv4447) { - yyv4447 = append(yyv4447, Volume{}) // var yyz4447 Volume - yyc4447 = true + if yyj4456 >= len(yyv4456) { + yyv4456 = append(yyv4456, Volume{}) // var yyz4456 Volume + yyc4456 = true } - yyh4447.ElemContainerState(yyj4447) - if yyj4447 < len(yyv4447) { + yyh4456.ElemContainerState(yyj4456) + if yyj4456 < len(yyv4456) { if r.TryDecodeAsNil() { - yyv4447[yyj4447] = Volume{} + yyv4456[yyj4456] = Volume{} } else { - yyv4450 := &yyv4447[yyj4447] - yyv4450.CodecDecodeSelf(d) + yyv4459 := &yyv4456[yyj4456] + yyv4459.CodecDecodeSelf(d) } } else { @@ -56118,17 +56196,17 @@ func (x codecSelfer1234) decSliceVolume(v *[]Volume, d *codec1978.Decoder) { } } - if yyj4447 < len(yyv4447) { - yyv4447 = yyv4447[:yyj4447] - yyc4447 = true - } else if yyj4447 == 0 && yyv4447 == nil { - yyv4447 = []Volume{} - yyc4447 = true + if yyj4456 < len(yyv4456) { + yyv4456 = yyv4456[:yyj4456] + yyc4456 = true + } else if yyj4456 == 0 && yyv4456 == nil { + yyv4456 = []Volume{} + yyc4456 = true } } - yyh4447.End() - if yyc4447 { - *v = yyv4447 + yyh4456.End() + if yyc4456 { + *v = yyv4456 } } @@ -56137,10 +56215,10 @@ func (x codecSelfer1234) encSliceContainer(v []Container, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4451 := range v { + for _, yyv4460 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4452 := &yyv4451 - yy4452.CodecEncodeSelf(e) + yy4461 := &yyv4460 + yy4461.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56150,83 +56228,83 @@ func (x codecSelfer1234) decSliceContainer(v *[]Container, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4453 := *v - yyh4453, yyl4453 := z.DecSliceHelperStart() - var yyc4453 bool - if yyl4453 == 0 { - if yyv4453 == nil { - yyv4453 = []Container{} - yyc4453 = true - } else if len(yyv4453) != 0 { - yyv4453 = yyv4453[:0] - yyc4453 = true + yyv4462 := *v + yyh4462, yyl4462 := z.DecSliceHelperStart() + var yyc4462 bool + if yyl4462 == 0 { + if yyv4462 == nil { + yyv4462 = []Container{} + yyc4462 = true + } else if len(yyv4462) != 0 { + yyv4462 = yyv4462[:0] + yyc4462 = true } - } else if yyl4453 > 0 { - var yyrr4453, yyrl4453 int - var yyrt4453 bool - if yyl4453 > cap(yyv4453) { + } else if yyl4462 > 0 { + var yyrr4462, yyrl4462 int + var yyrt4462 bool + if yyl4462 > cap(yyv4462) { - yyrg4453 := len(yyv4453) > 0 - yyv24453 := yyv4453 - yyrl4453, yyrt4453 = z.DecInferLen(yyl4453, z.DecBasicHandle().MaxInitLen, 256) - if yyrt4453 { - if yyrl4453 <= cap(yyv4453) { - yyv4453 = yyv4453[:yyrl4453] + yyrg4462 := len(yyv4462) > 0 + yyv24462 := yyv4462 + yyrl4462, yyrt4462 = z.DecInferLen(yyl4462, z.DecBasicHandle().MaxInitLen, 256) + if yyrt4462 { + if yyrl4462 <= cap(yyv4462) { + yyv4462 = yyv4462[:yyrl4462] } else { - yyv4453 = make([]Container, yyrl4453) + yyv4462 = make([]Container, yyrl4462) } } else { - yyv4453 = make([]Container, yyrl4453) + yyv4462 = make([]Container, yyrl4462) } - yyc4453 = true - yyrr4453 = len(yyv4453) - if yyrg4453 { - copy(yyv4453, yyv24453) + yyc4462 = true + yyrr4462 = len(yyv4462) + if yyrg4462 { + copy(yyv4462, yyv24462) } - } else if yyl4453 != len(yyv4453) { - yyv4453 = yyv4453[:yyl4453] - yyc4453 = true + } else if yyl4462 != len(yyv4462) { + yyv4462 = yyv4462[:yyl4462] + yyc4462 = true } - yyj4453 := 0 - for ; yyj4453 < yyrr4453; yyj4453++ { - yyh4453.ElemContainerState(yyj4453) + yyj4462 := 0 + for ; yyj4462 < yyrr4462; yyj4462++ { + yyh4462.ElemContainerState(yyj4462) if r.TryDecodeAsNil() { - yyv4453[yyj4453] = Container{} + yyv4462[yyj4462] = Container{} } else { - yyv4454 := &yyv4453[yyj4453] - yyv4454.CodecDecodeSelf(d) + yyv4463 := &yyv4462[yyj4462] + yyv4463.CodecDecodeSelf(d) } } - if yyrt4453 { - for ; yyj4453 < yyl4453; yyj4453++ { - yyv4453 = append(yyv4453, Container{}) - yyh4453.ElemContainerState(yyj4453) + if yyrt4462 { + for ; yyj4462 < yyl4462; yyj4462++ { + yyv4462 = append(yyv4462, Container{}) + yyh4462.ElemContainerState(yyj4462) if r.TryDecodeAsNil() { - yyv4453[yyj4453] = Container{} + yyv4462[yyj4462] = Container{} } else { - yyv4455 := &yyv4453[yyj4453] - yyv4455.CodecDecodeSelf(d) + yyv4464 := &yyv4462[yyj4462] + yyv4464.CodecDecodeSelf(d) } } } } else { - yyj4453 := 0 - for ; !r.CheckBreak(); yyj4453++ { + yyj4462 := 0 + for ; !r.CheckBreak(); yyj4462++ { - if yyj4453 >= len(yyv4453) { - yyv4453 = append(yyv4453, Container{}) // var yyz4453 Container - yyc4453 = true + if yyj4462 >= len(yyv4462) { + yyv4462 = append(yyv4462, Container{}) // var yyz4462 Container + yyc4462 = true } - yyh4453.ElemContainerState(yyj4453) - if yyj4453 < len(yyv4453) { + yyh4462.ElemContainerState(yyj4462) + if yyj4462 < len(yyv4462) { if r.TryDecodeAsNil() { - yyv4453[yyj4453] = Container{} + yyv4462[yyj4462] = Container{} } else { - yyv4456 := &yyv4453[yyj4453] - yyv4456.CodecDecodeSelf(d) + yyv4465 := &yyv4462[yyj4462] + yyv4465.CodecDecodeSelf(d) } } else { @@ -56234,17 +56312,17 @@ func (x codecSelfer1234) decSliceContainer(v *[]Container, d *codec1978.Decoder) } } - if yyj4453 < len(yyv4453) { - yyv4453 = yyv4453[:yyj4453] - yyc4453 = true - } else if yyj4453 == 0 && yyv4453 == nil { - yyv4453 = []Container{} - yyc4453 = true + if yyj4462 < len(yyv4462) { + yyv4462 = yyv4462[:yyj4462] + yyc4462 = true + } else if yyj4462 == 0 && yyv4462 == nil { + yyv4462 = []Container{} + yyc4462 = true } } - yyh4453.End() - if yyc4453 { - *v = yyv4453 + yyh4462.End() + if yyc4462 { + *v = yyv4462 } } @@ -56253,10 +56331,10 @@ func (x codecSelfer1234) encSliceLocalObjectReference(v []LocalObjectReference, z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4457 := range v { + for _, yyv4466 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4458 := &yyv4457 - yy4458.CodecEncodeSelf(e) + yy4467 := &yyv4466 + yy4467.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56266,83 +56344,83 @@ func (x codecSelfer1234) decSliceLocalObjectReference(v *[]LocalObjectReference, z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4459 := *v - yyh4459, yyl4459 := z.DecSliceHelperStart() - var yyc4459 bool - if yyl4459 == 0 { - if yyv4459 == nil { - yyv4459 = []LocalObjectReference{} - yyc4459 = true - } else if len(yyv4459) != 0 { - yyv4459 = yyv4459[:0] - yyc4459 = true + yyv4468 := *v + yyh4468, yyl4468 := z.DecSliceHelperStart() + var yyc4468 bool + if yyl4468 == 0 { + if yyv4468 == nil { + yyv4468 = []LocalObjectReference{} + yyc4468 = true + } else if len(yyv4468) != 0 { + yyv4468 = yyv4468[:0] + yyc4468 = true } - } else if yyl4459 > 0 { - var yyrr4459, yyrl4459 int - var yyrt4459 bool - if yyl4459 > cap(yyv4459) { + } else if yyl4468 > 0 { + var yyrr4468, yyrl4468 int + var yyrt4468 bool + if yyl4468 > cap(yyv4468) { - yyrg4459 := len(yyv4459) > 0 - yyv24459 := yyv4459 - yyrl4459, yyrt4459 = z.DecInferLen(yyl4459, z.DecBasicHandle().MaxInitLen, 16) - if yyrt4459 { - if yyrl4459 <= cap(yyv4459) { - yyv4459 = yyv4459[:yyrl4459] + yyrg4468 := len(yyv4468) > 0 + yyv24468 := yyv4468 + yyrl4468, yyrt4468 = z.DecInferLen(yyl4468, z.DecBasicHandle().MaxInitLen, 16) + if yyrt4468 { + if yyrl4468 <= cap(yyv4468) { + yyv4468 = yyv4468[:yyrl4468] } else { - yyv4459 = make([]LocalObjectReference, yyrl4459) + yyv4468 = make([]LocalObjectReference, yyrl4468) } } else { - yyv4459 = make([]LocalObjectReference, yyrl4459) + yyv4468 = make([]LocalObjectReference, yyrl4468) } - yyc4459 = true - yyrr4459 = len(yyv4459) - if yyrg4459 { - copy(yyv4459, yyv24459) + yyc4468 = true + yyrr4468 = len(yyv4468) + if yyrg4468 { + copy(yyv4468, yyv24468) } - } else if yyl4459 != len(yyv4459) { - yyv4459 = yyv4459[:yyl4459] - yyc4459 = true + } else if yyl4468 != len(yyv4468) { + yyv4468 = yyv4468[:yyl4468] + yyc4468 = true } - yyj4459 := 0 - for ; yyj4459 < yyrr4459; yyj4459++ { - yyh4459.ElemContainerState(yyj4459) + yyj4468 := 0 + for ; yyj4468 < yyrr4468; yyj4468++ { + yyh4468.ElemContainerState(yyj4468) if r.TryDecodeAsNil() { - yyv4459[yyj4459] = LocalObjectReference{} + yyv4468[yyj4468] = LocalObjectReference{} } else { - yyv4460 := &yyv4459[yyj4459] - yyv4460.CodecDecodeSelf(d) + yyv4469 := &yyv4468[yyj4468] + yyv4469.CodecDecodeSelf(d) } } - if yyrt4459 { - for ; yyj4459 < yyl4459; yyj4459++ { - yyv4459 = append(yyv4459, LocalObjectReference{}) - yyh4459.ElemContainerState(yyj4459) + if yyrt4468 { + for ; yyj4468 < yyl4468; yyj4468++ { + yyv4468 = append(yyv4468, LocalObjectReference{}) + yyh4468.ElemContainerState(yyj4468) if r.TryDecodeAsNil() { - yyv4459[yyj4459] = LocalObjectReference{} + yyv4468[yyj4468] = LocalObjectReference{} } else { - yyv4461 := &yyv4459[yyj4459] - yyv4461.CodecDecodeSelf(d) + yyv4470 := &yyv4468[yyj4468] + yyv4470.CodecDecodeSelf(d) } } } } else { - yyj4459 := 0 - for ; !r.CheckBreak(); yyj4459++ { + yyj4468 := 0 + for ; !r.CheckBreak(); yyj4468++ { - if yyj4459 >= len(yyv4459) { - yyv4459 = append(yyv4459, LocalObjectReference{}) // var yyz4459 LocalObjectReference - yyc4459 = true + if yyj4468 >= len(yyv4468) { + yyv4468 = append(yyv4468, LocalObjectReference{}) // var yyz4468 LocalObjectReference + yyc4468 = true } - yyh4459.ElemContainerState(yyj4459) - if yyj4459 < len(yyv4459) { + yyh4468.ElemContainerState(yyj4468) + if yyj4468 < len(yyv4468) { if r.TryDecodeAsNil() { - yyv4459[yyj4459] = LocalObjectReference{} + yyv4468[yyj4468] = LocalObjectReference{} } else { - yyv4462 := &yyv4459[yyj4459] - yyv4462.CodecDecodeSelf(d) + yyv4471 := &yyv4468[yyj4468] + yyv4471.CodecDecodeSelf(d) } } else { @@ -56350,17 +56428,17 @@ func (x codecSelfer1234) decSliceLocalObjectReference(v *[]LocalObjectReference, } } - if yyj4459 < len(yyv4459) { - yyv4459 = yyv4459[:yyj4459] - yyc4459 = true - } else if yyj4459 == 0 && yyv4459 == nil { - yyv4459 = []LocalObjectReference{} - yyc4459 = true + if yyj4468 < len(yyv4468) { + yyv4468 = yyv4468[:yyj4468] + yyc4468 = true + } else if yyj4468 == 0 && yyv4468 == nil { + yyv4468 = []LocalObjectReference{} + yyc4468 = true } } - yyh4459.End() - if yyc4459 { - *v = yyv4459 + yyh4468.End() + if yyc4468 { + *v = yyv4468 } } @@ -56369,10 +56447,10 @@ func (x codecSelfer1234) encSlicePodCondition(v []PodCondition, e *codec1978.Enc z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4463 := range v { + for _, yyv4472 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4464 := &yyv4463 - yy4464.CodecEncodeSelf(e) + yy4473 := &yyv4472 + yy4473.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56382,83 +56460,83 @@ func (x codecSelfer1234) decSlicePodCondition(v *[]PodCondition, d *codec1978.De z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4465 := *v - yyh4465, yyl4465 := z.DecSliceHelperStart() - var yyc4465 bool - if yyl4465 == 0 { - if yyv4465 == nil { - yyv4465 = []PodCondition{} - yyc4465 = true - } else if len(yyv4465) != 0 { - yyv4465 = yyv4465[:0] - yyc4465 = true + yyv4474 := *v + yyh4474, yyl4474 := z.DecSliceHelperStart() + var yyc4474 bool + if yyl4474 == 0 { + if yyv4474 == nil { + yyv4474 = []PodCondition{} + yyc4474 = true + } else if len(yyv4474) != 0 { + yyv4474 = yyv4474[:0] + yyc4474 = true } - } else if yyl4465 > 0 { - var yyrr4465, yyrl4465 int - var yyrt4465 bool - if yyl4465 > cap(yyv4465) { + } else if yyl4474 > 0 { + var yyrr4474, yyrl4474 int + var yyrt4474 bool + if yyl4474 > cap(yyv4474) { - yyrg4465 := len(yyv4465) > 0 - yyv24465 := yyv4465 - yyrl4465, yyrt4465 = z.DecInferLen(yyl4465, z.DecBasicHandle().MaxInitLen, 112) - if yyrt4465 { - if yyrl4465 <= cap(yyv4465) { - yyv4465 = yyv4465[:yyrl4465] + yyrg4474 := len(yyv4474) > 0 + yyv24474 := yyv4474 + yyrl4474, yyrt4474 = z.DecInferLen(yyl4474, z.DecBasicHandle().MaxInitLen, 112) + if yyrt4474 { + if yyrl4474 <= cap(yyv4474) { + yyv4474 = yyv4474[:yyrl4474] } else { - yyv4465 = make([]PodCondition, yyrl4465) + yyv4474 = make([]PodCondition, yyrl4474) } } else { - yyv4465 = make([]PodCondition, yyrl4465) + yyv4474 = make([]PodCondition, yyrl4474) } - yyc4465 = true - yyrr4465 = len(yyv4465) - if yyrg4465 { - copy(yyv4465, yyv24465) + yyc4474 = true + yyrr4474 = len(yyv4474) + if yyrg4474 { + copy(yyv4474, yyv24474) } - } else if yyl4465 != len(yyv4465) { - yyv4465 = yyv4465[:yyl4465] - yyc4465 = true + } else if yyl4474 != len(yyv4474) { + yyv4474 = yyv4474[:yyl4474] + yyc4474 = true } - yyj4465 := 0 - for ; yyj4465 < yyrr4465; yyj4465++ { - yyh4465.ElemContainerState(yyj4465) + yyj4474 := 0 + for ; yyj4474 < yyrr4474; yyj4474++ { + yyh4474.ElemContainerState(yyj4474) if r.TryDecodeAsNil() { - yyv4465[yyj4465] = PodCondition{} + yyv4474[yyj4474] = PodCondition{} } else { - yyv4466 := &yyv4465[yyj4465] - yyv4466.CodecDecodeSelf(d) + yyv4475 := &yyv4474[yyj4474] + yyv4475.CodecDecodeSelf(d) } } - if yyrt4465 { - for ; yyj4465 < yyl4465; yyj4465++ { - yyv4465 = append(yyv4465, PodCondition{}) - yyh4465.ElemContainerState(yyj4465) + if yyrt4474 { + for ; yyj4474 < yyl4474; yyj4474++ { + yyv4474 = append(yyv4474, PodCondition{}) + yyh4474.ElemContainerState(yyj4474) if r.TryDecodeAsNil() { - yyv4465[yyj4465] = PodCondition{} + yyv4474[yyj4474] = PodCondition{} } else { - yyv4467 := &yyv4465[yyj4465] - yyv4467.CodecDecodeSelf(d) + yyv4476 := &yyv4474[yyj4474] + yyv4476.CodecDecodeSelf(d) } } } } else { - yyj4465 := 0 - for ; !r.CheckBreak(); yyj4465++ { + yyj4474 := 0 + for ; !r.CheckBreak(); yyj4474++ { - if yyj4465 >= len(yyv4465) { - yyv4465 = append(yyv4465, PodCondition{}) // var yyz4465 PodCondition - yyc4465 = true + if yyj4474 >= len(yyv4474) { + yyv4474 = append(yyv4474, PodCondition{}) // var yyz4474 PodCondition + yyc4474 = true } - yyh4465.ElemContainerState(yyj4465) - if yyj4465 < len(yyv4465) { + yyh4474.ElemContainerState(yyj4474) + if yyj4474 < len(yyv4474) { if r.TryDecodeAsNil() { - yyv4465[yyj4465] = PodCondition{} + yyv4474[yyj4474] = PodCondition{} } else { - yyv4468 := &yyv4465[yyj4465] - yyv4468.CodecDecodeSelf(d) + yyv4477 := &yyv4474[yyj4474] + yyv4477.CodecDecodeSelf(d) } } else { @@ -56466,17 +56544,17 @@ func (x codecSelfer1234) decSlicePodCondition(v *[]PodCondition, d *codec1978.De } } - if yyj4465 < len(yyv4465) { - yyv4465 = yyv4465[:yyj4465] - yyc4465 = true - } else if yyj4465 == 0 && yyv4465 == nil { - yyv4465 = []PodCondition{} - yyc4465 = true + if yyj4474 < len(yyv4474) { + yyv4474 = yyv4474[:yyj4474] + yyc4474 = true + } else if yyj4474 == 0 && yyv4474 == nil { + yyv4474 = []PodCondition{} + yyc4474 = true } } - yyh4465.End() - if yyc4465 { - *v = yyv4465 + yyh4474.End() + if yyc4474 { + *v = yyv4474 } } @@ -56485,10 +56563,10 @@ func (x codecSelfer1234) encSliceContainerStatus(v []ContainerStatus, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4469 := range v { + for _, yyv4478 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4470 := &yyv4469 - yy4470.CodecEncodeSelf(e) + yy4479 := &yyv4478 + yy4479.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56498,83 +56576,83 @@ func (x codecSelfer1234) decSliceContainerStatus(v *[]ContainerStatus, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4471 := *v - yyh4471, yyl4471 := z.DecSliceHelperStart() - var yyc4471 bool - if yyl4471 == 0 { - if yyv4471 == nil { - yyv4471 = []ContainerStatus{} - yyc4471 = true - } else if len(yyv4471) != 0 { - yyv4471 = yyv4471[:0] - yyc4471 = true + yyv4480 := *v + yyh4480, yyl4480 := z.DecSliceHelperStart() + var yyc4480 bool + if yyl4480 == 0 { + if yyv4480 == nil { + yyv4480 = []ContainerStatus{} + yyc4480 = true + } else if len(yyv4480) != 0 { + yyv4480 = yyv4480[:0] + yyc4480 = true } - } else if yyl4471 > 0 { - var yyrr4471, yyrl4471 int - var yyrt4471 bool - if yyl4471 > cap(yyv4471) { + } else if yyl4480 > 0 { + var yyrr4480, yyrl4480 int + var yyrt4480 bool + if yyl4480 > cap(yyv4480) { - yyrg4471 := len(yyv4471) > 0 - yyv24471 := yyv4471 - yyrl4471, yyrt4471 = z.DecInferLen(yyl4471, z.DecBasicHandle().MaxInitLen, 120) - if yyrt4471 { - if yyrl4471 <= cap(yyv4471) { - yyv4471 = yyv4471[:yyrl4471] + yyrg4480 := len(yyv4480) > 0 + yyv24480 := yyv4480 + yyrl4480, yyrt4480 = z.DecInferLen(yyl4480, z.DecBasicHandle().MaxInitLen, 120) + if yyrt4480 { + if yyrl4480 <= cap(yyv4480) { + yyv4480 = yyv4480[:yyrl4480] } else { - yyv4471 = make([]ContainerStatus, yyrl4471) + yyv4480 = make([]ContainerStatus, yyrl4480) } } else { - yyv4471 = make([]ContainerStatus, yyrl4471) + yyv4480 = make([]ContainerStatus, yyrl4480) } - yyc4471 = true - yyrr4471 = len(yyv4471) - if yyrg4471 { - copy(yyv4471, yyv24471) + yyc4480 = true + yyrr4480 = len(yyv4480) + if yyrg4480 { + copy(yyv4480, yyv24480) } - } else if yyl4471 != len(yyv4471) { - yyv4471 = yyv4471[:yyl4471] - yyc4471 = true + } else if yyl4480 != len(yyv4480) { + yyv4480 = yyv4480[:yyl4480] + yyc4480 = true } - yyj4471 := 0 - for ; yyj4471 < yyrr4471; yyj4471++ { - yyh4471.ElemContainerState(yyj4471) + yyj4480 := 0 + for ; yyj4480 < yyrr4480; yyj4480++ { + yyh4480.ElemContainerState(yyj4480) if r.TryDecodeAsNil() { - yyv4471[yyj4471] = ContainerStatus{} + yyv4480[yyj4480] = ContainerStatus{} } else { - yyv4472 := &yyv4471[yyj4471] - yyv4472.CodecDecodeSelf(d) + yyv4481 := &yyv4480[yyj4480] + yyv4481.CodecDecodeSelf(d) } } - if yyrt4471 { - for ; yyj4471 < yyl4471; yyj4471++ { - yyv4471 = append(yyv4471, ContainerStatus{}) - yyh4471.ElemContainerState(yyj4471) + if yyrt4480 { + for ; yyj4480 < yyl4480; yyj4480++ { + yyv4480 = append(yyv4480, ContainerStatus{}) + yyh4480.ElemContainerState(yyj4480) if r.TryDecodeAsNil() { - yyv4471[yyj4471] = ContainerStatus{} + yyv4480[yyj4480] = ContainerStatus{} } else { - yyv4473 := &yyv4471[yyj4471] - yyv4473.CodecDecodeSelf(d) + yyv4482 := &yyv4480[yyj4480] + yyv4482.CodecDecodeSelf(d) } } } } else { - yyj4471 := 0 - for ; !r.CheckBreak(); yyj4471++ { + yyj4480 := 0 + for ; !r.CheckBreak(); yyj4480++ { - if yyj4471 >= len(yyv4471) { - yyv4471 = append(yyv4471, ContainerStatus{}) // var yyz4471 ContainerStatus - yyc4471 = true + if yyj4480 >= len(yyv4480) { + yyv4480 = append(yyv4480, ContainerStatus{}) // var yyz4480 ContainerStatus + yyc4480 = true } - yyh4471.ElemContainerState(yyj4471) - if yyj4471 < len(yyv4471) { + yyh4480.ElemContainerState(yyj4480) + if yyj4480 < len(yyv4480) { if r.TryDecodeAsNil() { - yyv4471[yyj4471] = ContainerStatus{} + yyv4480[yyj4480] = ContainerStatus{} } else { - yyv4474 := &yyv4471[yyj4471] - yyv4474.CodecDecodeSelf(d) + yyv4483 := &yyv4480[yyj4480] + yyv4483.CodecDecodeSelf(d) } } else { @@ -56582,17 +56660,17 @@ func (x codecSelfer1234) decSliceContainerStatus(v *[]ContainerStatus, d *codec1 } } - if yyj4471 < len(yyv4471) { - yyv4471 = yyv4471[:yyj4471] - yyc4471 = true - } else if yyj4471 == 0 && yyv4471 == nil { - yyv4471 = []ContainerStatus{} - yyc4471 = true + if yyj4480 < len(yyv4480) { + yyv4480 = yyv4480[:yyj4480] + yyc4480 = true + } else if yyj4480 == 0 && yyv4480 == nil { + yyv4480 = []ContainerStatus{} + yyc4480 = true } } - yyh4471.End() - if yyc4471 { - *v = yyv4471 + yyh4480.End() + if yyc4480 { + *v = yyv4480 } } @@ -56601,10 +56679,10 @@ func (x codecSelfer1234) encSlicePodTemplate(v []PodTemplate, e *codec1978.Encod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4475 := range v { + for _, yyv4484 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4476 := &yyv4475 - yy4476.CodecEncodeSelf(e) + yy4485 := &yyv4484 + yy4485.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56614,83 +56692,83 @@ func (x codecSelfer1234) decSlicePodTemplate(v *[]PodTemplate, d *codec1978.Deco z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4477 := *v - yyh4477, yyl4477 := z.DecSliceHelperStart() - var yyc4477 bool - if yyl4477 == 0 { - if yyv4477 == nil { - yyv4477 = []PodTemplate{} - yyc4477 = true - } else if len(yyv4477) != 0 { - yyv4477 = yyv4477[:0] - yyc4477 = true + yyv4486 := *v + yyh4486, yyl4486 := z.DecSliceHelperStart() + var yyc4486 bool + if yyl4486 == 0 { + if yyv4486 == nil { + yyv4486 = []PodTemplate{} + yyc4486 = true + } else if len(yyv4486) != 0 { + yyv4486 = yyv4486[:0] + yyc4486 = true } - } else if yyl4477 > 0 { - var yyrr4477, yyrl4477 int - var yyrt4477 bool - if yyl4477 > cap(yyv4477) { + } else if yyl4486 > 0 { + var yyrr4486, yyrl4486 int + var yyrt4486 bool + if yyl4486 > cap(yyv4486) { - yyrg4477 := len(yyv4477) > 0 - yyv24477 := yyv4477 - yyrl4477, yyrt4477 = z.DecInferLen(yyl4477, z.DecBasicHandle().MaxInitLen, 672) - if yyrt4477 { - if yyrl4477 <= cap(yyv4477) { - yyv4477 = yyv4477[:yyrl4477] + yyrg4486 := len(yyv4486) > 0 + yyv24486 := yyv4486 + yyrl4486, yyrt4486 = z.DecInferLen(yyl4486, z.DecBasicHandle().MaxInitLen, 672) + if yyrt4486 { + if yyrl4486 <= cap(yyv4486) { + yyv4486 = yyv4486[:yyrl4486] } else { - yyv4477 = make([]PodTemplate, yyrl4477) + yyv4486 = make([]PodTemplate, yyrl4486) } } else { - yyv4477 = make([]PodTemplate, yyrl4477) + yyv4486 = make([]PodTemplate, yyrl4486) } - yyc4477 = true - yyrr4477 = len(yyv4477) - if yyrg4477 { - copy(yyv4477, yyv24477) + yyc4486 = true + yyrr4486 = len(yyv4486) + if yyrg4486 { + copy(yyv4486, yyv24486) } - } else if yyl4477 != len(yyv4477) { - yyv4477 = yyv4477[:yyl4477] - yyc4477 = true + } else if yyl4486 != len(yyv4486) { + yyv4486 = yyv4486[:yyl4486] + yyc4486 = true } - yyj4477 := 0 - for ; yyj4477 < yyrr4477; yyj4477++ { - yyh4477.ElemContainerState(yyj4477) + yyj4486 := 0 + for ; yyj4486 < yyrr4486; yyj4486++ { + yyh4486.ElemContainerState(yyj4486) if r.TryDecodeAsNil() { - yyv4477[yyj4477] = PodTemplate{} + yyv4486[yyj4486] = PodTemplate{} } else { - yyv4478 := &yyv4477[yyj4477] - yyv4478.CodecDecodeSelf(d) + yyv4487 := &yyv4486[yyj4486] + yyv4487.CodecDecodeSelf(d) } } - if yyrt4477 { - for ; yyj4477 < yyl4477; yyj4477++ { - yyv4477 = append(yyv4477, PodTemplate{}) - yyh4477.ElemContainerState(yyj4477) + if yyrt4486 { + for ; yyj4486 < yyl4486; yyj4486++ { + yyv4486 = append(yyv4486, PodTemplate{}) + yyh4486.ElemContainerState(yyj4486) if r.TryDecodeAsNil() { - yyv4477[yyj4477] = PodTemplate{} + yyv4486[yyj4486] = PodTemplate{} } else { - yyv4479 := &yyv4477[yyj4477] - yyv4479.CodecDecodeSelf(d) + yyv4488 := &yyv4486[yyj4486] + yyv4488.CodecDecodeSelf(d) } } } } else { - yyj4477 := 0 - for ; !r.CheckBreak(); yyj4477++ { + yyj4486 := 0 + for ; !r.CheckBreak(); yyj4486++ { - if yyj4477 >= len(yyv4477) { - yyv4477 = append(yyv4477, PodTemplate{}) // var yyz4477 PodTemplate - yyc4477 = true + if yyj4486 >= len(yyv4486) { + yyv4486 = append(yyv4486, PodTemplate{}) // var yyz4486 PodTemplate + yyc4486 = true } - yyh4477.ElemContainerState(yyj4477) - if yyj4477 < len(yyv4477) { + yyh4486.ElemContainerState(yyj4486) + if yyj4486 < len(yyv4486) { if r.TryDecodeAsNil() { - yyv4477[yyj4477] = PodTemplate{} + yyv4486[yyj4486] = PodTemplate{} } else { - yyv4480 := &yyv4477[yyj4477] - yyv4480.CodecDecodeSelf(d) + yyv4489 := &yyv4486[yyj4486] + yyv4489.CodecDecodeSelf(d) } } else { @@ -56698,17 +56776,17 @@ func (x codecSelfer1234) decSlicePodTemplate(v *[]PodTemplate, d *codec1978.Deco } } - if yyj4477 < len(yyv4477) { - yyv4477 = yyv4477[:yyj4477] - yyc4477 = true - } else if yyj4477 == 0 && yyv4477 == nil { - yyv4477 = []PodTemplate{} - yyc4477 = true + if yyj4486 < len(yyv4486) { + yyv4486 = yyv4486[:yyj4486] + yyc4486 = true + } else if yyj4486 == 0 && yyv4486 == nil { + yyv4486 = []PodTemplate{} + yyc4486 = true } } - yyh4477.End() - if yyc4477 { - *v = yyv4477 + yyh4486.End() + if yyc4486 { + *v = yyv4486 } } @@ -56717,10 +56795,10 @@ func (x codecSelfer1234) encSliceReplicationController(v []ReplicationController z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4481 := range v { + for _, yyv4490 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4482 := &yyv4481 - yy4482.CodecEncodeSelf(e) + yy4491 := &yyv4490 + yy4491.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56730,83 +56808,83 @@ func (x codecSelfer1234) decSliceReplicationController(v *[]ReplicationControlle z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4483 := *v - yyh4483, yyl4483 := z.DecSliceHelperStart() - var yyc4483 bool - if yyl4483 == 0 { - if yyv4483 == nil { - yyv4483 = []ReplicationController{} - yyc4483 = true - } else if len(yyv4483) != 0 { - yyv4483 = yyv4483[:0] - yyc4483 = true + yyv4492 := *v + yyh4492, yyl4492 := z.DecSliceHelperStart() + var yyc4492 bool + if yyl4492 == 0 { + if yyv4492 == nil { + yyv4492 = []ReplicationController{} + yyc4492 = true + } else if len(yyv4492) != 0 { + yyv4492 = yyv4492[:0] + yyc4492 = true } - } else if yyl4483 > 0 { - var yyrr4483, yyrl4483 int - var yyrt4483 bool - if yyl4483 > cap(yyv4483) { + } else if yyl4492 > 0 { + var yyrr4492, yyrl4492 int + var yyrt4492 bool + if yyl4492 > cap(yyv4492) { - yyrg4483 := len(yyv4483) > 0 - yyv24483 := yyv4483 - yyrl4483, yyrt4483 = z.DecInferLen(yyl4483, z.DecBasicHandle().MaxInitLen, 280) - if yyrt4483 { - if yyrl4483 <= cap(yyv4483) { - yyv4483 = yyv4483[:yyrl4483] + yyrg4492 := len(yyv4492) > 0 + yyv24492 := yyv4492 + yyrl4492, yyrt4492 = z.DecInferLen(yyl4492, z.DecBasicHandle().MaxInitLen, 280) + if yyrt4492 { + if yyrl4492 <= cap(yyv4492) { + yyv4492 = yyv4492[:yyrl4492] } else { - yyv4483 = make([]ReplicationController, yyrl4483) + yyv4492 = make([]ReplicationController, yyrl4492) } } else { - yyv4483 = make([]ReplicationController, yyrl4483) + yyv4492 = make([]ReplicationController, yyrl4492) } - yyc4483 = true - yyrr4483 = len(yyv4483) - if yyrg4483 { - copy(yyv4483, yyv24483) + yyc4492 = true + yyrr4492 = len(yyv4492) + if yyrg4492 { + copy(yyv4492, yyv24492) } - } else if yyl4483 != len(yyv4483) { - yyv4483 = yyv4483[:yyl4483] - yyc4483 = true + } else if yyl4492 != len(yyv4492) { + yyv4492 = yyv4492[:yyl4492] + yyc4492 = true } - yyj4483 := 0 - for ; yyj4483 < yyrr4483; yyj4483++ { - yyh4483.ElemContainerState(yyj4483) + yyj4492 := 0 + for ; yyj4492 < yyrr4492; yyj4492++ { + yyh4492.ElemContainerState(yyj4492) if r.TryDecodeAsNil() { - yyv4483[yyj4483] = ReplicationController{} + yyv4492[yyj4492] = ReplicationController{} } else { - yyv4484 := &yyv4483[yyj4483] - yyv4484.CodecDecodeSelf(d) + yyv4493 := &yyv4492[yyj4492] + yyv4493.CodecDecodeSelf(d) } } - if yyrt4483 { - for ; yyj4483 < yyl4483; yyj4483++ { - yyv4483 = append(yyv4483, ReplicationController{}) - yyh4483.ElemContainerState(yyj4483) + if yyrt4492 { + for ; yyj4492 < yyl4492; yyj4492++ { + yyv4492 = append(yyv4492, ReplicationController{}) + yyh4492.ElemContainerState(yyj4492) if r.TryDecodeAsNil() { - yyv4483[yyj4483] = ReplicationController{} + yyv4492[yyj4492] = ReplicationController{} } else { - yyv4485 := &yyv4483[yyj4483] - yyv4485.CodecDecodeSelf(d) + yyv4494 := &yyv4492[yyj4492] + yyv4494.CodecDecodeSelf(d) } } } } else { - yyj4483 := 0 - for ; !r.CheckBreak(); yyj4483++ { + yyj4492 := 0 + for ; !r.CheckBreak(); yyj4492++ { - if yyj4483 >= len(yyv4483) { - yyv4483 = append(yyv4483, ReplicationController{}) // var yyz4483 ReplicationController - yyc4483 = true + if yyj4492 >= len(yyv4492) { + yyv4492 = append(yyv4492, ReplicationController{}) // var yyz4492 ReplicationController + yyc4492 = true } - yyh4483.ElemContainerState(yyj4483) - if yyj4483 < len(yyv4483) { + yyh4492.ElemContainerState(yyj4492) + if yyj4492 < len(yyv4492) { if r.TryDecodeAsNil() { - yyv4483[yyj4483] = ReplicationController{} + yyv4492[yyj4492] = ReplicationController{} } else { - yyv4486 := &yyv4483[yyj4483] - yyv4486.CodecDecodeSelf(d) + yyv4495 := &yyv4492[yyj4492] + yyv4495.CodecDecodeSelf(d) } } else { @@ -56814,17 +56892,17 @@ func (x codecSelfer1234) decSliceReplicationController(v *[]ReplicationControlle } } - if yyj4483 < len(yyv4483) { - yyv4483 = yyv4483[:yyj4483] - yyc4483 = true - } else if yyj4483 == 0 && yyv4483 == nil { - yyv4483 = []ReplicationController{} - yyc4483 = true + if yyj4492 < len(yyv4492) { + yyv4492 = yyv4492[:yyj4492] + yyc4492 = true + } else if yyj4492 == 0 && yyv4492 == nil { + yyv4492 = []ReplicationController{} + yyc4492 = true } } - yyh4483.End() - if yyc4483 { - *v = yyv4483 + yyh4492.End() + if yyc4492 { + *v = yyv4492 } } @@ -56833,10 +56911,10 @@ func (x codecSelfer1234) encSliceService(v []Service, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4487 := range v { + for _, yyv4496 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4488 := &yyv4487 - yy4488.CodecEncodeSelf(e) + yy4497 := &yyv4496 + yy4497.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56846,83 +56924,83 @@ func (x codecSelfer1234) decSliceService(v *[]Service, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4489 := *v - yyh4489, yyl4489 := z.DecSliceHelperStart() - var yyc4489 bool - if yyl4489 == 0 { - if yyv4489 == nil { - yyv4489 = []Service{} - yyc4489 = true - } else if len(yyv4489) != 0 { - yyv4489 = yyv4489[:0] - yyc4489 = true + yyv4498 := *v + yyh4498, yyl4498 := z.DecSliceHelperStart() + var yyc4498 bool + if yyl4498 == 0 { + if yyv4498 == nil { + yyv4498 = []Service{} + yyc4498 = true + } else if len(yyv4498) != 0 { + yyv4498 = yyv4498[:0] + yyc4498 = true } - } else if yyl4489 > 0 { - var yyrr4489, yyrl4489 int - var yyrt4489 bool - if yyl4489 > cap(yyv4489) { + } else if yyl4498 > 0 { + var yyrr4498, yyrl4498 int + var yyrt4498 bool + if yyl4498 > cap(yyv4498) { - yyrg4489 := len(yyv4489) > 0 - yyv24489 := yyv4489 - yyrl4489, yyrt4489 = z.DecInferLen(yyl4489, z.DecBasicHandle().MaxInitLen, 408) - if yyrt4489 { - if yyrl4489 <= cap(yyv4489) { - yyv4489 = yyv4489[:yyrl4489] + yyrg4498 := len(yyv4498) > 0 + yyv24498 := yyv4498 + yyrl4498, yyrt4498 = z.DecInferLen(yyl4498, z.DecBasicHandle().MaxInitLen, 408) + if yyrt4498 { + if yyrl4498 <= cap(yyv4498) { + yyv4498 = yyv4498[:yyrl4498] } else { - yyv4489 = make([]Service, yyrl4489) + yyv4498 = make([]Service, yyrl4498) } } else { - yyv4489 = make([]Service, yyrl4489) + yyv4498 = make([]Service, yyrl4498) } - yyc4489 = true - yyrr4489 = len(yyv4489) - if yyrg4489 { - copy(yyv4489, yyv24489) + yyc4498 = true + yyrr4498 = len(yyv4498) + if yyrg4498 { + copy(yyv4498, yyv24498) } - } else if yyl4489 != len(yyv4489) { - yyv4489 = yyv4489[:yyl4489] - yyc4489 = true + } else if yyl4498 != len(yyv4498) { + yyv4498 = yyv4498[:yyl4498] + yyc4498 = true } - yyj4489 := 0 - for ; yyj4489 < yyrr4489; yyj4489++ { - yyh4489.ElemContainerState(yyj4489) + yyj4498 := 0 + for ; yyj4498 < yyrr4498; yyj4498++ { + yyh4498.ElemContainerState(yyj4498) if r.TryDecodeAsNil() { - yyv4489[yyj4489] = Service{} + yyv4498[yyj4498] = Service{} } else { - yyv4490 := &yyv4489[yyj4489] - yyv4490.CodecDecodeSelf(d) + yyv4499 := &yyv4498[yyj4498] + yyv4499.CodecDecodeSelf(d) } } - if yyrt4489 { - for ; yyj4489 < yyl4489; yyj4489++ { - yyv4489 = append(yyv4489, Service{}) - yyh4489.ElemContainerState(yyj4489) + if yyrt4498 { + for ; yyj4498 < yyl4498; yyj4498++ { + yyv4498 = append(yyv4498, Service{}) + yyh4498.ElemContainerState(yyj4498) if r.TryDecodeAsNil() { - yyv4489[yyj4489] = Service{} + yyv4498[yyj4498] = Service{} } else { - yyv4491 := &yyv4489[yyj4489] - yyv4491.CodecDecodeSelf(d) + yyv4500 := &yyv4498[yyj4498] + yyv4500.CodecDecodeSelf(d) } } } } else { - yyj4489 := 0 - for ; !r.CheckBreak(); yyj4489++ { + yyj4498 := 0 + for ; !r.CheckBreak(); yyj4498++ { - if yyj4489 >= len(yyv4489) { - yyv4489 = append(yyv4489, Service{}) // var yyz4489 Service - yyc4489 = true + if yyj4498 >= len(yyv4498) { + yyv4498 = append(yyv4498, Service{}) // var yyz4498 Service + yyc4498 = true } - yyh4489.ElemContainerState(yyj4489) - if yyj4489 < len(yyv4489) { + yyh4498.ElemContainerState(yyj4498) + if yyj4498 < len(yyv4498) { if r.TryDecodeAsNil() { - yyv4489[yyj4489] = Service{} + yyv4498[yyj4498] = Service{} } else { - yyv4492 := &yyv4489[yyj4489] - yyv4492.CodecDecodeSelf(d) + yyv4501 := &yyv4498[yyj4498] + yyv4501.CodecDecodeSelf(d) } } else { @@ -56930,17 +57008,17 @@ func (x codecSelfer1234) decSliceService(v *[]Service, d *codec1978.Decoder) { } } - if yyj4489 < len(yyv4489) { - yyv4489 = yyv4489[:yyj4489] - yyc4489 = true - } else if yyj4489 == 0 && yyv4489 == nil { - yyv4489 = []Service{} - yyc4489 = true + if yyj4498 < len(yyv4498) { + yyv4498 = yyv4498[:yyj4498] + yyc4498 = true + } else if yyj4498 == 0 && yyv4498 == nil { + yyv4498 = []Service{} + yyc4498 = true } } - yyh4489.End() - if yyc4489 { - *v = yyv4489 + yyh4498.End() + if yyc4498 { + *v = yyv4498 } } @@ -56949,10 +57027,10 @@ func (x codecSelfer1234) encSliceLoadBalancerIngress(v []LoadBalancerIngress, e z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4493 := range v { + for _, yyv4502 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4494 := &yyv4493 - yy4494.CodecEncodeSelf(e) + yy4503 := &yyv4502 + yy4503.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56962,83 +57040,83 @@ func (x codecSelfer1234) decSliceLoadBalancerIngress(v *[]LoadBalancerIngress, d z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4495 := *v - yyh4495, yyl4495 := z.DecSliceHelperStart() - var yyc4495 bool - if yyl4495 == 0 { - if yyv4495 == nil { - yyv4495 = []LoadBalancerIngress{} - yyc4495 = true - } else if len(yyv4495) != 0 { - yyv4495 = yyv4495[:0] - yyc4495 = true + yyv4504 := *v + yyh4504, yyl4504 := z.DecSliceHelperStart() + var yyc4504 bool + if yyl4504 == 0 { + if yyv4504 == nil { + yyv4504 = []LoadBalancerIngress{} + yyc4504 = true + } else if len(yyv4504) != 0 { + yyv4504 = yyv4504[:0] + yyc4504 = true } - } else if yyl4495 > 0 { - var yyrr4495, yyrl4495 int - var yyrt4495 bool - if yyl4495 > cap(yyv4495) { + } else if yyl4504 > 0 { + var yyrr4504, yyrl4504 int + var yyrt4504 bool + if yyl4504 > cap(yyv4504) { - yyrg4495 := len(yyv4495) > 0 - yyv24495 := yyv4495 - yyrl4495, yyrt4495 = z.DecInferLen(yyl4495, z.DecBasicHandle().MaxInitLen, 32) - if yyrt4495 { - if yyrl4495 <= cap(yyv4495) { - yyv4495 = yyv4495[:yyrl4495] + yyrg4504 := len(yyv4504) > 0 + yyv24504 := yyv4504 + yyrl4504, yyrt4504 = z.DecInferLen(yyl4504, z.DecBasicHandle().MaxInitLen, 32) + if yyrt4504 { + if yyrl4504 <= cap(yyv4504) { + yyv4504 = yyv4504[:yyrl4504] } else { - yyv4495 = make([]LoadBalancerIngress, yyrl4495) + yyv4504 = make([]LoadBalancerIngress, yyrl4504) } } else { - yyv4495 = make([]LoadBalancerIngress, yyrl4495) + yyv4504 = make([]LoadBalancerIngress, yyrl4504) } - yyc4495 = true - yyrr4495 = len(yyv4495) - if yyrg4495 { - copy(yyv4495, yyv24495) + yyc4504 = true + yyrr4504 = len(yyv4504) + if yyrg4504 { + copy(yyv4504, yyv24504) } - } else if yyl4495 != len(yyv4495) { - yyv4495 = yyv4495[:yyl4495] - yyc4495 = true + } else if yyl4504 != len(yyv4504) { + yyv4504 = yyv4504[:yyl4504] + yyc4504 = true } - yyj4495 := 0 - for ; yyj4495 < yyrr4495; yyj4495++ { - yyh4495.ElemContainerState(yyj4495) + yyj4504 := 0 + for ; yyj4504 < yyrr4504; yyj4504++ { + yyh4504.ElemContainerState(yyj4504) if r.TryDecodeAsNil() { - yyv4495[yyj4495] = LoadBalancerIngress{} + yyv4504[yyj4504] = LoadBalancerIngress{} } else { - yyv4496 := &yyv4495[yyj4495] - yyv4496.CodecDecodeSelf(d) + yyv4505 := &yyv4504[yyj4504] + yyv4505.CodecDecodeSelf(d) } } - if yyrt4495 { - for ; yyj4495 < yyl4495; yyj4495++ { - yyv4495 = append(yyv4495, LoadBalancerIngress{}) - yyh4495.ElemContainerState(yyj4495) + if yyrt4504 { + for ; yyj4504 < yyl4504; yyj4504++ { + yyv4504 = append(yyv4504, LoadBalancerIngress{}) + yyh4504.ElemContainerState(yyj4504) if r.TryDecodeAsNil() { - yyv4495[yyj4495] = LoadBalancerIngress{} + yyv4504[yyj4504] = LoadBalancerIngress{} } else { - yyv4497 := &yyv4495[yyj4495] - yyv4497.CodecDecodeSelf(d) + yyv4506 := &yyv4504[yyj4504] + yyv4506.CodecDecodeSelf(d) } } } } else { - yyj4495 := 0 - for ; !r.CheckBreak(); yyj4495++ { + yyj4504 := 0 + for ; !r.CheckBreak(); yyj4504++ { - if yyj4495 >= len(yyv4495) { - yyv4495 = append(yyv4495, LoadBalancerIngress{}) // var yyz4495 LoadBalancerIngress - yyc4495 = true + if yyj4504 >= len(yyv4504) { + yyv4504 = append(yyv4504, LoadBalancerIngress{}) // var yyz4504 LoadBalancerIngress + yyc4504 = true } - yyh4495.ElemContainerState(yyj4495) - if yyj4495 < len(yyv4495) { + yyh4504.ElemContainerState(yyj4504) + if yyj4504 < len(yyv4504) { if r.TryDecodeAsNil() { - yyv4495[yyj4495] = LoadBalancerIngress{} + yyv4504[yyj4504] = LoadBalancerIngress{} } else { - yyv4498 := &yyv4495[yyj4495] - yyv4498.CodecDecodeSelf(d) + yyv4507 := &yyv4504[yyj4504] + yyv4507.CodecDecodeSelf(d) } } else { @@ -57046,17 +57124,17 @@ func (x codecSelfer1234) decSliceLoadBalancerIngress(v *[]LoadBalancerIngress, d } } - if yyj4495 < len(yyv4495) { - yyv4495 = yyv4495[:yyj4495] - yyc4495 = true - } else if yyj4495 == 0 && yyv4495 == nil { - yyv4495 = []LoadBalancerIngress{} - yyc4495 = true + if yyj4504 < len(yyv4504) { + yyv4504 = yyv4504[:yyj4504] + yyc4504 = true + } else if yyj4504 == 0 && yyv4504 == nil { + yyv4504 = []LoadBalancerIngress{} + yyc4504 = true } } - yyh4495.End() - if yyc4495 { - *v = yyv4495 + yyh4504.End() + if yyc4504 { + *v = yyv4504 } } @@ -57065,10 +57143,10 @@ func (x codecSelfer1234) encSliceServicePort(v []ServicePort, e *codec1978.Encod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4499 := range v { + for _, yyv4508 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4500 := &yyv4499 - yy4500.CodecEncodeSelf(e) + yy4509 := &yyv4508 + yy4509.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57078,83 +57156,83 @@ func (x codecSelfer1234) decSliceServicePort(v *[]ServicePort, d *codec1978.Deco z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4501 := *v - yyh4501, yyl4501 := z.DecSliceHelperStart() - var yyc4501 bool - if yyl4501 == 0 { - if yyv4501 == nil { - yyv4501 = []ServicePort{} - yyc4501 = true - } else if len(yyv4501) != 0 { - yyv4501 = yyv4501[:0] - yyc4501 = true + yyv4510 := *v + yyh4510, yyl4510 := z.DecSliceHelperStart() + var yyc4510 bool + if yyl4510 == 0 { + if yyv4510 == nil { + yyv4510 = []ServicePort{} + yyc4510 = true + } else if len(yyv4510) != 0 { + yyv4510 = yyv4510[:0] + yyc4510 = true } - } else if yyl4501 > 0 { - var yyrr4501, yyrl4501 int - var yyrt4501 bool - if yyl4501 > cap(yyv4501) { + } else if yyl4510 > 0 { + var yyrr4510, yyrl4510 int + var yyrt4510 bool + if yyl4510 > cap(yyv4510) { - yyrg4501 := len(yyv4501) > 0 - yyv24501 := yyv4501 - yyrl4501, yyrt4501 = z.DecInferLen(yyl4501, z.DecBasicHandle().MaxInitLen, 80) - if yyrt4501 { - if yyrl4501 <= cap(yyv4501) { - yyv4501 = yyv4501[:yyrl4501] + yyrg4510 := len(yyv4510) > 0 + yyv24510 := yyv4510 + yyrl4510, yyrt4510 = z.DecInferLen(yyl4510, z.DecBasicHandle().MaxInitLen, 80) + if yyrt4510 { + if yyrl4510 <= cap(yyv4510) { + yyv4510 = yyv4510[:yyrl4510] } else { - yyv4501 = make([]ServicePort, yyrl4501) + yyv4510 = make([]ServicePort, yyrl4510) } } else { - yyv4501 = make([]ServicePort, yyrl4501) + yyv4510 = make([]ServicePort, yyrl4510) } - yyc4501 = true - yyrr4501 = len(yyv4501) - if yyrg4501 { - copy(yyv4501, yyv24501) + yyc4510 = true + yyrr4510 = len(yyv4510) + if yyrg4510 { + copy(yyv4510, yyv24510) } - } else if yyl4501 != len(yyv4501) { - yyv4501 = yyv4501[:yyl4501] - yyc4501 = true + } else if yyl4510 != len(yyv4510) { + yyv4510 = yyv4510[:yyl4510] + yyc4510 = true } - yyj4501 := 0 - for ; yyj4501 < yyrr4501; yyj4501++ { - yyh4501.ElemContainerState(yyj4501) + yyj4510 := 0 + for ; yyj4510 < yyrr4510; yyj4510++ { + yyh4510.ElemContainerState(yyj4510) if r.TryDecodeAsNil() { - yyv4501[yyj4501] = ServicePort{} + yyv4510[yyj4510] = ServicePort{} } else { - yyv4502 := &yyv4501[yyj4501] - yyv4502.CodecDecodeSelf(d) + yyv4511 := &yyv4510[yyj4510] + yyv4511.CodecDecodeSelf(d) } } - if yyrt4501 { - for ; yyj4501 < yyl4501; yyj4501++ { - yyv4501 = append(yyv4501, ServicePort{}) - yyh4501.ElemContainerState(yyj4501) + if yyrt4510 { + for ; yyj4510 < yyl4510; yyj4510++ { + yyv4510 = append(yyv4510, ServicePort{}) + yyh4510.ElemContainerState(yyj4510) if r.TryDecodeAsNil() { - yyv4501[yyj4501] = ServicePort{} + yyv4510[yyj4510] = ServicePort{} } else { - yyv4503 := &yyv4501[yyj4501] - yyv4503.CodecDecodeSelf(d) + yyv4512 := &yyv4510[yyj4510] + yyv4512.CodecDecodeSelf(d) } } } } else { - yyj4501 := 0 - for ; !r.CheckBreak(); yyj4501++ { + yyj4510 := 0 + for ; !r.CheckBreak(); yyj4510++ { - if yyj4501 >= len(yyv4501) { - yyv4501 = append(yyv4501, ServicePort{}) // var yyz4501 ServicePort - yyc4501 = true + if yyj4510 >= len(yyv4510) { + yyv4510 = append(yyv4510, ServicePort{}) // var yyz4510 ServicePort + yyc4510 = true } - yyh4501.ElemContainerState(yyj4501) - if yyj4501 < len(yyv4501) { + yyh4510.ElemContainerState(yyj4510) + if yyj4510 < len(yyv4510) { if r.TryDecodeAsNil() { - yyv4501[yyj4501] = ServicePort{} + yyv4510[yyj4510] = ServicePort{} } else { - yyv4504 := &yyv4501[yyj4501] - yyv4504.CodecDecodeSelf(d) + yyv4513 := &yyv4510[yyj4510] + yyv4513.CodecDecodeSelf(d) } } else { @@ -57162,17 +57240,17 @@ func (x codecSelfer1234) decSliceServicePort(v *[]ServicePort, d *codec1978.Deco } } - if yyj4501 < len(yyv4501) { - yyv4501 = yyv4501[:yyj4501] - yyc4501 = true - } else if yyj4501 == 0 && yyv4501 == nil { - yyv4501 = []ServicePort{} - yyc4501 = true + if yyj4510 < len(yyv4510) { + yyv4510 = yyv4510[:yyj4510] + yyc4510 = true + } else if yyj4510 == 0 && yyv4510 == nil { + yyv4510 = []ServicePort{} + yyc4510 = true } } - yyh4501.End() - if yyc4501 { - *v = yyv4501 + yyh4510.End() + if yyc4510 { + *v = yyv4510 } } @@ -57181,10 +57259,10 @@ func (x codecSelfer1234) encSliceObjectReference(v []ObjectReference, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4505 := range v { + for _, yyv4514 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4506 := &yyv4505 - yy4506.CodecEncodeSelf(e) + yy4515 := &yyv4514 + yy4515.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57194,83 +57272,83 @@ func (x codecSelfer1234) decSliceObjectReference(v *[]ObjectReference, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4507 := *v - yyh4507, yyl4507 := z.DecSliceHelperStart() - var yyc4507 bool - if yyl4507 == 0 { - if yyv4507 == nil { - yyv4507 = []ObjectReference{} - yyc4507 = true - } else if len(yyv4507) != 0 { - yyv4507 = yyv4507[:0] - yyc4507 = true + yyv4516 := *v + yyh4516, yyl4516 := z.DecSliceHelperStart() + var yyc4516 bool + if yyl4516 == 0 { + if yyv4516 == nil { + yyv4516 = []ObjectReference{} + yyc4516 = true + } else if len(yyv4516) != 0 { + yyv4516 = yyv4516[:0] + yyc4516 = true } - } else if yyl4507 > 0 { - var yyrr4507, yyrl4507 int - var yyrt4507 bool - if yyl4507 > cap(yyv4507) { + } else if yyl4516 > 0 { + var yyrr4516, yyrl4516 int + var yyrt4516 bool + if yyl4516 > cap(yyv4516) { - yyrg4507 := len(yyv4507) > 0 - yyv24507 := yyv4507 - yyrl4507, yyrt4507 = z.DecInferLen(yyl4507, z.DecBasicHandle().MaxInitLen, 112) - if yyrt4507 { - if yyrl4507 <= cap(yyv4507) { - yyv4507 = yyv4507[:yyrl4507] + yyrg4516 := len(yyv4516) > 0 + yyv24516 := yyv4516 + yyrl4516, yyrt4516 = z.DecInferLen(yyl4516, z.DecBasicHandle().MaxInitLen, 112) + if yyrt4516 { + if yyrl4516 <= cap(yyv4516) { + yyv4516 = yyv4516[:yyrl4516] } else { - yyv4507 = make([]ObjectReference, yyrl4507) + yyv4516 = make([]ObjectReference, yyrl4516) } } else { - yyv4507 = make([]ObjectReference, yyrl4507) + yyv4516 = make([]ObjectReference, yyrl4516) } - yyc4507 = true - yyrr4507 = len(yyv4507) - if yyrg4507 { - copy(yyv4507, yyv24507) + yyc4516 = true + yyrr4516 = len(yyv4516) + if yyrg4516 { + copy(yyv4516, yyv24516) } - } else if yyl4507 != len(yyv4507) { - yyv4507 = yyv4507[:yyl4507] - yyc4507 = true + } else if yyl4516 != len(yyv4516) { + yyv4516 = yyv4516[:yyl4516] + yyc4516 = true } - yyj4507 := 0 - for ; yyj4507 < yyrr4507; yyj4507++ { - yyh4507.ElemContainerState(yyj4507) + yyj4516 := 0 + for ; yyj4516 < yyrr4516; yyj4516++ { + yyh4516.ElemContainerState(yyj4516) if r.TryDecodeAsNil() { - yyv4507[yyj4507] = ObjectReference{} + yyv4516[yyj4516] = ObjectReference{} } else { - yyv4508 := &yyv4507[yyj4507] - yyv4508.CodecDecodeSelf(d) + yyv4517 := &yyv4516[yyj4516] + yyv4517.CodecDecodeSelf(d) } } - if yyrt4507 { - for ; yyj4507 < yyl4507; yyj4507++ { - yyv4507 = append(yyv4507, ObjectReference{}) - yyh4507.ElemContainerState(yyj4507) + if yyrt4516 { + for ; yyj4516 < yyl4516; yyj4516++ { + yyv4516 = append(yyv4516, ObjectReference{}) + yyh4516.ElemContainerState(yyj4516) if r.TryDecodeAsNil() { - yyv4507[yyj4507] = ObjectReference{} + yyv4516[yyj4516] = ObjectReference{} } else { - yyv4509 := &yyv4507[yyj4507] - yyv4509.CodecDecodeSelf(d) + yyv4518 := &yyv4516[yyj4516] + yyv4518.CodecDecodeSelf(d) } } } } else { - yyj4507 := 0 - for ; !r.CheckBreak(); yyj4507++ { + yyj4516 := 0 + for ; !r.CheckBreak(); yyj4516++ { - if yyj4507 >= len(yyv4507) { - yyv4507 = append(yyv4507, ObjectReference{}) // var yyz4507 ObjectReference - yyc4507 = true + if yyj4516 >= len(yyv4516) { + yyv4516 = append(yyv4516, ObjectReference{}) // var yyz4516 ObjectReference + yyc4516 = true } - yyh4507.ElemContainerState(yyj4507) - if yyj4507 < len(yyv4507) { + yyh4516.ElemContainerState(yyj4516) + if yyj4516 < len(yyv4516) { if r.TryDecodeAsNil() { - yyv4507[yyj4507] = ObjectReference{} + yyv4516[yyj4516] = ObjectReference{} } else { - yyv4510 := &yyv4507[yyj4507] - yyv4510.CodecDecodeSelf(d) + yyv4519 := &yyv4516[yyj4516] + yyv4519.CodecDecodeSelf(d) } } else { @@ -57278,17 +57356,17 @@ func (x codecSelfer1234) decSliceObjectReference(v *[]ObjectReference, d *codec1 } } - if yyj4507 < len(yyv4507) { - yyv4507 = yyv4507[:yyj4507] - yyc4507 = true - } else if yyj4507 == 0 && yyv4507 == nil { - yyv4507 = []ObjectReference{} - yyc4507 = true + if yyj4516 < len(yyv4516) { + yyv4516 = yyv4516[:yyj4516] + yyc4516 = true + } else if yyj4516 == 0 && yyv4516 == nil { + yyv4516 = []ObjectReference{} + yyc4516 = true } } - yyh4507.End() - if yyc4507 { - *v = yyv4507 + yyh4516.End() + if yyc4516 { + *v = yyv4516 } } @@ -57297,10 +57375,10 @@ func (x codecSelfer1234) encSliceServiceAccount(v []ServiceAccount, e *codec1978 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4511 := range v { + for _, yyv4520 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4512 := &yyv4511 - yy4512.CodecEncodeSelf(e) + yy4521 := &yyv4520 + yy4521.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57310,83 +57388,83 @@ func (x codecSelfer1234) decSliceServiceAccount(v *[]ServiceAccount, d *codec197 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4513 := *v - yyh4513, yyl4513 := z.DecSliceHelperStart() - var yyc4513 bool - if yyl4513 == 0 { - if yyv4513 == nil { - yyv4513 = []ServiceAccount{} - yyc4513 = true - } else if len(yyv4513) != 0 { - yyv4513 = yyv4513[:0] - yyc4513 = true + yyv4522 := *v + yyh4522, yyl4522 := z.DecSliceHelperStart() + var yyc4522 bool + if yyl4522 == 0 { + if yyv4522 == nil { + yyv4522 = []ServiceAccount{} + yyc4522 = true + } else if len(yyv4522) != 0 { + yyv4522 = yyv4522[:0] + yyc4522 = true } - } else if yyl4513 > 0 { - var yyrr4513, yyrl4513 int - var yyrt4513 bool - if yyl4513 > cap(yyv4513) { + } else if yyl4522 > 0 { + var yyrr4522, yyrl4522 int + var yyrt4522 bool + if yyl4522 > cap(yyv4522) { - yyrg4513 := len(yyv4513) > 0 - yyv24513 := yyv4513 - yyrl4513, yyrt4513 = z.DecInferLen(yyl4513, z.DecBasicHandle().MaxInitLen, 288) - if yyrt4513 { - if yyrl4513 <= cap(yyv4513) { - yyv4513 = yyv4513[:yyrl4513] + yyrg4522 := len(yyv4522) > 0 + yyv24522 := yyv4522 + yyrl4522, yyrt4522 = z.DecInferLen(yyl4522, z.DecBasicHandle().MaxInitLen, 288) + if yyrt4522 { + if yyrl4522 <= cap(yyv4522) { + yyv4522 = yyv4522[:yyrl4522] } else { - yyv4513 = make([]ServiceAccount, yyrl4513) + yyv4522 = make([]ServiceAccount, yyrl4522) } } else { - yyv4513 = make([]ServiceAccount, yyrl4513) + yyv4522 = make([]ServiceAccount, yyrl4522) } - yyc4513 = true - yyrr4513 = len(yyv4513) - if yyrg4513 { - copy(yyv4513, yyv24513) + yyc4522 = true + yyrr4522 = len(yyv4522) + if yyrg4522 { + copy(yyv4522, yyv24522) } - } else if yyl4513 != len(yyv4513) { - yyv4513 = yyv4513[:yyl4513] - yyc4513 = true + } else if yyl4522 != len(yyv4522) { + yyv4522 = yyv4522[:yyl4522] + yyc4522 = true } - yyj4513 := 0 - for ; yyj4513 < yyrr4513; yyj4513++ { - yyh4513.ElemContainerState(yyj4513) + yyj4522 := 0 + for ; yyj4522 < yyrr4522; yyj4522++ { + yyh4522.ElemContainerState(yyj4522) if r.TryDecodeAsNil() { - yyv4513[yyj4513] = ServiceAccount{} + yyv4522[yyj4522] = ServiceAccount{} } else { - yyv4514 := &yyv4513[yyj4513] - yyv4514.CodecDecodeSelf(d) + yyv4523 := &yyv4522[yyj4522] + yyv4523.CodecDecodeSelf(d) } } - if yyrt4513 { - for ; yyj4513 < yyl4513; yyj4513++ { - yyv4513 = append(yyv4513, ServiceAccount{}) - yyh4513.ElemContainerState(yyj4513) + if yyrt4522 { + for ; yyj4522 < yyl4522; yyj4522++ { + yyv4522 = append(yyv4522, ServiceAccount{}) + yyh4522.ElemContainerState(yyj4522) if r.TryDecodeAsNil() { - yyv4513[yyj4513] = ServiceAccount{} + yyv4522[yyj4522] = ServiceAccount{} } else { - yyv4515 := &yyv4513[yyj4513] - yyv4515.CodecDecodeSelf(d) + yyv4524 := &yyv4522[yyj4522] + yyv4524.CodecDecodeSelf(d) } } } } else { - yyj4513 := 0 - for ; !r.CheckBreak(); yyj4513++ { + yyj4522 := 0 + for ; !r.CheckBreak(); yyj4522++ { - if yyj4513 >= len(yyv4513) { - yyv4513 = append(yyv4513, ServiceAccount{}) // var yyz4513 ServiceAccount - yyc4513 = true + if yyj4522 >= len(yyv4522) { + yyv4522 = append(yyv4522, ServiceAccount{}) // var yyz4522 ServiceAccount + yyc4522 = true } - yyh4513.ElemContainerState(yyj4513) - if yyj4513 < len(yyv4513) { + yyh4522.ElemContainerState(yyj4522) + if yyj4522 < len(yyv4522) { if r.TryDecodeAsNil() { - yyv4513[yyj4513] = ServiceAccount{} + yyv4522[yyj4522] = ServiceAccount{} } else { - yyv4516 := &yyv4513[yyj4513] - yyv4516.CodecDecodeSelf(d) + yyv4525 := &yyv4522[yyj4522] + yyv4525.CodecDecodeSelf(d) } } else { @@ -57394,17 +57472,17 @@ func (x codecSelfer1234) decSliceServiceAccount(v *[]ServiceAccount, d *codec197 } } - if yyj4513 < len(yyv4513) { - yyv4513 = yyv4513[:yyj4513] - yyc4513 = true - } else if yyj4513 == 0 && yyv4513 == nil { - yyv4513 = []ServiceAccount{} - yyc4513 = true + if yyj4522 < len(yyv4522) { + yyv4522 = yyv4522[:yyj4522] + yyc4522 = true + } else if yyj4522 == 0 && yyv4522 == nil { + yyv4522 = []ServiceAccount{} + yyc4522 = true } } - yyh4513.End() - if yyc4513 { - *v = yyv4513 + yyh4522.End() + if yyc4522 { + *v = yyv4522 } } @@ -57413,10 +57491,10 @@ func (x codecSelfer1234) encSliceEndpointSubset(v []EndpointSubset, e *codec1978 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4517 := range v { + for _, yyv4526 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4518 := &yyv4517 - yy4518.CodecEncodeSelf(e) + yy4527 := &yyv4526 + yy4527.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57426,83 +57504,83 @@ func (x codecSelfer1234) decSliceEndpointSubset(v *[]EndpointSubset, d *codec197 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4519 := *v - yyh4519, yyl4519 := z.DecSliceHelperStart() - var yyc4519 bool - if yyl4519 == 0 { - if yyv4519 == nil { - yyv4519 = []EndpointSubset{} - yyc4519 = true - } else if len(yyv4519) != 0 { - yyv4519 = yyv4519[:0] - yyc4519 = true + yyv4528 := *v + yyh4528, yyl4528 := z.DecSliceHelperStart() + var yyc4528 bool + if yyl4528 == 0 { + if yyv4528 == nil { + yyv4528 = []EndpointSubset{} + yyc4528 = true + } else if len(yyv4528) != 0 { + yyv4528 = yyv4528[:0] + yyc4528 = true } - } else if yyl4519 > 0 { - var yyrr4519, yyrl4519 int - var yyrt4519 bool - if yyl4519 > cap(yyv4519) { + } else if yyl4528 > 0 { + var yyrr4528, yyrl4528 int + var yyrt4528 bool + if yyl4528 > cap(yyv4528) { - yyrg4519 := len(yyv4519) > 0 - yyv24519 := yyv4519 - yyrl4519, yyrt4519 = z.DecInferLen(yyl4519, z.DecBasicHandle().MaxInitLen, 72) - if yyrt4519 { - if yyrl4519 <= cap(yyv4519) { - yyv4519 = yyv4519[:yyrl4519] + yyrg4528 := len(yyv4528) > 0 + yyv24528 := yyv4528 + yyrl4528, yyrt4528 = z.DecInferLen(yyl4528, z.DecBasicHandle().MaxInitLen, 72) + if yyrt4528 { + if yyrl4528 <= cap(yyv4528) { + yyv4528 = yyv4528[:yyrl4528] } else { - yyv4519 = make([]EndpointSubset, yyrl4519) + yyv4528 = make([]EndpointSubset, yyrl4528) } } else { - yyv4519 = make([]EndpointSubset, yyrl4519) + yyv4528 = make([]EndpointSubset, yyrl4528) } - yyc4519 = true - yyrr4519 = len(yyv4519) - if yyrg4519 { - copy(yyv4519, yyv24519) + yyc4528 = true + yyrr4528 = len(yyv4528) + if yyrg4528 { + copy(yyv4528, yyv24528) } - } else if yyl4519 != len(yyv4519) { - yyv4519 = yyv4519[:yyl4519] - yyc4519 = true + } else if yyl4528 != len(yyv4528) { + yyv4528 = yyv4528[:yyl4528] + yyc4528 = true } - yyj4519 := 0 - for ; yyj4519 < yyrr4519; yyj4519++ { - yyh4519.ElemContainerState(yyj4519) + yyj4528 := 0 + for ; yyj4528 < yyrr4528; yyj4528++ { + yyh4528.ElemContainerState(yyj4528) if r.TryDecodeAsNil() { - yyv4519[yyj4519] = EndpointSubset{} + yyv4528[yyj4528] = EndpointSubset{} } else { - yyv4520 := &yyv4519[yyj4519] - yyv4520.CodecDecodeSelf(d) + yyv4529 := &yyv4528[yyj4528] + yyv4529.CodecDecodeSelf(d) } } - if yyrt4519 { - for ; yyj4519 < yyl4519; yyj4519++ { - yyv4519 = append(yyv4519, EndpointSubset{}) - yyh4519.ElemContainerState(yyj4519) + if yyrt4528 { + for ; yyj4528 < yyl4528; yyj4528++ { + yyv4528 = append(yyv4528, EndpointSubset{}) + yyh4528.ElemContainerState(yyj4528) if r.TryDecodeAsNil() { - yyv4519[yyj4519] = EndpointSubset{} + yyv4528[yyj4528] = EndpointSubset{} } else { - yyv4521 := &yyv4519[yyj4519] - yyv4521.CodecDecodeSelf(d) + yyv4530 := &yyv4528[yyj4528] + yyv4530.CodecDecodeSelf(d) } } } } else { - yyj4519 := 0 - for ; !r.CheckBreak(); yyj4519++ { + yyj4528 := 0 + for ; !r.CheckBreak(); yyj4528++ { - if yyj4519 >= len(yyv4519) { - yyv4519 = append(yyv4519, EndpointSubset{}) // var yyz4519 EndpointSubset - yyc4519 = true + if yyj4528 >= len(yyv4528) { + yyv4528 = append(yyv4528, EndpointSubset{}) // var yyz4528 EndpointSubset + yyc4528 = true } - yyh4519.ElemContainerState(yyj4519) - if yyj4519 < len(yyv4519) { + yyh4528.ElemContainerState(yyj4528) + if yyj4528 < len(yyv4528) { if r.TryDecodeAsNil() { - yyv4519[yyj4519] = EndpointSubset{} + yyv4528[yyj4528] = EndpointSubset{} } else { - yyv4522 := &yyv4519[yyj4519] - yyv4522.CodecDecodeSelf(d) + yyv4531 := &yyv4528[yyj4528] + yyv4531.CodecDecodeSelf(d) } } else { @@ -57510,17 +57588,17 @@ func (x codecSelfer1234) decSliceEndpointSubset(v *[]EndpointSubset, d *codec197 } } - if yyj4519 < len(yyv4519) { - yyv4519 = yyv4519[:yyj4519] - yyc4519 = true - } else if yyj4519 == 0 && yyv4519 == nil { - yyv4519 = []EndpointSubset{} - yyc4519 = true + if yyj4528 < len(yyv4528) { + yyv4528 = yyv4528[:yyj4528] + yyc4528 = true + } else if yyj4528 == 0 && yyv4528 == nil { + yyv4528 = []EndpointSubset{} + yyc4528 = true } } - yyh4519.End() - if yyc4519 { - *v = yyv4519 + yyh4528.End() + if yyc4528 { + *v = yyv4528 } } @@ -57529,10 +57607,10 @@ func (x codecSelfer1234) encSliceEndpointAddress(v []EndpointAddress, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4523 := range v { + for _, yyv4532 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4524 := &yyv4523 - yy4524.CodecEncodeSelf(e) + yy4533 := &yyv4532 + yy4533.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57542,83 +57620,83 @@ func (x codecSelfer1234) decSliceEndpointAddress(v *[]EndpointAddress, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4525 := *v - yyh4525, yyl4525 := z.DecSliceHelperStart() - var yyc4525 bool - if yyl4525 == 0 { - if yyv4525 == nil { - yyv4525 = []EndpointAddress{} - yyc4525 = true - } else if len(yyv4525) != 0 { - yyv4525 = yyv4525[:0] - yyc4525 = true + yyv4534 := *v + yyh4534, yyl4534 := z.DecSliceHelperStart() + var yyc4534 bool + if yyl4534 == 0 { + if yyv4534 == nil { + yyv4534 = []EndpointAddress{} + yyc4534 = true + } else if len(yyv4534) != 0 { + yyv4534 = yyv4534[:0] + yyc4534 = true } - } else if yyl4525 > 0 { - var yyrr4525, yyrl4525 int - var yyrt4525 bool - if yyl4525 > cap(yyv4525) { + } else if yyl4534 > 0 { + var yyrr4534, yyrl4534 int + var yyrt4534 bool + if yyl4534 > cap(yyv4534) { - yyrg4525 := len(yyv4525) > 0 - yyv24525 := yyv4525 - yyrl4525, yyrt4525 = z.DecInferLen(yyl4525, z.DecBasicHandle().MaxInitLen, 40) - if yyrt4525 { - if yyrl4525 <= cap(yyv4525) { - yyv4525 = yyv4525[:yyrl4525] + yyrg4534 := len(yyv4534) > 0 + yyv24534 := yyv4534 + yyrl4534, yyrt4534 = z.DecInferLen(yyl4534, z.DecBasicHandle().MaxInitLen, 48) + if yyrt4534 { + if yyrl4534 <= cap(yyv4534) { + yyv4534 = yyv4534[:yyrl4534] } else { - yyv4525 = make([]EndpointAddress, yyrl4525) + yyv4534 = make([]EndpointAddress, yyrl4534) } } else { - yyv4525 = make([]EndpointAddress, yyrl4525) + yyv4534 = make([]EndpointAddress, yyrl4534) } - yyc4525 = true - yyrr4525 = len(yyv4525) - if yyrg4525 { - copy(yyv4525, yyv24525) + yyc4534 = true + yyrr4534 = len(yyv4534) + if yyrg4534 { + copy(yyv4534, yyv24534) } - } else if yyl4525 != len(yyv4525) { - yyv4525 = yyv4525[:yyl4525] - yyc4525 = true + } else if yyl4534 != len(yyv4534) { + yyv4534 = yyv4534[:yyl4534] + yyc4534 = true } - yyj4525 := 0 - for ; yyj4525 < yyrr4525; yyj4525++ { - yyh4525.ElemContainerState(yyj4525) + yyj4534 := 0 + for ; yyj4534 < yyrr4534; yyj4534++ { + yyh4534.ElemContainerState(yyj4534) if r.TryDecodeAsNil() { - yyv4525[yyj4525] = EndpointAddress{} + yyv4534[yyj4534] = EndpointAddress{} } else { - yyv4526 := &yyv4525[yyj4525] - yyv4526.CodecDecodeSelf(d) + yyv4535 := &yyv4534[yyj4534] + yyv4535.CodecDecodeSelf(d) } } - if yyrt4525 { - for ; yyj4525 < yyl4525; yyj4525++ { - yyv4525 = append(yyv4525, EndpointAddress{}) - yyh4525.ElemContainerState(yyj4525) + if yyrt4534 { + for ; yyj4534 < yyl4534; yyj4534++ { + yyv4534 = append(yyv4534, EndpointAddress{}) + yyh4534.ElemContainerState(yyj4534) if r.TryDecodeAsNil() { - yyv4525[yyj4525] = EndpointAddress{} + yyv4534[yyj4534] = EndpointAddress{} } else { - yyv4527 := &yyv4525[yyj4525] - yyv4527.CodecDecodeSelf(d) + yyv4536 := &yyv4534[yyj4534] + yyv4536.CodecDecodeSelf(d) } } } } else { - yyj4525 := 0 - for ; !r.CheckBreak(); yyj4525++ { + yyj4534 := 0 + for ; !r.CheckBreak(); yyj4534++ { - if yyj4525 >= len(yyv4525) { - yyv4525 = append(yyv4525, EndpointAddress{}) // var yyz4525 EndpointAddress - yyc4525 = true + if yyj4534 >= len(yyv4534) { + yyv4534 = append(yyv4534, EndpointAddress{}) // var yyz4534 EndpointAddress + yyc4534 = true } - yyh4525.ElemContainerState(yyj4525) - if yyj4525 < len(yyv4525) { + yyh4534.ElemContainerState(yyj4534) + if yyj4534 < len(yyv4534) { if r.TryDecodeAsNil() { - yyv4525[yyj4525] = EndpointAddress{} + yyv4534[yyj4534] = EndpointAddress{} } else { - yyv4528 := &yyv4525[yyj4525] - yyv4528.CodecDecodeSelf(d) + yyv4537 := &yyv4534[yyj4534] + yyv4537.CodecDecodeSelf(d) } } else { @@ -57626,17 +57704,17 @@ func (x codecSelfer1234) decSliceEndpointAddress(v *[]EndpointAddress, d *codec1 } } - if yyj4525 < len(yyv4525) { - yyv4525 = yyv4525[:yyj4525] - yyc4525 = true - } else if yyj4525 == 0 && yyv4525 == nil { - yyv4525 = []EndpointAddress{} - yyc4525 = true + if yyj4534 < len(yyv4534) { + yyv4534 = yyv4534[:yyj4534] + yyc4534 = true + } else if yyj4534 == 0 && yyv4534 == nil { + yyv4534 = []EndpointAddress{} + yyc4534 = true } } - yyh4525.End() - if yyc4525 { - *v = yyv4525 + yyh4534.End() + if yyc4534 { + *v = yyv4534 } } @@ -57645,10 +57723,10 @@ func (x codecSelfer1234) encSliceEndpointPort(v []EndpointPort, e *codec1978.Enc z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4529 := range v { + for _, yyv4538 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4530 := &yyv4529 - yy4530.CodecEncodeSelf(e) + yy4539 := &yyv4538 + yy4539.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57658,83 +57736,83 @@ func (x codecSelfer1234) decSliceEndpointPort(v *[]EndpointPort, d *codec1978.De z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4531 := *v - yyh4531, yyl4531 := z.DecSliceHelperStart() - var yyc4531 bool - if yyl4531 == 0 { - if yyv4531 == nil { - yyv4531 = []EndpointPort{} - yyc4531 = true - } else if len(yyv4531) != 0 { - yyv4531 = yyv4531[:0] - yyc4531 = true + yyv4540 := *v + yyh4540, yyl4540 := z.DecSliceHelperStart() + var yyc4540 bool + if yyl4540 == 0 { + if yyv4540 == nil { + yyv4540 = []EndpointPort{} + yyc4540 = true + } else if len(yyv4540) != 0 { + yyv4540 = yyv4540[:0] + yyc4540 = true } - } else if yyl4531 > 0 { - var yyrr4531, yyrl4531 int - var yyrt4531 bool - if yyl4531 > cap(yyv4531) { + } else if yyl4540 > 0 { + var yyrr4540, yyrl4540 int + var yyrt4540 bool + if yyl4540 > cap(yyv4540) { - yyrg4531 := len(yyv4531) > 0 - yyv24531 := yyv4531 - yyrl4531, yyrt4531 = z.DecInferLen(yyl4531, z.DecBasicHandle().MaxInitLen, 40) - if yyrt4531 { - if yyrl4531 <= cap(yyv4531) { - yyv4531 = yyv4531[:yyrl4531] + yyrg4540 := len(yyv4540) > 0 + yyv24540 := yyv4540 + yyrl4540, yyrt4540 = z.DecInferLen(yyl4540, z.DecBasicHandle().MaxInitLen, 40) + if yyrt4540 { + if yyrl4540 <= cap(yyv4540) { + yyv4540 = yyv4540[:yyrl4540] } else { - yyv4531 = make([]EndpointPort, yyrl4531) + yyv4540 = make([]EndpointPort, yyrl4540) } } else { - yyv4531 = make([]EndpointPort, yyrl4531) + yyv4540 = make([]EndpointPort, yyrl4540) } - yyc4531 = true - yyrr4531 = len(yyv4531) - if yyrg4531 { - copy(yyv4531, yyv24531) + yyc4540 = true + yyrr4540 = len(yyv4540) + if yyrg4540 { + copy(yyv4540, yyv24540) } - } else if yyl4531 != len(yyv4531) { - yyv4531 = yyv4531[:yyl4531] - yyc4531 = true + } else if yyl4540 != len(yyv4540) { + yyv4540 = yyv4540[:yyl4540] + yyc4540 = true } - yyj4531 := 0 - for ; yyj4531 < yyrr4531; yyj4531++ { - yyh4531.ElemContainerState(yyj4531) + yyj4540 := 0 + for ; yyj4540 < yyrr4540; yyj4540++ { + yyh4540.ElemContainerState(yyj4540) if r.TryDecodeAsNil() { - yyv4531[yyj4531] = EndpointPort{} + yyv4540[yyj4540] = EndpointPort{} } else { - yyv4532 := &yyv4531[yyj4531] - yyv4532.CodecDecodeSelf(d) + yyv4541 := &yyv4540[yyj4540] + yyv4541.CodecDecodeSelf(d) } } - if yyrt4531 { - for ; yyj4531 < yyl4531; yyj4531++ { - yyv4531 = append(yyv4531, EndpointPort{}) - yyh4531.ElemContainerState(yyj4531) + if yyrt4540 { + for ; yyj4540 < yyl4540; yyj4540++ { + yyv4540 = append(yyv4540, EndpointPort{}) + yyh4540.ElemContainerState(yyj4540) if r.TryDecodeAsNil() { - yyv4531[yyj4531] = EndpointPort{} + yyv4540[yyj4540] = EndpointPort{} } else { - yyv4533 := &yyv4531[yyj4531] - yyv4533.CodecDecodeSelf(d) + yyv4542 := &yyv4540[yyj4540] + yyv4542.CodecDecodeSelf(d) } } } } else { - yyj4531 := 0 - for ; !r.CheckBreak(); yyj4531++ { + yyj4540 := 0 + for ; !r.CheckBreak(); yyj4540++ { - if yyj4531 >= len(yyv4531) { - yyv4531 = append(yyv4531, EndpointPort{}) // var yyz4531 EndpointPort - yyc4531 = true + if yyj4540 >= len(yyv4540) { + yyv4540 = append(yyv4540, EndpointPort{}) // var yyz4540 EndpointPort + yyc4540 = true } - yyh4531.ElemContainerState(yyj4531) - if yyj4531 < len(yyv4531) { + yyh4540.ElemContainerState(yyj4540) + if yyj4540 < len(yyv4540) { if r.TryDecodeAsNil() { - yyv4531[yyj4531] = EndpointPort{} + yyv4540[yyj4540] = EndpointPort{} } else { - yyv4534 := &yyv4531[yyj4531] - yyv4534.CodecDecodeSelf(d) + yyv4543 := &yyv4540[yyj4540] + yyv4543.CodecDecodeSelf(d) } } else { @@ -57742,17 +57820,17 @@ func (x codecSelfer1234) decSliceEndpointPort(v *[]EndpointPort, d *codec1978.De } } - if yyj4531 < len(yyv4531) { - yyv4531 = yyv4531[:yyj4531] - yyc4531 = true - } else if yyj4531 == 0 && yyv4531 == nil { - yyv4531 = []EndpointPort{} - yyc4531 = true + if yyj4540 < len(yyv4540) { + yyv4540 = yyv4540[:yyj4540] + yyc4540 = true + } else if yyj4540 == 0 && yyv4540 == nil { + yyv4540 = []EndpointPort{} + yyc4540 = true } } - yyh4531.End() - if yyc4531 { - *v = yyv4531 + yyh4540.End() + if yyc4540 { + *v = yyv4540 } } @@ -57761,10 +57839,10 @@ func (x codecSelfer1234) encSliceEndpoints(v []Endpoints, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4535 := range v { + for _, yyv4544 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4536 := &yyv4535 - yy4536.CodecEncodeSelf(e) + yy4545 := &yyv4544 + yy4545.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57774,83 +57852,83 @@ func (x codecSelfer1234) decSliceEndpoints(v *[]Endpoints, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4537 := *v - yyh4537, yyl4537 := z.DecSliceHelperStart() - var yyc4537 bool - if yyl4537 == 0 { - if yyv4537 == nil { - yyv4537 = []Endpoints{} - yyc4537 = true - } else if len(yyv4537) != 0 { - yyv4537 = yyv4537[:0] - yyc4537 = true + yyv4546 := *v + yyh4546, yyl4546 := z.DecSliceHelperStart() + var yyc4546 bool + if yyl4546 == 0 { + if yyv4546 == nil { + yyv4546 = []Endpoints{} + yyc4546 = true + } else if len(yyv4546) != 0 { + yyv4546 = yyv4546[:0] + yyc4546 = true } - } else if yyl4537 > 0 { - var yyrr4537, yyrl4537 int - var yyrt4537 bool - if yyl4537 > cap(yyv4537) { + } else if yyl4546 > 0 { + var yyrr4546, yyrl4546 int + var yyrt4546 bool + if yyl4546 > cap(yyv4546) { - yyrg4537 := len(yyv4537) > 0 - yyv24537 := yyv4537 - yyrl4537, yyrt4537 = z.DecInferLen(yyl4537, z.DecBasicHandle().MaxInitLen, 264) - if yyrt4537 { - if yyrl4537 <= cap(yyv4537) { - yyv4537 = yyv4537[:yyrl4537] + yyrg4546 := len(yyv4546) > 0 + yyv24546 := yyv4546 + yyrl4546, yyrt4546 = z.DecInferLen(yyl4546, z.DecBasicHandle().MaxInitLen, 264) + if yyrt4546 { + if yyrl4546 <= cap(yyv4546) { + yyv4546 = yyv4546[:yyrl4546] } else { - yyv4537 = make([]Endpoints, yyrl4537) + yyv4546 = make([]Endpoints, yyrl4546) } } else { - yyv4537 = make([]Endpoints, yyrl4537) + yyv4546 = make([]Endpoints, yyrl4546) } - yyc4537 = true - yyrr4537 = len(yyv4537) - if yyrg4537 { - copy(yyv4537, yyv24537) + yyc4546 = true + yyrr4546 = len(yyv4546) + if yyrg4546 { + copy(yyv4546, yyv24546) } - } else if yyl4537 != len(yyv4537) { - yyv4537 = yyv4537[:yyl4537] - yyc4537 = true + } else if yyl4546 != len(yyv4546) { + yyv4546 = yyv4546[:yyl4546] + yyc4546 = true } - yyj4537 := 0 - for ; yyj4537 < yyrr4537; yyj4537++ { - yyh4537.ElemContainerState(yyj4537) + yyj4546 := 0 + for ; yyj4546 < yyrr4546; yyj4546++ { + yyh4546.ElemContainerState(yyj4546) if r.TryDecodeAsNil() { - yyv4537[yyj4537] = Endpoints{} + yyv4546[yyj4546] = Endpoints{} } else { - yyv4538 := &yyv4537[yyj4537] - yyv4538.CodecDecodeSelf(d) + yyv4547 := &yyv4546[yyj4546] + yyv4547.CodecDecodeSelf(d) } } - if yyrt4537 { - for ; yyj4537 < yyl4537; yyj4537++ { - yyv4537 = append(yyv4537, Endpoints{}) - yyh4537.ElemContainerState(yyj4537) + if yyrt4546 { + for ; yyj4546 < yyl4546; yyj4546++ { + yyv4546 = append(yyv4546, Endpoints{}) + yyh4546.ElemContainerState(yyj4546) if r.TryDecodeAsNil() { - yyv4537[yyj4537] = Endpoints{} + yyv4546[yyj4546] = Endpoints{} } else { - yyv4539 := &yyv4537[yyj4537] - yyv4539.CodecDecodeSelf(d) + yyv4548 := &yyv4546[yyj4546] + yyv4548.CodecDecodeSelf(d) } } } } else { - yyj4537 := 0 - for ; !r.CheckBreak(); yyj4537++ { + yyj4546 := 0 + for ; !r.CheckBreak(); yyj4546++ { - if yyj4537 >= len(yyv4537) { - yyv4537 = append(yyv4537, Endpoints{}) // var yyz4537 Endpoints - yyc4537 = true + if yyj4546 >= len(yyv4546) { + yyv4546 = append(yyv4546, Endpoints{}) // var yyz4546 Endpoints + yyc4546 = true } - yyh4537.ElemContainerState(yyj4537) - if yyj4537 < len(yyv4537) { + yyh4546.ElemContainerState(yyj4546) + if yyj4546 < len(yyv4546) { if r.TryDecodeAsNil() { - yyv4537[yyj4537] = Endpoints{} + yyv4546[yyj4546] = Endpoints{} } else { - yyv4540 := &yyv4537[yyj4537] - yyv4540.CodecDecodeSelf(d) + yyv4549 := &yyv4546[yyj4546] + yyv4549.CodecDecodeSelf(d) } } else { @@ -57858,17 +57936,17 @@ func (x codecSelfer1234) decSliceEndpoints(v *[]Endpoints, d *codec1978.Decoder) } } - if yyj4537 < len(yyv4537) { - yyv4537 = yyv4537[:yyj4537] - yyc4537 = true - } else if yyj4537 == 0 && yyv4537 == nil { - yyv4537 = []Endpoints{} - yyc4537 = true + if yyj4546 < len(yyv4546) { + yyv4546 = yyv4546[:yyj4546] + yyc4546 = true + } else if yyj4546 == 0 && yyv4546 == nil { + yyv4546 = []Endpoints{} + yyc4546 = true } } - yyh4537.End() - if yyc4537 { - *v = yyv4537 + yyh4546.End() + if yyc4546 { + *v = yyv4546 } } @@ -57877,10 +57955,10 @@ func (x codecSelfer1234) encSliceNodeCondition(v []NodeCondition, e *codec1978.E z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4541 := range v { + for _, yyv4550 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4542 := &yyv4541 - yy4542.CodecEncodeSelf(e) + yy4551 := &yyv4550 + yy4551.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57890,83 +57968,83 @@ func (x codecSelfer1234) decSliceNodeCondition(v *[]NodeCondition, d *codec1978. z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4543 := *v - yyh4543, yyl4543 := z.DecSliceHelperStart() - var yyc4543 bool - if yyl4543 == 0 { - if yyv4543 == nil { - yyv4543 = []NodeCondition{} - yyc4543 = true - } else if len(yyv4543) != 0 { - yyv4543 = yyv4543[:0] - yyc4543 = true + yyv4552 := *v + yyh4552, yyl4552 := z.DecSliceHelperStart() + var yyc4552 bool + if yyl4552 == 0 { + if yyv4552 == nil { + yyv4552 = []NodeCondition{} + yyc4552 = true + } else if len(yyv4552) != 0 { + yyv4552 = yyv4552[:0] + yyc4552 = true } - } else if yyl4543 > 0 { - var yyrr4543, yyrl4543 int - var yyrt4543 bool - if yyl4543 > cap(yyv4543) { + } else if yyl4552 > 0 { + var yyrr4552, yyrl4552 int + var yyrt4552 bool + if yyl4552 > cap(yyv4552) { - yyrg4543 := len(yyv4543) > 0 - yyv24543 := yyv4543 - yyrl4543, yyrt4543 = z.DecInferLen(yyl4543, z.DecBasicHandle().MaxInitLen, 112) - if yyrt4543 { - if yyrl4543 <= cap(yyv4543) { - yyv4543 = yyv4543[:yyrl4543] + yyrg4552 := len(yyv4552) > 0 + yyv24552 := yyv4552 + yyrl4552, yyrt4552 = z.DecInferLen(yyl4552, z.DecBasicHandle().MaxInitLen, 112) + if yyrt4552 { + if yyrl4552 <= cap(yyv4552) { + yyv4552 = yyv4552[:yyrl4552] } else { - yyv4543 = make([]NodeCondition, yyrl4543) + yyv4552 = make([]NodeCondition, yyrl4552) } } else { - yyv4543 = make([]NodeCondition, yyrl4543) + yyv4552 = make([]NodeCondition, yyrl4552) } - yyc4543 = true - yyrr4543 = len(yyv4543) - if yyrg4543 { - copy(yyv4543, yyv24543) + yyc4552 = true + yyrr4552 = len(yyv4552) + if yyrg4552 { + copy(yyv4552, yyv24552) } - } else if yyl4543 != len(yyv4543) { - yyv4543 = yyv4543[:yyl4543] - yyc4543 = true + } else if yyl4552 != len(yyv4552) { + yyv4552 = yyv4552[:yyl4552] + yyc4552 = true } - yyj4543 := 0 - for ; yyj4543 < yyrr4543; yyj4543++ { - yyh4543.ElemContainerState(yyj4543) + yyj4552 := 0 + for ; yyj4552 < yyrr4552; yyj4552++ { + yyh4552.ElemContainerState(yyj4552) if r.TryDecodeAsNil() { - yyv4543[yyj4543] = NodeCondition{} + yyv4552[yyj4552] = NodeCondition{} } else { - yyv4544 := &yyv4543[yyj4543] - yyv4544.CodecDecodeSelf(d) + yyv4553 := &yyv4552[yyj4552] + yyv4553.CodecDecodeSelf(d) } } - if yyrt4543 { - for ; yyj4543 < yyl4543; yyj4543++ { - yyv4543 = append(yyv4543, NodeCondition{}) - yyh4543.ElemContainerState(yyj4543) + if yyrt4552 { + for ; yyj4552 < yyl4552; yyj4552++ { + yyv4552 = append(yyv4552, NodeCondition{}) + yyh4552.ElemContainerState(yyj4552) if r.TryDecodeAsNil() { - yyv4543[yyj4543] = NodeCondition{} + yyv4552[yyj4552] = NodeCondition{} } else { - yyv4545 := &yyv4543[yyj4543] - yyv4545.CodecDecodeSelf(d) + yyv4554 := &yyv4552[yyj4552] + yyv4554.CodecDecodeSelf(d) } } } } else { - yyj4543 := 0 - for ; !r.CheckBreak(); yyj4543++ { + yyj4552 := 0 + for ; !r.CheckBreak(); yyj4552++ { - if yyj4543 >= len(yyv4543) { - yyv4543 = append(yyv4543, NodeCondition{}) // var yyz4543 NodeCondition - yyc4543 = true + if yyj4552 >= len(yyv4552) { + yyv4552 = append(yyv4552, NodeCondition{}) // var yyz4552 NodeCondition + yyc4552 = true } - yyh4543.ElemContainerState(yyj4543) - if yyj4543 < len(yyv4543) { + yyh4552.ElemContainerState(yyj4552) + if yyj4552 < len(yyv4552) { if r.TryDecodeAsNil() { - yyv4543[yyj4543] = NodeCondition{} + yyv4552[yyj4552] = NodeCondition{} } else { - yyv4546 := &yyv4543[yyj4543] - yyv4546.CodecDecodeSelf(d) + yyv4555 := &yyv4552[yyj4552] + yyv4555.CodecDecodeSelf(d) } } else { @@ -57974,17 +58052,17 @@ func (x codecSelfer1234) decSliceNodeCondition(v *[]NodeCondition, d *codec1978. } } - if yyj4543 < len(yyv4543) { - yyv4543 = yyv4543[:yyj4543] - yyc4543 = true - } else if yyj4543 == 0 && yyv4543 == nil { - yyv4543 = []NodeCondition{} - yyc4543 = true + if yyj4552 < len(yyv4552) { + yyv4552 = yyv4552[:yyj4552] + yyc4552 = true + } else if yyj4552 == 0 && yyv4552 == nil { + yyv4552 = []NodeCondition{} + yyc4552 = true } } - yyh4543.End() - if yyc4543 { - *v = yyv4543 + yyh4552.End() + if yyc4552 { + *v = yyv4552 } } @@ -57993,10 +58071,10 @@ func (x codecSelfer1234) encSliceNodeAddress(v []NodeAddress, e *codec1978.Encod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4547 := range v { + for _, yyv4556 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4548 := &yyv4547 - yy4548.CodecEncodeSelf(e) + yy4557 := &yyv4556 + yy4557.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58006,83 +58084,83 @@ func (x codecSelfer1234) decSliceNodeAddress(v *[]NodeAddress, d *codec1978.Deco z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4549 := *v - yyh4549, yyl4549 := z.DecSliceHelperStart() - var yyc4549 bool - if yyl4549 == 0 { - if yyv4549 == nil { - yyv4549 = []NodeAddress{} - yyc4549 = true - } else if len(yyv4549) != 0 { - yyv4549 = yyv4549[:0] - yyc4549 = true + yyv4558 := *v + yyh4558, yyl4558 := z.DecSliceHelperStart() + var yyc4558 bool + if yyl4558 == 0 { + if yyv4558 == nil { + yyv4558 = []NodeAddress{} + yyc4558 = true + } else if len(yyv4558) != 0 { + yyv4558 = yyv4558[:0] + yyc4558 = true } - } else if yyl4549 > 0 { - var yyrr4549, yyrl4549 int - var yyrt4549 bool - if yyl4549 > cap(yyv4549) { + } else if yyl4558 > 0 { + var yyrr4558, yyrl4558 int + var yyrt4558 bool + if yyl4558 > cap(yyv4558) { - yyrg4549 := len(yyv4549) > 0 - yyv24549 := yyv4549 - yyrl4549, yyrt4549 = z.DecInferLen(yyl4549, z.DecBasicHandle().MaxInitLen, 32) - if yyrt4549 { - if yyrl4549 <= cap(yyv4549) { - yyv4549 = yyv4549[:yyrl4549] + yyrg4558 := len(yyv4558) > 0 + yyv24558 := yyv4558 + yyrl4558, yyrt4558 = z.DecInferLen(yyl4558, z.DecBasicHandle().MaxInitLen, 32) + if yyrt4558 { + if yyrl4558 <= cap(yyv4558) { + yyv4558 = yyv4558[:yyrl4558] } else { - yyv4549 = make([]NodeAddress, yyrl4549) + yyv4558 = make([]NodeAddress, yyrl4558) } } else { - yyv4549 = make([]NodeAddress, yyrl4549) + yyv4558 = make([]NodeAddress, yyrl4558) } - yyc4549 = true - yyrr4549 = len(yyv4549) - if yyrg4549 { - copy(yyv4549, yyv24549) + yyc4558 = true + yyrr4558 = len(yyv4558) + if yyrg4558 { + copy(yyv4558, yyv24558) } - } else if yyl4549 != len(yyv4549) { - yyv4549 = yyv4549[:yyl4549] - yyc4549 = true + } else if yyl4558 != len(yyv4558) { + yyv4558 = yyv4558[:yyl4558] + yyc4558 = true } - yyj4549 := 0 - for ; yyj4549 < yyrr4549; yyj4549++ { - yyh4549.ElemContainerState(yyj4549) + yyj4558 := 0 + for ; yyj4558 < yyrr4558; yyj4558++ { + yyh4558.ElemContainerState(yyj4558) if r.TryDecodeAsNil() { - yyv4549[yyj4549] = NodeAddress{} + yyv4558[yyj4558] = NodeAddress{} } else { - yyv4550 := &yyv4549[yyj4549] - yyv4550.CodecDecodeSelf(d) + yyv4559 := &yyv4558[yyj4558] + yyv4559.CodecDecodeSelf(d) } } - if yyrt4549 { - for ; yyj4549 < yyl4549; yyj4549++ { - yyv4549 = append(yyv4549, NodeAddress{}) - yyh4549.ElemContainerState(yyj4549) + if yyrt4558 { + for ; yyj4558 < yyl4558; yyj4558++ { + yyv4558 = append(yyv4558, NodeAddress{}) + yyh4558.ElemContainerState(yyj4558) if r.TryDecodeAsNil() { - yyv4549[yyj4549] = NodeAddress{} + yyv4558[yyj4558] = NodeAddress{} } else { - yyv4551 := &yyv4549[yyj4549] - yyv4551.CodecDecodeSelf(d) + yyv4560 := &yyv4558[yyj4558] + yyv4560.CodecDecodeSelf(d) } } } } else { - yyj4549 := 0 - for ; !r.CheckBreak(); yyj4549++ { + yyj4558 := 0 + for ; !r.CheckBreak(); yyj4558++ { - if yyj4549 >= len(yyv4549) { - yyv4549 = append(yyv4549, NodeAddress{}) // var yyz4549 NodeAddress - yyc4549 = true + if yyj4558 >= len(yyv4558) { + yyv4558 = append(yyv4558, NodeAddress{}) // var yyz4558 NodeAddress + yyc4558 = true } - yyh4549.ElemContainerState(yyj4549) - if yyj4549 < len(yyv4549) { + yyh4558.ElemContainerState(yyj4558) + if yyj4558 < len(yyv4558) { if r.TryDecodeAsNil() { - yyv4549[yyj4549] = NodeAddress{} + yyv4558[yyj4558] = NodeAddress{} } else { - yyv4552 := &yyv4549[yyj4549] - yyv4552.CodecDecodeSelf(d) + yyv4561 := &yyv4558[yyj4558] + yyv4561.CodecDecodeSelf(d) } } else { @@ -58090,17 +58168,17 @@ func (x codecSelfer1234) decSliceNodeAddress(v *[]NodeAddress, d *codec1978.Deco } } - if yyj4549 < len(yyv4549) { - yyv4549 = yyv4549[:yyj4549] - yyc4549 = true - } else if yyj4549 == 0 && yyv4549 == nil { - yyv4549 = []NodeAddress{} - yyc4549 = true + if yyj4558 < len(yyv4558) { + yyv4558 = yyv4558[:yyj4558] + yyc4558 = true + } else if yyj4558 == 0 && yyv4558 == nil { + yyv4558 = []NodeAddress{} + yyc4558 = true } } - yyh4549.End() - if yyc4549 { - *v = yyv4549 + yyh4558.End() + if yyc4558 { + *v = yyv4558 } } @@ -58109,10 +58187,10 @@ func (x codecSelfer1234) encSliceContainerImage(v []ContainerImage, e *codec1978 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4553 := range v { + for _, yyv4562 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4554 := &yyv4553 - yy4554.CodecEncodeSelf(e) + yy4563 := &yyv4562 + yy4563.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58122,83 +58200,83 @@ func (x codecSelfer1234) decSliceContainerImage(v *[]ContainerImage, d *codec197 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4555 := *v - yyh4555, yyl4555 := z.DecSliceHelperStart() - var yyc4555 bool - if yyl4555 == 0 { - if yyv4555 == nil { - yyv4555 = []ContainerImage{} - yyc4555 = true - } else if len(yyv4555) != 0 { - yyv4555 = yyv4555[:0] - yyc4555 = true + yyv4564 := *v + yyh4564, yyl4564 := z.DecSliceHelperStart() + var yyc4564 bool + if yyl4564 == 0 { + if yyv4564 == nil { + yyv4564 = []ContainerImage{} + yyc4564 = true + } else if len(yyv4564) != 0 { + yyv4564 = yyv4564[:0] + yyc4564 = true } - } else if yyl4555 > 0 { - var yyrr4555, yyrl4555 int - var yyrt4555 bool - if yyl4555 > cap(yyv4555) { + } else if yyl4564 > 0 { + var yyrr4564, yyrl4564 int + var yyrt4564 bool + if yyl4564 > cap(yyv4564) { - yyrg4555 := len(yyv4555) > 0 - yyv24555 := yyv4555 - yyrl4555, yyrt4555 = z.DecInferLen(yyl4555, z.DecBasicHandle().MaxInitLen, 32) - if yyrt4555 { - if yyrl4555 <= cap(yyv4555) { - yyv4555 = yyv4555[:yyrl4555] + yyrg4564 := len(yyv4564) > 0 + yyv24564 := yyv4564 + yyrl4564, yyrt4564 = z.DecInferLen(yyl4564, z.DecBasicHandle().MaxInitLen, 32) + if yyrt4564 { + if yyrl4564 <= cap(yyv4564) { + yyv4564 = yyv4564[:yyrl4564] } else { - yyv4555 = make([]ContainerImage, yyrl4555) + yyv4564 = make([]ContainerImage, yyrl4564) } } else { - yyv4555 = make([]ContainerImage, yyrl4555) + yyv4564 = make([]ContainerImage, yyrl4564) } - yyc4555 = true - yyrr4555 = len(yyv4555) - if yyrg4555 { - copy(yyv4555, yyv24555) + yyc4564 = true + yyrr4564 = len(yyv4564) + if yyrg4564 { + copy(yyv4564, yyv24564) } - } else if yyl4555 != len(yyv4555) { - yyv4555 = yyv4555[:yyl4555] - yyc4555 = true + } else if yyl4564 != len(yyv4564) { + yyv4564 = yyv4564[:yyl4564] + yyc4564 = true } - yyj4555 := 0 - for ; yyj4555 < yyrr4555; yyj4555++ { - yyh4555.ElemContainerState(yyj4555) + yyj4564 := 0 + for ; yyj4564 < yyrr4564; yyj4564++ { + yyh4564.ElemContainerState(yyj4564) if r.TryDecodeAsNil() { - yyv4555[yyj4555] = ContainerImage{} + yyv4564[yyj4564] = ContainerImage{} } else { - yyv4556 := &yyv4555[yyj4555] - yyv4556.CodecDecodeSelf(d) + yyv4565 := &yyv4564[yyj4564] + yyv4565.CodecDecodeSelf(d) } } - if yyrt4555 { - for ; yyj4555 < yyl4555; yyj4555++ { - yyv4555 = append(yyv4555, ContainerImage{}) - yyh4555.ElemContainerState(yyj4555) + if yyrt4564 { + for ; yyj4564 < yyl4564; yyj4564++ { + yyv4564 = append(yyv4564, ContainerImage{}) + yyh4564.ElemContainerState(yyj4564) if r.TryDecodeAsNil() { - yyv4555[yyj4555] = ContainerImage{} + yyv4564[yyj4564] = ContainerImage{} } else { - yyv4557 := &yyv4555[yyj4555] - yyv4557.CodecDecodeSelf(d) + yyv4566 := &yyv4564[yyj4564] + yyv4566.CodecDecodeSelf(d) } } } } else { - yyj4555 := 0 - for ; !r.CheckBreak(); yyj4555++ { + yyj4564 := 0 + for ; !r.CheckBreak(); yyj4564++ { - if yyj4555 >= len(yyv4555) { - yyv4555 = append(yyv4555, ContainerImage{}) // var yyz4555 ContainerImage - yyc4555 = true + if yyj4564 >= len(yyv4564) { + yyv4564 = append(yyv4564, ContainerImage{}) // var yyz4564 ContainerImage + yyc4564 = true } - yyh4555.ElemContainerState(yyj4555) - if yyj4555 < len(yyv4555) { + yyh4564.ElemContainerState(yyj4564) + if yyj4564 < len(yyv4564) { if r.TryDecodeAsNil() { - yyv4555[yyj4555] = ContainerImage{} + yyv4564[yyj4564] = ContainerImage{} } else { - yyv4558 := &yyv4555[yyj4555] - yyv4558.CodecDecodeSelf(d) + yyv4567 := &yyv4564[yyj4564] + yyv4567.CodecDecodeSelf(d) } } else { @@ -58206,17 +58284,17 @@ func (x codecSelfer1234) decSliceContainerImage(v *[]ContainerImage, d *codec197 } } - if yyj4555 < len(yyv4555) { - yyv4555 = yyv4555[:yyj4555] - yyc4555 = true - } else if yyj4555 == 0 && yyv4555 == nil { - yyv4555 = []ContainerImage{} - yyc4555 = true + if yyj4564 < len(yyv4564) { + yyv4564 = yyv4564[:yyj4564] + yyc4564 = true + } else if yyj4564 == 0 && yyv4564 == nil { + yyv4564 = []ContainerImage{} + yyc4564 = true } } - yyh4555.End() - if yyc4555 { - *v = yyv4555 + yyh4564.End() + if yyc4564 { + *v = yyv4564 } } @@ -58225,9 +58303,9 @@ func (x codecSelfer1234) encSliceUniqueVolumeName(v []UniqueVolumeName, e *codec z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4559 := range v { + for _, yyv4568 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yyv4559.CodecEncodeSelf(e) + yyv4568.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58237,75 +58315,75 @@ func (x codecSelfer1234) decSliceUniqueVolumeName(v *[]UniqueVolumeName, d *code z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4560 := *v - yyh4560, yyl4560 := z.DecSliceHelperStart() - var yyc4560 bool - if yyl4560 == 0 { - if yyv4560 == nil { - yyv4560 = []UniqueVolumeName{} - yyc4560 = true - } else if len(yyv4560) != 0 { - yyv4560 = yyv4560[:0] - yyc4560 = true + yyv4569 := *v + yyh4569, yyl4569 := z.DecSliceHelperStart() + var yyc4569 bool + if yyl4569 == 0 { + if yyv4569 == nil { + yyv4569 = []UniqueVolumeName{} + yyc4569 = true + } else if len(yyv4569) != 0 { + yyv4569 = yyv4569[:0] + yyc4569 = true } - } else if yyl4560 > 0 { - var yyrr4560, yyrl4560 int - var yyrt4560 bool - if yyl4560 > cap(yyv4560) { + } else if yyl4569 > 0 { + var yyrr4569, yyrl4569 int + var yyrt4569 bool + if yyl4569 > cap(yyv4569) { - yyrl4560, yyrt4560 = z.DecInferLen(yyl4560, z.DecBasicHandle().MaxInitLen, 16) - if yyrt4560 { - if yyrl4560 <= cap(yyv4560) { - yyv4560 = yyv4560[:yyrl4560] + yyrl4569, yyrt4569 = z.DecInferLen(yyl4569, z.DecBasicHandle().MaxInitLen, 16) + if yyrt4569 { + if yyrl4569 <= cap(yyv4569) { + yyv4569 = yyv4569[:yyrl4569] } else { - yyv4560 = make([]UniqueVolumeName, yyrl4560) + yyv4569 = make([]UniqueVolumeName, yyrl4569) } } else { - yyv4560 = make([]UniqueVolumeName, yyrl4560) + yyv4569 = make([]UniqueVolumeName, yyrl4569) } - yyc4560 = true - yyrr4560 = len(yyv4560) - } else if yyl4560 != len(yyv4560) { - yyv4560 = yyv4560[:yyl4560] - yyc4560 = true + yyc4569 = true + yyrr4569 = len(yyv4569) + } else if yyl4569 != len(yyv4569) { + yyv4569 = yyv4569[:yyl4569] + yyc4569 = true } - yyj4560 := 0 - for ; yyj4560 < yyrr4560; yyj4560++ { - yyh4560.ElemContainerState(yyj4560) + yyj4569 := 0 + for ; yyj4569 < yyrr4569; yyj4569++ { + yyh4569.ElemContainerState(yyj4569) if r.TryDecodeAsNil() { - yyv4560[yyj4560] = "" + yyv4569[yyj4569] = "" } else { - yyv4560[yyj4560] = UniqueVolumeName(r.DecodeString()) + yyv4569[yyj4569] = UniqueVolumeName(r.DecodeString()) } } - if yyrt4560 { - for ; yyj4560 < yyl4560; yyj4560++ { - yyv4560 = append(yyv4560, "") - yyh4560.ElemContainerState(yyj4560) + if yyrt4569 { + for ; yyj4569 < yyl4569; yyj4569++ { + yyv4569 = append(yyv4569, "") + yyh4569.ElemContainerState(yyj4569) if r.TryDecodeAsNil() { - yyv4560[yyj4560] = "" + yyv4569[yyj4569] = "" } else { - yyv4560[yyj4560] = UniqueVolumeName(r.DecodeString()) + yyv4569[yyj4569] = UniqueVolumeName(r.DecodeString()) } } } } else { - yyj4560 := 0 - for ; !r.CheckBreak(); yyj4560++ { + yyj4569 := 0 + for ; !r.CheckBreak(); yyj4569++ { - if yyj4560 >= len(yyv4560) { - yyv4560 = append(yyv4560, "") // var yyz4560 UniqueVolumeName - yyc4560 = true + if yyj4569 >= len(yyv4569) { + yyv4569 = append(yyv4569, "") // var yyz4569 UniqueVolumeName + yyc4569 = true } - yyh4560.ElemContainerState(yyj4560) - if yyj4560 < len(yyv4560) { + yyh4569.ElemContainerState(yyj4569) + if yyj4569 < len(yyv4569) { if r.TryDecodeAsNil() { - yyv4560[yyj4560] = "" + yyv4569[yyj4569] = "" } else { - yyv4560[yyj4560] = UniqueVolumeName(r.DecodeString()) + yyv4569[yyj4569] = UniqueVolumeName(r.DecodeString()) } } else { @@ -58313,17 +58391,17 @@ func (x codecSelfer1234) decSliceUniqueVolumeName(v *[]UniqueVolumeName, d *code } } - if yyj4560 < len(yyv4560) { - yyv4560 = yyv4560[:yyj4560] - yyc4560 = true - } else if yyj4560 == 0 && yyv4560 == nil { - yyv4560 = []UniqueVolumeName{} - yyc4560 = true + if yyj4569 < len(yyv4569) { + yyv4569 = yyv4569[:yyj4569] + yyc4569 = true + } else if yyj4569 == 0 && yyv4569 == nil { + yyv4569 = []UniqueVolumeName{} + yyc4569 = true } } - yyh4560.End() - if yyc4560 { - *v = yyv4560 + yyh4569.End() + if yyc4569 { + *v = yyv4569 } } @@ -58332,10 +58410,10 @@ func (x codecSelfer1234) encSliceAttachedVolume(v []AttachedVolume, e *codec1978 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4564 := range v { + for _, yyv4573 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4565 := &yyv4564 - yy4565.CodecEncodeSelf(e) + yy4574 := &yyv4573 + yy4574.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58345,83 +58423,83 @@ func (x codecSelfer1234) decSliceAttachedVolume(v *[]AttachedVolume, d *codec197 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4566 := *v - yyh4566, yyl4566 := z.DecSliceHelperStart() - var yyc4566 bool - if yyl4566 == 0 { - if yyv4566 == nil { - yyv4566 = []AttachedVolume{} - yyc4566 = true - } else if len(yyv4566) != 0 { - yyv4566 = yyv4566[:0] - yyc4566 = true + yyv4575 := *v + yyh4575, yyl4575 := z.DecSliceHelperStart() + var yyc4575 bool + if yyl4575 == 0 { + if yyv4575 == nil { + yyv4575 = []AttachedVolume{} + yyc4575 = true + } else if len(yyv4575) != 0 { + yyv4575 = yyv4575[:0] + yyc4575 = true } - } else if yyl4566 > 0 { - var yyrr4566, yyrl4566 int - var yyrt4566 bool - if yyl4566 > cap(yyv4566) { + } else if yyl4575 > 0 { + var yyrr4575, yyrl4575 int + var yyrt4575 bool + if yyl4575 > cap(yyv4575) { - yyrg4566 := len(yyv4566) > 0 - yyv24566 := yyv4566 - yyrl4566, yyrt4566 = z.DecInferLen(yyl4566, z.DecBasicHandle().MaxInitLen, 32) - if yyrt4566 { - if yyrl4566 <= cap(yyv4566) { - yyv4566 = yyv4566[:yyrl4566] + yyrg4575 := len(yyv4575) > 0 + yyv24575 := yyv4575 + yyrl4575, yyrt4575 = z.DecInferLen(yyl4575, z.DecBasicHandle().MaxInitLen, 32) + if yyrt4575 { + if yyrl4575 <= cap(yyv4575) { + yyv4575 = yyv4575[:yyrl4575] } else { - yyv4566 = make([]AttachedVolume, yyrl4566) + yyv4575 = make([]AttachedVolume, yyrl4575) } } else { - yyv4566 = make([]AttachedVolume, yyrl4566) + yyv4575 = make([]AttachedVolume, yyrl4575) } - yyc4566 = true - yyrr4566 = len(yyv4566) - if yyrg4566 { - copy(yyv4566, yyv24566) + yyc4575 = true + yyrr4575 = len(yyv4575) + if yyrg4575 { + copy(yyv4575, yyv24575) } - } else if yyl4566 != len(yyv4566) { - yyv4566 = yyv4566[:yyl4566] - yyc4566 = true + } else if yyl4575 != len(yyv4575) { + yyv4575 = yyv4575[:yyl4575] + yyc4575 = true } - yyj4566 := 0 - for ; yyj4566 < yyrr4566; yyj4566++ { - yyh4566.ElemContainerState(yyj4566) + yyj4575 := 0 + for ; yyj4575 < yyrr4575; yyj4575++ { + yyh4575.ElemContainerState(yyj4575) if r.TryDecodeAsNil() { - yyv4566[yyj4566] = AttachedVolume{} + yyv4575[yyj4575] = AttachedVolume{} } else { - yyv4567 := &yyv4566[yyj4566] - yyv4567.CodecDecodeSelf(d) + yyv4576 := &yyv4575[yyj4575] + yyv4576.CodecDecodeSelf(d) } } - if yyrt4566 { - for ; yyj4566 < yyl4566; yyj4566++ { - yyv4566 = append(yyv4566, AttachedVolume{}) - yyh4566.ElemContainerState(yyj4566) + if yyrt4575 { + for ; yyj4575 < yyl4575; yyj4575++ { + yyv4575 = append(yyv4575, AttachedVolume{}) + yyh4575.ElemContainerState(yyj4575) if r.TryDecodeAsNil() { - yyv4566[yyj4566] = AttachedVolume{} + yyv4575[yyj4575] = AttachedVolume{} } else { - yyv4568 := &yyv4566[yyj4566] - yyv4568.CodecDecodeSelf(d) + yyv4577 := &yyv4575[yyj4575] + yyv4577.CodecDecodeSelf(d) } } } } else { - yyj4566 := 0 - for ; !r.CheckBreak(); yyj4566++ { + yyj4575 := 0 + for ; !r.CheckBreak(); yyj4575++ { - if yyj4566 >= len(yyv4566) { - yyv4566 = append(yyv4566, AttachedVolume{}) // var yyz4566 AttachedVolume - yyc4566 = true + if yyj4575 >= len(yyv4575) { + yyv4575 = append(yyv4575, AttachedVolume{}) // var yyz4575 AttachedVolume + yyc4575 = true } - yyh4566.ElemContainerState(yyj4566) - if yyj4566 < len(yyv4566) { + yyh4575.ElemContainerState(yyj4575) + if yyj4575 < len(yyv4575) { if r.TryDecodeAsNil() { - yyv4566[yyj4566] = AttachedVolume{} + yyv4575[yyj4575] = AttachedVolume{} } else { - yyv4569 := &yyv4566[yyj4566] - yyv4569.CodecDecodeSelf(d) + yyv4578 := &yyv4575[yyj4575] + yyv4578.CodecDecodeSelf(d) } } else { @@ -58429,17 +58507,17 @@ func (x codecSelfer1234) decSliceAttachedVolume(v *[]AttachedVolume, d *codec197 } } - if yyj4566 < len(yyv4566) { - yyv4566 = yyv4566[:yyj4566] - yyc4566 = true - } else if yyj4566 == 0 && yyv4566 == nil { - yyv4566 = []AttachedVolume{} - yyc4566 = true + if yyj4575 < len(yyv4575) { + yyv4575 = yyv4575[:yyj4575] + yyc4575 = true + } else if yyj4575 == 0 && yyv4575 == nil { + yyv4575 = []AttachedVolume{} + yyc4575 = true } } - yyh4566.End() - if yyc4566 { - *v = yyv4566 + yyh4575.End() + if yyc4575 { + *v = yyv4575 } } @@ -58448,10 +58526,10 @@ func (x codecSelfer1234) encSlicePreferAvoidPodsEntry(v []PreferAvoidPodsEntry, z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4570 := range v { + for _, yyv4579 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4571 := &yyv4570 - yy4571.CodecEncodeSelf(e) + yy4580 := &yyv4579 + yy4580.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58461,83 +58539,83 @@ func (x codecSelfer1234) decSlicePreferAvoidPodsEntry(v *[]PreferAvoidPodsEntry, z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4572 := *v - yyh4572, yyl4572 := z.DecSliceHelperStart() - var yyc4572 bool - if yyl4572 == 0 { - if yyv4572 == nil { - yyv4572 = []PreferAvoidPodsEntry{} - yyc4572 = true - } else if len(yyv4572) != 0 { - yyv4572 = yyv4572[:0] - yyc4572 = true + yyv4581 := *v + yyh4581, yyl4581 := z.DecSliceHelperStart() + var yyc4581 bool + if yyl4581 == 0 { + if yyv4581 == nil { + yyv4581 = []PreferAvoidPodsEntry{} + yyc4581 = true + } else if len(yyv4581) != 0 { + yyv4581 = yyv4581[:0] + yyc4581 = true } - } else if yyl4572 > 0 { - var yyrr4572, yyrl4572 int - var yyrt4572 bool - if yyl4572 > cap(yyv4572) { + } else if yyl4581 > 0 { + var yyrr4581, yyrl4581 int + var yyrt4581 bool + if yyl4581 > cap(yyv4581) { - yyrg4572 := len(yyv4572) > 0 - yyv24572 := yyv4572 - yyrl4572, yyrt4572 = z.DecInferLen(yyl4572, z.DecBasicHandle().MaxInitLen, 64) - if yyrt4572 { - if yyrl4572 <= cap(yyv4572) { - yyv4572 = yyv4572[:yyrl4572] + yyrg4581 := len(yyv4581) > 0 + yyv24581 := yyv4581 + yyrl4581, yyrt4581 = z.DecInferLen(yyl4581, z.DecBasicHandle().MaxInitLen, 64) + if yyrt4581 { + if yyrl4581 <= cap(yyv4581) { + yyv4581 = yyv4581[:yyrl4581] } else { - yyv4572 = make([]PreferAvoidPodsEntry, yyrl4572) + yyv4581 = make([]PreferAvoidPodsEntry, yyrl4581) } } else { - yyv4572 = make([]PreferAvoidPodsEntry, yyrl4572) + yyv4581 = make([]PreferAvoidPodsEntry, yyrl4581) } - yyc4572 = true - yyrr4572 = len(yyv4572) - if yyrg4572 { - copy(yyv4572, yyv24572) + yyc4581 = true + yyrr4581 = len(yyv4581) + if yyrg4581 { + copy(yyv4581, yyv24581) } - } else if yyl4572 != len(yyv4572) { - yyv4572 = yyv4572[:yyl4572] - yyc4572 = true + } else if yyl4581 != len(yyv4581) { + yyv4581 = yyv4581[:yyl4581] + yyc4581 = true } - yyj4572 := 0 - for ; yyj4572 < yyrr4572; yyj4572++ { - yyh4572.ElemContainerState(yyj4572) + yyj4581 := 0 + for ; yyj4581 < yyrr4581; yyj4581++ { + yyh4581.ElemContainerState(yyj4581) if r.TryDecodeAsNil() { - yyv4572[yyj4572] = PreferAvoidPodsEntry{} + yyv4581[yyj4581] = PreferAvoidPodsEntry{} } else { - yyv4573 := &yyv4572[yyj4572] - yyv4573.CodecDecodeSelf(d) + yyv4582 := &yyv4581[yyj4581] + yyv4582.CodecDecodeSelf(d) } } - if yyrt4572 { - for ; yyj4572 < yyl4572; yyj4572++ { - yyv4572 = append(yyv4572, PreferAvoidPodsEntry{}) - yyh4572.ElemContainerState(yyj4572) + if yyrt4581 { + for ; yyj4581 < yyl4581; yyj4581++ { + yyv4581 = append(yyv4581, PreferAvoidPodsEntry{}) + yyh4581.ElemContainerState(yyj4581) if r.TryDecodeAsNil() { - yyv4572[yyj4572] = PreferAvoidPodsEntry{} + yyv4581[yyj4581] = PreferAvoidPodsEntry{} } else { - yyv4574 := &yyv4572[yyj4572] - yyv4574.CodecDecodeSelf(d) + yyv4583 := &yyv4581[yyj4581] + yyv4583.CodecDecodeSelf(d) } } } } else { - yyj4572 := 0 - for ; !r.CheckBreak(); yyj4572++ { + yyj4581 := 0 + for ; !r.CheckBreak(); yyj4581++ { - if yyj4572 >= len(yyv4572) { - yyv4572 = append(yyv4572, PreferAvoidPodsEntry{}) // var yyz4572 PreferAvoidPodsEntry - yyc4572 = true + if yyj4581 >= len(yyv4581) { + yyv4581 = append(yyv4581, PreferAvoidPodsEntry{}) // var yyz4581 PreferAvoidPodsEntry + yyc4581 = true } - yyh4572.ElemContainerState(yyj4572) - if yyj4572 < len(yyv4572) { + yyh4581.ElemContainerState(yyj4581) + if yyj4581 < len(yyv4581) { if r.TryDecodeAsNil() { - yyv4572[yyj4572] = PreferAvoidPodsEntry{} + yyv4581[yyj4581] = PreferAvoidPodsEntry{} } else { - yyv4575 := &yyv4572[yyj4572] - yyv4575.CodecDecodeSelf(d) + yyv4584 := &yyv4581[yyj4581] + yyv4584.CodecDecodeSelf(d) } } else { @@ -58545,17 +58623,17 @@ func (x codecSelfer1234) decSlicePreferAvoidPodsEntry(v *[]PreferAvoidPodsEntry, } } - if yyj4572 < len(yyv4572) { - yyv4572 = yyv4572[:yyj4572] - yyc4572 = true - } else if yyj4572 == 0 && yyv4572 == nil { - yyv4572 = []PreferAvoidPodsEntry{} - yyc4572 = true + if yyj4581 < len(yyv4581) { + yyv4581 = yyv4581[:yyj4581] + yyc4581 = true + } else if yyj4581 == 0 && yyv4581 == nil { + yyv4581 = []PreferAvoidPodsEntry{} + yyc4581 = true } } - yyh4572.End() - if yyc4572 { - *v = yyv4572 + yyh4581.End() + if yyc4581 { + *v = yyv4581 } } @@ -58564,19 +58642,19 @@ func (x codecSelfer1234) encResourceList(v ResourceList, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeMapStart(len(v)) - for yyk4576, yyv4576 := range v { + for yyk4585, yyv4585 := range v { z.EncSendContainerState(codecSelfer_containerMapKey1234) - yyk4576.CodecEncodeSelf(e) + yyk4585.CodecEncodeSelf(e) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4577 := &yyv4576 - yym4578 := z.EncBinary() - _ = yym4578 + yy4586 := &yyv4585 + yym4587 := z.EncBinary() + _ = yym4587 if false { - } else if z.HasExtensions() && z.EncExt(yy4577) { - } else if !yym4578 && z.IsJSONHandle() { - z.EncJSONMarshal(yy4577) + } else if z.HasExtensions() && z.EncExt(yy4586) { + } else if !yym4587 && z.IsJSONHandle() { + z.EncJSONMarshal(yy4586) } else { - z.EncFallback(yy4577) + z.EncFallback(yy4586) } } z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -58587,86 +58665,86 @@ func (x codecSelfer1234) decResourceList(v *ResourceList, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4579 := *v - yyl4579 := r.ReadMapStart() - yybh4579 := z.DecBasicHandle() - if yyv4579 == nil { - yyrl4579, _ := z.DecInferLen(yyl4579, yybh4579.MaxInitLen, 72) - yyv4579 = make(map[ResourceName]pkg3_resource.Quantity, yyrl4579) - *v = yyv4579 + yyv4588 := *v + yyl4588 := r.ReadMapStart() + yybh4588 := z.DecBasicHandle() + if yyv4588 == nil { + yyrl4588, _ := z.DecInferLen(yyl4588, yybh4588.MaxInitLen, 72) + yyv4588 = make(map[ResourceName]pkg3_resource.Quantity, yyrl4588) + *v = yyv4588 } - var yymk4579 ResourceName - var yymv4579 pkg3_resource.Quantity - var yymg4579 bool - if yybh4579.MapValueReset { - yymg4579 = true + var yymk4588 ResourceName + var yymv4588 pkg3_resource.Quantity + var yymg4588 bool + if yybh4588.MapValueReset { + yymg4588 = true } - if yyl4579 > 0 { - for yyj4579 := 0; yyj4579 < yyl4579; yyj4579++ { + if yyl4588 > 0 { + for yyj4588 := 0; yyj4588 < yyl4588; yyj4588++ { z.DecSendContainerState(codecSelfer_containerMapKey1234) if r.TryDecodeAsNil() { - yymk4579 = "" + yymk4588 = "" } else { - yymk4579 = ResourceName(r.DecodeString()) + yymk4588 = ResourceName(r.DecodeString()) } - if yymg4579 { - yymv4579 = yyv4579[yymk4579] + if yymg4588 { + yymv4588 = yyv4588[yymk4588] } else { - yymv4579 = pkg3_resource.Quantity{} + yymv4588 = pkg3_resource.Quantity{} } z.DecSendContainerState(codecSelfer_containerMapValue1234) if r.TryDecodeAsNil() { - yymv4579 = pkg3_resource.Quantity{} + yymv4588 = pkg3_resource.Quantity{} } else { - yyv4581 := &yymv4579 - yym4582 := z.DecBinary() - _ = yym4582 + yyv4590 := &yymv4588 + yym4591 := z.DecBinary() + _ = yym4591 if false { - } else if z.HasExtensions() && z.DecExt(yyv4581) { - } else if !yym4582 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv4581) + } else if z.HasExtensions() && z.DecExt(yyv4590) { + } else if !yym4591 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv4590) } else { - z.DecFallback(yyv4581, false) + z.DecFallback(yyv4590, false) } } - if yyv4579 != nil { - yyv4579[yymk4579] = yymv4579 + if yyv4588 != nil { + yyv4588[yymk4588] = yymv4588 } } - } else if yyl4579 < 0 { - for yyj4579 := 0; !r.CheckBreak(); yyj4579++ { + } else if yyl4588 < 0 { + for yyj4588 := 0; !r.CheckBreak(); yyj4588++ { z.DecSendContainerState(codecSelfer_containerMapKey1234) if r.TryDecodeAsNil() { - yymk4579 = "" + yymk4588 = "" } else { - yymk4579 = ResourceName(r.DecodeString()) + yymk4588 = ResourceName(r.DecodeString()) } - if yymg4579 { - yymv4579 = yyv4579[yymk4579] + if yymg4588 { + yymv4588 = yyv4588[yymk4588] } else { - yymv4579 = pkg3_resource.Quantity{} + yymv4588 = pkg3_resource.Quantity{} } z.DecSendContainerState(codecSelfer_containerMapValue1234) if r.TryDecodeAsNil() { - yymv4579 = pkg3_resource.Quantity{} + yymv4588 = pkg3_resource.Quantity{} } else { - yyv4584 := &yymv4579 - yym4585 := z.DecBinary() - _ = yym4585 + yyv4593 := &yymv4588 + yym4594 := z.DecBinary() + _ = yym4594 if false { - } else if z.HasExtensions() && z.DecExt(yyv4584) { - } else if !yym4585 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv4584) + } else if z.HasExtensions() && z.DecExt(yyv4593) { + } else if !yym4594 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv4593) } else { - z.DecFallback(yyv4584, false) + z.DecFallback(yyv4593, false) } } - if yyv4579 != nil { - yyv4579[yymk4579] = yymv4579 + if yyv4588 != nil { + yyv4588[yymk4588] = yymv4588 } } } // else len==0: TODO: Should we clear map entries? @@ -58678,10 +58756,10 @@ func (x codecSelfer1234) encSliceNode(v []Node, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4586 := range v { + for _, yyv4595 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4587 := &yyv4586 - yy4587.CodecEncodeSelf(e) + yy4596 := &yyv4595 + yy4596.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58691,83 +58769,83 @@ func (x codecSelfer1234) decSliceNode(v *[]Node, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4588 := *v - yyh4588, yyl4588 := z.DecSliceHelperStart() - var yyc4588 bool - if yyl4588 == 0 { - if yyv4588 == nil { - yyv4588 = []Node{} - yyc4588 = true - } else if len(yyv4588) != 0 { - yyv4588 = yyv4588[:0] - yyc4588 = true + yyv4597 := *v + yyh4597, yyl4597 := z.DecSliceHelperStart() + var yyc4597 bool + if yyl4597 == 0 { + if yyv4597 == nil { + yyv4597 = []Node{} + yyc4597 = true + } else if len(yyv4597) != 0 { + yyv4597 = yyv4597[:0] + yyc4597 = true } - } else if yyl4588 > 0 { - var yyrr4588, yyrl4588 int - var yyrt4588 bool - if yyl4588 > cap(yyv4588) { + } else if yyl4597 > 0 { + var yyrr4597, yyrl4597 int + var yyrt4597 bool + if yyl4597 > cap(yyv4597) { - yyrg4588 := len(yyv4588) > 0 - yyv24588 := yyv4588 - yyrl4588, yyrt4588 = z.DecInferLen(yyl4588, z.DecBasicHandle().MaxInitLen, 616) - if yyrt4588 { - if yyrl4588 <= cap(yyv4588) { - yyv4588 = yyv4588[:yyrl4588] + yyrg4597 := len(yyv4597) > 0 + yyv24597 := yyv4597 + yyrl4597, yyrt4597 = z.DecInferLen(yyl4597, z.DecBasicHandle().MaxInitLen, 616) + if yyrt4597 { + if yyrl4597 <= cap(yyv4597) { + yyv4597 = yyv4597[:yyrl4597] } else { - yyv4588 = make([]Node, yyrl4588) + yyv4597 = make([]Node, yyrl4597) } } else { - yyv4588 = make([]Node, yyrl4588) + yyv4597 = make([]Node, yyrl4597) } - yyc4588 = true - yyrr4588 = len(yyv4588) - if yyrg4588 { - copy(yyv4588, yyv24588) + yyc4597 = true + yyrr4597 = len(yyv4597) + if yyrg4597 { + copy(yyv4597, yyv24597) } - } else if yyl4588 != len(yyv4588) { - yyv4588 = yyv4588[:yyl4588] - yyc4588 = true + } else if yyl4597 != len(yyv4597) { + yyv4597 = yyv4597[:yyl4597] + yyc4597 = true } - yyj4588 := 0 - for ; yyj4588 < yyrr4588; yyj4588++ { - yyh4588.ElemContainerState(yyj4588) + yyj4597 := 0 + for ; yyj4597 < yyrr4597; yyj4597++ { + yyh4597.ElemContainerState(yyj4597) if r.TryDecodeAsNil() { - yyv4588[yyj4588] = Node{} + yyv4597[yyj4597] = Node{} } else { - yyv4589 := &yyv4588[yyj4588] - yyv4589.CodecDecodeSelf(d) + yyv4598 := &yyv4597[yyj4597] + yyv4598.CodecDecodeSelf(d) } } - if yyrt4588 { - for ; yyj4588 < yyl4588; yyj4588++ { - yyv4588 = append(yyv4588, Node{}) - yyh4588.ElemContainerState(yyj4588) + if yyrt4597 { + for ; yyj4597 < yyl4597; yyj4597++ { + yyv4597 = append(yyv4597, Node{}) + yyh4597.ElemContainerState(yyj4597) if r.TryDecodeAsNil() { - yyv4588[yyj4588] = Node{} + yyv4597[yyj4597] = Node{} } else { - yyv4590 := &yyv4588[yyj4588] - yyv4590.CodecDecodeSelf(d) + yyv4599 := &yyv4597[yyj4597] + yyv4599.CodecDecodeSelf(d) } } } } else { - yyj4588 := 0 - for ; !r.CheckBreak(); yyj4588++ { + yyj4597 := 0 + for ; !r.CheckBreak(); yyj4597++ { - if yyj4588 >= len(yyv4588) { - yyv4588 = append(yyv4588, Node{}) // var yyz4588 Node - yyc4588 = true + if yyj4597 >= len(yyv4597) { + yyv4597 = append(yyv4597, Node{}) // var yyz4597 Node + yyc4597 = true } - yyh4588.ElemContainerState(yyj4588) - if yyj4588 < len(yyv4588) { + yyh4597.ElemContainerState(yyj4597) + if yyj4597 < len(yyv4597) { if r.TryDecodeAsNil() { - yyv4588[yyj4588] = Node{} + yyv4597[yyj4597] = Node{} } else { - yyv4591 := &yyv4588[yyj4588] - yyv4591.CodecDecodeSelf(d) + yyv4600 := &yyv4597[yyj4597] + yyv4600.CodecDecodeSelf(d) } } else { @@ -58775,17 +58853,17 @@ func (x codecSelfer1234) decSliceNode(v *[]Node, d *codec1978.Decoder) { } } - if yyj4588 < len(yyv4588) { - yyv4588 = yyv4588[:yyj4588] - yyc4588 = true - } else if yyj4588 == 0 && yyv4588 == nil { - yyv4588 = []Node{} - yyc4588 = true + if yyj4597 < len(yyv4597) { + yyv4597 = yyv4597[:yyj4597] + yyc4597 = true + } else if yyj4597 == 0 && yyv4597 == nil { + yyv4597 = []Node{} + yyc4597 = true } } - yyh4588.End() - if yyc4588 { - *v = yyv4588 + yyh4597.End() + if yyc4597 { + *v = yyv4597 } } @@ -58794,9 +58872,9 @@ func (x codecSelfer1234) encSliceFinalizerName(v []FinalizerName, e *codec1978.E z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4592 := range v { + for _, yyv4601 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yyv4592.CodecEncodeSelf(e) + yyv4601.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58806,75 +58884,75 @@ func (x codecSelfer1234) decSliceFinalizerName(v *[]FinalizerName, d *codec1978. z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4593 := *v - yyh4593, yyl4593 := z.DecSliceHelperStart() - var yyc4593 bool - if yyl4593 == 0 { - if yyv4593 == nil { - yyv4593 = []FinalizerName{} - yyc4593 = true - } else if len(yyv4593) != 0 { - yyv4593 = yyv4593[:0] - yyc4593 = true + yyv4602 := *v + yyh4602, yyl4602 := z.DecSliceHelperStart() + var yyc4602 bool + if yyl4602 == 0 { + if yyv4602 == nil { + yyv4602 = []FinalizerName{} + yyc4602 = true + } else if len(yyv4602) != 0 { + yyv4602 = yyv4602[:0] + yyc4602 = true } - } else if yyl4593 > 0 { - var yyrr4593, yyrl4593 int - var yyrt4593 bool - if yyl4593 > cap(yyv4593) { + } else if yyl4602 > 0 { + var yyrr4602, yyrl4602 int + var yyrt4602 bool + if yyl4602 > cap(yyv4602) { - yyrl4593, yyrt4593 = z.DecInferLen(yyl4593, z.DecBasicHandle().MaxInitLen, 16) - if yyrt4593 { - if yyrl4593 <= cap(yyv4593) { - yyv4593 = yyv4593[:yyrl4593] + yyrl4602, yyrt4602 = z.DecInferLen(yyl4602, z.DecBasicHandle().MaxInitLen, 16) + if yyrt4602 { + if yyrl4602 <= cap(yyv4602) { + yyv4602 = yyv4602[:yyrl4602] } else { - yyv4593 = make([]FinalizerName, yyrl4593) + yyv4602 = make([]FinalizerName, yyrl4602) } } else { - yyv4593 = make([]FinalizerName, yyrl4593) + yyv4602 = make([]FinalizerName, yyrl4602) } - yyc4593 = true - yyrr4593 = len(yyv4593) - } else if yyl4593 != len(yyv4593) { - yyv4593 = yyv4593[:yyl4593] - yyc4593 = true + yyc4602 = true + yyrr4602 = len(yyv4602) + } else if yyl4602 != len(yyv4602) { + yyv4602 = yyv4602[:yyl4602] + yyc4602 = true } - yyj4593 := 0 - for ; yyj4593 < yyrr4593; yyj4593++ { - yyh4593.ElemContainerState(yyj4593) + yyj4602 := 0 + for ; yyj4602 < yyrr4602; yyj4602++ { + yyh4602.ElemContainerState(yyj4602) if r.TryDecodeAsNil() { - yyv4593[yyj4593] = "" + yyv4602[yyj4602] = "" } else { - yyv4593[yyj4593] = FinalizerName(r.DecodeString()) + yyv4602[yyj4602] = FinalizerName(r.DecodeString()) } } - if yyrt4593 { - for ; yyj4593 < yyl4593; yyj4593++ { - yyv4593 = append(yyv4593, "") - yyh4593.ElemContainerState(yyj4593) + if yyrt4602 { + for ; yyj4602 < yyl4602; yyj4602++ { + yyv4602 = append(yyv4602, "") + yyh4602.ElemContainerState(yyj4602) if r.TryDecodeAsNil() { - yyv4593[yyj4593] = "" + yyv4602[yyj4602] = "" } else { - yyv4593[yyj4593] = FinalizerName(r.DecodeString()) + yyv4602[yyj4602] = FinalizerName(r.DecodeString()) } } } } else { - yyj4593 := 0 - for ; !r.CheckBreak(); yyj4593++ { + yyj4602 := 0 + for ; !r.CheckBreak(); yyj4602++ { - if yyj4593 >= len(yyv4593) { - yyv4593 = append(yyv4593, "") // var yyz4593 FinalizerName - yyc4593 = true + if yyj4602 >= len(yyv4602) { + yyv4602 = append(yyv4602, "") // var yyz4602 FinalizerName + yyc4602 = true } - yyh4593.ElemContainerState(yyj4593) - if yyj4593 < len(yyv4593) { + yyh4602.ElemContainerState(yyj4602) + if yyj4602 < len(yyv4602) { if r.TryDecodeAsNil() { - yyv4593[yyj4593] = "" + yyv4602[yyj4602] = "" } else { - yyv4593[yyj4593] = FinalizerName(r.DecodeString()) + yyv4602[yyj4602] = FinalizerName(r.DecodeString()) } } else { @@ -58882,17 +58960,17 @@ func (x codecSelfer1234) decSliceFinalizerName(v *[]FinalizerName, d *codec1978. } } - if yyj4593 < len(yyv4593) { - yyv4593 = yyv4593[:yyj4593] - yyc4593 = true - } else if yyj4593 == 0 && yyv4593 == nil { - yyv4593 = []FinalizerName{} - yyc4593 = true + if yyj4602 < len(yyv4602) { + yyv4602 = yyv4602[:yyj4602] + yyc4602 = true + } else if yyj4602 == 0 && yyv4602 == nil { + yyv4602 = []FinalizerName{} + yyc4602 = true } } - yyh4593.End() - if yyc4593 { - *v = yyv4593 + yyh4602.End() + if yyc4602 { + *v = yyv4602 } } @@ -58901,10 +58979,10 @@ func (x codecSelfer1234) encSliceNamespace(v []Namespace, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4597 := range v { + for _, yyv4606 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4598 := &yyv4597 - yy4598.CodecEncodeSelf(e) + yy4607 := &yyv4606 + yy4607.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58914,83 +58992,83 @@ func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4599 := *v - yyh4599, yyl4599 := z.DecSliceHelperStart() - var yyc4599 bool - if yyl4599 == 0 { - if yyv4599 == nil { - yyv4599 = []Namespace{} - yyc4599 = true - } else if len(yyv4599) != 0 { - yyv4599 = yyv4599[:0] - yyc4599 = true + yyv4608 := *v + yyh4608, yyl4608 := z.DecSliceHelperStart() + var yyc4608 bool + if yyl4608 == 0 { + if yyv4608 == nil { + yyv4608 = []Namespace{} + yyc4608 = true + } else if len(yyv4608) != 0 { + yyv4608 = yyv4608[:0] + yyc4608 = true } - } else if yyl4599 > 0 { - var yyrr4599, yyrl4599 int - var yyrt4599 bool - if yyl4599 > cap(yyv4599) { + } else if yyl4608 > 0 { + var yyrr4608, yyrl4608 int + var yyrt4608 bool + if yyl4608 > cap(yyv4608) { - yyrg4599 := len(yyv4599) > 0 - yyv24599 := yyv4599 - yyrl4599, yyrt4599 = z.DecInferLen(yyl4599, z.DecBasicHandle().MaxInitLen, 280) - if yyrt4599 { - if yyrl4599 <= cap(yyv4599) { - yyv4599 = yyv4599[:yyrl4599] + yyrg4608 := len(yyv4608) > 0 + yyv24608 := yyv4608 + yyrl4608, yyrt4608 = z.DecInferLen(yyl4608, z.DecBasicHandle().MaxInitLen, 280) + if yyrt4608 { + if yyrl4608 <= cap(yyv4608) { + yyv4608 = yyv4608[:yyrl4608] } else { - yyv4599 = make([]Namespace, yyrl4599) + yyv4608 = make([]Namespace, yyrl4608) } } else { - yyv4599 = make([]Namespace, yyrl4599) + yyv4608 = make([]Namespace, yyrl4608) } - yyc4599 = true - yyrr4599 = len(yyv4599) - if yyrg4599 { - copy(yyv4599, yyv24599) + yyc4608 = true + yyrr4608 = len(yyv4608) + if yyrg4608 { + copy(yyv4608, yyv24608) } - } else if yyl4599 != len(yyv4599) { - yyv4599 = yyv4599[:yyl4599] - yyc4599 = true + } else if yyl4608 != len(yyv4608) { + yyv4608 = yyv4608[:yyl4608] + yyc4608 = true } - yyj4599 := 0 - for ; yyj4599 < yyrr4599; yyj4599++ { - yyh4599.ElemContainerState(yyj4599) + yyj4608 := 0 + for ; yyj4608 < yyrr4608; yyj4608++ { + yyh4608.ElemContainerState(yyj4608) if r.TryDecodeAsNil() { - yyv4599[yyj4599] = Namespace{} + yyv4608[yyj4608] = Namespace{} } else { - yyv4600 := &yyv4599[yyj4599] - yyv4600.CodecDecodeSelf(d) + yyv4609 := &yyv4608[yyj4608] + yyv4609.CodecDecodeSelf(d) } } - if yyrt4599 { - for ; yyj4599 < yyl4599; yyj4599++ { - yyv4599 = append(yyv4599, Namespace{}) - yyh4599.ElemContainerState(yyj4599) + if yyrt4608 { + for ; yyj4608 < yyl4608; yyj4608++ { + yyv4608 = append(yyv4608, Namespace{}) + yyh4608.ElemContainerState(yyj4608) if r.TryDecodeAsNil() { - yyv4599[yyj4599] = Namespace{} + yyv4608[yyj4608] = Namespace{} } else { - yyv4601 := &yyv4599[yyj4599] - yyv4601.CodecDecodeSelf(d) + yyv4610 := &yyv4608[yyj4608] + yyv4610.CodecDecodeSelf(d) } } } } else { - yyj4599 := 0 - for ; !r.CheckBreak(); yyj4599++ { + yyj4608 := 0 + for ; !r.CheckBreak(); yyj4608++ { - if yyj4599 >= len(yyv4599) { - yyv4599 = append(yyv4599, Namespace{}) // var yyz4599 Namespace - yyc4599 = true + if yyj4608 >= len(yyv4608) { + yyv4608 = append(yyv4608, Namespace{}) // var yyz4608 Namespace + yyc4608 = true } - yyh4599.ElemContainerState(yyj4599) - if yyj4599 < len(yyv4599) { + yyh4608.ElemContainerState(yyj4608) + if yyj4608 < len(yyv4608) { if r.TryDecodeAsNil() { - yyv4599[yyj4599] = Namespace{} + yyv4608[yyj4608] = Namespace{} } else { - yyv4602 := &yyv4599[yyj4599] - yyv4602.CodecDecodeSelf(d) + yyv4611 := &yyv4608[yyj4608] + yyv4611.CodecDecodeSelf(d) } } else { @@ -58998,17 +59076,17 @@ func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) } } - if yyj4599 < len(yyv4599) { - yyv4599 = yyv4599[:yyj4599] - yyc4599 = true - } else if yyj4599 == 0 && yyv4599 == nil { - yyv4599 = []Namespace{} - yyc4599 = true + if yyj4608 < len(yyv4608) { + yyv4608 = yyv4608[:yyj4608] + yyc4608 = true + } else if yyj4608 == 0 && yyv4608 == nil { + yyv4608 = []Namespace{} + yyc4608 = true } } - yyh4599.End() - if yyc4599 { - *v = yyv4599 + yyh4608.End() + if yyc4608 { + *v = yyv4608 } } @@ -59017,10 +59095,10 @@ func (x codecSelfer1234) encSliceEvent(v []Event, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4603 := range v { + for _, yyv4612 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4604 := &yyv4603 - yy4604.CodecEncodeSelf(e) + yy4613 := &yyv4612 + yy4613.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -59030,83 +59108,83 @@ func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4605 := *v - yyh4605, yyl4605 := z.DecSliceHelperStart() - var yyc4605 bool - if yyl4605 == 0 { - if yyv4605 == nil { - yyv4605 = []Event{} - yyc4605 = true - } else if len(yyv4605) != 0 { - yyv4605 = yyv4605[:0] - yyc4605 = true + yyv4614 := *v + yyh4614, yyl4614 := z.DecSliceHelperStart() + var yyc4614 bool + if yyl4614 == 0 { + if yyv4614 == nil { + yyv4614 = []Event{} + yyc4614 = true + } else if len(yyv4614) != 0 { + yyv4614 = yyv4614[:0] + yyc4614 = true } - } else if yyl4605 > 0 { - var yyrr4605, yyrl4605 int - var yyrt4605 bool - if yyl4605 > cap(yyv4605) { + } else if yyl4614 > 0 { + var yyrr4614, yyrl4614 int + var yyrt4614 bool + if yyl4614 > cap(yyv4614) { - yyrg4605 := len(yyv4605) > 0 - yyv24605 := yyv4605 - yyrl4605, yyrt4605 = z.DecInferLen(yyl4605, z.DecBasicHandle().MaxInitLen, 488) - if yyrt4605 { - if yyrl4605 <= cap(yyv4605) { - yyv4605 = yyv4605[:yyrl4605] + yyrg4614 := len(yyv4614) > 0 + yyv24614 := yyv4614 + yyrl4614, yyrt4614 = z.DecInferLen(yyl4614, z.DecBasicHandle().MaxInitLen, 488) + if yyrt4614 { + if yyrl4614 <= cap(yyv4614) { + yyv4614 = yyv4614[:yyrl4614] } else { - yyv4605 = make([]Event, yyrl4605) + yyv4614 = make([]Event, yyrl4614) } } else { - yyv4605 = make([]Event, yyrl4605) + yyv4614 = make([]Event, yyrl4614) } - yyc4605 = true - yyrr4605 = len(yyv4605) - if yyrg4605 { - copy(yyv4605, yyv24605) + yyc4614 = true + yyrr4614 = len(yyv4614) + if yyrg4614 { + copy(yyv4614, yyv24614) } - } else if yyl4605 != len(yyv4605) { - yyv4605 = yyv4605[:yyl4605] - yyc4605 = true + } else if yyl4614 != len(yyv4614) { + yyv4614 = yyv4614[:yyl4614] + yyc4614 = true } - yyj4605 := 0 - for ; yyj4605 < yyrr4605; yyj4605++ { - yyh4605.ElemContainerState(yyj4605) + yyj4614 := 0 + for ; yyj4614 < yyrr4614; yyj4614++ { + yyh4614.ElemContainerState(yyj4614) if r.TryDecodeAsNil() { - yyv4605[yyj4605] = Event{} + yyv4614[yyj4614] = Event{} } else { - yyv4606 := &yyv4605[yyj4605] - yyv4606.CodecDecodeSelf(d) + yyv4615 := &yyv4614[yyj4614] + yyv4615.CodecDecodeSelf(d) } } - if yyrt4605 { - for ; yyj4605 < yyl4605; yyj4605++ { - yyv4605 = append(yyv4605, Event{}) - yyh4605.ElemContainerState(yyj4605) + if yyrt4614 { + for ; yyj4614 < yyl4614; yyj4614++ { + yyv4614 = append(yyv4614, Event{}) + yyh4614.ElemContainerState(yyj4614) if r.TryDecodeAsNil() { - yyv4605[yyj4605] = Event{} + yyv4614[yyj4614] = Event{} } else { - yyv4607 := &yyv4605[yyj4605] - yyv4607.CodecDecodeSelf(d) + yyv4616 := &yyv4614[yyj4614] + yyv4616.CodecDecodeSelf(d) } } } } else { - yyj4605 := 0 - for ; !r.CheckBreak(); yyj4605++ { + yyj4614 := 0 + for ; !r.CheckBreak(); yyj4614++ { - if yyj4605 >= len(yyv4605) { - yyv4605 = append(yyv4605, Event{}) // var yyz4605 Event - yyc4605 = true + if yyj4614 >= len(yyv4614) { + yyv4614 = append(yyv4614, Event{}) // var yyz4614 Event + yyc4614 = true } - yyh4605.ElemContainerState(yyj4605) - if yyj4605 < len(yyv4605) { + yyh4614.ElemContainerState(yyj4614) + if yyj4614 < len(yyv4614) { if r.TryDecodeAsNil() { - yyv4605[yyj4605] = Event{} + yyv4614[yyj4614] = Event{} } else { - yyv4608 := &yyv4605[yyj4605] - yyv4608.CodecDecodeSelf(d) + yyv4617 := &yyv4614[yyj4614] + yyv4617.CodecDecodeSelf(d) } } else { @@ -59114,17 +59192,17 @@ func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) { } } - if yyj4605 < len(yyv4605) { - yyv4605 = yyv4605[:yyj4605] - yyc4605 = true - } else if yyj4605 == 0 && yyv4605 == nil { - yyv4605 = []Event{} - yyc4605 = true + if yyj4614 < len(yyv4614) { + yyv4614 = yyv4614[:yyj4614] + yyc4614 = true + } else if yyj4614 == 0 && yyv4614 == nil { + yyv4614 = []Event{} + yyc4614 = true } } - yyh4605.End() - if yyc4605 { - *v = yyv4605 + yyh4614.End() + if yyc4614 { + *v = yyv4614 } } @@ -59133,17 +59211,17 @@ func (x codecSelfer1234) encSliceruntime_Object(v []pkg7_runtime.Object, e *code z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4609 := range v { + for _, yyv4618 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyv4609 == nil { + if yyv4618 == nil { r.EncodeNil() } else { - yym4610 := z.EncBinary() - _ = yym4610 + yym4619 := z.EncBinary() + _ = yym4619 if false { - } else if z.HasExtensions() && z.EncExt(yyv4609) { + } else if z.HasExtensions() && z.EncExt(yyv4618) { } else { - z.EncFallback(yyv4609) + z.EncFallback(yyv4618) } } } @@ -59155,74 +59233,74 @@ func (x codecSelfer1234) decSliceruntime_Object(v *[]pkg7_runtime.Object, d *cod z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4611 := *v - yyh4611, yyl4611 := z.DecSliceHelperStart() - var yyc4611 bool - if yyl4611 == 0 { - if yyv4611 == nil { - yyv4611 = []pkg7_runtime.Object{} - yyc4611 = true - } else if len(yyv4611) != 0 { - yyv4611 = yyv4611[:0] - yyc4611 = true + yyv4620 := *v + yyh4620, yyl4620 := z.DecSliceHelperStart() + var yyc4620 bool + if yyl4620 == 0 { + if yyv4620 == nil { + yyv4620 = []pkg7_runtime.Object{} + yyc4620 = true + } else if len(yyv4620) != 0 { + yyv4620 = yyv4620[:0] + yyc4620 = true } - } else if yyl4611 > 0 { - var yyrr4611, yyrl4611 int - var yyrt4611 bool - if yyl4611 > cap(yyv4611) { + } else if yyl4620 > 0 { + var yyrr4620, yyrl4620 int + var yyrt4620 bool + if yyl4620 > cap(yyv4620) { - yyrg4611 := len(yyv4611) > 0 - yyv24611 := yyv4611 - yyrl4611, yyrt4611 = z.DecInferLen(yyl4611, z.DecBasicHandle().MaxInitLen, 16) - if yyrt4611 { - if yyrl4611 <= cap(yyv4611) { - yyv4611 = yyv4611[:yyrl4611] + yyrg4620 := len(yyv4620) > 0 + yyv24620 := yyv4620 + yyrl4620, yyrt4620 = z.DecInferLen(yyl4620, z.DecBasicHandle().MaxInitLen, 16) + if yyrt4620 { + if yyrl4620 <= cap(yyv4620) { + yyv4620 = yyv4620[:yyrl4620] } else { - yyv4611 = make([]pkg7_runtime.Object, yyrl4611) + yyv4620 = make([]pkg7_runtime.Object, yyrl4620) } } else { - yyv4611 = make([]pkg7_runtime.Object, yyrl4611) + yyv4620 = make([]pkg7_runtime.Object, yyrl4620) } - yyc4611 = true - yyrr4611 = len(yyv4611) - if yyrg4611 { - copy(yyv4611, yyv24611) + yyc4620 = true + yyrr4620 = len(yyv4620) + if yyrg4620 { + copy(yyv4620, yyv24620) } - } else if yyl4611 != len(yyv4611) { - yyv4611 = yyv4611[:yyl4611] - yyc4611 = true + } else if yyl4620 != len(yyv4620) { + yyv4620 = yyv4620[:yyl4620] + yyc4620 = true } - yyj4611 := 0 - for ; yyj4611 < yyrr4611; yyj4611++ { - yyh4611.ElemContainerState(yyj4611) + yyj4620 := 0 + for ; yyj4620 < yyrr4620; yyj4620++ { + yyh4620.ElemContainerState(yyj4620) if r.TryDecodeAsNil() { - yyv4611[yyj4611] = nil + yyv4620[yyj4620] = nil } else { - yyv4612 := &yyv4611[yyj4611] - yym4613 := z.DecBinary() - _ = yym4613 + yyv4621 := &yyv4620[yyj4620] + yym4622 := z.DecBinary() + _ = yym4622 if false { - } else if z.HasExtensions() && z.DecExt(yyv4612) { + } else if z.HasExtensions() && z.DecExt(yyv4621) { } else { - z.DecFallback(yyv4612, true) + z.DecFallback(yyv4621, true) } } } - if yyrt4611 { - for ; yyj4611 < yyl4611; yyj4611++ { - yyv4611 = append(yyv4611, nil) - yyh4611.ElemContainerState(yyj4611) + if yyrt4620 { + for ; yyj4620 < yyl4620; yyj4620++ { + yyv4620 = append(yyv4620, nil) + yyh4620.ElemContainerState(yyj4620) if r.TryDecodeAsNil() { - yyv4611[yyj4611] = nil + yyv4620[yyj4620] = nil } else { - yyv4614 := &yyv4611[yyj4611] - yym4615 := z.DecBinary() - _ = yym4615 + yyv4623 := &yyv4620[yyj4620] + yym4624 := z.DecBinary() + _ = yym4624 if false { - } else if z.HasExtensions() && z.DecExt(yyv4614) { + } else if z.HasExtensions() && z.DecExt(yyv4623) { } else { - z.DecFallback(yyv4614, true) + z.DecFallback(yyv4623, true) } } @@ -59230,25 +59308,25 @@ func (x codecSelfer1234) decSliceruntime_Object(v *[]pkg7_runtime.Object, d *cod } } else { - yyj4611 := 0 - for ; !r.CheckBreak(); yyj4611++ { + yyj4620 := 0 + for ; !r.CheckBreak(); yyj4620++ { - if yyj4611 >= len(yyv4611) { - yyv4611 = append(yyv4611, nil) // var yyz4611 pkg7_runtime.Object - yyc4611 = true + if yyj4620 >= len(yyv4620) { + yyv4620 = append(yyv4620, nil) // var yyz4620 pkg7_runtime.Object + yyc4620 = true } - yyh4611.ElemContainerState(yyj4611) - if yyj4611 < len(yyv4611) { + yyh4620.ElemContainerState(yyj4620) + if yyj4620 < len(yyv4620) { if r.TryDecodeAsNil() { - yyv4611[yyj4611] = nil + yyv4620[yyj4620] = nil } else { - yyv4616 := &yyv4611[yyj4611] - yym4617 := z.DecBinary() - _ = yym4617 + yyv4625 := &yyv4620[yyj4620] + yym4626 := z.DecBinary() + _ = yym4626 if false { - } else if z.HasExtensions() && z.DecExt(yyv4616) { + } else if z.HasExtensions() && z.DecExt(yyv4625) { } else { - z.DecFallback(yyv4616, true) + z.DecFallback(yyv4625, true) } } @@ -59257,17 +59335,17 @@ func (x codecSelfer1234) decSliceruntime_Object(v *[]pkg7_runtime.Object, d *cod } } - if yyj4611 < len(yyv4611) { - yyv4611 = yyv4611[:yyj4611] - yyc4611 = true - } else if yyj4611 == 0 && yyv4611 == nil { - yyv4611 = []pkg7_runtime.Object{} - yyc4611 = true + if yyj4620 < len(yyv4620) { + yyv4620 = yyv4620[:yyj4620] + yyc4620 = true + } else if yyj4620 == 0 && yyv4620 == nil { + yyv4620 = []pkg7_runtime.Object{} + yyc4620 = true } } - yyh4611.End() - if yyc4611 { - *v = yyv4611 + yyh4620.End() + if yyc4620 { + *v = yyv4620 } } @@ -59276,10 +59354,10 @@ func (x codecSelfer1234) encSliceLimitRangeItem(v []LimitRangeItem, e *codec1978 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4618 := range v { + for _, yyv4627 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4619 := &yyv4618 - yy4619.CodecEncodeSelf(e) + yy4628 := &yyv4627 + yy4628.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -59289,83 +59367,83 @@ func (x codecSelfer1234) decSliceLimitRangeItem(v *[]LimitRangeItem, d *codec197 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4620 := *v - yyh4620, yyl4620 := z.DecSliceHelperStart() - var yyc4620 bool - if yyl4620 == 0 { - if yyv4620 == nil { - yyv4620 = []LimitRangeItem{} - yyc4620 = true - } else if len(yyv4620) != 0 { - yyv4620 = yyv4620[:0] - yyc4620 = true + yyv4629 := *v + yyh4629, yyl4629 := z.DecSliceHelperStart() + var yyc4629 bool + if yyl4629 == 0 { + if yyv4629 == nil { + yyv4629 = []LimitRangeItem{} + yyc4629 = true + } else if len(yyv4629) != 0 { + yyv4629 = yyv4629[:0] + yyc4629 = true } - } else if yyl4620 > 0 { - var yyrr4620, yyrl4620 int - var yyrt4620 bool - if yyl4620 > cap(yyv4620) { + } else if yyl4629 > 0 { + var yyrr4629, yyrl4629 int + var yyrt4629 bool + if yyl4629 > cap(yyv4629) { - yyrg4620 := len(yyv4620) > 0 - yyv24620 := yyv4620 - yyrl4620, yyrt4620 = z.DecInferLen(yyl4620, z.DecBasicHandle().MaxInitLen, 56) - if yyrt4620 { - if yyrl4620 <= cap(yyv4620) { - yyv4620 = yyv4620[:yyrl4620] + yyrg4629 := len(yyv4629) > 0 + yyv24629 := yyv4629 + yyrl4629, yyrt4629 = z.DecInferLen(yyl4629, z.DecBasicHandle().MaxInitLen, 56) + if yyrt4629 { + if yyrl4629 <= cap(yyv4629) { + yyv4629 = yyv4629[:yyrl4629] } else { - yyv4620 = make([]LimitRangeItem, yyrl4620) + yyv4629 = make([]LimitRangeItem, yyrl4629) } } else { - yyv4620 = make([]LimitRangeItem, yyrl4620) + yyv4629 = make([]LimitRangeItem, yyrl4629) } - yyc4620 = true - yyrr4620 = len(yyv4620) - if yyrg4620 { - copy(yyv4620, yyv24620) + yyc4629 = true + yyrr4629 = len(yyv4629) + if yyrg4629 { + copy(yyv4629, yyv24629) } - } else if yyl4620 != len(yyv4620) { - yyv4620 = yyv4620[:yyl4620] - yyc4620 = true + } else if yyl4629 != len(yyv4629) { + yyv4629 = yyv4629[:yyl4629] + yyc4629 = true } - yyj4620 := 0 - for ; yyj4620 < yyrr4620; yyj4620++ { - yyh4620.ElemContainerState(yyj4620) + yyj4629 := 0 + for ; yyj4629 < yyrr4629; yyj4629++ { + yyh4629.ElemContainerState(yyj4629) if r.TryDecodeAsNil() { - yyv4620[yyj4620] = LimitRangeItem{} + yyv4629[yyj4629] = LimitRangeItem{} } else { - yyv4621 := &yyv4620[yyj4620] - yyv4621.CodecDecodeSelf(d) + yyv4630 := &yyv4629[yyj4629] + yyv4630.CodecDecodeSelf(d) } } - if yyrt4620 { - for ; yyj4620 < yyl4620; yyj4620++ { - yyv4620 = append(yyv4620, LimitRangeItem{}) - yyh4620.ElemContainerState(yyj4620) + if yyrt4629 { + for ; yyj4629 < yyl4629; yyj4629++ { + yyv4629 = append(yyv4629, LimitRangeItem{}) + yyh4629.ElemContainerState(yyj4629) if r.TryDecodeAsNil() { - yyv4620[yyj4620] = LimitRangeItem{} + yyv4629[yyj4629] = LimitRangeItem{} } else { - yyv4622 := &yyv4620[yyj4620] - yyv4622.CodecDecodeSelf(d) + yyv4631 := &yyv4629[yyj4629] + yyv4631.CodecDecodeSelf(d) } } } } else { - yyj4620 := 0 - for ; !r.CheckBreak(); yyj4620++ { + yyj4629 := 0 + for ; !r.CheckBreak(); yyj4629++ { - if yyj4620 >= len(yyv4620) { - yyv4620 = append(yyv4620, LimitRangeItem{}) // var yyz4620 LimitRangeItem - yyc4620 = true + if yyj4629 >= len(yyv4629) { + yyv4629 = append(yyv4629, LimitRangeItem{}) // var yyz4629 LimitRangeItem + yyc4629 = true } - yyh4620.ElemContainerState(yyj4620) - if yyj4620 < len(yyv4620) { + yyh4629.ElemContainerState(yyj4629) + if yyj4629 < len(yyv4629) { if r.TryDecodeAsNil() { - yyv4620[yyj4620] = LimitRangeItem{} + yyv4629[yyj4629] = LimitRangeItem{} } else { - yyv4623 := &yyv4620[yyj4620] - yyv4623.CodecDecodeSelf(d) + yyv4632 := &yyv4629[yyj4629] + yyv4632.CodecDecodeSelf(d) } } else { @@ -59373,17 +59451,17 @@ func (x codecSelfer1234) decSliceLimitRangeItem(v *[]LimitRangeItem, d *codec197 } } - if yyj4620 < len(yyv4620) { - yyv4620 = yyv4620[:yyj4620] - yyc4620 = true - } else if yyj4620 == 0 && yyv4620 == nil { - yyv4620 = []LimitRangeItem{} - yyc4620 = true + if yyj4629 < len(yyv4629) { + yyv4629 = yyv4629[:yyj4629] + yyc4629 = true + } else if yyj4629 == 0 && yyv4629 == nil { + yyv4629 = []LimitRangeItem{} + yyc4629 = true } } - yyh4620.End() - if yyc4620 { - *v = yyv4620 + yyh4629.End() + if yyc4629 { + *v = yyv4629 } } @@ -59392,10 +59470,10 @@ func (x codecSelfer1234) encSliceLimitRange(v []LimitRange, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4624 := range v { + for _, yyv4633 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4625 := &yyv4624 - yy4625.CodecEncodeSelf(e) + yy4634 := &yyv4633 + yy4634.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -59405,83 +59483,83 @@ func (x codecSelfer1234) decSliceLimitRange(v *[]LimitRange, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4626 := *v - yyh4626, yyl4626 := z.DecSliceHelperStart() - var yyc4626 bool - if yyl4626 == 0 { - if yyv4626 == nil { - yyv4626 = []LimitRange{} - yyc4626 = true - } else if len(yyv4626) != 0 { - yyv4626 = yyv4626[:0] - yyc4626 = true + yyv4635 := *v + yyh4635, yyl4635 := z.DecSliceHelperStart() + var yyc4635 bool + if yyl4635 == 0 { + if yyv4635 == nil { + yyv4635 = []LimitRange{} + yyc4635 = true + } else if len(yyv4635) != 0 { + yyv4635 = yyv4635[:0] + yyc4635 = true } - } else if yyl4626 > 0 { - var yyrr4626, yyrl4626 int - var yyrt4626 bool - if yyl4626 > cap(yyv4626) { + } else if yyl4635 > 0 { + var yyrr4635, yyrl4635 int + var yyrt4635 bool + if yyl4635 > cap(yyv4635) { - yyrg4626 := len(yyv4626) > 0 - yyv24626 := yyv4626 - yyrl4626, yyrt4626 = z.DecInferLen(yyl4626, z.DecBasicHandle().MaxInitLen, 264) - if yyrt4626 { - if yyrl4626 <= cap(yyv4626) { - yyv4626 = yyv4626[:yyrl4626] + yyrg4635 := len(yyv4635) > 0 + yyv24635 := yyv4635 + yyrl4635, yyrt4635 = z.DecInferLen(yyl4635, z.DecBasicHandle().MaxInitLen, 264) + if yyrt4635 { + if yyrl4635 <= cap(yyv4635) { + yyv4635 = yyv4635[:yyrl4635] } else { - yyv4626 = make([]LimitRange, yyrl4626) + yyv4635 = make([]LimitRange, yyrl4635) } } else { - yyv4626 = make([]LimitRange, yyrl4626) + yyv4635 = make([]LimitRange, yyrl4635) } - yyc4626 = true - yyrr4626 = len(yyv4626) - if yyrg4626 { - copy(yyv4626, yyv24626) + yyc4635 = true + yyrr4635 = len(yyv4635) + if yyrg4635 { + copy(yyv4635, yyv24635) } - } else if yyl4626 != len(yyv4626) { - yyv4626 = yyv4626[:yyl4626] - yyc4626 = true + } else if yyl4635 != len(yyv4635) { + yyv4635 = yyv4635[:yyl4635] + yyc4635 = true } - yyj4626 := 0 - for ; yyj4626 < yyrr4626; yyj4626++ { - yyh4626.ElemContainerState(yyj4626) + yyj4635 := 0 + for ; yyj4635 < yyrr4635; yyj4635++ { + yyh4635.ElemContainerState(yyj4635) if r.TryDecodeAsNil() { - yyv4626[yyj4626] = LimitRange{} + yyv4635[yyj4635] = LimitRange{} } else { - yyv4627 := &yyv4626[yyj4626] - yyv4627.CodecDecodeSelf(d) + yyv4636 := &yyv4635[yyj4635] + yyv4636.CodecDecodeSelf(d) } } - if yyrt4626 { - for ; yyj4626 < yyl4626; yyj4626++ { - yyv4626 = append(yyv4626, LimitRange{}) - yyh4626.ElemContainerState(yyj4626) + if yyrt4635 { + for ; yyj4635 < yyl4635; yyj4635++ { + yyv4635 = append(yyv4635, LimitRange{}) + yyh4635.ElemContainerState(yyj4635) if r.TryDecodeAsNil() { - yyv4626[yyj4626] = LimitRange{} + yyv4635[yyj4635] = LimitRange{} } else { - yyv4628 := &yyv4626[yyj4626] - yyv4628.CodecDecodeSelf(d) + yyv4637 := &yyv4635[yyj4635] + yyv4637.CodecDecodeSelf(d) } } } } else { - yyj4626 := 0 - for ; !r.CheckBreak(); yyj4626++ { + yyj4635 := 0 + for ; !r.CheckBreak(); yyj4635++ { - if yyj4626 >= len(yyv4626) { - yyv4626 = append(yyv4626, LimitRange{}) // var yyz4626 LimitRange - yyc4626 = true + if yyj4635 >= len(yyv4635) { + yyv4635 = append(yyv4635, LimitRange{}) // var yyz4635 LimitRange + yyc4635 = true } - yyh4626.ElemContainerState(yyj4626) - if yyj4626 < len(yyv4626) { + yyh4635.ElemContainerState(yyj4635) + if yyj4635 < len(yyv4635) { if r.TryDecodeAsNil() { - yyv4626[yyj4626] = LimitRange{} + yyv4635[yyj4635] = LimitRange{} } else { - yyv4629 := &yyv4626[yyj4626] - yyv4629.CodecDecodeSelf(d) + yyv4638 := &yyv4635[yyj4635] + yyv4638.CodecDecodeSelf(d) } } else { @@ -59489,17 +59567,17 @@ func (x codecSelfer1234) decSliceLimitRange(v *[]LimitRange, d *codec1978.Decode } } - if yyj4626 < len(yyv4626) { - yyv4626 = yyv4626[:yyj4626] - yyc4626 = true - } else if yyj4626 == 0 && yyv4626 == nil { - yyv4626 = []LimitRange{} - yyc4626 = true + if yyj4635 < len(yyv4635) { + yyv4635 = yyv4635[:yyj4635] + yyc4635 = true + } else if yyj4635 == 0 && yyv4635 == nil { + yyv4635 = []LimitRange{} + yyc4635 = true } } - yyh4626.End() - if yyc4626 { - *v = yyv4626 + yyh4635.End() + if yyc4635 { + *v = yyv4635 } } @@ -59508,9 +59586,9 @@ func (x codecSelfer1234) encSliceResourceQuotaScope(v []ResourceQuotaScope, e *c z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4630 := range v { + for _, yyv4639 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yyv4630.CodecEncodeSelf(e) + yyv4639.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -59520,75 +59598,75 @@ func (x codecSelfer1234) decSliceResourceQuotaScope(v *[]ResourceQuotaScope, d * z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4631 := *v - yyh4631, yyl4631 := z.DecSliceHelperStart() - var yyc4631 bool - if yyl4631 == 0 { - if yyv4631 == nil { - yyv4631 = []ResourceQuotaScope{} - yyc4631 = true - } else if len(yyv4631) != 0 { - yyv4631 = yyv4631[:0] - yyc4631 = true + yyv4640 := *v + yyh4640, yyl4640 := z.DecSliceHelperStart() + var yyc4640 bool + if yyl4640 == 0 { + if yyv4640 == nil { + yyv4640 = []ResourceQuotaScope{} + yyc4640 = true + } else if len(yyv4640) != 0 { + yyv4640 = yyv4640[:0] + yyc4640 = true } - } else if yyl4631 > 0 { - var yyrr4631, yyrl4631 int - var yyrt4631 bool - if yyl4631 > cap(yyv4631) { + } else if yyl4640 > 0 { + var yyrr4640, yyrl4640 int + var yyrt4640 bool + if yyl4640 > cap(yyv4640) { - yyrl4631, yyrt4631 = z.DecInferLen(yyl4631, z.DecBasicHandle().MaxInitLen, 16) - if yyrt4631 { - if yyrl4631 <= cap(yyv4631) { - yyv4631 = yyv4631[:yyrl4631] + yyrl4640, yyrt4640 = z.DecInferLen(yyl4640, z.DecBasicHandle().MaxInitLen, 16) + if yyrt4640 { + if yyrl4640 <= cap(yyv4640) { + yyv4640 = yyv4640[:yyrl4640] } else { - yyv4631 = make([]ResourceQuotaScope, yyrl4631) + yyv4640 = make([]ResourceQuotaScope, yyrl4640) } } else { - yyv4631 = make([]ResourceQuotaScope, yyrl4631) + yyv4640 = make([]ResourceQuotaScope, yyrl4640) } - yyc4631 = true - yyrr4631 = len(yyv4631) - } else if yyl4631 != len(yyv4631) { - yyv4631 = yyv4631[:yyl4631] - yyc4631 = true + yyc4640 = true + yyrr4640 = len(yyv4640) + } else if yyl4640 != len(yyv4640) { + yyv4640 = yyv4640[:yyl4640] + yyc4640 = true } - yyj4631 := 0 - for ; yyj4631 < yyrr4631; yyj4631++ { - yyh4631.ElemContainerState(yyj4631) + yyj4640 := 0 + for ; yyj4640 < yyrr4640; yyj4640++ { + yyh4640.ElemContainerState(yyj4640) if r.TryDecodeAsNil() { - yyv4631[yyj4631] = "" + yyv4640[yyj4640] = "" } else { - yyv4631[yyj4631] = ResourceQuotaScope(r.DecodeString()) + yyv4640[yyj4640] = ResourceQuotaScope(r.DecodeString()) } } - if yyrt4631 { - for ; yyj4631 < yyl4631; yyj4631++ { - yyv4631 = append(yyv4631, "") - yyh4631.ElemContainerState(yyj4631) + if yyrt4640 { + for ; yyj4640 < yyl4640; yyj4640++ { + yyv4640 = append(yyv4640, "") + yyh4640.ElemContainerState(yyj4640) if r.TryDecodeAsNil() { - yyv4631[yyj4631] = "" + yyv4640[yyj4640] = "" } else { - yyv4631[yyj4631] = ResourceQuotaScope(r.DecodeString()) + yyv4640[yyj4640] = ResourceQuotaScope(r.DecodeString()) } } } } else { - yyj4631 := 0 - for ; !r.CheckBreak(); yyj4631++ { + yyj4640 := 0 + for ; !r.CheckBreak(); yyj4640++ { - if yyj4631 >= len(yyv4631) { - yyv4631 = append(yyv4631, "") // var yyz4631 ResourceQuotaScope - yyc4631 = true + if yyj4640 >= len(yyv4640) { + yyv4640 = append(yyv4640, "") // var yyz4640 ResourceQuotaScope + yyc4640 = true } - yyh4631.ElemContainerState(yyj4631) - if yyj4631 < len(yyv4631) { + yyh4640.ElemContainerState(yyj4640) + if yyj4640 < len(yyv4640) { if r.TryDecodeAsNil() { - yyv4631[yyj4631] = "" + yyv4640[yyj4640] = "" } else { - yyv4631[yyj4631] = ResourceQuotaScope(r.DecodeString()) + yyv4640[yyj4640] = ResourceQuotaScope(r.DecodeString()) } } else { @@ -59596,17 +59674,17 @@ func (x codecSelfer1234) decSliceResourceQuotaScope(v *[]ResourceQuotaScope, d * } } - if yyj4631 < len(yyv4631) { - yyv4631 = yyv4631[:yyj4631] - yyc4631 = true - } else if yyj4631 == 0 && yyv4631 == nil { - yyv4631 = []ResourceQuotaScope{} - yyc4631 = true + if yyj4640 < len(yyv4640) { + yyv4640 = yyv4640[:yyj4640] + yyc4640 = true + } else if yyj4640 == 0 && yyv4640 == nil { + yyv4640 = []ResourceQuotaScope{} + yyc4640 = true } } - yyh4631.End() - if yyc4631 { - *v = yyv4631 + yyh4640.End() + if yyc4640 { + *v = yyv4640 } } @@ -59615,10 +59693,10 @@ func (x codecSelfer1234) encSliceResourceQuota(v []ResourceQuota, e *codec1978.E z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4635 := range v { + for _, yyv4644 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4636 := &yyv4635 - yy4636.CodecEncodeSelf(e) + yy4645 := &yyv4644 + yy4645.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -59628,83 +59706,83 @@ func (x codecSelfer1234) decSliceResourceQuota(v *[]ResourceQuota, d *codec1978. z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4637 := *v - yyh4637, yyl4637 := z.DecSliceHelperStart() - var yyc4637 bool - if yyl4637 == 0 { - if yyv4637 == nil { - yyv4637 = []ResourceQuota{} - yyc4637 = true - } else if len(yyv4637) != 0 { - yyv4637 = yyv4637[:0] - yyc4637 = true + yyv4646 := *v + yyh4646, yyl4646 := z.DecSliceHelperStart() + var yyc4646 bool + if yyl4646 == 0 { + if yyv4646 == nil { + yyv4646 = []ResourceQuota{} + yyc4646 = true + } else if len(yyv4646) != 0 { + yyv4646 = yyv4646[:0] + yyc4646 = true } - } else if yyl4637 > 0 { - var yyrr4637, yyrl4637 int - var yyrt4637 bool - if yyl4637 > cap(yyv4637) { + } else if yyl4646 > 0 { + var yyrr4646, yyrl4646 int + var yyrt4646 bool + if yyl4646 > cap(yyv4646) { - yyrg4637 := len(yyv4637) > 0 - yyv24637 := yyv4637 - yyrl4637, yyrt4637 = z.DecInferLen(yyl4637, z.DecBasicHandle().MaxInitLen, 288) - if yyrt4637 { - if yyrl4637 <= cap(yyv4637) { - yyv4637 = yyv4637[:yyrl4637] + yyrg4646 := len(yyv4646) > 0 + yyv24646 := yyv4646 + yyrl4646, yyrt4646 = z.DecInferLen(yyl4646, z.DecBasicHandle().MaxInitLen, 288) + if yyrt4646 { + if yyrl4646 <= cap(yyv4646) { + yyv4646 = yyv4646[:yyrl4646] } else { - yyv4637 = make([]ResourceQuota, yyrl4637) + yyv4646 = make([]ResourceQuota, yyrl4646) } } else { - yyv4637 = make([]ResourceQuota, yyrl4637) + yyv4646 = make([]ResourceQuota, yyrl4646) } - yyc4637 = true - yyrr4637 = len(yyv4637) - if yyrg4637 { - copy(yyv4637, yyv24637) + yyc4646 = true + yyrr4646 = len(yyv4646) + if yyrg4646 { + copy(yyv4646, yyv24646) } - } else if yyl4637 != len(yyv4637) { - yyv4637 = yyv4637[:yyl4637] - yyc4637 = true + } else if yyl4646 != len(yyv4646) { + yyv4646 = yyv4646[:yyl4646] + yyc4646 = true } - yyj4637 := 0 - for ; yyj4637 < yyrr4637; yyj4637++ { - yyh4637.ElemContainerState(yyj4637) + yyj4646 := 0 + for ; yyj4646 < yyrr4646; yyj4646++ { + yyh4646.ElemContainerState(yyj4646) if r.TryDecodeAsNil() { - yyv4637[yyj4637] = ResourceQuota{} + yyv4646[yyj4646] = ResourceQuota{} } else { - yyv4638 := &yyv4637[yyj4637] - yyv4638.CodecDecodeSelf(d) + yyv4647 := &yyv4646[yyj4646] + yyv4647.CodecDecodeSelf(d) } } - if yyrt4637 { - for ; yyj4637 < yyl4637; yyj4637++ { - yyv4637 = append(yyv4637, ResourceQuota{}) - yyh4637.ElemContainerState(yyj4637) + if yyrt4646 { + for ; yyj4646 < yyl4646; yyj4646++ { + yyv4646 = append(yyv4646, ResourceQuota{}) + yyh4646.ElemContainerState(yyj4646) if r.TryDecodeAsNil() { - yyv4637[yyj4637] = ResourceQuota{} + yyv4646[yyj4646] = ResourceQuota{} } else { - yyv4639 := &yyv4637[yyj4637] - yyv4639.CodecDecodeSelf(d) + yyv4648 := &yyv4646[yyj4646] + yyv4648.CodecDecodeSelf(d) } } } } else { - yyj4637 := 0 - for ; !r.CheckBreak(); yyj4637++ { + yyj4646 := 0 + for ; !r.CheckBreak(); yyj4646++ { - if yyj4637 >= len(yyv4637) { - yyv4637 = append(yyv4637, ResourceQuota{}) // var yyz4637 ResourceQuota - yyc4637 = true + if yyj4646 >= len(yyv4646) { + yyv4646 = append(yyv4646, ResourceQuota{}) // var yyz4646 ResourceQuota + yyc4646 = true } - yyh4637.ElemContainerState(yyj4637) - if yyj4637 < len(yyv4637) { + yyh4646.ElemContainerState(yyj4646) + if yyj4646 < len(yyv4646) { if r.TryDecodeAsNil() { - yyv4637[yyj4637] = ResourceQuota{} + yyv4646[yyj4646] = ResourceQuota{} } else { - yyv4640 := &yyv4637[yyj4637] - yyv4640.CodecDecodeSelf(d) + yyv4649 := &yyv4646[yyj4646] + yyv4649.CodecDecodeSelf(d) } } else { @@ -59712,17 +59790,17 @@ func (x codecSelfer1234) decSliceResourceQuota(v *[]ResourceQuota, d *codec1978. } } - if yyj4637 < len(yyv4637) { - yyv4637 = yyv4637[:yyj4637] - yyc4637 = true - } else if yyj4637 == 0 && yyv4637 == nil { - yyv4637 = []ResourceQuota{} - yyc4637 = true + if yyj4646 < len(yyv4646) { + yyv4646 = yyv4646[:yyj4646] + yyc4646 = true + } else if yyj4646 == 0 && yyv4646 == nil { + yyv4646 = []ResourceQuota{} + yyc4646 = true } } - yyh4637.End() - if yyc4637 { - *v = yyv4637 + yyh4646.End() + if yyc4646 { + *v = yyv4646 } } @@ -59731,23 +59809,23 @@ func (x codecSelfer1234) encMapstringSliceuint8(v map[string][]uint8, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeMapStart(len(v)) - for yyk4641, yyv4641 := range v { + for yyk4650, yyv4650 := range v { z.EncSendContainerState(codecSelfer_containerMapKey1234) - yym4642 := z.EncBinary() - _ = yym4642 + yym4651 := z.EncBinary() + _ = yym4651 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(yyk4641)) + r.EncodeString(codecSelferC_UTF81234, string(yyk4650)) } z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyv4641 == nil { + if yyv4650 == nil { r.EncodeNil() } else { - yym4643 := z.EncBinary() - _ = yym4643 + yym4652 := z.EncBinary() + _ = yym4652 if false { } else { - r.EncodeStringBytes(codecSelferC_RAW1234, []byte(yyv4641)) + r.EncodeStringBytes(codecSelferC_RAW1234, []byte(yyv4650)) } } } @@ -59759,80 +59837,80 @@ func (x codecSelfer1234) decMapstringSliceuint8(v *map[string][]uint8, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4644 := *v - yyl4644 := r.ReadMapStart() - yybh4644 := z.DecBasicHandle() - if yyv4644 == nil { - yyrl4644, _ := z.DecInferLen(yyl4644, yybh4644.MaxInitLen, 40) - yyv4644 = make(map[string][]uint8, yyrl4644) - *v = yyv4644 + yyv4653 := *v + yyl4653 := r.ReadMapStart() + yybh4653 := z.DecBasicHandle() + if yyv4653 == nil { + yyrl4653, _ := z.DecInferLen(yyl4653, yybh4653.MaxInitLen, 40) + yyv4653 = make(map[string][]uint8, yyrl4653) + *v = yyv4653 } - var yymk4644 string - var yymv4644 []uint8 - var yymg4644 bool - if yybh4644.MapValueReset { - yymg4644 = true + var yymk4653 string + var yymv4653 []uint8 + var yymg4653 bool + if yybh4653.MapValueReset { + yymg4653 = true } - if yyl4644 > 0 { - for yyj4644 := 0; yyj4644 < yyl4644; yyj4644++ { + if yyl4653 > 0 { + for yyj4653 := 0; yyj4653 < yyl4653; yyj4653++ { z.DecSendContainerState(codecSelfer_containerMapKey1234) if r.TryDecodeAsNil() { - yymk4644 = "" + yymk4653 = "" } else { - yymk4644 = string(r.DecodeString()) + yymk4653 = string(r.DecodeString()) } - if yymg4644 { - yymv4644 = yyv4644[yymk4644] + if yymg4653 { + yymv4653 = yyv4653[yymk4653] } else { - yymv4644 = nil + yymv4653 = nil } z.DecSendContainerState(codecSelfer_containerMapValue1234) if r.TryDecodeAsNil() { - yymv4644 = nil + yymv4653 = nil } else { - yyv4646 := &yymv4644 - yym4647 := z.DecBinary() - _ = yym4647 + yyv4655 := &yymv4653 + yym4656 := z.DecBinary() + _ = yym4656 if false { } else { - *yyv4646 = r.DecodeBytes(*(*[]byte)(yyv4646), false, false) + *yyv4655 = r.DecodeBytes(*(*[]byte)(yyv4655), false, false) } } - if yyv4644 != nil { - yyv4644[yymk4644] = yymv4644 + if yyv4653 != nil { + yyv4653[yymk4653] = yymv4653 } } - } else if yyl4644 < 0 { - for yyj4644 := 0; !r.CheckBreak(); yyj4644++ { + } else if yyl4653 < 0 { + for yyj4653 := 0; !r.CheckBreak(); yyj4653++ { z.DecSendContainerState(codecSelfer_containerMapKey1234) if r.TryDecodeAsNil() { - yymk4644 = "" + yymk4653 = "" } else { - yymk4644 = string(r.DecodeString()) + yymk4653 = string(r.DecodeString()) } - if yymg4644 { - yymv4644 = yyv4644[yymk4644] + if yymg4653 { + yymv4653 = yyv4653[yymk4653] } else { - yymv4644 = nil + yymv4653 = nil } z.DecSendContainerState(codecSelfer_containerMapValue1234) if r.TryDecodeAsNil() { - yymv4644 = nil + yymv4653 = nil } else { - yyv4649 := &yymv4644 - yym4650 := z.DecBinary() - _ = yym4650 + yyv4658 := &yymv4653 + yym4659 := z.DecBinary() + _ = yym4659 if false { } else { - *yyv4649 = r.DecodeBytes(*(*[]byte)(yyv4649), false, false) + *yyv4658 = r.DecodeBytes(*(*[]byte)(yyv4658), false, false) } } - if yyv4644 != nil { - yyv4644[yymk4644] = yymv4644 + if yyv4653 != nil { + yyv4653[yymk4653] = yymv4653 } } } // else len==0: TODO: Should we clear map entries? @@ -59844,10 +59922,10 @@ func (x codecSelfer1234) encSliceSecret(v []Secret, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4651 := range v { + for _, yyv4660 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4652 := &yyv4651 - yy4652.CodecEncodeSelf(e) + yy4661 := &yyv4660 + yy4661.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -59857,83 +59935,83 @@ func (x codecSelfer1234) decSliceSecret(v *[]Secret, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4653 := *v - yyh4653, yyl4653 := z.DecSliceHelperStart() - var yyc4653 bool - if yyl4653 == 0 { - if yyv4653 == nil { - yyv4653 = []Secret{} - yyc4653 = true - } else if len(yyv4653) != 0 { - yyv4653 = yyv4653[:0] - yyc4653 = true + yyv4662 := *v + yyh4662, yyl4662 := z.DecSliceHelperStart() + var yyc4662 bool + if yyl4662 == 0 { + if yyv4662 == nil { + yyv4662 = []Secret{} + yyc4662 = true + } else if len(yyv4662) != 0 { + yyv4662 = yyv4662[:0] + yyc4662 = true } - } else if yyl4653 > 0 { - var yyrr4653, yyrl4653 int - var yyrt4653 bool - if yyl4653 > cap(yyv4653) { + } else if yyl4662 > 0 { + var yyrr4662, yyrl4662 int + var yyrt4662 bool + if yyl4662 > cap(yyv4662) { - yyrg4653 := len(yyv4653) > 0 - yyv24653 := yyv4653 - yyrl4653, yyrt4653 = z.DecInferLen(yyl4653, z.DecBasicHandle().MaxInitLen, 264) - if yyrt4653 { - if yyrl4653 <= cap(yyv4653) { - yyv4653 = yyv4653[:yyrl4653] + yyrg4662 := len(yyv4662) > 0 + yyv24662 := yyv4662 + yyrl4662, yyrt4662 = z.DecInferLen(yyl4662, z.DecBasicHandle().MaxInitLen, 264) + if yyrt4662 { + if yyrl4662 <= cap(yyv4662) { + yyv4662 = yyv4662[:yyrl4662] } else { - yyv4653 = make([]Secret, yyrl4653) + yyv4662 = make([]Secret, yyrl4662) } } else { - yyv4653 = make([]Secret, yyrl4653) + yyv4662 = make([]Secret, yyrl4662) } - yyc4653 = true - yyrr4653 = len(yyv4653) - if yyrg4653 { - copy(yyv4653, yyv24653) + yyc4662 = true + yyrr4662 = len(yyv4662) + if yyrg4662 { + copy(yyv4662, yyv24662) } - } else if yyl4653 != len(yyv4653) { - yyv4653 = yyv4653[:yyl4653] - yyc4653 = true + } else if yyl4662 != len(yyv4662) { + yyv4662 = yyv4662[:yyl4662] + yyc4662 = true } - yyj4653 := 0 - for ; yyj4653 < yyrr4653; yyj4653++ { - yyh4653.ElemContainerState(yyj4653) + yyj4662 := 0 + for ; yyj4662 < yyrr4662; yyj4662++ { + yyh4662.ElemContainerState(yyj4662) if r.TryDecodeAsNil() { - yyv4653[yyj4653] = Secret{} + yyv4662[yyj4662] = Secret{} } else { - yyv4654 := &yyv4653[yyj4653] - yyv4654.CodecDecodeSelf(d) + yyv4663 := &yyv4662[yyj4662] + yyv4663.CodecDecodeSelf(d) } } - if yyrt4653 { - for ; yyj4653 < yyl4653; yyj4653++ { - yyv4653 = append(yyv4653, Secret{}) - yyh4653.ElemContainerState(yyj4653) + if yyrt4662 { + for ; yyj4662 < yyl4662; yyj4662++ { + yyv4662 = append(yyv4662, Secret{}) + yyh4662.ElemContainerState(yyj4662) if r.TryDecodeAsNil() { - yyv4653[yyj4653] = Secret{} + yyv4662[yyj4662] = Secret{} } else { - yyv4655 := &yyv4653[yyj4653] - yyv4655.CodecDecodeSelf(d) + yyv4664 := &yyv4662[yyj4662] + yyv4664.CodecDecodeSelf(d) } } } } else { - yyj4653 := 0 - for ; !r.CheckBreak(); yyj4653++ { + yyj4662 := 0 + for ; !r.CheckBreak(); yyj4662++ { - if yyj4653 >= len(yyv4653) { - yyv4653 = append(yyv4653, Secret{}) // var yyz4653 Secret - yyc4653 = true + if yyj4662 >= len(yyv4662) { + yyv4662 = append(yyv4662, Secret{}) // var yyz4662 Secret + yyc4662 = true } - yyh4653.ElemContainerState(yyj4653) - if yyj4653 < len(yyv4653) { + yyh4662.ElemContainerState(yyj4662) + if yyj4662 < len(yyv4662) { if r.TryDecodeAsNil() { - yyv4653[yyj4653] = Secret{} + yyv4662[yyj4662] = Secret{} } else { - yyv4656 := &yyv4653[yyj4653] - yyv4656.CodecDecodeSelf(d) + yyv4665 := &yyv4662[yyj4662] + yyv4665.CodecDecodeSelf(d) } } else { @@ -59941,17 +60019,17 @@ func (x codecSelfer1234) decSliceSecret(v *[]Secret, d *codec1978.Decoder) { } } - if yyj4653 < len(yyv4653) { - yyv4653 = yyv4653[:yyj4653] - yyc4653 = true - } else if yyj4653 == 0 && yyv4653 == nil { - yyv4653 = []Secret{} - yyc4653 = true + if yyj4662 < len(yyv4662) { + yyv4662 = yyv4662[:yyj4662] + yyc4662 = true + } else if yyj4662 == 0 && yyv4662 == nil { + yyv4662 = []Secret{} + yyc4662 = true } } - yyh4653.End() - if yyc4653 { - *v = yyv4653 + yyh4662.End() + if yyc4662 { + *v = yyv4662 } } @@ -59960,10 +60038,10 @@ func (x codecSelfer1234) encSliceConfigMap(v []ConfigMap, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4657 := range v { + for _, yyv4666 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4658 := &yyv4657 - yy4658.CodecEncodeSelf(e) + yy4667 := &yyv4666 + yy4667.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -59973,83 +60051,83 @@ func (x codecSelfer1234) decSliceConfigMap(v *[]ConfigMap, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4659 := *v - yyh4659, yyl4659 := z.DecSliceHelperStart() - var yyc4659 bool - if yyl4659 == 0 { - if yyv4659 == nil { - yyv4659 = []ConfigMap{} - yyc4659 = true - } else if len(yyv4659) != 0 { - yyv4659 = yyv4659[:0] - yyc4659 = true + yyv4668 := *v + yyh4668, yyl4668 := z.DecSliceHelperStart() + var yyc4668 bool + if yyl4668 == 0 { + if yyv4668 == nil { + yyv4668 = []ConfigMap{} + yyc4668 = true + } else if len(yyv4668) != 0 { + yyv4668 = yyv4668[:0] + yyc4668 = true } - } else if yyl4659 > 0 { - var yyrr4659, yyrl4659 int - var yyrt4659 bool - if yyl4659 > cap(yyv4659) { + } else if yyl4668 > 0 { + var yyrr4668, yyrl4668 int + var yyrt4668 bool + if yyl4668 > cap(yyv4668) { - yyrg4659 := len(yyv4659) > 0 - yyv24659 := yyv4659 - yyrl4659, yyrt4659 = z.DecInferLen(yyl4659, z.DecBasicHandle().MaxInitLen, 248) - if yyrt4659 { - if yyrl4659 <= cap(yyv4659) { - yyv4659 = yyv4659[:yyrl4659] + yyrg4668 := len(yyv4668) > 0 + yyv24668 := yyv4668 + yyrl4668, yyrt4668 = z.DecInferLen(yyl4668, z.DecBasicHandle().MaxInitLen, 248) + if yyrt4668 { + if yyrl4668 <= cap(yyv4668) { + yyv4668 = yyv4668[:yyrl4668] } else { - yyv4659 = make([]ConfigMap, yyrl4659) + yyv4668 = make([]ConfigMap, yyrl4668) } } else { - yyv4659 = make([]ConfigMap, yyrl4659) + yyv4668 = make([]ConfigMap, yyrl4668) } - yyc4659 = true - yyrr4659 = len(yyv4659) - if yyrg4659 { - copy(yyv4659, yyv24659) + yyc4668 = true + yyrr4668 = len(yyv4668) + if yyrg4668 { + copy(yyv4668, yyv24668) } - } else if yyl4659 != len(yyv4659) { - yyv4659 = yyv4659[:yyl4659] - yyc4659 = true + } else if yyl4668 != len(yyv4668) { + yyv4668 = yyv4668[:yyl4668] + yyc4668 = true } - yyj4659 := 0 - for ; yyj4659 < yyrr4659; yyj4659++ { - yyh4659.ElemContainerState(yyj4659) + yyj4668 := 0 + for ; yyj4668 < yyrr4668; yyj4668++ { + yyh4668.ElemContainerState(yyj4668) if r.TryDecodeAsNil() { - yyv4659[yyj4659] = ConfigMap{} + yyv4668[yyj4668] = ConfigMap{} } else { - yyv4660 := &yyv4659[yyj4659] - yyv4660.CodecDecodeSelf(d) + yyv4669 := &yyv4668[yyj4668] + yyv4669.CodecDecodeSelf(d) } } - if yyrt4659 { - for ; yyj4659 < yyl4659; yyj4659++ { - yyv4659 = append(yyv4659, ConfigMap{}) - yyh4659.ElemContainerState(yyj4659) + if yyrt4668 { + for ; yyj4668 < yyl4668; yyj4668++ { + yyv4668 = append(yyv4668, ConfigMap{}) + yyh4668.ElemContainerState(yyj4668) if r.TryDecodeAsNil() { - yyv4659[yyj4659] = ConfigMap{} + yyv4668[yyj4668] = ConfigMap{} } else { - yyv4661 := &yyv4659[yyj4659] - yyv4661.CodecDecodeSelf(d) + yyv4670 := &yyv4668[yyj4668] + yyv4670.CodecDecodeSelf(d) } } } } else { - yyj4659 := 0 - for ; !r.CheckBreak(); yyj4659++ { + yyj4668 := 0 + for ; !r.CheckBreak(); yyj4668++ { - if yyj4659 >= len(yyv4659) { - yyv4659 = append(yyv4659, ConfigMap{}) // var yyz4659 ConfigMap - yyc4659 = true + if yyj4668 >= len(yyv4668) { + yyv4668 = append(yyv4668, ConfigMap{}) // var yyz4668 ConfigMap + yyc4668 = true } - yyh4659.ElemContainerState(yyj4659) - if yyj4659 < len(yyv4659) { + yyh4668.ElemContainerState(yyj4668) + if yyj4668 < len(yyv4668) { if r.TryDecodeAsNil() { - yyv4659[yyj4659] = ConfigMap{} + yyv4668[yyj4668] = ConfigMap{} } else { - yyv4662 := &yyv4659[yyj4659] - yyv4662.CodecDecodeSelf(d) + yyv4671 := &yyv4668[yyj4668] + yyv4671.CodecDecodeSelf(d) } } else { @@ -60057,17 +60135,17 @@ func (x codecSelfer1234) decSliceConfigMap(v *[]ConfigMap, d *codec1978.Decoder) } } - if yyj4659 < len(yyv4659) { - yyv4659 = yyv4659[:yyj4659] - yyc4659 = true - } else if yyj4659 == 0 && yyv4659 == nil { - yyv4659 = []ConfigMap{} - yyc4659 = true + if yyj4668 < len(yyv4668) { + yyv4668 = yyv4668[:yyj4668] + yyc4668 = true + } else if yyj4668 == 0 && yyv4668 == nil { + yyv4668 = []ConfigMap{} + yyc4668 = true } } - yyh4659.End() - if yyc4659 { - *v = yyv4659 + yyh4668.End() + if yyc4668 { + *v = yyv4668 } } @@ -60076,10 +60154,10 @@ func (x codecSelfer1234) encSliceComponentCondition(v []ComponentCondition, e *c z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4663 := range v { + for _, yyv4672 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4664 := &yyv4663 - yy4664.CodecEncodeSelf(e) + yy4673 := &yyv4672 + yy4673.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -60089,83 +60167,83 @@ func (x codecSelfer1234) decSliceComponentCondition(v *[]ComponentCondition, d * z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4665 := *v - yyh4665, yyl4665 := z.DecSliceHelperStart() - var yyc4665 bool - if yyl4665 == 0 { - if yyv4665 == nil { - yyv4665 = []ComponentCondition{} - yyc4665 = true - } else if len(yyv4665) != 0 { - yyv4665 = yyv4665[:0] - yyc4665 = true + yyv4674 := *v + yyh4674, yyl4674 := z.DecSliceHelperStart() + var yyc4674 bool + if yyl4674 == 0 { + if yyv4674 == nil { + yyv4674 = []ComponentCondition{} + yyc4674 = true + } else if len(yyv4674) != 0 { + yyv4674 = yyv4674[:0] + yyc4674 = true } - } else if yyl4665 > 0 { - var yyrr4665, yyrl4665 int - var yyrt4665 bool - if yyl4665 > cap(yyv4665) { + } else if yyl4674 > 0 { + var yyrr4674, yyrl4674 int + var yyrt4674 bool + if yyl4674 > cap(yyv4674) { - yyrg4665 := len(yyv4665) > 0 - yyv24665 := yyv4665 - yyrl4665, yyrt4665 = z.DecInferLen(yyl4665, z.DecBasicHandle().MaxInitLen, 64) - if yyrt4665 { - if yyrl4665 <= cap(yyv4665) { - yyv4665 = yyv4665[:yyrl4665] + yyrg4674 := len(yyv4674) > 0 + yyv24674 := yyv4674 + yyrl4674, yyrt4674 = z.DecInferLen(yyl4674, z.DecBasicHandle().MaxInitLen, 64) + if yyrt4674 { + if yyrl4674 <= cap(yyv4674) { + yyv4674 = yyv4674[:yyrl4674] } else { - yyv4665 = make([]ComponentCondition, yyrl4665) + yyv4674 = make([]ComponentCondition, yyrl4674) } } else { - yyv4665 = make([]ComponentCondition, yyrl4665) + yyv4674 = make([]ComponentCondition, yyrl4674) } - yyc4665 = true - yyrr4665 = len(yyv4665) - if yyrg4665 { - copy(yyv4665, yyv24665) + yyc4674 = true + yyrr4674 = len(yyv4674) + if yyrg4674 { + copy(yyv4674, yyv24674) } - } else if yyl4665 != len(yyv4665) { - yyv4665 = yyv4665[:yyl4665] - yyc4665 = true + } else if yyl4674 != len(yyv4674) { + yyv4674 = yyv4674[:yyl4674] + yyc4674 = true } - yyj4665 := 0 - for ; yyj4665 < yyrr4665; yyj4665++ { - yyh4665.ElemContainerState(yyj4665) + yyj4674 := 0 + for ; yyj4674 < yyrr4674; yyj4674++ { + yyh4674.ElemContainerState(yyj4674) if r.TryDecodeAsNil() { - yyv4665[yyj4665] = ComponentCondition{} + yyv4674[yyj4674] = ComponentCondition{} } else { - yyv4666 := &yyv4665[yyj4665] - yyv4666.CodecDecodeSelf(d) + yyv4675 := &yyv4674[yyj4674] + yyv4675.CodecDecodeSelf(d) } } - if yyrt4665 { - for ; yyj4665 < yyl4665; yyj4665++ { - yyv4665 = append(yyv4665, ComponentCondition{}) - yyh4665.ElemContainerState(yyj4665) + if yyrt4674 { + for ; yyj4674 < yyl4674; yyj4674++ { + yyv4674 = append(yyv4674, ComponentCondition{}) + yyh4674.ElemContainerState(yyj4674) if r.TryDecodeAsNil() { - yyv4665[yyj4665] = ComponentCondition{} + yyv4674[yyj4674] = ComponentCondition{} } else { - yyv4667 := &yyv4665[yyj4665] - yyv4667.CodecDecodeSelf(d) + yyv4676 := &yyv4674[yyj4674] + yyv4676.CodecDecodeSelf(d) } } } } else { - yyj4665 := 0 - for ; !r.CheckBreak(); yyj4665++ { + yyj4674 := 0 + for ; !r.CheckBreak(); yyj4674++ { - if yyj4665 >= len(yyv4665) { - yyv4665 = append(yyv4665, ComponentCondition{}) // var yyz4665 ComponentCondition - yyc4665 = true + if yyj4674 >= len(yyv4674) { + yyv4674 = append(yyv4674, ComponentCondition{}) // var yyz4674 ComponentCondition + yyc4674 = true } - yyh4665.ElemContainerState(yyj4665) - if yyj4665 < len(yyv4665) { + yyh4674.ElemContainerState(yyj4674) + if yyj4674 < len(yyv4674) { if r.TryDecodeAsNil() { - yyv4665[yyj4665] = ComponentCondition{} + yyv4674[yyj4674] = ComponentCondition{} } else { - yyv4668 := &yyv4665[yyj4665] - yyv4668.CodecDecodeSelf(d) + yyv4677 := &yyv4674[yyj4674] + yyv4677.CodecDecodeSelf(d) } } else { @@ -60173,17 +60251,17 @@ func (x codecSelfer1234) decSliceComponentCondition(v *[]ComponentCondition, d * } } - if yyj4665 < len(yyv4665) { - yyv4665 = yyv4665[:yyj4665] - yyc4665 = true - } else if yyj4665 == 0 && yyv4665 == nil { - yyv4665 = []ComponentCondition{} - yyc4665 = true + if yyj4674 < len(yyv4674) { + yyv4674 = yyv4674[:yyj4674] + yyc4674 = true + } else if yyj4674 == 0 && yyv4674 == nil { + yyv4674 = []ComponentCondition{} + yyc4674 = true } } - yyh4665.End() - if yyc4665 { - *v = yyv4665 + yyh4674.End() + if yyc4674 { + *v = yyv4674 } } @@ -60192,10 +60270,10 @@ func (x codecSelfer1234) encSliceComponentStatus(v []ComponentStatus, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4669 := range v { + for _, yyv4678 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4670 := &yyv4669 - yy4670.CodecEncodeSelf(e) + yy4679 := &yyv4678 + yy4679.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -60205,83 +60283,83 @@ func (x codecSelfer1234) decSliceComponentStatus(v *[]ComponentStatus, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4671 := *v - yyh4671, yyl4671 := z.DecSliceHelperStart() - var yyc4671 bool - if yyl4671 == 0 { - if yyv4671 == nil { - yyv4671 = []ComponentStatus{} - yyc4671 = true - } else if len(yyv4671) != 0 { - yyv4671 = yyv4671[:0] - yyc4671 = true + yyv4680 := *v + yyh4680, yyl4680 := z.DecSliceHelperStart() + var yyc4680 bool + if yyl4680 == 0 { + if yyv4680 == nil { + yyv4680 = []ComponentStatus{} + yyc4680 = true + } else if len(yyv4680) != 0 { + yyv4680 = yyv4680[:0] + yyc4680 = true } - } else if yyl4671 > 0 { - var yyrr4671, yyrl4671 int - var yyrt4671 bool - if yyl4671 > cap(yyv4671) { + } else if yyl4680 > 0 { + var yyrr4680, yyrl4680 int + var yyrt4680 bool + if yyl4680 > cap(yyv4680) { - yyrg4671 := len(yyv4671) > 0 - yyv24671 := yyv4671 - yyrl4671, yyrt4671 = z.DecInferLen(yyl4671, z.DecBasicHandle().MaxInitLen, 264) - if yyrt4671 { - if yyrl4671 <= cap(yyv4671) { - yyv4671 = yyv4671[:yyrl4671] + yyrg4680 := len(yyv4680) > 0 + yyv24680 := yyv4680 + yyrl4680, yyrt4680 = z.DecInferLen(yyl4680, z.DecBasicHandle().MaxInitLen, 264) + if yyrt4680 { + if yyrl4680 <= cap(yyv4680) { + yyv4680 = yyv4680[:yyrl4680] } else { - yyv4671 = make([]ComponentStatus, yyrl4671) + yyv4680 = make([]ComponentStatus, yyrl4680) } } else { - yyv4671 = make([]ComponentStatus, yyrl4671) + yyv4680 = make([]ComponentStatus, yyrl4680) } - yyc4671 = true - yyrr4671 = len(yyv4671) - if yyrg4671 { - copy(yyv4671, yyv24671) + yyc4680 = true + yyrr4680 = len(yyv4680) + if yyrg4680 { + copy(yyv4680, yyv24680) } - } else if yyl4671 != len(yyv4671) { - yyv4671 = yyv4671[:yyl4671] - yyc4671 = true + } else if yyl4680 != len(yyv4680) { + yyv4680 = yyv4680[:yyl4680] + yyc4680 = true } - yyj4671 := 0 - for ; yyj4671 < yyrr4671; yyj4671++ { - yyh4671.ElemContainerState(yyj4671) + yyj4680 := 0 + for ; yyj4680 < yyrr4680; yyj4680++ { + yyh4680.ElemContainerState(yyj4680) if r.TryDecodeAsNil() { - yyv4671[yyj4671] = ComponentStatus{} + yyv4680[yyj4680] = ComponentStatus{} } else { - yyv4672 := &yyv4671[yyj4671] - yyv4672.CodecDecodeSelf(d) + yyv4681 := &yyv4680[yyj4680] + yyv4681.CodecDecodeSelf(d) } } - if yyrt4671 { - for ; yyj4671 < yyl4671; yyj4671++ { - yyv4671 = append(yyv4671, ComponentStatus{}) - yyh4671.ElemContainerState(yyj4671) + if yyrt4680 { + for ; yyj4680 < yyl4680; yyj4680++ { + yyv4680 = append(yyv4680, ComponentStatus{}) + yyh4680.ElemContainerState(yyj4680) if r.TryDecodeAsNil() { - yyv4671[yyj4671] = ComponentStatus{} + yyv4680[yyj4680] = ComponentStatus{} } else { - yyv4673 := &yyv4671[yyj4671] - yyv4673.CodecDecodeSelf(d) + yyv4682 := &yyv4680[yyj4680] + yyv4682.CodecDecodeSelf(d) } } } } else { - yyj4671 := 0 - for ; !r.CheckBreak(); yyj4671++ { + yyj4680 := 0 + for ; !r.CheckBreak(); yyj4680++ { - if yyj4671 >= len(yyv4671) { - yyv4671 = append(yyv4671, ComponentStatus{}) // var yyz4671 ComponentStatus - yyc4671 = true + if yyj4680 >= len(yyv4680) { + yyv4680 = append(yyv4680, ComponentStatus{}) // var yyz4680 ComponentStatus + yyc4680 = true } - yyh4671.ElemContainerState(yyj4671) - if yyj4671 < len(yyv4671) { + yyh4680.ElemContainerState(yyj4680) + if yyj4680 < len(yyv4680) { if r.TryDecodeAsNil() { - yyv4671[yyj4671] = ComponentStatus{} + yyv4680[yyj4680] = ComponentStatus{} } else { - yyv4674 := &yyv4671[yyj4671] - yyv4674.CodecDecodeSelf(d) + yyv4683 := &yyv4680[yyj4680] + yyv4683.CodecDecodeSelf(d) } } else { @@ -60289,16 +60367,16 @@ func (x codecSelfer1234) decSliceComponentStatus(v *[]ComponentStatus, d *codec1 } } - if yyj4671 < len(yyv4671) { - yyv4671 = yyv4671[:yyj4671] - yyc4671 = true - } else if yyj4671 == 0 && yyv4671 == nil { - yyv4671 = []ComponentStatus{} - yyc4671 = true + if yyj4680 < len(yyv4680) { + yyv4680 = yyv4680[:yyj4680] + yyc4680 = true + } else if yyj4680 == 0 && yyv4680 == nil { + yyv4680 = []ComponentStatus{} + yyc4680 = true } } - yyh4671.End() - if yyc4671 { - *v = yyv4671 + yyh4680.End() + if yyc4680 { + *v = yyv4680 } } diff --git a/staging/src/k8s.io/client-go/1.4/pkg/api/types.go b/staging/src/k8s.io/client-go/1.4/pkg/api/types.go index 6c10d78275d87..2d2f18881ad80 100644 --- a/staging/src/k8s.io/client-go/1.4/pkg/api/types.go +++ b/staging/src/k8s.io/client-go/1.4/pkg/api/types.go @@ -1889,6 +1889,8 @@ type EndpointAddress struct { // Optional: Hostname of this endpoint // Meant to be used by DNS servers etc. Hostname string `json:"hostname,omitempty"` + // Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node. + NodeName *string `json:"nodeName,omitempty"` // Optional: The kubernetes object related to the entry point. TargetRef *ObjectReference } diff --git a/staging/src/k8s.io/client-go/1.4/pkg/api/v1/conversion.go b/staging/src/k8s.io/client-go/1.4/pkg/api/v1/conversion.go index 793695cb1b86c..c9ce652e92331 100644 --- a/staging/src/k8s.io/client-go/1.4/pkg/api/v1/conversion.go +++ b/staging/src/k8s.io/client-go/1.4/pkg/api/v1/conversion.go @@ -172,7 +172,7 @@ func addConversionFuncs(scheme *runtime.Scheme) error { "ServiceAccount", "ConfigMap", } { - err = api.Scheme.AddFieldLabelConversionFunc("v1", kind, + err = scheme.AddFieldLabelConversionFunc("v1", kind, func(label, value string) (string, string, error) { switch label { case "metadata.namespace", @@ -189,7 +189,7 @@ func addConversionFuncs(scheme *runtime.Scheme) error { } // Add field conversion funcs. - err = api.Scheme.AddFieldLabelConversionFunc("v1", "Pod", + err = scheme.AddFieldLabelConversionFunc("v1", "Pod", func(label, value string) (string, string, error) { switch label { case "metadata.name", @@ -212,7 +212,7 @@ func addConversionFuncs(scheme *runtime.Scheme) error { if err != nil { return err } - err = api.Scheme.AddFieldLabelConversionFunc("v1", "Node", + err = scheme.AddFieldLabelConversionFunc("v1", "Node", func(label, value string) (string, string, error) { switch label { case "metadata.name": @@ -227,7 +227,7 @@ func addConversionFuncs(scheme *runtime.Scheme) error { if err != nil { return err } - err = api.Scheme.AddFieldLabelConversionFunc("v1", "ReplicationController", + err = scheme.AddFieldLabelConversionFunc("v1", "ReplicationController", func(label, value string) (string, string, error) { switch label { case "metadata.name", @@ -241,21 +241,10 @@ func addConversionFuncs(scheme *runtime.Scheme) error { if err != nil { return err } - err = api.Scheme.AddFieldLabelConversionFunc("v1", "Event", + err = scheme.AddFieldLabelConversionFunc("v1", "PersistentVolume", func(label, value string) (string, string, error) { switch label { - case "involvedObject.kind", - "involvedObject.namespace", - "involvedObject.name", - "involvedObject.uid", - "involvedObject.apiVersion", - "involvedObject.resourceVersion", - "involvedObject.fieldPath", - "reason", - "source", - "type", - "metadata.namespace", - "metadata.name": + case "metadata.name": return label, value, nil default: return "", "", fmt.Errorf("field label not supported: %s", label) @@ -265,46 +254,13 @@ func addConversionFuncs(scheme *runtime.Scheme) error { if err != nil { return err } - err = api.Scheme.AddFieldLabelConversionFunc("v1", "Namespace", - func(label, value string) (string, string, error) { - switch label { - case "status.phase", - "metadata.name": - return label, value, nil - default: - return "", "", fmt.Errorf("field label not supported: %s", label) - } - }, - ) - if err != nil { + if err := AddFieldLabelConversionsForEvent(scheme); err != nil { return err } - err = api.Scheme.AddFieldLabelConversionFunc("v1", "PersistentVolume", - func(label, value string) (string, string, error) { - switch label { - case "metadata.name": - return label, value, nil - default: - return "", "", fmt.Errorf("field label not supported: %s", label) - } - }, - ) - if err != nil { + if err := AddFieldLabelConversionsForNamespace(scheme); err != nil { return err } - err = api.Scheme.AddFieldLabelConversionFunc("v1", "Secret", - func(label, value string) (string, string, error) { - switch label { - case "type", - "metadata.namespace", - "metadata.name": - return label, value, nil - default: - return "", "", fmt.Errorf("field label not supported: %s", label) - } - }, - ) - if err != nil { + if err := AddFieldLabelConversionsForSecret(scheme); err != nil { return err } return nil @@ -769,3 +725,53 @@ func Convert_v1_ResourceList_To_api_ResourceList(in *ResourceList, out *api.Reso } return nil } + +func AddFieldLabelConversionsForEvent(scheme *runtime.Scheme) error { + return scheme.AddFieldLabelConversionFunc("v1", "Event", + func(label, value string) (string, string, error) { + switch label { + case "involvedObject.kind", + "involvedObject.namespace", + "involvedObject.name", + "involvedObject.uid", + "involvedObject.apiVersion", + "involvedObject.resourceVersion", + "involvedObject.fieldPath", + "reason", + "source", + "type", + "metadata.namespace", + "metadata.name": + return label, value, nil + default: + return "", "", fmt.Errorf("field label not supported: %s", label) + } + }) +} + +func AddFieldLabelConversionsForNamespace(scheme *runtime.Scheme) error { + return scheme.AddFieldLabelConversionFunc("v1", "Namespace", + func(label, value string) (string, string, error) { + switch label { + case "status.phase", + "metadata.name": + return label, value, nil + default: + return "", "", fmt.Errorf("field label not supported: %s", label) + } + }) +} + +func AddFieldLabelConversionsForSecret(scheme *runtime.Scheme) error { + return scheme.AddFieldLabelConversionFunc("v1", "Secret", + func(label, value string) (string, string, error) { + switch label { + case "type", + "metadata.namespace", + "metadata.name": + return label, value, nil + default: + return "", "", fmt.Errorf("field label not supported: %s", label) + } + }) +} diff --git a/staging/src/k8s.io/client-go/1.4/pkg/api/v1/generated.pb.go b/staging/src/k8s.io/client-go/1.4/pkg/api/v1/generated.pb.go index 432378bcd3a09..1eceeabf89912 100644 --- a/staging/src/k8s.io/client-go/1.4/pkg/api/v1/generated.pb.go +++ b/staging/src/k8s.io/client-go/1.4/pkg/api/v1/generated.pb.go @@ -2268,6 +2268,12 @@ func (m *EndpointAddress) MarshalTo(data []byte) (int, error) { i++ i = encodeVarintGenerated(data, i, uint64(len(m.Hostname))) i += copy(data[i:], m.Hostname) + if m.NodeName != nil { + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(len(*m.NodeName))) + i += copy(data[i:], *m.NodeName) + } return i, nil } @@ -8381,6 +8387,10 @@ func (m *EndpointAddress) Size() (n int) { } l = len(m.Hostname) n += 1 + l + sovGenerated(uint64(l)) + if m.NodeName != nil { + l = len(*m.NodeName) + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -10849,6 +10859,7 @@ func (this *EndpointAddress) String() string { `IP:` + fmt.Sprintf("%v", this.IP) + `,`, `TargetRef:` + strings.Replace(fmt.Sprintf("%v", this.TargetRef), "ObjectReference", "ObjectReference", 1) + `,`, `Hostname:` + fmt.Sprintf("%v", this.Hostname) + `,`, + `NodeName:` + valueToStringGenerated(this.NodeName) + `,`, `}`, }, "") return s @@ -16995,6 +17006,36 @@ func (m *EndpointAddress) Unmarshal(data []byte) error { } m.Hostname = string(data[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + m.NodeName = &s + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -37459,16 +37500,16 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 9454 bytes of a gzipped FileDescriptorProto + // 9468 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x8c, 0x64, 0x57, 0x76, 0xd0, 0x56, 0x55, 0x7f, 0xd5, 0xed, 0xcf, 0x79, 0x33, 0x63, 0xb7, 0x7b, 0xd7, 0x5f, 0x6f, 0x6d, 0xaf, 0x3d, 0xf6, 0xf4, 0x78, 0xc6, 0x76, 0x6c, 0xef, 0x2e, 0xbb, 0xee, 0xee, 0xea, 0x9e, 0xe9, 0x4c, 0xcf, 0x4c, 0xf9, 0x54, 0x7b, 0x66, 0x37, 0x6b, 0x36, 0x7e, 0x5d, 0xf5, 0xba, 0xfb, 0xed, 0x54, 0xd7, 0x2b, 0xbf, 0xf7, 0xaa, 0x67, 0xda, 0x4b, 0xa4, 0x10, 0x85, 0x20, 0x44, 0x08, 0xfb, 0x83, 0x00, 0x12, 0x20, 0x05, 0x24, 0x24, 0x3e, 0x44, 0xc8, 0x86, 0x25, 0xf1, 0x42, 0x14, - 0x21, 0x11, 0x56, 0x2b, 0x20, 0xc8, 0x2b, 0x01, 0x89, 0x12, 0x69, 0x21, 0x89, 0x10, 0x42, 0xe2, - 0x07, 0x12, 0xbf, 0xb0, 0x22, 0xe0, 0x9e, 0xfb, 0x7d, 0x5f, 0xbd, 0xea, 0xf7, 0xaa, 0x3d, 0xd5, - 0x4c, 0x56, 0xfc, 0x68, 0xa9, 0xeb, 0xdc, 0x73, 0xcf, 0xfd, 0x78, 0xe7, 0x9e, 0x7b, 0xce, 0xb9, + 0x21, 0x11, 0x56, 0x2b, 0x20, 0xc8, 0x2b, 0x01, 0x89, 0x12, 0x69, 0x61, 0x13, 0x21, 0x84, 0xc4, + 0x0f, 0x24, 0x7e, 0x61, 0x45, 0xc0, 0x3d, 0xf7, 0xfb, 0xbe, 0x7a, 0xd5, 0xef, 0x55, 0x7b, 0xaa, + 0x99, 0x44, 0xfc, 0x68, 0xa9, 0xeb, 0x9e, 0x73, 0xcf, 0xfd, 0x78, 0xe7, 0x9e, 0x7b, 0xce, 0xb9, 0xe7, 0x9e, 0x4b, 0x5e, 0xba, 0xfb, 0x46, 0xbc, 0x1c, 0x84, 0x97, 0xee, 0xf6, 0x76, 0xfc, 0xa8, 0xe3, 0x27, 0x7e, 0x7c, 0xa9, 0x7b, 0x77, 0xef, 0x92, 0xd7, 0x0d, 0x2e, 0x1d, 0x5e, 0xbe, 0xb4, 0xe7, 0x77, 0xfc, 0xc8, 0x4b, 0xfc, 0xd6, 0x72, 0x37, 0x0a, 0x93, 0xd0, 0xf9, 0x0c, 0xc7, 0x5e, @@ -37481,574 +37522,575 @@ var fileDescriptorGenerated = []byte{ 0x4f, 0xad, 0xdc, 0x69, 0xac, 0xb7, 0xbd, 0x38, 0x09, 0x9a, 0xab, 0xed, 0xb0, 0x79, 0xb7, 0x91, 0x84, 0x91, 0x7f, 0x3b, 0x6c, 0xf7, 0x0e, 0xfc, 0x06, 0x1b, 0x8d, 0xf3, 0x12, 0x99, 0x3a, 0x64, 0xbf, 0x37, 0x6b, 0x8b, 0xa5, 0xa7, 0x4a, 0xcf, 0x57, 0x57, 0x17, 0xbe, 0xff, 0xc3, 0x27, 0x3f, - 0xf5, 0x87, 0x3f, 0x7c, 0x72, 0xea, 0xb6, 0x80, 0x83, 0xc2, 0x70, 0x9e, 0x23, 0x13, 0xbb, 0xf1, - 0xf6, 0x51, 0xd7, 0x5f, 0x2c, 0x33, 0xdc, 0x39, 0x81, 0x3b, 0xb1, 0xd1, 0x40, 0x28, 0x88, 0x52, - 0xe7, 0x12, 0xa9, 0x76, 0xbd, 0x28, 0x09, 0x12, 0x3a, 0xf6, 0xc5, 0x0a, 0x45, 0x1d, 0x5f, 0x3d, - 0x23, 0x50, 0xab, 0x75, 0x59, 0x00, 0x1a, 0x07, 0xbb, 0x11, 0xf9, 0x5e, 0xeb, 0x56, 0xa7, 0x7d, - 0xb4, 0x38, 0x46, 0xf1, 0xa7, 0x74, 0x37, 0x40, 0xc0, 0x41, 0x61, 0xb8, 0x1f, 0x96, 0xc9, 0xd4, - 0xca, 0xee, 0x6e, 0xd0, 0x09, 0x92, 0x23, 0xe7, 0x3d, 0x32, 0xd3, 0x09, 0x5b, 0xbe, 0xfc, 0xcd, - 0x46, 0x31, 0x7d, 0xe5, 0xc2, 0xf2, 0x71, 0x7c, 0xb1, 0x7c, 0xd3, 0xa8, 0xb1, 0xba, 0x40, 0x9b, - 0x99, 0x31, 0x21, 0x60, 0x51, 0x74, 0xde, 0x25, 0xd3, 0xdd, 0xb0, 0xa5, 0x1a, 0x28, 0xb3, 0x06, - 0x5e, 0x38, 0xbe, 0x81, 0xba, 0xae, 0xb0, 0x3a, 0x4f, 0xe9, 0x4f, 0x1b, 0x00, 0x30, 0xc9, 0x39, - 0x6d, 0x32, 0x8f, 0x3f, 0xe9, 0x67, 0x57, 0x2d, 0x54, 0x58, 0x0b, 0x17, 0xf3, 0x5b, 0x30, 0x2a, - 0xad, 0x9e, 0xa5, 0xad, 0xcc, 0xa7, 0x80, 0x90, 0x26, 0xed, 0x7e, 0x40, 0xe6, 0x56, 0x92, 0xc4, - 0x6b, 0xee, 0xfb, 0x2d, 0xfe, 0x7d, 0x9d, 0x57, 0xc9, 0x58, 0xc7, 0x3b, 0xf0, 0xc5, 0xd7, 0x7f, - 0x4a, 0x4c, 0xfb, 0xd8, 0x4d, 0x0a, 0xfb, 0xf8, 0x87, 0x4f, 0x2e, 0xbc, 0xd3, 0x09, 0xde, 0xef, - 0x09, 0x9e, 0x41, 0x18, 0x30, 0x6c, 0xe7, 0x0a, 0x21, 0x2d, 0xff, 0x30, 0x68, 0xfa, 0x75, 0x2f, - 0xd9, 0x17, 0xdc, 0xe0, 0x88, 0xba, 0xa4, 0xa6, 0x4a, 0xc0, 0xc0, 0x72, 0x7f, 0xa6, 0x44, 0xaa, - 0x2b, 0x87, 0x61, 0xd0, 0xa2, 0xbd, 0x8c, 0x9d, 0x1e, 0x1d, 0x77, 0xe4, 0xef, 0xfa, 0x91, 0x02, - 0xd1, 0x2e, 0x54, 0xe8, 0xb8, 0xaf, 0xe4, 0x8c, 0xdb, 0xae, 0xb4, 0xde, 0x49, 0xa2, 0xa3, 0xd5, - 0x47, 0x45, 0xd3, 0xf3, 0xa9, 0x52, 0x48, 0xb7, 0xe1, 0xfe, 0x83, 0x12, 0x39, 0xbf, 0xf2, 0x41, - 0x2f, 0xf2, 0x37, 0x82, 0xb6, 0xbd, 0x14, 0xe8, 0x90, 0x62, 0xbf, 0x19, 0xf9, 0xc9, 0x4d, 0x3d, - 0x1d, 0x6a, 0x48, 0x0d, 0x55, 0x02, 0x06, 0x16, 0x32, 0x7a, 0xbc, 0xef, 0x45, 0x6c, 0x66, 0xc4, - 0x2c, 0x28, 0x46, 0x6f, 0xc8, 0x02, 0xd0, 0x38, 0x16, 0xa3, 0x57, 0x72, 0x19, 0xfd, 0x9f, 0x95, - 0xc8, 0xe4, 0x6a, 0xd0, 0x69, 0x05, 0x9d, 0x3d, 0xe7, 0x2b, 0x64, 0xea, 0xc0, 0x4f, 0xbc, 0x96, - 0x97, 0x78, 0x82, 0xc7, 0x9f, 0x3f, 0x7e, 0xa2, 0x6e, 0xed, 0x7c, 0xc3, 0x6f, 0x26, 0x37, 0x68, - 0x1d, 0x3d, 0x0c, 0x0d, 0x03, 0x45, 0xcd, 0x79, 0x87, 0x4c, 0x24, 0x5e, 0xb4, 0xe7, 0x27, 0x82, - 0xb5, 0x2f, 0x16, 0xa1, 0x0b, 0x38, 0xad, 0x7e, 0xa7, 0xe9, 0x6b, 0x21, 0xb0, 0xcd, 0x88, 0x80, - 0x20, 0xe6, 0x36, 0xc9, 0xcc, 0x9a, 0xd7, 0xf5, 0x76, 0x82, 0x36, 0x5d, 0xe3, 0x7e, 0xec, 0x7c, - 0x8e, 0x54, 0xbc, 0x56, 0x8b, 0x7d, 0xe4, 0xea, 0xea, 0x79, 0x5a, 0xa1, 0xb2, 0xd2, 0x6a, 0x51, - 0x16, 0x23, 0x0a, 0xeb, 0x08, 0x10, 0xc3, 0xb9, 0x40, 0xc6, 0x5a, 0x51, 0xd8, 0xa5, 0xbd, 0x41, - 0xcc, 0x47, 0x90, 0x1b, 0x6b, 0xf4, 0x77, 0x0a, 0x95, 0xe1, 0xb8, 0xff, 0xaa, 0x4c, 0x9c, 0x35, - 0xbf, 0xbb, 0xbf, 0xd1, 0xb0, 0xbe, 0xe5, 0xf3, 0x74, 0xb2, 0x42, 0xca, 0xf0, 0x61, 0x14, 0x8b, - 0x06, 0x67, 0x70, 0x8a, 0x6f, 0x08, 0x18, 0xa8, 0x52, 0xe7, 0x29, 0x32, 0xd6, 0xd5, 0x2c, 0x3c, - 0x23, 0xd9, 0x9f, 0x31, 0x2f, 0x2b, 0x41, 0x8c, 0x5e, 0xec, 0x47, 0xec, 0x73, 0x19, 0x18, 0xef, - 0x50, 0x18, 0xb0, 0x12, 0xcd, 0x39, 0xc8, 0x53, 0x4c, 0x7e, 0xf5, 0x71, 0x0e, 0x96, 0x80, 0x81, - 0xe5, 0xfc, 0x24, 0xe5, 0x1c, 0xf6, 0x8b, 0x4e, 0xe4, 0xe2, 0x38, 0x9b, 0xf7, 0x1c, 0xc6, 0xdf, - 0x0a, 0x9b, 0x5e, 0x3b, 0x3d, 0xf9, 0xb3, 0x8c, 0xd3, 0x24, 0x21, 0xd0, 0x34, 0x2d, 0x4e, 0x9b, - 0xc8, 0xe5, 0xb4, 0xbf, 0x5e, 0xa2, 0xf3, 0x48, 0x39, 0xcd, 0x8f, 0x4e, 0x61, 0x7b, 0x18, 0x6e, - 0x11, 0xfc, 0x3e, 0x76, 0x2d, 0x3c, 0xe8, 0xd2, 0x6d, 0xb4, 0x93, 0xac, 0x85, 0x74, 0x35, 0xb0, - 0x2d, 0xe3, 0xf3, 0x64, 0x2c, 0xc1, 0xa6, 0x78, 0xb7, 0x9e, 0x93, 0x9f, 0x05, 0x1b, 0xa0, 0x9c, - 0xf2, 0x48, 0x7f, 0x0d, 0xd6, 0x05, 0x56, 0xc7, 0x79, 0x93, 0x4c, 0xc4, 0x89, 0x97, 0xf4, 0x62, - 0xd1, 0xd1, 0xa7, 0x65, 0x47, 0x1b, 0x0c, 0x4a, 0xeb, 0xcf, 0xab, 0x6a, 0x1c, 0x04, 0xa2, 0x82, - 0xf3, 0x02, 0x99, 0x3c, 0xf0, 0xe3, 0xd8, 0xdb, 0xf3, 0x05, 0x43, 0xcc, 0x8b, 0xba, 0x93, 0x37, - 0x38, 0x18, 0x64, 0xb9, 0xf3, 0x59, 0x32, 0xee, 0x47, 0x51, 0x18, 0x09, 0x8e, 0x98, 0x15, 0x88, - 0xe3, 0xeb, 0x08, 0x04, 0x5e, 0xe6, 0xfe, 0xa0, 0x44, 0xe6, 0x55, 0x5f, 0x79, 0x5b, 0x23, 0x5c, - 0xea, 0x2d, 0x42, 0x9a, 0x72, 0x60, 0x31, 0x5b, 0x60, 0xd3, 0x57, 0x5e, 0x3e, 0x9e, 0x76, 0xff, - 0x44, 0xea, 0x36, 0x14, 0x28, 0x06, 0x83, 0xae, 0xfb, 0xfd, 0x12, 0x39, 0x9b, 0x1a, 0xd3, 0x56, - 0x10, 0x27, 0xce, 0x9f, 0xee, 0x1b, 0xd7, 0xa5, 0x63, 0xda, 0x36, 0xb4, 0xa7, 0x65, 0xac, 0xce, - 0x86, 0xa7, 0x18, 0x45, 0x42, 0x8c, 0xc1, 0x01, 0x19, 0x0f, 0x12, 0xff, 0x40, 0x8e, 0xeb, 0x62, - 0xc1, 0x71, 0xf1, 0x0e, 0xea, 0xcf, 0xb3, 0x89, 0x34, 0x80, 0x93, 0x72, 0xff, 0x27, 0xdd, 0xb3, - 0xe8, 0x28, 0x77, 0x83, 0xbd, 0x1b, 0x5e, 0x77, 0x84, 0x1f, 0xa6, 0x41, 0x65, 0x1e, 0x52, 0xe5, - 0x5d, 0xbf, 0x9c, 0xd7, 0x75, 0xd1, 0xa1, 0xe5, 0x1a, 0xad, 0xc3, 0x77, 0x40, 0x25, 0x97, 0x10, - 0x04, 0x8c, 0xd8, 0xd2, 0xeb, 0xa4, 0xaa, 0x10, 0x9c, 0x05, 0x52, 0xb9, 0xeb, 0x73, 0xf5, 0xa8, - 0x0a, 0xf8, 0xaf, 0x73, 0x8e, 0x8c, 0x1f, 0x7a, 0xed, 0x9e, 0x58, 0xad, 0xc0, 0x7f, 0x7c, 0xbe, - 0xfc, 0x46, 0xc9, 0xfd, 0x8d, 0x12, 0x39, 0xa7, 0x1a, 0xb9, 0xee, 0x1f, 0x35, 0xfc, 0x36, 0xed, - 0x72, 0x18, 0x39, 0x3f, 0x4b, 0x0b, 0xda, 0x19, 0x72, 0x48, 0xcc, 0xc6, 0x49, 0x24, 0xd8, 0x67, - 0x44, 0xc7, 0xcf, 0x65, 0x95, 0x42, 0x66, 0x6b, 0xce, 0xe3, 0x7c, 0x2c, 0x7c, 0xf1, 0x4e, 0x0b, - 0x02, 0x15, 0xda, 0x51, 0x36, 0x30, 0xec, 0xfe, 0xac, 0xea, 0xfe, 0x69, 0x70, 0xde, 0x96, 0xcd, - 0x79, 0x9f, 0x2b, 0xf8, 0xf9, 0x06, 0xf0, 0xdc, 0x7f, 0xa7, 0x2a, 0x8a, 0xc2, 0xb1, 0xc4, 0xf1, - 0x43, 0x32, 0xfd, 0xc3, 0x0d, 0x97, 0x7e, 0x96, 0xed, 0x10, 0xf7, 0xd3, 0x01, 0xc3, 0xfd, 0xed, - 0x2a, 0x5b, 0x62, 0x89, 0x17, 0x50, 0xfb, 0x05, 0x77, 0x5b, 0x43, 0x1d, 0x9d, 0x31, 0xd5, 0x51, - 0xa1, 0x7a, 0x52, 0xb1, 0x1a, 0x1c, 0xa0, 0xfc, 0x2d, 0xdb, 0x62, 0x75, 0x13, 0x81, 0xc0, 0xcb, - 0x9c, 0x67, 0xc9, 0x24, 0xb5, 0xf9, 0x0e, 0xbc, 0x4e, 0x8b, 0x8a, 0x69, 0xdc, 0xff, 0xa7, 0x51, - 0x44, 0xaf, 0x71, 0x10, 0xc8, 0x32, 0xe7, 0x33, 0x64, 0x8c, 0x2a, 0x2b, 0x31, 0x95, 0xd0, 0x88, - 0x33, 0x85, 0x2d, 0xad, 0xd0, 0xdf, 0xc0, 0xa0, 0xb8, 0xaf, 0xdf, 0x0b, 0xa3, 0xbb, 0x54, 0xfb, - 0xaa, 0x05, 0x11, 0xdb, 0xa4, 0x8d, 0x7d, 0xfd, 0x8e, 0x2a, 0x01, 0x03, 0xcb, 0xa9, 0x93, 0xf1, - 0x6e, 0x18, 0x25, 0x31, 0xdd, 0x73, 0x71, 0x6e, 0x5e, 0xcc, 0x65, 0x05, 0x3e, 0xee, 0x3a, 0xad, - 0xa3, 0x87, 0x82, 0xbf, 0xe8, 0xfc, 0x30, 0x42, 0xce, 0x1a, 0xa9, 0xf8, 0x9d, 0xc3, 0xc5, 0x49, - 0x46, 0xef, 0x99, 0xe3, 0xe9, 0xad, 0x77, 0x0e, 0x6f, 0x7b, 0x91, 0x5e, 0x12, 0xf4, 0x37, 0x60, - 0x6d, 0xa7, 0x49, 0xaa, 0xd2, 0x82, 0x8d, 0x17, 0xa7, 0x8a, 0x70, 0x0b, 0x08, 0x74, 0xf0, 0xdf, - 0xef, 0x05, 0x91, 0x7f, 0x40, 0x25, 0x65, 0xac, 0x95, 0x5b, 0x59, 0x1a, 0x83, 0xa6, 0x4b, 0x1b, - 0x99, 0xe1, 0xba, 0xc0, 0x8d, 0x90, 0x9a, 0xb1, 0xf1, 0x62, 0x95, 0x75, 0x39, 0xc7, 0x52, 0xba, - 0xad, 0x6b, 0xac, 0x9e, 0x13, 0xe4, 0x67, 0x0c, 0x60, 0x0c, 0x16, 0x51, 0x6a, 0x8d, 0xcd, 0xb6, - 0x83, 0x43, 0x6a, 0xeb, 0xc6, 0x71, 0x3d, 0x0a, 0x77, 0xfc, 0x45, 0xc2, 0x46, 0xf3, 0xd9, 0x3c, - 0xab, 0x81, 0xa2, 0xae, 0x9e, 0xa1, 0xb4, 0x67, 0xb7, 0xcc, 0xda, 0x60, 0x13, 0xa3, 0x6a, 0xd9, - 0x1c, 0x2a, 0x1e, 0x81, 0x26, 0x3f, 0x5d, 0x9c, 0xbc, 0x43, 0xc9, 0xcf, 0x81, 0x55, 0x1d, 0x52, - 0xe4, 0x9c, 0x6d, 0x52, 0x6d, 0x07, 0xbb, 0x7e, 0xf3, 0xa8, 0x49, 0x55, 0xc5, 0x19, 0x46, 0x3b, - 0x67, 0xfd, 0x6c, 0x49, 0x74, 0xae, 0xec, 0xa9, 0x9f, 0xa0, 0x09, 0x39, 0xb7, 0xc9, 0x23, 0x89, - 0x1f, 0x1d, 0x04, 0x1d, 0x0f, 0x77, 0x60, 0xa1, 0x89, 0x30, 0xd3, 0x6c, 0x96, 0x71, 0xed, 0x13, - 0x62, 0x62, 0x1f, 0xd9, 0xce, 0xc4, 0x82, 0x01, 0xb5, 0x9d, 0x5b, 0x64, 0x9e, 0xad, 0xa7, 0x7a, - 0xaf, 0xdd, 0xae, 0x87, 0xed, 0xa0, 0x79, 0xb4, 0x38, 0xc7, 0x08, 0x3e, 0x2b, 0x0d, 0xae, 0x4d, - 0xbb, 0x18, 0x95, 0x74, 0xfd, 0x0b, 0xd2, 0xb5, 0xd1, 0xda, 0xa5, 0x2a, 0x6a, 0x2f, 0xa2, 0x1a, - 0x3c, 0xf2, 0xbe, 0x7f, 0x3f, 0x59, 0x9c, 0x2f, 0x62, 0x74, 0x34, 0xec, 0x4a, 0xdc, 0xda, 0x4d, - 0x01, 0x21, 0x4d, 0x1a, 0x45, 0x45, 0x9c, 0xd0, 0xd9, 0x5f, 0x5c, 0x60, 0x5a, 0xa6, 0x5a, 0x5f, - 0x0d, 0x04, 0x02, 0x2f, 0x63, 0x36, 0x1c, 0xfe, 0x73, 0x0b, 0x05, 0xe9, 0x19, 0x86, 0xa8, 0x6d, - 0x38, 0x59, 0x00, 0x1a, 0x07, 0x77, 0x9f, 0x84, 0x5a, 0xe9, 0x0e, 0x43, 0x55, 0x4b, 0x6d, 0x7b, - 0xfb, 0xab, 0x80, 0x70, 0x77, 0x87, 0xcc, 0xa9, 0x65, 0xcd, 0x66, 0xc7, 0x79, 0x92, 0x8c, 0xa3, - 0xe4, 0x92, 0xa6, 0x48, 0x15, 0xbb, 0x80, 0x02, 0x8d, 0x2e, 0x71, 0x06, 0x67, 0x5d, 0x08, 0x3e, - 0xf0, 0x57, 0x8f, 0xe8, 0xa8, 0x99, 0x58, 0xab, 0x18, 0x5d, 0x90, 0x05, 0xa0, 0x71, 0xdc, 0xff, - 0xcd, 0x77, 0x38, 0x2d, 0x3b, 0x0a, 0xc8, 0x4d, 0xaa, 0x75, 0xef, 0x87, 0x71, 0x82, 0xd8, 0xac, - 0x8d, 0x71, 0xbd, 0xa5, 0x5d, 0x13, 0x70, 0x50, 0x18, 0xce, 0x17, 0xc8, 0x6c, 0xd3, 0x6c, 0x40, - 0xb8, 0x71, 0xce, 0x8b, 0x2a, 0x76, 0xeb, 0x60, 0xe3, 0x3a, 0x6f, 0x90, 0x29, 0xe6, 0x83, 0x6a, - 0x86, 0x6d, 0xa1, 0xfc, 0xca, 0x6d, 0x66, 0xaa, 0x2e, 0xe0, 0x1f, 0x1b, 0xff, 0x83, 0xc2, 0x46, - 0x13, 0x02, 0xbb, 0xb0, 0x59, 0x17, 0xe2, 0x56, 0x99, 0x10, 0xd7, 0x18, 0x14, 0x44, 0xa9, 0xfb, - 0x2b, 0x65, 0x63, 0x96, 0x51, 0x83, 0xf3, 0x9d, 0x9f, 0x20, 0x93, 0xf7, 0x3c, 0xaa, 0x81, 0x76, - 0xf6, 0xc4, 0x76, 0xf8, 0x4a, 0x41, 0xd9, 0xcb, 0xaa, 0xdf, 0xe1, 0x55, 0xf9, 0x3e, 0x21, 0x7e, - 0x80, 0x24, 0x88, 0xb4, 0xa3, 0x5e, 0xa7, 0x83, 0xb4, 0xcb, 0xc3, 0xd3, 0x06, 0x5e, 0x95, 0xd3, - 0x16, 0x3f, 0x40, 0x12, 0x74, 0x76, 0x09, 0x91, 0xab, 0xcf, 0x6f, 0x09, 0xdf, 0xcf, 0x8f, 0x0d, - 0x43, 0x7e, 0x5b, 0xd5, 0x5e, 0x9d, 0xc3, 0x9d, 0x49, 0xff, 0x06, 0x83, 0xb2, 0xdb, 0x63, 0x5a, - 0x45, 0x7f, 0xb7, 0xa8, 0x44, 0xa5, 0xcc, 0xed, 0x45, 0x14, 0x67, 0x25, 0x11, 0x53, 0xf7, 0x62, - 0x41, 0xed, 0x68, 0x3b, 0x38, 0xf0, 0xcd, 0xd5, 0x22, 0xa8, 0x80, 0x26, 0xe8, 0x7e, 0xb7, 0x42, - 0x16, 0x07, 0xf5, 0x17, 0x79, 0xd2, 0xbf, 0x1f, 0x50, 0xd3, 0xa2, 0xc5, 0x39, 0xd7, 0xe0, 0xc9, - 0x75, 0x01, 0x07, 0x85, 0x81, 0xcc, 0x11, 0x07, 0x7b, 0x1d, 0xaf, 0x2d, 0xf8, 0x57, 0x31, 0x47, - 0x83, 0x41, 0x41, 0x94, 0x22, 0x1e, 0x95, 0xba, 0xb1, 0xf0, 0x3d, 0x1a, 0x4c, 0x04, 0x0c, 0x0a, - 0xa2, 0xd4, 0xb4, 0xe5, 0xc6, 0x72, 0x6c, 0x39, 0x6b, 0x8e, 0xc6, 0x1f, 0xf0, 0x1c, 0xd1, 0x5d, - 0x87, 0xa0, 0x7f, 0x2e, 0xde, 0x67, 0xe4, 0x27, 0x86, 0x27, 0xaf, 0xb4, 0x92, 0x0d, 0x45, 0x06, - 0x0c, 0x92, 0xce, 0x6b, 0x64, 0x5a, 0xad, 0x50, 0x6a, 0xca, 0x4f, 0xb2, 0xd1, 0x9e, 0x15, 0x95, - 0xa6, 0xb5, 0xb8, 0xaa, 0x81, 0x89, 0xe7, 0x7e, 0x23, 0xcd, 0x32, 0x62, 0x61, 0x18, 0x33, 0x5c, - 0x2a, 0x3a, 0xc3, 0xe5, 0xe3, 0x67, 0xd8, 0xfd, 0x8f, 0x15, 0x34, 0x84, 0x8d, 0xc6, 0x7a, 0x71, - 0x01, 0xa1, 0xf6, 0x36, 0x4a, 0x78, 0xda, 0x31, 0xb1, 0x2c, 0x5f, 0x1a, 0x66, 0xdd, 0x98, 0xfb, - 0x01, 0x2e, 0x07, 0x4e, 0xc9, 0xd9, 0xa7, 0x3b, 0xb4, 0x17, 0x33, 0xb3, 0xd0, 0x17, 0xcb, 0x71, - 0x38, 0xb2, 0x5a, 0xa5, 0xa6, 0x64, 0x8c, 0x0d, 0x97, 0xb7, 0xa2, 0x89, 0xe3, 0xf6, 0x84, 0xda, - 0x81, 0x74, 0x79, 0xab, 0xee, 0xa0, 0x0a, 0x71, 0x04, 0xbc, 0x8c, 0xca, 0xd2, 0x19, 0xaa, 0x61, - 0x21, 0xab, 0xac, 0xa1, 0x02, 0xc4, 0x98, 0x6f, 0x5c, 0x6b, 0x4a, 0x60, 0x94, 0x81, 0x85, 0xa9, - 0x15, 0xe5, 0x89, 0x63, 0x14, 0x65, 0xfa, 0x85, 0xd8, 0x3f, 0x8a, 0x2b, 0xd4, 0x17, 0xda, 0xe4, - 0x60, 0x90, 0xe5, 0x69, 0x26, 0x9a, 0x2a, 0xc8, 0x44, 0x17, 0xc8, 0x5c, 0xcd, 0xf3, 0x0f, 0xc2, - 0xce, 0x7a, 0xa7, 0xd5, 0x0d, 0x03, 0xda, 0xb1, 0x45, 0x32, 0xc6, 0xb6, 0x14, 0xbe, 0xe2, 0xc7, - 0x90, 0x02, 0x8c, 0xa1, 0xb2, 0xeb, 0xfe, 0x1f, 0xba, 0xaf, 0xd5, 0xa8, 0xb1, 0x99, 0xf8, 0xb7, - 0xba, 0xcc, 0x97, 0xe0, 0x6c, 0x10, 0x67, 0x2f, 0xf2, 0x9a, 0x7e, 0xdd, 0x8f, 0x82, 0xb0, 0x45, - 0x77, 0xfc, 0xb0, 0xc3, 0x3c, 0xc5, 0xb8, 0x47, 0xa2, 0x6b, 0xd0, 0xb9, 0xda, 0x57, 0x0a, 0x19, - 0x35, 0x9c, 0x16, 0x99, 0xed, 0x46, 0xbe, 0xe5, 0xfc, 0x28, 0xe5, 0xeb, 0xe7, 0x75, 0xb3, 0x0a, - 0x57, 0x1f, 0x2d, 0x10, 0xd8, 0x44, 0x9d, 0xb7, 0xc8, 0x42, 0x18, 0x75, 0xf7, 0xbd, 0x4e, 0xcd, - 0xef, 0xfa, 0x9d, 0x16, 0xea, 0xcc, 0xc2, 0xc3, 0x75, 0x8e, 0xd6, 0x5d, 0xb8, 0x95, 0x2a, 0x83, - 0x3e, 0x6c, 0xf7, 0x2f, 0x95, 0xc9, 0xf9, 0x5a, 0x78, 0xaf, 0x73, 0xcf, 0x8b, 0x5a, 0x2b, 0xf5, - 0x4d, 0xae, 0x08, 0x33, 0x8f, 0xa1, 0xf4, 0x54, 0x96, 0x06, 0x7a, 0x2a, 0xbf, 0x46, 0xa6, 0x76, - 0x03, 0xbf, 0xdd, 0x42, 0x97, 0x22, 0x1f, 0xde, 0xe5, 0x22, 0xee, 0x89, 0x0d, 0xac, 0x23, 0x4d, - 0x7c, 0xee, 0x28, 0xdd, 0x10, 0x64, 0x40, 0x11, 0x74, 0x7a, 0x64, 0x41, 0x6a, 0xfa, 0xb2, 0x54, - 0xac, 0x8e, 0x57, 0x8a, 0x19, 0x12, 0x76, 0x33, 0x6c, 0x3e, 0x20, 0x45, 0x10, 0xfa, 0x9a, 0x70, - 0x63, 0xf2, 0x68, 0xdf, 0x74, 0x08, 0x6b, 0xf8, 0x2b, 0xd2, 0x0c, 0xe5, 0xe7, 0x06, 0x39, 0xdd, - 0xc8, 0x9c, 0xd4, 0x01, 0x26, 0xe9, 0x2d, 0x72, 0x6e, 0xfd, 0xa0, 0x9b, 0x1c, 0x51, 0x83, 0xce, - 0x6a, 0xf1, 0x75, 0x32, 0x71, 0xe0, 0xb7, 0x82, 0xde, 0x81, 0xf8, 0x08, 0x4f, 0x4a, 0xb1, 0x77, - 0x83, 0x41, 0xa9, 0x4e, 0x33, 0x8b, 0x47, 0x6c, 0x74, 0xb9, 0x70, 0x00, 0x08, 0x74, 0xf7, 0xd7, - 0x4b, 0x64, 0x5e, 0xb2, 0xff, 0x4a, 0xab, 0x45, 0x47, 0x19, 0x3b, 0x4b, 0xa4, 0x1c, 0x74, 0x05, - 0x21, 0x22, 0x08, 0x95, 0xa9, 0x8a, 0x43, 0xa1, 0x54, 0xdf, 0xa8, 0x72, 0x2f, 0xba, 0xfe, 0x94, - 0x43, 0x7a, 0xe5, 0x99, 0xad, 0xb0, 0x2d, 0x69, 0x80, 0x26, 0x27, 0xf5, 0x40, 0x26, 0x58, 0x2b, - 0xb6, 0x4f, 0xf7, 0x9a, 0x80, 0x83, 0xc2, 0x70, 0x7f, 0xbe, 0x44, 0x66, 0x64, 0xcf, 0x0b, 0x2a, - 0x9a, 0xc8, 0xa8, 0x5a, 0xc9, 0xd4, 0x8c, 0x8a, 0x8a, 0x22, 0x2b, 0xb1, 0xf4, 0xc3, 0xca, 0x30, - 0xfa, 0xa1, 0xfb, 0x5d, 0xaa, 0xf7, 0xc9, 0xee, 0x34, 0x7a, 0x3b, 0xb1, 0x9f, 0x38, 0x5f, 0x27, - 0x55, 0x8f, 0x4f, 0xa9, 0x2f, 0x59, 0xe1, 0x62, 0x9e, 0x95, 0x6c, 0x7d, 0x09, 0xbd, 0x39, 0xaf, - 0x48, 0x3a, 0xa0, 0x49, 0x3a, 0x87, 0xe4, 0x4c, 0x27, 0x4c, 0x98, 0x4c, 0x56, 0xe5, 0xc5, 0x5c, - 0x8c, 0xe9, 0x76, 0x1e, 0x13, 0xed, 0x9c, 0xb9, 0x99, 0xa6, 0x07, 0xfd, 0x4d, 0x50, 0xdb, 0x4b, - 0x78, 0x12, 0x2a, 0xac, 0xad, 0x0b, 0xc5, 0xda, 0x1a, 0xec, 0x48, 0x70, 0x7f, 0xb3, 0x44, 0xaa, - 0x12, 0x6d, 0x94, 0x4e, 0xe6, 0x3b, 0x64, 0x32, 0x66, 0x9f, 0x46, 0x4e, 0xd3, 0x4b, 0xc5, 0xba, - 0xce, 0xbf, 0xa7, 0xde, 0x80, 0xf8, 0xef, 0x18, 0x24, 0x35, 0xe6, 0xd7, 0x53, 0x03, 0x78, 0xf8, - 0xfc, 0x7a, 0xaa, 0x6b, 0x03, 0xa4, 0xca, 0xdf, 0x2b, 0x91, 0x09, 0xee, 0xa0, 0x29, 0xe6, 0xe5, - 0x32, 0x9c, 0xb3, 0x9a, 0xe2, 0x6d, 0x04, 0x0a, 0x5f, 0x2d, 0x9d, 0xe9, 0x2a, 0xfb, 0x67, 0x23, - 0x0a, 0x0f, 0x84, 0x30, 0xbe, 0x50, 0xc4, 0x41, 0xc4, 0xc5, 0x19, 0x97, 0x11, 0xb7, 0x25, 0x01, - 0xd0, 0xb4, 0xdc, 0xdf, 0xa8, 0xe0, 0xaa, 0xd7, 0xa8, 0xd6, 0xd6, 0x52, 0x3a, 0x8d, 0xad, 0xa5, - 0x3c, 0xf2, 0xad, 0xc5, 0x79, 0x9f, 0xcc, 0x37, 0x0d, 0x27, 0xb7, 0xde, 0xd0, 0xae, 0x14, 0xf4, - 0xdf, 0x1a, 0x9e, 0x71, 0xee, 0x90, 0x58, 0xb3, 0xc9, 0x41, 0x9a, 0xbe, 0xe3, 0x93, 0x19, 0x7e, - 0x42, 0x27, 0xda, 0x1b, 0xcb, 0xe5, 0x59, 0xee, 0xfb, 0xe0, 0x35, 0x54, 0x63, 0x2c, 0x62, 0xa1, - 0x61, 0x10, 0x02, 0x8b, 0xac, 0xfb, 0x57, 0xc6, 0xc9, 0xf8, 0xfa, 0x21, 0xd5, 0x27, 0x46, 0xb8, - 0xca, 0x0f, 0xc8, 0x5c, 0xd0, 0x39, 0x0c, 0xdb, 0x87, 0x7e, 0x8b, 0x97, 0x9f, 0x6c, 0x9f, 0x7a, - 0x44, 0x34, 0x32, 0xb7, 0x69, 0x11, 0x83, 0x14, 0xf1, 0x51, 0xd8, 0x74, 0x6f, 0x53, 0x73, 0x92, - 0x71, 0x84, 0x30, 0xe8, 0x72, 0x1c, 0x95, 0x6c, 0x42, 0xc5, 0xca, 0xd1, 0x96, 0x27, 0xf7, 0x91, - 0x0a, 0x42, 0xce, 0x5d, 0x32, 0xb7, 0x1b, 0x44, 0x54, 0xeb, 0xa7, 0x46, 0x19, 0xd5, 0xc4, 0x0f, - 0xba, 0x27, 0x31, 0xe6, 0xd4, 0x94, 0x6c, 0x58, 0xa4, 0x20, 0x45, 0x9a, 0x1a, 0x2a, 0xb3, 0x68, - 0x4b, 0xe8, 0xb6, 0x26, 0x87, 0x6f, 0x4b, 0xf9, 0x73, 0xb6, 0x4c, 0x4a, 0x60, 0x13, 0x46, 0x61, - 0xd4, 0x64, 0xc6, 0xc7, 0x14, 0xdb, 0xd2, 0x95, 0x30, 0xe2, 0x56, 0x07, 0x2f, 0x43, 0x99, 0xc6, - 0x0e, 0x64, 0xab, 0xb6, 0x4c, 0xd3, 0xc7, 0xae, 0xee, 0x77, 0x70, 0x03, 0xc2, 0x59, 0x3c, 0x0d, - 0xd9, 0x7d, 0xcd, 0x96, 0xdd, 0x9f, 0x2d, 0xf0, 0x71, 0x07, 0xc8, 0xed, 0xf7, 0xc8, 0xb4, 0xf1, - 0xed, 0xd1, 0x59, 0xd7, 0x94, 0x67, 0x87, 0x42, 0x80, 0x2b, 0x05, 0x42, 0x1d, 0x2a, 0x82, 0xc6, - 0xc1, 0x89, 0x41, 0x75, 0x2a, 0x1d, 0x62, 0x80, 0xca, 0x16, 0xb0, 0x12, 0xf7, 0x15, 0x42, 0xd6, - 0xef, 0xfb, 0xcd, 0x95, 0x26, 0x3b, 0xd9, 0x36, 0xce, 0x2e, 0x4a, 0x83, 0xcf, 0x2e, 0xdc, 0x77, - 0xe9, 0x66, 0x78, 0x1f, 0x77, 0x76, 0x69, 0x2a, 0xd1, 0x25, 0xe2, 0x33, 0x00, 0xeb, 0xd5, 0x94, - 0x66, 0x52, 0x8e, 0x06, 0xa2, 0x94, 0x9d, 0x4b, 0xdf, 0xf7, 0xc4, 0x82, 0x35, 0xcc, 0xce, 0x75, - 0x04, 0x02, 0x2f, 0x73, 0xbf, 0x5d, 0x22, 0x73, 0x1b, 0x6b, 0x96, 0xf6, 0xbb, 0x4c, 0x08, 0xd7, - 0x22, 0xef, 0xdc, 0xb9, 0x29, 0x7d, 0x99, 0xdc, 0xe1, 0xa4, 0xa0, 0x60, 0x60, 0x38, 0x8f, 0x91, - 0x4a, 0xbb, 0xd7, 0x11, 0x6a, 0xe0, 0x24, 0xfa, 0x48, 0xb7, 0x7a, 0x1d, 0x40, 0x98, 0x11, 0x29, - 0x50, 0x29, 0x1c, 0x29, 0x90, 0x1f, 0x17, 0xf6, 0x8b, 0x15, 0xb2, 0xb0, 0xd1, 0xf6, 0xef, 0x5b, - 0xbd, 0xa6, 0x4d, 0xb5, 0xa2, 0x80, 0x32, 0x4f, 0xda, 0x55, 0x51, 0x63, 0x50, 0x10, 0xa5, 0x85, - 0x83, 0x17, 0xac, 0xc0, 0x8d, 0xca, 0x88, 0x03, 0x37, 0x72, 0xc7, 0xec, 0xec, 0x92, 0xc9, 0x90, - 0x7f, 0x7f, 0x2a, 0xc5, 0x90, 0xd1, 0xbf, 0x70, 0x7c, 0x67, 0xd2, 0xf3, 0xb3, 0x2c, 0xb8, 0x87, - 0x9f, 0x22, 0x2b, 0x61, 0x29, 0xa0, 0x20, 0x89, 0x2f, 0x7d, 0x9e, 0xcc, 0x98, 0x98, 0x43, 0x1d, - 0x27, 0x6f, 0x91, 0xb3, 0x1b, 0x18, 0x7e, 0x98, 0x0a, 0x2e, 0x79, 0x8d, 0x4c, 0xe3, 0x4a, 0x8d, - 0xad, 0x88, 0x2b, 0xe5, 0x4f, 0xa8, 0xe9, 0x22, 0x30, 0xf1, 0xdc, 0x7f, 0x57, 0x22, 0x8f, 0x5f, - 0x5d, 0x5b, 0xaf, 0xa3, 0x38, 0x88, 0x13, 0xba, 0xc0, 0x6a, 0x41, 0x7c, 0x37, 0xfd, 0xc9, 0xbb, - 0x2d, 0x83, 0xa6, 0xfa, 0x94, 0xf5, 0x1a, 0x23, 0x27, 0x4a, 0x1f, 0x96, 0x70, 0x46, 0xaa, 0x17, - 0x9e, 0xbd, 0x1a, 0xd0, 0x6f, 0xdf, 0x0d, 0xd3, 0x01, 0x69, 0x11, 0x85, 0xc5, 0x18, 0xa8, 0x74, - 0x94, 0x0e, 0x48, 0x03, 0x55, 0x02, 0x06, 0x16, 0x6f, 0xf9, 0x30, 0x40, 0x41, 0x29, 0x06, 0x65, - 0xb4, 0xcc, 0xe1, 0xa0, 0x30, 0x70, 0x60, 0xad, 0x20, 0x62, 0x3a, 0xc5, 0x91, 0x58, 0x89, 0x6a, - 0x60, 0x35, 0x59, 0x00, 0x1a, 0xc7, 0xfd, 0x9b, 0x25, 0x72, 0xfe, 0x6a, 0xbb, 0x47, 0xa7, 0x3d, - 0xda, 0x8d, 0xad, 0xce, 0xbe, 0x42, 0xaa, 0xbe, 0xd4, 0x7f, 0x45, 0x5f, 0xd5, 0xde, 0xa2, 0x14, - 0x63, 0x1e, 0x0d, 0xa7, 0xf0, 0x0a, 0x04, 0x5f, 0x0d, 0x17, 0x2a, 0xf4, 0xcf, 0xcb, 0x64, 0xf6, - 0xda, 0xf6, 0x76, 0xfd, 0xaa, 0x9f, 0x08, 0x59, 0x9a, 0xef, 0x34, 0xa9, 0x1b, 0xd6, 0xea, 0xf4, - 0x95, 0xe5, 0x01, 0xab, 0x07, 0x03, 0x6d, 0x97, 0x79, 0xa0, 0xed, 0xf2, 0x66, 0x27, 0xb9, 0x15, - 0x35, 0x92, 0x08, 0x5d, 0xfa, 0x59, 0xd6, 0xad, 0x94, 0xf7, 0x95, 0x41, 0xf2, 0x9e, 0x4e, 0xd6, - 0x44, 0xdc, 0xdc, 0xf7, 0x0f, 0xa4, 0x8e, 0xf2, 0x69, 0xa5, 0x4e, 0x30, 0x28, 0xb5, 0x7d, 0xab, - 0xef, 0xc0, 0x26, 0xff, 0x01, 0x02, 0x95, 0x0a, 0x9e, 0xe9, 0xfd, 0x24, 0xe9, 0x5e, 0xa3, 0x83, - 0xa5, 0xac, 0x2f, 0x56, 0x7b, 0x8e, 0x36, 0x87, 0x93, 0xc1, 0x2b, 0xe8, 0x85, 0xa5, 0x61, 0x31, - 0x98, 0x14, 0xdd, 0x06, 0x21, 0xba, 0xec, 0x01, 0x99, 0x28, 0xee, 0x9f, 0x2d, 0x93, 0xc9, 0x6b, - 0x74, 0xbb, 0x6a, 0x53, 0x92, 0x1b, 0x64, 0xcc, 0xa7, 0xdb, 0x5c, 0x31, 0x45, 0x54, 0x6f, 0x88, - 0xfc, 0x5c, 0x1e, 0x7f, 0x03, 0xab, 0xef, 0x00, 0x99, 0xc4, 0x7e, 0x5f, 0x55, 0x11, 0x8b, 0x2f, - 0xe6, 0xcf, 0x82, 0x62, 0x09, 0xbe, 0x9b, 0x0a, 0x10, 0x48, 0x42, 0xcc, 0xe3, 0xd2, 0xec, 0x36, - 0x50, 0x4a, 0x25, 0xc5, 0x02, 0x70, 0xb7, 0xd7, 0xea, 0x1c, 0x5d, 0xd0, 0xe5, 0x1e, 0x17, 0x09, - 0x04, 0x4d, 0xce, 0x7d, 0x83, 0x9c, 0x63, 0x27, 0x6c, 0x94, 0xdd, 0xac, 0x35, 0x93, 0xcb, 0x9c, - 0xee, 0xdf, 0x2e, 0x93, 0x33, 0x9b, 0x8d, 0xb5, 0x86, 0xed, 0xf8, 0x7a, 0x83, 0xcc, 0xf0, 0x6d, - 0x16, 0x99, 0xce, 0x6b, 0x8b, 0xfa, 0xca, 0x25, 0xbc, 0x6d, 0x94, 0x81, 0x85, 0x89, 0x47, 0x97, - 0xc1, 0xfb, 0x9d, 0x74, 0xe0, 0xcc, 0xe6, 0xdb, 0x37, 0x01, 0xe1, 0x58, 0x8c, 0x3b, 0x36, 0x17, - 0x71, 0xaa, 0x58, 0xed, 0xda, 0x5f, 0xa2, 0x2a, 0x7f, 0xdc, 0x8c, 0x03, 0xba, 0x00, 0xe8, 0xfa, - 0xf7, 0x9a, 0x92, 0x7d, 0xb5, 0x0e, 0x8f, 0x5d, 0x55, 0xa5, 0x90, 0xc2, 0x36, 0xe4, 0xed, 0x78, - 0xe1, 0x5d, 0x3f, 0x3f, 0x74, 0x71, 0x8b, 0x54, 0x55, 0x88, 0x89, 0x8c, 0x0c, 0x2a, 0x65, 0x47, - 0x06, 0xe5, 0x0b, 0x1c, 0xf7, 0x1f, 0x51, 0x1d, 0x55, 0x1d, 0xb1, 0x53, 0x4e, 0xab, 0x52, 0xd1, - 0x9a, 0xb0, 0x43, 0x1b, 0xc1, 0xb6, 0xcf, 0xe6, 0xf0, 0x1a, 0xe7, 0x75, 0xce, 0x0d, 0x75, 0x59, - 0x17, 0x34, 0x19, 0x67, 0x8b, 0x4c, 0x76, 0x23, 0xbf, 0x91, 0xb0, 0x08, 0xd7, 0x21, 0x28, 0x32, - 0xbe, 0xad, 0xf3, 0x9a, 0x20, 0x49, 0xb8, 0xbf, 0x56, 0x22, 0x64, 0x2b, 0x38, 0xa0, 0xdb, 0x87, - 0xd7, 0xd9, 0xf3, 0x47, 0x68, 0xef, 0xdd, 0x24, 0x63, 0x71, 0x97, 0x2e, 0xde, 0x42, 0x07, 0x2d, - 0xba, 0x47, 0x0d, 0x5a, 0x47, 0x4f, 0x34, 0xfe, 0x02, 0x46, 0xc7, 0xfd, 0x65, 0x42, 0xe6, 0x34, - 0x1a, 0x2a, 0xdc, 0xce, 0x45, 0x2b, 0xa4, 0xf3, 0xb1, 0x54, 0x48, 0x67, 0x95, 0x61, 0x1b, 0x51, - 0x9c, 0x09, 0xa9, 0x1c, 0x78, 0xf7, 0x85, 0x7e, 0xff, 0x5a, 0xd1, 0x0e, 0x61, 0x4b, 0xcb, 0x37, - 0xbc, 0xfb, 0x5c, 0xe1, 0x79, 0x51, 0xb2, 0x08, 0x85, 0x7c, 0xcc, 0x8f, 0x53, 0xd8, 0x1a, 0x43, - 0x83, 0xe2, 0x67, 0xfe, 0x93, 0xfe, 0xcd, 0xc4, 0x1e, 0x36, 0xc7, 0x5a, 0x0d, 0x3a, 0xc2, 0x29, - 0x37, 0x64, 0xab, 0x41, 0x27, 0xdd, 0x6a, 0xd0, 0x29, 0xd0, 0x6a, 0xd0, 0xc1, 0xc8, 0xaf, 0xc9, - 0x96, 0xbf, 0xeb, 0xf5, 0xda, 0x09, 0x0b, 0x56, 0x9a, 0xbe, 0xf2, 0xe6, 0x50, 0x4d, 0xd7, 0x78, - 0x5d, 0xde, 0xfc, 0x25, 0xa9, 0xe5, 0x09, 0x68, 0x6e, 0x17, 0x64, 0xd3, 0xce, 0x2f, 0x51, 0xab, - 0x40, 0xfc, 0x8f, 0x71, 0x41, 0xd4, 0x3c, 0x14, 0xfb, 0xd0, 0x5b, 0x27, 0xe9, 0x8d, 0x20, 0xc1, - 0x3b, 0xf5, 0x63, 0x52, 0x88, 0xd8, 0x85, 0xb9, 0x7d, 0x4b, 0xf5, 0xc7, 0xf9, 0xb0, 0x44, 0xce, - 0xd1, 0xef, 0xc4, 0x5b, 0xe4, 0x30, 0xc0, 0xe3, 0x37, 0x11, 0x90, 0xb5, 0x31, 0x2c, 0x9f, 0xf4, - 0x11, 0xe2, 0xdd, 0xfd, 0xa2, 0x3c, 0xe4, 0xcb, 0x42, 0xc9, 0xed, 0x74, 0x66, 0x0f, 0x97, 0x5a, - 0x64, 0x4a, 0x32, 0x66, 0x86, 0x7e, 0xbd, 0x6a, 0x6e, 0xb7, 0xc7, 0xaf, 0x40, 0xe9, 0xea, 0x5a, - 0x7e, 0xbb, 0xe7, 0x75, 0x12, 0x8c, 0x96, 0xd7, 0xda, 0x38, 0x6b, 0x45, 0x30, 0xe2, 0x08, 0x5b, - 0xd9, 0x27, 0x33, 0x26, 0xcf, 0x8d, 0xb0, 0xa5, 0x90, 0x9c, 0xcd, 0xe0, 0xa7, 0x11, 0x36, 0xd8, - 0x23, 0x8f, 0x0d, 0xe4, 0x8b, 0xd1, 0x35, 0x8b, 0xee, 0x7b, 0x43, 0x60, 0x9e, 0x86, 0x0b, 0xe5, - 0x86, 0xed, 0x42, 0x79, 0xbe, 0xe8, 0xd2, 0x19, 0xe0, 0x47, 0xd9, 0x35, 0xfb, 0x8f, 0x3b, 0x81, - 0xb3, 0x4d, 0x26, 0xda, 0x08, 0x91, 0xe7, 0x36, 0x2f, 0x0d, 0xb3, 0x38, 0xb5, 0xfa, 0xc0, 0xe0, - 0x31, 0x08, 0x5a, 0x78, 0xd8, 0x36, 0x76, 0x1a, 0xd3, 0x53, 0xb7, 0xa7, 0x67, 0x90, 0x12, 0x2a, - 0xae, 0xf4, 0x2d, 0x83, 0x77, 0x6f, 0xfd, 0x3e, 0xb5, 0x57, 0x63, 0xa6, 0x2c, 0x66, 0xce, 0xd0, - 0x3f, 0x2c, 0x93, 0x69, 0x6c, 0x48, 0x7a, 0x74, 0xbe, 0x80, 0x1e, 0xbe, 0x1d, 0xbf, 0x2d, 0x1d, - 0xbf, 0x69, 0xc3, 0x6a, 0xcb, 0x2c, 0x04, 0x1b, 0x17, 0x2b, 0xef, 0x9a, 0x7e, 0x71, 0xa1, 0xf4, - 0xa8, 0xca, 0x96, 0xd3, 0x1c, 0x6c, 0x5c, 0xd4, 0xed, 0xef, 0x79, 0x49, 0x73, 0x5f, 0x18, 0x5d, - 0xaa, 0xbb, 0x77, 0x10, 0x08, 0xbc, 0xcc, 0x59, 0x21, 0xf3, 0x92, 0x63, 0x6f, 0xf3, 0xa9, 0x13, - 0x0a, 0xa1, 0xba, 0x8e, 0x05, 0x76, 0x31, 0xa4, 0xf1, 0x9d, 0xcf, 0x93, 0x39, 0x9c, 0x9c, 0xb0, - 0x97, 0xc8, 0xa3, 0xfd, 0x71, 0x76, 0xb4, 0xcf, 0x42, 0x29, 0xb7, 0xad, 0x12, 0x48, 0x61, 0xba, - 0x3f, 0x49, 0xce, 0x6e, 0x85, 0x5e, 0x6b, 0xd5, 0x6b, 0x7b, 0x9d, 0xa6, 0x1f, 0x6d, 0x76, 0xf6, - 0x72, 0xcf, 0x55, 0xcd, 0xb3, 0xcf, 0x72, 0xee, 0xd9, 0x67, 0x44, 0x1c, 0xb3, 0x01, 0x11, 0x94, - 0xf2, 0x2e, 0x99, 0x0c, 0x78, 0x53, 0x82, 0x6b, 0x2f, 0xe7, 0xb9, 0x7f, 0xfa, 0xfa, 0x68, 0x04, - 0x59, 0x70, 0x00, 0x48, 0x92, 0x68, 0x2b, 0x64, 0xf9, 0x8b, 0xf2, 0xcd, 0x31, 0xf7, 0x2f, 0x94, - 0xc8, 0xfc, 0xcd, 0xd4, 0x3d, 0x28, 0x8c, 0x98, 0xf2, 0xa3, 0x0c, 0xe7, 0x57, 0x83, 0x41, 0x41, - 0x94, 0x3e, 0x70, 0x43, 0xfc, 0x2f, 0x96, 0x49, 0x95, 0x45, 0x38, 0x76, 0xbd, 0xe6, 0x28, 0x95, - 0xd2, 0x1b, 0x96, 0x52, 0x9a, 0x63, 0x06, 0xaa, 0x0e, 0x0d, 0xd2, 0x49, 0xf1, 0x26, 0x9c, 0xb8, - 0x17, 0x54, 0xc8, 0x02, 0xd4, 0x04, 0xf9, 0x15, 0x92, 0x39, 0xfb, 0x1a, 0x91, 0xbc, 0x33, 0xc4, - 0xce, 0x2d, 0x15, 0xee, 0xc3, 0x77, 0x6e, 0xa9, 0xba, 0x36, 0x40, 0x2a, 0xd5, 0x8d, 0xde, 0x33, - 0xb1, 0xfd, 0x65, 0x16, 0xae, 0xe6, 0xb5, 0x83, 0x0f, 0x7c, 0x75, 0xbf, 0xee, 0x49, 0x11, 0x7d, - 0x26, 0xa0, 0x1f, 0x33, 0x01, 0x23, 0x7e, 0xf1, 0x6b, 0x93, 0xba, 0x8a, 0x7b, 0x8d, 0x72, 0xaa, - 0x3d, 0x77, 0xce, 0x6b, 0x64, 0xbc, 0xbb, 0xef, 0xc5, 0x7e, 0x2a, 0xb2, 0x62, 0xbc, 0x8e, 0x40, - 0x4a, 0x6d, 0x4e, 0x55, 0x60, 0x10, 0xe0, 0xd8, 0xee, 0x1f, 0x53, 0x59, 0x8f, 0x57, 0x77, 0x47, - 0xc8, 0x63, 0xd7, 0x2c, 0x1e, 0x7b, 0x2e, 0xff, 0x62, 0xf1, 0x40, 0xf6, 0xaa, 0xa7, 0xd8, 0xeb, - 0xf9, 0x02, 0xb4, 0x8e, 0xe7, 0xac, 0x03, 0x32, 0xcd, 0x2e, 0x2e, 0x8b, 0x90, 0x92, 0x57, 0x2c, - 0x03, 0xea, 0xc9, 0x94, 0x01, 0x35, 0x6f, 0xa0, 0x1a, 0x66, 0xd4, 0x0b, 0x64, 0x52, 0x04, 0x3b, - 0xa4, 0x63, 0xf4, 0x04, 0x2e, 0xc8, 0x72, 0xf7, 0x57, 0x2b, 0xc4, 0xba, 0x28, 0xed, 0x7c, 0xaf, - 0x44, 0xa8, 0xd2, 0xc2, 0x2e, 0x08, 0xb4, 0x6a, 0x3d, 0xf4, 0x88, 0xa1, 0xd3, 0xaa, 0xd5, 0x6b, - 0xd3, 0xff, 0x36, 0xf7, 0x3a, 0xa1, 0x02, 0xa3, 0xf7, 0xa6, 0xc7, 0xfc, 0xa7, 0x85, 0xef, 0x67, - 0xab, 0xd3, 0xce, 0x2b, 0xb4, 0x2f, 0xcb, 0x30, 0x54, 0x2b, 0x30, 0x64, 0xaf, 0x9c, 0xdf, 0x2d, - 0x91, 0x4b, 0xfc, 0xaa, 0x70, 0xf1, 0x91, 0x14, 0x32, 0x3c, 0xeb, 0x92, 0xa8, 0x26, 0x87, 0x21, - 0x81, 0xab, 0xaf, 0x8b, 0x49, 0xbe, 0x54, 0x1f, 0xae, 0x55, 0x18, 0xb6, 0x9b, 0xee, 0xbf, 0xac, - 0xd0, 0xf5, 0x4b, 0xe7, 0x53, 0x5f, 0x9d, 0x7c, 0xcd, 0x62, 0x93, 0xa7, 0x53, 0x6c, 0x72, 0xc6, - 0x42, 0x7e, 0x30, 0xb7, 0x26, 0x13, 0x72, 0x06, 0x4f, 0x14, 0xaf, 0xf9, 0x5e, 0x94, 0xec, 0xf8, - 0x1e, 0x3b, 0x5a, 0x14, 0x8b, 0x60, 0xa8, 0xe3, 0x4a, 0x15, 0x41, 0xb3, 0x95, 0xa6, 0x06, 0xfd, - 0x0d, 0x38, 0xf7, 0x88, 0xc3, 0xce, 0x31, 0x23, 0x8f, 0x2a, 0x5d, 0x6c, 0x30, 0x81, 0x70, 0xb9, - 0x0e, 0xd9, 0xec, 0x92, 0x68, 0xd6, 0xd9, 0xea, 0x23, 0x07, 0x19, 0x4d, 0x18, 0x87, 0xd5, 0xe3, - 0x45, 0x0f, 0xab, 0x27, 0x72, 0xc2, 0x63, 0x7f, 0xae, 0x44, 0xce, 0xe2, 0x87, 0xb1, 0x43, 0x29, - 0x63, 0x27, 0x24, 0xf3, 0x38, 0x82, 0xb6, 0x9f, 0x48, 0x98, 0x58, 0x61, 0x39, 0xba, 0xb4, 0x4d, - 0x47, 0x6b, 0x6c, 0xd7, 0x6d, 0x62, 0x90, 0xa6, 0xee, 0xfe, 0x6a, 0x89, 0x4c, 0x61, 0x47, 0x4e, - 0x63, 0x1f, 0xbb, 0x6a, 0xef, 0x63, 0x6e, 0xbe, 0xd0, 0x18, 0xb0, 0x85, 0xbd, 0x4a, 0x16, 0xb0, - 0xb4, 0x1e, 0x85, 0xf7, 0x8f, 0xa4, 0x72, 0x9d, 0xef, 0x7d, 0xfd, 0xf3, 0x25, 0x2e, 0xee, 0x94, - 0x56, 0x7c, 0x0f, 0x43, 0xc1, 0xf4, 0x6f, 0x5c, 0xc8, 0x52, 0x09, 0x5c, 0x2e, 0x2e, 0xd0, 0xd8, - 0xfa, 0x37, 0x62, 0xc1, 0x52, 0x04, 0xa1, 0xbf, 0x0d, 0xf7, 0xef, 0x94, 0xc8, 0xa3, 0x26, 0xa2, - 0x71, 0x29, 0x2b, 0xcf, 0xe5, 0x59, 0x23, 0x53, 0x61, 0x17, 0x13, 0x83, 0x28, 0x0b, 0xe0, 0x79, - 0x39, 0xe3, 0xb7, 0x04, 0x9c, 0xae, 0xdc, 0x73, 0x26, 0x75, 0x09, 0x07, 0x55, 0xd3, 0x71, 0xc9, - 0x04, 0xb3, 0x44, 0x63, 0x71, 0x9d, 0x8e, 0x20, 0x37, 0x33, 0x47, 0x3f, 0x5d, 0xe4, 0xbc, 0xc4, - 0xfd, 0xcb, 0x25, 0x3e, 0xcb, 0x66, 0xd7, 0x9d, 0x6f, 0x92, 0x85, 0x03, 0x34, 0x16, 0xd6, 0xef, - 0x77, 0x71, 0x0b, 0x61, 0x07, 0x95, 0xa5, 0x22, 0x82, 0x73, 0xc0, 0x70, 0x57, 0x17, 0x45, 0xef, - 0x17, 0x6e, 0xa4, 0xc8, 0x42, 0x5f, 0x43, 0xee, 0xef, 0x09, 0x5e, 0x65, 0x5a, 0x0b, 0x5d, 0x6c, - 0xdd, 0xb0, 0xb5, 0xb6, 0x59, 0x03, 0x31, 0x57, 0x6a, 0xb1, 0xd5, 0x39, 0x18, 0x64, 0x39, 0x9e, - 0xbc, 0xf9, 0xd4, 0x54, 0x8b, 0xa8, 0xc2, 0xb2, 0x59, 0x4b, 0x67, 0xb7, 0x58, 0x57, 0x25, 0x60, - 0x60, 0x61, 0x9d, 0x6e, 0x14, 0x1e, 0x06, 0x2d, 0x16, 0x1c, 0x5d, 0xb1, 0xeb, 0xd4, 0x55, 0x09, - 0x18, 0x58, 0x68, 0xa2, 0xf5, 0x3a, 0x31, 0x17, 0xe0, 0xde, 0x8e, 0xc8, 0x1d, 0x30, 0xa5, 0x4d, - 0xb4, 0x77, 0xcc, 0x42, 0xb0, 0x71, 0xdd, 0x1f, 0x54, 0x09, 0xd1, 0x2a, 0x02, 0x7a, 0x08, 0xa7, - 0x9a, 0x1e, 0x55, 0x90, 0x78, 0x12, 0x94, 0x4a, 0xfe, 0x2d, 0x12, 0x5d, 0x79, 0x79, 0x4d, 0x54, - 0xe4, 0xbe, 0xad, 0x97, 0x25, 0x83, 0x48, 0x70, 0xae, 0x3f, 0x4b, 0xb5, 0xec, 0x7c, 0xab, 0x44, - 0xa6, 0xbd, 0x36, 0x5e, 0x1b, 0x4d, 0xd8, 0x88, 0xca, 0x45, 0x9c, 0x95, 0x46, 0x4f, 0x56, 0x74, - 0x5d, 0xde, 0x99, 0x57, 0xe4, 0xb9, 0x95, 0x51, 0x92, 0xdb, 0x1f, 0xb3, 0x0b, 0xce, 0xcb, 0x52, - 0xb5, 0xe4, 0x1f, 0x65, 0x29, 0xad, 0x5a, 0x56, 0x99, 0x68, 0x30, 0xb4, 0x4a, 0xbc, 0x8f, 0x61, - 0x44, 0x8a, 0x8f, 0x15, 0xb9, 0xc9, 0x69, 0x6d, 0x9a, 0x79, 0x37, 0xe4, 0xf1, 0xb4, 0x49, 0xc7, - 0xac, 0x8e, 0x17, 0xb9, 0x26, 0x69, 0xe8, 0x6e, 0x39, 0xf1, 0xaa, 0x09, 0x99, 0x6f, 0xd9, 0x9b, - 0x84, 0x08, 0x42, 0xba, 0x9c, 0xdf, 0x42, 0x6a, 0x77, 0xd1, 0xdb, 0x42, 0xaa, 0x00, 0xd2, 0x4d, - 0xd0, 0x11, 0x4d, 0xa1, 0xd8, 0xda, 0xec, 0xec, 0x86, 0x22, 0x0e, 0xe9, 0xa5, 0x02, 0xdf, 0xfc, - 0x28, 0xa6, 0xe2, 0x19, 0xeb, 0xe8, 0x6d, 0xe0, 0xa6, 0xa0, 0x02, 0x8a, 0x1e, 0xba, 0x89, 0xd8, - 0x1d, 0x04, 0xbc, 0xb9, 0x5a, 0x19, 0xe2, 0x3a, 0x06, 0xbb, 0xc1, 0xa0, 0x37, 0x5f, 0xf6, 0x93, - 0x8a, 0x2b, 0x4e, 0x8b, 0xea, 0xf5, 0xe2, 0x62, 0x69, 0xbc, 0xd9, 0x79, 0x27, 0xf6, 0xd9, 0x6d, - 0xd5, 0xea, 0xea, 0x33, 0xfa, 0xfa, 0x29, 0x87, 0x67, 0x26, 0xc1, 0xb1, 0x6a, 0xe2, 0x1e, 0x2c, - 0x7e, 0xcb, 0xdc, 0x3a, 0x8b, 0xa4, 0x48, 0x47, 0xed, 0x4c, 0x3c, 0x7a, 0xb2, 0x6f, 0xdb, 0xc4, - 0x20, 0x4d, 0x7d, 0x29, 0x20, 0xb3, 0xd6, 0x8a, 0x1d, 0xa1, 0xb3, 0xb3, 0x4d, 0x16, 0xd2, 0x4b, - 0x72, 0x84, 0x3e, 0xce, 0x3f, 0x1a, 0x23, 0x73, 0x36, 0x63, 0x60, 0x8c, 0xc2, 0x01, 0x1d, 0x35, - 0xfd, 0x9e, 0x2a, 0x07, 0x89, 0xe2, 0xff, 0x1b, 0xb2, 0x00, 0x34, 0x0e, 0xcb, 0xc6, 0xc2, 0xaa, - 0xbf, 0xf3, 0x4e, 0xbf, 0xf0, 0x6e, 0xa8, 0x12, 0x30, 0xb0, 0x50, 0x61, 0xdb, 0x09, 0xc3, 0x44, - 0x09, 0x6e, 0xc5, 0x33, 0xab, 0x0c, 0x0a, 0xa2, 0x14, 0x05, 0xf6, 0x5d, 0x1c, 0x50, 0xdb, 0xf6, - 0x77, 0x29, 0x81, 0x7d, 0xdd, 0x2c, 0x04, 0x1b, 0x17, 0x37, 0xa0, 0x30, 0x66, 0x4c, 0x28, 0xd4, - 0x42, 0x1d, 0x6d, 0xd3, 0xe0, 0x77, 0x72, 0x64, 0xb9, 0xf3, 0x55, 0xf2, 0xa8, 0xba, 0x42, 0x03, - 0xdc, 0x7f, 0x28, 0x5b, 0x9c, 0xb0, 0x6c, 0xbb, 0x47, 0xd7, 0xb2, 0xd1, 0x60, 0x50, 0x7d, 0x3c, - 0xc4, 0x15, 0x2a, 0x9d, 0xa4, 0x38, 0x69, 0x1f, 0xe2, 0x5e, 0xb7, 0x4a, 0x21, 0x85, 0x4d, 0xf5, - 0x89, 0x05, 0x84, 0x30, 0x55, 0x4a, 0x52, 0xe0, 0x57, 0x81, 0xd4, 0xce, 0x7c, 0x3d, 0x55, 0x0e, - 0x7d, 0x35, 0xd0, 0x75, 0xc8, 0x75, 0x0b, 0xb4, 0x60, 0xd8, 0x77, 0x10, 0x71, 0x83, 0x6a, 0x11, - 0xdc, 0xb2, 0x8b, 0x21, 0x8d, 0x8f, 0xa7, 0xe0, 0x5e, 0x44, 0x3f, 0x7a, 0x42, 0x55, 0x84, 0x5e, - 0xc4, 0xef, 0x81, 0x1b, 0xa7, 0xe0, 0x2b, 0x46, 0x19, 0x58, 0x98, 0xee, 0x07, 0xe4, 0x6c, 0x46, - 0x78, 0x32, 0x32, 0x0e, 0x65, 0x50, 0x39, 0xa6, 0x54, 0xbc, 0x0d, 0x5e, 0x1b, 0x11, 0xa3, 0x31, - 0xb0, 0x90, 0x3b, 0x99, 0xe3, 0xd4, 0x48, 0x83, 0xa5, 0xb8, 0x73, 0x43, 0x16, 0x80, 0xc6, 0x71, - 0xbf, 0x43, 0x77, 0x6d, 0xed, 0x66, 0x28, 0x10, 0x65, 0x41, 0x87, 0x29, 0x33, 0xbb, 0x19, 0x59, - 0xa6, 0xd4, 0x30, 0xaf, 0x1a, 0x65, 0x60, 0x61, 0x62, 0xdf, 0x3a, 0xd2, 0x69, 0x92, 0x8e, 0xee, - 0x51, 0xde, 0x14, 0xd0, 0x38, 0xe8, 0xe3, 0x8b, 0xfd, 0xf6, 0xee, 0x56, 0xd0, 0xb9, 0x2b, 0x18, - 0x5b, 0x49, 0xe5, 0x86, 0x80, 0x83, 0xc2, 0x70, 0xde, 0x22, 0x95, 0x5e, 0xd0, 0x12, 0xac, 0xbc, - 0x2c, 0xf5, 0x4e, 0xba, 0x9a, 0xa8, 0xc4, 0x7c, 0x32, 0x3b, 0x5d, 0x1d, 0x9a, 0x91, 0xf1, 0x32, - 0x2e, 0x3e, 0xac, 0x9a, 0xe5, 0x3f, 0x9e, 0x18, 0xd2, 0x7f, 0x4c, 0xbf, 0x99, 0x18, 0xb3, 0xe4, - 0xe4, 0x8a, 0xfe, 0x66, 0x57, 0x55, 0x09, 0x18, 0x58, 0x68, 0x8c, 0x36, 0xa9, 0x01, 0x26, 0xad, - 0x35, 0x1e, 0x3b, 0x3b, 0xf5, 0x09, 0x8c, 0xd1, 0xb5, 0x34, 0x35, 0xe8, 0x6f, 0xc0, 0xe9, 0x92, - 0x33, 0x2d, 0x5c, 0x47, 0x56, 0xab, 0xd5, 0x13, 0x44, 0xec, 0x62, 0x8b, 0xb5, 0x34, 0x25, 0xe8, - 0x27, 0xee, 0x7c, 0x9d, 0x2c, 0x49, 0x60, 0xff, 0x25, 0x39, 0xb6, 0x5c, 0x2a, 0xab, 0x4f, 0x50, - 0x6a, 0x4b, 0xb5, 0x81, 0x58, 0x70, 0x0c, 0x05, 0xe7, 0x5d, 0x32, 0xc1, 0x4e, 0x1c, 0xe2, 0xc5, - 0x69, 0xb6, 0xdb, 0xbd, 0x5a, 0xd4, 0xe1, 0xb6, 0xcc, 0xce, 0x2d, 0x44, 0xc8, 0xa1, 0x3e, 0xc5, - 0x61, 0x40, 0x10, 0x34, 0xe9, 0x7c, 0x4d, 0x7b, 0x9d, 0x4e, 0x98, 0x78, 0x5c, 0x09, 0x9b, 0x29, - 0xa2, 0x47, 0x1a, 0x4d, 0xac, 0xe8, 0xba, 0xbc, 0x1d, 0x15, 0xff, 0x64, 0x94, 0x80, 0xd9, 0x04, - 0x6e, 0xe3, 0xe1, 0x3d, 0x14, 0x98, 0xd2, 0xe9, 0x1e, 0x2f, 0xce, 0x16, 0xd9, 0xc6, 0x6f, 0x59, - 0x95, 0x0c, 0x09, 0x66, 0x13, 0x83, 0x34, 0x75, 0x0c, 0xa8, 0x35, 0xfc, 0xa8, 0x73, 0x3a, 0xa0, - 0x56, 0xfb, 0x51, 0x4d, 0xb7, 0xe9, 0xd2, 0x9b, 0x64, 0xda, 0x98, 0xb9, 0x61, 0x42, 0x30, 0x97, - 0xbe, 0x44, 0xb7, 0xf1, 0xd4, 0x8c, 0x0c, 0x15, 0xc2, 0xf9, 0x3f, 0xca, 0x64, 0x3e, 0xe3, 0x48, - 0xe2, 0x6e, 0xc0, 0x82, 0x94, 0x2d, 0xd9, 0x75, 0x9d, 0xc2, 0x80, 0x95, 0xd8, 0x12, 0xa8, 0x5c, - 0x40, 0x02, 0x49, 0x71, 0x58, 0x19, 0x28, 0x0e, 0x85, 0xd4, 0x19, 0x3b, 0xb9, 0xd4, 0xb1, 0xc5, - 0xfc, 0x78, 0x21, 0x31, 0xff, 0x00, 0x24, 0x95, 0xb5, 0x53, 0x4c, 0x16, 0xd8, 0x29, 0x3e, 0x2e, - 0x91, 0x39, 0x9b, 0x85, 0x0a, 0xcc, 0xf8, 0xc3, 0x3a, 0x81, 0xcb, 0xcc, 0xa2, 0x4a, 0xa2, 0xb0, - 0xdd, 0xf6, 0x23, 0x11, 0xd4, 0x35, 0x27, 0x0c, 0x24, 0x01, 0x05, 0x03, 0xc3, 0xfd, 0xa5, 0x32, - 0x59, 0xd0, 0x11, 0xbe, 0x22, 0x55, 0xe5, 0xe8, 0x7c, 0xfc, 0xdb, 0x96, 0x8f, 0x3f, 0x2f, 0x03, - 0x65, 0xaa, 0x5f, 0x03, 0xfd, 0xfd, 0xef, 0xa6, 0xfc, 0xfd, 0xaf, 0x0e, 0x49, 0xf7, 0x78, 0xdf, - 0xff, 0x3f, 0x2e, 0x93, 0xf3, 0xe9, 0x2a, 0x6b, 0x6d, 0x2f, 0x38, 0x18, 0xe1, 0x3c, 0x7d, 0xd5, - 0x9a, 0xa7, 0xd7, 0x87, 0x1b, 0x0f, 0xeb, 0xdc, 0xc0, 0xc9, 0xf2, 0x52, 0x93, 0xf5, 0xe6, 0x49, - 0x88, 0x1f, 0x3f, 0x63, 0xff, 0xbe, 0x44, 0x1e, 0xcb, 0xac, 0x77, 0x1a, 0xbe, 0xcc, 0xaf, 0xd8, - 0xbe, 0xcc, 0x57, 0x4e, 0x30, 0xbc, 0x01, 0xce, 0xcd, 0xff, 0x52, 0x1e, 0x30, 0x2c, 0xe6, 0xf6, - 0xba, 0x45, 0xf7, 0xd1, 0x26, 0xdd, 0x6d, 0xe2, 0x1b, 0xd4, 0xae, 0x92, 0xa7, 0x75, 0x17, 0xd9, - 0x46, 0xa8, 0xc1, 0x74, 0xed, 0x2f, 0xa5, 0x49, 0xe8, 0x62, 0x30, 0x29, 0xd8, 0xa9, 0xa4, 0xca, - 0x23, 0x4a, 0x25, 0x45, 0x65, 0xcc, 0xa1, 0x32, 0xb7, 0xd3, 0xde, 0x34, 0xc3, 0x10, 0x37, 0xb0, - 0xa8, 0xbe, 0x83, 0xca, 0x29, 0x8f, 0x75, 0x18, 0xcb, 0x5d, 0x70, 0xd6, 0x07, 0x34, 0x03, 0x27, - 0xf8, 0x35, 0x45, 0xe5, 0x7a, 0x54, 0x34, 0xdd, 0xef, 0x54, 0xc8, 0xa7, 0x8f, 0x61, 0x3b, 0xba, - 0x49, 0x58, 0x47, 0x98, 0x2f, 0xa6, 0xfd, 0x4c, 0x4b, 0x99, 0x95, 0x2d, 0xc7, 0x53, 0xea, 0x63, - 0x95, 0x3f, 0xf1, 0xc7, 0xfa, 0x45, 0xd3, 0x2b, 0xc8, 0x63, 0x16, 0xaf, 0x9e, 0x78, 0x61, 0x3d, - 0x38, 0x37, 0xe1, 0x29, 0x7a, 0x30, 0x30, 0xed, 0xf0, 0xd3, 0x99, 0x83, 0xb2, 0x22, 0x25, 0xf0, - 0x56, 0x17, 0x02, 0x8d, 0x6b, 0x23, 0xfa, 0x56, 0x97, 0x2c, 0x00, 0x8d, 0x63, 0x05, 0x44, 0x94, - 0x73, 0x03, 0x22, 0xfe, 0x75, 0x89, 0x9c, 0x4b, 0x77, 0xe2, 0x34, 0xa4, 0x4e, 0xc3, 0x96, 0x3a, - 0xcb, 0xc3, 0x7d, 0xfb, 0x01, 0x02, 0xe7, 0x3f, 0x10, 0xf2, 0x48, 0xdf, 0x66, 0xc5, 0xa7, 0xf1, - 0xa7, 0x4b, 0xe4, 0xcc, 0x1e, 0x33, 0x14, 0x8c, 0xcb, 0x39, 0x62, 0x60, 0x39, 0x37, 0x93, 0x8e, - 0xbd, 0xd3, 0xc3, 0xcd, 0x9e, 0x3e, 0x14, 0xe8, 0x6f, 0xcc, 0xf9, 0x79, 0x3a, 0xd5, 0xde, 0xbd, - 0xb8, 0x2f, 0xef, 0xb9, 0xe0, 0xa3, 0x2f, 0xe5, 0xf8, 0xe4, 0x72, 0x32, 0xa6, 0xaf, 0x2e, 0x62, - 0xd0, 0x67, 0x16, 0x16, 0x64, 0xb6, 0x4a, 0x95, 0x00, 0x9e, 0x54, 0x0b, 0xd5, 0xbe, 0x42, 0xd7, - 0xc5, 0xb2, 0xae, 0x0a, 0x70, 0x99, 0x24, 0x4b, 0x40, 0x51, 0x74, 0xde, 0x23, 0xd5, 0x3d, 0x79, - 0x1f, 0x47, 0x08, 0xbd, 0x9c, 0x9d, 0x25, 0xf3, 0xfa, 0x0e, 0x0f, 0x57, 0x57, 0x45, 0xa0, 0x89, - 0x3a, 0xd7, 0x48, 0xa5, 0xb3, 0x1b, 0x8b, 0x2b, 0xb2, 0x79, 0x01, 0x31, 0x76, 0xf8, 0x11, 0xbf, - 0xf4, 0x47, 0x81, 0x80, 0x24, 0x90, 0x52, 0xb4, 0xd3, 0x12, 0xce, 0xe8, 0x1c, 0x4a, 0xb0, 0x5a, - 0xeb, 0xa7, 0x44, 0x81, 0x80, 0x24, 0x58, 0xe4, 0x1d, 0x5e, 0x2d, 0x10, 0x9e, 0xe6, 0x9c, 0xfb, - 0xd3, 0x7d, 0x17, 0x28, 0x78, 0x06, 0x36, 0x06, 0x06, 0x4e, 0x08, 0x5d, 0xcc, 0x4d, 0x96, 0xfe, - 0x58, 0x38, 0x02, 0xf2, 0x92, 0xe2, 0xf6, 0xa5, 0x4a, 0xe6, 0x27, 0x62, 0x1c, 0x0e, 0x82, 0x16, - 0xa3, 0xea, 0x77, 0xf7, 0x77, 0x63, 0x61, 0xe8, 0xe7, 0x51, 0xed, 0x4b, 0x64, 0x2d, 0xa8, 0x32, - 0x38, 0x08, 0x5a, 0x4e, 0x8d, 0x94, 0x77, 0x9b, 0x22, 0xed, 0x61, 0x8e, 0x69, 0x6a, 0xdf, 0xe0, - 0x5c, 0x9d, 0xc0, 0x50, 0xb8, 0x8d, 0x35, 0xa0, 0xf5, 0xa9, 0x3e, 0x32, 0xb9, 0xcb, 0x2f, 0xe5, - 0x89, 0x14, 0x87, 0x97, 0xf3, 0x2e, 0x0e, 0xf6, 0xdd, 0xe0, 0xe3, 0x57, 0x12, 0x44, 0x01, 0x48, - 0x72, 0x74, 0x1f, 0x26, 0xbb, 0xea, 0x96, 0xa1, 0xc8, 0x71, 0xb8, 0x3c, 0xdc, 0xad, 0x44, 0x61, - 0x06, 0x2b, 0x28, 0x18, 0x14, 0x91, 0xe7, 0x3d, 0x99, 0xc1, 0x9d, 0xe5, 0x37, 0xcc, 0xe5, 0xf9, - 0xcc, 0x84, 0xef, 0x9c, 0xe7, 0x55, 0x11, 0x68, 0xa2, 0x4e, 0x8f, 0xcc, 0x1e, 0xc6, 0xdd, 0x7d, - 0x5f, 0x2e, 0x7d, 0x96, 0xf4, 0x70, 0xfa, 0xca, 0x17, 0x73, 0x32, 0x59, 0x8a, 0x2a, 0x41, 0x94, - 0xf4, 0xbc, 0x76, 0x9f, 0x04, 0x63, 0xd9, 0x83, 0x6e, 0x9b, 0x64, 0xc1, 0x6e, 0xc5, 0xfd, 0xbd, - 0xf1, 0xfe, 0x4d, 0x82, 0xe9, 0x70, 0xbf, 0xd0, 0x7f, 0xb6, 0xf7, 0xd6, 0xf0, 0x36, 0xca, 0x03, - 0x3c, 0xe5, 0xa3, 0x32, 0xf6, 0x91, 0x6e, 0xe6, 0x0e, 0x20, 0xa4, 0xec, 0xb0, 0xa6, 0x0e, 0x9f, - 0x22, 0x95, 0xa6, 0x32, 0xbb, 0x1c, 0x06, 0xb4, 0x99, 0x56, 0x9b, 0x2a, 0x9f, 0x58, 0x6d, 0xba, - 0x43, 0xe7, 0x1b, 0x77, 0x7a, 0x9d, 0xa3, 0x61, 0xc8, 0xb4, 0x06, 0x4c, 0x5e, 0xaf, 0x09, 0x12, - 0xa0, 0x88, 0xe1, 0xc4, 0x3d, 0x9e, 0x1e, 0x04, 0xf8, 0xac, 0x58, 0xe4, 0xd7, 0xe4, 0xf6, 0xf4, - 0x86, 0x98, 0x89, 0xc7, 0xeb, 0xc7, 0x21, 0x7f, 0x9c, 0x87, 0x00, 0xc7, 0x37, 0x76, 0x9a, 0x6a, - 0xd8, 0xdf, 0x2f, 0x65, 0x28, 0x0d, 0x5c, 0x71, 0xfe, 0xa2, 0xad, 0x38, 0x3f, 0x97, 0x56, 0x9c, - 0xfb, 0xcc, 0x5c, 0x4b, 0x67, 0x2e, 0x9e, 0x63, 0xae, 0x68, 0x12, 0x09, 0xf7, 0x7f, 0x95, 0x48, - 0xa5, 0x1e, 0xb6, 0x46, 0x68, 0x48, 0x5f, 0xb5, 0x0c, 0xe9, 0x67, 0x73, 0x9f, 0xfa, 0x18, 0x68, - 0x36, 0xdf, 0x4a, 0x99, 0xcd, 0x9f, 0xcb, 0x27, 0x75, 0xbc, 0x91, 0xfc, 0x61, 0x85, 0x98, 0x8f, - 0x95, 0x38, 0xbf, 0x7d, 0x92, 0x10, 0xbf, 0x4a, 0xb1, 0xf7, 0x4b, 0x44, 0x1b, 0x2c, 0x20, 0x46, - 0xde, 0xff, 0xf9, 0x13, 0x1b, 0xe9, 0x77, 0xc7, 0x0f, 0xf6, 0xf6, 0x13, 0xbf, 0x95, 0x1e, 0xd8, - 0xe9, 0x45, 0xfa, 0xfd, 0xd7, 0x12, 0x99, 0x4f, 0xb5, 0xee, 0x1c, 0x64, 0x5d, 0x21, 0x38, 0xa9, - 0x65, 0x7c, 0x26, 0xf7, 0xd2, 0xc1, 0x32, 0x21, 0xca, 0x9b, 0x2b, 0xed, 0x57, 0xb6, 0x97, 0x2b, - 0x77, 0x6f, 0x0c, 0x06, 0x06, 0xe6, 0x00, 0x48, 0xc2, 0x6e, 0xd8, 0x0e, 0xf7, 0x8e, 0xae, 0xfb, - 0xf2, 0x0e, 0xba, 0x72, 0xd5, 0x6f, 0xeb, 0x22, 0x30, 0xf1, 0x30, 0x3f, 0x51, 0xfa, 0xad, 0x9b, - 0xff, 0xcf, 0xa8, 0x7f, 0x72, 0x18, 0xf5, 0x77, 0x4a, 0x64, 0x01, 0x5b, 0x67, 0xf1, 0x0c, 0x32, - 0x1e, 0x4f, 0x25, 0x6b, 0x2e, 0x1d, 0x93, 0xac, 0x19, 0x2f, 0x34, 0x24, 0xad, 0xb0, 0x27, 0x93, - 0x97, 0x18, 0x52, 0x0c, 0xa1, 0x20, 0x4a, 0x05, 0x1e, 0xed, 0x93, 0xb8, 0xac, 0x60, 0xe2, 0x51, - 0x28, 0x88, 0x52, 0x99, 0xcb, 0x79, 0x2c, 0x3b, 0x97, 0x33, 0xcf, 0xf5, 0x22, 0xce, 0xd1, 0xc5, - 0xce, 0x6c, 0xe4, 0x7a, 0x91, 0x07, 0xec, 0x1a, 0xc7, 0xfd, 0xa7, 0x15, 0x32, 0x83, 0xe1, 0x64, - 0x2a, 0xd6, 0xf6, 0x55, 0x2b, 0xd6, 0xf6, 0xa9, 0x54, 0xac, 0xed, 0x82, 0x89, 0xfb, 0x60, 0x42, - 0x6d, 0x45, 0x56, 0x20, 0x96, 0x6d, 0xfc, 0xa4, 0x61, 0xb6, 0x56, 0x56, 0x20, 0x45, 0x09, 0x6c, - 0xc2, 0x3f, 0x52, 0xe1, 0xb5, 0x7f, 0x5c, 0x22, 0x73, 0xf4, 0x5b, 0x20, 0x8b, 0xfe, 0x28, 0xf1, - 0xa3, 0x99, 0x4b, 0x68, 0xe2, 0x98, 0x5c, 0x42, 0xbf, 0x52, 0x22, 0x18, 0x05, 0x79, 0x1a, 0x1e, - 0xa9, 0x0d, 0xdb, 0x23, 0xf5, 0x74, 0xae, 0xf0, 0x1d, 0xe0, 0x84, 0xfa, 0xf5, 0x0a, 0x99, 0xc5, - 0x2e, 0x87, 0x7b, 0xf2, 0x83, 0x59, 0x93, 0x53, 0x2a, 0x30, 0x39, 0x98, 0x8f, 0x20, 0x6c, 0xb7, - 0xc3, 0x7b, 0xe9, 0x8f, 0xb7, 0xc1, 0xa0, 0x20, 0x4a, 0xd1, 0xd5, 0xd7, 0xc5, 0x9c, 0x29, 0x61, - 0x2f, 0x4e, 0xdf, 0x7d, 0xaa, 0x0b, 0x38, 0x28, 0x0c, 0xba, 0xe2, 0x67, 0xe2, 0x80, 0xda, 0x00, - 0xf2, 0xa0, 0x7d, 0x8c, 0x1d, 0xb4, 0xf3, 0x94, 0x6d, 0x06, 0x1c, 0x2c, 0x2c, 0xaa, 0x6a, 0x56, - 0xd9, 0x6f, 0xb6, 0x86, 0x4e, 0x90, 0x60, 0x9a, 0xe7, 0x13, 0x92, 0x14, 0x40, 0x13, 0x43, 0x57, - 0x7a, 0x22, 0x63, 0x02, 0x62, 0x71, 0xf4, 0xa6, 0x94, 0x53, 0x15, 0x2d, 0x80, 0xa9, 0x9b, 0xd4, - 0xff, 0xce, 0x8b, 0x98, 0x7f, 0x34, 0x68, 0x6f, 0xe1, 0xc3, 0x05, 0x22, 0xaa, 0x42, 0x24, 0x14, - 0x15, 0x40, 0xd0, 0xe5, 0xb8, 0xe7, 0xb3, 0x9b, 0x97, 0x3c, 0x7d, 0xfd, 0x14, 0xc3, 0x66, 0x7b, - 0xfe, 0x96, 0x82, 0x82, 0x81, 0xe1, 0xbe, 0xc2, 0xf6, 0xee, 0x21, 0x63, 0xb1, 0x3f, 0x2a, 0x13, - 0xa7, 0xce, 0x62, 0x0f, 0xac, 0x0c, 0xff, 0xfb, 0x64, 0x2e, 0xa6, 0xc6, 0x6a, 0xa7, 0x77, 0x5f, - 0x90, 0x2a, 0x16, 0xfd, 0xde, 0x58, 0x37, 0xeb, 0xf0, 0xdb, 0x86, 0x36, 0x0c, 0x52, 0x74, 0x71, - 0x4a, 0xa2, 0x5e, 0x67, 0x25, 0xc6, 0x77, 0xbf, 0x44, 0x8e, 0x7e, 0x36, 0x25, 0x20, 0x81, 0xa0, - 0xcb, 0x91, 0x07, 0xd8, 0x8f, 0x9b, 0x54, 0x1a, 0x85, 0x61, 0x22, 0xb9, 0x86, 0x25, 0x6c, 0x36, - 0xe0, 0x60, 0x61, 0x61, 0xae, 0xe3, 0xb8, 0xd7, 0xed, 0xb6, 0xd9, 0x09, 0x89, 0xd7, 0xbe, 0x1a, - 0x85, 0xbd, 0x2e, 0x0f, 0x3f, 0x15, 0xb9, 0x8e, 0x1b, 0x7d, 0xa5, 0x90, 0x51, 0x03, 0x17, 0xfd, - 0x6e, 0xcc, 0xfe, 0x17, 0xb7, 0x29, 0xb9, 0x9f, 0xa6, 0xc1, 0x40, 0x20, 0xcb, 0xdc, 0x1e, 0xdb, - 0xaa, 0x58, 0xee, 0x74, 0x0c, 0x8b, 0x72, 0x7c, 0x32, 0xdb, 0x65, 0xdb, 0x91, 0x3c, 0xa6, 0x2d, - 0x34, 0x95, 0xa9, 0xe8, 0x07, 0x9e, 0x23, 0xd9, 0x24, 0x03, 0x36, 0x55, 0xf7, 0xdf, 0x12, 0x26, - 0x6b, 0xc4, 0xe1, 0xd4, 0xa4, 0x88, 0x6d, 0x14, 0xba, 0xd8, 0x33, 0x45, 0x1e, 0x0b, 0xd1, 0x72, - 0x5c, 0x44, 0x4a, 0x82, 0xa4, 0xe2, 0x7c, 0x8d, 0x9f, 0x33, 0xb3, 0xf5, 0x5d, 0xfc, 0x39, 0x1e, - 0x8e, 0x6f, 0x45, 0xed, 0x0a, 0x12, 0x60, 0x90, 0x73, 0xb6, 0xc8, 0xac, 0x48, 0xb0, 0x2d, 0x6c, - 0xf5, 0x8a, 0x65, 0xaf, 0xce, 0x82, 0x59, 0xf8, 0x71, 0x1a, 0x00, 0x76, 0x65, 0x67, 0x8f, 0x3c, - 0x6e, 0xbc, 0xba, 0x91, 0x11, 0xa1, 0xc3, 0x05, 0xc7, 0xd3, 0xe8, 0x05, 0xd8, 0x3e, 0x0e, 0x11, - 0x8e, 0xa7, 0x43, 0x27, 0xf9, 0xbc, 0xd7, 0x4c, 0x82, 0x43, 0xbf, 0xe6, 0x7b, 0x2d, 0xaa, 0x95, - 0xf9, 0xf6, 0x55, 0xdb, 0xc7, 0x68, 0x03, 0xe7, 0x57, 0xb2, 0x10, 0x20, 0xbb, 0x1e, 0xb5, 0xd7, - 0xab, 0xad, 0x4e, 0x2c, 0xe6, 0x60, 0xc2, 0x7a, 0x60, 0xa4, 0x5a, 0xbb, 0xd9, 0x50, 0xe3, 0xd7, - 0x3f, 0x40, 0x57, 0x70, 0xde, 0xe7, 0x0f, 0x76, 0x2a, 0x83, 0x84, 0x3f, 0x6c, 0xf3, 0x7a, 0x21, - 0x13, 0xd8, 0xba, 0x15, 0xc0, 0xdd, 0x58, 0x2a, 0x12, 0xce, 0xba, 0x30, 0x60, 0x35, 0xe1, 0xfc, - 0x38, 0x5d, 0x58, 0x7e, 0x84, 0x0f, 0x51, 0xae, 0x34, 0x59, 0xb2, 0x42, 0x76, 0xca, 0x33, 0x65, - 0x85, 0x83, 0x3b, 0x8d, 0x3e, 0x0c, 0xc8, 0xa8, 0xe5, 0x5c, 0x43, 0x89, 0x63, 0x42, 0x45, 0xe0, - 0xa2, 0x54, 0xed, 0x16, 0x6b, 0x3e, 0xe6, 0x04, 0xc7, 0xe7, 0x0d, 0x6c, 0x8a, 0x90, 0xaa, 0x87, - 0xdb, 0x0a, 0xf6, 0x92, 0xf5, 0x85, 0xd8, 0xe1, 0x76, 0x37, 0x05, 0x1c, 0x14, 0x06, 0x5a, 0x4a, - 0xe8, 0xf5, 0xbf, 0xe9, 0x27, 0xf8, 0xda, 0x10, 0xf3, 0xd9, 0x4e, 0x19, 0x49, 0x9d, 0x74, 0x11, - 0x98, 0x78, 0xa8, 0x03, 0xb1, 0xc3, 0x82, 0xcd, 0x1a, 0xf3, 0xc4, 0x4e, 0xe9, 0xb5, 0x73, 0x8d, - 0x83, 0x41, 0x96, 0x4b, 0xd4, 0xcd, 0xfa, 0x1a, 0xf3, 0xaa, 0xa6, 0x50, 0x29, 0x18, 0x64, 0x39, - 0x86, 0x4a, 0xa5, 0x9f, 0x71, 0x99, 0x2b, 0xe2, 0xe1, 0xee, 0x97, 0xe0, 0x05, 0x5f, 0x72, 0xb9, - 0x4f, 0x16, 0xd4, 0x53, 0x32, 0x3c, 0x6b, 0x5e, 0xbc, 0x38, 0x5f, 0xe4, 0xb9, 0xd0, 0xcc, 0xe4, - 0x7b, 0x2a, 0x52, 0x75, 0x33, 0x45, 0x13, 0xfa, 0x5a, 0xb1, 0xae, 0x8c, 0x2f, 0xe4, 0x5d, 0x19, - 0x67, 0x2f, 0xb9, 0xf4, 0x76, 0x5a, 0xe1, 0x01, 0x15, 0x19, 0xec, 0x31, 0x19, 0xf3, 0x41, 0x50, - 0x59, 0x00, 0x1a, 0x67, 0xe9, 0xcb, 0xe4, 0x4c, 0x1f, 0x4f, 0x0f, 0x15, 0x99, 0xf5, 0x0b, 0x63, - 0xa4, 0xaa, 0xbc, 0x3a, 0xb4, 0x7d, 0xcb, 0x95, 0xf6, 0x58, 0xda, 0x95, 0x36, 0x85, 0x3b, 0xaf, - 0xe9, 0x3d, 0xfb, 0x7a, 0xc6, 0x8b, 0x80, 0x17, 0x72, 0x3f, 0x62, 0xf1, 0x9b, 0x0e, 0x43, 0xbc, - 0x97, 0xa8, 0xd5, 0xfa, 0xb1, 0x63, 0xd5, 0xfa, 0x82, 0x6f, 0xc4, 0xa0, 0x02, 0x4f, 0x77, 0x1e, - 0x8a, 0x96, 0x7a, 0xff, 0xa0, 0x8e, 0x40, 0xe0, 0x65, 0x4c, 0xef, 0x42, 0xa1, 0xcc, 0xf4, 0xae, - 0xc9, 0x93, 0xea, 0x5d, 0x92, 0x02, 0x68, 0x62, 0x98, 0x37, 0xbc, 0x69, 0xbf, 0x67, 0xa1, 0x2e, - 0x30, 0x5c, 0x1c, 0xe2, 0x3d, 0x89, 0x9e, 0x91, 0x37, 0x7c, 0x2d, 0x4d, 0x0f, 0xfa, 0x9b, 0xc0, - 0xdb, 0xe6, 0xf3, 0x8a, 0x21, 0xe8, 0x0e, 0x84, 0x79, 0x7b, 0x46, 0xe7, 0xc8, 0xbc, 0x65, 0x59, - 0xaa, 0x0f, 0xc0, 0xff, 0xf8, 0x5b, 0x25, 0xe6, 0x7f, 0xdc, 0xf6, 0x0f, 0xba, 0x6d, 0x7c, 0x24, - 0x63, 0x74, 0x5d, 0xff, 0x1a, 0x99, 0x4a, 0x44, 0x2b, 0xc5, 0x72, 0x17, 0x1b, 0xdd, 0x62, 0xfe, - 0x58, 0x25, 0x08, 0x24, 0x14, 0x14, 0x41, 0xf7, 0x5f, 0xf0, 0xaf, 0x20, 0x4b, 0x4e, 0xc3, 0xb2, - 0xba, 0x69, 0x5b, 0x56, 0x2f, 0x14, 0x1e, 0xcc, 0x00, 0x0b, 0xeb, 0x3b, 0xf6, 0x10, 0x98, 0xc2, - 0xf6, 0xf0, 0x7b, 0xc4, 0xdd, 0x1b, 0xc4, 0x7e, 0xa3, 0x83, 0xaa, 0x2b, 0x2c, 0xe2, 0x91, 0x4b, - 0xc4, 0x0b, 0x43, 0x46, 0x3b, 0xba, 0xbf, 0x56, 0x26, 0xe7, 0xb2, 0xde, 0x9c, 0x76, 0x5a, 0x64, - 0xa6, 0x6b, 0xa8, 0xcf, 0xc5, 0x2e, 0xb6, 0x9b, 0x0a, 0xb7, 0x56, 0x5d, 0x4c, 0x28, 0x58, 0x54, - 0x31, 0x63, 0x38, 0xbe, 0xa0, 0xad, 0xdc, 0x2b, 0xe5, 0xe1, 0x45, 0x94, 0x6a, 0x66, 0xdd, 0x20, - 0x04, 0x16, 0xd9, 0x11, 0xa4, 0xd7, 0x76, 0xff, 0x6e, 0x89, 0x3c, 0x3a, 0xe0, 0xf6, 0x3b, 0x36, - 0x77, 0x8f, 0x79, 0x21, 0xc5, 0x1b, 0x30, 0xaa, 0x39, 0xee, 0x9b, 0x04, 0x51, 0xea, 0xec, 0xe0, - 0xa5, 0x4a, 0xf5, 0xca, 0x65, 0xb9, 0xc8, 0x51, 0x72, 0xdf, 0x4d, 0x5b, 0xe3, 0x12, 0xa6, 0x7a, - 0xd7, 0xd2, 0xa0, 0xea, 0x7e, 0xbb, 0x42, 0xc6, 0xf9, 0xdb, 0x7c, 0x75, 0xaa, 0x00, 0xf1, 0x64, - 0x7b, 0xc3, 0xe5, 0xfa, 0xd3, 0x7a, 0x12, 0x07, 0x80, 0x24, 0xe3, 0xdc, 0x20, 0x67, 0xd1, 0xbf, - 0x1a, 0x78, 0xed, 0x9a, 0xdf, 0xf6, 0x8e, 0xa4, 0xe2, 0xcd, 0x53, 0x22, 0xcb, 0xac, 0x9f, 0x67, - 0x37, 0xfb, 0x51, 0x20, 0xab, 0x1e, 0xde, 0xdd, 0x49, 0x65, 0xcb, 0xe1, 0xa9, 0x1a, 0xd5, 0xdd, - 0x9d, 0xe3, 0x33, 0xe6, 0xe0, 0xf5, 0xa5, 0x6e, 0x9f, 0x89, 0x61, 0x3c, 0xea, 0x66, 0x9b, 0x15, - 0x36, 0x2e, 0x5e, 0xfc, 0x89, 0x7b, 0xec, 0x8c, 0x74, 0x7b, 0x9f, 0x5a, 0x32, 0xfb, 0x61, 0xbb, - 0x25, 0x1e, 0x23, 0x52, 0xea, 0x54, 0x23, 0x55, 0x0e, 0x7d, 0x35, 0x90, 0xca, 0xae, 0x17, 0xb4, - 0x29, 0x6b, 0x6b, 0x2a, 0x13, 0x36, 0x95, 0x8d, 0x54, 0x39, 0xf4, 0xd5, 0xc0, 0x4c, 0xcf, 0xf3, - 0xa9, 0x10, 0x11, 0x54, 0xd4, 0x52, 0x6f, 0x7e, 0x33, 0x7b, 0x1b, 0x83, 0x27, 0x32, 0xde, 0xfd, - 0x7e, 0xce, 0x7e, 0x45, 0x54, 0xc7, 0x6e, 0xad, 0xd6, 0xac, 0xf7, 0x91, 0x8a, 0x66, 0xaa, 0xfe, - 0x2c, 0xa6, 0x91, 0x55, 0xcf, 0xdd, 0x29, 0x8e, 0xa0, 0xe4, 0xea, 0x14, 0x0c, 0xac, 0x90, 0x1a, - 0xe6, 0xfc, 0x29, 0xf1, 0x94, 0xe7, 0x0e, 0xbc, 0x56, 0x18, 0x1b, 0xef, 0x89, 0xd3, 0x45, 0x46, - 0x75, 0x3e, 0x74, 0x99, 0xa7, 0xfd, 0x96, 0xd7, 0x39, 0x18, 0x64, 0xb9, 0x9d, 0x8d, 0x7a, 0x72, - 0xc4, 0xd9, 0xa8, 0xa7, 0x72, 0xc3, 0xdc, 0x7e, 0x99, 0x6e, 0x19, 0x2c, 0x41, 0x97, 0xb8, 0x33, - 0x88, 0x1e, 0xf0, 0xd1, 0x6d, 0x19, 0xf8, 0x7e, 0x16, 0x36, 0x96, 0x4e, 0x40, 0xcb, 0x7a, 0x00, - 0xbc, 0x0c, 0x9f, 0x78, 0x65, 0x4d, 0xe3, 0xe7, 0x9b, 0xe1, 0xa9, 0x64, 0xf5, 0x13, 0xc9, 0x2c, - 0x88, 0x1a, 0xfc, 0x2e, 0x35, 0x4c, 0x59, 0x67, 0xb5, 0x9b, 0xe2, 0x61, 0x09, 0xa2, 0xce, 0xec, - 0xdc, 0x83, 0x0a, 0xa2, 0xce, 0x26, 0x9e, 0x1f, 0x44, 0x9d, 0x59, 0xef, 0xe1, 0x0b, 0xa2, 0xce, - 0xec, 0xe6, 0x00, 0x65, 0xe7, 0xa3, 0xf2, 0x80, 0x61, 0x31, 0xb5, 0xe7, 0x79, 0x5c, 0x05, 0xac, - 0x30, 0x16, 0x3b, 0xd6, 0x0c, 0x5f, 0x01, 0x1c, 0x06, 0xaa, 0xd4, 0x89, 0x8d, 0x20, 0x64, 0xde, - 0xc9, 0xf5, 0x13, 0x7e, 0xe0, 0x65, 0xdb, 0xcf, 0x61, 0x5e, 0xc5, 0x4b, 0x45, 0x26, 0x63, 0xb8, - 0x8a, 0xd2, 0x64, 0x2b, 0x27, 0xd1, 0x64, 0x67, 0xb2, 0xb5, 0xd8, 0x25, 0xba, 0x61, 0x9c, 0xdc, - 0x32, 0xfd, 0x6f, 0x25, 0xf2, 0xe9, 0x63, 0x38, 0x8c, 0x8b, 0x16, 0x6b, 0x52, 0x0d, 0xd1, 0xd2, - 0x37, 0xb1, 0x75, 0x72, 0x6e, 0x97, 0x9a, 0xe5, 0x47, 0xec, 0xf8, 0xd9, 0x6f, 0x49, 0x0c, 0xb1, - 0x97, 0xaa, 0x37, 0xf7, 0x36, 0x32, 0x70, 0x20, 0xb3, 0x26, 0x7a, 0x85, 0xc2, 0x1d, 0x96, 0x00, - 0xad, 0xa5, 0x6f, 0x0a, 0xb2, 0xf9, 0xab, 0x68, 0xaf, 0xd0, 0xad, 0x3e, 0x0c, 0xc8, 0xa8, 0xe5, - 0xfe, 0x7e, 0x09, 0xe5, 0x48, 0xc6, 0x6b, 0x34, 0xd6, 0x43, 0xaa, 0x46, 0x70, 0x71, 0xff, 0x43, - 0xaa, 0xcc, 0xdf, 0x63, 0xe3, 0xf2, 0x29, 0x8a, 0x75, 0x60, 0x95, 0x95, 0xce, 0x5d, 0x04, 0xd5, - 0x2b, 0x0c, 0x7c, 0x78, 0xa9, 0x15, 0x1c, 0x06, 0x71, 0x18, 0x15, 0x78, 0xb7, 0xb0, 0x2f, 0x58, - 0x47, 0xef, 0x32, 0x35, 0x4e, 0x04, 0x24, 0x35, 0xf7, 0xaf, 0x95, 0xc9, 0xac, 0x6c, 0xef, 0xed, - 0x5e, 0xc8, 0x16, 0xe2, 0xa8, 0xa4, 0xe3, 0xdb, 0x96, 0x74, 0xbc, 0x54, 0xec, 0x66, 0x01, 0xeb, - 0xd4, 0x40, 0xa9, 0xf8, 0xd5, 0x94, 0x54, 0xbc, 0x3c, 0x0c, 0xd1, 0x5c, 0x6b, 0xf5, 0x8c, 0x85, - 0xff, 0x10, 0x25, 0x9e, 0xcc, 0x1a, 0xce, 0x00, 0xe9, 0xf7, 0xed, 0x72, 0x6a, 0x18, 0x4c, 0xea, - 0x7d, 0x93, 0x8c, 0xed, 0x7b, 0x51, 0x4b, 0xb8, 0xe6, 0xdf, 0x1c, 0xf2, 0x53, 0x50, 0xf5, 0x38, - 0x6a, 0x71, 0xd9, 0xf5, 0x92, 0xca, 0x81, 0x4f, 0x41, 0xb9, 0x61, 0x86, 0xac, 0x51, 0xe7, 0x0d, - 0xcc, 0x91, 0x1f, 0x76, 0x55, 0x14, 0xc9, 0x53, 0x3c, 0x3f, 0x3e, 0x42, 0x28, 0x05, 0xc7, 0x6e, - 0x0e, 0xc1, 0x20, 0xf0, 0x97, 0x7c, 0x52, 0x55, 0x4d, 0x8f, 0x30, 0xa0, 0xed, 0x0f, 0x2a, 0xe4, - 0x6c, 0x06, 0xab, 0x38, 0x3f, 0x65, 0xcd, 0xda, 0x17, 0x86, 0xe6, 0xb5, 0x4f, 0x38, 0x6f, 0x3f, - 0xc5, 0x74, 0xcc, 0x96, 0xe0, 0x8d, 0x13, 0x34, 0x4f, 0x15, 0xd1, 0x74, 0xf3, 0x08, 0xca, 0x6f, - 0x1e, 0x9b, 0x3d, 0xa5, 0xc9, 0xc7, 0x66, 0x54, 0x3f, 0x47, 0xf8, 0x8d, 0x7f, 0x76, 0x8c, 0x9c, - 0xcb, 0xba, 0xbd, 0xe4, 0xfc, 0x5c, 0x29, 0x95, 0xba, 0xf6, 0x4b, 0xc3, 0x5f, 0x81, 0xe2, 0xf9, - 0x6c, 0xc5, 0xf5, 0xe4, 0x65, 0x3b, 0x99, 0x6d, 0xee, 0x6c, 0x8b, 0xd6, 0x59, 0x68, 0x70, 0xc4, - 0xb3, 0x10, 0x4b, 0x79, 0xf0, 0xd6, 0x09, 0xba, 0x22, 0x12, 0x19, 0xc7, 0xa9, 0xd0, 0x60, 0x09, - 0xce, 0x0f, 0x0d, 0x96, 0x7d, 0x58, 0xda, 0xc3, 0x14, 0xb6, 0x6a, 0x5c, 0x23, 0x64, 0x81, 0x00, - 0xf7, 0x24, 0xa3, 0xd7, 0x23, 0x64, 0x83, 0xbf, 0x51, 0x22, 0xa9, 0xe3, 0x61, 0x3c, 0xb1, 0x66, - 0xa6, 0x5c, 0xea, 0xc4, 0xda, 0xb0, 0xe2, 0x28, 0x06, 0x55, 0x77, 0xfc, 0x74, 0x4e, 0x55, 0xa0, - 0x30, 0x60, 0x25, 0xea, 0xc5, 0xac, 0xca, 0xa0, 0x17, 0xb3, 0xd0, 0xc2, 0x69, 0xfb, 0x87, 0xbe, - 0x34, 0x2b, 0x95, 0xf0, 0xde, 0x42, 0x20, 0xf0, 0x32, 0xf7, 0x7b, 0x15, 0x32, 0xc1, 0x6d, 0xb7, - 0x11, 0x6e, 0xcb, 0x75, 0x61, 0x46, 0x15, 0xba, 0x47, 0xc4, 0x7b, 0xb3, 0x8c, 0x76, 0x16, 0x67, - 0x28, 0x35, 0x36, 0x6d, 0x7a, 0x39, 0xcb, 0xd6, 0xe8, 0x97, 0x52, 0x91, 0x51, 0x84, 0xd3, 0x30, - 0xe6, 0x62, 0x9f, 0x90, 0x98, 0x3d, 0xba, 0x82, 0x34, 0x44, 0x52, 0xa6, 0x57, 0x0b, 0xf5, 0xa3, - 0xa1, 0xaa, 0xf1, 0xde, 0xe8, 0x6c, 0x30, 0xaa, 0x00, 0x0c, 0xda, 0x4b, 0xaf, 0x93, 0xaa, 0x42, - 0xce, 0xd3, 0x78, 0x67, 0x4c, 0x96, 0xfc, 0x53, 0x64, 0x3e, 0xd5, 0xd6, 0x50, 0x0a, 0xf3, 0x77, - 0xa9, 0x32, 0xd1, 0xf7, 0xd8, 0x1f, 0x26, 0xf6, 0x3a, 0xd7, 0xce, 0x30, 0xda, 0xc5, 0x07, 0x3e, - 0x89, 0xb9, 0xaf, 0x5f, 0xa8, 0xce, 0x28, 0x85, 0xcc, 0xd6, 0x64, 0x9a, 0xb9, 0x72, 0x76, 0x9a, - 0x39, 0xf6, 0x0e, 0x05, 0xef, 0xfb, 0x69, 0x68, 0x40, 0x9b, 0xb6, 0x06, 0xf4, 0x4c, 0x11, 0x36, - 0x18, 0xa0, 0xfa, 0xfc, 0xd5, 0x12, 0x71, 0x38, 0x42, 0xfa, 0xf1, 0x25, 0xee, 0x04, 0x31, 0x74, - 0x76, 0xcd, 0x37, 0xaa, 0x04, 0x0c, 0xac, 0x21, 0xd3, 0xee, 0xaa, 0x47, 0x4b, 0x06, 0x74, 0xec, - 0xb7, 0x2a, 0x24, 0x7d, 0x2e, 0xea, 0xbc, 0x47, 0x66, 0xf0, 0x0e, 0xc6, 0x4e, 0xd0, 0x0e, 0x92, - 0xc0, 0x8f, 0x8b, 0xf9, 0x9c, 0xd7, 0x8c, 0x1a, 0xc2, 0x27, 0x66, 0x40, 0xc0, 0xa2, 0x88, 0xc1, - 0x3c, 0xdd, 0x88, 0xaa, 0xfd, 0x6d, 0x7f, 0x8f, 0x29, 0x11, 0xea, 0xa2, 0x7e, 0x5d, 0x41, 0xc1, - 0xc0, 0xc8, 0x08, 0xc0, 0xa9, 0x9c, 0x46, 0x00, 0xce, 0xd8, 0x90, 0x01, 0x38, 0xe3, 0x85, 0x02, - 0x70, 0x80, 0x3c, 0x22, 0x5d, 0x59, 0xf8, 0x1b, 0xef, 0x02, 0xf1, 0x24, 0x51, 0x22, 0x6c, 0x6a, - 0x09, 0xef, 0xa6, 0x40, 0x26, 0x06, 0x0c, 0xa8, 0xe9, 0xf6, 0xc8, 0xd9, 0x86, 0x1f, 0x05, 0x2c, - 0x87, 0x47, 0x4b, 0x2f, 0xa7, 0xaf, 0xe3, 0x2d, 0x6a, 0x7b, 0x25, 0x0f, 0x79, 0xc5, 0xc4, 0xb8, - 0x40, 0x2d, 0x57, 0xae, 0x26, 0xe9, 0xfe, 0xb9, 0x32, 0x99, 0x14, 0xf1, 0x07, 0x23, 0xdc, 0x15, - 0xae, 0x5b, 0xc6, 0xda, 0x0b, 0x79, 0xcb, 0x90, 0x75, 0x67, 0xa0, 0x99, 0xd6, 0x48, 0x99, 0x69, - 0x2f, 0x16, 0x23, 0x77, 0xbc, 0x81, 0xf6, 0x9b, 0x65, 0xba, 0x75, 0xdb, 0x71, 0x17, 0xa3, 0x9b, - 0x8e, 0xaf, 0x90, 0xc9, 0x58, 0x04, 0x27, 0x14, 0x7a, 0x20, 0x3a, 0xfd, 0x49, 0xf5, 0xd3, 0xc7, - 0x22, 0x1c, 0x41, 0x92, 0xcb, 0x8c, 0x7f, 0xa8, 0x9c, 0x46, 0xfc, 0x83, 0xfb, 0x3d, 0x26, 0x1f, - 0xcd, 0x09, 0x3c, 0x0d, 0x01, 0xff, 0xb6, 0x2d, 0x4a, 0x5f, 0x2a, 0xc4, 0x0a, 0xa2, 0x7f, 0x03, - 0xe4, 0xe9, 0x87, 0x25, 0x32, 0x2d, 0x10, 0x4f, 0x63, 0x04, 0x3f, 0x6e, 0x8f, 0xe0, 0xd9, 0x42, - 0x23, 0x18, 0xd0, 0xf5, 0xbf, 0x55, 0x56, 0x5d, 0x2f, 0xf8, 0x06, 0xbb, 0xf9, 0xc2, 0x7a, 0x79, - 0x98, 0x17, 0xd6, 0xd5, 0xeb, 0xed, 0x95, 0x81, 0xaf, 0xb7, 0xef, 0xc8, 0x77, 0x40, 0x11, 0x26, - 0xe2, 0xbd, 0x87, 0x7d, 0x37, 0x4f, 0x07, 0xa0, 0x2a, 0x4a, 0x60, 0x50, 0x95, 0xb1, 0x51, 0xac, - 0x85, 0x71, 0xdb, 0x37, 0x78, 0x53, 0xc0, 0x41, 0x61, 0xb8, 0xaf, 0x33, 0x19, 0xcb, 0xa6, 0x67, - 0xb8, 0xa8, 0xd2, 0x1f, 0x8c, 0xab, 0x89, 0x65, 0x1e, 0x8f, 0x9b, 0xf2, 0xcd, 0xf5, 0x52, 0x91, - 0x23, 0x74, 0xe3, 0x93, 0x64, 0x3f, 0xb9, 0xee, 0xf8, 0x7d, 0xde, 0xe0, 0xd7, 0x0b, 0xcb, 0xc8, - 0x21, 0xfc, 0xbf, 0x2c, 0x79, 0x01, 0xbb, 0xb0, 0xbd, 0x59, 0x4f, 0x67, 0x7a, 0x5b, 0x93, 0x05, - 0xa0, 0x71, 0x68, 0x05, 0xae, 0x7b, 0xdb, 0xcf, 0x0f, 0x4a, 0xdd, 0x5b, 0x4e, 0x89, 0xa1, 0x7c, - 0x5f, 0x26, 0xd3, 0x2a, 0xd7, 0x6d, 0x9d, 0xa7, 0x2c, 0xad, 0xae, 0xce, 0x63, 0xe4, 0xd9, 0xba, - 0x06, 0x83, 0x89, 0x43, 0x75, 0xb4, 0xb3, 0x2d, 0x15, 0x0a, 0x57, 0xef, 0xed, 0xb4, 0x83, 0x26, - 0x56, 0xe5, 0x61, 0xe8, 0x8f, 0xe2, 0xb9, 0x67, 0xad, 0xbf, 0x18, 0xb2, 0xea, 0x38, 0xdb, 0x18, - 0x6e, 0xc6, 0x72, 0xfa, 0xca, 0x0b, 0x2b, 0x22, 0x83, 0xd2, 0x05, 0x99, 0x7e, 0xa9, 0x61, 0x17, - 0x7f, 0xcc, 0x40, 0x5c, 0x28, 0x08, 0x10, 0xa4, 0x49, 0xe0, 0x69, 0x6a, 0xdb, 0x7c, 0x9b, 0xa3, - 0x2e, 0x22, 0x02, 0xd5, 0x69, 0xaa, 0xf5, 0x72, 0x47, 0x1d, 0x52, 0xd8, 0x54, 0xda, 0x2f, 0x9a, - 0x10, 0x71, 0x47, 0x15, 0x0f, 0x9d, 0x62, 0x91, 0x4c, 0xf4, 0x33, 0x18, 0x0f, 0xb8, 0x35, 0x00, - 0x07, 0x06, 0xd6, 0xfe, 0x64, 0x6e, 0xf7, 0x6f, 0x62, 0x65, 0x63, 0x6b, 0x74, 0xbe, 0x41, 0x66, - 0xcc, 0x96, 0x84, 0xb0, 0x7b, 0xb9, 0xf8, 0xab, 0x25, 0x62, 0x8b, 0x55, 0x71, 0x04, 0x66, 0x19, - 0x58, 0xb4, 0xdd, 0x26, 0x99, 0x4f, 0xbd, 0x8b, 0xa8, 0x1e, 0xd8, 0x2c, 0x3d, 0xa8, 0x07, 0x36, - 0x31, 0xa3, 0xc7, 0xf8, 0xb6, 0x17, 0xe4, 0xe7, 0xbe, 0x2e, 0xf4, 0x88, 0xfe, 0x6b, 0x64, 0xc2, - 0xdf, 0xdd, 0xc5, 0x07, 0xcc, 0xf9, 0xca, 0x79, 0x5c, 0x3d, 0x9b, 0xcc, 0xa0, 0xb8, 0x1e, 0x58, - 0x63, 0xfc, 0x27, 0x08, 0x64, 0xf7, 0xdf, 0x50, 0x83, 0x67, 0x9b, 0x5a, 0xf1, 0x22, 0xa9, 0x60, - 0x4e, 0x4f, 0x56, 0xfb, 0xb2, 0x70, 0x3f, 0x97, 0x91, 0x85, 0xdb, 0xd1, 0x04, 0x33, 0x72, 0x70, - 0xab, 0xd1, 0x54, 0x0a, 0x8d, 0x66, 0x6c, 0x98, 0xd1, 0x7c, 0xab, 0x44, 0x26, 0xc4, 0xf5, 0xfa, - 0xfc, 0xcd, 0xa5, 0x25, 0x33, 0xe7, 0x5a, 0x57, 0xbe, 0x2f, 0x14, 0x09, 0xdd, 0x16, 0x17, 0xbd, - 0x15, 0x2b, 0x59, 0xd7, 0xbb, 0x2d, 0xaa, 0x68, 0x0d, 0x4f, 0xf3, 0xe2, 0x1b, 0xf2, 0x7d, 0xf1, - 0x9c, 0x7e, 0x0d, 0x95, 0x92, 0x85, 0x25, 0x96, 0x45, 0xc2, 0x2a, 0x33, 0x87, 0x99, 0x58, 0x56, - 0x16, 0x80, 0xc6, 0xc1, 0x63, 0xf9, 0xb8, 0xb7, 0xc3, 0xd0, 0x53, 0xa7, 0xfc, 0x0d, 0x0e, 0x06, - 0x59, 0xee, 0x7e, 0x38, 0x4f, 0xac, 0xa1, 0x59, 0x59, 0x40, 0x4a, 0x0f, 0x3c, 0x0b, 0x08, 0xa5, - 0xee, 0x1f, 0x74, 0x93, 0xa3, 0x5a, 0x10, 0x15, 0xcb, 0xc8, 0xb4, 0x2e, 0xb0, 0xfb, 0xa9, 0xcb, - 0x12, 0x50, 0x14, 0x07, 0xe4, 0x74, 0xa9, 0x3c, 0x14, 0x39, 0x5d, 0xc6, 0xfe, 0x9f, 0xe4, 0x74, - 0xa1, 0x7a, 0xfe, 0x1e, 0x7f, 0xb0, 0x59, 0x5c, 0xd5, 0xc9, 0x39, 0x51, 0xca, 0x78, 0xdd, 0x99, - 0xdf, 0xc9, 0x10, 0x05, 0x20, 0xc9, 0x61, 0xc6, 0x10, 0xae, 0xf2, 0x8b, 0x34, 0x29, 0x2f, 0x17, - 0xf1, 0x6c, 0xf4, 0x67, 0x0c, 0x11, 0xa1, 0x1c, 0x82, 0x96, 0xcc, 0xe1, 0x32, 0xf9, 0xc9, 0x73, - 0xb8, 0xa8, 0xcc, 0x2b, 0x53, 0x0f, 0x2a, 0xf3, 0x8a, 0x95, 0xc1, 0xa6, 0x3a, 0x8a, 0x0c, 0x36, - 0x54, 0xb6, 0x9d, 0xef, 0x66, 0x25, 0x80, 0x12, 0x39, 0x54, 0xbe, 0x7c, 0x82, 0x84, 0x58, 0x56, - 0xd3, 0xec, 0x06, 0x45, 0x26, 0x1a, 0x64, 0x37, 0x2c, 0x53, 0xe1, 0x4c, 0x7f, 0xf2, 0x54, 0x38, - 0xa3, 0x4e, 0xb6, 0xa2, 0x13, 0xe3, 0xcc, 0x8e, 0x24, 0x31, 0xce, 0xdc, 0x03, 0x4c, 0x8c, 0x63, - 0xa4, 0xb4, 0x99, 0x7f, 0xb0, 0x29, 0x6d, 0xf6, 0xc9, 0x74, 0x2b, 0xbc, 0xd7, 0xb9, 0xe7, 0x45, - 0xad, 0x95, 0xfa, 0x26, 0xbb, 0x07, 0x90, 0x7b, 0xcd, 0xba, 0xa6, 0x2b, 0x58, 0x2d, 0x30, 0xad, - 0xd9, 0x28, 0x04, 0x93, 0xb4, 0x48, 0xee, 0x73, 0xe6, 0x13, 0x26, 0xf7, 0xb1, 0x52, 0xe4, 0x38, - 0xa3, 0x48, 0x91, 0xf3, 0x1e, 0xbb, 0x6c, 0xb9, 0x1b, 0xec, 0xdd, 0xf0, 0xba, 0x8b, 0x67, 0x8b, - 0xb4, 0xb0, 0x26, 0xd1, 0xfb, 0x5b, 0x50, 0x45, 0xa0, 0x89, 0xf6, 0x27, 0xe1, 0x39, 0x77, 0x2a, - 0x49, 0x78, 0xfe, 0x0c, 0x79, 0xe2, 0x78, 0x1a, 0x3a, 0x37, 0x61, 0x5d, 0x1b, 0x97, 0xa9, 0xdc, - 0x84, 0x6c, 0x7f, 0x36, 0xb0, 0x8c, 0x30, 0xc2, 0xf2, 0x71, 0x61, 0x84, 0xee, 0x3f, 0x29, 0x91, - 0x47, 0x07, 0xdc, 0xcf, 0x2f, 0x1c, 0x34, 0xdb, 0x25, 0xf3, 0x5d, 0xbb, 0x6a, 0xe1, 0xf0, 0x76, - 0x2b, 0x1f, 0x80, 0xca, 0x6d, 0x9b, 0x2a, 0x80, 0x34, 0xf9, 0xd5, 0x67, 0xbe, 0xff, 0x07, 0x4f, - 0x7c, 0xea, 0x23, 0xfa, 0xf7, 0xbb, 0xf4, 0xef, 0xa7, 0xff, 0xf0, 0x89, 0xd2, 0xf7, 0xe9, 0xdf, - 0x47, 0xf4, 0xef, 0x3f, 0xd3, 0xbf, 0x6f, 0xfd, 0xd1, 0x13, 0x9f, 0xfa, 0x89, 0xf2, 0xe1, 0xe5, - 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x44, 0x9a, 0xbd, 0xf4, 0xd9, 0xab, 0x00, 0x00, + 0xf5, 0x07, 0x3f, 0x7c, 0x72, 0xea, 0xb6, 0x28, 0x07, 0x85, 0xe1, 0x3c, 0x47, 0x26, 0x76, 0xe3, + 0xed, 0xa3, 0xae, 0xbf, 0x58, 0x66, 0xb8, 0x73, 0x02, 0x77, 0x62, 0xa3, 0x81, 0xa5, 0x20, 0xa0, + 0xce, 0x25, 0x52, 0xed, 0x7a, 0x51, 0x12, 0x24, 0x74, 0xec, 0x8b, 0x15, 0x8a, 0x3a, 0xbe, 0x7a, + 0x46, 0xa0, 0x56, 0xeb, 0x12, 0x00, 0x1a, 0x07, 0xbb, 0x11, 0xf9, 0x5e, 0xeb, 0x56, 0xa7, 0x7d, + 0xb4, 0x38, 0x46, 0xf1, 0xa7, 0x74, 0x37, 0x40, 0x94, 0x83, 0xc2, 0x70, 0x3f, 0x2c, 0x93, 0xa9, + 0x95, 0xdd, 0xdd, 0xa0, 0x13, 0x24, 0x47, 0xce, 0x7b, 0x64, 0xa6, 0x13, 0xb6, 0x7c, 0xf9, 0x9b, + 0x8d, 0x62, 0xfa, 0xca, 0x85, 0xe5, 0xe3, 0xf8, 0x62, 0xf9, 0xa6, 0x51, 0x63, 0x75, 0x81, 0x36, + 0x33, 0x63, 0x96, 0x80, 0x45, 0xd1, 0x79, 0x97, 0x4c, 0x77, 0xc3, 0x96, 0x6a, 0xa0, 0xcc, 0x1a, + 0x78, 0xe1, 0xf8, 0x06, 0xea, 0xba, 0xc2, 0xea, 0x3c, 0xa5, 0x3f, 0x6d, 0x14, 0x80, 0x49, 0xce, + 0x69, 0x93, 0x79, 0xfc, 0x49, 0x3f, 0xbb, 0x6a, 0xa1, 0xc2, 0x5a, 0xb8, 0x98, 0xdf, 0x82, 0x51, + 0x69, 0xf5, 0x2c, 0x6d, 0x65, 0x3e, 0x55, 0x08, 0x69, 0xd2, 0xee, 0x07, 0x64, 0x6e, 0x25, 0x49, + 0xbc, 0xe6, 0xbe, 0xdf, 0xe2, 0xdf, 0xd7, 0x79, 0x95, 0x8c, 0x75, 0xbc, 0x03, 0x5f, 0x7c, 0xfd, + 0xa7, 0xc4, 0xb4, 0x8f, 0xdd, 0xa4, 0x65, 0x1f, 0xff, 0xf0, 0xc9, 0x85, 0x77, 0x3a, 0xc1, 0xfb, + 0x3d, 0xc1, 0x33, 0x58, 0x06, 0x0c, 0xdb, 0xb9, 0x42, 0x48, 0xcb, 0x3f, 0x0c, 0x9a, 0x7e, 0xdd, + 0x4b, 0xf6, 0x05, 0x37, 0x38, 0xa2, 0x2e, 0xa9, 0x29, 0x08, 0x18, 0x58, 0xee, 0xcf, 0x94, 0x48, + 0x75, 0xe5, 0x30, 0x0c, 0x5a, 0xb4, 0x97, 0xb1, 0xd3, 0xa3, 0xe3, 0x8e, 0xfc, 0x5d, 0x3f, 0x52, + 0x45, 0xb4, 0x0b, 0x15, 0x3a, 0xee, 0x2b, 0x39, 0xe3, 0xb6, 0x2b, 0xad, 0x77, 0x92, 0xe8, 0x68, + 0xf5, 0x51, 0xd1, 0xf4, 0x7c, 0x0a, 0x0a, 0xe9, 0x36, 0xdc, 0x7f, 0x50, 0x22, 0xe7, 0x57, 0x3e, + 0xe8, 0x45, 0xfe, 0x46, 0xd0, 0xb6, 0x97, 0x02, 0x1d, 0x52, 0xec, 0x37, 0x23, 0x3f, 0xb9, 0xa9, + 0xa7, 0x43, 0x0d, 0xa9, 0xa1, 0x20, 0x60, 0x60, 0x21, 0xa3, 0xc7, 0xfb, 0x5e, 0xc4, 0x66, 0x46, + 0xcc, 0x82, 0x62, 0xf4, 0x86, 0x04, 0x80, 0xc6, 0xb1, 0x18, 0xbd, 0x92, 0xcb, 0xe8, 0xff, 0xac, + 0x44, 0x26, 0x57, 0x83, 0x4e, 0x2b, 0xe8, 0xec, 0x39, 0x5f, 0x21, 0x53, 0x07, 0x7e, 0xe2, 0xb5, + 0xbc, 0xc4, 0x13, 0x3c, 0xfe, 0xfc, 0xf1, 0x13, 0x75, 0x6b, 0xe7, 0x1b, 0x7e, 0x33, 0xb9, 0x41, + 0xeb, 0xe8, 0x61, 0xe8, 0x32, 0x50, 0xd4, 0x9c, 0x77, 0xc8, 0x44, 0xe2, 0x45, 0x7b, 0x7e, 0x22, + 0x58, 0xfb, 0x62, 0x11, 0xba, 0x80, 0xd3, 0xea, 0x77, 0x9a, 0xbe, 0x16, 0x02, 0xdb, 0x8c, 0x08, + 0x08, 0x62, 0x6e, 0x93, 0xcc, 0xac, 0x79, 0x5d, 0x6f, 0x27, 0x68, 0xd3, 0x35, 0xee, 0xc7, 0xce, + 0xe7, 0x48, 0xc5, 0x6b, 0xb5, 0xd8, 0x47, 0xae, 0xae, 0x9e, 0xa7, 0x15, 0x2a, 0x2b, 0xad, 0x16, + 0x65, 0x31, 0xa2, 0xb0, 0x8e, 0x00, 0x31, 0x9c, 0x0b, 0x64, 0xac, 0x15, 0x85, 0x5d, 0xda, 0x1b, + 0xc4, 0x7c, 0x04, 0xb9, 0xb1, 0x46, 0x7f, 0xa7, 0x50, 0x19, 0x8e, 0xfb, 0xaf, 0xca, 0xc4, 0x59, + 0xf3, 0xbb, 0xfb, 0x1b, 0x0d, 0xeb, 0x5b, 0x3e, 0x4f, 0x27, 0x2b, 0xa4, 0x0c, 0x1f, 0x46, 0xb1, + 0x68, 0x70, 0x06, 0xa7, 0xf8, 0x86, 0x28, 0x03, 0x05, 0x75, 0x9e, 0x22, 0x63, 0x5d, 0xcd, 0xc2, + 0x33, 0x92, 0xfd, 0x19, 0xf3, 0x32, 0x08, 0x62, 0xf4, 0x62, 0x3f, 0x62, 0x9f, 0xcb, 0xc0, 0x78, + 0x87, 0x96, 0x01, 0x83, 0x68, 0xce, 0x41, 0x9e, 0x62, 0xf2, 0xab, 0x8f, 0x73, 0x10, 0x02, 0x06, + 0x96, 0xf3, 0x93, 0x94, 0x73, 0xd8, 0x2f, 0x3a, 0x91, 0x8b, 0xe3, 0x6c, 0xde, 0x73, 0x18, 0x7f, + 0x2b, 0x6c, 0x7a, 0xed, 0xf4, 0xe4, 0xcf, 0x32, 0x4e, 0x93, 0x84, 0x40, 0xd3, 0xb4, 0x38, 0x6d, + 0x22, 0x97, 0xd3, 0xfe, 0x7a, 0x89, 0xce, 0x23, 0xe5, 0x34, 0x3f, 0x3a, 0x85, 0xed, 0x61, 0xb8, + 0x45, 0xf0, 0xfb, 0xd8, 0xb5, 0xf0, 0xa0, 0x4b, 0xb7, 0xd1, 0x4e, 0xb2, 0x16, 0xd2, 0xd5, 0xc0, + 0xb6, 0x8c, 0xcf, 0x93, 0xb1, 0x04, 0x9b, 0xe2, 0xdd, 0x7a, 0x4e, 0x7e, 0x16, 0x6c, 0x80, 0x72, + 0xca, 0x23, 0xfd, 0x35, 0x58, 0x17, 0x58, 0x1d, 0xe7, 0x4d, 0x32, 0x11, 0x27, 0x5e, 0xd2, 0x8b, + 0x45, 0x47, 0x9f, 0x96, 0x1d, 0x6d, 0xb0, 0x52, 0x5a, 0x7f, 0x5e, 0x55, 0xe3, 0x45, 0x20, 0x2a, + 0x38, 0x2f, 0x90, 0xc9, 0x03, 0x3f, 0x8e, 0xbd, 0x3d, 0x5f, 0x30, 0xc4, 0xbc, 0xa8, 0x3b, 0x79, + 0x83, 0x17, 0x83, 0x84, 0x3b, 0x9f, 0x25, 0xe3, 0x7e, 0x14, 0x85, 0x91, 0xe0, 0x88, 0x59, 0x81, + 0x38, 0xbe, 0x8e, 0x85, 0xc0, 0x61, 0xee, 0x0f, 0x4a, 0x64, 0x5e, 0xf5, 0x95, 0xb7, 0x35, 0xc2, + 0xa5, 0xde, 0x22, 0xa4, 0x29, 0x07, 0x16, 0xb3, 0x05, 0x36, 0x7d, 0xe5, 0xe5, 0xe3, 0x69, 0xf7, + 0x4f, 0xa4, 0x6e, 0x43, 0x15, 0xc5, 0x60, 0xd0, 0x75, 0xbf, 0x5f, 0x22, 0x67, 0x53, 0x63, 0xda, + 0x0a, 0xe2, 0xc4, 0xf9, 0xd3, 0x7d, 0xe3, 0xba, 0x74, 0x4c, 0xdb, 0x86, 0xf6, 0xb4, 0x8c, 0xd5, + 0xd9, 0xf0, 0x14, 0xa3, 0xc8, 0x12, 0x63, 0x70, 0x40, 0xc6, 0x83, 0xc4, 0x3f, 0x90, 0xe3, 0xba, + 0x58, 0x70, 0x5c, 0xbc, 0x83, 0xfa, 0xf3, 0x6c, 0x22, 0x0d, 0xe0, 0xa4, 0xdc, 0xff, 0x49, 0xf7, + 0x2c, 0x3a, 0xca, 0xdd, 0x60, 0xef, 0x86, 0xd7, 0x1d, 0xe1, 0x87, 0x69, 0x50, 0x99, 0x87, 0x54, + 0x79, 0xd7, 0x2f, 0xe7, 0x75, 0x5d, 0x74, 0x68, 0xb9, 0x46, 0xeb, 0xf0, 0x1d, 0x50, 0xc9, 0x25, + 0x2c, 0x02, 0x46, 0x6c, 0xe9, 0x75, 0x52, 0x55, 0x08, 0xce, 0x02, 0xa9, 0xdc, 0xf5, 0xb9, 0x7a, + 0x54, 0x05, 0xfc, 0xd7, 0x39, 0x47, 0xc6, 0x0f, 0xbd, 0x76, 0x4f, 0xac, 0x56, 0xe0, 0x3f, 0x3e, + 0x5f, 0x7e, 0xa3, 0xe4, 0xfe, 0x46, 0x89, 0x9c, 0x53, 0x8d, 0x5c, 0xf7, 0x8f, 0x1a, 0x7e, 0x9b, + 0x76, 0x39, 0x8c, 0x9c, 0x9f, 0xa5, 0x80, 0x76, 0x86, 0x1c, 0x12, 0xb3, 0x71, 0x12, 0x09, 0xf6, + 0x19, 0xd1, 0xf1, 0x73, 0x59, 0x50, 0xc8, 0x6c, 0xcd, 0x79, 0x9c, 0x8f, 0x85, 0x2f, 0xde, 0x69, + 0x41, 0xa0, 0x42, 0x3b, 0xca, 0x06, 0x86, 0xdd, 0x9f, 0x55, 0xdd, 0x3f, 0x0d, 0xce, 0xdb, 0xb2, + 0x39, 0xef, 0x73, 0x05, 0x3f, 0xdf, 0x00, 0x9e, 0xfb, 0xef, 0x54, 0x45, 0x51, 0x38, 0x96, 0x38, + 0x7e, 0x48, 0xa6, 0x7f, 0xb8, 0xe1, 0xd2, 0xcf, 0xb2, 0x1d, 0xe2, 0x7e, 0x3a, 0x60, 0xb8, 0xbf, + 0x5d, 0x65, 0x4b, 0x2c, 0xf1, 0x02, 0x6a, 0xbf, 0xe0, 0x6e, 0x6b, 0xa8, 0xa3, 0x33, 0xa6, 0x3a, + 0x2a, 0x54, 0x4f, 0x2a, 0x56, 0x83, 0x03, 0x94, 0xbf, 0x65, 0x5b, 0xac, 0x6e, 0x62, 0x21, 0x70, + 0x98, 0xf3, 0x2c, 0x99, 0xa4, 0x36, 0xdf, 0x81, 0xd7, 0x69, 0x51, 0x31, 0x8d, 0xfb, 0xff, 0x34, + 0x8a, 0xe8, 0x35, 0x5e, 0x04, 0x12, 0xe6, 0x7c, 0x86, 0x8c, 0x51, 0x65, 0x25, 0xa6, 0x12, 0x1a, + 0x71, 0xa6, 0xb0, 0xa5, 0x15, 0xfa, 0x1b, 0x58, 0x29, 0xee, 0xeb, 0xf7, 0xc2, 0xe8, 0x2e, 0xd5, + 0xbe, 0x6a, 0x41, 0xc4, 0x36, 0x69, 0x63, 0x5f, 0xbf, 0xa3, 0x20, 0x60, 0x60, 0x39, 0x75, 0x32, + 0xde, 0x0d, 0xa3, 0x24, 0xa6, 0x7b, 0x2e, 0xce, 0xcd, 0x8b, 0xb9, 0xac, 0xc0, 0xc7, 0x5d, 0xa7, + 0x75, 0xf4, 0x50, 0xf0, 0x17, 0x9d, 0x1f, 0x46, 0xc8, 0x59, 0x23, 0x15, 0xbf, 0x73, 0xb8, 0x38, + 0xc9, 0xe8, 0x3d, 0x73, 0x3c, 0xbd, 0xf5, 0xce, 0xe1, 0x6d, 0x2f, 0xd2, 0x4b, 0x82, 0xfe, 0x06, + 0xac, 0xed, 0x34, 0x49, 0x55, 0x5a, 0xb0, 0xf1, 0xe2, 0x54, 0x11, 0x6e, 0x01, 0x81, 0x0e, 0xfe, + 0xfb, 0xbd, 0x20, 0xf2, 0x0f, 0xa8, 0xa4, 0x8c, 0xb5, 0x72, 0x2b, 0xa1, 0x31, 0x68, 0xba, 0xb4, + 0x91, 0x19, 0xae, 0x0b, 0xdc, 0x08, 0xa9, 0x19, 0x1b, 0x2f, 0x56, 0x59, 0x97, 0x73, 0x2c, 0xa5, + 0xdb, 0xba, 0xc6, 0xea, 0x39, 0x41, 0x7e, 0xc6, 0x28, 0x8c, 0xc1, 0x22, 0x4a, 0xad, 0xb1, 0xd9, + 0x76, 0x70, 0x48, 0x6d, 0xdd, 0x38, 0xae, 0x47, 0xe1, 0x8e, 0xbf, 0x48, 0xd8, 0x68, 0x3e, 0x9b, + 0x67, 0x35, 0x50, 0xd4, 0xd5, 0x33, 0x94, 0xf6, 0xec, 0x96, 0x59, 0x1b, 0x6c, 0x62, 0x54, 0x2d, + 0x9b, 0x43, 0xc5, 0x23, 0xd0, 0xe4, 0xa7, 0x8b, 0x93, 0x77, 0x28, 0xf9, 0x39, 0xb0, 0xaa, 0x43, + 0x8a, 0x9c, 0xb3, 0x4d, 0xaa, 0xed, 0x60, 0xd7, 0x6f, 0x1e, 0x35, 0xa9, 0xaa, 0x38, 0xc3, 0x68, + 0xe7, 0xac, 0x9f, 0x2d, 0x89, 0xce, 0x95, 0x3d, 0xf5, 0x13, 0x34, 0x21, 0xe7, 0x36, 0x79, 0x24, + 0xf1, 0xa3, 0x83, 0xa0, 0xe3, 0xe1, 0x0e, 0x2c, 0x34, 0x11, 0x66, 0x9a, 0xcd, 0x32, 0xae, 0x7d, + 0x42, 0x4c, 0xec, 0x23, 0xdb, 0x99, 0x58, 0x30, 0xa0, 0xb6, 0x73, 0x8b, 0xcc, 0xb3, 0xf5, 0x54, + 0xef, 0xb5, 0xdb, 0xf5, 0xb0, 0x1d, 0x34, 0x8f, 0x16, 0xe7, 0x18, 0xc1, 0x67, 0xa5, 0xc1, 0xb5, + 0x69, 0x83, 0x51, 0x49, 0xd7, 0xbf, 0x20, 0x5d, 0x1b, 0xad, 0x5d, 0xaa, 0xa2, 0xf6, 0x22, 0xaa, + 0xc1, 0x23, 0xef, 0xfb, 0xf7, 0x93, 0xc5, 0xf9, 0x22, 0x46, 0x47, 0xc3, 0xae, 0xc4, 0xad, 0xdd, + 0x54, 0x21, 0xa4, 0x49, 0xa3, 0xa8, 0x88, 0x13, 0x3a, 0xfb, 0x8b, 0x0b, 0x4c, 0xcb, 0x54, 0xeb, + 0xab, 0x81, 0x85, 0xc0, 0x61, 0xcc, 0x86, 0xc3, 0x7f, 0x6e, 0xa1, 0x20, 0x3d, 0xc3, 0x10, 0xb5, + 0x0d, 0x27, 0x01, 0xa0, 0x71, 0x70, 0xf7, 0x49, 0xa8, 0x95, 0xee, 0x30, 0x54, 0xb5, 0xd4, 0xb6, + 0xb7, 0xbf, 0x0a, 0x58, 0xee, 0xee, 0x90, 0x39, 0xb5, 0xac, 0xd9, 0xec, 0x38, 0x4f, 0x92, 0x71, + 0x94, 0x5c, 0xd2, 0x14, 0xa9, 0x62, 0x17, 0x50, 0xa0, 0xd1, 0x25, 0xce, 0xca, 0x59, 0x17, 0x82, + 0x0f, 0xfc, 0xd5, 0x23, 0x3a, 0x6a, 0x26, 0xd6, 0x2a, 0x46, 0x17, 0x24, 0x00, 0x34, 0x8e, 0xfb, + 0xbf, 0xf9, 0x0e, 0xa7, 0x65, 0x47, 0x01, 0xb9, 0x49, 0xb5, 0xee, 0xfd, 0x30, 0x4e, 0x10, 0x9b, + 0xb5, 0x31, 0xae, 0xb7, 0xb4, 0x6b, 0xa2, 0x1c, 0x14, 0x86, 0xf3, 0x05, 0x32, 0xdb, 0x34, 0x1b, + 0x10, 0x6e, 0x9c, 0xf3, 0xa2, 0x8a, 0xdd, 0x3a, 0xd8, 0xb8, 0xce, 0x1b, 0x64, 0x8a, 0xf9, 0xa0, + 0x9a, 0x61, 0x5b, 0x28, 0xbf, 0x72, 0x9b, 0x99, 0xaa, 0x8b, 0xf2, 0x8f, 0x8d, 0xff, 0x41, 0x61, + 0xa3, 0x09, 0x81, 0x5d, 0xd8, 0xac, 0x0b, 0x71, 0xab, 0x4c, 0x88, 0x6b, 0xac, 0x14, 0x04, 0xd4, + 0xfd, 0x95, 0xb2, 0x31, 0xcb, 0xa8, 0xc1, 0xf9, 0xce, 0x4f, 0x90, 0xc9, 0x7b, 0x1e, 0xd5, 0x40, + 0x3b, 0x7b, 0x62, 0x3b, 0x7c, 0xa5, 0xa0, 0xec, 0x65, 0xd5, 0xef, 0xf0, 0xaa, 0x7c, 0x9f, 0x10, + 0x3f, 0x40, 0x12, 0x44, 0xda, 0x51, 0xaf, 0xd3, 0x41, 0xda, 0xe5, 0xe1, 0x69, 0x03, 0xaf, 0xca, + 0x69, 0x8b, 0x1f, 0x20, 0x09, 0x3a, 0xbb, 0x84, 0xc8, 0xd5, 0xe7, 0xb7, 0x84, 0xef, 0xe7, 0xc7, + 0x86, 0x21, 0xbf, 0xad, 0x6a, 0xaf, 0xce, 0xe1, 0xce, 0xa4, 0x7f, 0x83, 0x41, 0xd9, 0xed, 0x31, + 0xad, 0xa2, 0xbf, 0x5b, 0x54, 0xa2, 0x52, 0xe6, 0xf6, 0x22, 0x8a, 0xb3, 0x92, 0x88, 0xa9, 0x7b, + 0xb1, 0xa0, 0x76, 0xb4, 0x1d, 0x1c, 0xf8, 0xe6, 0x6a, 0x11, 0x54, 0x40, 0x13, 0x74, 0xbf, 0x5b, + 0x21, 0x8b, 0x83, 0xfa, 0x8b, 0x3c, 0xe9, 0xdf, 0x0f, 0xa8, 0x69, 0xd1, 0xe2, 0x9c, 0x6b, 0xf0, + 0xe4, 0xba, 0x28, 0x07, 0x85, 0x81, 0xcc, 0x11, 0x07, 0x7b, 0x1d, 0xaf, 0x2d, 0xf8, 0x57, 0x31, + 0x47, 0x83, 0x95, 0x82, 0x80, 0x22, 0x1e, 0x95, 0xba, 0xb1, 0xf0, 0x3d, 0x1a, 0x4c, 0x04, 0xac, + 0x14, 0x04, 0xd4, 0xb4, 0xe5, 0xc6, 0x72, 0x6c, 0x39, 0x6b, 0x8e, 0xc6, 0x1f, 0xf0, 0x1c, 0xd1, + 0x5d, 0x87, 0xa0, 0x7f, 0x2e, 0xde, 0x67, 0xe4, 0x27, 0x86, 0x27, 0xaf, 0xb4, 0x92, 0x0d, 0x45, + 0x06, 0x0c, 0x92, 0xce, 0x6b, 0x64, 0x5a, 0xad, 0x50, 0x6a, 0xca, 0x4f, 0xb2, 0xd1, 0x9e, 0x15, + 0x95, 0xa6, 0xb5, 0xb8, 0xaa, 0x81, 0x89, 0xe7, 0x7e, 0x23, 0xcd, 0x32, 0x62, 0x61, 0x18, 0x33, + 0x5c, 0x2a, 0x3a, 0xc3, 0xe5, 0xe3, 0x67, 0xd8, 0xfd, 0x8f, 0x15, 0x34, 0x84, 0x8d, 0xc6, 0x7a, + 0x71, 0x01, 0xa1, 0xf6, 0x36, 0x4a, 0x78, 0xda, 0x31, 0xb1, 0x2c, 0x5f, 0x1a, 0x66, 0xdd, 0x98, + 0xfb, 0x01, 0x2e, 0x07, 0x4e, 0xc9, 0xd9, 0xa7, 0x3b, 0xb4, 0x17, 0x33, 0xb3, 0xd0, 0x17, 0xcb, + 0x71, 0x38, 0xb2, 0x5a, 0xa5, 0xa6, 0x64, 0x8c, 0x0d, 0x97, 0xb7, 0xa2, 0x89, 0xe3, 0xf6, 0x84, + 0xda, 0x81, 0x74, 0x79, 0xab, 0xee, 0xa0, 0x0a, 0x71, 0x04, 0x1c, 0x46, 0x65, 0xe9, 0x0c, 0xd5, + 0xb0, 0x90, 0x55, 0xd6, 0x50, 0x01, 0x62, 0xcc, 0x37, 0xae, 0x35, 0x25, 0x30, 0x60, 0x60, 0x61, + 0x6a, 0x45, 0x79, 0xe2, 0x18, 0x45, 0x99, 0x7e, 0x21, 0xf6, 0x8f, 0xe2, 0x0a, 0xf5, 0x85, 0x36, + 0x79, 0x31, 0x48, 0x78, 0x9a, 0x89, 0xa6, 0x0a, 0x32, 0xd1, 0x05, 0x32, 0x57, 0xf3, 0xfc, 0x83, + 0xb0, 0xb3, 0xde, 0x69, 0x75, 0xc3, 0x80, 0x76, 0x6c, 0x91, 0x8c, 0xb1, 0x2d, 0x85, 0xaf, 0xf8, + 0x31, 0xa4, 0x00, 0x63, 0xa8, 0xec, 0xba, 0xff, 0x87, 0xee, 0x6b, 0x35, 0x6a, 0x6c, 0x26, 0xfe, + 0xad, 0x2e, 0xf3, 0x25, 0x38, 0x1b, 0xc4, 0xd9, 0x8b, 0xbc, 0xa6, 0x5f, 0xf7, 0xa3, 0x20, 0x6c, + 0xd1, 0x1d, 0x3f, 0xec, 0x30, 0x4f, 0x31, 0xee, 0x91, 0xe8, 0x1a, 0x74, 0xae, 0xf6, 0x41, 0x21, + 0xa3, 0x86, 0xd3, 0x22, 0xb3, 0xdd, 0xc8, 0xb7, 0x9c, 0x1f, 0xa5, 0x7c, 0xfd, 0xbc, 0x6e, 0x56, + 0xe1, 0xea, 0xa3, 0x55, 0x04, 0x36, 0x51, 0xe7, 0x2d, 0xb2, 0x10, 0x46, 0xdd, 0x7d, 0xaf, 0x53, + 0xf3, 0xbb, 0x7e, 0xa7, 0x85, 0x3a, 0xb3, 0xf0, 0x70, 0x9d, 0xa3, 0x75, 0x17, 0x6e, 0xa5, 0x60, + 0xd0, 0x87, 0xed, 0xfe, 0xa5, 0x32, 0x39, 0x5f, 0x0b, 0xef, 0x75, 0xee, 0x79, 0x51, 0x6b, 0xa5, + 0xbe, 0xc9, 0x15, 0x61, 0xe6, 0x31, 0x94, 0x9e, 0xca, 0xd2, 0x40, 0x4f, 0xe5, 0xd7, 0xc8, 0xd4, + 0x6e, 0xe0, 0xb7, 0x5b, 0xe8, 0x52, 0xe4, 0xc3, 0xbb, 0x5c, 0xc4, 0x3d, 0xb1, 0x81, 0x75, 0xa4, + 0x89, 0xcf, 0x1d, 0xa5, 0x1b, 0x82, 0x0c, 0x28, 0x82, 0x4e, 0x8f, 0x2c, 0x48, 0x4d, 0x5f, 0x42, + 0xc5, 0xea, 0x78, 0xa5, 0x98, 0x21, 0x61, 0x37, 0xc3, 0xe6, 0x03, 0x52, 0x04, 0xa1, 0xaf, 0x09, + 0x37, 0x26, 0x8f, 0xf6, 0x4d, 0x87, 0xb0, 0x86, 0xbf, 0x22, 0xcd, 0x50, 0x7e, 0x6e, 0x90, 0xd3, + 0x8d, 0xcc, 0x49, 0x1d, 0x60, 0x92, 0xde, 0x22, 0xe7, 0xd6, 0x0f, 0xba, 0xc9, 0x11, 0x35, 0xe8, + 0xac, 0x16, 0x5f, 0x27, 0x13, 0x07, 0x7e, 0x2b, 0xe8, 0x1d, 0x88, 0x8f, 0xf0, 0xa4, 0x14, 0x7b, + 0x37, 0x58, 0x29, 0xd5, 0x69, 0x66, 0xf1, 0x88, 0x8d, 0x2e, 0x17, 0x5e, 0x00, 0x02, 0xdd, 0xfd, + 0x51, 0x89, 0xcc, 0x4b, 0xf6, 0x5f, 0x69, 0xb5, 0xe8, 0x28, 0x63, 0x67, 0x89, 0x94, 0x83, 0xae, + 0x20, 0x44, 0x04, 0xa1, 0x32, 0x55, 0x71, 0x68, 0x29, 0xd5, 0x37, 0xaa, 0xdc, 0x8b, 0xae, 0x3f, + 0xe5, 0x90, 0x5e, 0x79, 0x66, 0x2b, 0x6c, 0x4b, 0x1a, 0xa0, 0xc9, 0x49, 0x3d, 0x90, 0x09, 0xd6, + 0x8a, 0xed, 0xd3, 0xbd, 0x26, 0xca, 0x41, 0x61, 0xa0, 0x27, 0x1d, 0x0f, 0xc3, 0xd8, 0x01, 0x07, + 0xdf, 0x24, 0x19, 0x83, 0xdc, 0x14, 0x65, 0xa0, 0xa0, 0xee, 0xcf, 0x97, 0xc8, 0x8c, 0x1c, 0x63, + 0x41, 0x95, 0x14, 0x59, 0x5a, 0xab, 0xa3, 0x9a, 0xa5, 0x51, 0xa5, 0x64, 0x10, 0x4b, 0x93, 0xac, + 0x0c, 0xa3, 0x49, 0xba, 0xdf, 0xa5, 0x1a, 0xa2, 0xec, 0x4e, 0xa3, 0xb7, 0x13, 0xfb, 0x89, 0xf3, + 0x75, 0x52, 0xf5, 0xf8, 0xe4, 0xfb, 0x92, 0x69, 0x2e, 0xe6, 0xd9, 0xd3, 0xd6, 0x37, 0xd3, 0xdb, + 0xf8, 0x8a, 0xa4, 0x03, 0x9a, 0xa4, 0x73, 0x48, 0xce, 0x74, 0xc2, 0x84, 0x49, 0x6f, 0x05, 0x2f, + 0xe6, 0x8c, 0x4c, 0xb7, 0xf3, 0x98, 0x68, 0xe7, 0xcc, 0xcd, 0x34, 0x3d, 0xe8, 0x6f, 0x82, 0x5a, + 0x69, 0xc2, 0xe7, 0x50, 0x61, 0x6d, 0x5d, 0x28, 0xd6, 0xd6, 0x60, 0x97, 0x83, 0xfb, 0x9b, 0x25, + 0x52, 0x95, 0x68, 0xa3, 0x74, 0x47, 0xdf, 0x21, 0x93, 0x31, 0xfb, 0x34, 0x72, 0x9a, 0x5e, 0x2a, + 0xd6, 0x75, 0xfe, 0x3d, 0xf5, 0x56, 0xc5, 0x7f, 0xc7, 0x20, 0xa9, 0x31, 0x0f, 0xa0, 0x1a, 0xc0, + 0xc3, 0xe7, 0x01, 0x54, 0x5d, 0x1b, 0x20, 0x7f, 0xfe, 0x5e, 0x89, 0x4c, 0x70, 0x57, 0x4e, 0x31, + 0x7f, 0x98, 0xe1, 0xc6, 0xd5, 0x14, 0x6f, 0x63, 0xa1, 0xf0, 0xea, 0xd2, 0x99, 0xae, 0xb2, 0x7f, + 0x36, 0xa2, 0xf0, 0x40, 0x88, 0xed, 0x0b, 0x45, 0x5c, 0x49, 0x5c, 0xf0, 0x71, 0x69, 0x72, 0x5b, + 0x12, 0x00, 0x4d, 0xcb, 0xfd, 0x8d, 0x0a, 0xae, 0x7a, 0x8d, 0x6a, 0x6d, 0x42, 0xa5, 0xd3, 0xd8, + 0x84, 0xca, 0x23, 0xdf, 0x84, 0x9c, 0xf7, 0xc9, 0x7c, 0xd3, 0x70, 0x87, 0xeb, 0xad, 0xef, 0x4a, + 0x41, 0x4f, 0xaf, 0xe1, 0x43, 0xe7, 0xae, 0x8b, 0x35, 0x9b, 0x1c, 0xa4, 0xe9, 0x3b, 0x3e, 0x99, + 0xe1, 0x67, 0x79, 0xa2, 0xbd, 0xb1, 0x5c, 0x9e, 0xe5, 0x5e, 0x12, 0x5e, 0x43, 0x35, 0xc6, 0x62, + 0x1b, 0x1a, 0x06, 0x21, 0xb0, 0xc8, 0xba, 0x7f, 0x65, 0x9c, 0x8c, 0xaf, 0x1f, 0x52, 0xcd, 0x63, + 0x84, 0xab, 0xfc, 0x80, 0xcc, 0x05, 0x9d, 0xc3, 0xb0, 0x7d, 0xe8, 0xb7, 0x38, 0xfc, 0x64, 0x3b, + 0xda, 0x23, 0xa2, 0x91, 0xb9, 0x4d, 0x8b, 0x18, 0xa4, 0x88, 0x8f, 0xc2, 0xfa, 0x7b, 0x9b, 0x1a, + 0x9e, 0x8c, 0x23, 0x84, 0xe9, 0x97, 0xe3, 0xd2, 0x64, 0x13, 0x2a, 0x56, 0x8e, 0xb6, 0x51, 0xb9, + 0x37, 0x55, 0x10, 0x72, 0xee, 0x92, 0xb9, 0xdd, 0x20, 0xa2, 0xf6, 0x01, 0x35, 0xdf, 0xa8, 0xce, + 0x7e, 0xd0, 0x3d, 0x89, 0xd9, 0xa7, 0xa6, 0x64, 0xc3, 0x22, 0x05, 0x29, 0xd2, 0xd4, 0xa4, 0x99, + 0x45, 0xab, 0x43, 0xb7, 0x35, 0x39, 0x7c, 0x5b, 0xca, 0xf3, 0xb3, 0x65, 0x52, 0x02, 0x9b, 0x30, + 0x0a, 0xa3, 0x26, 0x33, 0x53, 0xa6, 0xd8, 0x96, 0xae, 0x84, 0x11, 0xb7, 0x4f, 0x38, 0x0c, 0x65, + 0x1a, 0x3b, 0xba, 0xad, 0xda, 0x32, 0x4d, 0x1f, 0xd0, 0xba, 0xdf, 0xc1, 0x0d, 0x08, 0x67, 0xf1, + 0x34, 0x64, 0xf7, 0x35, 0x5b, 0x76, 0x7f, 0xb6, 0xc0, 0xc7, 0x1d, 0x20, 0xb7, 0xdf, 0x23, 0xd3, + 0xc6, 0xb7, 0x47, 0xb7, 0x5e, 0x53, 0x9e, 0x32, 0x0a, 0x01, 0xae, 0x14, 0x08, 0x75, 0xfc, 0x08, + 0x1a, 0x07, 0x27, 0x06, 0x15, 0xaf, 0x74, 0x30, 0x02, 0xaa, 0x65, 0xc0, 0x20, 0xee, 0x2b, 0x84, + 0xac, 0xdf, 0xf7, 0x9b, 0x2b, 0x4d, 0x76, 0x06, 0x6e, 0x9c, 0x72, 0x94, 0x06, 0x9f, 0x72, 0xb8, + 0xef, 0xd2, 0xcd, 0xf0, 0x3e, 0xee, 0xec, 0xd2, 0xa8, 0xa2, 0x4b, 0xc4, 0x67, 0x05, 0xac, 0x57, + 0x53, 0x9a, 0x49, 0x39, 0x1a, 0x08, 0x28, 0x3b, 0xc1, 0xbe, 0xef, 0x89, 0x05, 0x6b, 0x18, 0xa8, + 0xeb, 0x58, 0x08, 0x1c, 0xe6, 0x7e, 0xbb, 0x44, 0xe6, 0x36, 0xd6, 0x2c, 0x3d, 0x79, 0x99, 0x10, + 0xae, 0x6f, 0xde, 0xb9, 0x73, 0x53, 0x7a, 0x3d, 0xb9, 0x6b, 0x4a, 0x95, 0x82, 0x81, 0xe1, 0x3c, + 0x46, 0x2a, 0xed, 0x5e, 0x47, 0xa8, 0x81, 0x93, 0xe8, 0x4d, 0xdd, 0xea, 0x75, 0x00, 0xcb, 0x8c, + 0x98, 0x82, 0x4a, 0xe1, 0x98, 0x82, 0xfc, 0x08, 0xb2, 0x5f, 0xac, 0x90, 0x85, 0x8d, 0xb6, 0x7f, + 0xdf, 0xea, 0x35, 0x6d, 0xaa, 0x15, 0x05, 0x94, 0x79, 0xd2, 0x4e, 0x8d, 0x1a, 0x2b, 0x05, 0x01, + 0x2d, 0x1c, 0xe6, 0x60, 0x85, 0x78, 0x54, 0x46, 0x1c, 0xe2, 0x91, 0x3b, 0x66, 0x67, 0x97, 0x4c, + 0x86, 0xfc, 0xfb, 0x53, 0x29, 0x86, 0x8c, 0xfe, 0x85, 0xe3, 0x3b, 0x93, 0x9e, 0x9f, 0x65, 0xc1, + 0x3d, 0xfc, 0xbc, 0x59, 0x09, 0x4b, 0x51, 0x0a, 0x92, 0xf8, 0xd2, 0xe7, 0xc9, 0x8c, 0x89, 0x39, + 0xd4, 0xc1, 0xf3, 0x16, 0x39, 0xbb, 0x81, 0x81, 0x8a, 0xa9, 0x30, 0x94, 0xd7, 0xc8, 0x34, 0xae, + 0xd4, 0xd8, 0x8a, 0xcd, 0x52, 0x9e, 0x87, 0x9a, 0x06, 0x81, 0x89, 0xe7, 0xfe, 0xbb, 0x12, 0x79, + 0xfc, 0xea, 0xda, 0x7a, 0x1d, 0xc5, 0x41, 0x9c, 0xd0, 0x05, 0x56, 0x0b, 0xe2, 0xbb, 0xe9, 0x4f, + 0xde, 0x6d, 0x19, 0x34, 0xd5, 0xa7, 0xac, 0xd7, 0x18, 0x39, 0x01, 0x7d, 0x58, 0x02, 0x1f, 0xa9, + 0x5e, 0x78, 0xf6, 0x6a, 0x40, 0xbf, 0x7d, 0x37, 0x4c, 0x87, 0xae, 0x45, 0xb4, 0x2c, 0xc6, 0x90, + 0xa6, 0xa3, 0x74, 0xe8, 0x1a, 0x28, 0x08, 0x18, 0x58, 0xbc, 0xe5, 0xc3, 0x00, 0x05, 0xa5, 0x18, + 0x94, 0xd1, 0x32, 0x2f, 0x07, 0x85, 0x81, 0x03, 0x6b, 0x05, 0x11, 0xd3, 0x29, 0x8e, 0xc4, 0x4a, + 0x54, 0x03, 0xab, 0x49, 0x00, 0x68, 0x1c, 0xf7, 0x6f, 0x96, 0xc8, 0xf9, 0xab, 0xed, 0x1e, 0x9d, + 0xf6, 0x68, 0x37, 0xb6, 0x3a, 0xfb, 0x0a, 0xa9, 0xfa, 0x52, 0xff, 0x15, 0x7d, 0x55, 0x7b, 0x8b, + 0x52, 0x8c, 0x79, 0xdc, 0x9c, 0xc2, 0x2b, 0x10, 0xa6, 0x35, 0x5c, 0x50, 0xd1, 0x3f, 0x2f, 0x93, + 0xd9, 0x6b, 0xdb, 0xdb, 0xf5, 0xab, 0x7e, 0x22, 0x64, 0x69, 0xbe, 0x7b, 0xa5, 0x6e, 0x58, 0xab, + 0xd3, 0x57, 0x96, 0x07, 0xac, 0x1e, 0x0c, 0xc9, 0x5d, 0xe6, 0x21, 0xb9, 0xcb, 0x9b, 0x9d, 0xe4, + 0x56, 0xd4, 0x48, 0x22, 0x74, 0xfe, 0x67, 0x59, 0xb7, 0x52, 0xde, 0x57, 0x06, 0xc9, 0x7b, 0x3a, + 0x59, 0x13, 0x71, 0x73, 0xdf, 0x57, 0xc6, 0xf7, 0xa7, 0x95, 0x3a, 0xc1, 0x4a, 0xa9, 0xed, 0x5b, + 0x7d, 0x07, 0x36, 0xf9, 0x0f, 0x10, 0xa8, 0x54, 0xf0, 0x4c, 0xef, 0x27, 0x49, 0xf7, 0x1a, 0x1d, + 0x2c, 0x65, 0x7d, 0xb1, 0xda, 0x73, 0xb4, 0x39, 0x9c, 0x0c, 0x5e, 0x41, 0x2f, 0x2c, 0x5d, 0x16, + 0x83, 0x49, 0xd1, 0x6d, 0x10, 0xa2, 0x61, 0x0f, 0xc8, 0x44, 0x71, 0xff, 0x6c, 0x99, 0x4c, 0x5e, + 0xa3, 0xdb, 0x55, 0x9b, 0x92, 0xdc, 0x20, 0x63, 0x3e, 0xdd, 0xe6, 0x8a, 0x29, 0xa2, 0x7a, 0x43, + 0xe4, 0x27, 0xf8, 0xf8, 0x1b, 0x58, 0x7d, 0x07, 0xc8, 0x24, 0xf6, 0xfb, 0xaa, 0x8a, 0x6d, 0x7c, + 0x31, 0x7f, 0x16, 0x14, 0x4b, 0xf0, 0xdd, 0x54, 0x14, 0x81, 0x24, 0xc4, 0x7c, 0x33, 0xcd, 0x6e, + 0x03, 0xa5, 0x54, 0x52, 0x2c, 0x54, 0x77, 0x7b, 0xad, 0xce, 0xd1, 0x05, 0x5d, 0xee, 0x9b, 0x91, + 0x85, 0xa0, 0xc9, 0xb9, 0x6f, 0x90, 0x73, 0xec, 0x2c, 0x8e, 0xb2, 0x9b, 0xb5, 0x66, 0x72, 0x99, + 0xd3, 0xfd, 0xdb, 0x65, 0x72, 0x66, 0xb3, 0xb1, 0xd6, 0xb0, 0x5d, 0x64, 0x6f, 0x90, 0x19, 0xbe, + 0xcd, 0x22, 0xd3, 0x79, 0x6d, 0x51, 0x5f, 0x39, 0x8f, 0xb7, 0x0d, 0x18, 0x58, 0x98, 0x78, 0xc8, + 0x19, 0xbc, 0xdf, 0x49, 0x87, 0xd8, 0x6c, 0xbe, 0x7d, 0x13, 0xb0, 0x1c, 0xc1, 0xb8, 0x63, 0x73, + 0x11, 0xa7, 0xc0, 0x6a, 0xd7, 0xfe, 0x12, 0x55, 0xf9, 0xe3, 0x66, 0x1c, 0xd0, 0x05, 0x40, 0xd7, + 0xbf, 0xd7, 0x94, 0xec, 0xab, 0x75, 0x78, 0xec, 0xaa, 0x82, 0x42, 0x0a, 0xdb, 0x90, 0xb7, 0xe3, + 0x85, 0x77, 0xfd, 0xfc, 0x20, 0xc7, 0x2d, 0x52, 0x55, 0xc1, 0x28, 0x32, 0x86, 0xa8, 0x94, 0x1d, + 0x43, 0x94, 0x2f, 0x70, 0xdc, 0x7f, 0x44, 0x75, 0x54, 0x75, 0x18, 0x4f, 0x39, 0xad, 0x4a, 0x45, + 0x6b, 0xc2, 0x8e, 0x77, 0x04, 0xdb, 0x3e, 0x9b, 0xc3, 0x6b, 0x9c, 0xd7, 0x39, 0x37, 0xd4, 0x65, + 0x5d, 0xd0, 0x64, 0x9c, 0x2d, 0x32, 0xd9, 0x8d, 0xfc, 0x46, 0xc2, 0x62, 0x61, 0x87, 0xa0, 0xc8, + 0xf8, 0xb6, 0xce, 0x6b, 0x82, 0x24, 0xe1, 0xfe, 0x5a, 0x89, 0x90, 0xad, 0xe0, 0x80, 0x6e, 0x1f, + 0x5e, 0x67, 0xcf, 0x1f, 0xa1, 0xbd, 0x77, 0x93, 0x8c, 0xc5, 0x5d, 0xba, 0x78, 0x0b, 0x1d, 0xc9, + 0xe8, 0x1e, 0x35, 0x68, 0x1d, 0x3d, 0xd1, 0xf8, 0x0b, 0x18, 0x1d, 0xf7, 0x97, 0x09, 0x99, 0xd3, + 0x68, 0xa8, 0x70, 0x3b, 0x17, 0xad, 0xe0, 0xcf, 0xc7, 0x52, 0xc1, 0x9f, 0x55, 0x86, 0x6d, 0xc4, + 0x7b, 0x26, 0xa4, 0x72, 0xe0, 0xdd, 0x17, 0xfa, 0xfd, 0x6b, 0x45, 0x3b, 0x84, 0x2d, 0x2d, 0xdf, + 0xf0, 0xee, 0x73, 0x85, 0xe7, 0x45, 0xc9, 0x22, 0xb4, 0xe4, 0x63, 0x7e, 0xf0, 0xc2, 0xd6, 0x18, + 0x1a, 0x14, 0x3f, 0xf3, 0x9f, 0xf4, 0x6f, 0x26, 0xf6, 0xb0, 0x39, 0xd6, 0x6a, 0xd0, 0x11, 0x4e, + 0xb9, 0x21, 0x5b, 0x0d, 0x3a, 0xe9, 0x56, 0x83, 0x4e, 0x81, 0x56, 0x83, 0x0e, 0xc6, 0x88, 0x4d, + 0xb6, 0xfc, 0x5d, 0xaf, 0xd7, 0x4e, 0x58, 0x58, 0xd3, 0xf4, 0x95, 0x37, 0x87, 0x6a, 0xba, 0xc6, + 0xeb, 0xf2, 0xe6, 0x2f, 0x49, 0x2d, 0x4f, 0x94, 0xe6, 0x76, 0x41, 0x36, 0xed, 0xfc, 0x12, 0xb5, + 0x0a, 0xc4, 0xff, 0x18, 0x41, 0x44, 0xcd, 0x43, 0xb1, 0x0f, 0xbd, 0x75, 0x92, 0xde, 0x08, 0x12, + 0xbc, 0x53, 0x3f, 0x26, 0x85, 0x88, 0x0d, 0xcc, 0xed, 0x5b, 0xaa, 0x3f, 0xce, 0x87, 0x25, 0x72, + 0x8e, 0x7e, 0x27, 0xde, 0x22, 0x2f, 0x03, 0x3c, 0xa8, 0x13, 0xa1, 0x5b, 0x1b, 0xc3, 0xf2, 0x49, + 0x1f, 0x21, 0xde, 0xdd, 0x2f, 0xca, 0xe3, 0xc0, 0x2c, 0x94, 0xdc, 0x4e, 0x67, 0xf6, 0x70, 0xa9, + 0x45, 0xa6, 0x24, 0x63, 0x66, 0xe8, 0xd7, 0xab, 0xe6, 0x76, 0x7b, 0xfc, 0x0a, 0x94, 0xae, 0xae, + 0xe5, 0xb7, 0x7b, 0x5e, 0x27, 0xc1, 0xb8, 0x7a, 0xad, 0x8d, 0xb3, 0x56, 0x04, 0x23, 0x8e, 0xb0, + 0x95, 0x7d, 0x32, 0x63, 0xf2, 0xdc, 0x08, 0x5b, 0x0a, 0xc9, 0xd9, 0x0c, 0x7e, 0x1a, 0x61, 0x83, + 0x3d, 0xf2, 0xd8, 0x40, 0xbe, 0x18, 0x5d, 0xb3, 0xe8, 0xbe, 0x37, 0x04, 0xe6, 0x69, 0xb8, 0x50, + 0x6e, 0xd8, 0x2e, 0x94, 0xe7, 0x8b, 0x2e, 0x9d, 0x01, 0x7e, 0x94, 0x5d, 0xb3, 0xff, 0xb8, 0x13, + 0x38, 0xdb, 0x64, 0xa2, 0x8d, 0x25, 0xf2, 0xdc, 0xe6, 0xa5, 0x61, 0x16, 0xa7, 0x56, 0x1f, 0x58, + 0x79, 0x0c, 0x82, 0x96, 0xfb, 0xeb, 0x25, 0x32, 0x76, 0x1a, 0xd3, 0x53, 0xb7, 0xa7, 0x67, 0x90, + 0x12, 0x2a, 0x2e, 0xff, 0x2d, 0x83, 0x77, 0x6f, 0xfd, 0x3e, 0xb5, 0x57, 0x63, 0xa6, 0x2c, 0x66, + 0xce, 0xd0, 0x3f, 0x2c, 0x93, 0x69, 0x6c, 0x48, 0x7a, 0x74, 0xbe, 0x80, 0x1e, 0xbe, 0x1d, 0xbf, + 0x2d, 0x1d, 0xbf, 0x69, 0xc3, 0x6a, 0xcb, 0x04, 0x82, 0x8d, 0x8b, 0x95, 0x77, 0x4d, 0xbf, 0xb8, + 0x50, 0x7a, 0x54, 0x65, 0xcb, 0x69, 0x0e, 0x36, 0x2e, 0xea, 0xf6, 0xf7, 0xbc, 0xa4, 0xb9, 0x2f, + 0x8c, 0x2e, 0xd5, 0xdd, 0x3b, 0x58, 0x08, 0x1c, 0xe6, 0xac, 0x90, 0x79, 0xc9, 0xb1, 0xb7, 0xf9, + 0xd4, 0x09, 0x85, 0x50, 0x5d, 0xdc, 0x02, 0x1b, 0x0c, 0x69, 0x7c, 0xe7, 0xf3, 0x64, 0x0e, 0x27, + 0x27, 0xec, 0x25, 0x32, 0x08, 0x60, 0x9c, 0x05, 0x01, 0xb0, 0xa0, 0xcb, 0x6d, 0x0b, 0x02, 0x29, + 0x4c, 0xf7, 0x27, 0xc9, 0xd9, 0xad, 0xd0, 0x6b, 0xad, 0x7a, 0x6d, 0xaf, 0xd3, 0xf4, 0xa3, 0xcd, + 0xce, 0x5e, 0xee, 0x09, 0xac, 0x79, 0x4a, 0x5a, 0xce, 0x3b, 0x25, 0x75, 0x23, 0xe2, 0x98, 0x0d, + 0x88, 0xf0, 0x95, 0x77, 0xc9, 0x64, 0xc0, 0x9b, 0x12, 0x5c, 0x7b, 0x39, 0xcf, 0xfd, 0xd3, 0xd7, + 0x47, 0x23, 0x1c, 0x83, 0x17, 0x80, 0x24, 0x89, 0xb6, 0x42, 0x96, 0xbf, 0x28, 0xdf, 0x1c, 0x73, + 0xff, 0x42, 0x89, 0xcc, 0xdf, 0x4c, 0xdd, 0x98, 0xc2, 0xd8, 0x2a, 0x3f, 0xca, 0x70, 0x7e, 0x35, + 0x58, 0x29, 0x08, 0xe8, 0x03, 0x37, 0xc4, 0xff, 0x62, 0x99, 0x54, 0x59, 0x2c, 0x64, 0xd7, 0x6b, + 0x8e, 0x52, 0x29, 0xbd, 0x61, 0x29, 0xa5, 0x39, 0x66, 0xa0, 0xea, 0xd0, 0x20, 0x9d, 0x14, 0xef, + 0xcc, 0x89, 0x1b, 0x44, 0x85, 0x2c, 0x40, 0x4d, 0x90, 0x5f, 0x36, 0x99, 0xb3, 0x2f, 0x1c, 0xc9, + 0xdb, 0x45, 0xec, 0xdc, 0x52, 0xe1, 0x3e, 0x7c, 0xe7, 0x96, 0xaa, 0x6b, 0x03, 0xa4, 0x52, 0xdd, + 0xe8, 0x3d, 0x13, 0xdb, 0x5f, 0x66, 0x81, 0x6d, 0x5e, 0x3b, 0xf8, 0xc0, 0x57, 0x37, 0xf1, 0x9e, + 0x14, 0x71, 0x6a, 0xa2, 0xf4, 0x63, 0x26, 0x60, 0xc4, 0x2f, 0x7e, 0xc1, 0x52, 0x57, 0x71, 0xaf, + 0x51, 0x4e, 0xb5, 0xe7, 0xce, 0x79, 0x8d, 0x8c, 0x77, 0xf7, 0xbd, 0xd8, 0x4f, 0xc5, 0x60, 0x8c, + 0xd7, 0xb1, 0x90, 0x52, 0x9b, 0x53, 0x15, 0x58, 0x09, 0x70, 0x6c, 0xf7, 0x8f, 0xa8, 0xac, 0xc7, + 0xa8, 0x85, 0x11, 0xf2, 0xd8, 0x35, 0x8b, 0xc7, 0x9e, 0xcb, 0xbf, 0x82, 0x3c, 0x90, 0xbd, 0xea, + 0x29, 0xf6, 0x7a, 0xbe, 0x00, 0xad, 0xe3, 0x39, 0xeb, 0x80, 0x4c, 0xb3, 0x2b, 0xce, 0x22, 0xf8, + 0xe4, 0x15, 0xcb, 0x80, 0x7a, 0x32, 0x65, 0x40, 0xcd, 0x1b, 0xa8, 0x86, 0x19, 0xf5, 0x02, 0x99, + 0x14, 0xc1, 0x0e, 0xe9, 0x68, 0x3e, 0x81, 0x0b, 0x12, 0xee, 0xfe, 0x6a, 0x85, 0x58, 0x57, 0xaa, + 0x9d, 0xef, 0x95, 0x08, 0x55, 0x5a, 0xd8, 0x55, 0x82, 0x56, 0xad, 0x87, 0x1e, 0x31, 0x74, 0x5a, + 0xb5, 0x7a, 0x6d, 0xfa, 0xdf, 0xe6, 0x5e, 0x27, 0x54, 0xc5, 0xe8, 0xbd, 0xe9, 0x31, 0xff, 0x69, + 0xe1, 0x9b, 0xdc, 0xea, 0xb4, 0xf3, 0x0a, 0xed, 0xcb, 0x32, 0x0c, 0xd5, 0x0a, 0x0c, 0xd9, 0x2b, + 0xe7, 0x77, 0x4b, 0xe4, 0x12, 0xbf, 0x54, 0x5c, 0x7c, 0x24, 0x85, 0x0c, 0xcf, 0xba, 0x24, 0xaa, + 0xc9, 0x61, 0xf0, 0xe0, 0xea, 0xeb, 0x62, 0x92, 0x2f, 0xd5, 0x87, 0x6b, 0x15, 0x86, 0xed, 0xa6, + 0xfb, 0x2f, 0x2b, 0x74, 0xfd, 0xd2, 0xf9, 0xd4, 0x97, 0x2c, 0x5f, 0xb3, 0xd8, 0xe4, 0xe9, 0x14, + 0x9b, 0x9c, 0xb1, 0x90, 0x1f, 0xcc, 0xfd, 0xca, 0x84, 0x9c, 0xc1, 0x13, 0xc5, 0x6b, 0xbe, 0x17, + 0x25, 0x3b, 0xbe, 0xc7, 0x8e, 0x16, 0xc5, 0x22, 0x18, 0xea, 0xb8, 0x52, 0x45, 0xd0, 0x6c, 0xa5, + 0xa9, 0x41, 0x7f, 0x03, 0xce, 0x3d, 0xe2, 0xb0, 0x73, 0xcc, 0xc8, 0xa3, 0x4a, 0x17, 0x1b, 0x4c, + 0x20, 0x5c, 0xae, 0x43, 0x36, 0xbb, 0x24, 0x9a, 0x75, 0xb6, 0xfa, 0xc8, 0x41, 0x46, 0x13, 0xc6, + 0x61, 0xf5, 0x78, 0xd1, 0xc3, 0xea, 0x89, 0x9c, 0x40, 0xda, 0x9f, 0x2b, 0x91, 0xb3, 0xf8, 0x61, + 0xec, 0xa0, 0xcb, 0xd8, 0x09, 0xc9, 0x3c, 0x8e, 0xa0, 0xed, 0x27, 0xb2, 0x4c, 0xac, 0xb0, 0x1c, + 0x5d, 0xda, 0xa6, 0xa3, 0x35, 0xb6, 0xeb, 0x36, 0x31, 0x48, 0x53, 0x77, 0x7f, 0xb5, 0x44, 0x58, + 0x9c, 0xd8, 0x69, 0xec, 0x63, 0x57, 0xed, 0x7d, 0xcc, 0xcd, 0x17, 0x1a, 0x03, 0xb6, 0xb0, 0x57, + 0xc9, 0x02, 0x42, 0xeb, 0x51, 0x78, 0xff, 0x48, 0x2a, 0xd7, 0xf9, 0xde, 0xd7, 0x3f, 0x5f, 0xe2, + 0xe2, 0x4e, 0x69, 0xc5, 0xf7, 0x30, 0x14, 0x4c, 0xff, 0xc6, 0x85, 0x2c, 0x95, 0xc0, 0xe5, 0xe2, + 0x02, 0x8d, 0xad, 0x7f, 0x23, 0x16, 0x2c, 0x45, 0x10, 0xfa, 0xdb, 0x70, 0xff, 0x4e, 0x89, 0x3c, + 0x6a, 0x22, 0x1a, 0xd7, 0xb7, 0xf2, 0x5c, 0x9e, 0x35, 0x32, 0x15, 0x76, 0x31, 0x85, 0x88, 0xb2, + 0x00, 0x9e, 0x97, 0x33, 0x7e, 0x4b, 0x94, 0xd3, 0x95, 0x7b, 0xce, 0xa4, 0x2e, 0xcb, 0x41, 0xd5, + 0x74, 0x5c, 0x32, 0xc1, 0x2c, 0xd1, 0x58, 0x5c, 0xbc, 0x23, 0xc8, 0xcd, 0xcc, 0xd1, 0x4f, 0x17, + 0x39, 0x87, 0xb8, 0x7f, 0xb9, 0xc4, 0x67, 0xd9, 0xec, 0xba, 0xf3, 0x4d, 0xb2, 0x70, 0x80, 0xc6, + 0xc2, 0xfa, 0xfd, 0x2e, 0x6e, 0x21, 0xec, 0xa0, 0xb2, 0x54, 0x44, 0x70, 0x0e, 0x18, 0xee, 0xea, + 0xa2, 0xe8, 0xfd, 0xc2, 0x8d, 0x14, 0x59, 0xe8, 0x6b, 0xc8, 0xfd, 0x3d, 0xc1, 0xab, 0x4c, 0x6b, + 0xa1, 0x8b, 0xad, 0x1b, 0xb6, 0xd6, 0x36, 0x6b, 0x20, 0xe6, 0x4a, 0x2d, 0xb6, 0x3a, 0x2f, 0x06, + 0x09, 0xc7, 0x93, 0x37, 0x9f, 0x9a, 0x6a, 0x11, 0x55, 0x58, 0x36, 0x6b, 0xe9, 0x3c, 0x18, 0xeb, + 0x0a, 0x02, 0x06, 0x16, 0xd6, 0xe9, 0x46, 0xe1, 0x61, 0xd0, 0x62, 0x61, 0xd4, 0x15, 0xbb, 0x4e, + 0x5d, 0x41, 0xc0, 0xc0, 0x42, 0x13, 0xad, 0xd7, 0x89, 0xb9, 0x00, 0xf7, 0x76, 0x44, 0x96, 0x81, + 0x29, 0x6d, 0xa2, 0xbd, 0x63, 0x02, 0xc1, 0xc6, 0x75, 0x7f, 0x50, 0x25, 0x44, 0xab, 0x08, 0xe8, + 0x21, 0x9c, 0x6a, 0x7a, 0x54, 0x41, 0xe2, 0xe9, 0x52, 0x2a, 0xf9, 0xf7, 0x4d, 0x74, 0xe5, 0xe5, + 0x35, 0x51, 0x91, 0xfb, 0xb6, 0x5e, 0x96, 0x0c, 0x22, 0x8b, 0x73, 0xfd, 0x59, 0xaa, 0x65, 0xe7, + 0x5b, 0x25, 0x32, 0xed, 0xb5, 0xf1, 0x82, 0x69, 0xc2, 0x46, 0x54, 0x2e, 0xe2, 0xac, 0x34, 0x7a, + 0xb2, 0xa2, 0xeb, 0xf2, 0xce, 0xbc, 0x22, 0xcf, 0xad, 0x0c, 0x48, 0x6e, 0x7f, 0xcc, 0x2e, 0x38, + 0x2f, 0x4b, 0xd5, 0x92, 0x7f, 0x94, 0xa5, 0xb4, 0x6a, 0x59, 0x65, 0xa2, 0xc1, 0xd0, 0x2a, 0xf1, + 0xe6, 0x86, 0x11, 0x53, 0x3e, 0x56, 0xe4, 0xce, 0xa7, 0xb5, 0x69, 0xe6, 0xdd, 0xa5, 0xc7, 0xd3, + 0x26, 0x1d, 0xb3, 0x3a, 0x5e, 0xe4, 0x42, 0xa5, 0xa1, 0xbb, 0xe5, 0xc4, 0xab, 0x26, 0x64, 0xbe, + 0x65, 0x6f, 0x12, 0x22, 0x08, 0xe9, 0x72, 0x7e, 0x0b, 0xa9, 0xdd, 0x45, 0x6f, 0x0b, 0x29, 0x00, + 0xa4, 0x9b, 0xa0, 0x23, 0x62, 0x31, 0xc3, 0x9b, 0x9d, 0xdd, 0x50, 0xc4, 0x21, 0xbd, 0x54, 0xe0, + 0x9b, 0x1f, 0xc5, 0x54, 0x3c, 0x63, 0x1d, 0xbd, 0x0d, 0xdc, 0x14, 0x54, 0x40, 0xd1, 0x43, 0x37, + 0x11, 0xbb, 0xad, 0x80, 0x77, 0x5c, 0x2b, 0x43, 0x5c, 0xdc, 0x60, 0x77, 0x1d, 0xf4, 0xe6, 0xcb, + 0x7e, 0x52, 0x71, 0xc5, 0x69, 0x51, 0xbd, 0x5e, 0x5c, 0x41, 0x8d, 0x37, 0x3b, 0xef, 0xc4, 0x3e, + 0xbb, 0xd7, 0x5a, 0x5d, 0x7d, 0x46, 0x5f, 0x54, 0xe5, 0xe5, 0x99, 0xe9, 0x72, 0xac, 0x9a, 0xb8, + 0x07, 0x8b, 0xdf, 0x32, 0x0b, 0xcf, 0x22, 0x29, 0xd2, 0x51, 0x3b, 0x67, 0x8f, 0x9e, 0xec, 0xdb, + 0x36, 0x31, 0x48, 0x53, 0x5f, 0x0a, 0xc8, 0xac, 0xb5, 0x62, 0x47, 0xe8, 0xec, 0x6c, 0x93, 0x85, + 0xf4, 0x92, 0x1c, 0xa1, 0x8f, 0xf3, 0x0f, 0xc7, 0xc8, 0x9c, 0xcd, 0x18, 0x18, 0xa3, 0x70, 0x40, + 0x47, 0x4d, 0xbf, 0xa7, 0xca, 0x56, 0xa2, 0xf8, 0xff, 0x86, 0x04, 0x80, 0xc6, 0x61, 0x79, 0x5b, + 0x58, 0xf5, 0x77, 0xde, 0xe9, 0x17, 0xde, 0x0d, 0x05, 0x01, 0x03, 0x0b, 0x15, 0xb6, 0x9d, 0x30, + 0x4c, 0x94, 0xe0, 0x56, 0x3c, 0xb3, 0xca, 0x4a, 0x41, 0x40, 0x51, 0x60, 0xdf, 0xc5, 0x01, 0xb5, + 0x6d, 0x7f, 0x97, 0x12, 0xd8, 0xd7, 0x4d, 0x20, 0xd8, 0xb8, 0xb8, 0x01, 0x85, 0x31, 0x63, 0x42, + 0xa1, 0x16, 0xea, 0x68, 0x9b, 0x06, 0xbf, 0xbd, 0x23, 0xe1, 0xce, 0x57, 0xc9, 0xa3, 0xea, 0xb2, + 0x0d, 0x70, 0xff, 0xa1, 0x6c, 0x71, 0xc2, 0xb2, 0xed, 0x1e, 0x5d, 0xcb, 0x46, 0x83, 0x41, 0xf5, + 0xf1, 0x10, 0x57, 0xa8, 0x74, 0x92, 0xe2, 0xa4, 0x7d, 0x88, 0x7b, 0xdd, 0x82, 0x42, 0x0a, 0x9b, + 0xea, 0x13, 0x0b, 0x58, 0xc2, 0x54, 0x29, 0x49, 0x81, 0x5f, 0x1a, 0x52, 0x3b, 0xf3, 0xf5, 0x14, + 0x1c, 0xfa, 0x6a, 0xa0, 0xeb, 0x90, 0xeb, 0x16, 0x68, 0xc1, 0xb0, 0xef, 0x20, 0xe2, 0x06, 0xd5, + 0x22, 0xb8, 0x65, 0x83, 0x21, 0x8d, 0x8f, 0xa7, 0xe0, 0x5e, 0x44, 0x3f, 0x7a, 0x42, 0x55, 0x84, + 0x5e, 0xc4, 0x6f, 0x8c, 0x1b, 0xa7, 0xe0, 0x2b, 0x06, 0x0c, 0x2c, 0x4c, 0xf7, 0x03, 0x72, 0x36, + 0x23, 0x3c, 0x19, 0x19, 0x87, 0x32, 0xa8, 0x1c, 0x53, 0x2a, 0xde, 0x06, 0x2f, 0x98, 0x88, 0xd1, + 0x18, 0x58, 0xc8, 0x9d, 0xcc, 0x71, 0x6a, 0x24, 0xcc, 0x52, 0xdc, 0xb9, 0x21, 0x01, 0xa0, 0x71, + 0xdc, 0xef, 0xd0, 0x5d, 0x5b, 0xbb, 0x19, 0x0a, 0x44, 0x59, 0xd0, 0x61, 0xca, 0x1c, 0x70, 0x46, + 0x3e, 0x2a, 0x35, 0xcc, 0xab, 0x06, 0x0c, 0x2c, 0x4c, 0xec, 0x5b, 0x47, 0x3a, 0x4d, 0xd2, 0xd1, + 0x3d, 0xca, 0x9b, 0x02, 0x1a, 0x07, 0x7d, 0x7c, 0xb1, 0xdf, 0xde, 0xdd, 0x0a, 0x3a, 0x77, 0x05, + 0x63, 0x2b, 0xa9, 0xdc, 0x10, 0xe5, 0xa0, 0x30, 0x9c, 0xb7, 0x48, 0xa5, 0x17, 0xb4, 0x04, 0x2b, + 0x2f, 0x4b, 0xbd, 0x93, 0xae, 0x26, 0x2a, 0x31, 0x9f, 0xcc, 0x4e, 0x6c, 0x87, 0x66, 0x64, 0xbc, + 0x8c, 0x8b, 0x0f, 0xab, 0x66, 0xf9, 0x8f, 0x27, 0x86, 0xf4, 0x1f, 0xd3, 0x6f, 0x26, 0xc6, 0x2c, + 0x39, 0xb9, 0xa2, 0xbf, 0xd9, 0x55, 0x05, 0x01, 0x03, 0x0b, 0x8d, 0xd1, 0x26, 0x35, 0xc0, 0xa4, + 0xb5, 0xc6, 0x63, 0x67, 0xa7, 0x3e, 0x81, 0x31, 0xba, 0x96, 0xa6, 0x06, 0xfd, 0x0d, 0x38, 0x5d, + 0x72, 0xa6, 0x85, 0xeb, 0xc8, 0x6a, 0xb5, 0x7a, 0x82, 0x88, 0x5d, 0x6c, 0xb1, 0x96, 0xa6, 0x04, + 0xfd, 0xc4, 0x9d, 0xaf, 0x93, 0x25, 0x59, 0xd8, 0x7f, 0x9d, 0x8e, 0x2d, 0x97, 0xca, 0xea, 0x13, + 0x94, 0xda, 0x52, 0x6d, 0x20, 0x16, 0x1c, 0x43, 0xc1, 0x79, 0x97, 0x4c, 0xb0, 0x13, 0x87, 0x78, + 0x71, 0x9a, 0xed, 0x76, 0xaf, 0x16, 0x75, 0xb8, 0x2d, 0xb3, 0x73, 0x0b, 0x11, 0x72, 0xa8, 0x4f, + 0x71, 0x58, 0x21, 0x08, 0x9a, 0x74, 0xbe, 0xa6, 0xbd, 0x4e, 0x27, 0x4c, 0x3c, 0xae, 0x84, 0xcd, + 0x14, 0xd1, 0x23, 0x8d, 0x26, 0x56, 0x74, 0x5d, 0xde, 0x8e, 0x8a, 0x7f, 0x32, 0x20, 0x60, 0x36, + 0x81, 0xdb, 0x78, 0x78, 0x0f, 0x05, 0xa6, 0x74, 0xba, 0xc7, 0x8b, 0xb3, 0x45, 0xb6, 0xf1, 0x5b, + 0x56, 0x25, 0x43, 0x82, 0xd9, 0xc4, 0x20, 0x4d, 0x1d, 0x03, 0x6a, 0x0d, 0x3f, 0xea, 0x9c, 0x0e, + 0xa8, 0xd5, 0x7e, 0x54, 0xd3, 0x6d, 0xba, 0xf4, 0x26, 0x99, 0x36, 0x66, 0x6e, 0x98, 0x10, 0xcc, + 0xa5, 0x2f, 0xd1, 0x6d, 0x3c, 0x35, 0x23, 0x43, 0x85, 0x70, 0xfe, 0x8f, 0x32, 0x99, 0xcf, 0x38, + 0x92, 0xb8, 0x1b, 0xb0, 0x20, 0x65, 0x4b, 0x76, 0x5d, 0xa7, 0x65, 0xc0, 0x20, 0xb6, 0x04, 0x2a, + 0x17, 0x90, 0x40, 0x52, 0x1c, 0x56, 0x06, 0x8a, 0x43, 0x21, 0x75, 0xc6, 0x4e, 0x2e, 0x75, 0x6c, + 0x31, 0x3f, 0x5e, 0x48, 0xcc, 0x3f, 0x00, 0x49, 0x65, 0xed, 0x14, 0x93, 0x05, 0x76, 0x8a, 0x8f, + 0x4b, 0x64, 0xce, 0x66, 0xa1, 0x02, 0x33, 0xfe, 0xb0, 0x4e, 0xe0, 0x32, 0xb3, 0xa8, 0x92, 0x28, + 0x6c, 0xb7, 0xfd, 0x48, 0x04, 0x75, 0xcd, 0x09, 0x03, 0x49, 0x94, 0x82, 0x81, 0xe1, 0xfe, 0x52, + 0x99, 0x2c, 0xe8, 0x08, 0x5f, 0x91, 0xd4, 0x72, 0x74, 0x3e, 0xfe, 0x6d, 0xcb, 0xc7, 0x9f, 0x97, + 0xab, 0x32, 0xd5, 0xaf, 0x81, 0xfe, 0xfe, 0x77, 0x53, 0xfe, 0xfe, 0x57, 0x87, 0xa4, 0x7b, 0xbc, + 0xef, 0xff, 0x1f, 0x97, 0xc9, 0xf9, 0x74, 0x95, 0xb5, 0xb6, 0x17, 0x1c, 0x8c, 0x70, 0x9e, 0xbe, + 0x6a, 0xcd, 0xd3, 0xeb, 0xc3, 0x8d, 0x87, 0x75, 0x6e, 0xe0, 0x64, 0x79, 0xa9, 0xc9, 0x7a, 0xf3, + 0x24, 0xc4, 0x8f, 0x9f, 0xb1, 0x7f, 0x5f, 0x22, 0x8f, 0x65, 0xd6, 0x3b, 0x0d, 0x5f, 0xe6, 0x57, + 0x6c, 0x5f, 0xe6, 0x2b, 0x27, 0x18, 0xde, 0x00, 0xe7, 0xe6, 0x7f, 0x29, 0x0f, 0x18, 0x16, 0x73, + 0x7b, 0xdd, 0xa2, 0xfb, 0x68, 0x93, 0xee, 0x36, 0xf1, 0x0d, 0x6a, 0x57, 0xc9, 0xd3, 0xba, 0x8b, + 0x6c, 0x23, 0xd4, 0xc5, 0x74, 0xed, 0x2f, 0xa5, 0x49, 0x68, 0x30, 0x98, 0x14, 0xec, 0xa4, 0x53, + 0xe5, 0x11, 0x25, 0x9d, 0xa2, 0x32, 0xe6, 0x50, 0x99, 0xdb, 0x69, 0x6f, 0x9a, 0x61, 0x88, 0x1b, + 0x58, 0x54, 0xdf, 0x41, 0xe5, 0x94, 0xc7, 0x3a, 0x8c, 0xe5, 0x2e, 0x38, 0xeb, 0x03, 0x9a, 0x81, + 0x13, 0xfc, 0x9a, 0xa2, 0x72, 0x3d, 0x2a, 0x9a, 0xee, 0x77, 0x2a, 0xe4, 0xd3, 0xc7, 0xb0, 0x1d, + 0xdd, 0x24, 0xac, 0x23, 0xcc, 0x17, 0xd3, 0x7e, 0xa6, 0xa5, 0xcc, 0xca, 0x96, 0xe3, 0x29, 0xf5, + 0xb1, 0xca, 0x9f, 0xf8, 0x63, 0xfd, 0xa2, 0xe9, 0x15, 0xe4, 0x31, 0x8b, 0x57, 0x4f, 0xbc, 0xb0, + 0x1e, 0x9c, 0x9b, 0xf0, 0x14, 0x3d, 0x18, 0x98, 0xa0, 0xf8, 0xe9, 0xcc, 0x41, 0x59, 0x91, 0x12, + 0x78, 0xab, 0x0b, 0x0b, 0x8d, 0x6b, 0x23, 0xfa, 0x56, 0x97, 0x04, 0x80, 0xc6, 0xb1, 0x02, 0x22, + 0xca, 0xb9, 0x01, 0x11, 0xff, 0xba, 0x44, 0xce, 0xa5, 0x3b, 0x71, 0x1a, 0x52, 0xa7, 0x61, 0x4b, + 0x9d, 0xe5, 0xe1, 0xbe, 0xfd, 0x00, 0x81, 0xf3, 0x1f, 0x08, 0x79, 0xa4, 0x6f, 0xb3, 0xe2, 0xd3, + 0xf8, 0xd3, 0x25, 0x72, 0x66, 0x8f, 0x19, 0x0a, 0xc6, 0xe5, 0x1c, 0x31, 0xb0, 0x9c, 0x9b, 0x49, + 0xc7, 0xde, 0xe9, 0xe1, 0x66, 0x4f, 0x1f, 0x0a, 0xf4, 0x37, 0xe6, 0xfc, 0x3c, 0x9d, 0x6a, 0xef, + 0x5e, 0xdc, 0x97, 0x21, 0x5d, 0xf0, 0xd1, 0x97, 0x72, 0x7c, 0x72, 0x39, 0xb9, 0xd5, 0x57, 0x17, + 0x31, 0xe8, 0x33, 0x0b, 0x0b, 0x32, 0x5b, 0xa5, 0x4a, 0x00, 0x4f, 0xbf, 0x85, 0x6a, 0x5f, 0xa1, + 0xeb, 0x62, 0x59, 0x57, 0x05, 0xb8, 0x4c, 0x92, 0x10, 0x50, 0x14, 0x9d, 0xf7, 0x48, 0x75, 0x4f, + 0xde, 0xc7, 0x11, 0x42, 0x2f, 0x67, 0x67, 0xc9, 0xbc, 0xbe, 0xc3, 0xc3, 0xd5, 0x15, 0x08, 0x34, + 0x51, 0xe7, 0x1a, 0xa9, 0x74, 0x76, 0x63, 0x71, 0x45, 0x36, 0x2f, 0x20, 0xc6, 0x0e, 0x3f, 0xe2, + 0x97, 0xfe, 0x68, 0x21, 0x20, 0x09, 0xa4, 0x14, 0xed, 0xb4, 0x84, 0x33, 0x3a, 0x87, 0x12, 0xac, + 0xd6, 0xfa, 0x29, 0xd1, 0x42, 0x40, 0x12, 0x2c, 0xf2, 0x0e, 0xaf, 0x16, 0x08, 0x4f, 0x73, 0xce, + 0xfd, 0xe9, 0xbe, 0x0b, 0x14, 0x3c, 0x57, 0x1b, 0x2b, 0x06, 0x4e, 0x08, 0x5d, 0xcc, 0x4d, 0x96, + 0x28, 0x59, 0x38, 0x02, 0xf2, 0xd2, 0xe7, 0xf6, 0x25, 0x55, 0xe6, 0x27, 0x62, 0xbc, 0x1c, 0x04, + 0x2d, 0x46, 0xd5, 0xef, 0xee, 0xef, 0xc6, 0xc2, 0xd0, 0xcf, 0xa3, 0xda, 0x97, 0xf2, 0x5a, 0x50, + 0x65, 0xe5, 0x20, 0x68, 0x39, 0x35, 0x52, 0xde, 0x6d, 0x8a, 0x04, 0x89, 0x39, 0xa6, 0xa9, 0x7d, + 0x83, 0x73, 0x75, 0x02, 0x43, 0xe1, 0x36, 0xd6, 0x80, 0xd6, 0xa7, 0xfa, 0xc8, 0xe4, 0x2e, 0xbf, + 0x94, 0x27, 0x92, 0x21, 0x5e, 0xce, 0xbb, 0x38, 0xd8, 0x77, 0x83, 0x8f, 0x5f, 0x49, 0x10, 0x00, + 0x90, 0xe4, 0xe8, 0x3e, 0x4c, 0x76, 0xd5, 0x2d, 0x43, 0x91, 0x0d, 0x71, 0x79, 0xb8, 0x5b, 0x89, + 0xc2, 0x0c, 0x56, 0xa5, 0x60, 0x50, 0x44, 0x9e, 0xf7, 0x64, 0xae, 0x77, 0x96, 0x09, 0x31, 0x97, + 0xe7, 0x33, 0x53, 0xc3, 0x73, 0x9e, 0x57, 0x20, 0xd0, 0x44, 0x9d, 0x1e, 0x99, 0x3d, 0x8c, 0xbb, + 0xfb, 0xbe, 0x5c, 0xfa, 0x2c, 0x3d, 0xe2, 0xf4, 0x95, 0x2f, 0xe6, 0xe4, 0xbc, 0x14, 0x55, 0x82, + 0x28, 0xe9, 0x79, 0xed, 0x3e, 0x09, 0xc6, 0xf2, 0x0c, 0xdd, 0x36, 0xc9, 0x82, 0xdd, 0x8a, 0xfb, + 0x7b, 0xe3, 0xfd, 0x9b, 0x04, 0xd3, 0xe1, 0x7e, 0xa1, 0xff, 0x6c, 0xef, 0xad, 0xe1, 0x6d, 0x94, + 0x07, 0x78, 0xca, 0x47, 0x65, 0xec, 0x23, 0xdd, 0xcc, 0x1d, 0x40, 0x48, 0xd9, 0x61, 0x4d, 0x1d, + 0x3e, 0x45, 0x2a, 0xa1, 0x65, 0x36, 0x1c, 0x06, 0xb4, 0x99, 0x56, 0x9b, 0x2a, 0x9f, 0x58, 0x6d, + 0xba, 0x43, 0xe7, 0x1b, 0x77, 0x7a, 0x9d, 0xa3, 0x61, 0xc8, 0xb4, 0x06, 0x4c, 0x5e, 0xaf, 0x09, + 0x12, 0xa0, 0x88, 0xe1, 0xc4, 0x3d, 0x9e, 0x1e, 0x04, 0xf8, 0x0c, 0x2c, 0x32, 0x71, 0x72, 0x7b, + 0x7a, 0x43, 0xcc, 0xc4, 0xe3, 0xf5, 0xe3, 0x90, 0x3f, 0xce, 0x43, 0x80, 0xe3, 0x1b, 0x3b, 0x4d, + 0x35, 0xec, 0xef, 0x97, 0x32, 0x94, 0x06, 0xae, 0x38, 0x7f, 0xd1, 0x56, 0x9c, 0x9f, 0x4b, 0x2b, + 0xce, 0x7d, 0x66, 0xae, 0xa5, 0x33, 0x17, 0xcf, 0x46, 0x57, 0x34, 0x89, 0x84, 0xfb, 0xbf, 0x4a, + 0xa4, 0x52, 0x0f, 0x5b, 0x23, 0x34, 0xa4, 0xaf, 0x5a, 0x86, 0xf4, 0xb3, 0xb9, 0x8f, 0x82, 0x0c, + 0x34, 0x9b, 0x6f, 0xa5, 0xcc, 0xe6, 0xcf, 0xe5, 0x93, 0x3a, 0xde, 0x48, 0xfe, 0xb0, 0x42, 0xcc, + 0x67, 0x4d, 0x9c, 0xdf, 0x3e, 0x49, 0x88, 0x5f, 0xa5, 0xd8, 0x4b, 0x27, 0xa2, 0x0d, 0x16, 0x10, + 0x23, 0xef, 0xff, 0xfc, 0xb1, 0x8d, 0xf4, 0xbb, 0xe3, 0x07, 0x7b, 0xfb, 0x89, 0xdf, 0x4a, 0x0f, + 0xec, 0xf4, 0x22, 0xfd, 0xfe, 0x6b, 0x89, 0xcc, 0xa7, 0x5a, 0x77, 0x0e, 0xb2, 0xae, 0x10, 0x9c, + 0xd4, 0x32, 0x3e, 0x93, 0x7b, 0xe9, 0x60, 0x99, 0x10, 0xe5, 0xcd, 0x95, 0xf6, 0x2b, 0xdb, 0xcb, + 0x95, 0xbb, 0x37, 0x06, 0x03, 0x03, 0x73, 0x00, 0x24, 0x61, 0x37, 0x6c, 0x87, 0x7b, 0x47, 0xd7, + 0x7d, 0x79, 0x07, 0x5d, 0xb9, 0xea, 0xb7, 0x35, 0x08, 0x4c, 0x3c, 0xcc, 0x4f, 0x94, 0x7e, 0x15, + 0xe7, 0xff, 0x33, 0xea, 0x1f, 0x1f, 0x46, 0xfd, 0x9d, 0x12, 0x59, 0xc0, 0xd6, 0x59, 0x3c, 0x83, + 0x8c, 0xc7, 0x53, 0x69, 0x9d, 0x4b, 0xc7, 0xa4, 0x75, 0xc6, 0x0b, 0x0d, 0x49, 0x2b, 0xec, 0xc9, + 0xe4, 0x25, 0x86, 0x14, 0xc3, 0x52, 0x10, 0x50, 0x81, 0x47, 0xfb, 0x24, 0x2e, 0x2b, 0x98, 0x78, + 0xb4, 0x14, 0x04, 0x54, 0x66, 0x7d, 0x1e, 0xcb, 0xce, 0xfa, 0xcc, 0x73, 0xbd, 0x88, 0x73, 0x74, + 0xb1, 0x33, 0x1b, 0xb9, 0x5e, 0xe4, 0x01, 0xbb, 0xc6, 0x71, 0xff, 0x69, 0x85, 0xcc, 0x60, 0x38, + 0x99, 0x8a, 0xb5, 0x7d, 0xd5, 0x8a, 0xb5, 0x7d, 0x2a, 0x15, 0x6b, 0xbb, 0x60, 0xe2, 0x3e, 0x98, + 0x50, 0x5b, 0x91, 0x15, 0x88, 0xe5, 0x25, 0x3f, 0x69, 0x98, 0xad, 0x95, 0x15, 0x48, 0x51, 0x02, + 0x9b, 0xf0, 0x9f, 0xa8, 0xf0, 0xda, 0x3f, 0x2a, 0x91, 0x39, 0xfa, 0x2d, 0x90, 0x45, 0xff, 0x24, + 0xf1, 0xa3, 0x99, 0x4b, 0x68, 0xe2, 0x98, 0x5c, 0x42, 0xbf, 0x52, 0x22, 0x18, 0x05, 0x79, 0x1a, + 0x1e, 0xa9, 0x0d, 0xdb, 0x23, 0xf5, 0x74, 0xae, 0xf0, 0x1d, 0xe0, 0x84, 0xfa, 0xf5, 0x0a, 0x99, + 0xc5, 0x2e, 0x87, 0x7b, 0xf2, 0x83, 0x59, 0x93, 0x53, 0x2a, 0x30, 0x39, 0x98, 0x8f, 0x20, 0x6c, + 0xb7, 0xc3, 0x7b, 0xe9, 0x8f, 0xb7, 0xc1, 0x4a, 0x41, 0x40, 0xd1, 0xd5, 0xd7, 0xc5, 0x9c, 0x29, + 0x61, 0x2f, 0x4e, 0xdf, 0x7d, 0xaa, 0x8b, 0x72, 0x50, 0x18, 0x74, 0xc5, 0xcf, 0xc4, 0x01, 0xb5, + 0x01, 0xe4, 0x41, 0xfb, 0x18, 0x3b, 0x68, 0xe7, 0x29, 0xdb, 0x8c, 0x72, 0xb0, 0xb0, 0xa8, 0xaa, + 0x59, 0x65, 0xbf, 0xd9, 0x1a, 0x3a, 0x41, 0x2a, 0x6a, 0x9e, 0x4f, 0x48, 0x52, 0x00, 0x4d, 0x0c, + 0x5d, 0xe9, 0x89, 0x8c, 0x09, 0x88, 0xc5, 0xd1, 0x9b, 0x52, 0x4e, 0x55, 0xb4, 0x00, 0xa6, 0x6e, + 0x52, 0xff, 0x3b, 0x2f, 0x62, 0xa6, 0xd2, 0xa0, 0xbd, 0x85, 0x4f, 0x1c, 0x88, 0xa8, 0x0a, 0x91, + 0x7a, 0x54, 0x14, 0x82, 0x86, 0xe3, 0x9e, 0xcf, 0x6e, 0x5e, 0xf2, 0x44, 0xf7, 0x53, 0x0c, 0x9b, + 0xed, 0xf9, 0x5b, 0xaa, 0x14, 0x0c, 0x0c, 0xf7, 0x15, 0xb6, 0x77, 0x0f, 0x19, 0x8b, 0xfd, 0x51, + 0x99, 0x38, 0x75, 0x16, 0x7b, 0x60, 0xbd, 0x05, 0xb0, 0x4f, 0xe6, 0x62, 0x6a, 0xac, 0x76, 0x7a, + 0xf7, 0x05, 0xa9, 0x62, 0xd1, 0xef, 0x8d, 0x75, 0xb3, 0x0e, 0xbf, 0x6d, 0x68, 0x97, 0x41, 0x8a, + 0x2e, 0x4e, 0x49, 0xd4, 0xeb, 0xac, 0xc4, 0xf8, 0x42, 0x98, 0xc8, 0xe6, 0xcf, 0xa6, 0x04, 0x64, + 0x21, 0x68, 0x38, 0xf2, 0x00, 0xfb, 0x71, 0x93, 0x4a, 0xa3, 0x30, 0x4c, 0x24, 0xd7, 0xb0, 0xd4, + 0xce, 0x46, 0x39, 0x58, 0x58, 0x98, 0x15, 0x39, 0xee, 0x75, 0xbb, 0x6d, 0x76, 0x42, 0xe2, 0xb5, + 0xaf, 0x46, 0x61, 0xaf, 0xcb, 0xc3, 0x4f, 0x45, 0x56, 0xe4, 0x46, 0x1f, 0x14, 0x32, 0x6a, 0xe0, + 0xa2, 0xdf, 0x8d, 0xd9, 0xff, 0xe2, 0x36, 0x25, 0xf7, 0xd3, 0x34, 0x58, 0x11, 0x48, 0x98, 0xdb, + 0x63, 0x5b, 0x15, 0xcb, 0xb2, 0x8e, 0x61, 0x51, 0x8e, 0x4f, 0x66, 0xbb, 0x6c, 0x3b, 0x92, 0xc7, + 0xb4, 0x85, 0xa6, 0x32, 0x15, 0xfd, 0xc0, 0xb3, 0x29, 0x9b, 0x64, 0xc0, 0xa6, 0xea, 0xfe, 0x5b, + 0xc2, 0x64, 0x8d, 0x38, 0x9c, 0x9a, 0x14, 0xb1, 0x8d, 0x42, 0x17, 0x7b, 0xa6, 0xc8, 0xb3, 0x22, + 0x5a, 0x8e, 0x8b, 0x48, 0x49, 0x90, 0x54, 0x9c, 0xaf, 0xf1, 0x73, 0x66, 0xb6, 0xbe, 0x8b, 0x3f, + 0xdc, 0xc3, 0xf1, 0xad, 0xa8, 0x5d, 0x41, 0x02, 0x0c, 0x72, 0xce, 0x16, 0x99, 0x15, 0xa9, 0xb8, + 0x85, 0xad, 0x5e, 0xb1, 0xec, 0xd5, 0x59, 0x30, 0x81, 0x1f, 0xa7, 0x0b, 0xc0, 0xae, 0xec, 0xec, + 0x91, 0xc7, 0x8d, 0xf7, 0x39, 0x32, 0x22, 0x74, 0xb8, 0xe0, 0x78, 0x1a, 0xbd, 0x00, 0xdb, 0xc7, + 0x21, 0xc2, 0xf1, 0x74, 0xe8, 0x24, 0x9f, 0xf7, 0x9a, 0x49, 0x70, 0xe8, 0xd7, 0x7c, 0xaf, 0x45, + 0xb5, 0x32, 0xdf, 0xbe, 0x6a, 0xfb, 0x18, 0x6d, 0xe0, 0xfc, 0x4a, 0x16, 0x02, 0x64, 0xd7, 0xa3, + 0xf6, 0x7a, 0xb5, 0xd5, 0x89, 0xc5, 0x1c, 0x4c, 0x58, 0x4f, 0x91, 0x54, 0x6b, 0x37, 0x1b, 0x6a, + 0xfc, 0xfa, 0x07, 0xe8, 0x0a, 0xce, 0xfb, 0xfc, 0x69, 0x4f, 0x65, 0x90, 0xf0, 0x27, 0x70, 0x5e, + 0x2f, 0x64, 0x02, 0x5b, 0xb7, 0x02, 0xb8, 0x1b, 0x4b, 0x45, 0xc2, 0x59, 0x17, 0x06, 0xac, 0x26, + 0x9c, 0x1f, 0xa7, 0x0b, 0xcb, 0x8f, 0xf0, 0xc9, 0xca, 0x95, 0x26, 0x4b, 0x56, 0xc8, 0x4e, 0x79, + 0xa6, 0xac, 0x70, 0x70, 0xa7, 0xd1, 0x87, 0x01, 0x19, 0xb5, 0x9c, 0x6b, 0x28, 0x71, 0xcc, 0x52, + 0x11, 0xb8, 0x28, 0x55, 0xbb, 0xc5, 0x9a, 0x8f, 0xd9, 0xc3, 0xf1, 0x21, 0x04, 0x9b, 0x22, 0xa4, + 0xea, 0xe1, 0xb6, 0xa2, 0x92, 0x30, 0x13, 0x3b, 0xdc, 0xae, 0x3f, 0x11, 0x33, 0x5a, 0x4a, 0xe8, + 0xf5, 0xbf, 0xe9, 0x27, 0xf8, 0x2e, 0x11, 0xf3, 0xd9, 0x4e, 0x19, 0x49, 0x9d, 0x34, 0x08, 0x4c, + 0x3c, 0xd4, 0x81, 0xd8, 0x61, 0xc1, 0x66, 0x8d, 0x79, 0x62, 0xa7, 0xf4, 0xda, 0xb9, 0xc6, 0x8b, + 0x41, 0xc2, 0x25, 0xea, 0x66, 0x7d, 0x8d, 0x79, 0x55, 0x53, 0xa8, 0xb4, 0x18, 0x24, 0x1c, 0x43, + 0xa5, 0xd2, 0x0f, 0xbe, 0xcc, 0x15, 0xf1, 0x70, 0xf7, 0x4b, 0xf0, 0x82, 0x6f, 0xbe, 0xdc, 0x27, + 0x0b, 0xea, 0xd1, 0x19, 0x9e, 0x35, 0x2f, 0x5e, 0x9c, 0x2f, 0xf2, 0xb0, 0x68, 0x66, 0xf2, 0x3d, + 0x15, 0xa9, 0xba, 0x99, 0xa2, 0x09, 0x7d, 0xad, 0x58, 0x57, 0xc6, 0x17, 0x72, 0x13, 0x6b, 0xe3, + 0x9b, 0x2f, 0xbd, 0x9d, 0x56, 0x78, 0x40, 0x45, 0x06, 0x7b, 0x76, 0xc6, 0x7c, 0x3a, 0x54, 0x02, + 0x40, 0xe3, 0x2c, 0x7d, 0x99, 0x9c, 0xe9, 0xe3, 0xe9, 0xa1, 0x22, 0xb3, 0x7e, 0x61, 0x8c, 0x54, + 0x95, 0x57, 0x87, 0xb6, 0x6f, 0xb9, 0xd2, 0x1e, 0x4b, 0xbb, 0xd2, 0xa6, 0x70, 0xe7, 0x35, 0xbd, + 0x67, 0x5f, 0xcf, 0x78, 0x3b, 0xf0, 0x42, 0xee, 0x47, 0x2c, 0x7e, 0xd3, 0x61, 0x88, 0x97, 0x15, + 0xb5, 0x5a, 0x3f, 0x76, 0xac, 0x5a, 0x5f, 0xf0, 0x35, 0x19, 0x54, 0xe0, 0xe9, 0xce, 0x43, 0xd1, + 0x52, 0x2f, 0x25, 0xd4, 0xb1, 0x10, 0x38, 0x8c, 0xe9, 0x5d, 0x28, 0x94, 0x99, 0xde, 0x35, 0x79, + 0x52, 0xbd, 0x4b, 0x52, 0x00, 0x4d, 0x0c, 0xf3, 0x86, 0x37, 0xed, 0x97, 0x2f, 0xd4, 0x05, 0x86, + 0x8b, 0x43, 0xbc, 0x3c, 0xd1, 0x33, 0xf2, 0x86, 0xaf, 0xa5, 0xe9, 0x41, 0x7f, 0x13, 0x78, 0xdb, + 0x7c, 0x5e, 0x31, 0x04, 0xdd, 0x81, 0x30, 0x6f, 0xcf, 0xe8, 0x1c, 0x99, 0xb7, 0x2c, 0x4b, 0xf5, + 0x01, 0xf8, 0x1f, 0x7f, 0xab, 0xc4, 0xfc, 0x8f, 0xdb, 0xfe, 0x41, 0xb7, 0x8d, 0xcf, 0x69, 0x8c, + 0xae, 0xeb, 0x5f, 0x23, 0x53, 0x89, 0x68, 0xa5, 0x58, 0xee, 0x62, 0xa3, 0x5b, 0xcc, 0x1f, 0xab, + 0x04, 0x81, 0x2c, 0x05, 0x45, 0xd0, 0xfd, 0x17, 0xfc, 0x2b, 0x48, 0xc8, 0x69, 0x58, 0x56, 0x37, + 0x6d, 0xcb, 0xea, 0x85, 0xc2, 0x83, 0x19, 0x60, 0x61, 0x7d, 0xc7, 0x1e, 0x02, 0x53, 0xd8, 0x1e, + 0x7e, 0x8f, 0xb8, 0x7b, 0x83, 0xd8, 0xaf, 0x79, 0x50, 0x75, 0x85, 0x45, 0x3c, 0x72, 0x89, 0x78, + 0x61, 0xc8, 0x68, 0x47, 0xf7, 0xd7, 0xca, 0xe4, 0x5c, 0xd6, 0xeb, 0xd4, 0x4e, 0x8b, 0xcc, 0x74, + 0x0d, 0xf5, 0xb9, 0xd8, 0xc5, 0x76, 0x53, 0xe1, 0xd6, 0xaa, 0x8b, 0x59, 0x0a, 0x16, 0x55, 0xcc, + 0x18, 0x8e, 0x6f, 0x6d, 0x2b, 0xf7, 0x4a, 0x79, 0x78, 0x11, 0xa5, 0x9a, 0x59, 0x37, 0x08, 0x81, + 0x45, 0x76, 0x04, 0xe9, 0xb5, 0xdd, 0xbf, 0x5b, 0x22, 0x8f, 0x0e, 0xb8, 0xfd, 0x8e, 0xcd, 0xdd, + 0x63, 0x5e, 0x48, 0xf1, 0x5a, 0x8c, 0x6a, 0x8e, 0xfb, 0x26, 0x41, 0x40, 0x9d, 0x1d, 0xbc, 0x54, + 0xa9, 0xde, 0xc3, 0x2c, 0x17, 0x39, 0x4a, 0xee, 0xbb, 0x69, 0x6b, 0x5c, 0xc2, 0x54, 0x2f, 0x60, + 0x1a, 0x54, 0xdd, 0x6f, 0x57, 0xc8, 0x38, 0x7f, 0xc5, 0xaf, 0x4e, 0x15, 0x20, 0x9e, 0x6c, 0x6f, + 0xb8, 0x5c, 0x7f, 0x5a, 0x4f, 0xe2, 0x05, 0x20, 0xc9, 0x38, 0x37, 0xc8, 0x59, 0xf4, 0xaf, 0x06, + 0x5e, 0xbb, 0xe6, 0xb7, 0xbd, 0x23, 0xa9, 0x78, 0xf3, 0x94, 0xc8, 0x32, 0xeb, 0xe7, 0xd9, 0xcd, + 0x7e, 0x14, 0xc8, 0xaa, 0x87, 0x77, 0x77, 0x52, 0xd9, 0x72, 0x78, 0xaa, 0x46, 0x75, 0x77, 0xe7, + 0xf8, 0x8c, 0x39, 0x78, 0x7d, 0xa9, 0xdb, 0x67, 0x62, 0x18, 0xcf, 0xbf, 0xd9, 0x66, 0x85, 0x8d, + 0x8b, 0x17, 0x7f, 0xe2, 0x1e, 0x3b, 0x23, 0xdd, 0xde, 0xa7, 0x96, 0xcc, 0x7e, 0xd8, 0x6e, 0x89, + 0x67, 0x8b, 0x94, 0x3a, 0xd5, 0x48, 0xc1, 0xa1, 0xaf, 0x06, 0x52, 0xd9, 0xf5, 0x82, 0x36, 0x65, + 0x6d, 0x4d, 0x65, 0xc2, 0xa6, 0xb2, 0x91, 0x82, 0x43, 0x5f, 0x0d, 0xcc, 0xf4, 0x3c, 0x9f, 0x0a, + 0x11, 0x41, 0x45, 0x2d, 0xf5, 0x3a, 0x38, 0xb3, 0xb7, 0x31, 0x78, 0x22, 0xe3, 0x85, 0xf0, 0xe7, + 0xec, 0xf7, 0x46, 0x75, 0xec, 0xd6, 0x6a, 0xcd, 0x7a, 0x49, 0xa9, 0x68, 0xa6, 0xea, 0xcf, 0x62, + 0x1a, 0x59, 0xf5, 0x30, 0x9e, 0xe2, 0x08, 0x4a, 0xae, 0x4e, 0x8b, 0x81, 0x01, 0xa9, 0x61, 0xce, + 0x1f, 0x1d, 0x4f, 0x79, 0xee, 0xc0, 0x6b, 0x85, 0xb1, 0xf1, 0xf2, 0x38, 0x5d, 0x64, 0x54, 0xe7, + 0x43, 0x97, 0x79, 0xda, 0x6f, 0x79, 0x9d, 0x17, 0x83, 0x84, 0xdb, 0xd9, 0xa8, 0x27, 0x47, 0x9c, + 0x8d, 0x7a, 0x2a, 0x37, 0xcc, 0xed, 0x97, 0xe9, 0x96, 0xc1, 0x12, 0x74, 0x89, 0x3b, 0x83, 0xe8, + 0x01, 0x1f, 0xdd, 0x96, 0x81, 0x2f, 0x6d, 0x61, 0x63, 0xe9, 0x04, 0xb4, 0xac, 0x07, 0xc0, 0x61, + 0xf8, 0x18, 0x2c, 0x6b, 0x1a, 0x3f, 0xdf, 0x0c, 0x4f, 0x25, 0xab, 0x1f, 0x53, 0x66, 0x41, 0xd4, + 0xe0, 0x77, 0xa9, 0x61, 0xca, 0x3a, 0xab, 0xdd, 0x14, 0x0f, 0x4b, 0x10, 0x75, 0x66, 0xe7, 0x1e, + 0x54, 0x10, 0x75, 0x36, 0xf1, 0xfc, 0x20, 0xea, 0xcc, 0x7a, 0x0f, 0x5f, 0x10, 0x75, 0x66, 0x37, + 0x07, 0x28, 0x3b, 0x1f, 0x95, 0x07, 0x0c, 0x8b, 0xa9, 0x3d, 0xcf, 0xe3, 0x2a, 0x60, 0xc0, 0x58, + 0xec, 0x58, 0x33, 0x7c, 0x05, 0xf0, 0x32, 0x50, 0x50, 0x27, 0x36, 0x82, 0x90, 0x79, 0x27, 0xd7, + 0x4f, 0xf8, 0x81, 0x97, 0x6d, 0x3f, 0x87, 0x79, 0x15, 0x2f, 0x15, 0x99, 0x8c, 0xe1, 0x2a, 0x4a, + 0x93, 0xad, 0x9c, 0x44, 0x93, 0x9d, 0xc9, 0xd6, 0x62, 0x97, 0xe8, 0x86, 0x71, 0x72, 0xcb, 0xf4, + 0xbf, 0x95, 0xc8, 0xa7, 0x8f, 0xe1, 0x30, 0x2e, 0x5a, 0xac, 0x49, 0x35, 0x44, 0x4b, 0xdf, 0xc4, + 0xd6, 0xc9, 0xb9, 0x5d, 0x6a, 0x96, 0x1f, 0xb1, 0xe3, 0x67, 0xbf, 0x25, 0x31, 0xc4, 0x5e, 0xaa, + 0x5e, 0xe7, 0xdb, 0xc8, 0xc0, 0x81, 0xcc, 0x9a, 0xe8, 0x15, 0x0a, 0x77, 0x58, 0x02, 0xb4, 0x96, + 0xbe, 0x29, 0xc8, 0xe6, 0xaf, 0xa2, 0xbd, 0x42, 0xb7, 0xfa, 0x30, 0x20, 0xa3, 0x96, 0xfb, 0xfb, + 0x25, 0x94, 0x23, 0x19, 0xaf, 0xd1, 0x58, 0x4f, 0xae, 0x1a, 0xc1, 0xc5, 0xfd, 0x4f, 0xae, 0x32, + 0x7f, 0x8f, 0x8d, 0xcb, 0xa7, 0x28, 0xd6, 0x81, 0x55, 0x56, 0x3a, 0x77, 0x11, 0x54, 0xaf, 0x30, + 0xf0, 0xe1, 0xa5, 0x56, 0x70, 0x18, 0xc4, 0x61, 0x54, 0xe0, 0x85, 0xc3, 0xbe, 0x60, 0x1d, 0xbd, + 0xcb, 0xd4, 0x38, 0x11, 0x90, 0xd4, 0xdc, 0xbf, 0x56, 0x26, 0xb3, 0xb2, 0xbd, 0xb7, 0x7b, 0x21, + 0x5b, 0x88, 0xa3, 0x92, 0x8e, 0x6f, 0x5b, 0xd2, 0xf1, 0x52, 0xb1, 0x9b, 0x05, 0xac, 0x53, 0x03, + 0xa5, 0xe2, 0x57, 0x53, 0x52, 0xf1, 0xf2, 0x30, 0x44, 0x73, 0xad, 0xd5, 0x33, 0x16, 0xfe, 0x43, + 0x94, 0x78, 0x32, 0x6b, 0x38, 0x03, 0xa4, 0xdf, 0xb7, 0xcb, 0xa9, 0x61, 0x30, 0xa9, 0xf7, 0x4d, + 0x32, 0xb6, 0xef, 0x45, 0x2d, 0xe1, 0x9a, 0x7f, 0x73, 0xc8, 0x4f, 0x41, 0xd5, 0xe3, 0xa8, 0xc5, + 0x65, 0xd7, 0x4b, 0x2a, 0x07, 0x3e, 0x2d, 0xca, 0x0d, 0x33, 0x64, 0x8d, 0x3a, 0x6f, 0x60, 0x8e, + 0xfc, 0xb0, 0xab, 0xa2, 0x48, 0x9e, 0xe2, 0xf9, 0xf1, 0xb1, 0x84, 0x52, 0x70, 0xec, 0xe6, 0xb0, + 0x18, 0x04, 0xfe, 0x92, 0x4f, 0xaa, 0xaa, 0xe9, 0x11, 0x06, 0xb4, 0xfd, 0xa8, 0x42, 0xce, 0x66, + 0xb0, 0x8a, 0xf3, 0x53, 0xd6, 0xac, 0x7d, 0x61, 0x68, 0x5e, 0xfb, 0x84, 0xf3, 0xf6, 0x53, 0x4c, + 0xc7, 0x6c, 0x09, 0xde, 0x38, 0x41, 0xf3, 0x54, 0x11, 0x4d, 0x37, 0x8f, 0x45, 0xf9, 0xcd, 0x63, + 0xb3, 0xa7, 0x34, 0xf9, 0xd8, 0x8c, 0xea, 0xe7, 0x08, 0xbf, 0xf1, 0xcf, 0x8e, 0x91, 0x73, 0x59, + 0xb7, 0x97, 0x9c, 0x9f, 0x2b, 0xa5, 0x52, 0xd7, 0x7e, 0x69, 0xf8, 0x2b, 0x50, 0x3c, 0x9f, 0xad, + 0xb8, 0x9e, 0xbc, 0x6c, 0x27, 0xb3, 0xcd, 0x9d, 0x6d, 0xd1, 0x3a, 0x0b, 0x0d, 0x8e, 0x78, 0x16, + 0x62, 0x29, 0x0f, 0xde, 0x3a, 0x41, 0x57, 0x44, 0x22, 0xe3, 0x38, 0x15, 0x1a, 0x2c, 0x8b, 0xf3, + 0x43, 0x83, 0x65, 0x1f, 0x96, 0xf6, 0x30, 0x85, 0xad, 0x1a, 0xd7, 0x08, 0x59, 0x20, 0xc0, 0x3d, + 0xc9, 0xe8, 0xf5, 0x08, 0xd9, 0xe0, 0x6f, 0x94, 0x48, 0xea, 0x78, 0x18, 0x4f, 0xac, 0x99, 0x29, + 0x97, 0x3a, 0xb1, 0x36, 0xac, 0x38, 0x8a, 0x41, 0xd5, 0x1d, 0x3f, 0x9d, 0x53, 0x15, 0x68, 0x19, + 0x30, 0x88, 0x7a, 0x31, 0xab, 0x32, 0xe8, 0xc5, 0x2c, 0xb4, 0x70, 0xda, 0xfe, 0xa1, 0x2f, 0xcd, + 0x4a, 0x25, 0xbc, 0xb7, 0xb0, 0x10, 0x38, 0xcc, 0xfd, 0x5e, 0x85, 0x4c, 0x70, 0xdb, 0x6d, 0x84, + 0xdb, 0x72, 0x5d, 0x98, 0x51, 0x85, 0xee, 0x11, 0xf1, 0xde, 0x2c, 0xa3, 0x9d, 0xc5, 0x19, 0x4a, + 0x8d, 0x4d, 0x9b, 0x5e, 0xce, 0xb2, 0x35, 0xfa, 0xa5, 0x54, 0x64, 0x14, 0xe1, 0x34, 0x8c, 0xb9, + 0xd8, 0x27, 0x24, 0x66, 0x8f, 0xae, 0x20, 0x0d, 0x91, 0x94, 0xe9, 0xd5, 0x42, 0xfd, 0x68, 0xa8, + 0x6a, 0xbc, 0x37, 0x3a, 0x1b, 0x8c, 0x02, 0x80, 0x41, 0x7b, 0xe9, 0x75, 0x52, 0x55, 0xc8, 0x79, + 0x1a, 0xef, 0x8c, 0xc9, 0x92, 0x7f, 0x8a, 0xcc, 0xa7, 0xda, 0x1a, 0x4a, 0x61, 0xfe, 0x2e, 0x55, + 0x26, 0xfa, 0x1e, 0xfb, 0xc3, 0xc4, 0x5e, 0xe7, 0xda, 0x19, 0x46, 0xbb, 0xf8, 0xc0, 0x27, 0x31, + 0xf7, 0xf5, 0x5b, 0xd6, 0x19, 0x50, 0xc8, 0x6c, 0x4d, 0xa6, 0x99, 0x2b, 0x67, 0xa7, 0x99, 0x63, + 0xef, 0x50, 0xf0, 0xbe, 0x9f, 0x86, 0x06, 0xb4, 0x69, 0x6b, 0x40, 0xcf, 0x14, 0x61, 0x83, 0x01, + 0xaa, 0xcf, 0x5f, 0x2d, 0x11, 0x87, 0x23, 0xa4, 0x1f, 0x5f, 0xe2, 0x4e, 0x10, 0x43, 0x67, 0xd7, + 0x7c, 0xa3, 0x20, 0x60, 0x60, 0x0d, 0x99, 0x76, 0x57, 0x3d, 0x5a, 0x32, 0xa0, 0x63, 0xbf, 0x55, + 0x21, 0xe9, 0x73, 0x51, 0xe7, 0x3d, 0x32, 0x83, 0x77, 0x30, 0x76, 0x82, 0x76, 0x90, 0x04, 0x7e, + 0x5c, 0xcc, 0xe7, 0xbc, 0x66, 0xd4, 0x10, 0x3e, 0x31, 0xa3, 0x04, 0x2c, 0x8a, 0x18, 0xcc, 0xd3, + 0x8d, 0xa8, 0xda, 0xdf, 0xf6, 0xf7, 0x98, 0x12, 0xa1, 0x2e, 0xea, 0xd7, 0x55, 0x29, 0x18, 0x18, + 0x19, 0x01, 0x38, 0x95, 0xd3, 0x08, 0xc0, 0x19, 0x1b, 0x32, 0x00, 0x67, 0xbc, 0x50, 0x00, 0x0e, + 0x90, 0x47, 0xa4, 0x2b, 0x0b, 0x7f, 0xe3, 0x5d, 0x20, 0x9e, 0x24, 0x4a, 0x84, 0x4d, 0x2d, 0xe1, + 0xdd, 0x14, 0xc8, 0xc4, 0x80, 0x01, 0x35, 0xdd, 0x1e, 0x39, 0xdb, 0xf0, 0xa3, 0x80, 0xe5, 0xf0, + 0x68, 0xe9, 0xe5, 0xf4, 0x75, 0xbc, 0x45, 0x6d, 0xaf, 0xe4, 0x21, 0xaf, 0x98, 0x18, 0x17, 0xa8, + 0xe5, 0xca, 0xd5, 0x24, 0xdd, 0x3f, 0x57, 0x26, 0x93, 0x22, 0xfe, 0x60, 0x84, 0xbb, 0xc2, 0x75, + 0xcb, 0x58, 0x7b, 0x21, 0x6f, 0x19, 0xb2, 0xee, 0x0c, 0x34, 0xd3, 0x1a, 0x29, 0x33, 0xed, 0xc5, + 0x62, 0xe4, 0x8e, 0x37, 0xd0, 0x7e, 0xb3, 0x4c, 0xb7, 0x6e, 0x3b, 0xee, 0x62, 0x74, 0xd3, 0xf1, + 0x15, 0x32, 0x19, 0x8b, 0xe0, 0x84, 0x42, 0x0f, 0x44, 0xa7, 0x3f, 0xa9, 0x7e, 0xfa, 0x58, 0x84, + 0x23, 0x48, 0x72, 0x99, 0xf1, 0x0f, 0x95, 0xd3, 0x88, 0x7f, 0x70, 0xbf, 0xc7, 0xe4, 0xa3, 0x39, + 0x81, 0xa7, 0x21, 0xe0, 0xdf, 0xb6, 0x45, 0xe9, 0x4b, 0x85, 0x58, 0x41, 0xf4, 0x6f, 0x80, 0x3c, + 0xfd, 0xb0, 0x44, 0xa6, 0x05, 0xe2, 0x69, 0x8c, 0xe0, 0xc7, 0xed, 0x11, 0x3c, 0x5b, 0x68, 0x04, + 0x03, 0xba, 0xfe, 0xb7, 0xca, 0xaa, 0xeb, 0x05, 0xdf, 0x60, 0x37, 0x5f, 0x58, 0x2f, 0x0f, 0xf3, + 0xc2, 0xba, 0x7a, 0xbd, 0xbd, 0x32, 0xf0, 0xf5, 0xf6, 0x1d, 0xf9, 0x0e, 0x28, 0x96, 0x89, 0x78, + 0xef, 0x61, 0xdf, 0xcd, 0xd3, 0x01, 0xa8, 0x8a, 0x12, 0x18, 0x54, 0x65, 0x6c, 0x14, 0x6b, 0x61, + 0xdc, 0xf6, 0x0d, 0xde, 0x14, 0xe5, 0xa0, 0x30, 0xdc, 0xd7, 0x99, 0x8c, 0x65, 0xd3, 0x33, 0x5c, + 0x54, 0xe9, 0x0f, 0xc6, 0xd5, 0xc4, 0x32, 0x8f, 0xc7, 0x4d, 0xf9, 0xe6, 0x7a, 0xa9, 0xc8, 0x11, + 0xba, 0xf1, 0x49, 0xb2, 0x9f, 0x5c, 0x77, 0xfc, 0x3e, 0x6f, 0xf0, 0xeb, 0x85, 0x65, 0xe4, 0x10, + 0xfe, 0x5f, 0x96, 0xbc, 0x80, 0x5d, 0xd8, 0xde, 0xac, 0xa7, 0x33, 0xbd, 0xad, 0x49, 0x00, 0x68, + 0x1c, 0x5a, 0x81, 0xeb, 0xde, 0xf6, 0xf3, 0x83, 0x52, 0xf7, 0x96, 0x53, 0x62, 0x28, 0xdf, 0x97, + 0xc9, 0xb4, 0xca, 0x75, 0x5b, 0xe7, 0x29, 0x4b, 0xab, 0xab, 0xf3, 0x18, 0x79, 0xb6, 0xae, 0x8b, + 0xc1, 0xc4, 0xa1, 0x3a, 0xda, 0xd9, 0x96, 0x0a, 0x85, 0xab, 0xf7, 0x76, 0xda, 0x41, 0x13, 0xab, + 0xf2, 0x30, 0xf4, 0x47, 0xf1, 0xdc, 0xb3, 0xd6, 0x0f, 0x86, 0xac, 0x3a, 0xce, 0x36, 0x86, 0x9b, + 0xb1, 0x9c, 0xbe, 0xf2, 0xc2, 0x8a, 0xc8, 0xa0, 0x74, 0x41, 0xa6, 0x5f, 0x6a, 0xd8, 0xe0, 0x8f, + 0x59, 0x11, 0x17, 0x0a, 0xa2, 0x08, 0xd2, 0x24, 0xf0, 0x34, 0xb5, 0x6d, 0xbe, 0xcd, 0x51, 0x17, + 0x11, 0x81, 0xea, 0x34, 0xd5, 0x7a, 0xb9, 0xa3, 0x0e, 0x29, 0x6c, 0x2a, 0xed, 0x17, 0xcd, 0x12, + 0x71, 0x47, 0x15, 0x0f, 0x9d, 0x62, 0x91, 0x4c, 0xf4, 0x33, 0x18, 0x0f, 0xb8, 0x35, 0x00, 0x07, + 0x06, 0xd6, 0xfe, 0x64, 0x6e, 0xf7, 0x6f, 0x62, 0x65, 0x63, 0x6b, 0x74, 0xbe, 0x41, 0x66, 0xcc, + 0x96, 0x84, 0xb0, 0x7b, 0xb9, 0xf8, 0xab, 0x25, 0x62, 0x8b, 0x55, 0x71, 0x04, 0x26, 0x0c, 0x2c, + 0xda, 0x6e, 0x93, 0xcc, 0xa7, 0xde, 0x45, 0x54, 0x0f, 0x6c, 0x96, 0x1e, 0xd4, 0x03, 0x9b, 0x98, + 0xd1, 0x63, 0x7c, 0xdb, 0x0b, 0xf2, 0x73, 0x5f, 0x17, 0x7a, 0x44, 0xff, 0x35, 0x32, 0xe1, 0xef, + 0xee, 0xe2, 0x03, 0xe6, 0x7c, 0xe5, 0x3c, 0xae, 0x9e, 0x4d, 0x66, 0xa5, 0xb8, 0x1e, 0x58, 0x63, + 0xfc, 0x27, 0x08, 0x64, 0xf7, 0xdf, 0x50, 0x83, 0x67, 0x9b, 0x5a, 0xf1, 0x22, 0xa9, 0x60, 0x4e, + 0x4f, 0x56, 0xfb, 0xb2, 0x70, 0x3f, 0x97, 0x91, 0x85, 0xdb, 0xd1, 0x04, 0x33, 0x72, 0x70, 0xab, + 0xd1, 0x54, 0x0a, 0x8d, 0x66, 0x6c, 0x98, 0xd1, 0x7c, 0xab, 0x44, 0x26, 0xc4, 0xf5, 0xfa, 0xfc, + 0xcd, 0xa5, 0x25, 0x33, 0xe7, 0x5a, 0x57, 0xbe, 0x2f, 0x14, 0x09, 0xdd, 0x16, 0x17, 0xbd, 0x15, + 0x2b, 0x59, 0xd7, 0xbb, 0x2d, 0xaa, 0x68, 0x0d, 0x4f, 0x73, 0xf0, 0x0d, 0xf9, 0xbe, 0x78, 0x4e, + 0xbf, 0x86, 0x4a, 0xc9, 0xc2, 0x12, 0xcb, 0x22, 0x61, 0x95, 0x99, 0xc3, 0x4c, 0x2c, 0x2b, 0x01, + 0xa0, 0x71, 0xf0, 0x58, 0x3e, 0xee, 0xed, 0x30, 0xf4, 0xd4, 0x29, 0x7f, 0x83, 0x17, 0x83, 0x84, + 0xbb, 0x1f, 0xce, 0x13, 0x6b, 0x68, 0x56, 0x16, 0x90, 0xd2, 0x03, 0xcf, 0x02, 0x42, 0xa9, 0xfb, + 0x07, 0xdd, 0xe4, 0xa8, 0x16, 0x44, 0xc5, 0x32, 0x32, 0xad, 0x0b, 0xec, 0x7e, 0xea, 0x12, 0x02, + 0x8a, 0xe2, 0x80, 0x9c, 0x2e, 0x95, 0x87, 0x22, 0xa7, 0xcb, 0xd8, 0xff, 0x93, 0x9c, 0x2e, 0x54, + 0xcf, 0xdf, 0xe3, 0x0f, 0x36, 0x8b, 0xab, 0x3a, 0x39, 0x27, 0x4a, 0x19, 0xaf, 0x3b, 0xf3, 0x3b, + 0x19, 0x02, 0x00, 0x92, 0x1c, 0x66, 0x0c, 0xe1, 0x2a, 0xbf, 0x48, 0x93, 0xf2, 0x72, 0x11, 0xcf, + 0x46, 0x7f, 0xc6, 0x10, 0x11, 0xca, 0x21, 0x68, 0xc9, 0x1c, 0x2e, 0x93, 0x9f, 0x3c, 0x87, 0x8b, + 0xca, 0xbc, 0x32, 0xf5, 0xa0, 0x32, 0xaf, 0x58, 0x19, 0x6c, 0xaa, 0xa3, 0xc8, 0x60, 0x43, 0x65, + 0xdb, 0xf9, 0x6e, 0x56, 0x02, 0x28, 0x91, 0x43, 0xe5, 0xcb, 0x27, 0x48, 0x88, 0x65, 0x35, 0xcd, + 0x6e, 0x50, 0x64, 0xa2, 0x41, 0x76, 0xc3, 0x32, 0x15, 0xce, 0xf4, 0x27, 0x4f, 0x85, 0x33, 0xea, + 0x64, 0x2b, 0x3a, 0x31, 0xce, 0xec, 0x48, 0x12, 0xe3, 0xcc, 0x3d, 0xc0, 0xc4, 0x38, 0x46, 0x4a, + 0x9b, 0xf9, 0x07, 0x9b, 0xd2, 0x66, 0x9f, 0x4c, 0xb7, 0xc2, 0x7b, 0x9d, 0x7b, 0x5e, 0xd4, 0x5a, + 0xa9, 0x6f, 0xb2, 0x7b, 0x00, 0xb9, 0xd7, 0xac, 0x6b, 0xba, 0x82, 0xd5, 0x02, 0xd3, 0x9a, 0x0d, + 0x20, 0x98, 0xa4, 0x45, 0x72, 0x9f, 0x33, 0x9f, 0x30, 0xb9, 0x8f, 0x95, 0x22, 0xc7, 0x19, 0x45, + 0x8a, 0x9c, 0xf7, 0xd8, 0x65, 0xcb, 0xdd, 0x60, 0xef, 0x86, 0xd7, 0x5d, 0x3c, 0x5b, 0xa4, 0x85, + 0x35, 0x89, 0xde, 0xdf, 0x82, 0x02, 0x81, 0x26, 0xda, 0x9f, 0x84, 0xe7, 0xdc, 0xa9, 0x24, 0xe1, + 0xf9, 0x33, 0xe4, 0x89, 0xe3, 0x69, 0xe8, 0xdc, 0x84, 0x75, 0x6d, 0x5c, 0xa6, 0x72, 0x13, 0xb2, + 0xfd, 0xd9, 0xc0, 0x32, 0xc2, 0x08, 0xcb, 0xc7, 0x85, 0x11, 0xba, 0xff, 0xa4, 0x44, 0x1e, 0x1d, + 0x70, 0x3f, 0xbf, 0x70, 0xd0, 0x6c, 0x97, 0xcc, 0x77, 0xed, 0xaa, 0x85, 0xc3, 0xdb, 0xad, 0x7c, + 0x00, 0x2a, 0xb7, 0x6d, 0x0a, 0x00, 0x69, 0xf2, 0xab, 0xcf, 0x7c, 0xff, 0x47, 0x4f, 0x7c, 0xea, + 0x23, 0xfa, 0xf7, 0xbb, 0xf4, 0xef, 0xa7, 0xff, 0xe0, 0x89, 0xd2, 0xf7, 0xe9, 0xdf, 0x47, 0xf4, + 0xef, 0x3f, 0xd3, 0xbf, 0x6f, 0xfd, 0xe1, 0x13, 0x9f, 0xfa, 0x89, 0xf2, 0xe1, 0xe5, 0xff, 0x1b, + 0x00, 0x00, 0xff, 0xff, 0xfe, 0xa5, 0x80, 0xea, 0x03, 0xac, 0x00, 0x00, } diff --git a/staging/src/k8s.io/client-go/1.4/pkg/api/v1/generated.proto b/staging/src/k8s.io/client-go/1.4/pkg/api/v1/generated.proto index cc8d1baaca0d9..4b82d68dce03b 100644 --- a/staging/src/k8s.io/client-go/1.4/pkg/api/v1/generated.proto +++ b/staging/src/k8s.io/client-go/1.4/pkg/api/v1/generated.proto @@ -558,6 +558,9 @@ message EndpointAddress { // The Hostname of this endpoint optional string hostname = 3; + // Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node. + optional string nodeName = 4; + // Reference to object providing the endpoint. optional ObjectReference targetRef = 2; } @@ -1301,6 +1304,7 @@ message NodeStatus { // NodePhase is the recently observed lifecycle phase of the node. // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-phase + // The field is never populated, and now is deprecated. optional string phase = 3; // Conditions is an array of current observed node conditions. diff --git a/staging/src/k8s.io/client-go/1.4/pkg/api/v1/types.generated.go b/staging/src/k8s.io/client-go/1.4/pkg/api/v1/types.generated.go index 989529553089b..f2b2492125db5 100644 --- a/staging/src/k8s.io/client-go/1.4/pkg/api/v1/types.generated.go +++ b/staging/src/k8s.io/client-go/1.4/pkg/api/v1/types.generated.go @@ -34303,14 +34303,15 @@ func (x *EndpointAddress) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2647 := !z.EncBinary() yy2arr2647 := z.EncBasicHandle().StructToArray - var yyq2647 [3]bool + var yyq2647 [4]bool _, _, _ = yysep2647, yyq2647, yy2arr2647 const yyr2647 bool = false yyq2647[1] = x.Hostname != "" - yyq2647[2] = x.TargetRef != nil + yyq2647[2] = x.NodeName != nil + yyq2647[3] = x.TargetRef != nil var yynn2647 int if yyr2647 || yy2arr2647 { - r.EncodeArrayStart(3) + r.EncodeArrayStart(4) } else { yynn2647 = 1 for _, b := range yyq2647 { @@ -34368,6 +34369,41 @@ func (x *EndpointAddress) CodecEncodeSelf(e *codec1978.Encoder) { if yyr2647 || yy2arr2647 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2647[2] { + if x.NodeName == nil { + r.EncodeNil() + } else { + yy2655 := *x.NodeName + yym2656 := z.EncBinary() + _ = yym2656 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(yy2655)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2647[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("nodeName")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.NodeName == nil { + r.EncodeNil() + } else { + yy2657 := *x.NodeName + yym2658 := z.EncBinary() + _ = yym2658 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(yy2657)) + } + } + } + } + if yyr2647 || yy2arr2647 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2647[3] { if x.TargetRef == nil { r.EncodeNil() } else { @@ -34377,7 +34413,7 @@ func (x *EndpointAddress) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2647[2] { + if yyq2647[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("targetRef")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -34401,25 +34437,25 @@ func (x *EndpointAddress) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2655 := z.DecBinary() - _ = yym2655 + yym2660 := z.DecBinary() + _ = yym2660 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2656 := r.ContainerType() - if yyct2656 == codecSelferValueTypeMap1234 { - yyl2656 := r.ReadMapStart() - if yyl2656 == 0 { + yyct2661 := r.ContainerType() + if yyct2661 == codecSelferValueTypeMap1234 { + yyl2661 := r.ReadMapStart() + if yyl2661 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2656, d) + x.codecDecodeSelfFromMap(yyl2661, d) } - } else if yyct2656 == codecSelferValueTypeArray1234 { - yyl2656 := r.ReadArrayStart() - if yyl2656 == 0 { + } else if yyct2661 == codecSelferValueTypeArray1234 { + yyl2661 := r.ReadArrayStart() + if yyl2661 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2656, d) + x.codecDecodeSelfFromArray(yyl2661, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -34431,12 +34467,12 @@ func (x *EndpointAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2657Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2657Slc - var yyhl2657 bool = l >= 0 - for yyj2657 := 0; ; yyj2657++ { - if yyhl2657 { - if yyj2657 >= l { + var yys2662Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2662Slc + var yyhl2662 bool = l >= 0 + for yyj2662 := 0; ; yyj2662++ { + if yyhl2662 { + if yyj2662 >= l { break } } else { @@ -34445,10 +34481,10 @@ func (x *EndpointAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2657Slc = r.DecodeBytes(yys2657Slc, true, true) - yys2657 := string(yys2657Slc) + yys2662Slc = r.DecodeBytes(yys2662Slc, true, true) + yys2662 := string(yys2662Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2657 { + switch yys2662 { case "ip": if r.TryDecodeAsNil() { x.IP = "" @@ -34461,6 +34497,22 @@ func (x *EndpointAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } else { x.Hostname = string(r.DecodeString()) } + case "nodeName": + if r.TryDecodeAsNil() { + if x.NodeName != nil { + x.NodeName = nil + } + } else { + if x.NodeName == nil { + x.NodeName = new(string) + } + yym2666 := z.DecBinary() + _ = yym2666 + if false { + } else { + *((*string)(x.NodeName)) = r.DecodeString() + } + } case "targetRef": if r.TryDecodeAsNil() { if x.TargetRef != nil { @@ -34473,9 +34525,9 @@ func (x *EndpointAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.TargetRef.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2657) - } // end switch yys2657 - } // end for yyj2657 + z.DecStructFieldNotFound(-1, yys2662) + } // end switch yys2662 + } // end for yyj2662 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -34483,16 +34535,16 @@ func (x *EndpointAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2661 int - var yyb2661 bool - var yyhl2661 bool = l >= 0 - yyj2661++ - if yyhl2661 { - yyb2661 = yyj2661 > l + var yyj2668 int + var yyb2668 bool + var yyhl2668 bool = l >= 0 + yyj2668++ + if yyhl2668 { + yyb2668 = yyj2668 > l } else { - yyb2661 = r.CheckBreak() + yyb2668 = r.CheckBreak() } - if yyb2661 { + if yyb2668 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34502,13 +34554,13 @@ func (x *EndpointAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.IP = string(r.DecodeString()) } - yyj2661++ - if yyhl2661 { - yyb2661 = yyj2661 > l + yyj2668++ + if yyhl2668 { + yyb2668 = yyj2668 > l } else { - yyb2661 = r.CheckBreak() + yyb2668 = r.CheckBreak() } - if yyb2661 { + if yyb2668 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34518,13 +34570,39 @@ func (x *EndpointAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Hostname = string(r.DecodeString()) } - yyj2661++ - if yyhl2661 { - yyb2661 = yyj2661 > l + yyj2668++ + if yyhl2668 { + yyb2668 = yyj2668 > l + } else { + yyb2668 = r.CheckBreak() + } + if yyb2668 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.NodeName != nil { + x.NodeName = nil + } + } else { + if x.NodeName == nil { + x.NodeName = new(string) + } + yym2672 := z.DecBinary() + _ = yym2672 + if false { + } else { + *((*string)(x.NodeName)) = r.DecodeString() + } + } + yyj2668++ + if yyhl2668 { + yyb2668 = yyj2668 > l } else { - yyb2661 = r.CheckBreak() + yyb2668 = r.CheckBreak() } - if yyb2661 { + if yyb2668 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34540,17 +34618,17 @@ func (x *EndpointAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) x.TargetRef.CodecDecodeSelf(d) } for { - yyj2661++ - if yyhl2661 { - yyb2661 = yyj2661 > l + yyj2668++ + if yyhl2668 { + yyb2668 = yyj2668 > l } else { - yyb2661 = r.CheckBreak() + yyb2668 = r.CheckBreak() } - if yyb2661 { + if yyb2668 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2661-1, "") + z.DecStructFieldNotFound(yyj2668-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -34562,36 +34640,36 @@ func (x *EndpointPort) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2665 := z.EncBinary() - _ = yym2665 + yym2674 := z.EncBinary() + _ = yym2674 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2666 := !z.EncBinary() - yy2arr2666 := z.EncBasicHandle().StructToArray - var yyq2666 [3]bool - _, _, _ = yysep2666, yyq2666, yy2arr2666 - const yyr2666 bool = false - yyq2666[0] = x.Name != "" - yyq2666[2] = x.Protocol != "" - var yynn2666 int - if yyr2666 || yy2arr2666 { + yysep2675 := !z.EncBinary() + yy2arr2675 := z.EncBasicHandle().StructToArray + var yyq2675 [3]bool + _, _, _ = yysep2675, yyq2675, yy2arr2675 + const yyr2675 bool = false + yyq2675[0] = x.Name != "" + yyq2675[2] = x.Protocol != "" + var yynn2675 int + if yyr2675 || yy2arr2675 { r.EncodeArrayStart(3) } else { - yynn2666 = 1 - for _, b := range yyq2666 { + yynn2675 = 1 + for _, b := range yyq2675 { if b { - yynn2666++ + yynn2675++ } } - r.EncodeMapStart(yynn2666) - yynn2666 = 0 + r.EncodeMapStart(yynn2675) + yynn2675 = 0 } - if yyr2666 || yy2arr2666 { + if yyr2675 || yy2arr2675 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2666[0] { - yym2668 := z.EncBinary() - _ = yym2668 + if yyq2675[0] { + yym2677 := z.EncBinary() + _ = yym2677 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -34600,22 +34678,22 @@ func (x *EndpointPort) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2666[0] { + if yyq2675[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2669 := z.EncBinary() - _ = yym2669 + yym2678 := z.EncBinary() + _ = yym2678 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } } - if yyr2666 || yy2arr2666 { + if yyr2675 || yy2arr2675 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2671 := z.EncBinary() - _ = yym2671 + yym2680 := z.EncBinary() + _ = yym2680 if false { } else { r.EncodeInt(int64(x.Port)) @@ -34624,29 +34702,29 @@ func (x *EndpointPort) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("port")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2672 := z.EncBinary() - _ = yym2672 + yym2681 := z.EncBinary() + _ = yym2681 if false { } else { r.EncodeInt(int64(x.Port)) } } - if yyr2666 || yy2arr2666 { + if yyr2675 || yy2arr2675 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2666[2] { + if yyq2675[2] { x.Protocol.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2666[2] { + if yyq2675[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("protocol")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Protocol.CodecEncodeSelf(e) } } - if yyr2666 || yy2arr2666 { + if yyr2675 || yy2arr2675 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -34659,25 +34737,25 @@ func (x *EndpointPort) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2674 := z.DecBinary() - _ = yym2674 + yym2683 := z.DecBinary() + _ = yym2683 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2675 := r.ContainerType() - if yyct2675 == codecSelferValueTypeMap1234 { - yyl2675 := r.ReadMapStart() - if yyl2675 == 0 { + yyct2684 := r.ContainerType() + if yyct2684 == codecSelferValueTypeMap1234 { + yyl2684 := r.ReadMapStart() + if yyl2684 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2675, d) + x.codecDecodeSelfFromMap(yyl2684, d) } - } else if yyct2675 == codecSelferValueTypeArray1234 { - yyl2675 := r.ReadArrayStart() - if yyl2675 == 0 { + } else if yyct2684 == codecSelferValueTypeArray1234 { + yyl2684 := r.ReadArrayStart() + if yyl2684 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2675, d) + x.codecDecodeSelfFromArray(yyl2684, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -34689,12 +34767,12 @@ func (x *EndpointPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2676Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2676Slc - var yyhl2676 bool = l >= 0 - for yyj2676 := 0; ; yyj2676++ { - if yyhl2676 { - if yyj2676 >= l { + var yys2685Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2685Slc + var yyhl2685 bool = l >= 0 + for yyj2685 := 0; ; yyj2685++ { + if yyhl2685 { + if yyj2685 >= l { break } } else { @@ -34703,10 +34781,10 @@ func (x *EndpointPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2676Slc = r.DecodeBytes(yys2676Slc, true, true) - yys2676 := string(yys2676Slc) + yys2685Slc = r.DecodeBytes(yys2685Slc, true, true) + yys2685 := string(yys2685Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2676 { + switch yys2685 { case "name": if r.TryDecodeAsNil() { x.Name = "" @@ -34726,9 +34804,9 @@ func (x *EndpointPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Protocol = Protocol(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys2676) - } // end switch yys2676 - } // end for yyj2676 + z.DecStructFieldNotFound(-1, yys2685) + } // end switch yys2685 + } // end for yyj2685 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -34736,16 +34814,16 @@ func (x *EndpointPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2680 int - var yyb2680 bool - var yyhl2680 bool = l >= 0 - yyj2680++ - if yyhl2680 { - yyb2680 = yyj2680 > l + var yyj2689 int + var yyb2689 bool + var yyhl2689 bool = l >= 0 + yyj2689++ + if yyhl2689 { + yyb2689 = yyj2689 > l } else { - yyb2680 = r.CheckBreak() + yyb2689 = r.CheckBreak() } - if yyb2680 { + if yyb2689 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34755,13 +34833,13 @@ func (x *EndpointPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Name = string(r.DecodeString()) } - yyj2680++ - if yyhl2680 { - yyb2680 = yyj2680 > l + yyj2689++ + if yyhl2689 { + yyb2689 = yyj2689 > l } else { - yyb2680 = r.CheckBreak() + yyb2689 = r.CheckBreak() } - if yyb2680 { + if yyb2689 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34771,13 +34849,13 @@ func (x *EndpointPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Port = int32(r.DecodeInt(32)) } - yyj2680++ - if yyhl2680 { - yyb2680 = yyj2680 > l + yyj2689++ + if yyhl2689 { + yyb2689 = yyj2689 > l } else { - yyb2680 = r.CheckBreak() + yyb2689 = r.CheckBreak() } - if yyb2680 { + if yyb2689 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -34788,17 +34866,17 @@ func (x *EndpointPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Protocol = Protocol(r.DecodeString()) } for { - yyj2680++ - if yyhl2680 { - yyb2680 = yyj2680 > l + yyj2689++ + if yyhl2689 { + yyb2689 = yyj2689 > l } else { - yyb2680 = r.CheckBreak() + yyb2689 = r.CheckBreak() } - if yyb2680 { + if yyb2689 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2680-1, "") + z.DecStructFieldNotFound(yyj2689-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -34810,37 +34888,37 @@ func (x *EndpointsList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2684 := z.EncBinary() - _ = yym2684 + yym2693 := z.EncBinary() + _ = yym2693 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2685 := !z.EncBinary() - yy2arr2685 := z.EncBasicHandle().StructToArray - var yyq2685 [4]bool - _, _, _ = yysep2685, yyq2685, yy2arr2685 - const yyr2685 bool = false - yyq2685[0] = x.Kind != "" - yyq2685[1] = x.APIVersion != "" - yyq2685[2] = true - var yynn2685 int - if yyr2685 || yy2arr2685 { + yysep2694 := !z.EncBinary() + yy2arr2694 := z.EncBasicHandle().StructToArray + var yyq2694 [4]bool + _, _, _ = yysep2694, yyq2694, yy2arr2694 + const yyr2694 bool = false + yyq2694[0] = x.Kind != "" + yyq2694[1] = x.APIVersion != "" + yyq2694[2] = true + var yynn2694 int + if yyr2694 || yy2arr2694 { r.EncodeArrayStart(4) } else { - yynn2685 = 1 - for _, b := range yyq2685 { + yynn2694 = 1 + for _, b := range yyq2694 { if b { - yynn2685++ + yynn2694++ } } - r.EncodeMapStart(yynn2685) - yynn2685 = 0 + r.EncodeMapStart(yynn2694) + yynn2694 = 0 } - if yyr2685 || yy2arr2685 { + if yyr2694 || yy2arr2694 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2685[0] { - yym2687 := z.EncBinary() - _ = yym2687 + if yyq2694[0] { + yym2696 := z.EncBinary() + _ = yym2696 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -34849,23 +34927,23 @@ func (x *EndpointsList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2685[0] { + if yyq2694[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2688 := z.EncBinary() - _ = yym2688 + yym2697 := z.EncBinary() + _ = yym2697 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr2685 || yy2arr2685 { + if yyr2694 || yy2arr2694 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2685[1] { - yym2690 := z.EncBinary() - _ = yym2690 + if yyq2694[1] { + yym2699 := z.EncBinary() + _ = yym2699 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -34874,54 +34952,54 @@ func (x *EndpointsList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2685[1] { + if yyq2694[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2691 := z.EncBinary() - _ = yym2691 + yym2700 := z.EncBinary() + _ = yym2700 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr2685 || yy2arr2685 { + if yyr2694 || yy2arr2694 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2685[2] { - yy2693 := &x.ListMeta - yym2694 := z.EncBinary() - _ = yym2694 + if yyq2694[2] { + yy2702 := &x.ListMeta + yym2703 := z.EncBinary() + _ = yym2703 if false { - } else if z.HasExtensions() && z.EncExt(yy2693) { + } else if z.HasExtensions() && z.EncExt(yy2702) { } else { - z.EncFallback(yy2693) + z.EncFallback(yy2702) } } else { r.EncodeNil() } } else { - if yyq2685[2] { + if yyq2694[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2695 := &x.ListMeta - yym2696 := z.EncBinary() - _ = yym2696 + yy2704 := &x.ListMeta + yym2705 := z.EncBinary() + _ = yym2705 if false { - } else if z.HasExtensions() && z.EncExt(yy2695) { + } else if z.HasExtensions() && z.EncExt(yy2704) { } else { - z.EncFallback(yy2695) + z.EncFallback(yy2704) } } } - if yyr2685 || yy2arr2685 { + if yyr2694 || yy2arr2694 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym2698 := z.EncBinary() - _ = yym2698 + yym2707 := z.EncBinary() + _ = yym2707 if false { } else { h.encSliceEndpoints(([]Endpoints)(x.Items), e) @@ -34934,15 +35012,15 @@ func (x *EndpointsList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym2699 := z.EncBinary() - _ = yym2699 + yym2708 := z.EncBinary() + _ = yym2708 if false { } else { h.encSliceEndpoints(([]Endpoints)(x.Items), e) } } } - if yyr2685 || yy2arr2685 { + if yyr2694 || yy2arr2694 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -34955,25 +35033,25 @@ func (x *EndpointsList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2700 := z.DecBinary() - _ = yym2700 + yym2709 := z.DecBinary() + _ = yym2709 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2701 := r.ContainerType() - if yyct2701 == codecSelferValueTypeMap1234 { - yyl2701 := r.ReadMapStart() - if yyl2701 == 0 { + yyct2710 := r.ContainerType() + if yyct2710 == codecSelferValueTypeMap1234 { + yyl2710 := r.ReadMapStart() + if yyl2710 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2701, d) + x.codecDecodeSelfFromMap(yyl2710, d) } - } else if yyct2701 == codecSelferValueTypeArray1234 { - yyl2701 := r.ReadArrayStart() - if yyl2701 == 0 { + } else if yyct2710 == codecSelferValueTypeArray1234 { + yyl2710 := r.ReadArrayStart() + if yyl2710 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2701, d) + x.codecDecodeSelfFromArray(yyl2710, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -34985,12 +35063,12 @@ func (x *EndpointsList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2702Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2702Slc - var yyhl2702 bool = l >= 0 - for yyj2702 := 0; ; yyj2702++ { - if yyhl2702 { - if yyj2702 >= l { + var yys2711Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2711Slc + var yyhl2711 bool = l >= 0 + for yyj2711 := 0; ; yyj2711++ { + if yyhl2711 { + if yyj2711 >= l { break } } else { @@ -34999,10 +35077,10 @@ func (x *EndpointsList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2702Slc = r.DecodeBytes(yys2702Slc, true, true) - yys2702 := string(yys2702Slc) + yys2711Slc = r.DecodeBytes(yys2711Slc, true, true) + yys2711 := string(yys2711Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2702 { + switch yys2711 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -35019,31 +35097,31 @@ func (x *EndpointsList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv2705 := &x.ListMeta - yym2706 := z.DecBinary() - _ = yym2706 + yyv2714 := &x.ListMeta + yym2715 := z.DecBinary() + _ = yym2715 if false { - } else if z.HasExtensions() && z.DecExt(yyv2705) { + } else if z.HasExtensions() && z.DecExt(yyv2714) { } else { - z.DecFallback(yyv2705, false) + z.DecFallback(yyv2714, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2707 := &x.Items - yym2708 := z.DecBinary() - _ = yym2708 + yyv2716 := &x.Items + yym2717 := z.DecBinary() + _ = yym2717 if false { } else { - h.decSliceEndpoints((*[]Endpoints)(yyv2707), d) + h.decSliceEndpoints((*[]Endpoints)(yyv2716), d) } } default: - z.DecStructFieldNotFound(-1, yys2702) - } // end switch yys2702 - } // end for yyj2702 + z.DecStructFieldNotFound(-1, yys2711) + } // end switch yys2711 + } // end for yyj2711 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -35051,16 +35129,16 @@ func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2709 int - var yyb2709 bool - var yyhl2709 bool = l >= 0 - yyj2709++ - if yyhl2709 { - yyb2709 = yyj2709 > l + var yyj2718 int + var yyb2718 bool + var yyhl2718 bool = l >= 0 + yyj2718++ + if yyhl2718 { + yyb2718 = yyj2718 > l } else { - yyb2709 = r.CheckBreak() + yyb2718 = r.CheckBreak() } - if yyb2709 { + if yyb2718 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35070,13 +35148,13 @@ func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj2709++ - if yyhl2709 { - yyb2709 = yyj2709 > l + yyj2718++ + if yyhl2718 { + yyb2718 = yyj2718 > l } else { - yyb2709 = r.CheckBreak() + yyb2718 = r.CheckBreak() } - if yyb2709 { + if yyb2718 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35086,13 +35164,13 @@ func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj2709++ - if yyhl2709 { - yyb2709 = yyj2709 > l + yyj2718++ + if yyhl2718 { + yyb2718 = yyj2718 > l } else { - yyb2709 = r.CheckBreak() + yyb2718 = r.CheckBreak() } - if yyb2709 { + if yyb2718 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35100,22 +35178,22 @@ func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv2712 := &x.ListMeta - yym2713 := z.DecBinary() - _ = yym2713 + yyv2721 := &x.ListMeta + yym2722 := z.DecBinary() + _ = yym2722 if false { - } else if z.HasExtensions() && z.DecExt(yyv2712) { + } else if z.HasExtensions() && z.DecExt(yyv2721) { } else { - z.DecFallback(yyv2712, false) + z.DecFallback(yyv2721, false) } } - yyj2709++ - if yyhl2709 { - yyb2709 = yyj2709 > l + yyj2718++ + if yyhl2718 { + yyb2718 = yyj2718 > l } else { - yyb2709 = r.CheckBreak() + yyb2718 = r.CheckBreak() } - if yyb2709 { + if yyb2718 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35123,26 +35201,26 @@ func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv2714 := &x.Items - yym2715 := z.DecBinary() - _ = yym2715 + yyv2723 := &x.Items + yym2724 := z.DecBinary() + _ = yym2724 if false { } else { - h.decSliceEndpoints((*[]Endpoints)(yyv2714), d) + h.decSliceEndpoints((*[]Endpoints)(yyv2723), d) } } for { - yyj2709++ - if yyhl2709 { - yyb2709 = yyj2709 > l + yyj2718++ + if yyhl2718 { + yyb2718 = yyj2718 > l } else { - yyb2709 = r.CheckBreak() + yyb2718 = r.CheckBreak() } - if yyb2709 { + if yyb2718 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2709-1, "") + z.DecStructFieldNotFound(yyj2718-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -35154,38 +35232,38 @@ func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2716 := z.EncBinary() - _ = yym2716 + yym2725 := z.EncBinary() + _ = yym2725 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2717 := !z.EncBinary() - yy2arr2717 := z.EncBasicHandle().StructToArray - var yyq2717 [4]bool - _, _, _ = yysep2717, yyq2717, yy2arr2717 - const yyr2717 bool = false - yyq2717[0] = x.PodCIDR != "" - yyq2717[1] = x.ExternalID != "" - yyq2717[2] = x.ProviderID != "" - yyq2717[3] = x.Unschedulable != false - var yynn2717 int - if yyr2717 || yy2arr2717 { + yysep2726 := !z.EncBinary() + yy2arr2726 := z.EncBasicHandle().StructToArray + var yyq2726 [4]bool + _, _, _ = yysep2726, yyq2726, yy2arr2726 + const yyr2726 bool = false + yyq2726[0] = x.PodCIDR != "" + yyq2726[1] = x.ExternalID != "" + yyq2726[2] = x.ProviderID != "" + yyq2726[3] = x.Unschedulable != false + var yynn2726 int + if yyr2726 || yy2arr2726 { r.EncodeArrayStart(4) } else { - yynn2717 = 0 - for _, b := range yyq2717 { + yynn2726 = 0 + for _, b := range yyq2726 { if b { - yynn2717++ + yynn2726++ } } - r.EncodeMapStart(yynn2717) - yynn2717 = 0 + r.EncodeMapStart(yynn2726) + yynn2726 = 0 } - if yyr2717 || yy2arr2717 { + if yyr2726 || yy2arr2726 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2717[0] { - yym2719 := z.EncBinary() - _ = yym2719 + if yyq2726[0] { + yym2728 := z.EncBinary() + _ = yym2728 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR)) @@ -35194,23 +35272,23 @@ func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2717[0] { + if yyq2726[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podCIDR")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2720 := z.EncBinary() - _ = yym2720 + yym2729 := z.EncBinary() + _ = yym2729 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR)) } } } - if yyr2717 || yy2arr2717 { + if yyr2726 || yy2arr2726 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2717[1] { - yym2722 := z.EncBinary() - _ = yym2722 + if yyq2726[1] { + yym2731 := z.EncBinary() + _ = yym2731 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ExternalID)) @@ -35219,23 +35297,23 @@ func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2717[1] { + if yyq2726[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("externalID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2723 := z.EncBinary() - _ = yym2723 + yym2732 := z.EncBinary() + _ = yym2732 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ExternalID)) } } } - if yyr2717 || yy2arr2717 { + if yyr2726 || yy2arr2726 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2717[2] { - yym2725 := z.EncBinary() - _ = yym2725 + if yyq2726[2] { + yym2734 := z.EncBinary() + _ = yym2734 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ProviderID)) @@ -35244,23 +35322,23 @@ func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2717[2] { + if yyq2726[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("providerID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2726 := z.EncBinary() - _ = yym2726 + yym2735 := z.EncBinary() + _ = yym2735 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ProviderID)) } } } - if yyr2717 || yy2arr2717 { + if yyr2726 || yy2arr2726 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2717[3] { - yym2728 := z.EncBinary() - _ = yym2728 + if yyq2726[3] { + yym2737 := z.EncBinary() + _ = yym2737 if false { } else { r.EncodeBool(bool(x.Unschedulable)) @@ -35269,19 +35347,19 @@ func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq2717[3] { + if yyq2726[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("unschedulable")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2729 := z.EncBinary() - _ = yym2729 + yym2738 := z.EncBinary() + _ = yym2738 if false { } else { r.EncodeBool(bool(x.Unschedulable)) } } } - if yyr2717 || yy2arr2717 { + if yyr2726 || yy2arr2726 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -35294,25 +35372,25 @@ func (x *NodeSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2730 := z.DecBinary() - _ = yym2730 + yym2739 := z.DecBinary() + _ = yym2739 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2731 := r.ContainerType() - if yyct2731 == codecSelferValueTypeMap1234 { - yyl2731 := r.ReadMapStart() - if yyl2731 == 0 { + yyct2740 := r.ContainerType() + if yyct2740 == codecSelferValueTypeMap1234 { + yyl2740 := r.ReadMapStart() + if yyl2740 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2731, d) + x.codecDecodeSelfFromMap(yyl2740, d) } - } else if yyct2731 == codecSelferValueTypeArray1234 { - yyl2731 := r.ReadArrayStart() - if yyl2731 == 0 { + } else if yyct2740 == codecSelferValueTypeArray1234 { + yyl2740 := r.ReadArrayStart() + if yyl2740 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2731, d) + x.codecDecodeSelfFromArray(yyl2740, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -35324,12 +35402,12 @@ func (x *NodeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2732Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2732Slc - var yyhl2732 bool = l >= 0 - for yyj2732 := 0; ; yyj2732++ { - if yyhl2732 { - if yyj2732 >= l { + var yys2741Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2741Slc + var yyhl2741 bool = l >= 0 + for yyj2741 := 0; ; yyj2741++ { + if yyhl2741 { + if yyj2741 >= l { break } } else { @@ -35338,10 +35416,10 @@ func (x *NodeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2732Slc = r.DecodeBytes(yys2732Slc, true, true) - yys2732 := string(yys2732Slc) + yys2741Slc = r.DecodeBytes(yys2741Slc, true, true) + yys2741 := string(yys2741Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2732 { + switch yys2741 { case "podCIDR": if r.TryDecodeAsNil() { x.PodCIDR = "" @@ -35367,9 +35445,9 @@ func (x *NodeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Unschedulable = bool(r.DecodeBool()) } default: - z.DecStructFieldNotFound(-1, yys2732) - } // end switch yys2732 - } // end for yyj2732 + z.DecStructFieldNotFound(-1, yys2741) + } // end switch yys2741 + } // end for yyj2741 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -35377,16 +35455,16 @@ func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2737 int - var yyb2737 bool - var yyhl2737 bool = l >= 0 - yyj2737++ - if yyhl2737 { - yyb2737 = yyj2737 > l + var yyj2746 int + var yyb2746 bool + var yyhl2746 bool = l >= 0 + yyj2746++ + if yyhl2746 { + yyb2746 = yyj2746 > l } else { - yyb2737 = r.CheckBreak() + yyb2746 = r.CheckBreak() } - if yyb2737 { + if yyb2746 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35396,13 +35474,13 @@ func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.PodCIDR = string(r.DecodeString()) } - yyj2737++ - if yyhl2737 { - yyb2737 = yyj2737 > l + yyj2746++ + if yyhl2746 { + yyb2746 = yyj2746 > l } else { - yyb2737 = r.CheckBreak() + yyb2746 = r.CheckBreak() } - if yyb2737 { + if yyb2746 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35412,13 +35490,13 @@ func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.ExternalID = string(r.DecodeString()) } - yyj2737++ - if yyhl2737 { - yyb2737 = yyj2737 > l + yyj2746++ + if yyhl2746 { + yyb2746 = yyj2746 > l } else { - yyb2737 = r.CheckBreak() + yyb2746 = r.CheckBreak() } - if yyb2737 { + if yyb2746 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35428,13 +35506,13 @@ func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.ProviderID = string(r.DecodeString()) } - yyj2737++ - if yyhl2737 { - yyb2737 = yyj2737 > l + yyj2746++ + if yyhl2746 { + yyb2746 = yyj2746 > l } else { - yyb2737 = r.CheckBreak() + yyb2746 = r.CheckBreak() } - if yyb2737 { + if yyb2746 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35445,17 +35523,17 @@ func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Unschedulable = bool(r.DecodeBool()) } for { - yyj2737++ - if yyhl2737 { - yyb2737 = yyj2737 > l + yyj2746++ + if yyhl2746 { + yyb2746 = yyj2746 > l } else { - yyb2737 = r.CheckBreak() + yyb2746 = r.CheckBreak() } - if yyb2737 { + if yyb2746 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2737-1, "") + z.DecStructFieldNotFound(yyj2746-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -35467,33 +35545,33 @@ func (x *DaemonEndpoint) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2742 := z.EncBinary() - _ = yym2742 + yym2751 := z.EncBinary() + _ = yym2751 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2743 := !z.EncBinary() - yy2arr2743 := z.EncBasicHandle().StructToArray - var yyq2743 [1]bool - _, _, _ = yysep2743, yyq2743, yy2arr2743 - const yyr2743 bool = false - var yynn2743 int - if yyr2743 || yy2arr2743 { + yysep2752 := !z.EncBinary() + yy2arr2752 := z.EncBasicHandle().StructToArray + var yyq2752 [1]bool + _, _, _ = yysep2752, yyq2752, yy2arr2752 + const yyr2752 bool = false + var yynn2752 int + if yyr2752 || yy2arr2752 { r.EncodeArrayStart(1) } else { - yynn2743 = 1 - for _, b := range yyq2743 { + yynn2752 = 1 + for _, b := range yyq2752 { if b { - yynn2743++ + yynn2752++ } } - r.EncodeMapStart(yynn2743) - yynn2743 = 0 + r.EncodeMapStart(yynn2752) + yynn2752 = 0 } - if yyr2743 || yy2arr2743 { + if yyr2752 || yy2arr2752 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2745 := z.EncBinary() - _ = yym2745 + yym2754 := z.EncBinary() + _ = yym2754 if false { } else { r.EncodeInt(int64(x.Port)) @@ -35502,14 +35580,14 @@ func (x *DaemonEndpoint) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("Port")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2746 := z.EncBinary() - _ = yym2746 + yym2755 := z.EncBinary() + _ = yym2755 if false { } else { r.EncodeInt(int64(x.Port)) } } - if yyr2743 || yy2arr2743 { + if yyr2752 || yy2arr2752 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -35522,25 +35600,25 @@ func (x *DaemonEndpoint) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2747 := z.DecBinary() - _ = yym2747 + yym2756 := z.DecBinary() + _ = yym2756 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2748 := r.ContainerType() - if yyct2748 == codecSelferValueTypeMap1234 { - yyl2748 := r.ReadMapStart() - if yyl2748 == 0 { + yyct2757 := r.ContainerType() + if yyct2757 == codecSelferValueTypeMap1234 { + yyl2757 := r.ReadMapStart() + if yyl2757 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2748, d) + x.codecDecodeSelfFromMap(yyl2757, d) } - } else if yyct2748 == codecSelferValueTypeArray1234 { - yyl2748 := r.ReadArrayStart() - if yyl2748 == 0 { + } else if yyct2757 == codecSelferValueTypeArray1234 { + yyl2757 := r.ReadArrayStart() + if yyl2757 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2748, d) + x.codecDecodeSelfFromArray(yyl2757, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -35552,12 +35630,12 @@ func (x *DaemonEndpoint) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2749Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2749Slc - var yyhl2749 bool = l >= 0 - for yyj2749 := 0; ; yyj2749++ { - if yyhl2749 { - if yyj2749 >= l { + var yys2758Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2758Slc + var yyhl2758 bool = l >= 0 + for yyj2758 := 0; ; yyj2758++ { + if yyhl2758 { + if yyj2758 >= l { break } } else { @@ -35566,10 +35644,10 @@ func (x *DaemonEndpoint) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2749Slc = r.DecodeBytes(yys2749Slc, true, true) - yys2749 := string(yys2749Slc) + yys2758Slc = r.DecodeBytes(yys2758Slc, true, true) + yys2758 := string(yys2758Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2749 { + switch yys2758 { case "Port": if r.TryDecodeAsNil() { x.Port = 0 @@ -35577,9 +35655,9 @@ func (x *DaemonEndpoint) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Port = int32(r.DecodeInt(32)) } default: - z.DecStructFieldNotFound(-1, yys2749) - } // end switch yys2749 - } // end for yyj2749 + z.DecStructFieldNotFound(-1, yys2758) + } // end switch yys2758 + } // end for yyj2758 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -35587,16 +35665,16 @@ func (x *DaemonEndpoint) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2751 int - var yyb2751 bool - var yyhl2751 bool = l >= 0 - yyj2751++ - if yyhl2751 { - yyb2751 = yyj2751 > l + var yyj2760 int + var yyb2760 bool + var yyhl2760 bool = l >= 0 + yyj2760++ + if yyhl2760 { + yyb2760 = yyj2760 > l } else { - yyb2751 = r.CheckBreak() + yyb2760 = r.CheckBreak() } - if yyb2751 { + if yyb2760 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35607,17 +35685,17 @@ func (x *DaemonEndpoint) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Port = int32(r.DecodeInt(32)) } for { - yyj2751++ - if yyhl2751 { - yyb2751 = yyj2751 > l + yyj2760++ + if yyhl2760 { + yyb2760 = yyj2760 > l } else { - yyb2751 = r.CheckBreak() + yyb2760 = r.CheckBreak() } - if yyb2751 { + if yyb2760 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2751-1, "") + z.DecStructFieldNotFound(yyj2760-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -35629,48 +35707,48 @@ func (x *NodeDaemonEndpoints) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2753 := z.EncBinary() - _ = yym2753 + yym2762 := z.EncBinary() + _ = yym2762 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2754 := !z.EncBinary() - yy2arr2754 := z.EncBasicHandle().StructToArray - var yyq2754 [1]bool - _, _, _ = yysep2754, yyq2754, yy2arr2754 - const yyr2754 bool = false - yyq2754[0] = true - var yynn2754 int - if yyr2754 || yy2arr2754 { + yysep2763 := !z.EncBinary() + yy2arr2763 := z.EncBasicHandle().StructToArray + var yyq2763 [1]bool + _, _, _ = yysep2763, yyq2763, yy2arr2763 + const yyr2763 bool = false + yyq2763[0] = true + var yynn2763 int + if yyr2763 || yy2arr2763 { r.EncodeArrayStart(1) } else { - yynn2754 = 0 - for _, b := range yyq2754 { + yynn2763 = 0 + for _, b := range yyq2763 { if b { - yynn2754++ + yynn2763++ } } - r.EncodeMapStart(yynn2754) - yynn2754 = 0 + r.EncodeMapStart(yynn2763) + yynn2763 = 0 } - if yyr2754 || yy2arr2754 { + if yyr2763 || yy2arr2763 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2754[0] { - yy2756 := &x.KubeletEndpoint - yy2756.CodecEncodeSelf(e) + if yyq2763[0] { + yy2765 := &x.KubeletEndpoint + yy2765.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2754[0] { + if yyq2763[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeletEndpoint")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2757 := &x.KubeletEndpoint - yy2757.CodecEncodeSelf(e) + yy2766 := &x.KubeletEndpoint + yy2766.CodecEncodeSelf(e) } } - if yyr2754 || yy2arr2754 { + if yyr2763 || yy2arr2763 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -35683,25 +35761,25 @@ func (x *NodeDaemonEndpoints) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2758 := z.DecBinary() - _ = yym2758 + yym2767 := z.DecBinary() + _ = yym2767 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2759 := r.ContainerType() - if yyct2759 == codecSelferValueTypeMap1234 { - yyl2759 := r.ReadMapStart() - if yyl2759 == 0 { + yyct2768 := r.ContainerType() + if yyct2768 == codecSelferValueTypeMap1234 { + yyl2768 := r.ReadMapStart() + if yyl2768 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2759, d) + x.codecDecodeSelfFromMap(yyl2768, d) } - } else if yyct2759 == codecSelferValueTypeArray1234 { - yyl2759 := r.ReadArrayStart() - if yyl2759 == 0 { + } else if yyct2768 == codecSelferValueTypeArray1234 { + yyl2768 := r.ReadArrayStart() + if yyl2768 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2759, d) + x.codecDecodeSelfFromArray(yyl2768, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -35713,12 +35791,12 @@ func (x *NodeDaemonEndpoints) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2760Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2760Slc - var yyhl2760 bool = l >= 0 - for yyj2760 := 0; ; yyj2760++ { - if yyhl2760 { - if yyj2760 >= l { + var yys2769Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2769Slc + var yyhl2769 bool = l >= 0 + for yyj2769 := 0; ; yyj2769++ { + if yyhl2769 { + if yyj2769 >= l { break } } else { @@ -35727,21 +35805,21 @@ func (x *NodeDaemonEndpoints) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2760Slc = r.DecodeBytes(yys2760Slc, true, true) - yys2760 := string(yys2760Slc) + yys2769Slc = r.DecodeBytes(yys2769Slc, true, true) + yys2769 := string(yys2769Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2760 { + switch yys2769 { case "kubeletEndpoint": if r.TryDecodeAsNil() { x.KubeletEndpoint = DaemonEndpoint{} } else { - yyv2761 := &x.KubeletEndpoint - yyv2761.CodecDecodeSelf(d) + yyv2770 := &x.KubeletEndpoint + yyv2770.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2760) - } // end switch yys2760 - } // end for yyj2760 + z.DecStructFieldNotFound(-1, yys2769) + } // end switch yys2769 + } // end for yyj2769 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -35749,16 +35827,16 @@ func (x *NodeDaemonEndpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2762 int - var yyb2762 bool - var yyhl2762 bool = l >= 0 - yyj2762++ - if yyhl2762 { - yyb2762 = yyj2762 > l + var yyj2771 int + var yyb2771 bool + var yyhl2771 bool = l >= 0 + yyj2771++ + if yyhl2771 { + yyb2771 = yyj2771 > l } else { - yyb2762 = r.CheckBreak() + yyb2771 = r.CheckBreak() } - if yyb2762 { + if yyb2771 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35766,21 +35844,21 @@ func (x *NodeDaemonEndpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.KubeletEndpoint = DaemonEndpoint{} } else { - yyv2763 := &x.KubeletEndpoint - yyv2763.CodecDecodeSelf(d) + yyv2772 := &x.KubeletEndpoint + yyv2772.CodecDecodeSelf(d) } for { - yyj2762++ - if yyhl2762 { - yyb2762 = yyj2762 > l + yyj2771++ + if yyhl2771 { + yyb2771 = yyj2771 > l } else { - yyb2762 = r.CheckBreak() + yyb2771 = r.CheckBreak() } - if yyb2762 { + if yyb2771 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2762-1, "") + z.DecStructFieldNotFound(yyj2771-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -35792,33 +35870,33 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2764 := z.EncBinary() - _ = yym2764 + yym2773 := z.EncBinary() + _ = yym2773 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2765 := !z.EncBinary() - yy2arr2765 := z.EncBasicHandle().StructToArray - var yyq2765 [10]bool - _, _, _ = yysep2765, yyq2765, yy2arr2765 - const yyr2765 bool = false - var yynn2765 int - if yyr2765 || yy2arr2765 { + yysep2774 := !z.EncBinary() + yy2arr2774 := z.EncBasicHandle().StructToArray + var yyq2774 [10]bool + _, _, _ = yysep2774, yyq2774, yy2arr2774 + const yyr2774 bool = false + var yynn2774 int + if yyr2774 || yy2arr2774 { r.EncodeArrayStart(10) } else { - yynn2765 = 10 - for _, b := range yyq2765 { + yynn2774 = 10 + for _, b := range yyq2774 { if b { - yynn2765++ + yynn2774++ } } - r.EncodeMapStart(yynn2765) - yynn2765 = 0 + r.EncodeMapStart(yynn2774) + yynn2774 = 0 } - if yyr2765 || yy2arr2765 { + if yyr2774 || yy2arr2774 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2767 := z.EncBinary() - _ = yym2767 + yym2776 := z.EncBinary() + _ = yym2776 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.MachineID)) @@ -35827,17 +35905,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("machineID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2768 := z.EncBinary() - _ = yym2768 + yym2777 := z.EncBinary() + _ = yym2777 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.MachineID)) } } - if yyr2765 || yy2arr2765 { + if yyr2774 || yy2arr2774 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2770 := z.EncBinary() - _ = yym2770 + yym2779 := z.EncBinary() + _ = yym2779 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SystemUUID)) @@ -35846,17 +35924,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("systemUUID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2771 := z.EncBinary() - _ = yym2771 + yym2780 := z.EncBinary() + _ = yym2780 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SystemUUID)) } } - if yyr2765 || yy2arr2765 { + if yyr2774 || yy2arr2774 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2773 := z.EncBinary() - _ = yym2773 + yym2782 := z.EncBinary() + _ = yym2782 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.BootID)) @@ -35865,17 +35943,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("bootID")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2774 := z.EncBinary() - _ = yym2774 + yym2783 := z.EncBinary() + _ = yym2783 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.BootID)) } } - if yyr2765 || yy2arr2765 { + if yyr2774 || yy2arr2774 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2776 := z.EncBinary() - _ = yym2776 + yym2785 := z.EncBinary() + _ = yym2785 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KernelVersion)) @@ -35884,17 +35962,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kernelVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2777 := z.EncBinary() - _ = yym2777 + yym2786 := z.EncBinary() + _ = yym2786 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KernelVersion)) } } - if yyr2765 || yy2arr2765 { + if yyr2774 || yy2arr2774 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2779 := z.EncBinary() - _ = yym2779 + yym2788 := z.EncBinary() + _ = yym2788 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.OSImage)) @@ -35903,17 +35981,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("osImage")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2780 := z.EncBinary() - _ = yym2780 + yym2789 := z.EncBinary() + _ = yym2789 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.OSImage)) } } - if yyr2765 || yy2arr2765 { + if yyr2774 || yy2arr2774 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2782 := z.EncBinary() - _ = yym2782 + yym2791 := z.EncBinary() + _ = yym2791 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContainerRuntimeVersion)) @@ -35922,17 +36000,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("containerRuntimeVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2783 := z.EncBinary() - _ = yym2783 + yym2792 := z.EncBinary() + _ = yym2792 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContainerRuntimeVersion)) } } - if yyr2765 || yy2arr2765 { + if yyr2774 || yy2arr2774 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2785 := z.EncBinary() - _ = yym2785 + yym2794 := z.EncBinary() + _ = yym2794 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KubeletVersion)) @@ -35941,17 +36019,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeletVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2786 := z.EncBinary() - _ = yym2786 + yym2795 := z.EncBinary() + _ = yym2795 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KubeletVersion)) } } - if yyr2765 || yy2arr2765 { + if yyr2774 || yy2arr2774 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2788 := z.EncBinary() - _ = yym2788 + yym2797 := z.EncBinary() + _ = yym2797 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KubeProxyVersion)) @@ -35960,17 +36038,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeProxyVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2789 := z.EncBinary() - _ = yym2789 + yym2798 := z.EncBinary() + _ = yym2798 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.KubeProxyVersion)) } } - if yyr2765 || yy2arr2765 { + if yyr2774 || yy2arr2774 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2791 := z.EncBinary() - _ = yym2791 + yym2800 := z.EncBinary() + _ = yym2800 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.OperatingSystem)) @@ -35979,17 +36057,17 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("operatingSystem")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2792 := z.EncBinary() - _ = yym2792 + yym2801 := z.EncBinary() + _ = yym2801 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.OperatingSystem)) } } - if yyr2765 || yy2arr2765 { + if yyr2774 || yy2arr2774 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2794 := z.EncBinary() - _ = yym2794 + yym2803 := z.EncBinary() + _ = yym2803 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Architecture)) @@ -35998,14 +36076,14 @@ func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("architecture")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2795 := z.EncBinary() - _ = yym2795 + yym2804 := z.EncBinary() + _ = yym2804 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Architecture)) } } - if yyr2765 || yy2arr2765 { + if yyr2774 || yy2arr2774 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -36018,25 +36096,25 @@ func (x *NodeSystemInfo) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2796 := z.DecBinary() - _ = yym2796 + yym2805 := z.DecBinary() + _ = yym2805 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2797 := r.ContainerType() - if yyct2797 == codecSelferValueTypeMap1234 { - yyl2797 := r.ReadMapStart() - if yyl2797 == 0 { + yyct2806 := r.ContainerType() + if yyct2806 == codecSelferValueTypeMap1234 { + yyl2806 := r.ReadMapStart() + if yyl2806 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2797, d) + x.codecDecodeSelfFromMap(yyl2806, d) } - } else if yyct2797 == codecSelferValueTypeArray1234 { - yyl2797 := r.ReadArrayStart() - if yyl2797 == 0 { + } else if yyct2806 == codecSelferValueTypeArray1234 { + yyl2806 := r.ReadArrayStart() + if yyl2806 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2797, d) + x.codecDecodeSelfFromArray(yyl2806, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -36048,12 +36126,12 @@ func (x *NodeSystemInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2798Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2798Slc - var yyhl2798 bool = l >= 0 - for yyj2798 := 0; ; yyj2798++ { - if yyhl2798 { - if yyj2798 >= l { + var yys2807Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2807Slc + var yyhl2807 bool = l >= 0 + for yyj2807 := 0; ; yyj2807++ { + if yyhl2807 { + if yyj2807 >= l { break } } else { @@ -36062,10 +36140,10 @@ func (x *NodeSystemInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2798Slc = r.DecodeBytes(yys2798Slc, true, true) - yys2798 := string(yys2798Slc) + yys2807Slc = r.DecodeBytes(yys2807Slc, true, true) + yys2807 := string(yys2807Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2798 { + switch yys2807 { case "machineID": if r.TryDecodeAsNil() { x.MachineID = "" @@ -36127,9 +36205,9 @@ func (x *NodeSystemInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Architecture = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys2798) - } // end switch yys2798 - } // end for yyj2798 + z.DecStructFieldNotFound(-1, yys2807) + } // end switch yys2807 + } // end for yyj2807 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -36137,16 +36215,16 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2809 int - var yyb2809 bool - var yyhl2809 bool = l >= 0 - yyj2809++ - if yyhl2809 { - yyb2809 = yyj2809 > l + var yyj2818 int + var yyb2818 bool + var yyhl2818 bool = l >= 0 + yyj2818++ + if yyhl2818 { + yyb2818 = yyj2818 > l } else { - yyb2809 = r.CheckBreak() + yyb2818 = r.CheckBreak() } - if yyb2809 { + if yyb2818 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36156,13 +36234,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.MachineID = string(r.DecodeString()) } - yyj2809++ - if yyhl2809 { - yyb2809 = yyj2809 > l + yyj2818++ + if yyhl2818 { + yyb2818 = yyj2818 > l } else { - yyb2809 = r.CheckBreak() + yyb2818 = r.CheckBreak() } - if yyb2809 { + if yyb2818 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36172,13 +36250,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.SystemUUID = string(r.DecodeString()) } - yyj2809++ - if yyhl2809 { - yyb2809 = yyj2809 > l + yyj2818++ + if yyhl2818 { + yyb2818 = yyj2818 > l } else { - yyb2809 = r.CheckBreak() + yyb2818 = r.CheckBreak() } - if yyb2809 { + if yyb2818 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36188,13 +36266,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.BootID = string(r.DecodeString()) } - yyj2809++ - if yyhl2809 { - yyb2809 = yyj2809 > l + yyj2818++ + if yyhl2818 { + yyb2818 = yyj2818 > l } else { - yyb2809 = r.CheckBreak() + yyb2818 = r.CheckBreak() } - if yyb2809 { + if yyb2818 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36204,13 +36282,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.KernelVersion = string(r.DecodeString()) } - yyj2809++ - if yyhl2809 { - yyb2809 = yyj2809 > l + yyj2818++ + if yyhl2818 { + yyb2818 = yyj2818 > l } else { - yyb2809 = r.CheckBreak() + yyb2818 = r.CheckBreak() } - if yyb2809 { + if yyb2818 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36220,13 +36298,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.OSImage = string(r.DecodeString()) } - yyj2809++ - if yyhl2809 { - yyb2809 = yyj2809 > l + yyj2818++ + if yyhl2818 { + yyb2818 = yyj2818 > l } else { - yyb2809 = r.CheckBreak() + yyb2818 = r.CheckBreak() } - if yyb2809 { + if yyb2818 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36236,13 +36314,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.ContainerRuntimeVersion = string(r.DecodeString()) } - yyj2809++ - if yyhl2809 { - yyb2809 = yyj2809 > l + yyj2818++ + if yyhl2818 { + yyb2818 = yyj2818 > l } else { - yyb2809 = r.CheckBreak() + yyb2818 = r.CheckBreak() } - if yyb2809 { + if yyb2818 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36252,13 +36330,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.KubeletVersion = string(r.DecodeString()) } - yyj2809++ - if yyhl2809 { - yyb2809 = yyj2809 > l + yyj2818++ + if yyhl2818 { + yyb2818 = yyj2818 > l } else { - yyb2809 = r.CheckBreak() + yyb2818 = r.CheckBreak() } - if yyb2809 { + if yyb2818 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36268,13 +36346,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.KubeProxyVersion = string(r.DecodeString()) } - yyj2809++ - if yyhl2809 { - yyb2809 = yyj2809 > l + yyj2818++ + if yyhl2818 { + yyb2818 = yyj2818 > l } else { - yyb2809 = r.CheckBreak() + yyb2818 = r.CheckBreak() } - if yyb2809 { + if yyb2818 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36284,13 +36362,13 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.OperatingSystem = string(r.DecodeString()) } - yyj2809++ - if yyhl2809 { - yyb2809 = yyj2809 > l + yyj2818++ + if yyhl2818 { + yyb2818 = yyj2818 > l } else { - yyb2809 = r.CheckBreak() + yyb2818 = r.CheckBreak() } - if yyb2809 { + if yyb2818 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36301,17 +36379,17 @@ func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Architecture = string(r.DecodeString()) } for { - yyj2809++ - if yyhl2809 { - yyb2809 = yyj2809 > l + yyj2818++ + if yyhl2818 { + yyb2818 = yyj2818 > l } else { - yyb2809 = r.CheckBreak() + yyb2818 = r.CheckBreak() } - if yyb2809 { + if yyb2818 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2809-1, "") + z.DecStructFieldNotFound(yyj2818-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -36323,42 +36401,42 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2820 := z.EncBinary() - _ = yym2820 + yym2829 := z.EncBinary() + _ = yym2829 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2821 := !z.EncBinary() - yy2arr2821 := z.EncBasicHandle().StructToArray - var yyq2821 [10]bool - _, _, _ = yysep2821, yyq2821, yy2arr2821 - const yyr2821 bool = false - yyq2821[0] = len(x.Capacity) != 0 - yyq2821[1] = len(x.Allocatable) != 0 - yyq2821[2] = x.Phase != "" - yyq2821[3] = len(x.Conditions) != 0 - yyq2821[4] = len(x.Addresses) != 0 - yyq2821[5] = true - yyq2821[6] = true - yyq2821[7] = len(x.Images) != 0 - yyq2821[8] = len(x.VolumesInUse) != 0 - yyq2821[9] = len(x.VolumesAttached) != 0 - var yynn2821 int - if yyr2821 || yy2arr2821 { + yysep2830 := !z.EncBinary() + yy2arr2830 := z.EncBasicHandle().StructToArray + var yyq2830 [10]bool + _, _, _ = yysep2830, yyq2830, yy2arr2830 + const yyr2830 bool = false + yyq2830[0] = len(x.Capacity) != 0 + yyq2830[1] = len(x.Allocatable) != 0 + yyq2830[2] = x.Phase != "" + yyq2830[3] = len(x.Conditions) != 0 + yyq2830[4] = len(x.Addresses) != 0 + yyq2830[5] = true + yyq2830[6] = true + yyq2830[7] = len(x.Images) != 0 + yyq2830[8] = len(x.VolumesInUse) != 0 + yyq2830[9] = len(x.VolumesAttached) != 0 + var yynn2830 int + if yyr2830 || yy2arr2830 { r.EncodeArrayStart(10) } else { - yynn2821 = 0 - for _, b := range yyq2821 { + yynn2830 = 0 + for _, b := range yyq2830 { if b { - yynn2821++ + yynn2830++ } } - r.EncodeMapStart(yynn2821) - yynn2821 = 0 + r.EncodeMapStart(yynn2830) + yynn2830 = 0 } - if yyr2821 || yy2arr2821 { + if yyr2830 || yy2arr2830 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2821[0] { + if yyq2830[0] { if x.Capacity == nil { r.EncodeNil() } else { @@ -36368,7 +36446,7 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2821[0] { + if yyq2830[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("capacity")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -36379,9 +36457,9 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2821 || yy2arr2821 { + if yyr2830 || yy2arr2830 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2821[1] { + if yyq2830[1] { if x.Allocatable == nil { r.EncodeNil() } else { @@ -36391,7 +36469,7 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2821[1] { + if yyq2830[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("allocatable")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -36402,29 +36480,29 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2821 || yy2arr2821 { + if yyr2830 || yy2arr2830 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2821[2] { + if yyq2830[2] { x.Phase.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2821[2] { + if yyq2830[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("phase")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Phase.CodecEncodeSelf(e) } } - if yyr2821 || yy2arr2821 { + if yyr2830 || yy2arr2830 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2821[3] { + if yyq2830[3] { if x.Conditions == nil { r.EncodeNil() } else { - yym2826 := z.EncBinary() - _ = yym2826 + yym2835 := z.EncBinary() + _ = yym2835 if false { } else { h.encSliceNodeCondition(([]NodeCondition)(x.Conditions), e) @@ -36434,15 +36512,15 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2821[3] { + if yyq2830[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("conditions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Conditions == nil { r.EncodeNil() } else { - yym2827 := z.EncBinary() - _ = yym2827 + yym2836 := z.EncBinary() + _ = yym2836 if false { } else { h.encSliceNodeCondition(([]NodeCondition)(x.Conditions), e) @@ -36450,14 +36528,14 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2821 || yy2arr2821 { + if yyr2830 || yy2arr2830 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2821[4] { + if yyq2830[4] { if x.Addresses == nil { r.EncodeNil() } else { - yym2829 := z.EncBinary() - _ = yym2829 + yym2838 := z.EncBinary() + _ = yym2838 if false { } else { h.encSliceNodeAddress(([]NodeAddress)(x.Addresses), e) @@ -36467,15 +36545,15 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2821[4] { + if yyq2830[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("addresses")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Addresses == nil { r.EncodeNil() } else { - yym2830 := z.EncBinary() - _ = yym2830 + yym2839 := z.EncBinary() + _ = yym2839 if false { } else { h.encSliceNodeAddress(([]NodeAddress)(x.Addresses), e) @@ -36483,48 +36561,48 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2821 || yy2arr2821 { + if yyr2830 || yy2arr2830 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2821[5] { - yy2832 := &x.DaemonEndpoints - yy2832.CodecEncodeSelf(e) + if yyq2830[5] { + yy2841 := &x.DaemonEndpoints + yy2841.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2821[5] { + if yyq2830[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("daemonEndpoints")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2833 := &x.DaemonEndpoints - yy2833.CodecEncodeSelf(e) + yy2842 := &x.DaemonEndpoints + yy2842.CodecEncodeSelf(e) } } - if yyr2821 || yy2arr2821 { + if yyr2830 || yy2arr2830 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2821[6] { - yy2835 := &x.NodeInfo - yy2835.CodecEncodeSelf(e) + if yyq2830[6] { + yy2844 := &x.NodeInfo + yy2844.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq2821[6] { + if yyq2830[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nodeInfo")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2836 := &x.NodeInfo - yy2836.CodecEncodeSelf(e) + yy2845 := &x.NodeInfo + yy2845.CodecEncodeSelf(e) } } - if yyr2821 || yy2arr2821 { + if yyr2830 || yy2arr2830 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2821[7] { + if yyq2830[7] { if x.Images == nil { r.EncodeNil() } else { - yym2838 := z.EncBinary() - _ = yym2838 + yym2847 := z.EncBinary() + _ = yym2847 if false { } else { h.encSliceContainerImage(([]ContainerImage)(x.Images), e) @@ -36534,15 +36612,15 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2821[7] { + if yyq2830[7] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("images")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Images == nil { r.EncodeNil() } else { - yym2839 := z.EncBinary() - _ = yym2839 + yym2848 := z.EncBinary() + _ = yym2848 if false { } else { h.encSliceContainerImage(([]ContainerImage)(x.Images), e) @@ -36550,14 +36628,14 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2821 || yy2arr2821 { + if yyr2830 || yy2arr2830 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2821[8] { + if yyq2830[8] { if x.VolumesInUse == nil { r.EncodeNil() } else { - yym2841 := z.EncBinary() - _ = yym2841 + yym2850 := z.EncBinary() + _ = yym2850 if false { } else { h.encSliceUniqueVolumeName(([]UniqueVolumeName)(x.VolumesInUse), e) @@ -36567,15 +36645,15 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2821[8] { + if yyq2830[8] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("volumesInUse")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.VolumesInUse == nil { r.EncodeNil() } else { - yym2842 := z.EncBinary() - _ = yym2842 + yym2851 := z.EncBinary() + _ = yym2851 if false { } else { h.encSliceUniqueVolumeName(([]UniqueVolumeName)(x.VolumesInUse), e) @@ -36583,14 +36661,14 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2821 || yy2arr2821 { + if yyr2830 || yy2arr2830 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2821[9] { + if yyq2830[9] { if x.VolumesAttached == nil { r.EncodeNil() } else { - yym2844 := z.EncBinary() - _ = yym2844 + yym2853 := z.EncBinary() + _ = yym2853 if false { } else { h.encSliceAttachedVolume(([]AttachedVolume)(x.VolumesAttached), e) @@ -36600,15 +36678,15 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2821[9] { + if yyq2830[9] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("volumesAttached")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.VolumesAttached == nil { r.EncodeNil() } else { - yym2845 := z.EncBinary() - _ = yym2845 + yym2854 := z.EncBinary() + _ = yym2854 if false { } else { h.encSliceAttachedVolume(([]AttachedVolume)(x.VolumesAttached), e) @@ -36616,7 +36694,7 @@ func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2821 || yy2arr2821 { + if yyr2830 || yy2arr2830 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -36629,25 +36707,25 @@ func (x *NodeStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2846 := z.DecBinary() - _ = yym2846 + yym2855 := z.DecBinary() + _ = yym2855 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2847 := r.ContainerType() - if yyct2847 == codecSelferValueTypeMap1234 { - yyl2847 := r.ReadMapStart() - if yyl2847 == 0 { + yyct2856 := r.ContainerType() + if yyct2856 == codecSelferValueTypeMap1234 { + yyl2856 := r.ReadMapStart() + if yyl2856 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2847, d) + x.codecDecodeSelfFromMap(yyl2856, d) } - } else if yyct2847 == codecSelferValueTypeArray1234 { - yyl2847 := r.ReadArrayStart() - if yyl2847 == 0 { + } else if yyct2856 == codecSelferValueTypeArray1234 { + yyl2856 := r.ReadArrayStart() + if yyl2856 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2847, d) + x.codecDecodeSelfFromArray(yyl2856, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -36659,12 +36737,12 @@ func (x *NodeStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2848Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2848Slc - var yyhl2848 bool = l >= 0 - for yyj2848 := 0; ; yyj2848++ { - if yyhl2848 { - if yyj2848 >= l { + var yys2857Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2857Slc + var yyhl2857 bool = l >= 0 + for yyj2857 := 0; ; yyj2857++ { + if yyhl2857 { + if yyj2857 >= l { break } } else { @@ -36673,23 +36751,23 @@ func (x *NodeStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2848Slc = r.DecodeBytes(yys2848Slc, true, true) - yys2848 := string(yys2848Slc) + yys2857Slc = r.DecodeBytes(yys2857Slc, true, true) + yys2857 := string(yys2857Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2848 { + switch yys2857 { case "capacity": if r.TryDecodeAsNil() { x.Capacity = nil } else { - yyv2849 := &x.Capacity - yyv2849.CodecDecodeSelf(d) + yyv2858 := &x.Capacity + yyv2858.CodecDecodeSelf(d) } case "allocatable": if r.TryDecodeAsNil() { x.Allocatable = nil } else { - yyv2850 := &x.Allocatable - yyv2850.CodecDecodeSelf(d) + yyv2859 := &x.Allocatable + yyv2859.CodecDecodeSelf(d) } case "phase": if r.TryDecodeAsNil() { @@ -36701,80 +36779,80 @@ func (x *NodeStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv2852 := &x.Conditions - yym2853 := z.DecBinary() - _ = yym2853 + yyv2861 := &x.Conditions + yym2862 := z.DecBinary() + _ = yym2862 if false { } else { - h.decSliceNodeCondition((*[]NodeCondition)(yyv2852), d) + h.decSliceNodeCondition((*[]NodeCondition)(yyv2861), d) } } case "addresses": if r.TryDecodeAsNil() { x.Addresses = nil } else { - yyv2854 := &x.Addresses - yym2855 := z.DecBinary() - _ = yym2855 + yyv2863 := &x.Addresses + yym2864 := z.DecBinary() + _ = yym2864 if false { } else { - h.decSliceNodeAddress((*[]NodeAddress)(yyv2854), d) + h.decSliceNodeAddress((*[]NodeAddress)(yyv2863), d) } } case "daemonEndpoints": if r.TryDecodeAsNil() { x.DaemonEndpoints = NodeDaemonEndpoints{} } else { - yyv2856 := &x.DaemonEndpoints - yyv2856.CodecDecodeSelf(d) + yyv2865 := &x.DaemonEndpoints + yyv2865.CodecDecodeSelf(d) } case "nodeInfo": if r.TryDecodeAsNil() { x.NodeInfo = NodeSystemInfo{} } else { - yyv2857 := &x.NodeInfo - yyv2857.CodecDecodeSelf(d) + yyv2866 := &x.NodeInfo + yyv2866.CodecDecodeSelf(d) } case "images": if r.TryDecodeAsNil() { x.Images = nil } else { - yyv2858 := &x.Images - yym2859 := z.DecBinary() - _ = yym2859 + yyv2867 := &x.Images + yym2868 := z.DecBinary() + _ = yym2868 if false { } else { - h.decSliceContainerImage((*[]ContainerImage)(yyv2858), d) + h.decSliceContainerImage((*[]ContainerImage)(yyv2867), d) } } case "volumesInUse": if r.TryDecodeAsNil() { x.VolumesInUse = nil } else { - yyv2860 := &x.VolumesInUse - yym2861 := z.DecBinary() - _ = yym2861 + yyv2869 := &x.VolumesInUse + yym2870 := z.DecBinary() + _ = yym2870 if false { } else { - h.decSliceUniqueVolumeName((*[]UniqueVolumeName)(yyv2860), d) + h.decSliceUniqueVolumeName((*[]UniqueVolumeName)(yyv2869), d) } } case "volumesAttached": if r.TryDecodeAsNil() { x.VolumesAttached = nil } else { - yyv2862 := &x.VolumesAttached - yym2863 := z.DecBinary() - _ = yym2863 + yyv2871 := &x.VolumesAttached + yym2872 := z.DecBinary() + _ = yym2872 if false { } else { - h.decSliceAttachedVolume((*[]AttachedVolume)(yyv2862), d) + h.decSliceAttachedVolume((*[]AttachedVolume)(yyv2871), d) } } default: - z.DecStructFieldNotFound(-1, yys2848) - } // end switch yys2848 - } // end for yyj2848 + z.DecStructFieldNotFound(-1, yys2857) + } // end switch yys2857 + } // end for yyj2857 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -36782,16 +36860,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2864 int - var yyb2864 bool - var yyhl2864 bool = l >= 0 - yyj2864++ - if yyhl2864 { - yyb2864 = yyj2864 > l + var yyj2873 int + var yyb2873 bool + var yyhl2873 bool = l >= 0 + yyj2873++ + if yyhl2873 { + yyb2873 = yyj2873 > l } else { - yyb2864 = r.CheckBreak() + yyb2873 = r.CheckBreak() } - if yyb2864 { + if yyb2873 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36799,16 +36877,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Capacity = nil } else { - yyv2865 := &x.Capacity - yyv2865.CodecDecodeSelf(d) + yyv2874 := &x.Capacity + yyv2874.CodecDecodeSelf(d) } - yyj2864++ - if yyhl2864 { - yyb2864 = yyj2864 > l + yyj2873++ + if yyhl2873 { + yyb2873 = yyj2873 > l } else { - yyb2864 = r.CheckBreak() + yyb2873 = r.CheckBreak() } - if yyb2864 { + if yyb2873 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36816,16 +36894,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Allocatable = nil } else { - yyv2866 := &x.Allocatable - yyv2866.CodecDecodeSelf(d) + yyv2875 := &x.Allocatable + yyv2875.CodecDecodeSelf(d) } - yyj2864++ - if yyhl2864 { - yyb2864 = yyj2864 > l + yyj2873++ + if yyhl2873 { + yyb2873 = yyj2873 > l } else { - yyb2864 = r.CheckBreak() + yyb2873 = r.CheckBreak() } - if yyb2864 { + if yyb2873 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36835,13 +36913,13 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Phase = NodePhase(r.DecodeString()) } - yyj2864++ - if yyhl2864 { - yyb2864 = yyj2864 > l + yyj2873++ + if yyhl2873 { + yyb2873 = yyj2873 > l } else { - yyb2864 = r.CheckBreak() + yyb2873 = r.CheckBreak() } - if yyb2864 { + if yyb2873 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36849,21 +36927,21 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv2868 := &x.Conditions - yym2869 := z.DecBinary() - _ = yym2869 + yyv2877 := &x.Conditions + yym2878 := z.DecBinary() + _ = yym2878 if false { } else { - h.decSliceNodeCondition((*[]NodeCondition)(yyv2868), d) + h.decSliceNodeCondition((*[]NodeCondition)(yyv2877), d) } } - yyj2864++ - if yyhl2864 { - yyb2864 = yyj2864 > l + yyj2873++ + if yyhl2873 { + yyb2873 = yyj2873 > l } else { - yyb2864 = r.CheckBreak() + yyb2873 = r.CheckBreak() } - if yyb2864 { + if yyb2873 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36871,21 +36949,21 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Addresses = nil } else { - yyv2870 := &x.Addresses - yym2871 := z.DecBinary() - _ = yym2871 + yyv2879 := &x.Addresses + yym2880 := z.DecBinary() + _ = yym2880 if false { } else { - h.decSliceNodeAddress((*[]NodeAddress)(yyv2870), d) + h.decSliceNodeAddress((*[]NodeAddress)(yyv2879), d) } } - yyj2864++ - if yyhl2864 { - yyb2864 = yyj2864 > l + yyj2873++ + if yyhl2873 { + yyb2873 = yyj2873 > l } else { - yyb2864 = r.CheckBreak() + yyb2873 = r.CheckBreak() } - if yyb2864 { + if yyb2873 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36893,16 +36971,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.DaemonEndpoints = NodeDaemonEndpoints{} } else { - yyv2872 := &x.DaemonEndpoints - yyv2872.CodecDecodeSelf(d) + yyv2881 := &x.DaemonEndpoints + yyv2881.CodecDecodeSelf(d) } - yyj2864++ - if yyhl2864 { - yyb2864 = yyj2864 > l + yyj2873++ + if yyhl2873 { + yyb2873 = yyj2873 > l } else { - yyb2864 = r.CheckBreak() + yyb2873 = r.CheckBreak() } - if yyb2864 { + if yyb2873 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36910,16 +36988,16 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.NodeInfo = NodeSystemInfo{} } else { - yyv2873 := &x.NodeInfo - yyv2873.CodecDecodeSelf(d) + yyv2882 := &x.NodeInfo + yyv2882.CodecDecodeSelf(d) } - yyj2864++ - if yyhl2864 { - yyb2864 = yyj2864 > l + yyj2873++ + if yyhl2873 { + yyb2873 = yyj2873 > l } else { - yyb2864 = r.CheckBreak() + yyb2873 = r.CheckBreak() } - if yyb2864 { + if yyb2873 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36927,21 +37005,21 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Images = nil } else { - yyv2874 := &x.Images - yym2875 := z.DecBinary() - _ = yym2875 + yyv2883 := &x.Images + yym2884 := z.DecBinary() + _ = yym2884 if false { } else { - h.decSliceContainerImage((*[]ContainerImage)(yyv2874), d) + h.decSliceContainerImage((*[]ContainerImage)(yyv2883), d) } } - yyj2864++ - if yyhl2864 { - yyb2864 = yyj2864 > l + yyj2873++ + if yyhl2873 { + yyb2873 = yyj2873 > l } else { - yyb2864 = r.CheckBreak() + yyb2873 = r.CheckBreak() } - if yyb2864 { + if yyb2873 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36949,21 +37027,21 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.VolumesInUse = nil } else { - yyv2876 := &x.VolumesInUse - yym2877 := z.DecBinary() - _ = yym2877 + yyv2885 := &x.VolumesInUse + yym2886 := z.DecBinary() + _ = yym2886 if false { } else { - h.decSliceUniqueVolumeName((*[]UniqueVolumeName)(yyv2876), d) + h.decSliceUniqueVolumeName((*[]UniqueVolumeName)(yyv2885), d) } } - yyj2864++ - if yyhl2864 { - yyb2864 = yyj2864 > l + yyj2873++ + if yyhl2873 { + yyb2873 = yyj2873 > l } else { - yyb2864 = r.CheckBreak() + yyb2873 = r.CheckBreak() } - if yyb2864 { + if yyb2873 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -36971,26 +37049,26 @@ func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.VolumesAttached = nil } else { - yyv2878 := &x.VolumesAttached - yym2879 := z.DecBinary() - _ = yym2879 + yyv2887 := &x.VolumesAttached + yym2888 := z.DecBinary() + _ = yym2888 if false { } else { - h.decSliceAttachedVolume((*[]AttachedVolume)(yyv2878), d) + h.decSliceAttachedVolume((*[]AttachedVolume)(yyv2887), d) } } for { - yyj2864++ - if yyhl2864 { - yyb2864 = yyj2864 > l + yyj2873++ + if yyhl2873 { + yyb2873 = yyj2873 > l } else { - yyb2864 = r.CheckBreak() + yyb2873 = r.CheckBreak() } - if yyb2864 { + if yyb2873 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2864-1, "") + z.DecStructFieldNotFound(yyj2873-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -36999,8 +37077,8 @@ func (x UniqueVolumeName) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym2880 := z.EncBinary() - _ = yym2880 + yym2889 := z.EncBinary() + _ = yym2889 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -37012,8 +37090,8 @@ func (x *UniqueVolumeName) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2881 := z.DecBinary() - _ = yym2881 + yym2890 := z.DecBinary() + _ = yym2890 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -37028,30 +37106,30 @@ func (x *AttachedVolume) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2882 := z.EncBinary() - _ = yym2882 + yym2891 := z.EncBinary() + _ = yym2891 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2883 := !z.EncBinary() - yy2arr2883 := z.EncBasicHandle().StructToArray - var yyq2883 [2]bool - _, _, _ = yysep2883, yyq2883, yy2arr2883 - const yyr2883 bool = false - var yynn2883 int - if yyr2883 || yy2arr2883 { + yysep2892 := !z.EncBinary() + yy2arr2892 := z.EncBasicHandle().StructToArray + var yyq2892 [2]bool + _, _, _ = yysep2892, yyq2892, yy2arr2892 + const yyr2892 bool = false + var yynn2892 int + if yyr2892 || yy2arr2892 { r.EncodeArrayStart(2) } else { - yynn2883 = 2 - for _, b := range yyq2883 { + yynn2892 = 2 + for _, b := range yyq2892 { if b { - yynn2883++ + yynn2892++ } } - r.EncodeMapStart(yynn2883) - yynn2883 = 0 + r.EncodeMapStart(yynn2892) + yynn2892 = 0 } - if yyr2883 || yy2arr2883 { + if yyr2892 || yy2arr2892 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Name.CodecEncodeSelf(e) } else { @@ -37060,10 +37138,10 @@ func (x *AttachedVolume) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Name.CodecEncodeSelf(e) } - if yyr2883 || yy2arr2883 { + if yyr2892 || yy2arr2892 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym2886 := z.EncBinary() - _ = yym2886 + yym2895 := z.EncBinary() + _ = yym2895 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.DevicePath)) @@ -37072,14 +37150,14 @@ func (x *AttachedVolume) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("devicePath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2887 := z.EncBinary() - _ = yym2887 + yym2896 := z.EncBinary() + _ = yym2896 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.DevicePath)) } } - if yyr2883 || yy2arr2883 { + if yyr2892 || yy2arr2892 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -37092,25 +37170,25 @@ func (x *AttachedVolume) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2888 := z.DecBinary() - _ = yym2888 + yym2897 := z.DecBinary() + _ = yym2897 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2889 := r.ContainerType() - if yyct2889 == codecSelferValueTypeMap1234 { - yyl2889 := r.ReadMapStart() - if yyl2889 == 0 { + yyct2898 := r.ContainerType() + if yyct2898 == codecSelferValueTypeMap1234 { + yyl2898 := r.ReadMapStart() + if yyl2898 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2889, d) + x.codecDecodeSelfFromMap(yyl2898, d) } - } else if yyct2889 == codecSelferValueTypeArray1234 { - yyl2889 := r.ReadArrayStart() - if yyl2889 == 0 { + } else if yyct2898 == codecSelferValueTypeArray1234 { + yyl2898 := r.ReadArrayStart() + if yyl2898 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2889, d) + x.codecDecodeSelfFromArray(yyl2898, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -37122,12 +37200,12 @@ func (x *AttachedVolume) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2890Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2890Slc - var yyhl2890 bool = l >= 0 - for yyj2890 := 0; ; yyj2890++ { - if yyhl2890 { - if yyj2890 >= l { + var yys2899Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2899Slc + var yyhl2899 bool = l >= 0 + for yyj2899 := 0; ; yyj2899++ { + if yyhl2899 { + if yyj2899 >= l { break } } else { @@ -37136,10 +37214,10 @@ func (x *AttachedVolume) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2890Slc = r.DecodeBytes(yys2890Slc, true, true) - yys2890 := string(yys2890Slc) + yys2899Slc = r.DecodeBytes(yys2899Slc, true, true) + yys2899 := string(yys2899Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2890 { + switch yys2899 { case "name": if r.TryDecodeAsNil() { x.Name = "" @@ -37153,9 +37231,9 @@ func (x *AttachedVolume) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.DevicePath = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys2890) - } // end switch yys2890 - } // end for yyj2890 + z.DecStructFieldNotFound(-1, yys2899) + } // end switch yys2899 + } // end for yyj2899 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -37163,16 +37241,16 @@ func (x *AttachedVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2893 int - var yyb2893 bool - var yyhl2893 bool = l >= 0 - yyj2893++ - if yyhl2893 { - yyb2893 = yyj2893 > l + var yyj2902 int + var yyb2902 bool + var yyhl2902 bool = l >= 0 + yyj2902++ + if yyhl2902 { + yyb2902 = yyj2902 > l } else { - yyb2893 = r.CheckBreak() + yyb2902 = r.CheckBreak() } - if yyb2893 { + if yyb2902 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37182,13 +37260,13 @@ func (x *AttachedVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Name = UniqueVolumeName(r.DecodeString()) } - yyj2893++ - if yyhl2893 { - yyb2893 = yyj2893 > l + yyj2902++ + if yyhl2902 { + yyb2902 = yyj2902 > l } else { - yyb2893 = r.CheckBreak() + yyb2902 = r.CheckBreak() } - if yyb2893 { + if yyb2902 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37199,17 +37277,17 @@ func (x *AttachedVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.DevicePath = string(r.DecodeString()) } for { - yyj2893++ - if yyhl2893 { - yyb2893 = yyj2893 > l + yyj2902++ + if yyhl2902 { + yyb2902 = yyj2902 > l } else { - yyb2893 = r.CheckBreak() + yyb2902 = r.CheckBreak() } - if yyb2893 { + if yyb2902 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2893-1, "") + z.DecStructFieldNotFound(yyj2902-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -37221,38 +37299,38 @@ func (x *AvoidPods) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2896 := z.EncBinary() - _ = yym2896 + yym2905 := z.EncBinary() + _ = yym2905 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2897 := !z.EncBinary() - yy2arr2897 := z.EncBasicHandle().StructToArray - var yyq2897 [1]bool - _, _, _ = yysep2897, yyq2897, yy2arr2897 - const yyr2897 bool = false - yyq2897[0] = len(x.PreferAvoidPods) != 0 - var yynn2897 int - if yyr2897 || yy2arr2897 { + yysep2906 := !z.EncBinary() + yy2arr2906 := z.EncBasicHandle().StructToArray + var yyq2906 [1]bool + _, _, _ = yysep2906, yyq2906, yy2arr2906 + const yyr2906 bool = false + yyq2906[0] = len(x.PreferAvoidPods) != 0 + var yynn2906 int + if yyr2906 || yy2arr2906 { r.EncodeArrayStart(1) } else { - yynn2897 = 0 - for _, b := range yyq2897 { + yynn2906 = 0 + for _, b := range yyq2906 { if b { - yynn2897++ + yynn2906++ } } - r.EncodeMapStart(yynn2897) - yynn2897 = 0 + r.EncodeMapStart(yynn2906) + yynn2906 = 0 } - if yyr2897 || yy2arr2897 { + if yyr2906 || yy2arr2906 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2897[0] { + if yyq2906[0] { if x.PreferAvoidPods == nil { r.EncodeNil() } else { - yym2899 := z.EncBinary() - _ = yym2899 + yym2908 := z.EncBinary() + _ = yym2908 if false { } else { h.encSlicePreferAvoidPodsEntry(([]PreferAvoidPodsEntry)(x.PreferAvoidPods), e) @@ -37262,15 +37340,15 @@ func (x *AvoidPods) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2897[0] { + if yyq2906[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("preferAvoidPods")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.PreferAvoidPods == nil { r.EncodeNil() } else { - yym2900 := z.EncBinary() - _ = yym2900 + yym2909 := z.EncBinary() + _ = yym2909 if false { } else { h.encSlicePreferAvoidPodsEntry(([]PreferAvoidPodsEntry)(x.PreferAvoidPods), e) @@ -37278,7 +37356,7 @@ func (x *AvoidPods) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2897 || yy2arr2897 { + if yyr2906 || yy2arr2906 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -37291,25 +37369,25 @@ func (x *AvoidPods) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2901 := z.DecBinary() - _ = yym2901 + yym2910 := z.DecBinary() + _ = yym2910 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2902 := r.ContainerType() - if yyct2902 == codecSelferValueTypeMap1234 { - yyl2902 := r.ReadMapStart() - if yyl2902 == 0 { + yyct2911 := r.ContainerType() + if yyct2911 == codecSelferValueTypeMap1234 { + yyl2911 := r.ReadMapStart() + if yyl2911 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2902, d) + x.codecDecodeSelfFromMap(yyl2911, d) } - } else if yyct2902 == codecSelferValueTypeArray1234 { - yyl2902 := r.ReadArrayStart() - if yyl2902 == 0 { + } else if yyct2911 == codecSelferValueTypeArray1234 { + yyl2911 := r.ReadArrayStart() + if yyl2911 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2902, d) + x.codecDecodeSelfFromArray(yyl2911, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -37321,12 +37399,12 @@ func (x *AvoidPods) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2903Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2903Slc - var yyhl2903 bool = l >= 0 - for yyj2903 := 0; ; yyj2903++ { - if yyhl2903 { - if yyj2903 >= l { + var yys2912Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2912Slc + var yyhl2912 bool = l >= 0 + for yyj2912 := 0; ; yyj2912++ { + if yyhl2912 { + if yyj2912 >= l { break } } else { @@ -37335,26 +37413,26 @@ func (x *AvoidPods) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2903Slc = r.DecodeBytes(yys2903Slc, true, true) - yys2903 := string(yys2903Slc) + yys2912Slc = r.DecodeBytes(yys2912Slc, true, true) + yys2912 := string(yys2912Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2903 { + switch yys2912 { case "preferAvoidPods": if r.TryDecodeAsNil() { x.PreferAvoidPods = nil } else { - yyv2904 := &x.PreferAvoidPods - yym2905 := z.DecBinary() - _ = yym2905 + yyv2913 := &x.PreferAvoidPods + yym2914 := z.DecBinary() + _ = yym2914 if false { } else { - h.decSlicePreferAvoidPodsEntry((*[]PreferAvoidPodsEntry)(yyv2904), d) + h.decSlicePreferAvoidPodsEntry((*[]PreferAvoidPodsEntry)(yyv2913), d) } } default: - z.DecStructFieldNotFound(-1, yys2903) - } // end switch yys2903 - } // end for yyj2903 + z.DecStructFieldNotFound(-1, yys2912) + } // end switch yys2912 + } // end for yyj2912 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -37362,16 +37440,16 @@ func (x *AvoidPods) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2906 int - var yyb2906 bool - var yyhl2906 bool = l >= 0 - yyj2906++ - if yyhl2906 { - yyb2906 = yyj2906 > l + var yyj2915 int + var yyb2915 bool + var yyhl2915 bool = l >= 0 + yyj2915++ + if yyhl2915 { + yyb2915 = yyj2915 > l } else { - yyb2906 = r.CheckBreak() + yyb2915 = r.CheckBreak() } - if yyb2906 { + if yyb2915 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37379,26 +37457,26 @@ func (x *AvoidPods) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.PreferAvoidPods = nil } else { - yyv2907 := &x.PreferAvoidPods - yym2908 := z.DecBinary() - _ = yym2908 + yyv2916 := &x.PreferAvoidPods + yym2917 := z.DecBinary() + _ = yym2917 if false { } else { - h.decSlicePreferAvoidPodsEntry((*[]PreferAvoidPodsEntry)(yyv2907), d) + h.decSlicePreferAvoidPodsEntry((*[]PreferAvoidPodsEntry)(yyv2916), d) } } for { - yyj2906++ - if yyhl2906 { - yyb2906 = yyj2906 > l + yyj2915++ + if yyhl2915 { + yyb2915 = yyj2915 > l } else { - yyb2906 = r.CheckBreak() + yyb2915 = r.CheckBreak() } - if yyb2906 { + if yyb2915 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2906-1, "") + z.DecStructFieldNotFound(yyj2915-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -37410,85 +37488,85 @@ func (x *PreferAvoidPodsEntry) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2909 := z.EncBinary() - _ = yym2909 + yym2918 := z.EncBinary() + _ = yym2918 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2910 := !z.EncBinary() - yy2arr2910 := z.EncBasicHandle().StructToArray - var yyq2910 [4]bool - _, _, _ = yysep2910, yyq2910, yy2arr2910 - const yyr2910 bool = false - yyq2910[1] = true - yyq2910[2] = x.Reason != "" - yyq2910[3] = x.Message != "" - var yynn2910 int - if yyr2910 || yy2arr2910 { + yysep2919 := !z.EncBinary() + yy2arr2919 := z.EncBasicHandle().StructToArray + var yyq2919 [4]bool + _, _, _ = yysep2919, yyq2919, yy2arr2919 + const yyr2919 bool = false + yyq2919[1] = true + yyq2919[2] = x.Reason != "" + yyq2919[3] = x.Message != "" + var yynn2919 int + if yyr2919 || yy2arr2919 { r.EncodeArrayStart(4) } else { - yynn2910 = 1 - for _, b := range yyq2910 { + yynn2919 = 1 + for _, b := range yyq2919 { if b { - yynn2910++ + yynn2919++ } } - r.EncodeMapStart(yynn2910) - yynn2910 = 0 + r.EncodeMapStart(yynn2919) + yynn2919 = 0 } - if yyr2910 || yy2arr2910 { + if yyr2919 || yy2arr2919 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy2912 := &x.PodSignature - yy2912.CodecEncodeSelf(e) + yy2921 := &x.PodSignature + yy2921.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podSignature")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2913 := &x.PodSignature - yy2913.CodecEncodeSelf(e) + yy2922 := &x.PodSignature + yy2922.CodecEncodeSelf(e) } - if yyr2910 || yy2arr2910 { + if yyr2919 || yy2arr2919 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2910[1] { - yy2915 := &x.EvictionTime - yym2916 := z.EncBinary() - _ = yym2916 + if yyq2919[1] { + yy2924 := &x.EvictionTime + yym2925 := z.EncBinary() + _ = yym2925 if false { - } else if z.HasExtensions() && z.EncExt(yy2915) { - } else if yym2916 { - z.EncBinaryMarshal(yy2915) - } else if !yym2916 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2915) + } else if z.HasExtensions() && z.EncExt(yy2924) { + } else if yym2925 { + z.EncBinaryMarshal(yy2924) + } else if !yym2925 && z.IsJSONHandle() { + z.EncJSONMarshal(yy2924) } else { - z.EncFallback(yy2915) + z.EncFallback(yy2924) } } else { r.EncodeNil() } } else { - if yyq2910[1] { + if yyq2919[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("evictionTime")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2917 := &x.EvictionTime - yym2918 := z.EncBinary() - _ = yym2918 + yy2926 := &x.EvictionTime + yym2927 := z.EncBinary() + _ = yym2927 if false { - } else if z.HasExtensions() && z.EncExt(yy2917) { - } else if yym2918 { - z.EncBinaryMarshal(yy2917) - } else if !yym2918 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2917) + } else if z.HasExtensions() && z.EncExt(yy2926) { + } else if yym2927 { + z.EncBinaryMarshal(yy2926) + } else if !yym2927 && z.IsJSONHandle() { + z.EncJSONMarshal(yy2926) } else { - z.EncFallback(yy2917) + z.EncFallback(yy2926) } } } - if yyr2910 || yy2arr2910 { + if yyr2919 || yy2arr2919 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2910[2] { - yym2920 := z.EncBinary() - _ = yym2920 + if yyq2919[2] { + yym2929 := z.EncBinary() + _ = yym2929 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) @@ -37497,23 +37575,23 @@ func (x *PreferAvoidPodsEntry) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2910[2] { + if yyq2919[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("reason")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2921 := z.EncBinary() - _ = yym2921 + yym2930 := z.EncBinary() + _ = yym2930 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) } } } - if yyr2910 || yy2arr2910 { + if yyr2919 || yy2arr2919 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2910[3] { - yym2923 := z.EncBinary() - _ = yym2923 + if yyq2919[3] { + yym2932 := z.EncBinary() + _ = yym2932 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) @@ -37522,19 +37600,19 @@ func (x *PreferAvoidPodsEntry) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2910[3] { + if yyq2919[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("message")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2924 := z.EncBinary() - _ = yym2924 + yym2933 := z.EncBinary() + _ = yym2933 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) } } } - if yyr2910 || yy2arr2910 { + if yyr2919 || yy2arr2919 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -37547,25 +37625,25 @@ func (x *PreferAvoidPodsEntry) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2925 := z.DecBinary() - _ = yym2925 + yym2934 := z.DecBinary() + _ = yym2934 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2926 := r.ContainerType() - if yyct2926 == codecSelferValueTypeMap1234 { - yyl2926 := r.ReadMapStart() - if yyl2926 == 0 { + yyct2935 := r.ContainerType() + if yyct2935 == codecSelferValueTypeMap1234 { + yyl2935 := r.ReadMapStart() + if yyl2935 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2926, d) + x.codecDecodeSelfFromMap(yyl2935, d) } - } else if yyct2926 == codecSelferValueTypeArray1234 { - yyl2926 := r.ReadArrayStart() - if yyl2926 == 0 { + } else if yyct2935 == codecSelferValueTypeArray1234 { + yyl2935 := r.ReadArrayStart() + if yyl2935 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2926, d) + x.codecDecodeSelfFromArray(yyl2935, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -37577,12 +37655,12 @@ func (x *PreferAvoidPodsEntry) codecDecodeSelfFromMap(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2927Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2927Slc - var yyhl2927 bool = l >= 0 - for yyj2927 := 0; ; yyj2927++ { - if yyhl2927 { - if yyj2927 >= l { + var yys2936Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2936Slc + var yyhl2936 bool = l >= 0 + for yyj2936 := 0; ; yyj2936++ { + if yyhl2936 { + if yyj2936 >= l { break } } else { @@ -37591,32 +37669,32 @@ func (x *PreferAvoidPodsEntry) codecDecodeSelfFromMap(l int, d *codec1978.Decode } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2927Slc = r.DecodeBytes(yys2927Slc, true, true) - yys2927 := string(yys2927Slc) + yys2936Slc = r.DecodeBytes(yys2936Slc, true, true) + yys2936 := string(yys2936Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2927 { + switch yys2936 { case "podSignature": if r.TryDecodeAsNil() { x.PodSignature = PodSignature{} } else { - yyv2928 := &x.PodSignature - yyv2928.CodecDecodeSelf(d) + yyv2937 := &x.PodSignature + yyv2937.CodecDecodeSelf(d) } case "evictionTime": if r.TryDecodeAsNil() { x.EvictionTime = pkg2_unversioned.Time{} } else { - yyv2929 := &x.EvictionTime - yym2930 := z.DecBinary() - _ = yym2930 + yyv2938 := &x.EvictionTime + yym2939 := z.DecBinary() + _ = yym2939 if false { - } else if z.HasExtensions() && z.DecExt(yyv2929) { - } else if yym2930 { - z.DecBinaryUnmarshal(yyv2929) - } else if !yym2930 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv2929) + } else if z.HasExtensions() && z.DecExt(yyv2938) { + } else if yym2939 { + z.DecBinaryUnmarshal(yyv2938) + } else if !yym2939 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv2938) } else { - z.DecFallback(yyv2929, false) + z.DecFallback(yyv2938, false) } } case "reason": @@ -37632,9 +37710,9 @@ func (x *PreferAvoidPodsEntry) codecDecodeSelfFromMap(l int, d *codec1978.Decode x.Message = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys2927) - } // end switch yys2927 - } // end for yyj2927 + z.DecStructFieldNotFound(-1, yys2936) + } // end switch yys2936 + } // end for yyj2936 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -37642,16 +37720,16 @@ func (x *PreferAvoidPodsEntry) codecDecodeSelfFromArray(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2933 int - var yyb2933 bool - var yyhl2933 bool = l >= 0 - yyj2933++ - if yyhl2933 { - yyb2933 = yyj2933 > l + var yyj2942 int + var yyb2942 bool + var yyhl2942 bool = l >= 0 + yyj2942++ + if yyhl2942 { + yyb2942 = yyj2942 > l } else { - yyb2933 = r.CheckBreak() + yyb2942 = r.CheckBreak() } - if yyb2933 { + if yyb2942 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37659,16 +37737,16 @@ func (x *PreferAvoidPodsEntry) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.PodSignature = PodSignature{} } else { - yyv2934 := &x.PodSignature - yyv2934.CodecDecodeSelf(d) + yyv2943 := &x.PodSignature + yyv2943.CodecDecodeSelf(d) } - yyj2933++ - if yyhl2933 { - yyb2933 = yyj2933 > l + yyj2942++ + if yyhl2942 { + yyb2942 = yyj2942 > l } else { - yyb2933 = r.CheckBreak() + yyb2942 = r.CheckBreak() } - if yyb2933 { + if yyb2942 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37676,26 +37754,26 @@ func (x *PreferAvoidPodsEntry) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.EvictionTime = pkg2_unversioned.Time{} } else { - yyv2935 := &x.EvictionTime - yym2936 := z.DecBinary() - _ = yym2936 + yyv2944 := &x.EvictionTime + yym2945 := z.DecBinary() + _ = yym2945 if false { - } else if z.HasExtensions() && z.DecExt(yyv2935) { - } else if yym2936 { - z.DecBinaryUnmarshal(yyv2935) - } else if !yym2936 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv2935) + } else if z.HasExtensions() && z.DecExt(yyv2944) { + } else if yym2945 { + z.DecBinaryUnmarshal(yyv2944) + } else if !yym2945 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv2944) } else { - z.DecFallback(yyv2935, false) + z.DecFallback(yyv2944, false) } } - yyj2933++ - if yyhl2933 { - yyb2933 = yyj2933 > l + yyj2942++ + if yyhl2942 { + yyb2942 = yyj2942 > l } else { - yyb2933 = r.CheckBreak() + yyb2942 = r.CheckBreak() } - if yyb2933 { + if yyb2942 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37705,13 +37783,13 @@ func (x *PreferAvoidPodsEntry) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.Reason = string(r.DecodeString()) } - yyj2933++ - if yyhl2933 { - yyb2933 = yyj2933 > l + yyj2942++ + if yyhl2942 { + yyb2942 = yyj2942 > l } else { - yyb2933 = r.CheckBreak() + yyb2942 = r.CheckBreak() } - if yyb2933 { + if yyb2942 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37722,17 +37800,17 @@ func (x *PreferAvoidPodsEntry) codecDecodeSelfFromArray(l int, d *codec1978.Deco x.Message = string(r.DecodeString()) } for { - yyj2933++ - if yyhl2933 { - yyb2933 = yyj2933 > l + yyj2942++ + if yyhl2942 { + yyb2942 = yyj2942 > l } else { - yyb2933 = r.CheckBreak() + yyb2942 = r.CheckBreak() } - if yyb2933 { + if yyb2942 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2933-1, "") + z.DecStructFieldNotFound(yyj2942-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -37744,33 +37822,33 @@ func (x *PodSignature) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2939 := z.EncBinary() - _ = yym2939 + yym2948 := z.EncBinary() + _ = yym2948 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2940 := !z.EncBinary() - yy2arr2940 := z.EncBasicHandle().StructToArray - var yyq2940 [1]bool - _, _, _ = yysep2940, yyq2940, yy2arr2940 - const yyr2940 bool = false - yyq2940[0] = x.PodController != nil - var yynn2940 int - if yyr2940 || yy2arr2940 { + yysep2949 := !z.EncBinary() + yy2arr2949 := z.EncBasicHandle().StructToArray + var yyq2949 [1]bool + _, _, _ = yysep2949, yyq2949, yy2arr2949 + const yyr2949 bool = false + yyq2949[0] = x.PodController != nil + var yynn2949 int + if yyr2949 || yy2arr2949 { r.EncodeArrayStart(1) } else { - yynn2940 = 0 - for _, b := range yyq2940 { + yynn2949 = 0 + for _, b := range yyq2949 { if b { - yynn2940++ + yynn2949++ } } - r.EncodeMapStart(yynn2940) - yynn2940 = 0 + r.EncodeMapStart(yynn2949) + yynn2949 = 0 } - if yyr2940 || yy2arr2940 { + if yyr2949 || yy2arr2949 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2940[0] { + if yyq2949[0] { if x.PodController == nil { r.EncodeNil() } else { @@ -37780,7 +37858,7 @@ func (x *PodSignature) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2940[0] { + if yyq2949[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podController")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -37791,7 +37869,7 @@ func (x *PodSignature) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2940 || yy2arr2940 { + if yyr2949 || yy2arr2949 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -37804,25 +37882,25 @@ func (x *PodSignature) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2942 := z.DecBinary() - _ = yym2942 + yym2951 := z.DecBinary() + _ = yym2951 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2943 := r.ContainerType() - if yyct2943 == codecSelferValueTypeMap1234 { - yyl2943 := r.ReadMapStart() - if yyl2943 == 0 { + yyct2952 := r.ContainerType() + if yyct2952 == codecSelferValueTypeMap1234 { + yyl2952 := r.ReadMapStart() + if yyl2952 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2943, d) + x.codecDecodeSelfFromMap(yyl2952, d) } - } else if yyct2943 == codecSelferValueTypeArray1234 { - yyl2943 := r.ReadArrayStart() - if yyl2943 == 0 { + } else if yyct2952 == codecSelferValueTypeArray1234 { + yyl2952 := r.ReadArrayStart() + if yyl2952 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2943, d) + x.codecDecodeSelfFromArray(yyl2952, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -37834,12 +37912,12 @@ func (x *PodSignature) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2944Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2944Slc - var yyhl2944 bool = l >= 0 - for yyj2944 := 0; ; yyj2944++ { - if yyhl2944 { - if yyj2944 >= l { + var yys2953Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2953Slc + var yyhl2953 bool = l >= 0 + for yyj2953 := 0; ; yyj2953++ { + if yyhl2953 { + if yyj2953 >= l { break } } else { @@ -37848,10 +37926,10 @@ func (x *PodSignature) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2944Slc = r.DecodeBytes(yys2944Slc, true, true) - yys2944 := string(yys2944Slc) + yys2953Slc = r.DecodeBytes(yys2953Slc, true, true) + yys2953 := string(yys2953Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2944 { + switch yys2953 { case "podController": if r.TryDecodeAsNil() { if x.PodController != nil { @@ -37864,9 +37942,9 @@ func (x *PodSignature) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.PodController.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys2944) - } // end switch yys2944 - } // end for yyj2944 + z.DecStructFieldNotFound(-1, yys2953) + } // end switch yys2953 + } // end for yyj2953 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -37874,16 +37952,16 @@ func (x *PodSignature) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2946 int - var yyb2946 bool - var yyhl2946 bool = l >= 0 - yyj2946++ - if yyhl2946 { - yyb2946 = yyj2946 > l + var yyj2955 int + var yyb2955 bool + var yyhl2955 bool = l >= 0 + yyj2955++ + if yyhl2955 { + yyb2955 = yyj2955 > l } else { - yyb2946 = r.CheckBreak() + yyb2955 = r.CheckBreak() } - if yyb2946 { + if yyb2955 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -37899,17 +37977,17 @@ func (x *PodSignature) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.PodController.CodecDecodeSelf(d) } for { - yyj2946++ - if yyhl2946 { - yyb2946 = yyj2946 > l + yyj2955++ + if yyhl2955 { + yyb2955 = yyj2955 > l } else { - yyb2946 = r.CheckBreak() + yyb2955 = r.CheckBreak() } - if yyb2946 { + if yyb2955 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2946-1, "") + z.DecStructFieldNotFound(yyj2955-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -37921,37 +37999,37 @@ func (x *ContainerImage) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2948 := z.EncBinary() - _ = yym2948 + yym2957 := z.EncBinary() + _ = yym2957 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2949 := !z.EncBinary() - yy2arr2949 := z.EncBasicHandle().StructToArray - var yyq2949 [2]bool - _, _, _ = yysep2949, yyq2949, yy2arr2949 - const yyr2949 bool = false - yyq2949[1] = x.SizeBytes != 0 - var yynn2949 int - if yyr2949 || yy2arr2949 { + yysep2958 := !z.EncBinary() + yy2arr2958 := z.EncBasicHandle().StructToArray + var yyq2958 [2]bool + _, _, _ = yysep2958, yyq2958, yy2arr2958 + const yyr2958 bool = false + yyq2958[1] = x.SizeBytes != 0 + var yynn2958 int + if yyr2958 || yy2arr2958 { r.EncodeArrayStart(2) } else { - yynn2949 = 1 - for _, b := range yyq2949 { + yynn2958 = 1 + for _, b := range yyq2958 { if b { - yynn2949++ + yynn2958++ } } - r.EncodeMapStart(yynn2949) - yynn2949 = 0 + r.EncodeMapStart(yynn2958) + yynn2958 = 0 } - if yyr2949 || yy2arr2949 { + if yyr2958 || yy2arr2958 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Names == nil { r.EncodeNil() } else { - yym2951 := z.EncBinary() - _ = yym2951 + yym2960 := z.EncBinary() + _ = yym2960 if false { } else { z.F.EncSliceStringV(x.Names, false, e) @@ -37964,19 +38042,19 @@ func (x *ContainerImage) CodecEncodeSelf(e *codec1978.Encoder) { if x.Names == nil { r.EncodeNil() } else { - yym2952 := z.EncBinary() - _ = yym2952 + yym2961 := z.EncBinary() + _ = yym2961 if false { } else { z.F.EncSliceStringV(x.Names, false, e) } } } - if yyr2949 || yy2arr2949 { + if yyr2958 || yy2arr2958 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2949[1] { - yym2954 := z.EncBinary() - _ = yym2954 + if yyq2958[1] { + yym2963 := z.EncBinary() + _ = yym2963 if false { } else { r.EncodeInt(int64(x.SizeBytes)) @@ -37985,19 +38063,19 @@ func (x *ContainerImage) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq2949[1] { + if yyq2958[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("sizeBytes")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2955 := z.EncBinary() - _ = yym2955 + yym2964 := z.EncBinary() + _ = yym2964 if false { } else { r.EncodeInt(int64(x.SizeBytes)) } } } - if yyr2949 || yy2arr2949 { + if yyr2958 || yy2arr2958 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -38010,25 +38088,25 @@ func (x *ContainerImage) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2956 := z.DecBinary() - _ = yym2956 + yym2965 := z.DecBinary() + _ = yym2965 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2957 := r.ContainerType() - if yyct2957 == codecSelferValueTypeMap1234 { - yyl2957 := r.ReadMapStart() - if yyl2957 == 0 { + yyct2966 := r.ContainerType() + if yyct2966 == codecSelferValueTypeMap1234 { + yyl2966 := r.ReadMapStart() + if yyl2966 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2957, d) + x.codecDecodeSelfFromMap(yyl2966, d) } - } else if yyct2957 == codecSelferValueTypeArray1234 { - yyl2957 := r.ReadArrayStart() - if yyl2957 == 0 { + } else if yyct2966 == codecSelferValueTypeArray1234 { + yyl2966 := r.ReadArrayStart() + if yyl2966 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2957, d) + x.codecDecodeSelfFromArray(yyl2966, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -38040,12 +38118,12 @@ func (x *ContainerImage) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2958Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2958Slc - var yyhl2958 bool = l >= 0 - for yyj2958 := 0; ; yyj2958++ { - if yyhl2958 { - if yyj2958 >= l { + var yys2967Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys2967Slc + var yyhl2967 bool = l >= 0 + for yyj2967 := 0; ; yyj2967++ { + if yyhl2967 { + if yyj2967 >= l { break } } else { @@ -38054,20 +38132,20 @@ func (x *ContainerImage) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2958Slc = r.DecodeBytes(yys2958Slc, true, true) - yys2958 := string(yys2958Slc) + yys2967Slc = r.DecodeBytes(yys2967Slc, true, true) + yys2967 := string(yys2967Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2958 { + switch yys2967 { case "names": if r.TryDecodeAsNil() { x.Names = nil } else { - yyv2959 := &x.Names - yym2960 := z.DecBinary() - _ = yym2960 + yyv2968 := &x.Names + yym2969 := z.DecBinary() + _ = yym2969 if false { } else { - z.F.DecSliceStringX(yyv2959, false, d) + z.F.DecSliceStringX(yyv2968, false, d) } } case "sizeBytes": @@ -38077,9 +38155,9 @@ func (x *ContainerImage) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.SizeBytes = int64(r.DecodeInt(64)) } default: - z.DecStructFieldNotFound(-1, yys2958) - } // end switch yys2958 - } // end for yyj2958 + z.DecStructFieldNotFound(-1, yys2967) + } // end switch yys2967 + } // end for yyj2967 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -38087,16 +38165,16 @@ func (x *ContainerImage) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj2962 int - var yyb2962 bool - var yyhl2962 bool = l >= 0 - yyj2962++ - if yyhl2962 { - yyb2962 = yyj2962 > l + var yyj2971 int + var yyb2971 bool + var yyhl2971 bool = l >= 0 + yyj2971++ + if yyhl2971 { + yyb2971 = yyj2971 > l } else { - yyb2962 = r.CheckBreak() + yyb2971 = r.CheckBreak() } - if yyb2962 { + if yyb2971 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38104,21 +38182,21 @@ func (x *ContainerImage) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Names = nil } else { - yyv2963 := &x.Names - yym2964 := z.DecBinary() - _ = yym2964 + yyv2972 := &x.Names + yym2973 := z.DecBinary() + _ = yym2973 if false { } else { - z.F.DecSliceStringX(yyv2963, false, d) + z.F.DecSliceStringX(yyv2972, false, d) } } - yyj2962++ - if yyhl2962 { - yyb2962 = yyj2962 > l + yyj2971++ + if yyhl2971 { + yyb2971 = yyj2971 > l } else { - yyb2962 = r.CheckBreak() + yyb2971 = r.CheckBreak() } - if yyb2962 { + if yyb2971 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38129,17 +38207,17 @@ func (x *ContainerImage) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.SizeBytes = int64(r.DecodeInt(64)) } for { - yyj2962++ - if yyhl2962 { - yyb2962 = yyj2962 > l + yyj2971++ + if yyhl2971 { + yyb2971 = yyj2971 > l } else { - yyb2962 = r.CheckBreak() + yyb2971 = r.CheckBreak() } - if yyb2962 { + if yyb2971 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj2962-1, "") + z.DecStructFieldNotFound(yyj2971-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -38148,8 +38226,8 @@ func (x NodePhase) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym2966 := z.EncBinary() - _ = yym2966 + yym2975 := z.EncBinary() + _ = yym2975 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -38161,8 +38239,8 @@ func (x *NodePhase) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2967 := z.DecBinary() - _ = yym2967 + yym2976 := z.DecBinary() + _ = yym2976 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -38174,8 +38252,8 @@ func (x NodeConditionType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym2968 := z.EncBinary() - _ = yym2968 + yym2977 := z.EncBinary() + _ = yym2977 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -38187,8 +38265,8 @@ func (x *NodeConditionType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2969 := z.DecBinary() - _ = yym2969 + yym2978 := z.DecBinary() + _ = yym2978 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -38203,34 +38281,34 @@ func (x *NodeCondition) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym2970 := z.EncBinary() - _ = yym2970 + yym2979 := z.EncBinary() + _ = yym2979 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep2971 := !z.EncBinary() - yy2arr2971 := z.EncBasicHandle().StructToArray - var yyq2971 [6]bool - _, _, _ = yysep2971, yyq2971, yy2arr2971 - const yyr2971 bool = false - yyq2971[2] = true - yyq2971[3] = true - yyq2971[4] = x.Reason != "" - yyq2971[5] = x.Message != "" - var yynn2971 int - if yyr2971 || yy2arr2971 { + yysep2980 := !z.EncBinary() + yy2arr2980 := z.EncBasicHandle().StructToArray + var yyq2980 [6]bool + _, _, _ = yysep2980, yyq2980, yy2arr2980 + const yyr2980 bool = false + yyq2980[2] = true + yyq2980[3] = true + yyq2980[4] = x.Reason != "" + yyq2980[5] = x.Message != "" + var yynn2980 int + if yyr2980 || yy2arr2980 { r.EncodeArrayStart(6) } else { - yynn2971 = 2 - for _, b := range yyq2971 { + yynn2980 = 2 + for _, b := range yyq2980 { if b { - yynn2971++ + yynn2980++ } } - r.EncodeMapStart(yynn2971) - yynn2971 = 0 + r.EncodeMapStart(yynn2980) + yynn2980 = 0 } - if yyr2971 || yy2arr2971 { + if yyr2980 || yy2arr2980 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Type.CodecEncodeSelf(e) } else { @@ -38239,7 +38317,7 @@ func (x *NodeCondition) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } - if yyr2971 || yy2arr2971 { + if yyr2980 || yy2arr2980 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Status.CodecEncodeSelf(e) } else { @@ -38248,85 +38326,85 @@ func (x *NodeCondition) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Status.CodecEncodeSelf(e) } - if yyr2971 || yy2arr2971 { + if yyr2980 || yy2arr2980 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2971[2] { - yy2975 := &x.LastHeartbeatTime - yym2976 := z.EncBinary() - _ = yym2976 + if yyq2980[2] { + yy2984 := &x.LastHeartbeatTime + yym2985 := z.EncBinary() + _ = yym2985 if false { - } else if z.HasExtensions() && z.EncExt(yy2975) { - } else if yym2976 { - z.EncBinaryMarshal(yy2975) - } else if !yym2976 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2975) + } else if z.HasExtensions() && z.EncExt(yy2984) { + } else if yym2985 { + z.EncBinaryMarshal(yy2984) + } else if !yym2985 && z.IsJSONHandle() { + z.EncJSONMarshal(yy2984) } else { - z.EncFallback(yy2975) + z.EncFallback(yy2984) } } else { r.EncodeNil() } } else { - if yyq2971[2] { + if yyq2980[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("lastHeartbeatTime")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2977 := &x.LastHeartbeatTime - yym2978 := z.EncBinary() - _ = yym2978 + yy2986 := &x.LastHeartbeatTime + yym2987 := z.EncBinary() + _ = yym2987 if false { - } else if z.HasExtensions() && z.EncExt(yy2977) { - } else if yym2978 { - z.EncBinaryMarshal(yy2977) - } else if !yym2978 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2977) + } else if z.HasExtensions() && z.EncExt(yy2986) { + } else if yym2987 { + z.EncBinaryMarshal(yy2986) + } else if !yym2987 && z.IsJSONHandle() { + z.EncJSONMarshal(yy2986) } else { - z.EncFallback(yy2977) + z.EncFallback(yy2986) } } } - if yyr2971 || yy2arr2971 { + if yyr2980 || yy2arr2980 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2971[3] { - yy2980 := &x.LastTransitionTime - yym2981 := z.EncBinary() - _ = yym2981 + if yyq2980[3] { + yy2989 := &x.LastTransitionTime + yym2990 := z.EncBinary() + _ = yym2990 if false { - } else if z.HasExtensions() && z.EncExt(yy2980) { - } else if yym2981 { - z.EncBinaryMarshal(yy2980) - } else if !yym2981 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2980) + } else if z.HasExtensions() && z.EncExt(yy2989) { + } else if yym2990 { + z.EncBinaryMarshal(yy2989) + } else if !yym2990 && z.IsJSONHandle() { + z.EncJSONMarshal(yy2989) } else { - z.EncFallback(yy2980) + z.EncFallback(yy2989) } } else { r.EncodeNil() } } else { - if yyq2971[3] { + if yyq2980[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy2982 := &x.LastTransitionTime - yym2983 := z.EncBinary() - _ = yym2983 + yy2991 := &x.LastTransitionTime + yym2992 := z.EncBinary() + _ = yym2992 if false { - } else if z.HasExtensions() && z.EncExt(yy2982) { - } else if yym2983 { - z.EncBinaryMarshal(yy2982) - } else if !yym2983 && z.IsJSONHandle() { - z.EncJSONMarshal(yy2982) + } else if z.HasExtensions() && z.EncExt(yy2991) { + } else if yym2992 { + z.EncBinaryMarshal(yy2991) + } else if !yym2992 && z.IsJSONHandle() { + z.EncJSONMarshal(yy2991) } else { - z.EncFallback(yy2982) + z.EncFallback(yy2991) } } } - if yyr2971 || yy2arr2971 { + if yyr2980 || yy2arr2980 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2971[4] { - yym2985 := z.EncBinary() - _ = yym2985 + if yyq2980[4] { + yym2994 := z.EncBinary() + _ = yym2994 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) @@ -38335,23 +38413,23 @@ func (x *NodeCondition) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2971[4] { + if yyq2980[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("reason")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2986 := z.EncBinary() - _ = yym2986 + yym2995 := z.EncBinary() + _ = yym2995 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) } } } - if yyr2971 || yy2arr2971 { + if yyr2980 || yy2arr2980 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2971[5] { - yym2988 := z.EncBinary() - _ = yym2988 + if yyq2980[5] { + yym2997 := z.EncBinary() + _ = yym2997 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) @@ -38360,19 +38438,19 @@ func (x *NodeCondition) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2971[5] { + if yyq2980[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("message")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym2989 := z.EncBinary() - _ = yym2989 + yym2998 := z.EncBinary() + _ = yym2998 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) } } } - if yyr2971 || yy2arr2971 { + if yyr2980 || yy2arr2980 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -38385,25 +38463,25 @@ func (x *NodeCondition) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym2990 := z.DecBinary() - _ = yym2990 + yym2999 := z.DecBinary() + _ = yym2999 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct2991 := r.ContainerType() - if yyct2991 == codecSelferValueTypeMap1234 { - yyl2991 := r.ReadMapStart() - if yyl2991 == 0 { + yyct3000 := r.ContainerType() + if yyct3000 == codecSelferValueTypeMap1234 { + yyl3000 := r.ReadMapStart() + if yyl3000 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl2991, d) + x.codecDecodeSelfFromMap(yyl3000, d) } - } else if yyct2991 == codecSelferValueTypeArray1234 { - yyl2991 := r.ReadArrayStart() - if yyl2991 == 0 { + } else if yyct3000 == codecSelferValueTypeArray1234 { + yyl3000 := r.ReadArrayStart() + if yyl3000 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl2991, d) + x.codecDecodeSelfFromArray(yyl3000, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -38415,12 +38493,12 @@ func (x *NodeCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys2992Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys2992Slc - var yyhl2992 bool = l >= 0 - for yyj2992 := 0; ; yyj2992++ { - if yyhl2992 { - if yyj2992 >= l { + var yys3001Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3001Slc + var yyhl3001 bool = l >= 0 + for yyj3001 := 0; ; yyj3001++ { + if yyhl3001 { + if yyj3001 >= l { break } } else { @@ -38429,10 +38507,10 @@ func (x *NodeCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys2992Slc = r.DecodeBytes(yys2992Slc, true, true) - yys2992 := string(yys2992Slc) + yys3001Slc = r.DecodeBytes(yys3001Slc, true, true) + yys3001 := string(yys3001Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys2992 { + switch yys3001 { case "type": if r.TryDecodeAsNil() { x.Type = "" @@ -38449,34 +38527,34 @@ func (x *NodeCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.LastHeartbeatTime = pkg2_unversioned.Time{} } else { - yyv2995 := &x.LastHeartbeatTime - yym2996 := z.DecBinary() - _ = yym2996 + yyv3004 := &x.LastHeartbeatTime + yym3005 := z.DecBinary() + _ = yym3005 if false { - } else if z.HasExtensions() && z.DecExt(yyv2995) { - } else if yym2996 { - z.DecBinaryUnmarshal(yyv2995) - } else if !yym2996 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv2995) + } else if z.HasExtensions() && z.DecExt(yyv3004) { + } else if yym3005 { + z.DecBinaryUnmarshal(yyv3004) + } else if !yym3005 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3004) } else { - z.DecFallback(yyv2995, false) + z.DecFallback(yyv3004, false) } } case "lastTransitionTime": if r.TryDecodeAsNil() { x.LastTransitionTime = pkg2_unversioned.Time{} } else { - yyv2997 := &x.LastTransitionTime - yym2998 := z.DecBinary() - _ = yym2998 + yyv3006 := &x.LastTransitionTime + yym3007 := z.DecBinary() + _ = yym3007 if false { - } else if z.HasExtensions() && z.DecExt(yyv2997) { - } else if yym2998 { - z.DecBinaryUnmarshal(yyv2997) - } else if !yym2998 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv2997) + } else if z.HasExtensions() && z.DecExt(yyv3006) { + } else if yym3007 { + z.DecBinaryUnmarshal(yyv3006) + } else if !yym3007 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3006) } else { - z.DecFallback(yyv2997, false) + z.DecFallback(yyv3006, false) } } case "reason": @@ -38492,9 +38570,9 @@ func (x *NodeCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Message = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys2992) - } // end switch yys2992 - } // end for yyj2992 + z.DecStructFieldNotFound(-1, yys3001) + } // end switch yys3001 + } // end for yyj3001 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -38502,16 +38580,16 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3001 int - var yyb3001 bool - var yyhl3001 bool = l >= 0 - yyj3001++ - if yyhl3001 { - yyb3001 = yyj3001 > l + var yyj3010 int + var yyb3010 bool + var yyhl3010 bool = l >= 0 + yyj3010++ + if yyhl3010 { + yyb3010 = yyj3010 > l } else { - yyb3001 = r.CheckBreak() + yyb3010 = r.CheckBreak() } - if yyb3001 { + if yyb3010 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38521,13 +38599,13 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Type = NodeConditionType(r.DecodeString()) } - yyj3001++ - if yyhl3001 { - yyb3001 = yyj3001 > l + yyj3010++ + if yyhl3010 { + yyb3010 = yyj3010 > l } else { - yyb3001 = r.CheckBreak() + yyb3010 = r.CheckBreak() } - if yyb3001 { + if yyb3010 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38537,13 +38615,13 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Status = ConditionStatus(r.DecodeString()) } - yyj3001++ - if yyhl3001 { - yyb3001 = yyj3001 > l + yyj3010++ + if yyhl3010 { + yyb3010 = yyj3010 > l } else { - yyb3001 = r.CheckBreak() + yyb3010 = r.CheckBreak() } - if yyb3001 { + if yyb3010 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38551,26 +38629,26 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.LastHeartbeatTime = pkg2_unversioned.Time{} } else { - yyv3004 := &x.LastHeartbeatTime - yym3005 := z.DecBinary() - _ = yym3005 + yyv3013 := &x.LastHeartbeatTime + yym3014 := z.DecBinary() + _ = yym3014 if false { - } else if z.HasExtensions() && z.DecExt(yyv3004) { - } else if yym3005 { - z.DecBinaryUnmarshal(yyv3004) - } else if !yym3005 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3004) + } else if z.HasExtensions() && z.DecExt(yyv3013) { + } else if yym3014 { + z.DecBinaryUnmarshal(yyv3013) + } else if !yym3014 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3013) } else { - z.DecFallback(yyv3004, false) + z.DecFallback(yyv3013, false) } } - yyj3001++ - if yyhl3001 { - yyb3001 = yyj3001 > l + yyj3010++ + if yyhl3010 { + yyb3010 = yyj3010 > l } else { - yyb3001 = r.CheckBreak() + yyb3010 = r.CheckBreak() } - if yyb3001 { + if yyb3010 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38578,26 +38656,26 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.LastTransitionTime = pkg2_unversioned.Time{} } else { - yyv3006 := &x.LastTransitionTime - yym3007 := z.DecBinary() - _ = yym3007 + yyv3015 := &x.LastTransitionTime + yym3016 := z.DecBinary() + _ = yym3016 if false { - } else if z.HasExtensions() && z.DecExt(yyv3006) { - } else if yym3007 { - z.DecBinaryUnmarshal(yyv3006) - } else if !yym3007 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3006) + } else if z.HasExtensions() && z.DecExt(yyv3015) { + } else if yym3016 { + z.DecBinaryUnmarshal(yyv3015) + } else if !yym3016 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3015) } else { - z.DecFallback(yyv3006, false) + z.DecFallback(yyv3015, false) } } - yyj3001++ - if yyhl3001 { - yyb3001 = yyj3001 > l + yyj3010++ + if yyhl3010 { + yyb3010 = yyj3010 > l } else { - yyb3001 = r.CheckBreak() + yyb3010 = r.CheckBreak() } - if yyb3001 { + if yyb3010 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38607,13 +38685,13 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Reason = string(r.DecodeString()) } - yyj3001++ - if yyhl3001 { - yyb3001 = yyj3001 > l + yyj3010++ + if yyhl3010 { + yyb3010 = yyj3010 > l } else { - yyb3001 = r.CheckBreak() + yyb3010 = r.CheckBreak() } - if yyb3001 { + if yyb3010 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38624,17 +38702,17 @@ func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Message = string(r.DecodeString()) } for { - yyj3001++ - if yyhl3001 { - yyb3001 = yyj3001 > l + yyj3010++ + if yyhl3010 { + yyb3010 = yyj3010 > l } else { - yyb3001 = r.CheckBreak() + yyb3010 = r.CheckBreak() } - if yyb3001 { + if yyb3010 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3001-1, "") + z.DecStructFieldNotFound(yyj3010-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -38643,8 +38721,8 @@ func (x NodeAddressType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym3010 := z.EncBinary() - _ = yym3010 + yym3019 := z.EncBinary() + _ = yym3019 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -38656,8 +38734,8 @@ func (x *NodeAddressType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3011 := z.DecBinary() - _ = yym3011 + yym3020 := z.DecBinary() + _ = yym3020 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -38672,30 +38750,30 @@ func (x *NodeAddress) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3012 := z.EncBinary() - _ = yym3012 + yym3021 := z.EncBinary() + _ = yym3021 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3013 := !z.EncBinary() - yy2arr3013 := z.EncBasicHandle().StructToArray - var yyq3013 [2]bool - _, _, _ = yysep3013, yyq3013, yy2arr3013 - const yyr3013 bool = false - var yynn3013 int - if yyr3013 || yy2arr3013 { + yysep3022 := !z.EncBinary() + yy2arr3022 := z.EncBasicHandle().StructToArray + var yyq3022 [2]bool + _, _, _ = yysep3022, yyq3022, yy2arr3022 + const yyr3022 bool = false + var yynn3022 int + if yyr3022 || yy2arr3022 { r.EncodeArrayStart(2) } else { - yynn3013 = 2 - for _, b := range yyq3013 { + yynn3022 = 2 + for _, b := range yyq3022 { if b { - yynn3013++ + yynn3022++ } } - r.EncodeMapStart(yynn3013) - yynn3013 = 0 + r.EncodeMapStart(yynn3022) + yynn3022 = 0 } - if yyr3013 || yy2arr3013 { + if yyr3022 || yy2arr3022 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Type.CodecEncodeSelf(e) } else { @@ -38704,10 +38782,10 @@ func (x *NodeAddress) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } - if yyr3013 || yy2arr3013 { + if yyr3022 || yy2arr3022 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3016 := z.EncBinary() - _ = yym3016 + yym3025 := z.EncBinary() + _ = yym3025 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Address)) @@ -38716,14 +38794,14 @@ func (x *NodeAddress) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("address")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3017 := z.EncBinary() - _ = yym3017 + yym3026 := z.EncBinary() + _ = yym3026 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Address)) } } - if yyr3013 || yy2arr3013 { + if yyr3022 || yy2arr3022 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -38736,25 +38814,25 @@ func (x *NodeAddress) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3018 := z.DecBinary() - _ = yym3018 + yym3027 := z.DecBinary() + _ = yym3027 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3019 := r.ContainerType() - if yyct3019 == codecSelferValueTypeMap1234 { - yyl3019 := r.ReadMapStart() - if yyl3019 == 0 { + yyct3028 := r.ContainerType() + if yyct3028 == codecSelferValueTypeMap1234 { + yyl3028 := r.ReadMapStart() + if yyl3028 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3019, d) + x.codecDecodeSelfFromMap(yyl3028, d) } - } else if yyct3019 == codecSelferValueTypeArray1234 { - yyl3019 := r.ReadArrayStart() - if yyl3019 == 0 { + } else if yyct3028 == codecSelferValueTypeArray1234 { + yyl3028 := r.ReadArrayStart() + if yyl3028 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3019, d) + x.codecDecodeSelfFromArray(yyl3028, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -38766,12 +38844,12 @@ func (x *NodeAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3020Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3020Slc - var yyhl3020 bool = l >= 0 - for yyj3020 := 0; ; yyj3020++ { - if yyhl3020 { - if yyj3020 >= l { + var yys3029Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3029Slc + var yyhl3029 bool = l >= 0 + for yyj3029 := 0; ; yyj3029++ { + if yyhl3029 { + if yyj3029 >= l { break } } else { @@ -38780,10 +38858,10 @@ func (x *NodeAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3020Slc = r.DecodeBytes(yys3020Slc, true, true) - yys3020 := string(yys3020Slc) + yys3029Slc = r.DecodeBytes(yys3029Slc, true, true) + yys3029 := string(yys3029Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3020 { + switch yys3029 { case "type": if r.TryDecodeAsNil() { x.Type = "" @@ -38797,9 +38875,9 @@ func (x *NodeAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Address = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3020) - } // end switch yys3020 - } // end for yyj3020 + z.DecStructFieldNotFound(-1, yys3029) + } // end switch yys3029 + } // end for yyj3029 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -38807,16 +38885,16 @@ func (x *NodeAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3023 int - var yyb3023 bool - var yyhl3023 bool = l >= 0 - yyj3023++ - if yyhl3023 { - yyb3023 = yyj3023 > l + var yyj3032 int + var yyb3032 bool + var yyhl3032 bool = l >= 0 + yyj3032++ + if yyhl3032 { + yyb3032 = yyj3032 > l } else { - yyb3023 = r.CheckBreak() + yyb3032 = r.CheckBreak() } - if yyb3023 { + if yyb3032 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38826,13 +38904,13 @@ func (x *NodeAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Type = NodeAddressType(r.DecodeString()) } - yyj3023++ - if yyhl3023 { - yyb3023 = yyj3023 > l + yyj3032++ + if yyhl3032 { + yyb3032 = yyj3032 > l } else { - yyb3023 = r.CheckBreak() + yyb3032 = r.CheckBreak() } - if yyb3023 { + if yyb3032 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38843,17 +38921,17 @@ func (x *NodeAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Address = string(r.DecodeString()) } for { - yyj3023++ - if yyhl3023 { - yyb3023 = yyj3023 > l + yyj3032++ + if yyhl3032 { + yyb3032 = yyj3032 > l } else { - yyb3023 = r.CheckBreak() + yyb3032 = r.CheckBreak() } - if yyb3023 { + if yyb3032 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3023-1, "") + z.DecStructFieldNotFound(yyj3032-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -38862,8 +38940,8 @@ func (x ResourceName) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym3026 := z.EncBinary() - _ = yym3026 + yym3035 := z.EncBinary() + _ = yym3035 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -38875,8 +38953,8 @@ func (x *ResourceName) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3027 := z.DecBinary() - _ = yym3027 + yym3036 := z.DecBinary() + _ = yym3036 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -38891,8 +38969,8 @@ func (x ResourceList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3028 := z.EncBinary() - _ = yym3028 + yym3037 := z.EncBinary() + _ = yym3037 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -38905,8 +38983,8 @@ func (x *ResourceList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3029 := z.DecBinary() - _ = yym3029 + yym3038 := z.DecBinary() + _ = yym3038 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -38921,39 +38999,39 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3030 := z.EncBinary() - _ = yym3030 + yym3039 := z.EncBinary() + _ = yym3039 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3031 := !z.EncBinary() - yy2arr3031 := z.EncBasicHandle().StructToArray - var yyq3031 [5]bool - _, _, _ = yysep3031, yyq3031, yy2arr3031 - const yyr3031 bool = false - yyq3031[0] = x.Kind != "" - yyq3031[1] = x.APIVersion != "" - yyq3031[2] = true - yyq3031[3] = true - yyq3031[4] = true - var yynn3031 int - if yyr3031 || yy2arr3031 { + yysep3040 := !z.EncBinary() + yy2arr3040 := z.EncBasicHandle().StructToArray + var yyq3040 [5]bool + _, _, _ = yysep3040, yyq3040, yy2arr3040 + const yyr3040 bool = false + yyq3040[0] = x.Kind != "" + yyq3040[1] = x.APIVersion != "" + yyq3040[2] = true + yyq3040[3] = true + yyq3040[4] = true + var yynn3040 int + if yyr3040 || yy2arr3040 { r.EncodeArrayStart(5) } else { - yynn3031 = 0 - for _, b := range yyq3031 { + yynn3040 = 0 + for _, b := range yyq3040 { if b { - yynn3031++ + yynn3040++ } } - r.EncodeMapStart(yynn3031) - yynn3031 = 0 + r.EncodeMapStart(yynn3040) + yynn3040 = 0 } - if yyr3031 || yy2arr3031 { + if yyr3040 || yy2arr3040 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3031[0] { - yym3033 := z.EncBinary() - _ = yym3033 + if yyq3040[0] { + yym3042 := z.EncBinary() + _ = yym3042 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -38962,23 +39040,23 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3031[0] { + if yyq3040[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3034 := z.EncBinary() - _ = yym3034 + yym3043 := z.EncBinary() + _ = yym3043 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3031 || yy2arr3031 { + if yyr3040 || yy2arr3040 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3031[1] { - yym3036 := z.EncBinary() - _ = yym3036 + if yyq3040[1] { + yym3045 := z.EncBinary() + _ = yym3045 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -38987,70 +39065,70 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3031[1] { + if yyq3040[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3037 := z.EncBinary() - _ = yym3037 + yym3046 := z.EncBinary() + _ = yym3046 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3031 || yy2arr3031 { + if yyr3040 || yy2arr3040 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3031[2] { - yy3039 := &x.ObjectMeta - yy3039.CodecEncodeSelf(e) + if yyq3040[2] { + yy3048 := &x.ObjectMeta + yy3048.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3031[2] { + if yyq3040[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3040 := &x.ObjectMeta - yy3040.CodecEncodeSelf(e) + yy3049 := &x.ObjectMeta + yy3049.CodecEncodeSelf(e) } } - if yyr3031 || yy2arr3031 { + if yyr3040 || yy2arr3040 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3031[3] { - yy3042 := &x.Spec - yy3042.CodecEncodeSelf(e) + if yyq3040[3] { + yy3051 := &x.Spec + yy3051.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3031[3] { + if yyq3040[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3043 := &x.Spec - yy3043.CodecEncodeSelf(e) + yy3052 := &x.Spec + yy3052.CodecEncodeSelf(e) } } - if yyr3031 || yy2arr3031 { + if yyr3040 || yy2arr3040 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3031[4] { - yy3045 := &x.Status - yy3045.CodecEncodeSelf(e) + if yyq3040[4] { + yy3054 := &x.Status + yy3054.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3031[4] { + if yyq3040[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3046 := &x.Status - yy3046.CodecEncodeSelf(e) + yy3055 := &x.Status + yy3055.CodecEncodeSelf(e) } } - if yyr3031 || yy2arr3031 { + if yyr3040 || yy2arr3040 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -39063,25 +39141,25 @@ func (x *Node) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3047 := z.DecBinary() - _ = yym3047 + yym3056 := z.DecBinary() + _ = yym3056 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3048 := r.ContainerType() - if yyct3048 == codecSelferValueTypeMap1234 { - yyl3048 := r.ReadMapStart() - if yyl3048 == 0 { + yyct3057 := r.ContainerType() + if yyct3057 == codecSelferValueTypeMap1234 { + yyl3057 := r.ReadMapStart() + if yyl3057 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3048, d) + x.codecDecodeSelfFromMap(yyl3057, d) } - } else if yyct3048 == codecSelferValueTypeArray1234 { - yyl3048 := r.ReadArrayStart() - if yyl3048 == 0 { + } else if yyct3057 == codecSelferValueTypeArray1234 { + yyl3057 := r.ReadArrayStart() + if yyl3057 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3048, d) + x.codecDecodeSelfFromArray(yyl3057, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -39093,12 +39171,12 @@ func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3049Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3049Slc - var yyhl3049 bool = l >= 0 - for yyj3049 := 0; ; yyj3049++ { - if yyhl3049 { - if yyj3049 >= l { + var yys3058Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3058Slc + var yyhl3058 bool = l >= 0 + for yyj3058 := 0; ; yyj3058++ { + if yyhl3058 { + if yyj3058 >= l { break } } else { @@ -39107,10 +39185,10 @@ func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3049Slc = r.DecodeBytes(yys3049Slc, true, true) - yys3049 := string(yys3049Slc) + yys3058Slc = r.DecodeBytes(yys3058Slc, true, true) + yys3058 := string(yys3058Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3049 { + switch yys3058 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -39127,27 +39205,27 @@ func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3052 := &x.ObjectMeta - yyv3052.CodecDecodeSelf(d) + yyv3061 := &x.ObjectMeta + yyv3061.CodecDecodeSelf(d) } case "spec": if r.TryDecodeAsNil() { x.Spec = NodeSpec{} } else { - yyv3053 := &x.Spec - yyv3053.CodecDecodeSelf(d) + yyv3062 := &x.Spec + yyv3062.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = NodeStatus{} } else { - yyv3054 := &x.Status - yyv3054.CodecDecodeSelf(d) + yyv3063 := &x.Status + yyv3063.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3049) - } // end switch yys3049 - } // end for yyj3049 + z.DecStructFieldNotFound(-1, yys3058) + } // end switch yys3058 + } // end for yyj3058 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -39155,16 +39233,16 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3055 int - var yyb3055 bool - var yyhl3055 bool = l >= 0 - yyj3055++ - if yyhl3055 { - yyb3055 = yyj3055 > l + var yyj3064 int + var yyb3064 bool + var yyhl3064 bool = l >= 0 + yyj3064++ + if yyhl3064 { + yyb3064 = yyj3064 > l } else { - yyb3055 = r.CheckBreak() + yyb3064 = r.CheckBreak() } - if yyb3055 { + if yyb3064 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39174,13 +39252,13 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3055++ - if yyhl3055 { - yyb3055 = yyj3055 > l + yyj3064++ + if yyhl3064 { + yyb3064 = yyj3064 > l } else { - yyb3055 = r.CheckBreak() + yyb3064 = r.CheckBreak() } - if yyb3055 { + if yyb3064 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39190,13 +39268,13 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3055++ - if yyhl3055 { - yyb3055 = yyj3055 > l + yyj3064++ + if yyhl3064 { + yyb3064 = yyj3064 > l } else { - yyb3055 = r.CheckBreak() + yyb3064 = r.CheckBreak() } - if yyb3055 { + if yyb3064 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39204,16 +39282,16 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3058 := &x.ObjectMeta - yyv3058.CodecDecodeSelf(d) + yyv3067 := &x.ObjectMeta + yyv3067.CodecDecodeSelf(d) } - yyj3055++ - if yyhl3055 { - yyb3055 = yyj3055 > l + yyj3064++ + if yyhl3064 { + yyb3064 = yyj3064 > l } else { - yyb3055 = r.CheckBreak() + yyb3064 = r.CheckBreak() } - if yyb3055 { + if yyb3064 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39221,16 +39299,16 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = NodeSpec{} } else { - yyv3059 := &x.Spec - yyv3059.CodecDecodeSelf(d) + yyv3068 := &x.Spec + yyv3068.CodecDecodeSelf(d) } - yyj3055++ - if yyhl3055 { - yyb3055 = yyj3055 > l + yyj3064++ + if yyhl3064 { + yyb3064 = yyj3064 > l } else { - yyb3055 = r.CheckBreak() + yyb3064 = r.CheckBreak() } - if yyb3055 { + if yyb3064 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39238,21 +39316,21 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = NodeStatus{} } else { - yyv3060 := &x.Status - yyv3060.CodecDecodeSelf(d) + yyv3069 := &x.Status + yyv3069.CodecDecodeSelf(d) } for { - yyj3055++ - if yyhl3055 { - yyb3055 = yyj3055 > l + yyj3064++ + if yyhl3064 { + yyb3064 = yyj3064 > l } else { - yyb3055 = r.CheckBreak() + yyb3064 = r.CheckBreak() } - if yyb3055 { + if yyb3064 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3055-1, "") + z.DecStructFieldNotFound(yyj3064-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -39264,37 +39342,37 @@ func (x *NodeList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3061 := z.EncBinary() - _ = yym3061 + yym3070 := z.EncBinary() + _ = yym3070 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3062 := !z.EncBinary() - yy2arr3062 := z.EncBasicHandle().StructToArray - var yyq3062 [4]bool - _, _, _ = yysep3062, yyq3062, yy2arr3062 - const yyr3062 bool = false - yyq3062[0] = x.Kind != "" - yyq3062[1] = x.APIVersion != "" - yyq3062[2] = true - var yynn3062 int - if yyr3062 || yy2arr3062 { + yysep3071 := !z.EncBinary() + yy2arr3071 := z.EncBasicHandle().StructToArray + var yyq3071 [4]bool + _, _, _ = yysep3071, yyq3071, yy2arr3071 + const yyr3071 bool = false + yyq3071[0] = x.Kind != "" + yyq3071[1] = x.APIVersion != "" + yyq3071[2] = true + var yynn3071 int + if yyr3071 || yy2arr3071 { r.EncodeArrayStart(4) } else { - yynn3062 = 1 - for _, b := range yyq3062 { + yynn3071 = 1 + for _, b := range yyq3071 { if b { - yynn3062++ + yynn3071++ } } - r.EncodeMapStart(yynn3062) - yynn3062 = 0 + r.EncodeMapStart(yynn3071) + yynn3071 = 0 } - if yyr3062 || yy2arr3062 { + if yyr3071 || yy2arr3071 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3062[0] { - yym3064 := z.EncBinary() - _ = yym3064 + if yyq3071[0] { + yym3073 := z.EncBinary() + _ = yym3073 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -39303,23 +39381,23 @@ func (x *NodeList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3062[0] { + if yyq3071[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3065 := z.EncBinary() - _ = yym3065 + yym3074 := z.EncBinary() + _ = yym3074 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3062 || yy2arr3062 { + if yyr3071 || yy2arr3071 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3062[1] { - yym3067 := z.EncBinary() - _ = yym3067 + if yyq3071[1] { + yym3076 := z.EncBinary() + _ = yym3076 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -39328,54 +39406,54 @@ func (x *NodeList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3062[1] { + if yyq3071[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3068 := z.EncBinary() - _ = yym3068 + yym3077 := z.EncBinary() + _ = yym3077 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3062 || yy2arr3062 { + if yyr3071 || yy2arr3071 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3062[2] { - yy3070 := &x.ListMeta - yym3071 := z.EncBinary() - _ = yym3071 + if yyq3071[2] { + yy3079 := &x.ListMeta + yym3080 := z.EncBinary() + _ = yym3080 if false { - } else if z.HasExtensions() && z.EncExt(yy3070) { + } else if z.HasExtensions() && z.EncExt(yy3079) { } else { - z.EncFallback(yy3070) + z.EncFallback(yy3079) } } else { r.EncodeNil() } } else { - if yyq3062[2] { + if yyq3071[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3072 := &x.ListMeta - yym3073 := z.EncBinary() - _ = yym3073 + yy3081 := &x.ListMeta + yym3082 := z.EncBinary() + _ = yym3082 if false { - } else if z.HasExtensions() && z.EncExt(yy3072) { + } else if z.HasExtensions() && z.EncExt(yy3081) { } else { - z.EncFallback(yy3072) + z.EncFallback(yy3081) } } } - if yyr3062 || yy2arr3062 { + if yyr3071 || yy2arr3071 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym3075 := z.EncBinary() - _ = yym3075 + yym3084 := z.EncBinary() + _ = yym3084 if false { } else { h.encSliceNode(([]Node)(x.Items), e) @@ -39388,15 +39466,15 @@ func (x *NodeList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym3076 := z.EncBinary() - _ = yym3076 + yym3085 := z.EncBinary() + _ = yym3085 if false { } else { h.encSliceNode(([]Node)(x.Items), e) } } } - if yyr3062 || yy2arr3062 { + if yyr3071 || yy2arr3071 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -39409,25 +39487,25 @@ func (x *NodeList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3077 := z.DecBinary() - _ = yym3077 + yym3086 := z.DecBinary() + _ = yym3086 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3078 := r.ContainerType() - if yyct3078 == codecSelferValueTypeMap1234 { - yyl3078 := r.ReadMapStart() - if yyl3078 == 0 { + yyct3087 := r.ContainerType() + if yyct3087 == codecSelferValueTypeMap1234 { + yyl3087 := r.ReadMapStart() + if yyl3087 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3078, d) + x.codecDecodeSelfFromMap(yyl3087, d) } - } else if yyct3078 == codecSelferValueTypeArray1234 { - yyl3078 := r.ReadArrayStart() - if yyl3078 == 0 { + } else if yyct3087 == codecSelferValueTypeArray1234 { + yyl3087 := r.ReadArrayStart() + if yyl3087 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3078, d) + x.codecDecodeSelfFromArray(yyl3087, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -39439,12 +39517,12 @@ func (x *NodeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3079Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3079Slc - var yyhl3079 bool = l >= 0 - for yyj3079 := 0; ; yyj3079++ { - if yyhl3079 { - if yyj3079 >= l { + var yys3088Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3088Slc + var yyhl3088 bool = l >= 0 + for yyj3088 := 0; ; yyj3088++ { + if yyhl3088 { + if yyj3088 >= l { break } } else { @@ -39453,10 +39531,10 @@ func (x *NodeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3079Slc = r.DecodeBytes(yys3079Slc, true, true) - yys3079 := string(yys3079Slc) + yys3088Slc = r.DecodeBytes(yys3088Slc, true, true) + yys3088 := string(yys3088Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3079 { + switch yys3088 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -39473,31 +39551,31 @@ func (x *NodeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3082 := &x.ListMeta - yym3083 := z.DecBinary() - _ = yym3083 + yyv3091 := &x.ListMeta + yym3092 := z.DecBinary() + _ = yym3092 if false { - } else if z.HasExtensions() && z.DecExt(yyv3082) { + } else if z.HasExtensions() && z.DecExt(yyv3091) { } else { - z.DecFallback(yyv3082, false) + z.DecFallback(yyv3091, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3084 := &x.Items - yym3085 := z.DecBinary() - _ = yym3085 + yyv3093 := &x.Items + yym3094 := z.DecBinary() + _ = yym3094 if false { } else { - h.decSliceNode((*[]Node)(yyv3084), d) + h.decSliceNode((*[]Node)(yyv3093), d) } } default: - z.DecStructFieldNotFound(-1, yys3079) - } // end switch yys3079 - } // end for yyj3079 + z.DecStructFieldNotFound(-1, yys3088) + } // end switch yys3088 + } // end for yyj3088 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -39505,16 +39583,16 @@ func (x *NodeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3086 int - var yyb3086 bool - var yyhl3086 bool = l >= 0 - yyj3086++ - if yyhl3086 { - yyb3086 = yyj3086 > l + var yyj3095 int + var yyb3095 bool + var yyhl3095 bool = l >= 0 + yyj3095++ + if yyhl3095 { + yyb3095 = yyj3095 > l } else { - yyb3086 = r.CheckBreak() + yyb3095 = r.CheckBreak() } - if yyb3086 { + if yyb3095 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39524,13 +39602,13 @@ func (x *NodeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3086++ - if yyhl3086 { - yyb3086 = yyj3086 > l + yyj3095++ + if yyhl3095 { + yyb3095 = yyj3095 > l } else { - yyb3086 = r.CheckBreak() + yyb3095 = r.CheckBreak() } - if yyb3086 { + if yyb3095 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39540,13 +39618,13 @@ func (x *NodeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3086++ - if yyhl3086 { - yyb3086 = yyj3086 > l + yyj3095++ + if yyhl3095 { + yyb3095 = yyj3095 > l } else { - yyb3086 = r.CheckBreak() + yyb3095 = r.CheckBreak() } - if yyb3086 { + if yyb3095 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39554,22 +39632,22 @@ func (x *NodeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3089 := &x.ListMeta - yym3090 := z.DecBinary() - _ = yym3090 + yyv3098 := &x.ListMeta + yym3099 := z.DecBinary() + _ = yym3099 if false { - } else if z.HasExtensions() && z.DecExt(yyv3089) { + } else if z.HasExtensions() && z.DecExt(yyv3098) { } else { - z.DecFallback(yyv3089, false) + z.DecFallback(yyv3098, false) } } - yyj3086++ - if yyhl3086 { - yyb3086 = yyj3086 > l + yyj3095++ + if yyhl3095 { + yyb3095 = yyj3095 > l } else { - yyb3086 = r.CheckBreak() + yyb3095 = r.CheckBreak() } - if yyb3086 { + if yyb3095 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39577,26 +39655,26 @@ func (x *NodeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3091 := &x.Items - yym3092 := z.DecBinary() - _ = yym3092 + yyv3100 := &x.Items + yym3101 := z.DecBinary() + _ = yym3101 if false { } else { - h.decSliceNode((*[]Node)(yyv3091), d) + h.decSliceNode((*[]Node)(yyv3100), d) } } for { - yyj3086++ - if yyhl3086 { - yyb3086 = yyj3086 > l + yyj3095++ + if yyhl3095 { + yyb3095 = yyj3095 > l } else { - yyb3086 = r.CheckBreak() + yyb3095 = r.CheckBreak() } - if yyb3086 { + if yyb3095 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3086-1, "") + z.DecStructFieldNotFound(yyj3095-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -39605,8 +39683,8 @@ func (x FinalizerName) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym3093 := z.EncBinary() - _ = yym3093 + yym3102 := z.EncBinary() + _ = yym3102 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -39618,8 +39696,8 @@ func (x *FinalizerName) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3094 := z.DecBinary() - _ = yym3094 + yym3103 := z.DecBinary() + _ = yym3103 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -39634,38 +39712,38 @@ func (x *NamespaceSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3095 := z.EncBinary() - _ = yym3095 + yym3104 := z.EncBinary() + _ = yym3104 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3096 := !z.EncBinary() - yy2arr3096 := z.EncBasicHandle().StructToArray - var yyq3096 [1]bool - _, _, _ = yysep3096, yyq3096, yy2arr3096 - const yyr3096 bool = false - yyq3096[0] = len(x.Finalizers) != 0 - var yynn3096 int - if yyr3096 || yy2arr3096 { + yysep3105 := !z.EncBinary() + yy2arr3105 := z.EncBasicHandle().StructToArray + var yyq3105 [1]bool + _, _, _ = yysep3105, yyq3105, yy2arr3105 + const yyr3105 bool = false + yyq3105[0] = len(x.Finalizers) != 0 + var yynn3105 int + if yyr3105 || yy2arr3105 { r.EncodeArrayStart(1) } else { - yynn3096 = 0 - for _, b := range yyq3096 { + yynn3105 = 0 + for _, b := range yyq3105 { if b { - yynn3096++ + yynn3105++ } } - r.EncodeMapStart(yynn3096) - yynn3096 = 0 + r.EncodeMapStart(yynn3105) + yynn3105 = 0 } - if yyr3096 || yy2arr3096 { + if yyr3105 || yy2arr3105 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3096[0] { + if yyq3105[0] { if x.Finalizers == nil { r.EncodeNil() } else { - yym3098 := z.EncBinary() - _ = yym3098 + yym3107 := z.EncBinary() + _ = yym3107 if false { } else { h.encSliceFinalizerName(([]FinalizerName)(x.Finalizers), e) @@ -39675,15 +39753,15 @@ func (x *NamespaceSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3096[0] { + if yyq3105[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("finalizers")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Finalizers == nil { r.EncodeNil() } else { - yym3099 := z.EncBinary() - _ = yym3099 + yym3108 := z.EncBinary() + _ = yym3108 if false { } else { h.encSliceFinalizerName(([]FinalizerName)(x.Finalizers), e) @@ -39691,7 +39769,7 @@ func (x *NamespaceSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3096 || yy2arr3096 { + if yyr3105 || yy2arr3105 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -39704,25 +39782,25 @@ func (x *NamespaceSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3100 := z.DecBinary() - _ = yym3100 + yym3109 := z.DecBinary() + _ = yym3109 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3101 := r.ContainerType() - if yyct3101 == codecSelferValueTypeMap1234 { - yyl3101 := r.ReadMapStart() - if yyl3101 == 0 { + yyct3110 := r.ContainerType() + if yyct3110 == codecSelferValueTypeMap1234 { + yyl3110 := r.ReadMapStart() + if yyl3110 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3101, d) + x.codecDecodeSelfFromMap(yyl3110, d) } - } else if yyct3101 == codecSelferValueTypeArray1234 { - yyl3101 := r.ReadArrayStart() - if yyl3101 == 0 { + } else if yyct3110 == codecSelferValueTypeArray1234 { + yyl3110 := r.ReadArrayStart() + if yyl3110 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3101, d) + x.codecDecodeSelfFromArray(yyl3110, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -39734,12 +39812,12 @@ func (x *NamespaceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3102Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3102Slc - var yyhl3102 bool = l >= 0 - for yyj3102 := 0; ; yyj3102++ { - if yyhl3102 { - if yyj3102 >= l { + var yys3111Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3111Slc + var yyhl3111 bool = l >= 0 + for yyj3111 := 0; ; yyj3111++ { + if yyhl3111 { + if yyj3111 >= l { break } } else { @@ -39748,26 +39826,26 @@ func (x *NamespaceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3102Slc = r.DecodeBytes(yys3102Slc, true, true) - yys3102 := string(yys3102Slc) + yys3111Slc = r.DecodeBytes(yys3111Slc, true, true) + yys3111 := string(yys3111Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3102 { + switch yys3111 { case "finalizers": if r.TryDecodeAsNil() { x.Finalizers = nil } else { - yyv3103 := &x.Finalizers - yym3104 := z.DecBinary() - _ = yym3104 + yyv3112 := &x.Finalizers + yym3113 := z.DecBinary() + _ = yym3113 if false { } else { - h.decSliceFinalizerName((*[]FinalizerName)(yyv3103), d) + h.decSliceFinalizerName((*[]FinalizerName)(yyv3112), d) } } default: - z.DecStructFieldNotFound(-1, yys3102) - } // end switch yys3102 - } // end for yyj3102 + z.DecStructFieldNotFound(-1, yys3111) + } // end switch yys3111 + } // end for yyj3111 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -39775,16 +39853,16 @@ func (x *NamespaceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3105 int - var yyb3105 bool - var yyhl3105 bool = l >= 0 - yyj3105++ - if yyhl3105 { - yyb3105 = yyj3105 > l + var yyj3114 int + var yyb3114 bool + var yyhl3114 bool = l >= 0 + yyj3114++ + if yyhl3114 { + yyb3114 = yyj3114 > l } else { - yyb3105 = r.CheckBreak() + yyb3114 = r.CheckBreak() } - if yyb3105 { + if yyb3114 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39792,26 +39870,26 @@ func (x *NamespaceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Finalizers = nil } else { - yyv3106 := &x.Finalizers - yym3107 := z.DecBinary() - _ = yym3107 + yyv3115 := &x.Finalizers + yym3116 := z.DecBinary() + _ = yym3116 if false { } else { - h.decSliceFinalizerName((*[]FinalizerName)(yyv3106), d) + h.decSliceFinalizerName((*[]FinalizerName)(yyv3115), d) } } for { - yyj3105++ - if yyhl3105 { - yyb3105 = yyj3105 > l + yyj3114++ + if yyhl3114 { + yyb3114 = yyj3114 > l } else { - yyb3105 = r.CheckBreak() + yyb3114 = r.CheckBreak() } - if yyb3105 { + if yyb3114 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3105-1, "") + z.DecStructFieldNotFound(yyj3114-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -39823,46 +39901,46 @@ func (x *NamespaceStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3108 := z.EncBinary() - _ = yym3108 + yym3117 := z.EncBinary() + _ = yym3117 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3109 := !z.EncBinary() - yy2arr3109 := z.EncBasicHandle().StructToArray - var yyq3109 [1]bool - _, _, _ = yysep3109, yyq3109, yy2arr3109 - const yyr3109 bool = false - yyq3109[0] = x.Phase != "" - var yynn3109 int - if yyr3109 || yy2arr3109 { + yysep3118 := !z.EncBinary() + yy2arr3118 := z.EncBasicHandle().StructToArray + var yyq3118 [1]bool + _, _, _ = yysep3118, yyq3118, yy2arr3118 + const yyr3118 bool = false + yyq3118[0] = x.Phase != "" + var yynn3118 int + if yyr3118 || yy2arr3118 { r.EncodeArrayStart(1) } else { - yynn3109 = 0 - for _, b := range yyq3109 { + yynn3118 = 0 + for _, b := range yyq3118 { if b { - yynn3109++ + yynn3118++ } } - r.EncodeMapStart(yynn3109) - yynn3109 = 0 + r.EncodeMapStart(yynn3118) + yynn3118 = 0 } - if yyr3109 || yy2arr3109 { + if yyr3118 || yy2arr3118 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3109[0] { + if yyq3118[0] { x.Phase.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3109[0] { + if yyq3118[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("phase")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Phase.CodecEncodeSelf(e) } } - if yyr3109 || yy2arr3109 { + if yyr3118 || yy2arr3118 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -39875,25 +39953,25 @@ func (x *NamespaceStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3111 := z.DecBinary() - _ = yym3111 + yym3120 := z.DecBinary() + _ = yym3120 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3112 := r.ContainerType() - if yyct3112 == codecSelferValueTypeMap1234 { - yyl3112 := r.ReadMapStart() - if yyl3112 == 0 { + yyct3121 := r.ContainerType() + if yyct3121 == codecSelferValueTypeMap1234 { + yyl3121 := r.ReadMapStart() + if yyl3121 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3112, d) + x.codecDecodeSelfFromMap(yyl3121, d) } - } else if yyct3112 == codecSelferValueTypeArray1234 { - yyl3112 := r.ReadArrayStart() - if yyl3112 == 0 { + } else if yyct3121 == codecSelferValueTypeArray1234 { + yyl3121 := r.ReadArrayStart() + if yyl3121 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3112, d) + x.codecDecodeSelfFromArray(yyl3121, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -39905,12 +39983,12 @@ func (x *NamespaceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3113Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3113Slc - var yyhl3113 bool = l >= 0 - for yyj3113 := 0; ; yyj3113++ { - if yyhl3113 { - if yyj3113 >= l { + var yys3122Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3122Slc + var yyhl3122 bool = l >= 0 + for yyj3122 := 0; ; yyj3122++ { + if yyhl3122 { + if yyj3122 >= l { break } } else { @@ -39919,10 +39997,10 @@ func (x *NamespaceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3113Slc = r.DecodeBytes(yys3113Slc, true, true) - yys3113 := string(yys3113Slc) + yys3122Slc = r.DecodeBytes(yys3122Slc, true, true) + yys3122 := string(yys3122Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3113 { + switch yys3122 { case "phase": if r.TryDecodeAsNil() { x.Phase = "" @@ -39930,9 +40008,9 @@ func (x *NamespaceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Phase = NamespacePhase(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3113) - } // end switch yys3113 - } // end for yyj3113 + z.DecStructFieldNotFound(-1, yys3122) + } // end switch yys3122 + } // end for yyj3122 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -39940,16 +40018,16 @@ func (x *NamespaceStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3115 int - var yyb3115 bool - var yyhl3115 bool = l >= 0 - yyj3115++ - if yyhl3115 { - yyb3115 = yyj3115 > l + var yyj3124 int + var yyb3124 bool + var yyhl3124 bool = l >= 0 + yyj3124++ + if yyhl3124 { + yyb3124 = yyj3124 > l } else { - yyb3115 = r.CheckBreak() + yyb3124 = r.CheckBreak() } - if yyb3115 { + if yyb3124 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39960,17 +40038,17 @@ func (x *NamespaceStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) x.Phase = NamespacePhase(r.DecodeString()) } for { - yyj3115++ - if yyhl3115 { - yyb3115 = yyj3115 > l + yyj3124++ + if yyhl3124 { + yyb3124 = yyj3124 > l } else { - yyb3115 = r.CheckBreak() + yyb3124 = r.CheckBreak() } - if yyb3115 { + if yyb3124 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3115-1, "") + z.DecStructFieldNotFound(yyj3124-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -39979,8 +40057,8 @@ func (x NamespacePhase) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym3117 := z.EncBinary() - _ = yym3117 + yym3126 := z.EncBinary() + _ = yym3126 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -39992,8 +40070,8 @@ func (x *NamespacePhase) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3118 := z.DecBinary() - _ = yym3118 + yym3127 := z.DecBinary() + _ = yym3127 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -40008,39 +40086,39 @@ func (x *Namespace) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3119 := z.EncBinary() - _ = yym3119 + yym3128 := z.EncBinary() + _ = yym3128 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3120 := !z.EncBinary() - yy2arr3120 := z.EncBasicHandle().StructToArray - var yyq3120 [5]bool - _, _, _ = yysep3120, yyq3120, yy2arr3120 - const yyr3120 bool = false - yyq3120[0] = x.Kind != "" - yyq3120[1] = x.APIVersion != "" - yyq3120[2] = true - yyq3120[3] = true - yyq3120[4] = true - var yynn3120 int - if yyr3120 || yy2arr3120 { + yysep3129 := !z.EncBinary() + yy2arr3129 := z.EncBasicHandle().StructToArray + var yyq3129 [5]bool + _, _, _ = yysep3129, yyq3129, yy2arr3129 + const yyr3129 bool = false + yyq3129[0] = x.Kind != "" + yyq3129[1] = x.APIVersion != "" + yyq3129[2] = true + yyq3129[3] = true + yyq3129[4] = true + var yynn3129 int + if yyr3129 || yy2arr3129 { r.EncodeArrayStart(5) } else { - yynn3120 = 0 - for _, b := range yyq3120 { + yynn3129 = 0 + for _, b := range yyq3129 { if b { - yynn3120++ + yynn3129++ } } - r.EncodeMapStart(yynn3120) - yynn3120 = 0 + r.EncodeMapStart(yynn3129) + yynn3129 = 0 } - if yyr3120 || yy2arr3120 { + if yyr3129 || yy2arr3129 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3120[0] { - yym3122 := z.EncBinary() - _ = yym3122 + if yyq3129[0] { + yym3131 := z.EncBinary() + _ = yym3131 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -40049,23 +40127,23 @@ func (x *Namespace) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3120[0] { + if yyq3129[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3123 := z.EncBinary() - _ = yym3123 + yym3132 := z.EncBinary() + _ = yym3132 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3120 || yy2arr3120 { + if yyr3129 || yy2arr3129 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3120[1] { - yym3125 := z.EncBinary() - _ = yym3125 + if yyq3129[1] { + yym3134 := z.EncBinary() + _ = yym3134 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -40074,70 +40152,70 @@ func (x *Namespace) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3120[1] { + if yyq3129[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3126 := z.EncBinary() - _ = yym3126 + yym3135 := z.EncBinary() + _ = yym3135 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3120 || yy2arr3120 { + if yyr3129 || yy2arr3129 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3120[2] { - yy3128 := &x.ObjectMeta - yy3128.CodecEncodeSelf(e) + if yyq3129[2] { + yy3137 := &x.ObjectMeta + yy3137.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3120[2] { + if yyq3129[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3129 := &x.ObjectMeta - yy3129.CodecEncodeSelf(e) + yy3138 := &x.ObjectMeta + yy3138.CodecEncodeSelf(e) } } - if yyr3120 || yy2arr3120 { + if yyr3129 || yy2arr3129 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3120[3] { - yy3131 := &x.Spec - yy3131.CodecEncodeSelf(e) + if yyq3129[3] { + yy3140 := &x.Spec + yy3140.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3120[3] { + if yyq3129[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3132 := &x.Spec - yy3132.CodecEncodeSelf(e) + yy3141 := &x.Spec + yy3141.CodecEncodeSelf(e) } } - if yyr3120 || yy2arr3120 { + if yyr3129 || yy2arr3129 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3120[4] { - yy3134 := &x.Status - yy3134.CodecEncodeSelf(e) + if yyq3129[4] { + yy3143 := &x.Status + yy3143.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3120[4] { + if yyq3129[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3135 := &x.Status - yy3135.CodecEncodeSelf(e) + yy3144 := &x.Status + yy3144.CodecEncodeSelf(e) } } - if yyr3120 || yy2arr3120 { + if yyr3129 || yy2arr3129 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -40150,25 +40228,25 @@ func (x *Namespace) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3136 := z.DecBinary() - _ = yym3136 + yym3145 := z.DecBinary() + _ = yym3145 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3137 := r.ContainerType() - if yyct3137 == codecSelferValueTypeMap1234 { - yyl3137 := r.ReadMapStart() - if yyl3137 == 0 { + yyct3146 := r.ContainerType() + if yyct3146 == codecSelferValueTypeMap1234 { + yyl3146 := r.ReadMapStart() + if yyl3146 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3137, d) + x.codecDecodeSelfFromMap(yyl3146, d) } - } else if yyct3137 == codecSelferValueTypeArray1234 { - yyl3137 := r.ReadArrayStart() - if yyl3137 == 0 { + } else if yyct3146 == codecSelferValueTypeArray1234 { + yyl3146 := r.ReadArrayStart() + if yyl3146 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3137, d) + x.codecDecodeSelfFromArray(yyl3146, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -40180,12 +40258,12 @@ func (x *Namespace) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3138Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3138Slc - var yyhl3138 bool = l >= 0 - for yyj3138 := 0; ; yyj3138++ { - if yyhl3138 { - if yyj3138 >= l { + var yys3147Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3147Slc + var yyhl3147 bool = l >= 0 + for yyj3147 := 0; ; yyj3147++ { + if yyhl3147 { + if yyj3147 >= l { break } } else { @@ -40194,10 +40272,10 @@ func (x *Namespace) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3138Slc = r.DecodeBytes(yys3138Slc, true, true) - yys3138 := string(yys3138Slc) + yys3147Slc = r.DecodeBytes(yys3147Slc, true, true) + yys3147 := string(yys3147Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3138 { + switch yys3147 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -40214,27 +40292,27 @@ func (x *Namespace) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3141 := &x.ObjectMeta - yyv3141.CodecDecodeSelf(d) + yyv3150 := &x.ObjectMeta + yyv3150.CodecDecodeSelf(d) } case "spec": if r.TryDecodeAsNil() { x.Spec = NamespaceSpec{} } else { - yyv3142 := &x.Spec - yyv3142.CodecDecodeSelf(d) + yyv3151 := &x.Spec + yyv3151.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = NamespaceStatus{} } else { - yyv3143 := &x.Status - yyv3143.CodecDecodeSelf(d) + yyv3152 := &x.Status + yyv3152.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3138) - } // end switch yys3138 - } // end for yyj3138 + z.DecStructFieldNotFound(-1, yys3147) + } // end switch yys3147 + } // end for yyj3147 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -40242,16 +40320,16 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3144 int - var yyb3144 bool - var yyhl3144 bool = l >= 0 - yyj3144++ - if yyhl3144 { - yyb3144 = yyj3144 > l + var yyj3153 int + var yyb3153 bool + var yyhl3153 bool = l >= 0 + yyj3153++ + if yyhl3153 { + yyb3153 = yyj3153 > l } else { - yyb3144 = r.CheckBreak() + yyb3153 = r.CheckBreak() } - if yyb3144 { + if yyb3153 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40261,13 +40339,13 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3144++ - if yyhl3144 { - yyb3144 = yyj3144 > l + yyj3153++ + if yyhl3153 { + yyb3153 = yyj3153 > l } else { - yyb3144 = r.CheckBreak() + yyb3153 = r.CheckBreak() } - if yyb3144 { + if yyb3153 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40277,13 +40355,13 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3144++ - if yyhl3144 { - yyb3144 = yyj3144 > l + yyj3153++ + if yyhl3153 { + yyb3153 = yyj3153 > l } else { - yyb3144 = r.CheckBreak() + yyb3153 = r.CheckBreak() } - if yyb3144 { + if yyb3153 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40291,16 +40369,16 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3147 := &x.ObjectMeta - yyv3147.CodecDecodeSelf(d) + yyv3156 := &x.ObjectMeta + yyv3156.CodecDecodeSelf(d) } - yyj3144++ - if yyhl3144 { - yyb3144 = yyj3144 > l + yyj3153++ + if yyhl3153 { + yyb3153 = yyj3153 > l } else { - yyb3144 = r.CheckBreak() + yyb3153 = r.CheckBreak() } - if yyb3144 { + if yyb3153 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40308,16 +40386,16 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = NamespaceSpec{} } else { - yyv3148 := &x.Spec - yyv3148.CodecDecodeSelf(d) + yyv3157 := &x.Spec + yyv3157.CodecDecodeSelf(d) } - yyj3144++ - if yyhl3144 { - yyb3144 = yyj3144 > l + yyj3153++ + if yyhl3153 { + yyb3153 = yyj3153 > l } else { - yyb3144 = r.CheckBreak() + yyb3153 = r.CheckBreak() } - if yyb3144 { + if yyb3153 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40325,21 +40403,21 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = NamespaceStatus{} } else { - yyv3149 := &x.Status - yyv3149.CodecDecodeSelf(d) + yyv3158 := &x.Status + yyv3158.CodecDecodeSelf(d) } for { - yyj3144++ - if yyhl3144 { - yyb3144 = yyj3144 > l + yyj3153++ + if yyhl3153 { + yyb3153 = yyj3153 > l } else { - yyb3144 = r.CheckBreak() + yyb3153 = r.CheckBreak() } - if yyb3144 { + if yyb3153 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3144-1, "") + z.DecStructFieldNotFound(yyj3153-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -40351,37 +40429,37 @@ func (x *NamespaceList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3150 := z.EncBinary() - _ = yym3150 + yym3159 := z.EncBinary() + _ = yym3159 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3151 := !z.EncBinary() - yy2arr3151 := z.EncBasicHandle().StructToArray - var yyq3151 [4]bool - _, _, _ = yysep3151, yyq3151, yy2arr3151 - const yyr3151 bool = false - yyq3151[0] = x.Kind != "" - yyq3151[1] = x.APIVersion != "" - yyq3151[2] = true - var yynn3151 int - if yyr3151 || yy2arr3151 { + yysep3160 := !z.EncBinary() + yy2arr3160 := z.EncBasicHandle().StructToArray + var yyq3160 [4]bool + _, _, _ = yysep3160, yyq3160, yy2arr3160 + const yyr3160 bool = false + yyq3160[0] = x.Kind != "" + yyq3160[1] = x.APIVersion != "" + yyq3160[2] = true + var yynn3160 int + if yyr3160 || yy2arr3160 { r.EncodeArrayStart(4) } else { - yynn3151 = 1 - for _, b := range yyq3151 { + yynn3160 = 1 + for _, b := range yyq3160 { if b { - yynn3151++ + yynn3160++ } } - r.EncodeMapStart(yynn3151) - yynn3151 = 0 + r.EncodeMapStart(yynn3160) + yynn3160 = 0 } - if yyr3151 || yy2arr3151 { + if yyr3160 || yy2arr3160 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3151[0] { - yym3153 := z.EncBinary() - _ = yym3153 + if yyq3160[0] { + yym3162 := z.EncBinary() + _ = yym3162 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -40390,23 +40468,23 @@ func (x *NamespaceList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3151[0] { + if yyq3160[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3154 := z.EncBinary() - _ = yym3154 + yym3163 := z.EncBinary() + _ = yym3163 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3151 || yy2arr3151 { + if yyr3160 || yy2arr3160 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3151[1] { - yym3156 := z.EncBinary() - _ = yym3156 + if yyq3160[1] { + yym3165 := z.EncBinary() + _ = yym3165 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -40415,54 +40493,54 @@ func (x *NamespaceList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3151[1] { + if yyq3160[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3157 := z.EncBinary() - _ = yym3157 + yym3166 := z.EncBinary() + _ = yym3166 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3151 || yy2arr3151 { + if yyr3160 || yy2arr3160 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3151[2] { - yy3159 := &x.ListMeta - yym3160 := z.EncBinary() - _ = yym3160 + if yyq3160[2] { + yy3168 := &x.ListMeta + yym3169 := z.EncBinary() + _ = yym3169 if false { - } else if z.HasExtensions() && z.EncExt(yy3159) { + } else if z.HasExtensions() && z.EncExt(yy3168) { } else { - z.EncFallback(yy3159) + z.EncFallback(yy3168) } } else { r.EncodeNil() } } else { - if yyq3151[2] { + if yyq3160[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3161 := &x.ListMeta - yym3162 := z.EncBinary() - _ = yym3162 + yy3170 := &x.ListMeta + yym3171 := z.EncBinary() + _ = yym3171 if false { - } else if z.HasExtensions() && z.EncExt(yy3161) { + } else if z.HasExtensions() && z.EncExt(yy3170) { } else { - z.EncFallback(yy3161) + z.EncFallback(yy3170) } } } - if yyr3151 || yy2arr3151 { + if yyr3160 || yy2arr3160 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym3164 := z.EncBinary() - _ = yym3164 + yym3173 := z.EncBinary() + _ = yym3173 if false { } else { h.encSliceNamespace(([]Namespace)(x.Items), e) @@ -40475,15 +40553,15 @@ func (x *NamespaceList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym3165 := z.EncBinary() - _ = yym3165 + yym3174 := z.EncBinary() + _ = yym3174 if false { } else { h.encSliceNamespace(([]Namespace)(x.Items), e) } } } - if yyr3151 || yy2arr3151 { + if yyr3160 || yy2arr3160 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -40496,25 +40574,25 @@ func (x *NamespaceList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3166 := z.DecBinary() - _ = yym3166 + yym3175 := z.DecBinary() + _ = yym3175 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3167 := r.ContainerType() - if yyct3167 == codecSelferValueTypeMap1234 { - yyl3167 := r.ReadMapStart() - if yyl3167 == 0 { + yyct3176 := r.ContainerType() + if yyct3176 == codecSelferValueTypeMap1234 { + yyl3176 := r.ReadMapStart() + if yyl3176 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3167, d) + x.codecDecodeSelfFromMap(yyl3176, d) } - } else if yyct3167 == codecSelferValueTypeArray1234 { - yyl3167 := r.ReadArrayStart() - if yyl3167 == 0 { + } else if yyct3176 == codecSelferValueTypeArray1234 { + yyl3176 := r.ReadArrayStart() + if yyl3176 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3167, d) + x.codecDecodeSelfFromArray(yyl3176, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -40526,12 +40604,12 @@ func (x *NamespaceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3168Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3168Slc - var yyhl3168 bool = l >= 0 - for yyj3168 := 0; ; yyj3168++ { - if yyhl3168 { - if yyj3168 >= l { + var yys3177Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3177Slc + var yyhl3177 bool = l >= 0 + for yyj3177 := 0; ; yyj3177++ { + if yyhl3177 { + if yyj3177 >= l { break } } else { @@ -40540,10 +40618,10 @@ func (x *NamespaceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3168Slc = r.DecodeBytes(yys3168Slc, true, true) - yys3168 := string(yys3168Slc) + yys3177Slc = r.DecodeBytes(yys3177Slc, true, true) + yys3177 := string(yys3177Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3168 { + switch yys3177 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -40560,31 +40638,31 @@ func (x *NamespaceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3171 := &x.ListMeta - yym3172 := z.DecBinary() - _ = yym3172 + yyv3180 := &x.ListMeta + yym3181 := z.DecBinary() + _ = yym3181 if false { - } else if z.HasExtensions() && z.DecExt(yyv3171) { + } else if z.HasExtensions() && z.DecExt(yyv3180) { } else { - z.DecFallback(yyv3171, false) + z.DecFallback(yyv3180, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3173 := &x.Items - yym3174 := z.DecBinary() - _ = yym3174 + yyv3182 := &x.Items + yym3183 := z.DecBinary() + _ = yym3183 if false { } else { - h.decSliceNamespace((*[]Namespace)(yyv3173), d) + h.decSliceNamespace((*[]Namespace)(yyv3182), d) } } default: - z.DecStructFieldNotFound(-1, yys3168) - } // end switch yys3168 - } // end for yyj3168 + z.DecStructFieldNotFound(-1, yys3177) + } // end switch yys3177 + } // end for yyj3177 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -40592,16 +40670,16 @@ func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3175 int - var yyb3175 bool - var yyhl3175 bool = l >= 0 - yyj3175++ - if yyhl3175 { - yyb3175 = yyj3175 > l + var yyj3184 int + var yyb3184 bool + var yyhl3184 bool = l >= 0 + yyj3184++ + if yyhl3184 { + yyb3184 = yyj3184 > l } else { - yyb3175 = r.CheckBreak() + yyb3184 = r.CheckBreak() } - if yyb3175 { + if yyb3184 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40611,13 +40689,13 @@ func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3175++ - if yyhl3175 { - yyb3175 = yyj3175 > l + yyj3184++ + if yyhl3184 { + yyb3184 = yyj3184 > l } else { - yyb3175 = r.CheckBreak() + yyb3184 = r.CheckBreak() } - if yyb3175 { + if yyb3184 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40627,13 +40705,13 @@ func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3175++ - if yyhl3175 { - yyb3175 = yyj3175 > l + yyj3184++ + if yyhl3184 { + yyb3184 = yyj3184 > l } else { - yyb3175 = r.CheckBreak() + yyb3184 = r.CheckBreak() } - if yyb3175 { + if yyb3184 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40641,22 +40719,22 @@ func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3178 := &x.ListMeta - yym3179 := z.DecBinary() - _ = yym3179 + yyv3187 := &x.ListMeta + yym3188 := z.DecBinary() + _ = yym3188 if false { - } else if z.HasExtensions() && z.DecExt(yyv3178) { + } else if z.HasExtensions() && z.DecExt(yyv3187) { } else { - z.DecFallback(yyv3178, false) + z.DecFallback(yyv3187, false) } } - yyj3175++ - if yyhl3175 { - yyb3175 = yyj3175 > l + yyj3184++ + if yyhl3184 { + yyb3184 = yyj3184 > l } else { - yyb3175 = r.CheckBreak() + yyb3184 = r.CheckBreak() } - if yyb3175 { + if yyb3184 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40664,26 +40742,26 @@ func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3180 := &x.Items - yym3181 := z.DecBinary() - _ = yym3181 + yyv3189 := &x.Items + yym3190 := z.DecBinary() + _ = yym3190 if false { } else { - h.decSliceNamespace((*[]Namespace)(yyv3180), d) + h.decSliceNamespace((*[]Namespace)(yyv3189), d) } } for { - yyj3175++ - if yyhl3175 { - yyb3175 = yyj3175 > l + yyj3184++ + if yyhl3184 { + yyb3184 = yyj3184 > l } else { - yyb3175 = r.CheckBreak() + yyb3184 = r.CheckBreak() } - if yyb3175 { + if yyb3184 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3175-1, "") + z.DecStructFieldNotFound(yyj3184-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -40695,37 +40773,37 @@ func (x *Binding) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3182 := z.EncBinary() - _ = yym3182 + yym3191 := z.EncBinary() + _ = yym3191 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3183 := !z.EncBinary() - yy2arr3183 := z.EncBasicHandle().StructToArray - var yyq3183 [4]bool - _, _, _ = yysep3183, yyq3183, yy2arr3183 - const yyr3183 bool = false - yyq3183[0] = x.Kind != "" - yyq3183[1] = x.APIVersion != "" - yyq3183[2] = true - var yynn3183 int - if yyr3183 || yy2arr3183 { + yysep3192 := !z.EncBinary() + yy2arr3192 := z.EncBasicHandle().StructToArray + var yyq3192 [4]bool + _, _, _ = yysep3192, yyq3192, yy2arr3192 + const yyr3192 bool = false + yyq3192[0] = x.Kind != "" + yyq3192[1] = x.APIVersion != "" + yyq3192[2] = true + var yynn3192 int + if yyr3192 || yy2arr3192 { r.EncodeArrayStart(4) } else { - yynn3183 = 1 - for _, b := range yyq3183 { + yynn3192 = 1 + for _, b := range yyq3192 { if b { - yynn3183++ + yynn3192++ } } - r.EncodeMapStart(yynn3183) - yynn3183 = 0 + r.EncodeMapStart(yynn3192) + yynn3192 = 0 } - if yyr3183 || yy2arr3183 { + if yyr3192 || yy2arr3192 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3183[0] { - yym3185 := z.EncBinary() - _ = yym3185 + if yyq3192[0] { + yym3194 := z.EncBinary() + _ = yym3194 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -40734,23 +40812,23 @@ func (x *Binding) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3183[0] { + if yyq3192[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3186 := z.EncBinary() - _ = yym3186 + yym3195 := z.EncBinary() + _ = yym3195 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3183 || yy2arr3183 { + if yyr3192 || yy2arr3192 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3183[1] { - yym3188 := z.EncBinary() - _ = yym3188 + if yyq3192[1] { + yym3197 := z.EncBinary() + _ = yym3197 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -40759,47 +40837,47 @@ func (x *Binding) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3183[1] { + if yyq3192[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3189 := z.EncBinary() - _ = yym3189 + yym3198 := z.EncBinary() + _ = yym3198 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3183 || yy2arr3183 { + if yyr3192 || yy2arr3192 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3183[2] { - yy3191 := &x.ObjectMeta - yy3191.CodecEncodeSelf(e) + if yyq3192[2] { + yy3200 := &x.ObjectMeta + yy3200.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3183[2] { + if yyq3192[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3192 := &x.ObjectMeta - yy3192.CodecEncodeSelf(e) + yy3201 := &x.ObjectMeta + yy3201.CodecEncodeSelf(e) } } - if yyr3183 || yy2arr3183 { + if yyr3192 || yy2arr3192 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3194 := &x.Target - yy3194.CodecEncodeSelf(e) + yy3203 := &x.Target + yy3203.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("target")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3195 := &x.Target - yy3195.CodecEncodeSelf(e) + yy3204 := &x.Target + yy3204.CodecEncodeSelf(e) } - if yyr3183 || yy2arr3183 { + if yyr3192 || yy2arr3192 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -40812,25 +40890,25 @@ func (x *Binding) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3196 := z.DecBinary() - _ = yym3196 + yym3205 := z.DecBinary() + _ = yym3205 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3197 := r.ContainerType() - if yyct3197 == codecSelferValueTypeMap1234 { - yyl3197 := r.ReadMapStart() - if yyl3197 == 0 { + yyct3206 := r.ContainerType() + if yyct3206 == codecSelferValueTypeMap1234 { + yyl3206 := r.ReadMapStart() + if yyl3206 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3197, d) + x.codecDecodeSelfFromMap(yyl3206, d) } - } else if yyct3197 == codecSelferValueTypeArray1234 { - yyl3197 := r.ReadArrayStart() - if yyl3197 == 0 { + } else if yyct3206 == codecSelferValueTypeArray1234 { + yyl3206 := r.ReadArrayStart() + if yyl3206 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3197, d) + x.codecDecodeSelfFromArray(yyl3206, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -40842,12 +40920,12 @@ func (x *Binding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3198Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3198Slc - var yyhl3198 bool = l >= 0 - for yyj3198 := 0; ; yyj3198++ { - if yyhl3198 { - if yyj3198 >= l { + var yys3207Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3207Slc + var yyhl3207 bool = l >= 0 + for yyj3207 := 0; ; yyj3207++ { + if yyhl3207 { + if yyj3207 >= l { break } } else { @@ -40856,10 +40934,10 @@ func (x *Binding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3198Slc = r.DecodeBytes(yys3198Slc, true, true) - yys3198 := string(yys3198Slc) + yys3207Slc = r.DecodeBytes(yys3207Slc, true, true) + yys3207 := string(yys3207Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3198 { + switch yys3207 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -40876,20 +40954,20 @@ func (x *Binding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3201 := &x.ObjectMeta - yyv3201.CodecDecodeSelf(d) + yyv3210 := &x.ObjectMeta + yyv3210.CodecDecodeSelf(d) } case "target": if r.TryDecodeAsNil() { x.Target = ObjectReference{} } else { - yyv3202 := &x.Target - yyv3202.CodecDecodeSelf(d) + yyv3211 := &x.Target + yyv3211.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3198) - } // end switch yys3198 - } // end for yyj3198 + z.DecStructFieldNotFound(-1, yys3207) + } // end switch yys3207 + } // end for yyj3207 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -40897,16 +40975,16 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3203 int - var yyb3203 bool - var yyhl3203 bool = l >= 0 - yyj3203++ - if yyhl3203 { - yyb3203 = yyj3203 > l + var yyj3212 int + var yyb3212 bool + var yyhl3212 bool = l >= 0 + yyj3212++ + if yyhl3212 { + yyb3212 = yyj3212 > l } else { - yyb3203 = r.CheckBreak() + yyb3212 = r.CheckBreak() } - if yyb3203 { + if yyb3212 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40916,13 +40994,13 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3203++ - if yyhl3203 { - yyb3203 = yyj3203 > l + yyj3212++ + if yyhl3212 { + yyb3212 = yyj3212 > l } else { - yyb3203 = r.CheckBreak() + yyb3212 = r.CheckBreak() } - if yyb3203 { + if yyb3212 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40932,13 +41010,13 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3203++ - if yyhl3203 { - yyb3203 = yyj3203 > l + yyj3212++ + if yyhl3212 { + yyb3212 = yyj3212 > l } else { - yyb3203 = r.CheckBreak() + yyb3212 = r.CheckBreak() } - if yyb3203 { + if yyb3212 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40946,16 +41024,16 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3206 := &x.ObjectMeta - yyv3206.CodecDecodeSelf(d) + yyv3215 := &x.ObjectMeta + yyv3215.CodecDecodeSelf(d) } - yyj3203++ - if yyhl3203 { - yyb3203 = yyj3203 > l + yyj3212++ + if yyhl3212 { + yyb3212 = yyj3212 > l } else { - yyb3203 = r.CheckBreak() + yyb3212 = r.CheckBreak() } - if yyb3203 { + if yyb3212 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -40963,21 +41041,21 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Target = ObjectReference{} } else { - yyv3207 := &x.Target - yyv3207.CodecDecodeSelf(d) + yyv3216 := &x.Target + yyv3216.CodecDecodeSelf(d) } for { - yyj3203++ - if yyhl3203 { - yyb3203 = yyj3203 > l + yyj3212++ + if yyhl3212 { + yyb3212 = yyj3212 > l } else { - yyb3203 = r.CheckBreak() + yyb3212 = r.CheckBreak() } - if yyb3203 { + if yyb3212 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3203-1, "") + z.DecStructFieldNotFound(yyj3212-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -40989,68 +41067,68 @@ func (x *Preconditions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3208 := z.EncBinary() - _ = yym3208 + yym3217 := z.EncBinary() + _ = yym3217 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3209 := !z.EncBinary() - yy2arr3209 := z.EncBasicHandle().StructToArray - var yyq3209 [1]bool - _, _, _ = yysep3209, yyq3209, yy2arr3209 - const yyr3209 bool = false - yyq3209[0] = x.UID != nil - var yynn3209 int - if yyr3209 || yy2arr3209 { + yysep3218 := !z.EncBinary() + yy2arr3218 := z.EncBasicHandle().StructToArray + var yyq3218 [1]bool + _, _, _ = yysep3218, yyq3218, yy2arr3218 + const yyr3218 bool = false + yyq3218[0] = x.UID != nil + var yynn3218 int + if yyr3218 || yy2arr3218 { r.EncodeArrayStart(1) } else { - yynn3209 = 0 - for _, b := range yyq3209 { + yynn3218 = 0 + for _, b := range yyq3218 { if b { - yynn3209++ + yynn3218++ } } - r.EncodeMapStart(yynn3209) - yynn3209 = 0 + r.EncodeMapStart(yynn3218) + yynn3218 = 0 } - if yyr3209 || yy2arr3209 { + if yyr3218 || yy2arr3218 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3209[0] { + if yyq3218[0] { if x.UID == nil { r.EncodeNil() } else { - yy3211 := *x.UID - yym3212 := z.EncBinary() - _ = yym3212 + yy3220 := *x.UID + yym3221 := z.EncBinary() + _ = yym3221 if false { - } else if z.HasExtensions() && z.EncExt(yy3211) { + } else if z.HasExtensions() && z.EncExt(yy3220) { } else { - r.EncodeString(codecSelferC_UTF81234, string(yy3211)) + r.EncodeString(codecSelferC_UTF81234, string(yy3220)) } } } else { r.EncodeNil() } } else { - if yyq3209[0] { + if yyq3218[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("uid")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.UID == nil { r.EncodeNil() } else { - yy3213 := *x.UID - yym3214 := z.EncBinary() - _ = yym3214 + yy3222 := *x.UID + yym3223 := z.EncBinary() + _ = yym3223 if false { - } else if z.HasExtensions() && z.EncExt(yy3213) { + } else if z.HasExtensions() && z.EncExt(yy3222) { } else { - r.EncodeString(codecSelferC_UTF81234, string(yy3213)) + r.EncodeString(codecSelferC_UTF81234, string(yy3222)) } } } } - if yyr3209 || yy2arr3209 { + if yyr3218 || yy2arr3218 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -41063,25 +41141,25 @@ func (x *Preconditions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3215 := z.DecBinary() - _ = yym3215 + yym3224 := z.DecBinary() + _ = yym3224 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3216 := r.ContainerType() - if yyct3216 == codecSelferValueTypeMap1234 { - yyl3216 := r.ReadMapStart() - if yyl3216 == 0 { + yyct3225 := r.ContainerType() + if yyct3225 == codecSelferValueTypeMap1234 { + yyl3225 := r.ReadMapStart() + if yyl3225 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3216, d) + x.codecDecodeSelfFromMap(yyl3225, d) } - } else if yyct3216 == codecSelferValueTypeArray1234 { - yyl3216 := r.ReadArrayStart() - if yyl3216 == 0 { + } else if yyct3225 == codecSelferValueTypeArray1234 { + yyl3225 := r.ReadArrayStart() + if yyl3225 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3216, d) + x.codecDecodeSelfFromArray(yyl3225, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -41093,12 +41171,12 @@ func (x *Preconditions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3217Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3217Slc - var yyhl3217 bool = l >= 0 - for yyj3217 := 0; ; yyj3217++ { - if yyhl3217 { - if yyj3217 >= l { + var yys3226Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3226Slc + var yyhl3226 bool = l >= 0 + for yyj3226 := 0; ; yyj3226++ { + if yyhl3226 { + if yyj3226 >= l { break } } else { @@ -41107,10 +41185,10 @@ func (x *Preconditions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3217Slc = r.DecodeBytes(yys3217Slc, true, true) - yys3217 := string(yys3217Slc) + yys3226Slc = r.DecodeBytes(yys3226Slc, true, true) + yys3226 := string(yys3226Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3217 { + switch yys3226 { case "uid": if r.TryDecodeAsNil() { if x.UID != nil { @@ -41120,8 +41198,8 @@ func (x *Preconditions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.UID == nil { x.UID = new(pkg1_types.UID) } - yym3219 := z.DecBinary() - _ = yym3219 + yym3228 := z.DecBinary() + _ = yym3228 if false { } else if z.HasExtensions() && z.DecExt(x.UID) { } else { @@ -41129,9 +41207,9 @@ func (x *Preconditions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } default: - z.DecStructFieldNotFound(-1, yys3217) - } // end switch yys3217 - } // end for yyj3217 + z.DecStructFieldNotFound(-1, yys3226) + } // end switch yys3226 + } // end for yyj3226 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -41139,16 +41217,16 @@ func (x *Preconditions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3220 int - var yyb3220 bool - var yyhl3220 bool = l >= 0 - yyj3220++ - if yyhl3220 { - yyb3220 = yyj3220 > l + var yyj3229 int + var yyb3229 bool + var yyhl3229 bool = l >= 0 + yyj3229++ + if yyhl3229 { + yyb3229 = yyj3229 > l } else { - yyb3220 = r.CheckBreak() + yyb3229 = r.CheckBreak() } - if yyb3220 { + if yyb3229 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41161,8 +41239,8 @@ func (x *Preconditions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.UID == nil { x.UID = new(pkg1_types.UID) } - yym3222 := z.DecBinary() - _ = yym3222 + yym3231 := z.DecBinary() + _ = yym3231 if false { } else if z.HasExtensions() && z.DecExt(x.UID) { } else { @@ -41170,17 +41248,17 @@ func (x *Preconditions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } } for { - yyj3220++ - if yyhl3220 { - yyb3220 = yyj3220 > l + yyj3229++ + if yyhl3229 { + yyb3229 = yyj3229 > l } else { - yyb3220 = r.CheckBreak() + yyb3229 = r.CheckBreak() } - if yyb3220 { + if yyb3229 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3220-1, "") + z.DecStructFieldNotFound(yyj3229-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -41192,39 +41270,39 @@ func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3223 := z.EncBinary() - _ = yym3223 + yym3232 := z.EncBinary() + _ = yym3232 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3224 := !z.EncBinary() - yy2arr3224 := z.EncBasicHandle().StructToArray - var yyq3224 [5]bool - _, _, _ = yysep3224, yyq3224, yy2arr3224 - const yyr3224 bool = false - yyq3224[0] = x.Kind != "" - yyq3224[1] = x.APIVersion != "" - yyq3224[2] = x.GracePeriodSeconds != nil - yyq3224[3] = x.Preconditions != nil - yyq3224[4] = x.OrphanDependents != nil - var yynn3224 int - if yyr3224 || yy2arr3224 { + yysep3233 := !z.EncBinary() + yy2arr3233 := z.EncBasicHandle().StructToArray + var yyq3233 [5]bool + _, _, _ = yysep3233, yyq3233, yy2arr3233 + const yyr3233 bool = false + yyq3233[0] = x.Kind != "" + yyq3233[1] = x.APIVersion != "" + yyq3233[2] = x.GracePeriodSeconds != nil + yyq3233[3] = x.Preconditions != nil + yyq3233[4] = x.OrphanDependents != nil + var yynn3233 int + if yyr3233 || yy2arr3233 { r.EncodeArrayStart(5) } else { - yynn3224 = 0 - for _, b := range yyq3224 { + yynn3233 = 0 + for _, b := range yyq3233 { if b { - yynn3224++ + yynn3233++ } } - r.EncodeMapStart(yynn3224) - yynn3224 = 0 + r.EncodeMapStart(yynn3233) + yynn3233 = 0 } - if yyr3224 || yy2arr3224 { + if yyr3233 || yy2arr3233 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3224[0] { - yym3226 := z.EncBinary() - _ = yym3226 + if yyq3233[0] { + yym3235 := z.EncBinary() + _ = yym3235 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -41233,23 +41311,23 @@ func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3224[0] { + if yyq3233[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3227 := z.EncBinary() - _ = yym3227 + yym3236 := z.EncBinary() + _ = yym3236 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3224 || yy2arr3224 { + if yyr3233 || yy2arr3233 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3224[1] { - yym3229 := z.EncBinary() - _ = yym3229 + if yyq3233[1] { + yym3238 := z.EncBinary() + _ = yym3238 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -41258,56 +41336,56 @@ func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3224[1] { + if yyq3233[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3230 := z.EncBinary() - _ = yym3230 + yym3239 := z.EncBinary() + _ = yym3239 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3224 || yy2arr3224 { + if yyr3233 || yy2arr3233 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3224[2] { + if yyq3233[2] { if x.GracePeriodSeconds == nil { r.EncodeNil() } else { - yy3232 := *x.GracePeriodSeconds - yym3233 := z.EncBinary() - _ = yym3233 + yy3241 := *x.GracePeriodSeconds + yym3242 := z.EncBinary() + _ = yym3242 if false { } else { - r.EncodeInt(int64(yy3232)) + r.EncodeInt(int64(yy3241)) } } } else { r.EncodeNil() } } else { - if yyq3224[2] { + if yyq3233[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("gracePeriodSeconds")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.GracePeriodSeconds == nil { r.EncodeNil() } else { - yy3234 := *x.GracePeriodSeconds - yym3235 := z.EncBinary() - _ = yym3235 + yy3243 := *x.GracePeriodSeconds + yym3244 := z.EncBinary() + _ = yym3244 if false { } else { - r.EncodeInt(int64(yy3234)) + r.EncodeInt(int64(yy3243)) } } } } - if yyr3224 || yy2arr3224 { + if yyr3233 || yy2arr3233 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3224[3] { + if yyq3233[3] { if x.Preconditions == nil { r.EncodeNil() } else { @@ -41317,7 +41395,7 @@ func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3224[3] { + if yyq3233[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("preconditions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -41328,42 +41406,42 @@ func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3224 || yy2arr3224 { + if yyr3233 || yy2arr3233 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3224[4] { + if yyq3233[4] { if x.OrphanDependents == nil { r.EncodeNil() } else { - yy3238 := *x.OrphanDependents - yym3239 := z.EncBinary() - _ = yym3239 + yy3247 := *x.OrphanDependents + yym3248 := z.EncBinary() + _ = yym3248 if false { } else { - r.EncodeBool(bool(yy3238)) + r.EncodeBool(bool(yy3247)) } } } else { r.EncodeNil() } } else { - if yyq3224[4] { + if yyq3233[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("orphanDependents")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.OrphanDependents == nil { r.EncodeNil() } else { - yy3240 := *x.OrphanDependents - yym3241 := z.EncBinary() - _ = yym3241 + yy3249 := *x.OrphanDependents + yym3250 := z.EncBinary() + _ = yym3250 if false { } else { - r.EncodeBool(bool(yy3240)) + r.EncodeBool(bool(yy3249)) } } } } - if yyr3224 || yy2arr3224 { + if yyr3233 || yy2arr3233 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -41376,25 +41454,25 @@ func (x *DeleteOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3242 := z.DecBinary() - _ = yym3242 + yym3251 := z.DecBinary() + _ = yym3251 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3243 := r.ContainerType() - if yyct3243 == codecSelferValueTypeMap1234 { - yyl3243 := r.ReadMapStart() - if yyl3243 == 0 { + yyct3252 := r.ContainerType() + if yyct3252 == codecSelferValueTypeMap1234 { + yyl3252 := r.ReadMapStart() + if yyl3252 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3243, d) + x.codecDecodeSelfFromMap(yyl3252, d) } - } else if yyct3243 == codecSelferValueTypeArray1234 { - yyl3243 := r.ReadArrayStart() - if yyl3243 == 0 { + } else if yyct3252 == codecSelferValueTypeArray1234 { + yyl3252 := r.ReadArrayStart() + if yyl3252 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3243, d) + x.codecDecodeSelfFromArray(yyl3252, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -41406,12 +41484,12 @@ func (x *DeleteOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3244Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3244Slc - var yyhl3244 bool = l >= 0 - for yyj3244 := 0; ; yyj3244++ { - if yyhl3244 { - if yyj3244 >= l { + var yys3253Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3253Slc + var yyhl3253 bool = l >= 0 + for yyj3253 := 0; ; yyj3253++ { + if yyhl3253 { + if yyj3253 >= l { break } } else { @@ -41420,10 +41498,10 @@ func (x *DeleteOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3244Slc = r.DecodeBytes(yys3244Slc, true, true) - yys3244 := string(yys3244Slc) + yys3253Slc = r.DecodeBytes(yys3253Slc, true, true) + yys3253 := string(yys3253Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3244 { + switch yys3253 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -41445,8 +41523,8 @@ func (x *DeleteOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.GracePeriodSeconds == nil { x.GracePeriodSeconds = new(int64) } - yym3248 := z.DecBinary() - _ = yym3248 + yym3257 := z.DecBinary() + _ = yym3257 if false { } else { *((*int64)(x.GracePeriodSeconds)) = int64(r.DecodeInt(64)) @@ -41472,17 +41550,17 @@ func (x *DeleteOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.OrphanDependents == nil { x.OrphanDependents = new(bool) } - yym3251 := z.DecBinary() - _ = yym3251 + yym3260 := z.DecBinary() + _ = yym3260 if false { } else { *((*bool)(x.OrphanDependents)) = r.DecodeBool() } } default: - z.DecStructFieldNotFound(-1, yys3244) - } // end switch yys3244 - } // end for yyj3244 + z.DecStructFieldNotFound(-1, yys3253) + } // end switch yys3253 + } // end for yyj3253 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -41490,16 +41568,16 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3252 int - var yyb3252 bool - var yyhl3252 bool = l >= 0 - yyj3252++ - if yyhl3252 { - yyb3252 = yyj3252 > l + var yyj3261 int + var yyb3261 bool + var yyhl3261 bool = l >= 0 + yyj3261++ + if yyhl3261 { + yyb3261 = yyj3261 > l } else { - yyb3252 = r.CheckBreak() + yyb3261 = r.CheckBreak() } - if yyb3252 { + if yyb3261 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41509,13 +41587,13 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3252++ - if yyhl3252 { - yyb3252 = yyj3252 > l + yyj3261++ + if yyhl3261 { + yyb3261 = yyj3261 > l } else { - yyb3252 = r.CheckBreak() + yyb3261 = r.CheckBreak() } - if yyb3252 { + if yyb3261 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41525,13 +41603,13 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3252++ - if yyhl3252 { - yyb3252 = yyj3252 > l + yyj3261++ + if yyhl3261 { + yyb3261 = yyj3261 > l } else { - yyb3252 = r.CheckBreak() + yyb3261 = r.CheckBreak() } - if yyb3252 { + if yyb3261 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41544,20 +41622,20 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.GracePeriodSeconds == nil { x.GracePeriodSeconds = new(int64) } - yym3256 := z.DecBinary() - _ = yym3256 + yym3265 := z.DecBinary() + _ = yym3265 if false { } else { *((*int64)(x.GracePeriodSeconds)) = int64(r.DecodeInt(64)) } } - yyj3252++ - if yyhl3252 { - yyb3252 = yyj3252 > l + yyj3261++ + if yyhl3261 { + yyb3261 = yyj3261 > l } else { - yyb3252 = r.CheckBreak() + yyb3261 = r.CheckBreak() } - if yyb3252 { + if yyb3261 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41572,13 +41650,13 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.Preconditions.CodecDecodeSelf(d) } - yyj3252++ - if yyhl3252 { - yyb3252 = yyj3252 > l + yyj3261++ + if yyhl3261 { + yyb3261 = yyj3261 > l } else { - yyb3252 = r.CheckBreak() + yyb3261 = r.CheckBreak() } - if yyb3252 { + if yyb3261 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41591,25 +41669,25 @@ func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.OrphanDependents == nil { x.OrphanDependents = new(bool) } - yym3259 := z.DecBinary() - _ = yym3259 + yym3268 := z.DecBinary() + _ = yym3268 if false { } else { *((*bool)(x.OrphanDependents)) = r.DecodeBool() } } for { - yyj3252++ - if yyhl3252 { - yyb3252 = yyj3252 > l + yyj3261++ + if yyhl3261 { + yyb3261 = yyj3261 > l } else { - yyb3252 = r.CheckBreak() + yyb3261 = r.CheckBreak() } - if yyb3252 { + if yyb3261 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3252-1, "") + z.DecStructFieldNotFound(yyj3261-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -41621,36 +41699,36 @@ func (x *ExportOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3260 := z.EncBinary() - _ = yym3260 + yym3269 := z.EncBinary() + _ = yym3269 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3261 := !z.EncBinary() - yy2arr3261 := z.EncBasicHandle().StructToArray - var yyq3261 [4]bool - _, _, _ = yysep3261, yyq3261, yy2arr3261 - const yyr3261 bool = false - yyq3261[0] = x.Kind != "" - yyq3261[1] = x.APIVersion != "" - var yynn3261 int - if yyr3261 || yy2arr3261 { + yysep3270 := !z.EncBinary() + yy2arr3270 := z.EncBasicHandle().StructToArray + var yyq3270 [4]bool + _, _, _ = yysep3270, yyq3270, yy2arr3270 + const yyr3270 bool = false + yyq3270[0] = x.Kind != "" + yyq3270[1] = x.APIVersion != "" + var yynn3270 int + if yyr3270 || yy2arr3270 { r.EncodeArrayStart(4) } else { - yynn3261 = 2 - for _, b := range yyq3261 { + yynn3270 = 2 + for _, b := range yyq3270 { if b { - yynn3261++ + yynn3270++ } } - r.EncodeMapStart(yynn3261) - yynn3261 = 0 + r.EncodeMapStart(yynn3270) + yynn3270 = 0 } - if yyr3261 || yy2arr3261 { + if yyr3270 || yy2arr3270 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3261[0] { - yym3263 := z.EncBinary() - _ = yym3263 + if yyq3270[0] { + yym3272 := z.EncBinary() + _ = yym3272 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -41659,23 +41737,23 @@ func (x *ExportOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3261[0] { + if yyq3270[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3264 := z.EncBinary() - _ = yym3264 + yym3273 := z.EncBinary() + _ = yym3273 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3261 || yy2arr3261 { + if yyr3270 || yy2arr3270 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3261[1] { - yym3266 := z.EncBinary() - _ = yym3266 + if yyq3270[1] { + yym3275 := z.EncBinary() + _ = yym3275 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -41684,22 +41762,22 @@ func (x *ExportOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3261[1] { + if yyq3270[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3267 := z.EncBinary() - _ = yym3267 + yym3276 := z.EncBinary() + _ = yym3276 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3261 || yy2arr3261 { + if yyr3270 || yy2arr3270 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3269 := z.EncBinary() - _ = yym3269 + yym3278 := z.EncBinary() + _ = yym3278 if false { } else { r.EncodeBool(bool(x.Export)) @@ -41708,17 +41786,17 @@ func (x *ExportOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("export")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3270 := z.EncBinary() - _ = yym3270 + yym3279 := z.EncBinary() + _ = yym3279 if false { } else { r.EncodeBool(bool(x.Export)) } } - if yyr3261 || yy2arr3261 { + if yyr3270 || yy2arr3270 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3272 := z.EncBinary() - _ = yym3272 + yym3281 := z.EncBinary() + _ = yym3281 if false { } else { r.EncodeBool(bool(x.Exact)) @@ -41727,14 +41805,14 @@ func (x *ExportOptions) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("exact")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3273 := z.EncBinary() - _ = yym3273 + yym3282 := z.EncBinary() + _ = yym3282 if false { } else { r.EncodeBool(bool(x.Exact)) } } - if yyr3261 || yy2arr3261 { + if yyr3270 || yy2arr3270 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -41747,25 +41825,25 @@ func (x *ExportOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3274 := z.DecBinary() - _ = yym3274 + yym3283 := z.DecBinary() + _ = yym3283 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3275 := r.ContainerType() - if yyct3275 == codecSelferValueTypeMap1234 { - yyl3275 := r.ReadMapStart() - if yyl3275 == 0 { + yyct3284 := r.ContainerType() + if yyct3284 == codecSelferValueTypeMap1234 { + yyl3284 := r.ReadMapStart() + if yyl3284 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3275, d) + x.codecDecodeSelfFromMap(yyl3284, d) } - } else if yyct3275 == codecSelferValueTypeArray1234 { - yyl3275 := r.ReadArrayStart() - if yyl3275 == 0 { + } else if yyct3284 == codecSelferValueTypeArray1234 { + yyl3284 := r.ReadArrayStart() + if yyl3284 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3275, d) + x.codecDecodeSelfFromArray(yyl3284, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -41777,12 +41855,12 @@ func (x *ExportOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3276Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3276Slc - var yyhl3276 bool = l >= 0 - for yyj3276 := 0; ; yyj3276++ { - if yyhl3276 { - if yyj3276 >= l { + var yys3285Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3285Slc + var yyhl3285 bool = l >= 0 + for yyj3285 := 0; ; yyj3285++ { + if yyhl3285 { + if yyj3285 >= l { break } } else { @@ -41791,10 +41869,10 @@ func (x *ExportOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3276Slc = r.DecodeBytes(yys3276Slc, true, true) - yys3276 := string(yys3276Slc) + yys3285Slc = r.DecodeBytes(yys3285Slc, true, true) + yys3285 := string(yys3285Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3276 { + switch yys3285 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -41820,9 +41898,9 @@ func (x *ExportOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Exact = bool(r.DecodeBool()) } default: - z.DecStructFieldNotFound(-1, yys3276) - } // end switch yys3276 - } // end for yyj3276 + z.DecStructFieldNotFound(-1, yys3285) + } // end switch yys3285 + } // end for yyj3285 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -41830,16 +41908,16 @@ func (x *ExportOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3281 int - var yyb3281 bool - var yyhl3281 bool = l >= 0 - yyj3281++ - if yyhl3281 { - yyb3281 = yyj3281 > l + var yyj3290 int + var yyb3290 bool + var yyhl3290 bool = l >= 0 + yyj3290++ + if yyhl3290 { + yyb3290 = yyj3290 > l } else { - yyb3281 = r.CheckBreak() + yyb3290 = r.CheckBreak() } - if yyb3281 { + if yyb3290 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41849,13 +41927,13 @@ func (x *ExportOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3281++ - if yyhl3281 { - yyb3281 = yyj3281 > l + yyj3290++ + if yyhl3290 { + yyb3290 = yyj3290 > l } else { - yyb3281 = r.CheckBreak() + yyb3290 = r.CheckBreak() } - if yyb3281 { + if yyb3290 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41865,13 +41943,13 @@ func (x *ExportOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3281++ - if yyhl3281 { - yyb3281 = yyj3281 > l + yyj3290++ + if yyhl3290 { + yyb3290 = yyj3290 > l } else { - yyb3281 = r.CheckBreak() + yyb3290 = r.CheckBreak() } - if yyb3281 { + if yyb3290 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41881,13 +41959,13 @@ func (x *ExportOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Export = bool(r.DecodeBool()) } - yyj3281++ - if yyhl3281 { - yyb3281 = yyj3281 > l + yyj3290++ + if yyhl3290 { + yyb3290 = yyj3290 > l } else { - yyb3281 = r.CheckBreak() + yyb3290 = r.CheckBreak() } - if yyb3281 { + if yyb3290 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -41898,17 +41976,17 @@ func (x *ExportOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Exact = bool(r.DecodeBool()) } for { - yyj3281++ - if yyhl3281 { - yyb3281 = yyj3281 > l + yyj3290++ + if yyhl3290 { + yyb3290 = yyj3290 > l } else { - yyb3281 = r.CheckBreak() + yyb3290 = r.CheckBreak() } - if yyb3281 { + if yyb3290 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3281-1, "") + z.DecStructFieldNotFound(yyj3290-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -41920,41 +41998,41 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3286 := z.EncBinary() - _ = yym3286 + yym3295 := z.EncBinary() + _ = yym3295 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3287 := !z.EncBinary() - yy2arr3287 := z.EncBasicHandle().StructToArray - var yyq3287 [7]bool - _, _, _ = yysep3287, yyq3287, yy2arr3287 - const yyr3287 bool = false - yyq3287[0] = x.Kind != "" - yyq3287[1] = x.APIVersion != "" - yyq3287[2] = x.LabelSelector != "" - yyq3287[3] = x.FieldSelector != "" - yyq3287[4] = x.Watch != false - yyq3287[5] = x.ResourceVersion != "" - yyq3287[6] = x.TimeoutSeconds != nil - var yynn3287 int - if yyr3287 || yy2arr3287 { + yysep3296 := !z.EncBinary() + yy2arr3296 := z.EncBasicHandle().StructToArray + var yyq3296 [7]bool + _, _, _ = yysep3296, yyq3296, yy2arr3296 + const yyr3296 bool = false + yyq3296[0] = x.Kind != "" + yyq3296[1] = x.APIVersion != "" + yyq3296[2] = x.LabelSelector != "" + yyq3296[3] = x.FieldSelector != "" + yyq3296[4] = x.Watch != false + yyq3296[5] = x.ResourceVersion != "" + yyq3296[6] = x.TimeoutSeconds != nil + var yynn3296 int + if yyr3296 || yy2arr3296 { r.EncodeArrayStart(7) } else { - yynn3287 = 0 - for _, b := range yyq3287 { + yynn3296 = 0 + for _, b := range yyq3296 { if b { - yynn3287++ + yynn3296++ } } - r.EncodeMapStart(yynn3287) - yynn3287 = 0 + r.EncodeMapStart(yynn3296) + yynn3296 = 0 } - if yyr3287 || yy2arr3287 { + if yyr3296 || yy2arr3296 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3287[0] { - yym3289 := z.EncBinary() - _ = yym3289 + if yyq3296[0] { + yym3298 := z.EncBinary() + _ = yym3298 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -41963,23 +42041,23 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3287[0] { + if yyq3296[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3290 := z.EncBinary() - _ = yym3290 + yym3299 := z.EncBinary() + _ = yym3299 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3287 || yy2arr3287 { + if yyr3296 || yy2arr3296 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3287[1] { - yym3292 := z.EncBinary() - _ = yym3292 + if yyq3296[1] { + yym3301 := z.EncBinary() + _ = yym3301 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -41988,23 +42066,23 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3287[1] { + if yyq3296[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3293 := z.EncBinary() - _ = yym3293 + yym3302 := z.EncBinary() + _ = yym3302 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3287 || yy2arr3287 { + if yyr3296 || yy2arr3296 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3287[2] { - yym3295 := z.EncBinary() - _ = yym3295 + if yyq3296[2] { + yym3304 := z.EncBinary() + _ = yym3304 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.LabelSelector)) @@ -42013,23 +42091,23 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3287[2] { + if yyq3296[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("labelSelector")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3296 := z.EncBinary() - _ = yym3296 + yym3305 := z.EncBinary() + _ = yym3305 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.LabelSelector)) } } } - if yyr3287 || yy2arr3287 { + if yyr3296 || yy2arr3296 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3287[3] { - yym3298 := z.EncBinary() - _ = yym3298 + if yyq3296[3] { + yym3307 := z.EncBinary() + _ = yym3307 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FieldSelector)) @@ -42038,23 +42116,23 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3287[3] { + if yyq3296[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("fieldSelector")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3299 := z.EncBinary() - _ = yym3299 + yym3308 := z.EncBinary() + _ = yym3308 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FieldSelector)) } } } - if yyr3287 || yy2arr3287 { + if yyr3296 || yy2arr3296 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3287[4] { - yym3301 := z.EncBinary() - _ = yym3301 + if yyq3296[4] { + yym3310 := z.EncBinary() + _ = yym3310 if false { } else { r.EncodeBool(bool(x.Watch)) @@ -42063,23 +42141,23 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq3287[4] { + if yyq3296[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("watch")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3302 := z.EncBinary() - _ = yym3302 + yym3311 := z.EncBinary() + _ = yym3311 if false { } else { r.EncodeBool(bool(x.Watch)) } } } - if yyr3287 || yy2arr3287 { + if yyr3296 || yy2arr3296 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3287[5] { - yym3304 := z.EncBinary() - _ = yym3304 + if yyq3296[5] { + yym3313 := z.EncBinary() + _ = yym3313 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) @@ -42088,54 +42166,54 @@ func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3287[5] { + if yyq3296[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("resourceVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3305 := z.EncBinary() - _ = yym3305 + yym3314 := z.EncBinary() + _ = yym3314 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) } } } - if yyr3287 || yy2arr3287 { + if yyr3296 || yy2arr3296 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3287[6] { + if yyq3296[6] { if x.TimeoutSeconds == nil { r.EncodeNil() } else { - yy3307 := *x.TimeoutSeconds - yym3308 := z.EncBinary() - _ = yym3308 + yy3316 := *x.TimeoutSeconds + yym3317 := z.EncBinary() + _ = yym3317 if false { } else { - r.EncodeInt(int64(yy3307)) + r.EncodeInt(int64(yy3316)) } } } else { r.EncodeNil() } } else { - if yyq3287[6] { + if yyq3296[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("timeoutSeconds")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.TimeoutSeconds == nil { r.EncodeNil() } else { - yy3309 := *x.TimeoutSeconds - yym3310 := z.EncBinary() - _ = yym3310 + yy3318 := *x.TimeoutSeconds + yym3319 := z.EncBinary() + _ = yym3319 if false { } else { - r.EncodeInt(int64(yy3309)) + r.EncodeInt(int64(yy3318)) } } } } - if yyr3287 || yy2arr3287 { + if yyr3296 || yy2arr3296 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -42148,25 +42226,25 @@ func (x *ListOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3311 := z.DecBinary() - _ = yym3311 + yym3320 := z.DecBinary() + _ = yym3320 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3312 := r.ContainerType() - if yyct3312 == codecSelferValueTypeMap1234 { - yyl3312 := r.ReadMapStart() - if yyl3312 == 0 { + yyct3321 := r.ContainerType() + if yyct3321 == codecSelferValueTypeMap1234 { + yyl3321 := r.ReadMapStart() + if yyl3321 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3312, d) + x.codecDecodeSelfFromMap(yyl3321, d) } - } else if yyct3312 == codecSelferValueTypeArray1234 { - yyl3312 := r.ReadArrayStart() - if yyl3312 == 0 { + } else if yyct3321 == codecSelferValueTypeArray1234 { + yyl3321 := r.ReadArrayStart() + if yyl3321 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3312, d) + x.codecDecodeSelfFromArray(yyl3321, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -42178,12 +42256,12 @@ func (x *ListOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3313Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3313Slc - var yyhl3313 bool = l >= 0 - for yyj3313 := 0; ; yyj3313++ { - if yyhl3313 { - if yyj3313 >= l { + var yys3322Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3322Slc + var yyhl3322 bool = l >= 0 + for yyj3322 := 0; ; yyj3322++ { + if yyhl3322 { + if yyj3322 >= l { break } } else { @@ -42192,10 +42270,10 @@ func (x *ListOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3313Slc = r.DecodeBytes(yys3313Slc, true, true) - yys3313 := string(yys3313Slc) + yys3322Slc = r.DecodeBytes(yys3322Slc, true, true) + yys3322 := string(yys3322Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3313 { + switch yys3322 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -42241,17 +42319,17 @@ func (x *ListOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.TimeoutSeconds == nil { x.TimeoutSeconds = new(int64) } - yym3321 := z.DecBinary() - _ = yym3321 + yym3330 := z.DecBinary() + _ = yym3330 if false { } else { *((*int64)(x.TimeoutSeconds)) = int64(r.DecodeInt(64)) } } default: - z.DecStructFieldNotFound(-1, yys3313) - } // end switch yys3313 - } // end for yyj3313 + z.DecStructFieldNotFound(-1, yys3322) + } // end switch yys3322 + } // end for yyj3322 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -42259,16 +42337,16 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3322 int - var yyb3322 bool - var yyhl3322 bool = l >= 0 - yyj3322++ - if yyhl3322 { - yyb3322 = yyj3322 > l + var yyj3331 int + var yyb3331 bool + var yyhl3331 bool = l >= 0 + yyj3331++ + if yyhl3331 { + yyb3331 = yyj3331 > l } else { - yyb3322 = r.CheckBreak() + yyb3331 = r.CheckBreak() } - if yyb3322 { + if yyb3331 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42278,13 +42356,13 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3322++ - if yyhl3322 { - yyb3322 = yyj3322 > l + yyj3331++ + if yyhl3331 { + yyb3331 = yyj3331 > l } else { - yyb3322 = r.CheckBreak() + yyb3331 = r.CheckBreak() } - if yyb3322 { + if yyb3331 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42294,13 +42372,13 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3322++ - if yyhl3322 { - yyb3322 = yyj3322 > l + yyj3331++ + if yyhl3331 { + yyb3331 = yyj3331 > l } else { - yyb3322 = r.CheckBreak() + yyb3331 = r.CheckBreak() } - if yyb3322 { + if yyb3331 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42310,13 +42388,13 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.LabelSelector = string(r.DecodeString()) } - yyj3322++ - if yyhl3322 { - yyb3322 = yyj3322 > l + yyj3331++ + if yyhl3331 { + yyb3331 = yyj3331 > l } else { - yyb3322 = r.CheckBreak() + yyb3331 = r.CheckBreak() } - if yyb3322 { + if yyb3331 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42326,13 +42404,13 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.FieldSelector = string(r.DecodeString()) } - yyj3322++ - if yyhl3322 { - yyb3322 = yyj3322 > l + yyj3331++ + if yyhl3331 { + yyb3331 = yyj3331 > l } else { - yyb3322 = r.CheckBreak() + yyb3331 = r.CheckBreak() } - if yyb3322 { + if yyb3331 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42342,13 +42420,13 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Watch = bool(r.DecodeBool()) } - yyj3322++ - if yyhl3322 { - yyb3322 = yyj3322 > l + yyj3331++ + if yyhl3331 { + yyb3331 = yyj3331 > l } else { - yyb3322 = r.CheckBreak() + yyb3331 = r.CheckBreak() } - if yyb3322 { + if yyb3331 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42358,13 +42436,13 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.ResourceVersion = string(r.DecodeString()) } - yyj3322++ - if yyhl3322 { - yyb3322 = yyj3322 > l + yyj3331++ + if yyhl3331 { + yyb3331 = yyj3331 > l } else { - yyb3322 = r.CheckBreak() + yyb3331 = r.CheckBreak() } - if yyb3322 { + if yyb3331 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42377,25 +42455,25 @@ func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.TimeoutSeconds == nil { x.TimeoutSeconds = new(int64) } - yym3330 := z.DecBinary() - _ = yym3330 + yym3339 := z.DecBinary() + _ = yym3339 if false { } else { *((*int64)(x.TimeoutSeconds)) = int64(r.DecodeInt(64)) } } for { - yyj3322++ - if yyhl3322 { - yyb3322 = yyj3322 > l + yyj3331++ + if yyhl3331 { + yyb3331 = yyj3331 > l } else { - yyb3322 = r.CheckBreak() + yyb3331 = r.CheckBreak() } - if yyb3322 { + if yyb3331 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3322-1, "") + z.DecStructFieldNotFound(yyj3331-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -42407,44 +42485,44 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3331 := z.EncBinary() - _ = yym3331 + yym3340 := z.EncBinary() + _ = yym3340 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3332 := !z.EncBinary() - yy2arr3332 := z.EncBasicHandle().StructToArray - var yyq3332 [10]bool - _, _, _ = yysep3332, yyq3332, yy2arr3332 - const yyr3332 bool = false - yyq3332[0] = x.Kind != "" - yyq3332[1] = x.APIVersion != "" - yyq3332[2] = x.Container != "" - yyq3332[3] = x.Follow != false - yyq3332[4] = x.Previous != false - yyq3332[5] = x.SinceSeconds != nil - yyq3332[6] = x.SinceTime != nil - yyq3332[7] = x.Timestamps != false - yyq3332[8] = x.TailLines != nil - yyq3332[9] = x.LimitBytes != nil - var yynn3332 int - if yyr3332 || yy2arr3332 { + yysep3341 := !z.EncBinary() + yy2arr3341 := z.EncBasicHandle().StructToArray + var yyq3341 [10]bool + _, _, _ = yysep3341, yyq3341, yy2arr3341 + const yyr3341 bool = false + yyq3341[0] = x.Kind != "" + yyq3341[1] = x.APIVersion != "" + yyq3341[2] = x.Container != "" + yyq3341[3] = x.Follow != false + yyq3341[4] = x.Previous != false + yyq3341[5] = x.SinceSeconds != nil + yyq3341[6] = x.SinceTime != nil + yyq3341[7] = x.Timestamps != false + yyq3341[8] = x.TailLines != nil + yyq3341[9] = x.LimitBytes != nil + var yynn3341 int + if yyr3341 || yy2arr3341 { r.EncodeArrayStart(10) } else { - yynn3332 = 0 - for _, b := range yyq3332 { + yynn3341 = 0 + for _, b := range yyq3341 { if b { - yynn3332++ + yynn3341++ } } - r.EncodeMapStart(yynn3332) - yynn3332 = 0 + r.EncodeMapStart(yynn3341) + yynn3341 = 0 } - if yyr3332 || yy2arr3332 { + if yyr3341 || yy2arr3341 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3332[0] { - yym3334 := z.EncBinary() - _ = yym3334 + if yyq3341[0] { + yym3343 := z.EncBinary() + _ = yym3343 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -42453,23 +42531,23 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3332[0] { + if yyq3341[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3335 := z.EncBinary() - _ = yym3335 + yym3344 := z.EncBinary() + _ = yym3344 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3332 || yy2arr3332 { + if yyr3341 || yy2arr3341 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3332[1] { - yym3337 := z.EncBinary() - _ = yym3337 + if yyq3341[1] { + yym3346 := z.EncBinary() + _ = yym3346 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -42478,23 +42556,23 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3332[1] { + if yyq3341[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3338 := z.EncBinary() - _ = yym3338 + yym3347 := z.EncBinary() + _ = yym3347 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3332 || yy2arr3332 { + if yyr3341 || yy2arr3341 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3332[2] { - yym3340 := z.EncBinary() - _ = yym3340 + if yyq3341[2] { + yym3349 := z.EncBinary() + _ = yym3349 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) @@ -42503,23 +42581,23 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3332[2] { + if yyq3341[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("container")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3341 := z.EncBinary() - _ = yym3341 + yym3350 := z.EncBinary() + _ = yym3350 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) } } } - if yyr3332 || yy2arr3332 { + if yyr3341 || yy2arr3341 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3332[3] { - yym3343 := z.EncBinary() - _ = yym3343 + if yyq3341[3] { + yym3352 := z.EncBinary() + _ = yym3352 if false { } else { r.EncodeBool(bool(x.Follow)) @@ -42528,23 +42606,23 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq3332[3] { + if yyq3341[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("follow")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3344 := z.EncBinary() - _ = yym3344 + yym3353 := z.EncBinary() + _ = yym3353 if false { } else { r.EncodeBool(bool(x.Follow)) } } } - if yyr3332 || yy2arr3332 { + if yyr3341 || yy2arr3341 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3332[4] { - yym3346 := z.EncBinary() - _ = yym3346 + if yyq3341[4] { + yym3355 := z.EncBinary() + _ = yym3355 if false { } else { r.EncodeBool(bool(x.Previous)) @@ -42553,66 +42631,66 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq3332[4] { + if yyq3341[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("previous")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3347 := z.EncBinary() - _ = yym3347 + yym3356 := z.EncBinary() + _ = yym3356 if false { } else { r.EncodeBool(bool(x.Previous)) } } } - if yyr3332 || yy2arr3332 { + if yyr3341 || yy2arr3341 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3332[5] { + if yyq3341[5] { if x.SinceSeconds == nil { r.EncodeNil() } else { - yy3349 := *x.SinceSeconds - yym3350 := z.EncBinary() - _ = yym3350 + yy3358 := *x.SinceSeconds + yym3359 := z.EncBinary() + _ = yym3359 if false { } else { - r.EncodeInt(int64(yy3349)) + r.EncodeInt(int64(yy3358)) } } } else { r.EncodeNil() } } else { - if yyq3332[5] { + if yyq3341[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("sinceSeconds")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.SinceSeconds == nil { r.EncodeNil() } else { - yy3351 := *x.SinceSeconds - yym3352 := z.EncBinary() - _ = yym3352 + yy3360 := *x.SinceSeconds + yym3361 := z.EncBinary() + _ = yym3361 if false { } else { - r.EncodeInt(int64(yy3351)) + r.EncodeInt(int64(yy3360)) } } } } - if yyr3332 || yy2arr3332 { + if yyr3341 || yy2arr3341 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3332[6] { + if yyq3341[6] { if x.SinceTime == nil { r.EncodeNil() } else { - yym3354 := z.EncBinary() - _ = yym3354 + yym3363 := z.EncBinary() + _ = yym3363 if false { } else if z.HasExtensions() && z.EncExt(x.SinceTime) { - } else if yym3354 { + } else if yym3363 { z.EncBinaryMarshal(x.SinceTime) - } else if !yym3354 && z.IsJSONHandle() { + } else if !yym3363 && z.IsJSONHandle() { z.EncJSONMarshal(x.SinceTime) } else { z.EncFallback(x.SinceTime) @@ -42622,20 +42700,20 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3332[6] { + if yyq3341[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("sinceTime")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.SinceTime == nil { r.EncodeNil() } else { - yym3355 := z.EncBinary() - _ = yym3355 + yym3364 := z.EncBinary() + _ = yym3364 if false { } else if z.HasExtensions() && z.EncExt(x.SinceTime) { - } else if yym3355 { + } else if yym3364 { z.EncBinaryMarshal(x.SinceTime) - } else if !yym3355 && z.IsJSONHandle() { + } else if !yym3364 && z.IsJSONHandle() { z.EncJSONMarshal(x.SinceTime) } else { z.EncFallback(x.SinceTime) @@ -42643,11 +42721,11 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3332 || yy2arr3332 { + if yyr3341 || yy2arr3341 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3332[7] { - yym3357 := z.EncBinary() - _ = yym3357 + if yyq3341[7] { + yym3366 := z.EncBinary() + _ = yym3366 if false { } else { r.EncodeBool(bool(x.Timestamps)) @@ -42656,89 +42734,89 @@ func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq3332[7] { + if yyq3341[7] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("timestamps")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3358 := z.EncBinary() - _ = yym3358 + yym3367 := z.EncBinary() + _ = yym3367 if false { } else { r.EncodeBool(bool(x.Timestamps)) } } } - if yyr3332 || yy2arr3332 { + if yyr3341 || yy2arr3341 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3332[8] { + if yyq3341[8] { if x.TailLines == nil { r.EncodeNil() } else { - yy3360 := *x.TailLines - yym3361 := z.EncBinary() - _ = yym3361 + yy3369 := *x.TailLines + yym3370 := z.EncBinary() + _ = yym3370 if false { } else { - r.EncodeInt(int64(yy3360)) + r.EncodeInt(int64(yy3369)) } } } else { r.EncodeNil() } } else { - if yyq3332[8] { + if yyq3341[8] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("tailLines")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.TailLines == nil { r.EncodeNil() } else { - yy3362 := *x.TailLines - yym3363 := z.EncBinary() - _ = yym3363 + yy3371 := *x.TailLines + yym3372 := z.EncBinary() + _ = yym3372 if false { } else { - r.EncodeInt(int64(yy3362)) + r.EncodeInt(int64(yy3371)) } } } } - if yyr3332 || yy2arr3332 { + if yyr3341 || yy2arr3341 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3332[9] { + if yyq3341[9] { if x.LimitBytes == nil { r.EncodeNil() } else { - yy3365 := *x.LimitBytes - yym3366 := z.EncBinary() - _ = yym3366 + yy3374 := *x.LimitBytes + yym3375 := z.EncBinary() + _ = yym3375 if false { } else { - r.EncodeInt(int64(yy3365)) + r.EncodeInt(int64(yy3374)) } } } else { r.EncodeNil() } } else { - if yyq3332[9] { + if yyq3341[9] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("limitBytes")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.LimitBytes == nil { r.EncodeNil() } else { - yy3367 := *x.LimitBytes - yym3368 := z.EncBinary() - _ = yym3368 + yy3376 := *x.LimitBytes + yym3377 := z.EncBinary() + _ = yym3377 if false { } else { - r.EncodeInt(int64(yy3367)) + r.EncodeInt(int64(yy3376)) } } } } - if yyr3332 || yy2arr3332 { + if yyr3341 || yy2arr3341 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -42751,25 +42829,25 @@ func (x *PodLogOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3369 := z.DecBinary() - _ = yym3369 + yym3378 := z.DecBinary() + _ = yym3378 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3370 := r.ContainerType() - if yyct3370 == codecSelferValueTypeMap1234 { - yyl3370 := r.ReadMapStart() - if yyl3370 == 0 { + yyct3379 := r.ContainerType() + if yyct3379 == codecSelferValueTypeMap1234 { + yyl3379 := r.ReadMapStart() + if yyl3379 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3370, d) + x.codecDecodeSelfFromMap(yyl3379, d) } - } else if yyct3370 == codecSelferValueTypeArray1234 { - yyl3370 := r.ReadArrayStart() - if yyl3370 == 0 { + } else if yyct3379 == codecSelferValueTypeArray1234 { + yyl3379 := r.ReadArrayStart() + if yyl3379 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3370, d) + x.codecDecodeSelfFromArray(yyl3379, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -42781,12 +42859,12 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3371Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3371Slc - var yyhl3371 bool = l >= 0 - for yyj3371 := 0; ; yyj3371++ { - if yyhl3371 { - if yyj3371 >= l { + var yys3380Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3380Slc + var yyhl3380 bool = l >= 0 + for yyj3380 := 0; ; yyj3380++ { + if yyhl3380 { + if yyj3380 >= l { break } } else { @@ -42795,10 +42873,10 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3371Slc = r.DecodeBytes(yys3371Slc, true, true) - yys3371 := string(yys3371Slc) + yys3380Slc = r.DecodeBytes(yys3380Slc, true, true) + yys3380 := string(yys3380Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3371 { + switch yys3380 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -42838,8 +42916,8 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.SinceSeconds == nil { x.SinceSeconds = new(int64) } - yym3378 := z.DecBinary() - _ = yym3378 + yym3387 := z.DecBinary() + _ = yym3387 if false { } else { *((*int64)(x.SinceSeconds)) = int64(r.DecodeInt(64)) @@ -42854,13 +42932,13 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.SinceTime == nil { x.SinceTime = new(pkg2_unversioned.Time) } - yym3380 := z.DecBinary() - _ = yym3380 + yym3389 := z.DecBinary() + _ = yym3389 if false { } else if z.HasExtensions() && z.DecExt(x.SinceTime) { - } else if yym3380 { + } else if yym3389 { z.DecBinaryUnmarshal(x.SinceTime) - } else if !yym3380 && z.IsJSONHandle() { + } else if !yym3389 && z.IsJSONHandle() { z.DecJSONUnmarshal(x.SinceTime) } else { z.DecFallback(x.SinceTime, false) @@ -42881,8 +42959,8 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.TailLines == nil { x.TailLines = new(int64) } - yym3383 := z.DecBinary() - _ = yym3383 + yym3392 := z.DecBinary() + _ = yym3392 if false { } else { *((*int64)(x.TailLines)) = int64(r.DecodeInt(64)) @@ -42897,17 +42975,17 @@ func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.LimitBytes == nil { x.LimitBytes = new(int64) } - yym3385 := z.DecBinary() - _ = yym3385 + yym3394 := z.DecBinary() + _ = yym3394 if false { } else { *((*int64)(x.LimitBytes)) = int64(r.DecodeInt(64)) } } default: - z.DecStructFieldNotFound(-1, yys3371) - } // end switch yys3371 - } // end for yyj3371 + z.DecStructFieldNotFound(-1, yys3380) + } // end switch yys3380 + } // end for yyj3380 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -42915,16 +42993,16 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3386 int - var yyb3386 bool - var yyhl3386 bool = l >= 0 - yyj3386++ - if yyhl3386 { - yyb3386 = yyj3386 > l + var yyj3395 int + var yyb3395 bool + var yyhl3395 bool = l >= 0 + yyj3395++ + if yyhl3395 { + yyb3395 = yyj3395 > l } else { - yyb3386 = r.CheckBreak() + yyb3395 = r.CheckBreak() } - if yyb3386 { + if yyb3395 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42934,13 +43012,13 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3386++ - if yyhl3386 { - yyb3386 = yyj3386 > l + yyj3395++ + if yyhl3395 { + yyb3395 = yyj3395 > l } else { - yyb3386 = r.CheckBreak() + yyb3395 = r.CheckBreak() } - if yyb3386 { + if yyb3395 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42950,13 +43028,13 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3386++ - if yyhl3386 { - yyb3386 = yyj3386 > l + yyj3395++ + if yyhl3395 { + yyb3395 = yyj3395 > l } else { - yyb3386 = r.CheckBreak() + yyb3395 = r.CheckBreak() } - if yyb3386 { + if yyb3395 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42966,13 +43044,13 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Container = string(r.DecodeString()) } - yyj3386++ - if yyhl3386 { - yyb3386 = yyj3386 > l + yyj3395++ + if yyhl3395 { + yyb3395 = yyj3395 > l } else { - yyb3386 = r.CheckBreak() + yyb3395 = r.CheckBreak() } - if yyb3386 { + if yyb3395 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42982,13 +43060,13 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Follow = bool(r.DecodeBool()) } - yyj3386++ - if yyhl3386 { - yyb3386 = yyj3386 > l + yyj3395++ + if yyhl3395 { + yyb3395 = yyj3395 > l } else { - yyb3386 = r.CheckBreak() + yyb3395 = r.CheckBreak() } - if yyb3386 { + if yyb3395 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -42998,13 +43076,13 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Previous = bool(r.DecodeBool()) } - yyj3386++ - if yyhl3386 { - yyb3386 = yyj3386 > l + yyj3395++ + if yyhl3395 { + yyb3395 = yyj3395 > l } else { - yyb3386 = r.CheckBreak() + yyb3395 = r.CheckBreak() } - if yyb3386 { + if yyb3395 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43017,20 +43095,20 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.SinceSeconds == nil { x.SinceSeconds = new(int64) } - yym3393 := z.DecBinary() - _ = yym3393 + yym3402 := z.DecBinary() + _ = yym3402 if false { } else { *((*int64)(x.SinceSeconds)) = int64(r.DecodeInt(64)) } } - yyj3386++ - if yyhl3386 { - yyb3386 = yyj3386 > l + yyj3395++ + if yyhl3395 { + yyb3395 = yyj3395 > l } else { - yyb3386 = r.CheckBreak() + yyb3395 = r.CheckBreak() } - if yyb3386 { + if yyb3395 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43043,25 +43121,25 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.SinceTime == nil { x.SinceTime = new(pkg2_unversioned.Time) } - yym3395 := z.DecBinary() - _ = yym3395 + yym3404 := z.DecBinary() + _ = yym3404 if false { } else if z.HasExtensions() && z.DecExt(x.SinceTime) { - } else if yym3395 { + } else if yym3404 { z.DecBinaryUnmarshal(x.SinceTime) - } else if !yym3395 && z.IsJSONHandle() { + } else if !yym3404 && z.IsJSONHandle() { z.DecJSONUnmarshal(x.SinceTime) } else { z.DecFallback(x.SinceTime, false) } } - yyj3386++ - if yyhl3386 { - yyb3386 = yyj3386 > l + yyj3395++ + if yyhl3395 { + yyb3395 = yyj3395 > l } else { - yyb3386 = r.CheckBreak() + yyb3395 = r.CheckBreak() } - if yyb3386 { + if yyb3395 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43071,13 +43149,13 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Timestamps = bool(r.DecodeBool()) } - yyj3386++ - if yyhl3386 { - yyb3386 = yyj3386 > l + yyj3395++ + if yyhl3395 { + yyb3395 = yyj3395 > l } else { - yyb3386 = r.CheckBreak() + yyb3395 = r.CheckBreak() } - if yyb3386 { + if yyb3395 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43090,20 +43168,20 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.TailLines == nil { x.TailLines = new(int64) } - yym3398 := z.DecBinary() - _ = yym3398 + yym3407 := z.DecBinary() + _ = yym3407 if false { } else { *((*int64)(x.TailLines)) = int64(r.DecodeInt(64)) } } - yyj3386++ - if yyhl3386 { - yyb3386 = yyj3386 > l + yyj3395++ + if yyhl3395 { + yyb3395 = yyj3395 > l } else { - yyb3386 = r.CheckBreak() + yyb3395 = r.CheckBreak() } - if yyb3386 { + if yyb3395 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43116,25 +43194,25 @@ func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.LimitBytes == nil { x.LimitBytes = new(int64) } - yym3400 := z.DecBinary() - _ = yym3400 + yym3409 := z.DecBinary() + _ = yym3409 if false { } else { *((*int64)(x.LimitBytes)) = int64(r.DecodeInt(64)) } } for { - yyj3386++ - if yyhl3386 { - yyb3386 = yyj3386 > l + yyj3395++ + if yyhl3395 { + yyb3395 = yyj3395 > l } else { - yyb3386 = r.CheckBreak() + yyb3395 = r.CheckBreak() } - if yyb3386 { + if yyb3395 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3386-1, "") + z.DecStructFieldNotFound(yyj3395-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -43146,41 +43224,41 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3401 := z.EncBinary() - _ = yym3401 + yym3410 := z.EncBinary() + _ = yym3410 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3402 := !z.EncBinary() - yy2arr3402 := z.EncBasicHandle().StructToArray - var yyq3402 [7]bool - _, _, _ = yysep3402, yyq3402, yy2arr3402 - const yyr3402 bool = false - yyq3402[0] = x.Kind != "" - yyq3402[1] = x.APIVersion != "" - yyq3402[2] = x.Stdin != false - yyq3402[3] = x.Stdout != false - yyq3402[4] = x.Stderr != false - yyq3402[5] = x.TTY != false - yyq3402[6] = x.Container != "" - var yynn3402 int - if yyr3402 || yy2arr3402 { + yysep3411 := !z.EncBinary() + yy2arr3411 := z.EncBasicHandle().StructToArray + var yyq3411 [7]bool + _, _, _ = yysep3411, yyq3411, yy2arr3411 + const yyr3411 bool = false + yyq3411[0] = x.Kind != "" + yyq3411[1] = x.APIVersion != "" + yyq3411[2] = x.Stdin != false + yyq3411[3] = x.Stdout != false + yyq3411[4] = x.Stderr != false + yyq3411[5] = x.TTY != false + yyq3411[6] = x.Container != "" + var yynn3411 int + if yyr3411 || yy2arr3411 { r.EncodeArrayStart(7) } else { - yynn3402 = 0 - for _, b := range yyq3402 { + yynn3411 = 0 + for _, b := range yyq3411 { if b { - yynn3402++ + yynn3411++ } } - r.EncodeMapStart(yynn3402) - yynn3402 = 0 + r.EncodeMapStart(yynn3411) + yynn3411 = 0 } - if yyr3402 || yy2arr3402 { + if yyr3411 || yy2arr3411 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3402[0] { - yym3404 := z.EncBinary() - _ = yym3404 + if yyq3411[0] { + yym3413 := z.EncBinary() + _ = yym3413 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -43189,23 +43267,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3402[0] { + if yyq3411[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3405 := z.EncBinary() - _ = yym3405 + yym3414 := z.EncBinary() + _ = yym3414 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3402 || yy2arr3402 { + if yyr3411 || yy2arr3411 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3402[1] { - yym3407 := z.EncBinary() - _ = yym3407 + if yyq3411[1] { + yym3416 := z.EncBinary() + _ = yym3416 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -43214,23 +43292,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3402[1] { + if yyq3411[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3408 := z.EncBinary() - _ = yym3408 + yym3417 := z.EncBinary() + _ = yym3417 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3402 || yy2arr3402 { + if yyr3411 || yy2arr3411 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3402[2] { - yym3410 := z.EncBinary() - _ = yym3410 + if yyq3411[2] { + yym3419 := z.EncBinary() + _ = yym3419 if false { } else { r.EncodeBool(bool(x.Stdin)) @@ -43239,23 +43317,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq3402[2] { + if yyq3411[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("stdin")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3411 := z.EncBinary() - _ = yym3411 + yym3420 := z.EncBinary() + _ = yym3420 if false { } else { r.EncodeBool(bool(x.Stdin)) } } } - if yyr3402 || yy2arr3402 { + if yyr3411 || yy2arr3411 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3402[3] { - yym3413 := z.EncBinary() - _ = yym3413 + if yyq3411[3] { + yym3422 := z.EncBinary() + _ = yym3422 if false { } else { r.EncodeBool(bool(x.Stdout)) @@ -43264,23 +43342,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq3402[3] { + if yyq3411[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("stdout")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3414 := z.EncBinary() - _ = yym3414 + yym3423 := z.EncBinary() + _ = yym3423 if false { } else { r.EncodeBool(bool(x.Stdout)) } } } - if yyr3402 || yy2arr3402 { + if yyr3411 || yy2arr3411 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3402[4] { - yym3416 := z.EncBinary() - _ = yym3416 + if yyq3411[4] { + yym3425 := z.EncBinary() + _ = yym3425 if false { } else { r.EncodeBool(bool(x.Stderr)) @@ -43289,23 +43367,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq3402[4] { + if yyq3411[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("stderr")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3417 := z.EncBinary() - _ = yym3417 + yym3426 := z.EncBinary() + _ = yym3426 if false { } else { r.EncodeBool(bool(x.Stderr)) } } } - if yyr3402 || yy2arr3402 { + if yyr3411 || yy2arr3411 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3402[5] { - yym3419 := z.EncBinary() - _ = yym3419 + if yyq3411[5] { + yym3428 := z.EncBinary() + _ = yym3428 if false { } else { r.EncodeBool(bool(x.TTY)) @@ -43314,23 +43392,23 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq3402[5] { + if yyq3411[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("tty")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3420 := z.EncBinary() - _ = yym3420 + yym3429 := z.EncBinary() + _ = yym3429 if false { } else { r.EncodeBool(bool(x.TTY)) } } } - if yyr3402 || yy2arr3402 { + if yyr3411 || yy2arr3411 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3402[6] { - yym3422 := z.EncBinary() - _ = yym3422 + if yyq3411[6] { + yym3431 := z.EncBinary() + _ = yym3431 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) @@ -43339,19 +43417,19 @@ func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3402[6] { + if yyq3411[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("container")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3423 := z.EncBinary() - _ = yym3423 + yym3432 := z.EncBinary() + _ = yym3432 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) } } } - if yyr3402 || yy2arr3402 { + if yyr3411 || yy2arr3411 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -43364,25 +43442,25 @@ func (x *PodAttachOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3424 := z.DecBinary() - _ = yym3424 + yym3433 := z.DecBinary() + _ = yym3433 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3425 := r.ContainerType() - if yyct3425 == codecSelferValueTypeMap1234 { - yyl3425 := r.ReadMapStart() - if yyl3425 == 0 { + yyct3434 := r.ContainerType() + if yyct3434 == codecSelferValueTypeMap1234 { + yyl3434 := r.ReadMapStart() + if yyl3434 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3425, d) + x.codecDecodeSelfFromMap(yyl3434, d) } - } else if yyct3425 == codecSelferValueTypeArray1234 { - yyl3425 := r.ReadArrayStart() - if yyl3425 == 0 { + } else if yyct3434 == codecSelferValueTypeArray1234 { + yyl3434 := r.ReadArrayStart() + if yyl3434 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3425, d) + x.codecDecodeSelfFromArray(yyl3434, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -43394,12 +43472,12 @@ func (x *PodAttachOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3426Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3426Slc - var yyhl3426 bool = l >= 0 - for yyj3426 := 0; ; yyj3426++ { - if yyhl3426 { - if yyj3426 >= l { + var yys3435Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3435Slc + var yyhl3435 bool = l >= 0 + for yyj3435 := 0; ; yyj3435++ { + if yyhl3435 { + if yyj3435 >= l { break } } else { @@ -43408,10 +43486,10 @@ func (x *PodAttachOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3426Slc = r.DecodeBytes(yys3426Slc, true, true) - yys3426 := string(yys3426Slc) + yys3435Slc = r.DecodeBytes(yys3435Slc, true, true) + yys3435 := string(yys3435Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3426 { + switch yys3435 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -43455,9 +43533,9 @@ func (x *PodAttachOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Container = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3426) - } // end switch yys3426 - } // end for yyj3426 + z.DecStructFieldNotFound(-1, yys3435) + } // end switch yys3435 + } // end for yyj3435 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -43465,16 +43543,16 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3434 int - var yyb3434 bool - var yyhl3434 bool = l >= 0 - yyj3434++ - if yyhl3434 { - yyb3434 = yyj3434 > l + var yyj3443 int + var yyb3443 bool + var yyhl3443 bool = l >= 0 + yyj3443++ + if yyhl3443 { + yyb3443 = yyj3443 > l } else { - yyb3434 = r.CheckBreak() + yyb3443 = r.CheckBreak() } - if yyb3434 { + if yyb3443 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43484,13 +43562,13 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj3434++ - if yyhl3434 { - yyb3434 = yyj3434 > l + yyj3443++ + if yyhl3443 { + yyb3443 = yyj3443 > l } else { - yyb3434 = r.CheckBreak() + yyb3443 = r.CheckBreak() } - if yyb3434 { + if yyb3443 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43500,13 +43578,13 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj3434++ - if yyhl3434 { - yyb3434 = yyj3434 > l + yyj3443++ + if yyhl3443 { + yyb3443 = yyj3443 > l } else { - yyb3434 = r.CheckBreak() + yyb3443 = r.CheckBreak() } - if yyb3434 { + if yyb3443 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43516,13 +43594,13 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Stdin = bool(r.DecodeBool()) } - yyj3434++ - if yyhl3434 { - yyb3434 = yyj3434 > l + yyj3443++ + if yyhl3443 { + yyb3443 = yyj3443 > l } else { - yyb3434 = r.CheckBreak() + yyb3443 = r.CheckBreak() } - if yyb3434 { + if yyb3443 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43532,13 +43610,13 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Stdout = bool(r.DecodeBool()) } - yyj3434++ - if yyhl3434 { - yyb3434 = yyj3434 > l + yyj3443++ + if yyhl3443 { + yyb3443 = yyj3443 > l } else { - yyb3434 = r.CheckBreak() + yyb3443 = r.CheckBreak() } - if yyb3434 { + if yyb3443 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43548,13 +43626,13 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Stderr = bool(r.DecodeBool()) } - yyj3434++ - if yyhl3434 { - yyb3434 = yyj3434 > l + yyj3443++ + if yyhl3443 { + yyb3443 = yyj3443 > l } else { - yyb3434 = r.CheckBreak() + yyb3443 = r.CheckBreak() } - if yyb3434 { + if yyb3443 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43564,13 +43642,13 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.TTY = bool(r.DecodeBool()) } - yyj3434++ - if yyhl3434 { - yyb3434 = yyj3434 > l + yyj3443++ + if yyhl3443 { + yyb3443 = yyj3443 > l } else { - yyb3434 = r.CheckBreak() + yyb3443 = r.CheckBreak() } - if yyb3434 { + if yyb3443 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43581,17 +43659,17 @@ func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) x.Container = string(r.DecodeString()) } for { - yyj3434++ - if yyhl3434 { - yyb3434 = yyj3434 > l + yyj3443++ + if yyhl3443 { + yyb3443 = yyj3443 > l } else { - yyb3434 = r.CheckBreak() + yyb3443 = r.CheckBreak() } - if yyb3434 { + if yyb3443 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3434-1, "") + z.DecStructFieldNotFound(yyj3443-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -43603,41 +43681,41 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3442 := z.EncBinary() - _ = yym3442 + yym3451 := z.EncBinary() + _ = yym3451 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3443 := !z.EncBinary() - yy2arr3443 := z.EncBasicHandle().StructToArray - var yyq3443 [8]bool - _, _, _ = yysep3443, yyq3443, yy2arr3443 - const yyr3443 bool = false - yyq3443[0] = x.Kind != "" - yyq3443[1] = x.APIVersion != "" - yyq3443[2] = x.Stdin != false - yyq3443[3] = x.Stdout != false - yyq3443[4] = x.Stderr != false - yyq3443[5] = x.TTY != false - yyq3443[6] = x.Container != "" - var yynn3443 int - if yyr3443 || yy2arr3443 { + yysep3452 := !z.EncBinary() + yy2arr3452 := z.EncBasicHandle().StructToArray + var yyq3452 [8]bool + _, _, _ = yysep3452, yyq3452, yy2arr3452 + const yyr3452 bool = false + yyq3452[0] = x.Kind != "" + yyq3452[1] = x.APIVersion != "" + yyq3452[2] = x.Stdin != false + yyq3452[3] = x.Stdout != false + yyq3452[4] = x.Stderr != false + yyq3452[5] = x.TTY != false + yyq3452[6] = x.Container != "" + var yynn3452 int + if yyr3452 || yy2arr3452 { r.EncodeArrayStart(8) } else { - yynn3443 = 1 - for _, b := range yyq3443 { + yynn3452 = 1 + for _, b := range yyq3452 { if b { - yynn3443++ + yynn3452++ } } - r.EncodeMapStart(yynn3443) - yynn3443 = 0 + r.EncodeMapStart(yynn3452) + yynn3452 = 0 } - if yyr3443 || yy2arr3443 { + if yyr3452 || yy2arr3452 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3443[0] { - yym3445 := z.EncBinary() - _ = yym3445 + if yyq3452[0] { + yym3454 := z.EncBinary() + _ = yym3454 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -43646,23 +43724,23 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3443[0] { + if yyq3452[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3446 := z.EncBinary() - _ = yym3446 + yym3455 := z.EncBinary() + _ = yym3455 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3443 || yy2arr3443 { + if yyr3452 || yy2arr3452 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3443[1] { - yym3448 := z.EncBinary() - _ = yym3448 + if yyq3452[1] { + yym3457 := z.EncBinary() + _ = yym3457 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -43671,23 +43749,23 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3443[1] { + if yyq3452[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3449 := z.EncBinary() - _ = yym3449 + yym3458 := z.EncBinary() + _ = yym3458 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3443 || yy2arr3443 { + if yyr3452 || yy2arr3452 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3443[2] { - yym3451 := z.EncBinary() - _ = yym3451 + if yyq3452[2] { + yym3460 := z.EncBinary() + _ = yym3460 if false { } else { r.EncodeBool(bool(x.Stdin)) @@ -43696,23 +43774,23 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq3443[2] { + if yyq3452[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("stdin")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3452 := z.EncBinary() - _ = yym3452 + yym3461 := z.EncBinary() + _ = yym3461 if false { } else { r.EncodeBool(bool(x.Stdin)) } } } - if yyr3443 || yy2arr3443 { + if yyr3452 || yy2arr3452 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3443[3] { - yym3454 := z.EncBinary() - _ = yym3454 + if yyq3452[3] { + yym3463 := z.EncBinary() + _ = yym3463 if false { } else { r.EncodeBool(bool(x.Stdout)) @@ -43721,23 +43799,23 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq3443[3] { + if yyq3452[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("stdout")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3455 := z.EncBinary() - _ = yym3455 + yym3464 := z.EncBinary() + _ = yym3464 if false { } else { r.EncodeBool(bool(x.Stdout)) } } } - if yyr3443 || yy2arr3443 { + if yyr3452 || yy2arr3452 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3443[4] { - yym3457 := z.EncBinary() - _ = yym3457 + if yyq3452[4] { + yym3466 := z.EncBinary() + _ = yym3466 if false { } else { r.EncodeBool(bool(x.Stderr)) @@ -43746,23 +43824,23 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq3443[4] { + if yyq3452[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("stderr")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3458 := z.EncBinary() - _ = yym3458 + yym3467 := z.EncBinary() + _ = yym3467 if false { } else { r.EncodeBool(bool(x.Stderr)) } } } - if yyr3443 || yy2arr3443 { + if yyr3452 || yy2arr3452 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3443[5] { - yym3460 := z.EncBinary() - _ = yym3460 + if yyq3452[5] { + yym3469 := z.EncBinary() + _ = yym3469 if false { } else { r.EncodeBool(bool(x.TTY)) @@ -43771,23 +43849,23 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeBool(false) } } else { - if yyq3443[5] { + if yyq3452[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("tty")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3461 := z.EncBinary() - _ = yym3461 + yym3470 := z.EncBinary() + _ = yym3470 if false { } else { r.EncodeBool(bool(x.TTY)) } } } - if yyr3443 || yy2arr3443 { + if yyr3452 || yy2arr3452 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3443[6] { - yym3463 := z.EncBinary() - _ = yym3463 + if yyq3452[6] { + yym3472 := z.EncBinary() + _ = yym3472 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) @@ -43796,25 +43874,25 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3443[6] { + if yyq3452[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("container")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3464 := z.EncBinary() - _ = yym3464 + yym3473 := z.EncBinary() + _ = yym3473 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Container)) } } } - if yyr3443 || yy2arr3443 { + if yyr3452 || yy2arr3452 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Command == nil { r.EncodeNil() } else { - yym3466 := z.EncBinary() - _ = yym3466 + yym3475 := z.EncBinary() + _ = yym3475 if false { } else { z.F.EncSliceStringV(x.Command, false, e) @@ -43827,15 +43905,15 @@ func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x.Command == nil { r.EncodeNil() } else { - yym3467 := z.EncBinary() - _ = yym3467 + yym3476 := z.EncBinary() + _ = yym3476 if false { } else { z.F.EncSliceStringV(x.Command, false, e) } } } - if yyr3443 || yy2arr3443 { + if yyr3452 || yy2arr3452 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -43848,25 +43926,25 @@ func (x *PodExecOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3468 := z.DecBinary() - _ = yym3468 + yym3477 := z.DecBinary() + _ = yym3477 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3469 := r.ContainerType() - if yyct3469 == codecSelferValueTypeMap1234 { - yyl3469 := r.ReadMapStart() - if yyl3469 == 0 { + yyct3478 := r.ContainerType() + if yyct3478 == codecSelferValueTypeMap1234 { + yyl3478 := r.ReadMapStart() + if yyl3478 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3469, d) + x.codecDecodeSelfFromMap(yyl3478, d) } - } else if yyct3469 == codecSelferValueTypeArray1234 { - yyl3469 := r.ReadArrayStart() - if yyl3469 == 0 { + } else if yyct3478 == codecSelferValueTypeArray1234 { + yyl3478 := r.ReadArrayStart() + if yyl3478 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3469, d) + x.codecDecodeSelfFromArray(yyl3478, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -43878,12 +43956,12 @@ func (x *PodExecOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3470Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3470Slc - var yyhl3470 bool = l >= 0 - for yyj3470 := 0; ; yyj3470++ { - if yyhl3470 { - if yyj3470 >= l { + var yys3479Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3479Slc + var yyhl3479 bool = l >= 0 + for yyj3479 := 0; ; yyj3479++ { + if yyhl3479 { + if yyj3479 >= l { break } } else { @@ -43892,10 +43970,10 @@ func (x *PodExecOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3470Slc = r.DecodeBytes(yys3470Slc, true, true) - yys3470 := string(yys3470Slc) + yys3479Slc = r.DecodeBytes(yys3479Slc, true, true) + yys3479 := string(yys3479Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3470 { + switch yys3479 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -43942,18 +44020,18 @@ func (x *PodExecOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Command = nil } else { - yyv3478 := &x.Command - yym3479 := z.DecBinary() - _ = yym3479 + yyv3487 := &x.Command + yym3488 := z.DecBinary() + _ = yym3488 if false { } else { - z.F.DecSliceStringX(yyv3478, false, d) + z.F.DecSliceStringX(yyv3487, false, d) } } default: - z.DecStructFieldNotFound(-1, yys3470) - } // end switch yys3470 - } // end for yyj3470 + z.DecStructFieldNotFound(-1, yys3479) + } // end switch yys3479 + } // end for yyj3479 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -43961,16 +44039,16 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3480 int - var yyb3480 bool - var yyhl3480 bool = l >= 0 - yyj3480++ - if yyhl3480 { - yyb3480 = yyj3480 > l + var yyj3489 int + var yyb3489 bool + var yyhl3489 bool = l >= 0 + yyj3489++ + if yyhl3489 { + yyb3489 = yyj3489 > l } else { - yyb3480 = r.CheckBreak() + yyb3489 = r.CheckBreak() } - if yyb3480 { + if yyb3489 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43980,13 +44058,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3480++ - if yyhl3480 { - yyb3480 = yyj3480 > l + yyj3489++ + if yyhl3489 { + yyb3489 = yyj3489 > l } else { - yyb3480 = r.CheckBreak() + yyb3489 = r.CheckBreak() } - if yyb3480 { + if yyb3489 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -43996,13 +44074,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3480++ - if yyhl3480 { - yyb3480 = yyj3480 > l + yyj3489++ + if yyhl3489 { + yyb3489 = yyj3489 > l } else { - yyb3480 = r.CheckBreak() + yyb3489 = r.CheckBreak() } - if yyb3480 { + if yyb3489 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44012,13 +44090,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Stdin = bool(r.DecodeBool()) } - yyj3480++ - if yyhl3480 { - yyb3480 = yyj3480 > l + yyj3489++ + if yyhl3489 { + yyb3489 = yyj3489 > l } else { - yyb3480 = r.CheckBreak() + yyb3489 = r.CheckBreak() } - if yyb3480 { + if yyb3489 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44028,13 +44106,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Stdout = bool(r.DecodeBool()) } - yyj3480++ - if yyhl3480 { - yyb3480 = yyj3480 > l + yyj3489++ + if yyhl3489 { + yyb3489 = yyj3489 > l } else { - yyb3480 = r.CheckBreak() + yyb3489 = r.CheckBreak() } - if yyb3480 { + if yyb3489 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44044,13 +44122,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Stderr = bool(r.DecodeBool()) } - yyj3480++ - if yyhl3480 { - yyb3480 = yyj3480 > l + yyj3489++ + if yyhl3489 { + yyb3489 = yyj3489 > l } else { - yyb3480 = r.CheckBreak() + yyb3489 = r.CheckBreak() } - if yyb3480 { + if yyb3489 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44060,13 +44138,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.TTY = bool(r.DecodeBool()) } - yyj3480++ - if yyhl3480 { - yyb3480 = yyj3480 > l + yyj3489++ + if yyhl3489 { + yyb3489 = yyj3489 > l } else { - yyb3480 = r.CheckBreak() + yyb3489 = r.CheckBreak() } - if yyb3480 { + if yyb3489 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44076,13 +44154,13 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Container = string(r.DecodeString()) } - yyj3480++ - if yyhl3480 { - yyb3480 = yyj3480 > l + yyj3489++ + if yyhl3489 { + yyb3489 = yyj3489 > l } else { - yyb3480 = r.CheckBreak() + yyb3489 = r.CheckBreak() } - if yyb3480 { + if yyb3489 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44090,26 +44168,26 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Command = nil } else { - yyv3488 := &x.Command - yym3489 := z.DecBinary() - _ = yym3489 + yyv3497 := &x.Command + yym3498 := z.DecBinary() + _ = yym3498 if false { } else { - z.F.DecSliceStringX(yyv3488, false, d) + z.F.DecSliceStringX(yyv3497, false, d) } } for { - yyj3480++ - if yyhl3480 { - yyb3480 = yyj3480 > l + yyj3489++ + if yyhl3489 { + yyb3489 = yyj3489 > l } else { - yyb3480 = r.CheckBreak() + yyb3489 = r.CheckBreak() } - if yyb3480 { + if yyb3489 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3480-1, "") + z.DecStructFieldNotFound(yyj3489-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -44121,37 +44199,37 @@ func (x *PodProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3490 := z.EncBinary() - _ = yym3490 + yym3499 := z.EncBinary() + _ = yym3499 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3491 := !z.EncBinary() - yy2arr3491 := z.EncBasicHandle().StructToArray - var yyq3491 [3]bool - _, _, _ = yysep3491, yyq3491, yy2arr3491 - const yyr3491 bool = false - yyq3491[0] = x.Kind != "" - yyq3491[1] = x.APIVersion != "" - yyq3491[2] = x.Path != "" - var yynn3491 int - if yyr3491 || yy2arr3491 { + yysep3500 := !z.EncBinary() + yy2arr3500 := z.EncBasicHandle().StructToArray + var yyq3500 [3]bool + _, _, _ = yysep3500, yyq3500, yy2arr3500 + const yyr3500 bool = false + yyq3500[0] = x.Kind != "" + yyq3500[1] = x.APIVersion != "" + yyq3500[2] = x.Path != "" + var yynn3500 int + if yyr3500 || yy2arr3500 { r.EncodeArrayStart(3) } else { - yynn3491 = 0 - for _, b := range yyq3491 { + yynn3500 = 0 + for _, b := range yyq3500 { if b { - yynn3491++ + yynn3500++ } } - r.EncodeMapStart(yynn3491) - yynn3491 = 0 + r.EncodeMapStart(yynn3500) + yynn3500 = 0 } - if yyr3491 || yy2arr3491 { + if yyr3500 || yy2arr3500 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3491[0] { - yym3493 := z.EncBinary() - _ = yym3493 + if yyq3500[0] { + yym3502 := z.EncBinary() + _ = yym3502 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -44160,23 +44238,23 @@ func (x *PodProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3491[0] { + if yyq3500[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3494 := z.EncBinary() - _ = yym3494 + yym3503 := z.EncBinary() + _ = yym3503 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3491 || yy2arr3491 { + if yyr3500 || yy2arr3500 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3491[1] { - yym3496 := z.EncBinary() - _ = yym3496 + if yyq3500[1] { + yym3505 := z.EncBinary() + _ = yym3505 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -44185,23 +44263,23 @@ func (x *PodProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3491[1] { + if yyq3500[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3497 := z.EncBinary() - _ = yym3497 + yym3506 := z.EncBinary() + _ = yym3506 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3491 || yy2arr3491 { + if yyr3500 || yy2arr3500 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3491[2] { - yym3499 := z.EncBinary() - _ = yym3499 + if yyq3500[2] { + yym3508 := z.EncBinary() + _ = yym3508 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) @@ -44210,19 +44288,19 @@ func (x *PodProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3491[2] { + if yyq3500[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("path")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3500 := z.EncBinary() - _ = yym3500 + yym3509 := z.EncBinary() + _ = yym3509 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) } } } - if yyr3491 || yy2arr3491 { + if yyr3500 || yy2arr3500 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -44235,25 +44313,25 @@ func (x *PodProxyOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3501 := z.DecBinary() - _ = yym3501 + yym3510 := z.DecBinary() + _ = yym3510 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3502 := r.ContainerType() - if yyct3502 == codecSelferValueTypeMap1234 { - yyl3502 := r.ReadMapStart() - if yyl3502 == 0 { + yyct3511 := r.ContainerType() + if yyct3511 == codecSelferValueTypeMap1234 { + yyl3511 := r.ReadMapStart() + if yyl3511 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3502, d) + x.codecDecodeSelfFromMap(yyl3511, d) } - } else if yyct3502 == codecSelferValueTypeArray1234 { - yyl3502 := r.ReadArrayStart() - if yyl3502 == 0 { + } else if yyct3511 == codecSelferValueTypeArray1234 { + yyl3511 := r.ReadArrayStart() + if yyl3511 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3502, d) + x.codecDecodeSelfFromArray(yyl3511, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -44265,12 +44343,12 @@ func (x *PodProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3503Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3503Slc - var yyhl3503 bool = l >= 0 - for yyj3503 := 0; ; yyj3503++ { - if yyhl3503 { - if yyj3503 >= l { + var yys3512Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3512Slc + var yyhl3512 bool = l >= 0 + for yyj3512 := 0; ; yyj3512++ { + if yyhl3512 { + if yyj3512 >= l { break } } else { @@ -44279,10 +44357,10 @@ func (x *PodProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3503Slc = r.DecodeBytes(yys3503Slc, true, true) - yys3503 := string(yys3503Slc) + yys3512Slc = r.DecodeBytes(yys3512Slc, true, true) + yys3512 := string(yys3512Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3503 { + switch yys3512 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -44302,9 +44380,9 @@ func (x *PodProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Path = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3503) - } // end switch yys3503 - } // end for yyj3503 + z.DecStructFieldNotFound(-1, yys3512) + } // end switch yys3512 + } // end for yyj3512 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -44312,16 +44390,16 @@ func (x *PodProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3507 int - var yyb3507 bool - var yyhl3507 bool = l >= 0 - yyj3507++ - if yyhl3507 { - yyb3507 = yyj3507 > l + var yyj3516 int + var yyb3516 bool + var yyhl3516 bool = l >= 0 + yyj3516++ + if yyhl3516 { + yyb3516 = yyj3516 > l } else { - yyb3507 = r.CheckBreak() + yyb3516 = r.CheckBreak() } - if yyb3507 { + if yyb3516 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44331,13 +44409,13 @@ func (x *PodProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj3507++ - if yyhl3507 { - yyb3507 = yyj3507 > l + yyj3516++ + if yyhl3516 { + yyb3516 = yyj3516 > l } else { - yyb3507 = r.CheckBreak() + yyb3516 = r.CheckBreak() } - if yyb3507 { + if yyb3516 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44347,13 +44425,13 @@ func (x *PodProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj3507++ - if yyhl3507 { - yyb3507 = yyj3507 > l + yyj3516++ + if yyhl3516 { + yyb3516 = yyj3516 > l } else { - yyb3507 = r.CheckBreak() + yyb3516 = r.CheckBreak() } - if yyb3507 { + if yyb3516 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44364,17 +44442,17 @@ func (x *PodProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) x.Path = string(r.DecodeString()) } for { - yyj3507++ - if yyhl3507 { - yyb3507 = yyj3507 > l + yyj3516++ + if yyhl3516 { + yyb3516 = yyj3516 > l } else { - yyb3507 = r.CheckBreak() + yyb3516 = r.CheckBreak() } - if yyb3507 { + if yyb3516 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3507-1, "") + z.DecStructFieldNotFound(yyj3516-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -44386,37 +44464,37 @@ func (x *NodeProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3511 := z.EncBinary() - _ = yym3511 + yym3520 := z.EncBinary() + _ = yym3520 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3512 := !z.EncBinary() - yy2arr3512 := z.EncBasicHandle().StructToArray - var yyq3512 [3]bool - _, _, _ = yysep3512, yyq3512, yy2arr3512 - const yyr3512 bool = false - yyq3512[0] = x.Kind != "" - yyq3512[1] = x.APIVersion != "" - yyq3512[2] = x.Path != "" - var yynn3512 int - if yyr3512 || yy2arr3512 { + yysep3521 := !z.EncBinary() + yy2arr3521 := z.EncBasicHandle().StructToArray + var yyq3521 [3]bool + _, _, _ = yysep3521, yyq3521, yy2arr3521 + const yyr3521 bool = false + yyq3521[0] = x.Kind != "" + yyq3521[1] = x.APIVersion != "" + yyq3521[2] = x.Path != "" + var yynn3521 int + if yyr3521 || yy2arr3521 { r.EncodeArrayStart(3) } else { - yynn3512 = 0 - for _, b := range yyq3512 { + yynn3521 = 0 + for _, b := range yyq3521 { if b { - yynn3512++ + yynn3521++ } } - r.EncodeMapStart(yynn3512) - yynn3512 = 0 + r.EncodeMapStart(yynn3521) + yynn3521 = 0 } - if yyr3512 || yy2arr3512 { + if yyr3521 || yy2arr3521 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3512[0] { - yym3514 := z.EncBinary() - _ = yym3514 + if yyq3521[0] { + yym3523 := z.EncBinary() + _ = yym3523 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -44425,23 +44503,23 @@ func (x *NodeProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3512[0] { + if yyq3521[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3515 := z.EncBinary() - _ = yym3515 + yym3524 := z.EncBinary() + _ = yym3524 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3512 || yy2arr3512 { + if yyr3521 || yy2arr3521 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3512[1] { - yym3517 := z.EncBinary() - _ = yym3517 + if yyq3521[1] { + yym3526 := z.EncBinary() + _ = yym3526 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -44450,23 +44528,23 @@ func (x *NodeProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3512[1] { + if yyq3521[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3518 := z.EncBinary() - _ = yym3518 + yym3527 := z.EncBinary() + _ = yym3527 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3512 || yy2arr3512 { + if yyr3521 || yy2arr3521 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3512[2] { - yym3520 := z.EncBinary() - _ = yym3520 + if yyq3521[2] { + yym3529 := z.EncBinary() + _ = yym3529 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) @@ -44475,19 +44553,19 @@ func (x *NodeProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3512[2] { + if yyq3521[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("path")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3521 := z.EncBinary() - _ = yym3521 + yym3530 := z.EncBinary() + _ = yym3530 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) } } } - if yyr3512 || yy2arr3512 { + if yyr3521 || yy2arr3521 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -44500,25 +44578,25 @@ func (x *NodeProxyOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3522 := z.DecBinary() - _ = yym3522 + yym3531 := z.DecBinary() + _ = yym3531 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3523 := r.ContainerType() - if yyct3523 == codecSelferValueTypeMap1234 { - yyl3523 := r.ReadMapStart() - if yyl3523 == 0 { + yyct3532 := r.ContainerType() + if yyct3532 == codecSelferValueTypeMap1234 { + yyl3532 := r.ReadMapStart() + if yyl3532 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3523, d) + x.codecDecodeSelfFromMap(yyl3532, d) } - } else if yyct3523 == codecSelferValueTypeArray1234 { - yyl3523 := r.ReadArrayStart() - if yyl3523 == 0 { + } else if yyct3532 == codecSelferValueTypeArray1234 { + yyl3532 := r.ReadArrayStart() + if yyl3532 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3523, d) + x.codecDecodeSelfFromArray(yyl3532, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -44530,12 +44608,12 @@ func (x *NodeProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3524Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3524Slc - var yyhl3524 bool = l >= 0 - for yyj3524 := 0; ; yyj3524++ { - if yyhl3524 { - if yyj3524 >= l { + var yys3533Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3533Slc + var yyhl3533 bool = l >= 0 + for yyj3533 := 0; ; yyj3533++ { + if yyhl3533 { + if yyj3533 >= l { break } } else { @@ -44544,10 +44622,10 @@ func (x *NodeProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3524Slc = r.DecodeBytes(yys3524Slc, true, true) - yys3524 := string(yys3524Slc) + yys3533Slc = r.DecodeBytes(yys3533Slc, true, true) + yys3533 := string(yys3533Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3524 { + switch yys3533 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -44567,9 +44645,9 @@ func (x *NodeProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Path = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3524) - } // end switch yys3524 - } // end for yyj3524 + z.DecStructFieldNotFound(-1, yys3533) + } // end switch yys3533 + } // end for yyj3533 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -44577,16 +44655,16 @@ func (x *NodeProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3528 int - var yyb3528 bool - var yyhl3528 bool = l >= 0 - yyj3528++ - if yyhl3528 { - yyb3528 = yyj3528 > l + var yyj3537 int + var yyb3537 bool + var yyhl3537 bool = l >= 0 + yyj3537++ + if yyhl3537 { + yyb3537 = yyj3537 > l } else { - yyb3528 = r.CheckBreak() + yyb3537 = r.CheckBreak() } - if yyb3528 { + if yyb3537 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44596,13 +44674,13 @@ func (x *NodeProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj3528++ - if yyhl3528 { - yyb3528 = yyj3528 > l + yyj3537++ + if yyhl3537 { + yyb3537 = yyj3537 > l } else { - yyb3528 = r.CheckBreak() + yyb3537 = r.CheckBreak() } - if yyb3528 { + if yyb3537 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44612,13 +44690,13 @@ func (x *NodeProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj3528++ - if yyhl3528 { - yyb3528 = yyj3528 > l + yyj3537++ + if yyhl3537 { + yyb3537 = yyj3537 > l } else { - yyb3528 = r.CheckBreak() + yyb3537 = r.CheckBreak() } - if yyb3528 { + if yyb3537 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44629,17 +44707,17 @@ func (x *NodeProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) x.Path = string(r.DecodeString()) } for { - yyj3528++ - if yyhl3528 { - yyb3528 = yyj3528 > l + yyj3537++ + if yyhl3537 { + yyb3537 = yyj3537 > l } else { - yyb3528 = r.CheckBreak() + yyb3537 = r.CheckBreak() } - if yyb3528 { + if yyb3537 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3528-1, "") + z.DecStructFieldNotFound(yyj3537-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -44651,37 +44729,37 @@ func (x *ServiceProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3532 := z.EncBinary() - _ = yym3532 + yym3541 := z.EncBinary() + _ = yym3541 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3533 := !z.EncBinary() - yy2arr3533 := z.EncBasicHandle().StructToArray - var yyq3533 [3]bool - _, _, _ = yysep3533, yyq3533, yy2arr3533 - const yyr3533 bool = false - yyq3533[0] = x.Kind != "" - yyq3533[1] = x.APIVersion != "" - yyq3533[2] = x.Path != "" - var yynn3533 int - if yyr3533 || yy2arr3533 { + yysep3542 := !z.EncBinary() + yy2arr3542 := z.EncBasicHandle().StructToArray + var yyq3542 [3]bool + _, _, _ = yysep3542, yyq3542, yy2arr3542 + const yyr3542 bool = false + yyq3542[0] = x.Kind != "" + yyq3542[1] = x.APIVersion != "" + yyq3542[2] = x.Path != "" + var yynn3542 int + if yyr3542 || yy2arr3542 { r.EncodeArrayStart(3) } else { - yynn3533 = 0 - for _, b := range yyq3533 { + yynn3542 = 0 + for _, b := range yyq3542 { if b { - yynn3533++ + yynn3542++ } } - r.EncodeMapStart(yynn3533) - yynn3533 = 0 + r.EncodeMapStart(yynn3542) + yynn3542 = 0 } - if yyr3533 || yy2arr3533 { + if yyr3542 || yy2arr3542 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3533[0] { - yym3535 := z.EncBinary() - _ = yym3535 + if yyq3542[0] { + yym3544 := z.EncBinary() + _ = yym3544 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -44690,23 +44768,23 @@ func (x *ServiceProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3533[0] { + if yyq3542[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3536 := z.EncBinary() - _ = yym3536 + yym3545 := z.EncBinary() + _ = yym3545 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3533 || yy2arr3533 { + if yyr3542 || yy2arr3542 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3533[1] { - yym3538 := z.EncBinary() - _ = yym3538 + if yyq3542[1] { + yym3547 := z.EncBinary() + _ = yym3547 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -44715,23 +44793,23 @@ func (x *ServiceProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3533[1] { + if yyq3542[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3539 := z.EncBinary() - _ = yym3539 + yym3548 := z.EncBinary() + _ = yym3548 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3533 || yy2arr3533 { + if yyr3542 || yy2arr3542 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3533[2] { - yym3541 := z.EncBinary() - _ = yym3541 + if yyq3542[2] { + yym3550 := z.EncBinary() + _ = yym3550 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) @@ -44740,19 +44818,19 @@ func (x *ServiceProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3533[2] { + if yyq3542[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("path")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3542 := z.EncBinary() - _ = yym3542 + yym3551 := z.EncBinary() + _ = yym3551 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) } } } - if yyr3533 || yy2arr3533 { + if yyr3542 || yy2arr3542 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -44765,25 +44843,25 @@ func (x *ServiceProxyOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3543 := z.DecBinary() - _ = yym3543 + yym3552 := z.DecBinary() + _ = yym3552 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3544 := r.ContainerType() - if yyct3544 == codecSelferValueTypeMap1234 { - yyl3544 := r.ReadMapStart() - if yyl3544 == 0 { + yyct3553 := r.ContainerType() + if yyct3553 == codecSelferValueTypeMap1234 { + yyl3553 := r.ReadMapStart() + if yyl3553 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3544, d) + x.codecDecodeSelfFromMap(yyl3553, d) } - } else if yyct3544 == codecSelferValueTypeArray1234 { - yyl3544 := r.ReadArrayStart() - if yyl3544 == 0 { + } else if yyct3553 == codecSelferValueTypeArray1234 { + yyl3553 := r.ReadArrayStart() + if yyl3553 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3544, d) + x.codecDecodeSelfFromArray(yyl3553, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -44795,12 +44873,12 @@ func (x *ServiceProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3545Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3545Slc - var yyhl3545 bool = l >= 0 - for yyj3545 := 0; ; yyj3545++ { - if yyhl3545 { - if yyj3545 >= l { + var yys3554Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3554Slc + var yyhl3554 bool = l >= 0 + for yyj3554 := 0; ; yyj3554++ { + if yyhl3554 { + if yyj3554 >= l { break } } else { @@ -44809,10 +44887,10 @@ func (x *ServiceProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3545Slc = r.DecodeBytes(yys3545Slc, true, true) - yys3545 := string(yys3545Slc) + yys3554Slc = r.DecodeBytes(yys3554Slc, true, true) + yys3554 := string(yys3554Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3545 { + switch yys3554 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -44832,9 +44910,9 @@ func (x *ServiceProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder x.Path = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3545) - } // end switch yys3545 - } // end for yyj3545 + z.DecStructFieldNotFound(-1, yys3554) + } // end switch yys3554 + } // end for yyj3554 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -44842,16 +44920,16 @@ func (x *ServiceProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3549 int - var yyb3549 bool - var yyhl3549 bool = l >= 0 - yyj3549++ - if yyhl3549 { - yyb3549 = yyj3549 > l + var yyj3558 int + var yyb3558 bool + var yyhl3558 bool = l >= 0 + yyj3558++ + if yyhl3558 { + yyb3558 = yyj3558 > l } else { - yyb3549 = r.CheckBreak() + yyb3558 = r.CheckBreak() } - if yyb3549 { + if yyb3558 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44861,13 +44939,13 @@ func (x *ServiceProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.Kind = string(r.DecodeString()) } - yyj3549++ - if yyhl3549 { - yyb3549 = yyj3549 > l + yyj3558++ + if yyhl3558 { + yyb3558 = yyj3558 > l } else { - yyb3549 = r.CheckBreak() + yyb3558 = r.CheckBreak() } - if yyb3549 { + if yyb3558 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44877,13 +44955,13 @@ func (x *ServiceProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.APIVersion = string(r.DecodeString()) } - yyj3549++ - if yyhl3549 { - yyb3549 = yyj3549 > l + yyj3558++ + if yyhl3558 { + yyb3558 = yyj3558 > l } else { - yyb3549 = r.CheckBreak() + yyb3558 = r.CheckBreak() } - if yyb3549 { + if yyb3558 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -44894,17 +44972,17 @@ func (x *ServiceProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decod x.Path = string(r.DecodeString()) } for { - yyj3549++ - if yyhl3549 { - yyb3549 = yyj3549 > l + yyj3558++ + if yyhl3558 { + yyb3558 = yyj3558 > l } else { - yyb3549 = r.CheckBreak() + yyb3558 = r.CheckBreak() } - if yyb3549 { + if yyb3558 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3549-1, "") + z.DecStructFieldNotFound(yyj3558-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -44916,34 +44994,34 @@ func (x *OwnerReference) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3553 := z.EncBinary() - _ = yym3553 + yym3562 := z.EncBinary() + _ = yym3562 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3554 := !z.EncBinary() - yy2arr3554 := z.EncBasicHandle().StructToArray - var yyq3554 [5]bool - _, _, _ = yysep3554, yyq3554, yy2arr3554 - const yyr3554 bool = false - yyq3554[4] = x.Controller != nil - var yynn3554 int - if yyr3554 || yy2arr3554 { + yysep3563 := !z.EncBinary() + yy2arr3563 := z.EncBasicHandle().StructToArray + var yyq3563 [5]bool + _, _, _ = yysep3563, yyq3563, yy2arr3563 + const yyr3563 bool = false + yyq3563[4] = x.Controller != nil + var yynn3563 int + if yyr3563 || yy2arr3563 { r.EncodeArrayStart(5) } else { - yynn3554 = 4 - for _, b := range yyq3554 { + yynn3563 = 4 + for _, b := range yyq3563 { if b { - yynn3554++ + yynn3563++ } } - r.EncodeMapStart(yynn3554) - yynn3554 = 0 + r.EncodeMapStart(yynn3563) + yynn3563 = 0 } - if yyr3554 || yy2arr3554 { + if yyr3563 || yy2arr3563 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3556 := z.EncBinary() - _ = yym3556 + yym3565 := z.EncBinary() + _ = yym3565 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -44952,17 +45030,17 @@ func (x *OwnerReference) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3557 := z.EncBinary() - _ = yym3557 + yym3566 := z.EncBinary() + _ = yym3566 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } - if yyr3554 || yy2arr3554 { + if yyr3563 || yy2arr3563 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3559 := z.EncBinary() - _ = yym3559 + yym3568 := z.EncBinary() + _ = yym3568 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -44971,17 +45049,17 @@ func (x *OwnerReference) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3560 := z.EncBinary() - _ = yym3560 + yym3569 := z.EncBinary() + _ = yym3569 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } - if yyr3554 || yy2arr3554 { + if yyr3563 || yy2arr3563 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3562 := z.EncBinary() - _ = yym3562 + yym3571 := z.EncBinary() + _ = yym3571 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -44990,17 +45068,17 @@ func (x *OwnerReference) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3563 := z.EncBinary() - _ = yym3563 + yym3572 := z.EncBinary() + _ = yym3572 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } - if yyr3554 || yy2arr3554 { + if yyr3563 || yy2arr3563 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym3565 := z.EncBinary() - _ = yym3565 + yym3574 := z.EncBinary() + _ = yym3574 if false { } else if z.HasExtensions() && z.EncExt(x.UID) { } else { @@ -45010,50 +45088,50 @@ func (x *OwnerReference) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("uid")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3566 := z.EncBinary() - _ = yym3566 + yym3575 := z.EncBinary() + _ = yym3575 if false { } else if z.HasExtensions() && z.EncExt(x.UID) { } else { r.EncodeString(codecSelferC_UTF81234, string(x.UID)) } } - if yyr3554 || yy2arr3554 { + if yyr3563 || yy2arr3563 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3554[4] { + if yyq3563[4] { if x.Controller == nil { r.EncodeNil() } else { - yy3568 := *x.Controller - yym3569 := z.EncBinary() - _ = yym3569 + yy3577 := *x.Controller + yym3578 := z.EncBinary() + _ = yym3578 if false { } else { - r.EncodeBool(bool(yy3568)) + r.EncodeBool(bool(yy3577)) } } } else { r.EncodeNil() } } else { - if yyq3554[4] { + if yyq3563[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("controller")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Controller == nil { r.EncodeNil() } else { - yy3570 := *x.Controller - yym3571 := z.EncBinary() - _ = yym3571 + yy3579 := *x.Controller + yym3580 := z.EncBinary() + _ = yym3580 if false { } else { - r.EncodeBool(bool(yy3570)) + r.EncodeBool(bool(yy3579)) } } } } - if yyr3554 || yy2arr3554 { + if yyr3563 || yy2arr3563 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -45066,25 +45144,25 @@ func (x *OwnerReference) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3572 := z.DecBinary() - _ = yym3572 + yym3581 := z.DecBinary() + _ = yym3581 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3573 := r.ContainerType() - if yyct3573 == codecSelferValueTypeMap1234 { - yyl3573 := r.ReadMapStart() - if yyl3573 == 0 { + yyct3582 := r.ContainerType() + if yyct3582 == codecSelferValueTypeMap1234 { + yyl3582 := r.ReadMapStart() + if yyl3582 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3573, d) + x.codecDecodeSelfFromMap(yyl3582, d) } - } else if yyct3573 == codecSelferValueTypeArray1234 { - yyl3573 := r.ReadArrayStart() - if yyl3573 == 0 { + } else if yyct3582 == codecSelferValueTypeArray1234 { + yyl3582 := r.ReadArrayStart() + if yyl3582 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3573, d) + x.codecDecodeSelfFromArray(yyl3582, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -45096,12 +45174,12 @@ func (x *OwnerReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3574Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3574Slc - var yyhl3574 bool = l >= 0 - for yyj3574 := 0; ; yyj3574++ { - if yyhl3574 { - if yyj3574 >= l { + var yys3583Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3583Slc + var yyhl3583 bool = l >= 0 + for yyj3583 := 0; ; yyj3583++ { + if yyhl3583 { + if yyj3583 >= l { break } } else { @@ -45110,10 +45188,10 @@ func (x *OwnerReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3574Slc = r.DecodeBytes(yys3574Slc, true, true) - yys3574 := string(yys3574Slc) + yys3583Slc = r.DecodeBytes(yys3583Slc, true, true) + yys3583 := string(yys3583Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3574 { + switch yys3583 { case "apiVersion": if r.TryDecodeAsNil() { x.APIVersion = "" @@ -45147,17 +45225,17 @@ func (x *OwnerReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.Controller == nil { x.Controller = new(bool) } - yym3580 := z.DecBinary() - _ = yym3580 + yym3589 := z.DecBinary() + _ = yym3589 if false { } else { *((*bool)(x.Controller)) = r.DecodeBool() } } default: - z.DecStructFieldNotFound(-1, yys3574) - } // end switch yys3574 - } // end for yyj3574 + z.DecStructFieldNotFound(-1, yys3583) + } // end switch yys3583 + } // end for yyj3583 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -45165,16 +45243,16 @@ func (x *OwnerReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3581 int - var yyb3581 bool - var yyhl3581 bool = l >= 0 - yyj3581++ - if yyhl3581 { - yyb3581 = yyj3581 > l + var yyj3590 int + var yyb3590 bool + var yyhl3590 bool = l >= 0 + yyj3590++ + if yyhl3590 { + yyb3590 = yyj3590 > l } else { - yyb3581 = r.CheckBreak() + yyb3590 = r.CheckBreak() } - if yyb3581 { + if yyb3590 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45184,13 +45262,13 @@ func (x *OwnerReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3581++ - if yyhl3581 { - yyb3581 = yyj3581 > l + yyj3590++ + if yyhl3590 { + yyb3590 = yyj3590 > l } else { - yyb3581 = r.CheckBreak() + yyb3590 = r.CheckBreak() } - if yyb3581 { + if yyb3590 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45200,13 +45278,13 @@ func (x *OwnerReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3581++ - if yyhl3581 { - yyb3581 = yyj3581 > l + yyj3590++ + if yyhl3590 { + yyb3590 = yyj3590 > l } else { - yyb3581 = r.CheckBreak() + yyb3590 = r.CheckBreak() } - if yyb3581 { + if yyb3590 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45216,13 +45294,13 @@ func (x *OwnerReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Name = string(r.DecodeString()) } - yyj3581++ - if yyhl3581 { - yyb3581 = yyj3581 > l + yyj3590++ + if yyhl3590 { + yyb3590 = yyj3590 > l } else { - yyb3581 = r.CheckBreak() + yyb3590 = r.CheckBreak() } - if yyb3581 { + if yyb3590 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45232,13 +45310,13 @@ func (x *OwnerReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.UID = pkg1_types.UID(r.DecodeString()) } - yyj3581++ - if yyhl3581 { - yyb3581 = yyj3581 > l + yyj3590++ + if yyhl3590 { + yyb3590 = yyj3590 > l } else { - yyb3581 = r.CheckBreak() + yyb3590 = r.CheckBreak() } - if yyb3581 { + if yyb3590 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45251,25 +45329,25 @@ func (x *OwnerReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.Controller == nil { x.Controller = new(bool) } - yym3587 := z.DecBinary() - _ = yym3587 + yym3596 := z.DecBinary() + _ = yym3596 if false { } else { *((*bool)(x.Controller)) = r.DecodeBool() } } for { - yyj3581++ - if yyhl3581 { - yyb3581 = yyj3581 > l + yyj3590++ + if yyhl3590 { + yyb3590 = yyj3590 > l } else { - yyb3581 = r.CheckBreak() + yyb3590 = r.CheckBreak() } - if yyb3581 { + if yyb3590 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3581-1, "") + z.DecStructFieldNotFound(yyj3590-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -45281,41 +45359,41 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3588 := z.EncBinary() - _ = yym3588 + yym3597 := z.EncBinary() + _ = yym3597 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3589 := !z.EncBinary() - yy2arr3589 := z.EncBasicHandle().StructToArray - var yyq3589 [7]bool - _, _, _ = yysep3589, yyq3589, yy2arr3589 - const yyr3589 bool = false - yyq3589[0] = x.Kind != "" - yyq3589[1] = x.Namespace != "" - yyq3589[2] = x.Name != "" - yyq3589[3] = x.UID != "" - yyq3589[4] = x.APIVersion != "" - yyq3589[5] = x.ResourceVersion != "" - yyq3589[6] = x.FieldPath != "" - var yynn3589 int - if yyr3589 || yy2arr3589 { + yysep3598 := !z.EncBinary() + yy2arr3598 := z.EncBasicHandle().StructToArray + var yyq3598 [7]bool + _, _, _ = yysep3598, yyq3598, yy2arr3598 + const yyr3598 bool = false + yyq3598[0] = x.Kind != "" + yyq3598[1] = x.Namespace != "" + yyq3598[2] = x.Name != "" + yyq3598[3] = x.UID != "" + yyq3598[4] = x.APIVersion != "" + yyq3598[5] = x.ResourceVersion != "" + yyq3598[6] = x.FieldPath != "" + var yynn3598 int + if yyr3598 || yy2arr3598 { r.EncodeArrayStart(7) } else { - yynn3589 = 0 - for _, b := range yyq3589 { + yynn3598 = 0 + for _, b := range yyq3598 { if b { - yynn3589++ + yynn3598++ } } - r.EncodeMapStart(yynn3589) - yynn3589 = 0 + r.EncodeMapStart(yynn3598) + yynn3598 = 0 } - if yyr3589 || yy2arr3589 { + if yyr3598 || yy2arr3598 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3589[0] { - yym3591 := z.EncBinary() - _ = yym3591 + if yyq3598[0] { + yym3600 := z.EncBinary() + _ = yym3600 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -45324,23 +45402,23 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3589[0] { + if yyq3598[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3592 := z.EncBinary() - _ = yym3592 + yym3601 := z.EncBinary() + _ = yym3601 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3589 || yy2arr3589 { + if yyr3598 || yy2arr3598 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3589[1] { - yym3594 := z.EncBinary() - _ = yym3594 + if yyq3598[1] { + yym3603 := z.EncBinary() + _ = yym3603 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) @@ -45349,23 +45427,23 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3589[1] { + if yyq3598[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("namespace")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3595 := z.EncBinary() - _ = yym3595 + yym3604 := z.EncBinary() + _ = yym3604 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) } } } - if yyr3589 || yy2arr3589 { + if yyr3598 || yy2arr3598 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3589[2] { - yym3597 := z.EncBinary() - _ = yym3597 + if yyq3598[2] { + yym3606 := z.EncBinary() + _ = yym3606 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -45374,23 +45452,23 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3589[2] { + if yyq3598[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3598 := z.EncBinary() - _ = yym3598 + yym3607 := z.EncBinary() + _ = yym3607 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } } - if yyr3589 || yy2arr3589 { + if yyr3598 || yy2arr3598 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3589[3] { - yym3600 := z.EncBinary() - _ = yym3600 + if yyq3598[3] { + yym3609 := z.EncBinary() + _ = yym3609 if false { } else if z.HasExtensions() && z.EncExt(x.UID) { } else { @@ -45400,12 +45478,12 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3589[3] { + if yyq3598[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("uid")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3601 := z.EncBinary() - _ = yym3601 + yym3610 := z.EncBinary() + _ = yym3610 if false { } else if z.HasExtensions() && z.EncExt(x.UID) { } else { @@ -45413,11 +45491,11 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3589 || yy2arr3589 { + if yyr3598 || yy2arr3598 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3589[4] { - yym3603 := z.EncBinary() - _ = yym3603 + if yyq3598[4] { + yym3612 := z.EncBinary() + _ = yym3612 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -45426,23 +45504,23 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3589[4] { + if yyq3598[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3604 := z.EncBinary() - _ = yym3604 + yym3613 := z.EncBinary() + _ = yym3613 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3589 || yy2arr3589 { + if yyr3598 || yy2arr3598 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3589[5] { - yym3606 := z.EncBinary() - _ = yym3606 + if yyq3598[5] { + yym3615 := z.EncBinary() + _ = yym3615 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) @@ -45451,23 +45529,23 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3589[5] { + if yyq3598[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("resourceVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3607 := z.EncBinary() - _ = yym3607 + yym3616 := z.EncBinary() + _ = yym3616 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion)) } } } - if yyr3589 || yy2arr3589 { + if yyr3598 || yy2arr3598 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3589[6] { - yym3609 := z.EncBinary() - _ = yym3609 + if yyq3598[6] { + yym3618 := z.EncBinary() + _ = yym3618 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FieldPath)) @@ -45476,19 +45554,19 @@ func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3589[6] { + if yyq3598[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("fieldPath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3610 := z.EncBinary() - _ = yym3610 + yym3619 := z.EncBinary() + _ = yym3619 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FieldPath)) } } } - if yyr3589 || yy2arr3589 { + if yyr3598 || yy2arr3598 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -45501,25 +45579,25 @@ func (x *ObjectReference) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3611 := z.DecBinary() - _ = yym3611 + yym3620 := z.DecBinary() + _ = yym3620 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3612 := r.ContainerType() - if yyct3612 == codecSelferValueTypeMap1234 { - yyl3612 := r.ReadMapStart() - if yyl3612 == 0 { + yyct3621 := r.ContainerType() + if yyct3621 == codecSelferValueTypeMap1234 { + yyl3621 := r.ReadMapStart() + if yyl3621 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3612, d) + x.codecDecodeSelfFromMap(yyl3621, d) } - } else if yyct3612 == codecSelferValueTypeArray1234 { - yyl3612 := r.ReadArrayStart() - if yyl3612 == 0 { + } else if yyct3621 == codecSelferValueTypeArray1234 { + yyl3621 := r.ReadArrayStart() + if yyl3621 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3612, d) + x.codecDecodeSelfFromArray(yyl3621, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -45531,12 +45609,12 @@ func (x *ObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3613Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3613Slc - var yyhl3613 bool = l >= 0 - for yyj3613 := 0; ; yyj3613++ { - if yyhl3613 { - if yyj3613 >= l { + var yys3622Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3622Slc + var yyhl3622 bool = l >= 0 + for yyj3622 := 0; ; yyj3622++ { + if yyhl3622 { + if yyj3622 >= l { break } } else { @@ -45545,10 +45623,10 @@ func (x *ObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3613Slc = r.DecodeBytes(yys3613Slc, true, true) - yys3613 := string(yys3613Slc) + yys3622Slc = r.DecodeBytes(yys3622Slc, true, true) + yys3622 := string(yys3622Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3613 { + switch yys3622 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -45592,9 +45670,9 @@ func (x *ObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.FieldPath = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3613) - } // end switch yys3613 - } // end for yyj3613 + z.DecStructFieldNotFound(-1, yys3622) + } // end switch yys3622 + } // end for yyj3622 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -45602,16 +45680,16 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3621 int - var yyb3621 bool - var yyhl3621 bool = l >= 0 - yyj3621++ - if yyhl3621 { - yyb3621 = yyj3621 > l + var yyj3630 int + var yyb3630 bool + var yyhl3630 bool = l >= 0 + yyj3630++ + if yyhl3630 { + yyb3630 = yyj3630 > l } else { - yyb3621 = r.CheckBreak() + yyb3630 = r.CheckBreak() } - if yyb3621 { + if yyb3630 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45621,13 +45699,13 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj3621++ - if yyhl3621 { - yyb3621 = yyj3621 > l + yyj3630++ + if yyhl3630 { + yyb3630 = yyj3630 > l } else { - yyb3621 = r.CheckBreak() + yyb3630 = r.CheckBreak() } - if yyb3621 { + if yyb3630 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45637,13 +45715,13 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Namespace = string(r.DecodeString()) } - yyj3621++ - if yyhl3621 { - yyb3621 = yyj3621 > l + yyj3630++ + if yyhl3630 { + yyb3630 = yyj3630 > l } else { - yyb3621 = r.CheckBreak() + yyb3630 = r.CheckBreak() } - if yyb3621 { + if yyb3630 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45653,13 +45731,13 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Name = string(r.DecodeString()) } - yyj3621++ - if yyhl3621 { - yyb3621 = yyj3621 > l + yyj3630++ + if yyhl3630 { + yyb3630 = yyj3630 > l } else { - yyb3621 = r.CheckBreak() + yyb3630 = r.CheckBreak() } - if yyb3621 { + if yyb3630 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45669,13 +45747,13 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.UID = pkg1_types.UID(r.DecodeString()) } - yyj3621++ - if yyhl3621 { - yyb3621 = yyj3621 > l + yyj3630++ + if yyhl3630 { + yyb3630 = yyj3630 > l } else { - yyb3621 = r.CheckBreak() + yyb3630 = r.CheckBreak() } - if yyb3621 { + if yyb3630 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45685,13 +45763,13 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj3621++ - if yyhl3621 { - yyb3621 = yyj3621 > l + yyj3630++ + if yyhl3630 { + yyb3630 = yyj3630 > l } else { - yyb3621 = r.CheckBreak() + yyb3630 = r.CheckBreak() } - if yyb3621 { + if yyb3630 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45701,13 +45779,13 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.ResourceVersion = string(r.DecodeString()) } - yyj3621++ - if yyhl3621 { - yyb3621 = yyj3621 > l + yyj3630++ + if yyhl3630 { + yyb3630 = yyj3630 > l } else { - yyb3621 = r.CheckBreak() + yyb3630 = r.CheckBreak() } - if yyb3621 { + if yyb3630 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45718,17 +45796,17 @@ func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) x.FieldPath = string(r.DecodeString()) } for { - yyj3621++ - if yyhl3621 { - yyb3621 = yyj3621 > l + yyj3630++ + if yyhl3630 { + yyb3630 = yyj3630 > l } else { - yyb3621 = r.CheckBreak() + yyb3630 = r.CheckBreak() } - if yyb3621 { + if yyb3630 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3621-1, "") + z.DecStructFieldNotFound(yyj3630-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -45740,35 +45818,35 @@ func (x *LocalObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3629 := z.EncBinary() - _ = yym3629 + yym3638 := z.EncBinary() + _ = yym3638 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3630 := !z.EncBinary() - yy2arr3630 := z.EncBasicHandle().StructToArray - var yyq3630 [1]bool - _, _, _ = yysep3630, yyq3630, yy2arr3630 - const yyr3630 bool = false - yyq3630[0] = x.Name != "" - var yynn3630 int - if yyr3630 || yy2arr3630 { + yysep3639 := !z.EncBinary() + yy2arr3639 := z.EncBasicHandle().StructToArray + var yyq3639 [1]bool + _, _, _ = yysep3639, yyq3639, yy2arr3639 + const yyr3639 bool = false + yyq3639[0] = x.Name != "" + var yynn3639 int + if yyr3639 || yy2arr3639 { r.EncodeArrayStart(1) } else { - yynn3630 = 0 - for _, b := range yyq3630 { + yynn3639 = 0 + for _, b := range yyq3639 { if b { - yynn3630++ + yynn3639++ } } - r.EncodeMapStart(yynn3630) - yynn3630 = 0 + r.EncodeMapStart(yynn3639) + yynn3639 = 0 } - if yyr3630 || yy2arr3630 { + if yyr3639 || yy2arr3639 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3630[0] { - yym3632 := z.EncBinary() - _ = yym3632 + if yyq3639[0] { + yym3641 := z.EncBinary() + _ = yym3641 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) @@ -45777,19 +45855,19 @@ func (x *LocalObjectReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3630[0] { + if yyq3639[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("name")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3633 := z.EncBinary() - _ = yym3633 + yym3642 := z.EncBinary() + _ = yym3642 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Name)) } } } - if yyr3630 || yy2arr3630 { + if yyr3639 || yy2arr3639 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -45802,25 +45880,25 @@ func (x *LocalObjectReference) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3634 := z.DecBinary() - _ = yym3634 + yym3643 := z.DecBinary() + _ = yym3643 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3635 := r.ContainerType() - if yyct3635 == codecSelferValueTypeMap1234 { - yyl3635 := r.ReadMapStart() - if yyl3635 == 0 { + yyct3644 := r.ContainerType() + if yyct3644 == codecSelferValueTypeMap1234 { + yyl3644 := r.ReadMapStart() + if yyl3644 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3635, d) + x.codecDecodeSelfFromMap(yyl3644, d) } - } else if yyct3635 == codecSelferValueTypeArray1234 { - yyl3635 := r.ReadArrayStart() - if yyl3635 == 0 { + } else if yyct3644 == codecSelferValueTypeArray1234 { + yyl3644 := r.ReadArrayStart() + if yyl3644 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3635, d) + x.codecDecodeSelfFromArray(yyl3644, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -45832,12 +45910,12 @@ func (x *LocalObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3636Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3636Slc - var yyhl3636 bool = l >= 0 - for yyj3636 := 0; ; yyj3636++ { - if yyhl3636 { - if yyj3636 >= l { + var yys3645Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3645Slc + var yyhl3645 bool = l >= 0 + for yyj3645 := 0; ; yyj3645++ { + if yyhl3645 { + if yyj3645 >= l { break } } else { @@ -45846,10 +45924,10 @@ func (x *LocalObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decode } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3636Slc = r.DecodeBytes(yys3636Slc, true, true) - yys3636 := string(yys3636Slc) + yys3645Slc = r.DecodeBytes(yys3645Slc, true, true) + yys3645 := string(yys3645Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3636 { + switch yys3645 { case "name": if r.TryDecodeAsNil() { x.Name = "" @@ -45857,9 +45935,9 @@ func (x *LocalObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decode x.Name = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3636) - } // end switch yys3636 - } // end for yyj3636 + z.DecStructFieldNotFound(-1, yys3645) + } // end switch yys3645 + } // end for yyj3645 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -45867,16 +45945,16 @@ func (x *LocalObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3638 int - var yyb3638 bool - var yyhl3638 bool = l >= 0 - yyj3638++ - if yyhl3638 { - yyb3638 = yyj3638 > l + var yyj3647 int + var yyb3647 bool + var yyhl3647 bool = l >= 0 + yyj3647++ + if yyhl3647 { + yyb3647 = yyj3647 > l } else { - yyb3638 = r.CheckBreak() + yyb3647 = r.CheckBreak() } - if yyb3638 { + if yyb3647 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45887,17 +45965,17 @@ func (x *LocalObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Deco x.Name = string(r.DecodeString()) } for { - yyj3638++ - if yyhl3638 { - yyb3638 = yyj3638 > l + yyj3647++ + if yyhl3647 { + yyb3647 = yyj3647 > l } else { - yyb3638 = r.CheckBreak() + yyb3647 = r.CheckBreak() } - if yyb3638 { + if yyb3647 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3638-1, "") + z.DecStructFieldNotFound(yyj3647-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -45909,37 +45987,37 @@ func (x *SerializedReference) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3640 := z.EncBinary() - _ = yym3640 + yym3649 := z.EncBinary() + _ = yym3649 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3641 := !z.EncBinary() - yy2arr3641 := z.EncBasicHandle().StructToArray - var yyq3641 [3]bool - _, _, _ = yysep3641, yyq3641, yy2arr3641 - const yyr3641 bool = false - yyq3641[0] = x.Kind != "" - yyq3641[1] = x.APIVersion != "" - yyq3641[2] = true - var yynn3641 int - if yyr3641 || yy2arr3641 { + yysep3650 := !z.EncBinary() + yy2arr3650 := z.EncBasicHandle().StructToArray + var yyq3650 [3]bool + _, _, _ = yysep3650, yyq3650, yy2arr3650 + const yyr3650 bool = false + yyq3650[0] = x.Kind != "" + yyq3650[1] = x.APIVersion != "" + yyq3650[2] = true + var yynn3650 int + if yyr3650 || yy2arr3650 { r.EncodeArrayStart(3) } else { - yynn3641 = 0 - for _, b := range yyq3641 { + yynn3650 = 0 + for _, b := range yyq3650 { if b { - yynn3641++ + yynn3650++ } } - r.EncodeMapStart(yynn3641) - yynn3641 = 0 + r.EncodeMapStart(yynn3650) + yynn3650 = 0 } - if yyr3641 || yy2arr3641 { + if yyr3650 || yy2arr3650 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3641[0] { - yym3643 := z.EncBinary() - _ = yym3643 + if yyq3650[0] { + yym3652 := z.EncBinary() + _ = yym3652 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -45948,23 +46026,23 @@ func (x *SerializedReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3641[0] { + if yyq3650[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3644 := z.EncBinary() - _ = yym3644 + yym3653 := z.EncBinary() + _ = yym3653 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3641 || yy2arr3641 { + if yyr3650 || yy2arr3650 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3641[1] { - yym3646 := z.EncBinary() - _ = yym3646 + if yyq3650[1] { + yym3655 := z.EncBinary() + _ = yym3655 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -45973,36 +46051,36 @@ func (x *SerializedReference) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3641[1] { + if yyq3650[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3647 := z.EncBinary() - _ = yym3647 + yym3656 := z.EncBinary() + _ = yym3656 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3641 || yy2arr3641 { + if yyr3650 || yy2arr3650 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3641[2] { - yy3649 := &x.Reference - yy3649.CodecEncodeSelf(e) + if yyq3650[2] { + yy3658 := &x.Reference + yy3658.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3641[2] { + if yyq3650[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("reference")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3650 := &x.Reference - yy3650.CodecEncodeSelf(e) + yy3659 := &x.Reference + yy3659.CodecEncodeSelf(e) } } - if yyr3641 || yy2arr3641 { + if yyr3650 || yy2arr3650 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -46015,25 +46093,25 @@ func (x *SerializedReference) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3651 := z.DecBinary() - _ = yym3651 + yym3660 := z.DecBinary() + _ = yym3660 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3652 := r.ContainerType() - if yyct3652 == codecSelferValueTypeMap1234 { - yyl3652 := r.ReadMapStart() - if yyl3652 == 0 { + yyct3661 := r.ContainerType() + if yyct3661 == codecSelferValueTypeMap1234 { + yyl3661 := r.ReadMapStart() + if yyl3661 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3652, d) + x.codecDecodeSelfFromMap(yyl3661, d) } - } else if yyct3652 == codecSelferValueTypeArray1234 { - yyl3652 := r.ReadArrayStart() - if yyl3652 == 0 { + } else if yyct3661 == codecSelferValueTypeArray1234 { + yyl3661 := r.ReadArrayStart() + if yyl3661 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3652, d) + x.codecDecodeSelfFromArray(yyl3661, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -46045,12 +46123,12 @@ func (x *SerializedReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3653Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3653Slc - var yyhl3653 bool = l >= 0 - for yyj3653 := 0; ; yyj3653++ { - if yyhl3653 { - if yyj3653 >= l { + var yys3662Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3662Slc + var yyhl3662 bool = l >= 0 + for yyj3662 := 0; ; yyj3662++ { + if yyhl3662 { + if yyj3662 >= l { break } } else { @@ -46059,10 +46137,10 @@ func (x *SerializedReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3653Slc = r.DecodeBytes(yys3653Slc, true, true) - yys3653 := string(yys3653Slc) + yys3662Slc = r.DecodeBytes(yys3662Slc, true, true) + yys3662 := string(yys3662Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3653 { + switch yys3662 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -46079,13 +46157,13 @@ func (x *SerializedReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Reference = ObjectReference{} } else { - yyv3656 := &x.Reference - yyv3656.CodecDecodeSelf(d) + yyv3665 := &x.Reference + yyv3665.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3653) - } // end switch yys3653 - } // end for yyj3653 + z.DecStructFieldNotFound(-1, yys3662) + } // end switch yys3662 + } // end for yyj3662 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -46093,16 +46171,16 @@ func (x *SerializedReference) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3657 int - var yyb3657 bool - var yyhl3657 bool = l >= 0 - yyj3657++ - if yyhl3657 { - yyb3657 = yyj3657 > l + var yyj3666 int + var yyb3666 bool + var yyhl3666 bool = l >= 0 + yyj3666++ + if yyhl3666 { + yyb3666 = yyj3666 > l } else { - yyb3657 = r.CheckBreak() + yyb3666 = r.CheckBreak() } - if yyb3657 { + if yyb3666 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46112,13 +46190,13 @@ func (x *SerializedReference) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.Kind = string(r.DecodeString()) } - yyj3657++ - if yyhl3657 { - yyb3657 = yyj3657 > l + yyj3666++ + if yyhl3666 { + yyb3666 = yyj3666 > l } else { - yyb3657 = r.CheckBreak() + yyb3666 = r.CheckBreak() } - if yyb3657 { + if yyb3666 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46128,13 +46206,13 @@ func (x *SerializedReference) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.APIVersion = string(r.DecodeString()) } - yyj3657++ - if yyhl3657 { - yyb3657 = yyj3657 > l + yyj3666++ + if yyhl3666 { + yyb3666 = yyj3666 > l } else { - yyb3657 = r.CheckBreak() + yyb3666 = r.CheckBreak() } - if yyb3657 { + if yyb3666 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46142,21 +46220,21 @@ func (x *SerializedReference) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Reference = ObjectReference{} } else { - yyv3660 := &x.Reference - yyv3660.CodecDecodeSelf(d) + yyv3669 := &x.Reference + yyv3669.CodecDecodeSelf(d) } for { - yyj3657++ - if yyhl3657 { - yyb3657 = yyj3657 > l + yyj3666++ + if yyhl3666 { + yyb3666 = yyj3666 > l } else { - yyb3657 = r.CheckBreak() + yyb3666 = r.CheckBreak() } - if yyb3657 { + if yyb3666 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3657-1, "") + z.DecStructFieldNotFound(yyj3666-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46168,36 +46246,36 @@ func (x *EventSource) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3661 := z.EncBinary() - _ = yym3661 + yym3670 := z.EncBinary() + _ = yym3670 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3662 := !z.EncBinary() - yy2arr3662 := z.EncBasicHandle().StructToArray - var yyq3662 [2]bool - _, _, _ = yysep3662, yyq3662, yy2arr3662 - const yyr3662 bool = false - yyq3662[0] = x.Component != "" - yyq3662[1] = x.Host != "" - var yynn3662 int - if yyr3662 || yy2arr3662 { + yysep3671 := !z.EncBinary() + yy2arr3671 := z.EncBasicHandle().StructToArray + var yyq3671 [2]bool + _, _, _ = yysep3671, yyq3671, yy2arr3671 + const yyr3671 bool = false + yyq3671[0] = x.Component != "" + yyq3671[1] = x.Host != "" + var yynn3671 int + if yyr3671 || yy2arr3671 { r.EncodeArrayStart(2) } else { - yynn3662 = 0 - for _, b := range yyq3662 { + yynn3671 = 0 + for _, b := range yyq3671 { if b { - yynn3662++ + yynn3671++ } } - r.EncodeMapStart(yynn3662) - yynn3662 = 0 + r.EncodeMapStart(yynn3671) + yynn3671 = 0 } - if yyr3662 || yy2arr3662 { + if yyr3671 || yy2arr3671 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3662[0] { - yym3664 := z.EncBinary() - _ = yym3664 + if yyq3671[0] { + yym3673 := z.EncBinary() + _ = yym3673 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Component)) @@ -46206,23 +46284,23 @@ func (x *EventSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3662[0] { + if yyq3671[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("component")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3665 := z.EncBinary() - _ = yym3665 + yym3674 := z.EncBinary() + _ = yym3674 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Component)) } } } - if yyr3662 || yy2arr3662 { + if yyr3671 || yy2arr3671 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3662[1] { - yym3667 := z.EncBinary() - _ = yym3667 + if yyq3671[1] { + yym3676 := z.EncBinary() + _ = yym3676 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Host)) @@ -46231,19 +46309,19 @@ func (x *EventSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3662[1] { + if yyq3671[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("host")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3668 := z.EncBinary() - _ = yym3668 + yym3677 := z.EncBinary() + _ = yym3677 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Host)) } } } - if yyr3662 || yy2arr3662 { + if yyr3671 || yy2arr3671 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -46256,25 +46334,25 @@ func (x *EventSource) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3669 := z.DecBinary() - _ = yym3669 + yym3678 := z.DecBinary() + _ = yym3678 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3670 := r.ContainerType() - if yyct3670 == codecSelferValueTypeMap1234 { - yyl3670 := r.ReadMapStart() - if yyl3670 == 0 { + yyct3679 := r.ContainerType() + if yyct3679 == codecSelferValueTypeMap1234 { + yyl3679 := r.ReadMapStart() + if yyl3679 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3670, d) + x.codecDecodeSelfFromMap(yyl3679, d) } - } else if yyct3670 == codecSelferValueTypeArray1234 { - yyl3670 := r.ReadArrayStart() - if yyl3670 == 0 { + } else if yyct3679 == codecSelferValueTypeArray1234 { + yyl3679 := r.ReadArrayStart() + if yyl3679 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3670, d) + x.codecDecodeSelfFromArray(yyl3679, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -46286,12 +46364,12 @@ func (x *EventSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3671Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3671Slc - var yyhl3671 bool = l >= 0 - for yyj3671 := 0; ; yyj3671++ { - if yyhl3671 { - if yyj3671 >= l { + var yys3680Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3680Slc + var yyhl3680 bool = l >= 0 + for yyj3680 := 0; ; yyj3680++ { + if yyhl3680 { + if yyj3680 >= l { break } } else { @@ -46300,10 +46378,10 @@ func (x *EventSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3671Slc = r.DecodeBytes(yys3671Slc, true, true) - yys3671 := string(yys3671Slc) + yys3680Slc = r.DecodeBytes(yys3680Slc, true, true) + yys3680 := string(yys3680Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3671 { + switch yys3680 { case "component": if r.TryDecodeAsNil() { x.Component = "" @@ -46317,9 +46395,9 @@ func (x *EventSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Host = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3671) - } // end switch yys3671 - } // end for yyj3671 + z.DecStructFieldNotFound(-1, yys3680) + } // end switch yys3680 + } // end for yyj3680 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -46327,16 +46405,16 @@ func (x *EventSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3674 int - var yyb3674 bool - var yyhl3674 bool = l >= 0 - yyj3674++ - if yyhl3674 { - yyb3674 = yyj3674 > l + var yyj3683 int + var yyb3683 bool + var yyhl3683 bool = l >= 0 + yyj3683++ + if yyhl3683 { + yyb3683 = yyj3683 > l } else { - yyb3674 = r.CheckBreak() + yyb3683 = r.CheckBreak() } - if yyb3674 { + if yyb3683 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46346,13 +46424,13 @@ func (x *EventSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Component = string(r.DecodeString()) } - yyj3674++ - if yyhl3674 { - yyb3674 = yyj3674 > l + yyj3683++ + if yyhl3683 { + yyb3683 = yyj3683 > l } else { - yyb3674 = r.CheckBreak() + yyb3683 = r.CheckBreak() } - if yyb3674 { + if yyb3683 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46363,17 +46441,17 @@ func (x *EventSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Host = string(r.DecodeString()) } for { - yyj3674++ - if yyhl3674 { - yyb3674 = yyj3674 > l + yyj3683++ + if yyhl3683 { + yyb3683 = yyj3683 > l } else { - yyb3674 = r.CheckBreak() + yyb3683 = r.CheckBreak() } - if yyb3674 { + if yyb3683 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3674-1, "") + z.DecStructFieldNotFound(yyj3683-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46385,43 +46463,43 @@ func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3677 := z.EncBinary() - _ = yym3677 + yym3686 := z.EncBinary() + _ = yym3686 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3678 := !z.EncBinary() - yy2arr3678 := z.EncBasicHandle().StructToArray - var yyq3678 [11]bool - _, _, _ = yysep3678, yyq3678, yy2arr3678 - const yyr3678 bool = false - yyq3678[0] = x.Kind != "" - yyq3678[1] = x.APIVersion != "" - yyq3678[4] = x.Reason != "" - yyq3678[5] = x.Message != "" - yyq3678[6] = true - yyq3678[7] = true - yyq3678[8] = true - yyq3678[9] = x.Count != 0 - yyq3678[10] = x.Type != "" - var yynn3678 int - if yyr3678 || yy2arr3678 { + yysep3687 := !z.EncBinary() + yy2arr3687 := z.EncBasicHandle().StructToArray + var yyq3687 [11]bool + _, _, _ = yysep3687, yyq3687, yy2arr3687 + const yyr3687 bool = false + yyq3687[0] = x.Kind != "" + yyq3687[1] = x.APIVersion != "" + yyq3687[4] = x.Reason != "" + yyq3687[5] = x.Message != "" + yyq3687[6] = true + yyq3687[7] = true + yyq3687[8] = true + yyq3687[9] = x.Count != 0 + yyq3687[10] = x.Type != "" + var yynn3687 int + if yyr3687 || yy2arr3687 { r.EncodeArrayStart(11) } else { - yynn3678 = 2 - for _, b := range yyq3678 { + yynn3687 = 2 + for _, b := range yyq3687 { if b { - yynn3678++ + yynn3687++ } } - r.EncodeMapStart(yynn3678) - yynn3678 = 0 + r.EncodeMapStart(yynn3687) + yynn3687 = 0 } - if yyr3678 || yy2arr3678 { + if yyr3687 || yy2arr3687 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3678[0] { - yym3680 := z.EncBinary() - _ = yym3680 + if yyq3687[0] { + yym3689 := z.EncBinary() + _ = yym3689 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -46430,23 +46508,23 @@ func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3678[0] { + if yyq3687[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3681 := z.EncBinary() - _ = yym3681 + yym3690 := z.EncBinary() + _ = yym3690 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3678 || yy2arr3678 { + if yyr3687 || yy2arr3687 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3678[1] { - yym3683 := z.EncBinary() - _ = yym3683 + if yyq3687[1] { + yym3692 := z.EncBinary() + _ = yym3692 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -46455,45 +46533,45 @@ func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3678[1] { + if yyq3687[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3684 := z.EncBinary() - _ = yym3684 + yym3693 := z.EncBinary() + _ = yym3693 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3678 || yy2arr3678 { + if yyr3687 || yy2arr3687 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3686 := &x.ObjectMeta - yy3686.CodecEncodeSelf(e) + yy3695 := &x.ObjectMeta + yy3695.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3687 := &x.ObjectMeta - yy3687.CodecEncodeSelf(e) + yy3696 := &x.ObjectMeta + yy3696.CodecEncodeSelf(e) } - if yyr3678 || yy2arr3678 { + if yyr3687 || yy2arr3687 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy3689 := &x.InvolvedObject - yy3689.CodecEncodeSelf(e) + yy3698 := &x.InvolvedObject + yy3698.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("involvedObject")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3690 := &x.InvolvedObject - yy3690.CodecEncodeSelf(e) + yy3699 := &x.InvolvedObject + yy3699.CodecEncodeSelf(e) } - if yyr3678 || yy2arr3678 { + if yyr3687 || yy2arr3687 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3678[4] { - yym3692 := z.EncBinary() - _ = yym3692 + if yyq3687[4] { + yym3701 := z.EncBinary() + _ = yym3701 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) @@ -46502,23 +46580,23 @@ func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3678[4] { + if yyq3687[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("reason")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3693 := z.EncBinary() - _ = yym3693 + yym3702 := z.EncBinary() + _ = yym3702 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) } } } - if yyr3678 || yy2arr3678 { + if yyr3687 || yy2arr3687 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3678[5] { - yym3695 := z.EncBinary() - _ = yym3695 + if yyq3687[5] { + yym3704 := z.EncBinary() + _ = yym3704 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) @@ -46527,114 +46605,114 @@ func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3678[5] { + if yyq3687[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("message")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3696 := z.EncBinary() - _ = yym3696 + yym3705 := z.EncBinary() + _ = yym3705 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) } } } - if yyr3678 || yy2arr3678 { + if yyr3687 || yy2arr3687 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3678[6] { - yy3698 := &x.Source - yy3698.CodecEncodeSelf(e) + if yyq3687[6] { + yy3707 := &x.Source + yy3707.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3678[6] { + if yyq3687[6] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("source")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3699 := &x.Source - yy3699.CodecEncodeSelf(e) + yy3708 := &x.Source + yy3708.CodecEncodeSelf(e) } } - if yyr3678 || yy2arr3678 { + if yyr3687 || yy2arr3687 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3678[7] { - yy3701 := &x.FirstTimestamp - yym3702 := z.EncBinary() - _ = yym3702 + if yyq3687[7] { + yy3710 := &x.FirstTimestamp + yym3711 := z.EncBinary() + _ = yym3711 if false { - } else if z.HasExtensions() && z.EncExt(yy3701) { - } else if yym3702 { - z.EncBinaryMarshal(yy3701) - } else if !yym3702 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3701) + } else if z.HasExtensions() && z.EncExt(yy3710) { + } else if yym3711 { + z.EncBinaryMarshal(yy3710) + } else if !yym3711 && z.IsJSONHandle() { + z.EncJSONMarshal(yy3710) } else { - z.EncFallback(yy3701) + z.EncFallback(yy3710) } } else { r.EncodeNil() } } else { - if yyq3678[7] { + if yyq3687[7] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("firstTimestamp")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3703 := &x.FirstTimestamp - yym3704 := z.EncBinary() - _ = yym3704 + yy3712 := &x.FirstTimestamp + yym3713 := z.EncBinary() + _ = yym3713 if false { - } else if z.HasExtensions() && z.EncExt(yy3703) { - } else if yym3704 { - z.EncBinaryMarshal(yy3703) - } else if !yym3704 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3703) + } else if z.HasExtensions() && z.EncExt(yy3712) { + } else if yym3713 { + z.EncBinaryMarshal(yy3712) + } else if !yym3713 && z.IsJSONHandle() { + z.EncJSONMarshal(yy3712) } else { - z.EncFallback(yy3703) + z.EncFallback(yy3712) } } } - if yyr3678 || yy2arr3678 { + if yyr3687 || yy2arr3687 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3678[8] { - yy3706 := &x.LastTimestamp - yym3707 := z.EncBinary() - _ = yym3707 + if yyq3687[8] { + yy3715 := &x.LastTimestamp + yym3716 := z.EncBinary() + _ = yym3716 if false { - } else if z.HasExtensions() && z.EncExt(yy3706) { - } else if yym3707 { - z.EncBinaryMarshal(yy3706) - } else if !yym3707 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3706) + } else if z.HasExtensions() && z.EncExt(yy3715) { + } else if yym3716 { + z.EncBinaryMarshal(yy3715) + } else if !yym3716 && z.IsJSONHandle() { + z.EncJSONMarshal(yy3715) } else { - z.EncFallback(yy3706) + z.EncFallback(yy3715) } } else { r.EncodeNil() } } else { - if yyq3678[8] { + if yyq3687[8] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("lastTimestamp")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3708 := &x.LastTimestamp - yym3709 := z.EncBinary() - _ = yym3709 + yy3717 := &x.LastTimestamp + yym3718 := z.EncBinary() + _ = yym3718 if false { - } else if z.HasExtensions() && z.EncExt(yy3708) { - } else if yym3709 { - z.EncBinaryMarshal(yy3708) - } else if !yym3709 && z.IsJSONHandle() { - z.EncJSONMarshal(yy3708) + } else if z.HasExtensions() && z.EncExt(yy3717) { + } else if yym3718 { + z.EncBinaryMarshal(yy3717) + } else if !yym3718 && z.IsJSONHandle() { + z.EncJSONMarshal(yy3717) } else { - z.EncFallback(yy3708) + z.EncFallback(yy3717) } } } - if yyr3678 || yy2arr3678 { + if yyr3687 || yy2arr3687 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3678[9] { - yym3711 := z.EncBinary() - _ = yym3711 + if yyq3687[9] { + yym3720 := z.EncBinary() + _ = yym3720 if false { } else { r.EncodeInt(int64(x.Count)) @@ -46643,23 +46721,23 @@ func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeInt(0) } } else { - if yyq3678[9] { + if yyq3687[9] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("count")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3712 := z.EncBinary() - _ = yym3712 + yym3721 := z.EncBinary() + _ = yym3721 if false { } else { r.EncodeInt(int64(x.Count)) } } } - if yyr3678 || yy2arr3678 { + if yyr3687 || yy2arr3687 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3678[10] { - yym3714 := z.EncBinary() - _ = yym3714 + if yyq3687[10] { + yym3723 := z.EncBinary() + _ = yym3723 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Type)) @@ -46668,19 +46746,19 @@ func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3678[10] { + if yyq3687[10] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("type")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3715 := z.EncBinary() - _ = yym3715 + yym3724 := z.EncBinary() + _ = yym3724 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Type)) } } } - if yyr3678 || yy2arr3678 { + if yyr3687 || yy2arr3687 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -46693,25 +46771,25 @@ func (x *Event) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3716 := z.DecBinary() - _ = yym3716 + yym3725 := z.DecBinary() + _ = yym3725 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3717 := r.ContainerType() - if yyct3717 == codecSelferValueTypeMap1234 { - yyl3717 := r.ReadMapStart() - if yyl3717 == 0 { + yyct3726 := r.ContainerType() + if yyct3726 == codecSelferValueTypeMap1234 { + yyl3726 := r.ReadMapStart() + if yyl3726 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3717, d) + x.codecDecodeSelfFromMap(yyl3726, d) } - } else if yyct3717 == codecSelferValueTypeArray1234 { - yyl3717 := r.ReadArrayStart() - if yyl3717 == 0 { + } else if yyct3726 == codecSelferValueTypeArray1234 { + yyl3726 := r.ReadArrayStart() + if yyl3726 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3717, d) + x.codecDecodeSelfFromArray(yyl3726, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -46723,12 +46801,12 @@ func (x *Event) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3718Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3718Slc - var yyhl3718 bool = l >= 0 - for yyj3718 := 0; ; yyj3718++ { - if yyhl3718 { - if yyj3718 >= l { + var yys3727Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3727Slc + var yyhl3727 bool = l >= 0 + for yyj3727 := 0; ; yyj3727++ { + if yyhl3727 { + if yyj3727 >= l { break } } else { @@ -46737,10 +46815,10 @@ func (x *Event) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3718Slc = r.DecodeBytes(yys3718Slc, true, true) - yys3718 := string(yys3718Slc) + yys3727Slc = r.DecodeBytes(yys3727Slc, true, true) + yys3727 := string(yys3727Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3718 { + switch yys3727 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -46757,15 +46835,15 @@ func (x *Event) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3721 := &x.ObjectMeta - yyv3721.CodecDecodeSelf(d) + yyv3730 := &x.ObjectMeta + yyv3730.CodecDecodeSelf(d) } case "involvedObject": if r.TryDecodeAsNil() { x.InvolvedObject = ObjectReference{} } else { - yyv3722 := &x.InvolvedObject - yyv3722.CodecDecodeSelf(d) + yyv3731 := &x.InvolvedObject + yyv3731.CodecDecodeSelf(d) } case "reason": if r.TryDecodeAsNil() { @@ -46783,41 +46861,41 @@ func (x *Event) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Source = EventSource{} } else { - yyv3725 := &x.Source - yyv3725.CodecDecodeSelf(d) + yyv3734 := &x.Source + yyv3734.CodecDecodeSelf(d) } case "firstTimestamp": if r.TryDecodeAsNil() { x.FirstTimestamp = pkg2_unversioned.Time{} } else { - yyv3726 := &x.FirstTimestamp - yym3727 := z.DecBinary() - _ = yym3727 + yyv3735 := &x.FirstTimestamp + yym3736 := z.DecBinary() + _ = yym3736 if false { - } else if z.HasExtensions() && z.DecExt(yyv3726) { - } else if yym3727 { - z.DecBinaryUnmarshal(yyv3726) - } else if !yym3727 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3726) + } else if z.HasExtensions() && z.DecExt(yyv3735) { + } else if yym3736 { + z.DecBinaryUnmarshal(yyv3735) + } else if !yym3736 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3735) } else { - z.DecFallback(yyv3726, false) + z.DecFallback(yyv3735, false) } } case "lastTimestamp": if r.TryDecodeAsNil() { x.LastTimestamp = pkg2_unversioned.Time{} } else { - yyv3728 := &x.LastTimestamp - yym3729 := z.DecBinary() - _ = yym3729 + yyv3737 := &x.LastTimestamp + yym3738 := z.DecBinary() + _ = yym3738 if false { - } else if z.HasExtensions() && z.DecExt(yyv3728) { - } else if yym3729 { - z.DecBinaryUnmarshal(yyv3728) - } else if !yym3729 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3728) + } else if z.HasExtensions() && z.DecExt(yyv3737) { + } else if yym3738 { + z.DecBinaryUnmarshal(yyv3737) + } else if !yym3738 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3737) } else { - z.DecFallback(yyv3728, false) + z.DecFallback(yyv3737, false) } } case "count": @@ -46833,9 +46911,9 @@ func (x *Event) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Type = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys3718) - } // end switch yys3718 - } // end for yyj3718 + z.DecStructFieldNotFound(-1, yys3727) + } // end switch yys3727 + } // end for yyj3727 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -46843,16 +46921,16 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3732 int - var yyb3732 bool - var yyhl3732 bool = l >= 0 - yyj3732++ - if yyhl3732 { - yyb3732 = yyj3732 > l + var yyj3741 int + var yyb3741 bool + var yyhl3741 bool = l >= 0 + yyj3741++ + if yyhl3741 { + yyb3741 = yyj3741 > l } else { - yyb3732 = r.CheckBreak() + yyb3741 = r.CheckBreak() } - if yyb3732 { + if yyb3741 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46862,13 +46940,13 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3732++ - if yyhl3732 { - yyb3732 = yyj3732 > l + yyj3741++ + if yyhl3741 { + yyb3741 = yyj3741 > l } else { - yyb3732 = r.CheckBreak() + yyb3741 = r.CheckBreak() } - if yyb3732 { + if yyb3741 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46878,13 +46956,13 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3732++ - if yyhl3732 { - yyb3732 = yyj3732 > l + yyj3741++ + if yyhl3741 { + yyb3741 = yyj3741 > l } else { - yyb3732 = r.CheckBreak() + yyb3741 = r.CheckBreak() } - if yyb3732 { + if yyb3741 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46892,16 +46970,16 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3735 := &x.ObjectMeta - yyv3735.CodecDecodeSelf(d) + yyv3744 := &x.ObjectMeta + yyv3744.CodecDecodeSelf(d) } - yyj3732++ - if yyhl3732 { - yyb3732 = yyj3732 > l + yyj3741++ + if yyhl3741 { + yyb3741 = yyj3741 > l } else { - yyb3732 = r.CheckBreak() + yyb3741 = r.CheckBreak() } - if yyb3732 { + if yyb3741 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46909,16 +46987,16 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.InvolvedObject = ObjectReference{} } else { - yyv3736 := &x.InvolvedObject - yyv3736.CodecDecodeSelf(d) + yyv3745 := &x.InvolvedObject + yyv3745.CodecDecodeSelf(d) } - yyj3732++ - if yyhl3732 { - yyb3732 = yyj3732 > l + yyj3741++ + if yyhl3741 { + yyb3741 = yyj3741 > l } else { - yyb3732 = r.CheckBreak() + yyb3741 = r.CheckBreak() } - if yyb3732 { + if yyb3741 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46928,13 +47006,13 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Reason = string(r.DecodeString()) } - yyj3732++ - if yyhl3732 { - yyb3732 = yyj3732 > l + yyj3741++ + if yyhl3741 { + yyb3741 = yyj3741 > l } else { - yyb3732 = r.CheckBreak() + yyb3741 = r.CheckBreak() } - if yyb3732 { + if yyb3741 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46944,13 +47022,13 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Message = string(r.DecodeString()) } - yyj3732++ - if yyhl3732 { - yyb3732 = yyj3732 > l + yyj3741++ + if yyhl3741 { + yyb3741 = yyj3741 > l } else { - yyb3732 = r.CheckBreak() + yyb3741 = r.CheckBreak() } - if yyb3732 { + if yyb3741 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46958,16 +47036,16 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Source = EventSource{} } else { - yyv3739 := &x.Source - yyv3739.CodecDecodeSelf(d) + yyv3748 := &x.Source + yyv3748.CodecDecodeSelf(d) } - yyj3732++ - if yyhl3732 { - yyb3732 = yyj3732 > l + yyj3741++ + if yyhl3741 { + yyb3741 = yyj3741 > l } else { - yyb3732 = r.CheckBreak() + yyb3741 = r.CheckBreak() } - if yyb3732 { + if yyb3741 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46975,26 +47053,26 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.FirstTimestamp = pkg2_unversioned.Time{} } else { - yyv3740 := &x.FirstTimestamp - yym3741 := z.DecBinary() - _ = yym3741 + yyv3749 := &x.FirstTimestamp + yym3750 := z.DecBinary() + _ = yym3750 if false { - } else if z.HasExtensions() && z.DecExt(yyv3740) { - } else if yym3741 { - z.DecBinaryUnmarshal(yyv3740) - } else if !yym3741 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3740) + } else if z.HasExtensions() && z.DecExt(yyv3749) { + } else if yym3750 { + z.DecBinaryUnmarshal(yyv3749) + } else if !yym3750 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3749) } else { - z.DecFallback(yyv3740, false) + z.DecFallback(yyv3749, false) } } - yyj3732++ - if yyhl3732 { - yyb3732 = yyj3732 > l + yyj3741++ + if yyhl3741 { + yyb3741 = yyj3741 > l } else { - yyb3732 = r.CheckBreak() + yyb3741 = r.CheckBreak() } - if yyb3732 { + if yyb3741 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47002,26 +47080,26 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.LastTimestamp = pkg2_unversioned.Time{} } else { - yyv3742 := &x.LastTimestamp - yym3743 := z.DecBinary() - _ = yym3743 + yyv3751 := &x.LastTimestamp + yym3752 := z.DecBinary() + _ = yym3752 if false { - } else if z.HasExtensions() && z.DecExt(yyv3742) { - } else if yym3743 { - z.DecBinaryUnmarshal(yyv3742) - } else if !yym3743 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv3742) + } else if z.HasExtensions() && z.DecExt(yyv3751) { + } else if yym3752 { + z.DecBinaryUnmarshal(yyv3751) + } else if !yym3752 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv3751) } else { - z.DecFallback(yyv3742, false) + z.DecFallback(yyv3751, false) } } - yyj3732++ - if yyhl3732 { - yyb3732 = yyj3732 > l + yyj3741++ + if yyhl3741 { + yyb3741 = yyj3741 > l } else { - yyb3732 = r.CheckBreak() + yyb3741 = r.CheckBreak() } - if yyb3732 { + if yyb3741 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47031,13 +47109,13 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Count = int32(r.DecodeInt(32)) } - yyj3732++ - if yyhl3732 { - yyb3732 = yyj3732 > l + yyj3741++ + if yyhl3741 { + yyb3741 = yyj3741 > l } else { - yyb3732 = r.CheckBreak() + yyb3741 = r.CheckBreak() } - if yyb3732 { + if yyb3741 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47048,17 +47126,17 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Type = string(r.DecodeString()) } for { - yyj3732++ - if yyhl3732 { - yyb3732 = yyj3732 > l + yyj3741++ + if yyhl3741 { + yyb3741 = yyj3741 > l } else { - yyb3732 = r.CheckBreak() + yyb3741 = r.CheckBreak() } - if yyb3732 { + if yyb3741 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3732-1, "") + z.DecStructFieldNotFound(yyj3741-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -47070,37 +47148,37 @@ func (x *EventList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3746 := z.EncBinary() - _ = yym3746 + yym3755 := z.EncBinary() + _ = yym3755 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3747 := !z.EncBinary() - yy2arr3747 := z.EncBasicHandle().StructToArray - var yyq3747 [4]bool - _, _, _ = yysep3747, yyq3747, yy2arr3747 - const yyr3747 bool = false - yyq3747[0] = x.Kind != "" - yyq3747[1] = x.APIVersion != "" - yyq3747[2] = true - var yynn3747 int - if yyr3747 || yy2arr3747 { + yysep3756 := !z.EncBinary() + yy2arr3756 := z.EncBasicHandle().StructToArray + var yyq3756 [4]bool + _, _, _ = yysep3756, yyq3756, yy2arr3756 + const yyr3756 bool = false + yyq3756[0] = x.Kind != "" + yyq3756[1] = x.APIVersion != "" + yyq3756[2] = true + var yynn3756 int + if yyr3756 || yy2arr3756 { r.EncodeArrayStart(4) } else { - yynn3747 = 1 - for _, b := range yyq3747 { + yynn3756 = 1 + for _, b := range yyq3756 { if b { - yynn3747++ + yynn3756++ } } - r.EncodeMapStart(yynn3747) - yynn3747 = 0 + r.EncodeMapStart(yynn3756) + yynn3756 = 0 } - if yyr3747 || yy2arr3747 { + if yyr3756 || yy2arr3756 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3747[0] { - yym3749 := z.EncBinary() - _ = yym3749 + if yyq3756[0] { + yym3758 := z.EncBinary() + _ = yym3758 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -47109,23 +47187,23 @@ func (x *EventList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3747[0] { + if yyq3756[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3750 := z.EncBinary() - _ = yym3750 + yym3759 := z.EncBinary() + _ = yym3759 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3747 || yy2arr3747 { + if yyr3756 || yy2arr3756 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3747[1] { - yym3752 := z.EncBinary() - _ = yym3752 + if yyq3756[1] { + yym3761 := z.EncBinary() + _ = yym3761 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -47134,54 +47212,54 @@ func (x *EventList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3747[1] { + if yyq3756[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3753 := z.EncBinary() - _ = yym3753 + yym3762 := z.EncBinary() + _ = yym3762 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3747 || yy2arr3747 { + if yyr3756 || yy2arr3756 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3747[2] { - yy3755 := &x.ListMeta - yym3756 := z.EncBinary() - _ = yym3756 + if yyq3756[2] { + yy3764 := &x.ListMeta + yym3765 := z.EncBinary() + _ = yym3765 if false { - } else if z.HasExtensions() && z.EncExt(yy3755) { + } else if z.HasExtensions() && z.EncExt(yy3764) { } else { - z.EncFallback(yy3755) + z.EncFallback(yy3764) } } else { r.EncodeNil() } } else { - if yyq3747[2] { + if yyq3756[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3757 := &x.ListMeta - yym3758 := z.EncBinary() - _ = yym3758 + yy3766 := &x.ListMeta + yym3767 := z.EncBinary() + _ = yym3767 if false { - } else if z.HasExtensions() && z.EncExt(yy3757) { + } else if z.HasExtensions() && z.EncExt(yy3766) { } else { - z.EncFallback(yy3757) + z.EncFallback(yy3766) } } } - if yyr3747 || yy2arr3747 { + if yyr3756 || yy2arr3756 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym3760 := z.EncBinary() - _ = yym3760 + yym3769 := z.EncBinary() + _ = yym3769 if false { } else { h.encSliceEvent(([]Event)(x.Items), e) @@ -47194,15 +47272,15 @@ func (x *EventList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym3761 := z.EncBinary() - _ = yym3761 + yym3770 := z.EncBinary() + _ = yym3770 if false { } else { h.encSliceEvent(([]Event)(x.Items), e) } } } - if yyr3747 || yy2arr3747 { + if yyr3756 || yy2arr3756 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -47215,25 +47293,25 @@ func (x *EventList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3762 := z.DecBinary() - _ = yym3762 + yym3771 := z.DecBinary() + _ = yym3771 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3763 := r.ContainerType() - if yyct3763 == codecSelferValueTypeMap1234 { - yyl3763 := r.ReadMapStart() - if yyl3763 == 0 { + yyct3772 := r.ContainerType() + if yyct3772 == codecSelferValueTypeMap1234 { + yyl3772 := r.ReadMapStart() + if yyl3772 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3763, d) + x.codecDecodeSelfFromMap(yyl3772, d) } - } else if yyct3763 == codecSelferValueTypeArray1234 { - yyl3763 := r.ReadArrayStart() - if yyl3763 == 0 { + } else if yyct3772 == codecSelferValueTypeArray1234 { + yyl3772 := r.ReadArrayStart() + if yyl3772 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3763, d) + x.codecDecodeSelfFromArray(yyl3772, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -47245,12 +47323,12 @@ func (x *EventList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3764Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3764Slc - var yyhl3764 bool = l >= 0 - for yyj3764 := 0; ; yyj3764++ { - if yyhl3764 { - if yyj3764 >= l { + var yys3773Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3773Slc + var yyhl3773 bool = l >= 0 + for yyj3773 := 0; ; yyj3773++ { + if yyhl3773 { + if yyj3773 >= l { break } } else { @@ -47259,10 +47337,10 @@ func (x *EventList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3764Slc = r.DecodeBytes(yys3764Slc, true, true) - yys3764 := string(yys3764Slc) + yys3773Slc = r.DecodeBytes(yys3773Slc, true, true) + yys3773 := string(yys3773Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3764 { + switch yys3773 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -47279,31 +47357,31 @@ func (x *EventList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3767 := &x.ListMeta - yym3768 := z.DecBinary() - _ = yym3768 + yyv3776 := &x.ListMeta + yym3777 := z.DecBinary() + _ = yym3777 if false { - } else if z.HasExtensions() && z.DecExt(yyv3767) { + } else if z.HasExtensions() && z.DecExt(yyv3776) { } else { - z.DecFallback(yyv3767, false) + z.DecFallback(yyv3776, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3769 := &x.Items - yym3770 := z.DecBinary() - _ = yym3770 + yyv3778 := &x.Items + yym3779 := z.DecBinary() + _ = yym3779 if false { } else { - h.decSliceEvent((*[]Event)(yyv3769), d) + h.decSliceEvent((*[]Event)(yyv3778), d) } } default: - z.DecStructFieldNotFound(-1, yys3764) - } // end switch yys3764 - } // end for yyj3764 + z.DecStructFieldNotFound(-1, yys3773) + } // end switch yys3773 + } // end for yyj3773 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -47311,16 +47389,16 @@ func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3771 int - var yyb3771 bool - var yyhl3771 bool = l >= 0 - yyj3771++ - if yyhl3771 { - yyb3771 = yyj3771 > l + var yyj3780 int + var yyb3780 bool + var yyhl3780 bool = l >= 0 + yyj3780++ + if yyhl3780 { + yyb3780 = yyj3780 > l } else { - yyb3771 = r.CheckBreak() + yyb3780 = r.CheckBreak() } - if yyb3771 { + if yyb3780 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47330,13 +47408,13 @@ func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3771++ - if yyhl3771 { - yyb3771 = yyj3771 > l + yyj3780++ + if yyhl3780 { + yyb3780 = yyj3780 > l } else { - yyb3771 = r.CheckBreak() + yyb3780 = r.CheckBreak() } - if yyb3771 { + if yyb3780 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47346,13 +47424,13 @@ func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3771++ - if yyhl3771 { - yyb3771 = yyj3771 > l + yyj3780++ + if yyhl3780 { + yyb3780 = yyj3780 > l } else { - yyb3771 = r.CheckBreak() + yyb3780 = r.CheckBreak() } - if yyb3771 { + if yyb3780 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47360,22 +47438,22 @@ func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3774 := &x.ListMeta - yym3775 := z.DecBinary() - _ = yym3775 + yyv3783 := &x.ListMeta + yym3784 := z.DecBinary() + _ = yym3784 if false { - } else if z.HasExtensions() && z.DecExt(yyv3774) { + } else if z.HasExtensions() && z.DecExt(yyv3783) { } else { - z.DecFallback(yyv3774, false) + z.DecFallback(yyv3783, false) } } - yyj3771++ - if yyhl3771 { - yyb3771 = yyj3771 > l + yyj3780++ + if yyhl3780 { + yyb3780 = yyj3780 > l } else { - yyb3771 = r.CheckBreak() + yyb3780 = r.CheckBreak() } - if yyb3771 { + if yyb3780 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47383,26 +47461,26 @@ func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3776 := &x.Items - yym3777 := z.DecBinary() - _ = yym3777 + yyv3785 := &x.Items + yym3786 := z.DecBinary() + _ = yym3786 if false { } else { - h.decSliceEvent((*[]Event)(yyv3776), d) + h.decSliceEvent((*[]Event)(yyv3785), d) } } for { - yyj3771++ - if yyhl3771 { - yyb3771 = yyj3771 > l + yyj3780++ + if yyhl3780 { + yyb3780 = yyj3780 > l } else { - yyb3771 = r.CheckBreak() + yyb3780 = r.CheckBreak() } - if yyb3771 { + if yyb3780 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3771-1, "") + z.DecStructFieldNotFound(yyj3780-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -47414,37 +47492,37 @@ func (x *List) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3778 := z.EncBinary() - _ = yym3778 + yym3787 := z.EncBinary() + _ = yym3787 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3779 := !z.EncBinary() - yy2arr3779 := z.EncBasicHandle().StructToArray - var yyq3779 [4]bool - _, _, _ = yysep3779, yyq3779, yy2arr3779 - const yyr3779 bool = false - yyq3779[0] = x.Kind != "" - yyq3779[1] = x.APIVersion != "" - yyq3779[2] = true - var yynn3779 int - if yyr3779 || yy2arr3779 { + yysep3788 := !z.EncBinary() + yy2arr3788 := z.EncBasicHandle().StructToArray + var yyq3788 [4]bool + _, _, _ = yysep3788, yyq3788, yy2arr3788 + const yyr3788 bool = false + yyq3788[0] = x.Kind != "" + yyq3788[1] = x.APIVersion != "" + yyq3788[2] = true + var yynn3788 int + if yyr3788 || yy2arr3788 { r.EncodeArrayStart(4) } else { - yynn3779 = 1 - for _, b := range yyq3779 { + yynn3788 = 1 + for _, b := range yyq3788 { if b { - yynn3779++ + yynn3788++ } } - r.EncodeMapStart(yynn3779) - yynn3779 = 0 + r.EncodeMapStart(yynn3788) + yynn3788 = 0 } - if yyr3779 || yy2arr3779 { + if yyr3788 || yy2arr3788 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3779[0] { - yym3781 := z.EncBinary() - _ = yym3781 + if yyq3788[0] { + yym3790 := z.EncBinary() + _ = yym3790 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -47453,23 +47531,23 @@ func (x *List) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3779[0] { + if yyq3788[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3782 := z.EncBinary() - _ = yym3782 + yym3791 := z.EncBinary() + _ = yym3791 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3779 || yy2arr3779 { + if yyr3788 || yy2arr3788 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3779[1] { - yym3784 := z.EncBinary() - _ = yym3784 + if yyq3788[1] { + yym3793 := z.EncBinary() + _ = yym3793 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -47478,54 +47556,54 @@ func (x *List) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3779[1] { + if yyq3788[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3785 := z.EncBinary() - _ = yym3785 + yym3794 := z.EncBinary() + _ = yym3794 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3779 || yy2arr3779 { + if yyr3788 || yy2arr3788 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3779[2] { - yy3787 := &x.ListMeta - yym3788 := z.EncBinary() - _ = yym3788 + if yyq3788[2] { + yy3796 := &x.ListMeta + yym3797 := z.EncBinary() + _ = yym3797 if false { - } else if z.HasExtensions() && z.EncExt(yy3787) { + } else if z.HasExtensions() && z.EncExt(yy3796) { } else { - z.EncFallback(yy3787) + z.EncFallback(yy3796) } } else { r.EncodeNil() } } else { - if yyq3779[2] { + if yyq3788[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3789 := &x.ListMeta - yym3790 := z.EncBinary() - _ = yym3790 + yy3798 := &x.ListMeta + yym3799 := z.EncBinary() + _ = yym3799 if false { - } else if z.HasExtensions() && z.EncExt(yy3789) { + } else if z.HasExtensions() && z.EncExt(yy3798) { } else { - z.EncFallback(yy3789) + z.EncFallback(yy3798) } } } - if yyr3779 || yy2arr3779 { + if yyr3788 || yy2arr3788 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym3792 := z.EncBinary() - _ = yym3792 + yym3801 := z.EncBinary() + _ = yym3801 if false { } else { h.encSliceruntime_RawExtension(([]pkg5_runtime.RawExtension)(x.Items), e) @@ -47538,15 +47616,15 @@ func (x *List) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym3793 := z.EncBinary() - _ = yym3793 + yym3802 := z.EncBinary() + _ = yym3802 if false { } else { h.encSliceruntime_RawExtension(([]pkg5_runtime.RawExtension)(x.Items), e) } } } - if yyr3779 || yy2arr3779 { + if yyr3788 || yy2arr3788 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -47559,25 +47637,25 @@ func (x *List) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3794 := z.DecBinary() - _ = yym3794 + yym3803 := z.DecBinary() + _ = yym3803 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3795 := r.ContainerType() - if yyct3795 == codecSelferValueTypeMap1234 { - yyl3795 := r.ReadMapStart() - if yyl3795 == 0 { + yyct3804 := r.ContainerType() + if yyct3804 == codecSelferValueTypeMap1234 { + yyl3804 := r.ReadMapStart() + if yyl3804 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3795, d) + x.codecDecodeSelfFromMap(yyl3804, d) } - } else if yyct3795 == codecSelferValueTypeArray1234 { - yyl3795 := r.ReadArrayStart() - if yyl3795 == 0 { + } else if yyct3804 == codecSelferValueTypeArray1234 { + yyl3804 := r.ReadArrayStart() + if yyl3804 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3795, d) + x.codecDecodeSelfFromArray(yyl3804, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -47589,12 +47667,12 @@ func (x *List) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3796Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3796Slc - var yyhl3796 bool = l >= 0 - for yyj3796 := 0; ; yyj3796++ { - if yyhl3796 { - if yyj3796 >= l { + var yys3805Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3805Slc + var yyhl3805 bool = l >= 0 + for yyj3805 := 0; ; yyj3805++ { + if yyhl3805 { + if yyj3805 >= l { break } } else { @@ -47603,10 +47681,10 @@ func (x *List) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3796Slc = r.DecodeBytes(yys3796Slc, true, true) - yys3796 := string(yys3796Slc) + yys3805Slc = r.DecodeBytes(yys3805Slc, true, true) + yys3805 := string(yys3805Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3796 { + switch yys3805 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -47623,31 +47701,31 @@ func (x *List) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3799 := &x.ListMeta - yym3800 := z.DecBinary() - _ = yym3800 + yyv3808 := &x.ListMeta + yym3809 := z.DecBinary() + _ = yym3809 if false { - } else if z.HasExtensions() && z.DecExt(yyv3799) { + } else if z.HasExtensions() && z.DecExt(yyv3808) { } else { - z.DecFallback(yyv3799, false) + z.DecFallback(yyv3808, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3801 := &x.Items - yym3802 := z.DecBinary() - _ = yym3802 + yyv3810 := &x.Items + yym3811 := z.DecBinary() + _ = yym3811 if false { } else { - h.decSliceruntime_RawExtension((*[]pkg5_runtime.RawExtension)(yyv3801), d) + h.decSliceruntime_RawExtension((*[]pkg5_runtime.RawExtension)(yyv3810), d) } } default: - z.DecStructFieldNotFound(-1, yys3796) - } // end switch yys3796 - } // end for yyj3796 + z.DecStructFieldNotFound(-1, yys3805) + } // end switch yys3805 + } // end for yyj3805 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -47655,16 +47733,16 @@ func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3803 int - var yyb3803 bool - var yyhl3803 bool = l >= 0 - yyj3803++ - if yyhl3803 { - yyb3803 = yyj3803 > l + var yyj3812 int + var yyb3812 bool + var yyhl3812 bool = l >= 0 + yyj3812++ + if yyhl3812 { + yyb3812 = yyj3812 > l } else { - yyb3803 = r.CheckBreak() + yyb3812 = r.CheckBreak() } - if yyb3803 { + if yyb3812 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47674,13 +47752,13 @@ func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3803++ - if yyhl3803 { - yyb3803 = yyj3803 > l + yyj3812++ + if yyhl3812 { + yyb3812 = yyj3812 > l } else { - yyb3803 = r.CheckBreak() + yyb3812 = r.CheckBreak() } - if yyb3803 { + if yyb3812 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47690,13 +47768,13 @@ func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3803++ - if yyhl3803 { - yyb3803 = yyj3803 > l + yyj3812++ + if yyhl3812 { + yyb3812 = yyj3812 > l } else { - yyb3803 = r.CheckBreak() + yyb3812 = r.CheckBreak() } - if yyb3803 { + if yyb3812 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47704,22 +47782,22 @@ func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3806 := &x.ListMeta - yym3807 := z.DecBinary() - _ = yym3807 + yyv3815 := &x.ListMeta + yym3816 := z.DecBinary() + _ = yym3816 if false { - } else if z.HasExtensions() && z.DecExt(yyv3806) { + } else if z.HasExtensions() && z.DecExt(yyv3815) { } else { - z.DecFallback(yyv3806, false) + z.DecFallback(yyv3815, false) } } - yyj3803++ - if yyhl3803 { - yyb3803 = yyj3803 > l + yyj3812++ + if yyhl3812 { + yyb3812 = yyj3812 > l } else { - yyb3803 = r.CheckBreak() + yyb3812 = r.CheckBreak() } - if yyb3803 { + if yyb3812 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47727,26 +47805,26 @@ func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3808 := &x.Items - yym3809 := z.DecBinary() - _ = yym3809 + yyv3817 := &x.Items + yym3818 := z.DecBinary() + _ = yym3818 if false { } else { - h.decSliceruntime_RawExtension((*[]pkg5_runtime.RawExtension)(yyv3808), d) + h.decSliceruntime_RawExtension((*[]pkg5_runtime.RawExtension)(yyv3817), d) } } for { - yyj3803++ - if yyhl3803 { - yyb3803 = yyj3803 > l + yyj3812++ + if yyhl3812 { + yyb3812 = yyj3812 > l } else { - yyb3803 = r.CheckBreak() + yyb3812 = r.CheckBreak() } - if yyb3803 { + if yyb3812 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3803-1, "") + z.DecStructFieldNotFound(yyj3812-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -47755,8 +47833,8 @@ func (x LimitType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym3810 := z.EncBinary() - _ = yym3810 + yym3819 := z.EncBinary() + _ = yym3819 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -47768,8 +47846,8 @@ func (x *LimitType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3811 := z.DecBinary() - _ = yym3811 + yym3820 := z.DecBinary() + _ = yym3820 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -47784,53 +47862,53 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3812 := z.EncBinary() - _ = yym3812 + yym3821 := z.EncBinary() + _ = yym3821 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3813 := !z.EncBinary() - yy2arr3813 := z.EncBasicHandle().StructToArray - var yyq3813 [6]bool - _, _, _ = yysep3813, yyq3813, yy2arr3813 - const yyr3813 bool = false - yyq3813[0] = x.Type != "" - yyq3813[1] = len(x.Max) != 0 - yyq3813[2] = len(x.Min) != 0 - yyq3813[3] = len(x.Default) != 0 - yyq3813[4] = len(x.DefaultRequest) != 0 - yyq3813[5] = len(x.MaxLimitRequestRatio) != 0 - var yynn3813 int - if yyr3813 || yy2arr3813 { + yysep3822 := !z.EncBinary() + yy2arr3822 := z.EncBasicHandle().StructToArray + var yyq3822 [6]bool + _, _, _ = yysep3822, yyq3822, yy2arr3822 + const yyr3822 bool = false + yyq3822[0] = x.Type != "" + yyq3822[1] = len(x.Max) != 0 + yyq3822[2] = len(x.Min) != 0 + yyq3822[3] = len(x.Default) != 0 + yyq3822[4] = len(x.DefaultRequest) != 0 + yyq3822[5] = len(x.MaxLimitRequestRatio) != 0 + var yynn3822 int + if yyr3822 || yy2arr3822 { r.EncodeArrayStart(6) } else { - yynn3813 = 0 - for _, b := range yyq3813 { + yynn3822 = 0 + for _, b := range yyq3822 { if b { - yynn3813++ + yynn3822++ } } - r.EncodeMapStart(yynn3813) - yynn3813 = 0 + r.EncodeMapStart(yynn3822) + yynn3822 = 0 } - if yyr3813 || yy2arr3813 { + if yyr3822 || yy2arr3822 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3813[0] { + if yyq3822[0] { x.Type.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3813[0] { + if yyq3822[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("type")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } } - if yyr3813 || yy2arr3813 { + if yyr3822 || yy2arr3822 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3813[1] { + if yyq3822[1] { if x.Max == nil { r.EncodeNil() } else { @@ -47840,7 +47918,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3813[1] { + if yyq3822[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("max")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -47851,9 +47929,9 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3813 || yy2arr3813 { + if yyr3822 || yy2arr3822 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3813[2] { + if yyq3822[2] { if x.Min == nil { r.EncodeNil() } else { @@ -47863,7 +47941,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3813[2] { + if yyq3822[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("min")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -47874,9 +47952,9 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3813 || yy2arr3813 { + if yyr3822 || yy2arr3822 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3813[3] { + if yyq3822[3] { if x.Default == nil { r.EncodeNil() } else { @@ -47886,7 +47964,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3813[3] { + if yyq3822[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("default")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -47897,9 +47975,9 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3813 || yy2arr3813 { + if yyr3822 || yy2arr3822 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3813[4] { + if yyq3822[4] { if x.DefaultRequest == nil { r.EncodeNil() } else { @@ -47909,7 +47987,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3813[4] { + if yyq3822[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("defaultRequest")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -47920,9 +47998,9 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3813 || yy2arr3813 { + if yyr3822 || yy2arr3822 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3813[5] { + if yyq3822[5] { if x.MaxLimitRequestRatio == nil { r.EncodeNil() } else { @@ -47932,7 +48010,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3813[5] { + if yyq3822[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("maxLimitRequestRatio")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -47943,7 +48021,7 @@ func (x *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3813 || yy2arr3813 { + if yyr3822 || yy2arr3822 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -47956,25 +48034,25 @@ func (x *LimitRangeItem) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3820 := z.DecBinary() - _ = yym3820 + yym3829 := z.DecBinary() + _ = yym3829 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3821 := r.ContainerType() - if yyct3821 == codecSelferValueTypeMap1234 { - yyl3821 := r.ReadMapStart() - if yyl3821 == 0 { + yyct3830 := r.ContainerType() + if yyct3830 == codecSelferValueTypeMap1234 { + yyl3830 := r.ReadMapStart() + if yyl3830 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3821, d) + x.codecDecodeSelfFromMap(yyl3830, d) } - } else if yyct3821 == codecSelferValueTypeArray1234 { - yyl3821 := r.ReadArrayStart() - if yyl3821 == 0 { + } else if yyct3830 == codecSelferValueTypeArray1234 { + yyl3830 := r.ReadArrayStart() + if yyl3830 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3821, d) + x.codecDecodeSelfFromArray(yyl3830, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -47986,12 +48064,12 @@ func (x *LimitRangeItem) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3822Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3822Slc - var yyhl3822 bool = l >= 0 - for yyj3822 := 0; ; yyj3822++ { - if yyhl3822 { - if yyj3822 >= l { + var yys3831Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3831Slc + var yyhl3831 bool = l >= 0 + for yyj3831 := 0; ; yyj3831++ { + if yyhl3831 { + if yyj3831 >= l { break } } else { @@ -48000,10 +48078,10 @@ func (x *LimitRangeItem) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3822Slc = r.DecodeBytes(yys3822Slc, true, true) - yys3822 := string(yys3822Slc) + yys3831Slc = r.DecodeBytes(yys3831Slc, true, true) + yys3831 := string(yys3831Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3822 { + switch yys3831 { case "type": if r.TryDecodeAsNil() { x.Type = "" @@ -48014,41 +48092,41 @@ func (x *LimitRangeItem) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Max = nil } else { - yyv3824 := &x.Max - yyv3824.CodecDecodeSelf(d) + yyv3833 := &x.Max + yyv3833.CodecDecodeSelf(d) } case "min": if r.TryDecodeAsNil() { x.Min = nil } else { - yyv3825 := &x.Min - yyv3825.CodecDecodeSelf(d) + yyv3834 := &x.Min + yyv3834.CodecDecodeSelf(d) } case "default": if r.TryDecodeAsNil() { x.Default = nil } else { - yyv3826 := &x.Default - yyv3826.CodecDecodeSelf(d) + yyv3835 := &x.Default + yyv3835.CodecDecodeSelf(d) } case "defaultRequest": if r.TryDecodeAsNil() { x.DefaultRequest = nil } else { - yyv3827 := &x.DefaultRequest - yyv3827.CodecDecodeSelf(d) + yyv3836 := &x.DefaultRequest + yyv3836.CodecDecodeSelf(d) } case "maxLimitRequestRatio": if r.TryDecodeAsNil() { x.MaxLimitRequestRatio = nil } else { - yyv3828 := &x.MaxLimitRequestRatio - yyv3828.CodecDecodeSelf(d) + yyv3837 := &x.MaxLimitRequestRatio + yyv3837.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3822) - } // end switch yys3822 - } // end for yyj3822 + z.DecStructFieldNotFound(-1, yys3831) + } // end switch yys3831 + } // end for yyj3831 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -48056,16 +48134,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3829 int - var yyb3829 bool - var yyhl3829 bool = l >= 0 - yyj3829++ - if yyhl3829 { - yyb3829 = yyj3829 > l + var yyj3838 int + var yyb3838 bool + var yyhl3838 bool = l >= 0 + yyj3838++ + if yyhl3838 { + yyb3838 = yyj3838 > l } else { - yyb3829 = r.CheckBreak() + yyb3838 = r.CheckBreak() } - if yyb3829 { + if yyb3838 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48075,13 +48153,13 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Type = LimitType(r.DecodeString()) } - yyj3829++ - if yyhl3829 { - yyb3829 = yyj3829 > l + yyj3838++ + if yyhl3838 { + yyb3838 = yyj3838 > l } else { - yyb3829 = r.CheckBreak() + yyb3838 = r.CheckBreak() } - if yyb3829 { + if yyb3838 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48089,16 +48167,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Max = nil } else { - yyv3831 := &x.Max - yyv3831.CodecDecodeSelf(d) + yyv3840 := &x.Max + yyv3840.CodecDecodeSelf(d) } - yyj3829++ - if yyhl3829 { - yyb3829 = yyj3829 > l + yyj3838++ + if yyhl3838 { + yyb3838 = yyj3838 > l } else { - yyb3829 = r.CheckBreak() + yyb3838 = r.CheckBreak() } - if yyb3829 { + if yyb3838 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48106,16 +48184,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Min = nil } else { - yyv3832 := &x.Min - yyv3832.CodecDecodeSelf(d) + yyv3841 := &x.Min + yyv3841.CodecDecodeSelf(d) } - yyj3829++ - if yyhl3829 { - yyb3829 = yyj3829 > l + yyj3838++ + if yyhl3838 { + yyb3838 = yyj3838 > l } else { - yyb3829 = r.CheckBreak() + yyb3838 = r.CheckBreak() } - if yyb3829 { + if yyb3838 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48123,16 +48201,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Default = nil } else { - yyv3833 := &x.Default - yyv3833.CodecDecodeSelf(d) + yyv3842 := &x.Default + yyv3842.CodecDecodeSelf(d) } - yyj3829++ - if yyhl3829 { - yyb3829 = yyj3829 > l + yyj3838++ + if yyhl3838 { + yyb3838 = yyj3838 > l } else { - yyb3829 = r.CheckBreak() + yyb3838 = r.CheckBreak() } - if yyb3829 { + if yyb3838 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48140,16 +48218,16 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.DefaultRequest = nil } else { - yyv3834 := &x.DefaultRequest - yyv3834.CodecDecodeSelf(d) + yyv3843 := &x.DefaultRequest + yyv3843.CodecDecodeSelf(d) } - yyj3829++ - if yyhl3829 { - yyb3829 = yyj3829 > l + yyj3838++ + if yyhl3838 { + yyb3838 = yyj3838 > l } else { - yyb3829 = r.CheckBreak() + yyb3838 = r.CheckBreak() } - if yyb3829 { + if yyb3838 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48157,21 +48235,21 @@ func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.MaxLimitRequestRatio = nil } else { - yyv3835 := &x.MaxLimitRequestRatio - yyv3835.CodecDecodeSelf(d) + yyv3844 := &x.MaxLimitRequestRatio + yyv3844.CodecDecodeSelf(d) } for { - yyj3829++ - if yyhl3829 { - yyb3829 = yyj3829 > l + yyj3838++ + if yyhl3838 { + yyb3838 = yyj3838 > l } else { - yyb3829 = r.CheckBreak() + yyb3838 = r.CheckBreak() } - if yyb3829 { + if yyb3838 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3829-1, "") + z.DecStructFieldNotFound(yyj3838-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -48183,36 +48261,36 @@ func (x *LimitRangeSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3836 := z.EncBinary() - _ = yym3836 + yym3845 := z.EncBinary() + _ = yym3845 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3837 := !z.EncBinary() - yy2arr3837 := z.EncBasicHandle().StructToArray - var yyq3837 [1]bool - _, _, _ = yysep3837, yyq3837, yy2arr3837 - const yyr3837 bool = false - var yynn3837 int - if yyr3837 || yy2arr3837 { + yysep3846 := !z.EncBinary() + yy2arr3846 := z.EncBasicHandle().StructToArray + var yyq3846 [1]bool + _, _, _ = yysep3846, yyq3846, yy2arr3846 + const yyr3846 bool = false + var yynn3846 int + if yyr3846 || yy2arr3846 { r.EncodeArrayStart(1) } else { - yynn3837 = 1 - for _, b := range yyq3837 { + yynn3846 = 1 + for _, b := range yyq3846 { if b { - yynn3837++ + yynn3846++ } } - r.EncodeMapStart(yynn3837) - yynn3837 = 0 + r.EncodeMapStart(yynn3846) + yynn3846 = 0 } - if yyr3837 || yy2arr3837 { + if yyr3846 || yy2arr3846 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Limits == nil { r.EncodeNil() } else { - yym3839 := z.EncBinary() - _ = yym3839 + yym3848 := z.EncBinary() + _ = yym3848 if false { } else { h.encSliceLimitRangeItem(([]LimitRangeItem)(x.Limits), e) @@ -48225,15 +48303,15 @@ func (x *LimitRangeSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x.Limits == nil { r.EncodeNil() } else { - yym3840 := z.EncBinary() - _ = yym3840 + yym3849 := z.EncBinary() + _ = yym3849 if false { } else { h.encSliceLimitRangeItem(([]LimitRangeItem)(x.Limits), e) } } } - if yyr3837 || yy2arr3837 { + if yyr3846 || yy2arr3846 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -48246,25 +48324,25 @@ func (x *LimitRangeSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3841 := z.DecBinary() - _ = yym3841 + yym3850 := z.DecBinary() + _ = yym3850 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3842 := r.ContainerType() - if yyct3842 == codecSelferValueTypeMap1234 { - yyl3842 := r.ReadMapStart() - if yyl3842 == 0 { + yyct3851 := r.ContainerType() + if yyct3851 == codecSelferValueTypeMap1234 { + yyl3851 := r.ReadMapStart() + if yyl3851 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3842, d) + x.codecDecodeSelfFromMap(yyl3851, d) } - } else if yyct3842 == codecSelferValueTypeArray1234 { - yyl3842 := r.ReadArrayStart() - if yyl3842 == 0 { + } else if yyct3851 == codecSelferValueTypeArray1234 { + yyl3851 := r.ReadArrayStart() + if yyl3851 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3842, d) + x.codecDecodeSelfFromArray(yyl3851, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -48276,12 +48354,12 @@ func (x *LimitRangeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3843Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3843Slc - var yyhl3843 bool = l >= 0 - for yyj3843 := 0; ; yyj3843++ { - if yyhl3843 { - if yyj3843 >= l { + var yys3852Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3852Slc + var yyhl3852 bool = l >= 0 + for yyj3852 := 0; ; yyj3852++ { + if yyhl3852 { + if yyj3852 >= l { break } } else { @@ -48290,26 +48368,26 @@ func (x *LimitRangeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3843Slc = r.DecodeBytes(yys3843Slc, true, true) - yys3843 := string(yys3843Slc) + yys3852Slc = r.DecodeBytes(yys3852Slc, true, true) + yys3852 := string(yys3852Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3843 { + switch yys3852 { case "limits": if r.TryDecodeAsNil() { x.Limits = nil } else { - yyv3844 := &x.Limits - yym3845 := z.DecBinary() - _ = yym3845 + yyv3853 := &x.Limits + yym3854 := z.DecBinary() + _ = yym3854 if false { } else { - h.decSliceLimitRangeItem((*[]LimitRangeItem)(yyv3844), d) + h.decSliceLimitRangeItem((*[]LimitRangeItem)(yyv3853), d) } } default: - z.DecStructFieldNotFound(-1, yys3843) - } // end switch yys3843 - } // end for yyj3843 + z.DecStructFieldNotFound(-1, yys3852) + } // end switch yys3852 + } // end for yyj3852 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -48317,16 +48395,16 @@ func (x *LimitRangeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3846 int - var yyb3846 bool - var yyhl3846 bool = l >= 0 - yyj3846++ - if yyhl3846 { - yyb3846 = yyj3846 > l + var yyj3855 int + var yyb3855 bool + var yyhl3855 bool = l >= 0 + yyj3855++ + if yyhl3855 { + yyb3855 = yyj3855 > l } else { - yyb3846 = r.CheckBreak() + yyb3855 = r.CheckBreak() } - if yyb3846 { + if yyb3855 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48334,26 +48412,26 @@ func (x *LimitRangeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Limits = nil } else { - yyv3847 := &x.Limits - yym3848 := z.DecBinary() - _ = yym3848 + yyv3856 := &x.Limits + yym3857 := z.DecBinary() + _ = yym3857 if false { } else { - h.decSliceLimitRangeItem((*[]LimitRangeItem)(yyv3847), d) + h.decSliceLimitRangeItem((*[]LimitRangeItem)(yyv3856), d) } } for { - yyj3846++ - if yyhl3846 { - yyb3846 = yyj3846 > l + yyj3855++ + if yyhl3855 { + yyb3855 = yyj3855 > l } else { - yyb3846 = r.CheckBreak() + yyb3855 = r.CheckBreak() } - if yyb3846 { + if yyb3855 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3846-1, "") + z.DecStructFieldNotFound(yyj3855-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -48365,38 +48443,38 @@ func (x *LimitRange) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3849 := z.EncBinary() - _ = yym3849 + yym3858 := z.EncBinary() + _ = yym3858 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3850 := !z.EncBinary() - yy2arr3850 := z.EncBasicHandle().StructToArray - var yyq3850 [4]bool - _, _, _ = yysep3850, yyq3850, yy2arr3850 - const yyr3850 bool = false - yyq3850[0] = x.Kind != "" - yyq3850[1] = x.APIVersion != "" - yyq3850[2] = true - yyq3850[3] = true - var yynn3850 int - if yyr3850 || yy2arr3850 { + yysep3859 := !z.EncBinary() + yy2arr3859 := z.EncBasicHandle().StructToArray + var yyq3859 [4]bool + _, _, _ = yysep3859, yyq3859, yy2arr3859 + const yyr3859 bool = false + yyq3859[0] = x.Kind != "" + yyq3859[1] = x.APIVersion != "" + yyq3859[2] = true + yyq3859[3] = true + var yynn3859 int + if yyr3859 || yy2arr3859 { r.EncodeArrayStart(4) } else { - yynn3850 = 0 - for _, b := range yyq3850 { + yynn3859 = 0 + for _, b := range yyq3859 { if b { - yynn3850++ + yynn3859++ } } - r.EncodeMapStart(yynn3850) - yynn3850 = 0 + r.EncodeMapStart(yynn3859) + yynn3859 = 0 } - if yyr3850 || yy2arr3850 { + if yyr3859 || yy2arr3859 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3850[0] { - yym3852 := z.EncBinary() - _ = yym3852 + if yyq3859[0] { + yym3861 := z.EncBinary() + _ = yym3861 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -48405,23 +48483,23 @@ func (x *LimitRange) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3850[0] { + if yyq3859[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3853 := z.EncBinary() - _ = yym3853 + yym3862 := z.EncBinary() + _ = yym3862 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3850 || yy2arr3850 { + if yyr3859 || yy2arr3859 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3850[1] { - yym3855 := z.EncBinary() - _ = yym3855 + if yyq3859[1] { + yym3864 := z.EncBinary() + _ = yym3864 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -48430,53 +48508,53 @@ func (x *LimitRange) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3850[1] { + if yyq3859[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3856 := z.EncBinary() - _ = yym3856 + yym3865 := z.EncBinary() + _ = yym3865 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3850 || yy2arr3850 { + if yyr3859 || yy2arr3859 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3850[2] { - yy3858 := &x.ObjectMeta - yy3858.CodecEncodeSelf(e) + if yyq3859[2] { + yy3867 := &x.ObjectMeta + yy3867.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3850[2] { + if yyq3859[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3859 := &x.ObjectMeta - yy3859.CodecEncodeSelf(e) + yy3868 := &x.ObjectMeta + yy3868.CodecEncodeSelf(e) } } - if yyr3850 || yy2arr3850 { + if yyr3859 || yy2arr3859 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3850[3] { - yy3861 := &x.Spec - yy3861.CodecEncodeSelf(e) + if yyq3859[3] { + yy3870 := &x.Spec + yy3870.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3850[3] { + if yyq3859[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3862 := &x.Spec - yy3862.CodecEncodeSelf(e) + yy3871 := &x.Spec + yy3871.CodecEncodeSelf(e) } } - if yyr3850 || yy2arr3850 { + if yyr3859 || yy2arr3859 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -48489,25 +48567,25 @@ func (x *LimitRange) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3863 := z.DecBinary() - _ = yym3863 + yym3872 := z.DecBinary() + _ = yym3872 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3864 := r.ContainerType() - if yyct3864 == codecSelferValueTypeMap1234 { - yyl3864 := r.ReadMapStart() - if yyl3864 == 0 { + yyct3873 := r.ContainerType() + if yyct3873 == codecSelferValueTypeMap1234 { + yyl3873 := r.ReadMapStart() + if yyl3873 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3864, d) + x.codecDecodeSelfFromMap(yyl3873, d) } - } else if yyct3864 == codecSelferValueTypeArray1234 { - yyl3864 := r.ReadArrayStart() - if yyl3864 == 0 { + } else if yyct3873 == codecSelferValueTypeArray1234 { + yyl3873 := r.ReadArrayStart() + if yyl3873 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3864, d) + x.codecDecodeSelfFromArray(yyl3873, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -48519,12 +48597,12 @@ func (x *LimitRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3865Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3865Slc - var yyhl3865 bool = l >= 0 - for yyj3865 := 0; ; yyj3865++ { - if yyhl3865 { - if yyj3865 >= l { + var yys3874Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3874Slc + var yyhl3874 bool = l >= 0 + for yyj3874 := 0; ; yyj3874++ { + if yyhl3874 { + if yyj3874 >= l { break } } else { @@ -48533,10 +48611,10 @@ func (x *LimitRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3865Slc = r.DecodeBytes(yys3865Slc, true, true) - yys3865 := string(yys3865Slc) + yys3874Slc = r.DecodeBytes(yys3874Slc, true, true) + yys3874 := string(yys3874Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3865 { + switch yys3874 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -48553,20 +48631,20 @@ func (x *LimitRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3868 := &x.ObjectMeta - yyv3868.CodecDecodeSelf(d) + yyv3877 := &x.ObjectMeta + yyv3877.CodecDecodeSelf(d) } case "spec": if r.TryDecodeAsNil() { x.Spec = LimitRangeSpec{} } else { - yyv3869 := &x.Spec - yyv3869.CodecDecodeSelf(d) + yyv3878 := &x.Spec + yyv3878.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3865) - } // end switch yys3865 - } // end for yyj3865 + z.DecStructFieldNotFound(-1, yys3874) + } // end switch yys3874 + } // end for yyj3874 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -48574,16 +48652,16 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3870 int - var yyb3870 bool - var yyhl3870 bool = l >= 0 - yyj3870++ - if yyhl3870 { - yyb3870 = yyj3870 > l + var yyj3879 int + var yyb3879 bool + var yyhl3879 bool = l >= 0 + yyj3879++ + if yyhl3879 { + yyb3879 = yyj3879 > l } else { - yyb3870 = r.CheckBreak() + yyb3879 = r.CheckBreak() } - if yyb3870 { + if yyb3879 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48593,13 +48671,13 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3870++ - if yyhl3870 { - yyb3870 = yyj3870 > l + yyj3879++ + if yyhl3879 { + yyb3879 = yyj3879 > l } else { - yyb3870 = r.CheckBreak() + yyb3879 = r.CheckBreak() } - if yyb3870 { + if yyb3879 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48609,13 +48687,13 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3870++ - if yyhl3870 { - yyb3870 = yyj3870 > l + yyj3879++ + if yyhl3879 { + yyb3879 = yyj3879 > l } else { - yyb3870 = r.CheckBreak() + yyb3879 = r.CheckBreak() } - if yyb3870 { + if yyb3879 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48623,16 +48701,16 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3873 := &x.ObjectMeta - yyv3873.CodecDecodeSelf(d) + yyv3882 := &x.ObjectMeta + yyv3882.CodecDecodeSelf(d) } - yyj3870++ - if yyhl3870 { - yyb3870 = yyj3870 > l + yyj3879++ + if yyhl3879 { + yyb3879 = yyj3879 > l } else { - yyb3870 = r.CheckBreak() + yyb3879 = r.CheckBreak() } - if yyb3870 { + if yyb3879 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48640,21 +48718,21 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = LimitRangeSpec{} } else { - yyv3874 := &x.Spec - yyv3874.CodecDecodeSelf(d) + yyv3883 := &x.Spec + yyv3883.CodecDecodeSelf(d) } for { - yyj3870++ - if yyhl3870 { - yyb3870 = yyj3870 > l + yyj3879++ + if yyhl3879 { + yyb3879 = yyj3879 > l } else { - yyb3870 = r.CheckBreak() + yyb3879 = r.CheckBreak() } - if yyb3870 { + if yyb3879 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3870-1, "") + z.DecStructFieldNotFound(yyj3879-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -48666,37 +48744,37 @@ func (x *LimitRangeList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3875 := z.EncBinary() - _ = yym3875 + yym3884 := z.EncBinary() + _ = yym3884 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3876 := !z.EncBinary() - yy2arr3876 := z.EncBasicHandle().StructToArray - var yyq3876 [4]bool - _, _, _ = yysep3876, yyq3876, yy2arr3876 - const yyr3876 bool = false - yyq3876[0] = x.Kind != "" - yyq3876[1] = x.APIVersion != "" - yyq3876[2] = true - var yynn3876 int - if yyr3876 || yy2arr3876 { + yysep3885 := !z.EncBinary() + yy2arr3885 := z.EncBasicHandle().StructToArray + var yyq3885 [4]bool + _, _, _ = yysep3885, yyq3885, yy2arr3885 + const yyr3885 bool = false + yyq3885[0] = x.Kind != "" + yyq3885[1] = x.APIVersion != "" + yyq3885[2] = true + var yynn3885 int + if yyr3885 || yy2arr3885 { r.EncodeArrayStart(4) } else { - yynn3876 = 1 - for _, b := range yyq3876 { + yynn3885 = 1 + for _, b := range yyq3885 { if b { - yynn3876++ + yynn3885++ } } - r.EncodeMapStart(yynn3876) - yynn3876 = 0 + r.EncodeMapStart(yynn3885) + yynn3885 = 0 } - if yyr3876 || yy2arr3876 { + if yyr3885 || yy2arr3885 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3876[0] { - yym3878 := z.EncBinary() - _ = yym3878 + if yyq3885[0] { + yym3887 := z.EncBinary() + _ = yym3887 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -48705,23 +48783,23 @@ func (x *LimitRangeList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3876[0] { + if yyq3885[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3879 := z.EncBinary() - _ = yym3879 + yym3888 := z.EncBinary() + _ = yym3888 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3876 || yy2arr3876 { + if yyr3885 || yy2arr3885 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3876[1] { - yym3881 := z.EncBinary() - _ = yym3881 + if yyq3885[1] { + yym3890 := z.EncBinary() + _ = yym3890 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -48730,54 +48808,54 @@ func (x *LimitRangeList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3876[1] { + if yyq3885[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3882 := z.EncBinary() - _ = yym3882 + yym3891 := z.EncBinary() + _ = yym3891 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3876 || yy2arr3876 { + if yyr3885 || yy2arr3885 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3876[2] { - yy3884 := &x.ListMeta - yym3885 := z.EncBinary() - _ = yym3885 + if yyq3885[2] { + yy3893 := &x.ListMeta + yym3894 := z.EncBinary() + _ = yym3894 if false { - } else if z.HasExtensions() && z.EncExt(yy3884) { + } else if z.HasExtensions() && z.EncExt(yy3893) { } else { - z.EncFallback(yy3884) + z.EncFallback(yy3893) } } else { r.EncodeNil() } } else { - if yyq3876[2] { + if yyq3885[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3886 := &x.ListMeta - yym3887 := z.EncBinary() - _ = yym3887 + yy3895 := &x.ListMeta + yym3896 := z.EncBinary() + _ = yym3896 if false { - } else if z.HasExtensions() && z.EncExt(yy3886) { + } else if z.HasExtensions() && z.EncExt(yy3895) { } else { - z.EncFallback(yy3886) + z.EncFallback(yy3895) } } } - if yyr3876 || yy2arr3876 { + if yyr3885 || yy2arr3885 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym3889 := z.EncBinary() - _ = yym3889 + yym3898 := z.EncBinary() + _ = yym3898 if false { } else { h.encSliceLimitRange(([]LimitRange)(x.Items), e) @@ -48790,15 +48868,15 @@ func (x *LimitRangeList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym3890 := z.EncBinary() - _ = yym3890 + yym3899 := z.EncBinary() + _ = yym3899 if false { } else { h.encSliceLimitRange(([]LimitRange)(x.Items), e) } } } - if yyr3876 || yy2arr3876 { + if yyr3885 || yy2arr3885 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -48811,25 +48889,25 @@ func (x *LimitRangeList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3891 := z.DecBinary() - _ = yym3891 + yym3900 := z.DecBinary() + _ = yym3900 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3892 := r.ContainerType() - if yyct3892 == codecSelferValueTypeMap1234 { - yyl3892 := r.ReadMapStart() - if yyl3892 == 0 { + yyct3901 := r.ContainerType() + if yyct3901 == codecSelferValueTypeMap1234 { + yyl3901 := r.ReadMapStart() + if yyl3901 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3892, d) + x.codecDecodeSelfFromMap(yyl3901, d) } - } else if yyct3892 == codecSelferValueTypeArray1234 { - yyl3892 := r.ReadArrayStart() - if yyl3892 == 0 { + } else if yyct3901 == codecSelferValueTypeArray1234 { + yyl3901 := r.ReadArrayStart() + if yyl3901 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3892, d) + x.codecDecodeSelfFromArray(yyl3901, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -48841,12 +48919,12 @@ func (x *LimitRangeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3893Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3893Slc - var yyhl3893 bool = l >= 0 - for yyj3893 := 0; ; yyj3893++ { - if yyhl3893 { - if yyj3893 >= l { + var yys3902Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3902Slc + var yyhl3902 bool = l >= 0 + for yyj3902 := 0; ; yyj3902++ { + if yyhl3902 { + if yyj3902 >= l { break } } else { @@ -48855,10 +48933,10 @@ func (x *LimitRangeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3893Slc = r.DecodeBytes(yys3893Slc, true, true) - yys3893 := string(yys3893Slc) + yys3902Slc = r.DecodeBytes(yys3902Slc, true, true) + yys3902 := string(yys3902Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3893 { + switch yys3902 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -48875,31 +48953,31 @@ func (x *LimitRangeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3896 := &x.ListMeta - yym3897 := z.DecBinary() - _ = yym3897 + yyv3905 := &x.ListMeta + yym3906 := z.DecBinary() + _ = yym3906 if false { - } else if z.HasExtensions() && z.DecExt(yyv3896) { + } else if z.HasExtensions() && z.DecExt(yyv3905) { } else { - z.DecFallback(yyv3896, false) + z.DecFallback(yyv3905, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3898 := &x.Items - yym3899 := z.DecBinary() - _ = yym3899 + yyv3907 := &x.Items + yym3908 := z.DecBinary() + _ = yym3908 if false { } else { - h.decSliceLimitRange((*[]LimitRange)(yyv3898), d) + h.decSliceLimitRange((*[]LimitRange)(yyv3907), d) } } default: - z.DecStructFieldNotFound(-1, yys3893) - } // end switch yys3893 - } // end for yyj3893 + z.DecStructFieldNotFound(-1, yys3902) + } // end switch yys3902 + } // end for yyj3902 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -48907,16 +48985,16 @@ func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3900 int - var yyb3900 bool - var yyhl3900 bool = l >= 0 - yyj3900++ - if yyhl3900 { - yyb3900 = yyj3900 > l + var yyj3909 int + var yyb3909 bool + var yyhl3909 bool = l >= 0 + yyj3909++ + if yyhl3909 { + yyb3909 = yyj3909 > l } else { - yyb3900 = r.CheckBreak() + yyb3909 = r.CheckBreak() } - if yyb3900 { + if yyb3909 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48926,13 +49004,13 @@ func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3900++ - if yyhl3900 { - yyb3900 = yyj3900 > l + yyj3909++ + if yyhl3909 { + yyb3909 = yyj3909 > l } else { - yyb3900 = r.CheckBreak() + yyb3909 = r.CheckBreak() } - if yyb3900 { + if yyb3909 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48942,13 +49020,13 @@ func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3900++ - if yyhl3900 { - yyb3900 = yyj3900 > l + yyj3909++ + if yyhl3909 { + yyb3909 = yyj3909 > l } else { - yyb3900 = r.CheckBreak() + yyb3909 = r.CheckBreak() } - if yyb3900 { + if yyb3909 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48956,22 +49034,22 @@ func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3903 := &x.ListMeta - yym3904 := z.DecBinary() - _ = yym3904 + yyv3912 := &x.ListMeta + yym3913 := z.DecBinary() + _ = yym3913 if false { - } else if z.HasExtensions() && z.DecExt(yyv3903) { + } else if z.HasExtensions() && z.DecExt(yyv3912) { } else { - z.DecFallback(yyv3903, false) + z.DecFallback(yyv3912, false) } } - yyj3900++ - if yyhl3900 { - yyb3900 = yyj3900 > l + yyj3909++ + if yyhl3909 { + yyb3909 = yyj3909 > l } else { - yyb3900 = r.CheckBreak() + yyb3909 = r.CheckBreak() } - if yyb3900 { + if yyb3909 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -48979,26 +49057,26 @@ func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3905 := &x.Items - yym3906 := z.DecBinary() - _ = yym3906 + yyv3914 := &x.Items + yym3915 := z.DecBinary() + _ = yym3915 if false { } else { - h.decSliceLimitRange((*[]LimitRange)(yyv3905), d) + h.decSliceLimitRange((*[]LimitRange)(yyv3914), d) } } for { - yyj3900++ - if yyhl3900 { - yyb3900 = yyj3900 > l + yyj3909++ + if yyhl3909 { + yyb3909 = yyj3909 > l } else { - yyb3900 = r.CheckBreak() + yyb3909 = r.CheckBreak() } - if yyb3900 { + if yyb3909 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3900-1, "") + z.DecStructFieldNotFound(yyj3909-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -49007,8 +49085,8 @@ func (x ResourceQuotaScope) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym3907 := z.EncBinary() - _ = yym3907 + yym3916 := z.EncBinary() + _ = yym3916 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -49020,8 +49098,8 @@ func (x *ResourceQuotaScope) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3908 := z.DecBinary() - _ = yym3908 + yym3917 := z.DecBinary() + _ = yym3917 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -49036,34 +49114,34 @@ func (x *ResourceQuotaSpec) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3909 := z.EncBinary() - _ = yym3909 + yym3918 := z.EncBinary() + _ = yym3918 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3910 := !z.EncBinary() - yy2arr3910 := z.EncBasicHandle().StructToArray - var yyq3910 [2]bool - _, _, _ = yysep3910, yyq3910, yy2arr3910 - const yyr3910 bool = false - yyq3910[0] = len(x.Hard) != 0 - yyq3910[1] = len(x.Scopes) != 0 - var yynn3910 int - if yyr3910 || yy2arr3910 { + yysep3919 := !z.EncBinary() + yy2arr3919 := z.EncBasicHandle().StructToArray + var yyq3919 [2]bool + _, _, _ = yysep3919, yyq3919, yy2arr3919 + const yyr3919 bool = false + yyq3919[0] = len(x.Hard) != 0 + yyq3919[1] = len(x.Scopes) != 0 + var yynn3919 int + if yyr3919 || yy2arr3919 { r.EncodeArrayStart(2) } else { - yynn3910 = 0 - for _, b := range yyq3910 { + yynn3919 = 0 + for _, b := range yyq3919 { if b { - yynn3910++ + yynn3919++ } } - r.EncodeMapStart(yynn3910) - yynn3910 = 0 + r.EncodeMapStart(yynn3919) + yynn3919 = 0 } - if yyr3910 || yy2arr3910 { + if yyr3919 || yy2arr3919 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3910[0] { + if yyq3919[0] { if x.Hard == nil { r.EncodeNil() } else { @@ -49073,7 +49151,7 @@ func (x *ResourceQuotaSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3910[0] { + if yyq3919[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hard")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -49084,14 +49162,14 @@ func (x *ResourceQuotaSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3910 || yy2arr3910 { + if yyr3919 || yy2arr3919 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3910[1] { + if yyq3919[1] { if x.Scopes == nil { r.EncodeNil() } else { - yym3913 := z.EncBinary() - _ = yym3913 + yym3922 := z.EncBinary() + _ = yym3922 if false { } else { h.encSliceResourceQuotaScope(([]ResourceQuotaScope)(x.Scopes), e) @@ -49101,15 +49179,15 @@ func (x *ResourceQuotaSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3910[1] { + if yyq3919[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("scopes")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Scopes == nil { r.EncodeNil() } else { - yym3914 := z.EncBinary() - _ = yym3914 + yym3923 := z.EncBinary() + _ = yym3923 if false { } else { h.encSliceResourceQuotaScope(([]ResourceQuotaScope)(x.Scopes), e) @@ -49117,7 +49195,7 @@ func (x *ResourceQuotaSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3910 || yy2arr3910 { + if yyr3919 || yy2arr3919 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -49130,25 +49208,25 @@ func (x *ResourceQuotaSpec) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3915 := z.DecBinary() - _ = yym3915 + yym3924 := z.DecBinary() + _ = yym3924 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3916 := r.ContainerType() - if yyct3916 == codecSelferValueTypeMap1234 { - yyl3916 := r.ReadMapStart() - if yyl3916 == 0 { + yyct3925 := r.ContainerType() + if yyct3925 == codecSelferValueTypeMap1234 { + yyl3925 := r.ReadMapStart() + if yyl3925 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3916, d) + x.codecDecodeSelfFromMap(yyl3925, d) } - } else if yyct3916 == codecSelferValueTypeArray1234 { - yyl3916 := r.ReadArrayStart() - if yyl3916 == 0 { + } else if yyct3925 == codecSelferValueTypeArray1234 { + yyl3925 := r.ReadArrayStart() + if yyl3925 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3916, d) + x.codecDecodeSelfFromArray(yyl3925, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -49160,12 +49238,12 @@ func (x *ResourceQuotaSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3917Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3917Slc - var yyhl3917 bool = l >= 0 - for yyj3917 := 0; ; yyj3917++ { - if yyhl3917 { - if yyj3917 >= l { + var yys3926Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3926Slc + var yyhl3926 bool = l >= 0 + for yyj3926 := 0; ; yyj3926++ { + if yyhl3926 { + if yyj3926 >= l { break } } else { @@ -49174,33 +49252,33 @@ func (x *ResourceQuotaSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3917Slc = r.DecodeBytes(yys3917Slc, true, true) - yys3917 := string(yys3917Slc) + yys3926Slc = r.DecodeBytes(yys3926Slc, true, true) + yys3926 := string(yys3926Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3917 { + switch yys3926 { case "hard": if r.TryDecodeAsNil() { x.Hard = nil } else { - yyv3918 := &x.Hard - yyv3918.CodecDecodeSelf(d) + yyv3927 := &x.Hard + yyv3927.CodecDecodeSelf(d) } case "scopes": if r.TryDecodeAsNil() { x.Scopes = nil } else { - yyv3919 := &x.Scopes - yym3920 := z.DecBinary() - _ = yym3920 + yyv3928 := &x.Scopes + yym3929 := z.DecBinary() + _ = yym3929 if false { } else { - h.decSliceResourceQuotaScope((*[]ResourceQuotaScope)(yyv3919), d) + h.decSliceResourceQuotaScope((*[]ResourceQuotaScope)(yyv3928), d) } } default: - z.DecStructFieldNotFound(-1, yys3917) - } // end switch yys3917 - } // end for yyj3917 + z.DecStructFieldNotFound(-1, yys3926) + } // end switch yys3926 + } // end for yyj3926 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -49208,16 +49286,16 @@ func (x *ResourceQuotaSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3921 int - var yyb3921 bool - var yyhl3921 bool = l >= 0 - yyj3921++ - if yyhl3921 { - yyb3921 = yyj3921 > l + var yyj3930 int + var yyb3930 bool + var yyhl3930 bool = l >= 0 + yyj3930++ + if yyhl3930 { + yyb3930 = yyj3930 > l } else { - yyb3921 = r.CheckBreak() + yyb3930 = r.CheckBreak() } - if yyb3921 { + if yyb3930 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49225,16 +49303,16 @@ func (x *ResourceQuotaSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Hard = nil } else { - yyv3922 := &x.Hard - yyv3922.CodecDecodeSelf(d) + yyv3931 := &x.Hard + yyv3931.CodecDecodeSelf(d) } - yyj3921++ - if yyhl3921 { - yyb3921 = yyj3921 > l + yyj3930++ + if yyhl3930 { + yyb3930 = yyj3930 > l } else { - yyb3921 = r.CheckBreak() + yyb3930 = r.CheckBreak() } - if yyb3921 { + if yyb3930 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49242,26 +49320,26 @@ func (x *ResourceQuotaSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Scopes = nil } else { - yyv3923 := &x.Scopes - yym3924 := z.DecBinary() - _ = yym3924 + yyv3932 := &x.Scopes + yym3933 := z.DecBinary() + _ = yym3933 if false { } else { - h.decSliceResourceQuotaScope((*[]ResourceQuotaScope)(yyv3923), d) + h.decSliceResourceQuotaScope((*[]ResourceQuotaScope)(yyv3932), d) } } for { - yyj3921++ - if yyhl3921 { - yyb3921 = yyj3921 > l + yyj3930++ + if yyhl3930 { + yyb3930 = yyj3930 > l } else { - yyb3921 = r.CheckBreak() + yyb3930 = r.CheckBreak() } - if yyb3921 { + if yyb3930 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3921-1, "") + z.DecStructFieldNotFound(yyj3930-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -49273,34 +49351,34 @@ func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3925 := z.EncBinary() - _ = yym3925 + yym3934 := z.EncBinary() + _ = yym3934 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3926 := !z.EncBinary() - yy2arr3926 := z.EncBasicHandle().StructToArray - var yyq3926 [2]bool - _, _, _ = yysep3926, yyq3926, yy2arr3926 - const yyr3926 bool = false - yyq3926[0] = len(x.Hard) != 0 - yyq3926[1] = len(x.Used) != 0 - var yynn3926 int - if yyr3926 || yy2arr3926 { + yysep3935 := !z.EncBinary() + yy2arr3935 := z.EncBasicHandle().StructToArray + var yyq3935 [2]bool + _, _, _ = yysep3935, yyq3935, yy2arr3935 + const yyr3935 bool = false + yyq3935[0] = len(x.Hard) != 0 + yyq3935[1] = len(x.Used) != 0 + var yynn3935 int + if yyr3935 || yy2arr3935 { r.EncodeArrayStart(2) } else { - yynn3926 = 0 - for _, b := range yyq3926 { + yynn3935 = 0 + for _, b := range yyq3935 { if b { - yynn3926++ + yynn3935++ } } - r.EncodeMapStart(yynn3926) - yynn3926 = 0 + r.EncodeMapStart(yynn3935) + yynn3935 = 0 } - if yyr3926 || yy2arr3926 { + if yyr3935 || yy2arr3935 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3926[0] { + if yyq3935[0] { if x.Hard == nil { r.EncodeNil() } else { @@ -49310,7 +49388,7 @@ func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3926[0] { + if yyq3935[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hard")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -49321,9 +49399,9 @@ func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3926 || yy2arr3926 { + if yyr3935 || yy2arr3935 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3926[1] { + if yyq3935[1] { if x.Used == nil { r.EncodeNil() } else { @@ -49333,7 +49411,7 @@ func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq3926[1] { + if yyq3935[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("used")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -49344,7 +49422,7 @@ func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr3926 || yy2arr3926 { + if yyr3935 || yy2arr3935 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -49357,25 +49435,25 @@ func (x *ResourceQuotaStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3929 := z.DecBinary() - _ = yym3929 + yym3938 := z.DecBinary() + _ = yym3938 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3930 := r.ContainerType() - if yyct3930 == codecSelferValueTypeMap1234 { - yyl3930 := r.ReadMapStart() - if yyl3930 == 0 { + yyct3939 := r.ContainerType() + if yyct3939 == codecSelferValueTypeMap1234 { + yyl3939 := r.ReadMapStart() + if yyl3939 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3930, d) + x.codecDecodeSelfFromMap(yyl3939, d) } - } else if yyct3930 == codecSelferValueTypeArray1234 { - yyl3930 := r.ReadArrayStart() - if yyl3930 == 0 { + } else if yyct3939 == codecSelferValueTypeArray1234 { + yyl3939 := r.ReadArrayStart() + if yyl3939 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3930, d) + x.codecDecodeSelfFromArray(yyl3939, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -49387,12 +49465,12 @@ func (x *ResourceQuotaStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3931Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3931Slc - var yyhl3931 bool = l >= 0 - for yyj3931 := 0; ; yyj3931++ { - if yyhl3931 { - if yyj3931 >= l { + var yys3940Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3940Slc + var yyhl3940 bool = l >= 0 + for yyj3940 := 0; ; yyj3940++ { + if yyhl3940 { + if yyj3940 >= l { break } } else { @@ -49401,28 +49479,28 @@ func (x *ResourceQuotaStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3931Slc = r.DecodeBytes(yys3931Slc, true, true) - yys3931 := string(yys3931Slc) + yys3940Slc = r.DecodeBytes(yys3940Slc, true, true) + yys3940 := string(yys3940Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3931 { + switch yys3940 { case "hard": if r.TryDecodeAsNil() { x.Hard = nil } else { - yyv3932 := &x.Hard - yyv3932.CodecDecodeSelf(d) + yyv3941 := &x.Hard + yyv3941.CodecDecodeSelf(d) } case "used": if r.TryDecodeAsNil() { x.Used = nil } else { - yyv3933 := &x.Used - yyv3933.CodecDecodeSelf(d) + yyv3942 := &x.Used + yyv3942.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3931) - } // end switch yys3931 - } // end for yyj3931 + z.DecStructFieldNotFound(-1, yys3940) + } // end switch yys3940 + } // end for yyj3940 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -49430,16 +49508,16 @@ func (x *ResourceQuotaStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3934 int - var yyb3934 bool - var yyhl3934 bool = l >= 0 - yyj3934++ - if yyhl3934 { - yyb3934 = yyj3934 > l + var yyj3943 int + var yyb3943 bool + var yyhl3943 bool = l >= 0 + yyj3943++ + if yyhl3943 { + yyb3943 = yyj3943 > l } else { - yyb3934 = r.CheckBreak() + yyb3943 = r.CheckBreak() } - if yyb3934 { + if yyb3943 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49447,16 +49525,16 @@ func (x *ResourceQuotaStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Hard = nil } else { - yyv3935 := &x.Hard - yyv3935.CodecDecodeSelf(d) + yyv3944 := &x.Hard + yyv3944.CodecDecodeSelf(d) } - yyj3934++ - if yyhl3934 { - yyb3934 = yyj3934 > l + yyj3943++ + if yyhl3943 { + yyb3943 = yyj3943 > l } else { - yyb3934 = r.CheckBreak() + yyb3943 = r.CheckBreak() } - if yyb3934 { + if yyb3943 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49464,21 +49542,21 @@ func (x *ResourceQuotaStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Used = nil } else { - yyv3936 := &x.Used - yyv3936.CodecDecodeSelf(d) + yyv3945 := &x.Used + yyv3945.CodecDecodeSelf(d) } for { - yyj3934++ - if yyhl3934 { - yyb3934 = yyj3934 > l + yyj3943++ + if yyhl3943 { + yyb3943 = yyj3943 > l } else { - yyb3934 = r.CheckBreak() + yyb3943 = r.CheckBreak() } - if yyb3934 { + if yyb3943 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3934-1, "") + z.DecStructFieldNotFound(yyj3943-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -49490,39 +49568,39 @@ func (x *ResourceQuota) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3937 := z.EncBinary() - _ = yym3937 + yym3946 := z.EncBinary() + _ = yym3946 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3938 := !z.EncBinary() - yy2arr3938 := z.EncBasicHandle().StructToArray - var yyq3938 [5]bool - _, _, _ = yysep3938, yyq3938, yy2arr3938 - const yyr3938 bool = false - yyq3938[0] = x.Kind != "" - yyq3938[1] = x.APIVersion != "" - yyq3938[2] = true - yyq3938[3] = true - yyq3938[4] = true - var yynn3938 int - if yyr3938 || yy2arr3938 { + yysep3947 := !z.EncBinary() + yy2arr3947 := z.EncBasicHandle().StructToArray + var yyq3947 [5]bool + _, _, _ = yysep3947, yyq3947, yy2arr3947 + const yyr3947 bool = false + yyq3947[0] = x.Kind != "" + yyq3947[1] = x.APIVersion != "" + yyq3947[2] = true + yyq3947[3] = true + yyq3947[4] = true + var yynn3947 int + if yyr3947 || yy2arr3947 { r.EncodeArrayStart(5) } else { - yynn3938 = 0 - for _, b := range yyq3938 { + yynn3947 = 0 + for _, b := range yyq3947 { if b { - yynn3938++ + yynn3947++ } } - r.EncodeMapStart(yynn3938) - yynn3938 = 0 + r.EncodeMapStart(yynn3947) + yynn3947 = 0 } - if yyr3938 || yy2arr3938 { + if yyr3947 || yy2arr3947 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3938[0] { - yym3940 := z.EncBinary() - _ = yym3940 + if yyq3947[0] { + yym3949 := z.EncBinary() + _ = yym3949 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -49531,23 +49609,23 @@ func (x *ResourceQuota) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3938[0] { + if yyq3947[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3941 := z.EncBinary() - _ = yym3941 + yym3950 := z.EncBinary() + _ = yym3950 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3938 || yy2arr3938 { + if yyr3947 || yy2arr3947 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3938[1] { - yym3943 := z.EncBinary() - _ = yym3943 + if yyq3947[1] { + yym3952 := z.EncBinary() + _ = yym3952 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -49556,70 +49634,70 @@ func (x *ResourceQuota) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3938[1] { + if yyq3947[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3944 := z.EncBinary() - _ = yym3944 + yym3953 := z.EncBinary() + _ = yym3953 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3938 || yy2arr3938 { + if yyr3947 || yy2arr3947 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3938[2] { - yy3946 := &x.ObjectMeta - yy3946.CodecEncodeSelf(e) + if yyq3947[2] { + yy3955 := &x.ObjectMeta + yy3955.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3938[2] { + if yyq3947[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3947 := &x.ObjectMeta - yy3947.CodecEncodeSelf(e) + yy3956 := &x.ObjectMeta + yy3956.CodecEncodeSelf(e) } } - if yyr3938 || yy2arr3938 { + if yyr3947 || yy2arr3947 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3938[3] { - yy3949 := &x.Spec - yy3949.CodecEncodeSelf(e) + if yyq3947[3] { + yy3958 := &x.Spec + yy3958.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3938[3] { + if yyq3947[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("spec")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3950 := &x.Spec - yy3950.CodecEncodeSelf(e) + yy3959 := &x.Spec + yy3959.CodecEncodeSelf(e) } } - if yyr3938 || yy2arr3938 { + if yyr3947 || yy2arr3947 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3938[4] { - yy3952 := &x.Status - yy3952.CodecEncodeSelf(e) + if yyq3947[4] { + yy3961 := &x.Status + yy3961.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq3938[4] { + if yyq3947[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("status")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3953 := &x.Status - yy3953.CodecEncodeSelf(e) + yy3962 := &x.Status + yy3962.CodecEncodeSelf(e) } } - if yyr3938 || yy2arr3938 { + if yyr3947 || yy2arr3947 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -49632,25 +49710,25 @@ func (x *ResourceQuota) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3954 := z.DecBinary() - _ = yym3954 + yym3963 := z.DecBinary() + _ = yym3963 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3955 := r.ContainerType() - if yyct3955 == codecSelferValueTypeMap1234 { - yyl3955 := r.ReadMapStart() - if yyl3955 == 0 { + yyct3964 := r.ContainerType() + if yyct3964 == codecSelferValueTypeMap1234 { + yyl3964 := r.ReadMapStart() + if yyl3964 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3955, d) + x.codecDecodeSelfFromMap(yyl3964, d) } - } else if yyct3955 == codecSelferValueTypeArray1234 { - yyl3955 := r.ReadArrayStart() - if yyl3955 == 0 { + } else if yyct3964 == codecSelferValueTypeArray1234 { + yyl3964 := r.ReadArrayStart() + if yyl3964 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3955, d) + x.codecDecodeSelfFromArray(yyl3964, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -49662,12 +49740,12 @@ func (x *ResourceQuota) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3956Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3956Slc - var yyhl3956 bool = l >= 0 - for yyj3956 := 0; ; yyj3956++ { - if yyhl3956 { - if yyj3956 >= l { + var yys3965Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3965Slc + var yyhl3965 bool = l >= 0 + for yyj3965 := 0; ; yyj3965++ { + if yyhl3965 { + if yyj3965 >= l { break } } else { @@ -49676,10 +49754,10 @@ func (x *ResourceQuota) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3956Slc = r.DecodeBytes(yys3956Slc, true, true) - yys3956 := string(yys3956Slc) + yys3965Slc = r.DecodeBytes(yys3965Slc, true, true) + yys3965 := string(yys3965Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3956 { + switch yys3965 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -49696,27 +49774,27 @@ func (x *ResourceQuota) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3959 := &x.ObjectMeta - yyv3959.CodecDecodeSelf(d) + yyv3968 := &x.ObjectMeta + yyv3968.CodecDecodeSelf(d) } case "spec": if r.TryDecodeAsNil() { x.Spec = ResourceQuotaSpec{} } else { - yyv3960 := &x.Spec - yyv3960.CodecDecodeSelf(d) + yyv3969 := &x.Spec + yyv3969.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ResourceQuotaStatus{} } else { - yyv3961 := &x.Status - yyv3961.CodecDecodeSelf(d) + yyv3970 := &x.Status + yyv3970.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys3956) - } // end switch yys3956 - } // end for yyj3956 + z.DecStructFieldNotFound(-1, yys3965) + } // end switch yys3965 + } // end for yyj3965 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -49724,16 +49802,16 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3962 int - var yyb3962 bool - var yyhl3962 bool = l >= 0 - yyj3962++ - if yyhl3962 { - yyb3962 = yyj3962 > l + var yyj3971 int + var yyb3971 bool + var yyhl3971 bool = l >= 0 + yyj3971++ + if yyhl3971 { + yyb3971 = yyj3971 > l } else { - yyb3962 = r.CheckBreak() + yyb3971 = r.CheckBreak() } - if yyb3962 { + if yyb3971 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49743,13 +49821,13 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj3962++ - if yyhl3962 { - yyb3962 = yyj3962 > l + yyj3971++ + if yyhl3971 { + yyb3971 = yyj3971 > l } else { - yyb3962 = r.CheckBreak() + yyb3971 = r.CheckBreak() } - if yyb3962 { + if yyb3971 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49759,13 +49837,13 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj3962++ - if yyhl3962 { - yyb3962 = yyj3962 > l + yyj3971++ + if yyhl3971 { + yyb3971 = yyj3971 > l } else { - yyb3962 = r.CheckBreak() + yyb3971 = r.CheckBreak() } - if yyb3962 { + if yyb3971 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49773,16 +49851,16 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv3965 := &x.ObjectMeta - yyv3965.CodecDecodeSelf(d) + yyv3974 := &x.ObjectMeta + yyv3974.CodecDecodeSelf(d) } - yyj3962++ - if yyhl3962 { - yyb3962 = yyj3962 > l + yyj3971++ + if yyhl3971 { + yyb3971 = yyj3971 > l } else { - yyb3962 = r.CheckBreak() + yyb3971 = r.CheckBreak() } - if yyb3962 { + if yyb3971 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49790,16 +49868,16 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ResourceQuotaSpec{} } else { - yyv3966 := &x.Spec - yyv3966.CodecDecodeSelf(d) + yyv3975 := &x.Spec + yyv3975.CodecDecodeSelf(d) } - yyj3962++ - if yyhl3962 { - yyb3962 = yyj3962 > l + yyj3971++ + if yyhl3971 { + yyb3971 = yyj3971 > l } else { - yyb3962 = r.CheckBreak() + yyb3971 = r.CheckBreak() } - if yyb3962 { + if yyb3971 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49807,21 +49885,21 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ResourceQuotaStatus{} } else { - yyv3967 := &x.Status - yyv3967.CodecDecodeSelf(d) + yyv3976 := &x.Status + yyv3976.CodecDecodeSelf(d) } for { - yyj3962++ - if yyhl3962 { - yyb3962 = yyj3962 > l + yyj3971++ + if yyhl3971 { + yyb3971 = yyj3971 > l } else { - yyb3962 = r.CheckBreak() + yyb3971 = r.CheckBreak() } - if yyb3962 { + if yyb3971 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3962-1, "") + z.DecStructFieldNotFound(yyj3971-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -49833,37 +49911,37 @@ func (x *ResourceQuotaList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym3968 := z.EncBinary() - _ = yym3968 + yym3977 := z.EncBinary() + _ = yym3977 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep3969 := !z.EncBinary() - yy2arr3969 := z.EncBasicHandle().StructToArray - var yyq3969 [4]bool - _, _, _ = yysep3969, yyq3969, yy2arr3969 - const yyr3969 bool = false - yyq3969[0] = x.Kind != "" - yyq3969[1] = x.APIVersion != "" - yyq3969[2] = true - var yynn3969 int - if yyr3969 || yy2arr3969 { + yysep3978 := !z.EncBinary() + yy2arr3978 := z.EncBasicHandle().StructToArray + var yyq3978 [4]bool + _, _, _ = yysep3978, yyq3978, yy2arr3978 + const yyr3978 bool = false + yyq3978[0] = x.Kind != "" + yyq3978[1] = x.APIVersion != "" + yyq3978[2] = true + var yynn3978 int + if yyr3978 || yy2arr3978 { r.EncodeArrayStart(4) } else { - yynn3969 = 1 - for _, b := range yyq3969 { + yynn3978 = 1 + for _, b := range yyq3978 { if b { - yynn3969++ + yynn3978++ } } - r.EncodeMapStart(yynn3969) - yynn3969 = 0 + r.EncodeMapStart(yynn3978) + yynn3978 = 0 } - if yyr3969 || yy2arr3969 { + if yyr3978 || yy2arr3978 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3969[0] { - yym3971 := z.EncBinary() - _ = yym3971 + if yyq3978[0] { + yym3980 := z.EncBinary() + _ = yym3980 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -49872,23 +49950,23 @@ func (x *ResourceQuotaList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3969[0] { + if yyq3978[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3972 := z.EncBinary() - _ = yym3972 + yym3981 := z.EncBinary() + _ = yym3981 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr3969 || yy2arr3969 { + if yyr3978 || yy2arr3978 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3969[1] { - yym3974 := z.EncBinary() - _ = yym3974 + if yyq3978[1] { + yym3983 := z.EncBinary() + _ = yym3983 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -49897,54 +49975,54 @@ func (x *ResourceQuotaList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq3969[1] { + if yyq3978[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym3975 := z.EncBinary() - _ = yym3975 + yym3984 := z.EncBinary() + _ = yym3984 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr3969 || yy2arr3969 { + if yyr3978 || yy2arr3978 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq3969[2] { - yy3977 := &x.ListMeta - yym3978 := z.EncBinary() - _ = yym3978 + if yyq3978[2] { + yy3986 := &x.ListMeta + yym3987 := z.EncBinary() + _ = yym3987 if false { - } else if z.HasExtensions() && z.EncExt(yy3977) { + } else if z.HasExtensions() && z.EncExt(yy3986) { } else { - z.EncFallback(yy3977) + z.EncFallback(yy3986) } } else { r.EncodeNil() } } else { - if yyq3969[2] { + if yyq3978[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy3979 := &x.ListMeta - yym3980 := z.EncBinary() - _ = yym3980 + yy3988 := &x.ListMeta + yym3989 := z.EncBinary() + _ = yym3989 if false { - } else if z.HasExtensions() && z.EncExt(yy3979) { + } else if z.HasExtensions() && z.EncExt(yy3988) { } else { - z.EncFallback(yy3979) + z.EncFallback(yy3988) } } } - if yyr3969 || yy2arr3969 { + if yyr3978 || yy2arr3978 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym3982 := z.EncBinary() - _ = yym3982 + yym3991 := z.EncBinary() + _ = yym3991 if false { } else { h.encSliceResourceQuota(([]ResourceQuota)(x.Items), e) @@ -49957,15 +50035,15 @@ func (x *ResourceQuotaList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym3983 := z.EncBinary() - _ = yym3983 + yym3992 := z.EncBinary() + _ = yym3992 if false { } else { h.encSliceResourceQuota(([]ResourceQuota)(x.Items), e) } } } - if yyr3969 || yy2arr3969 { + if yyr3978 || yy2arr3978 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -49978,25 +50056,25 @@ func (x *ResourceQuotaList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym3984 := z.DecBinary() - _ = yym3984 + yym3993 := z.DecBinary() + _ = yym3993 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct3985 := r.ContainerType() - if yyct3985 == codecSelferValueTypeMap1234 { - yyl3985 := r.ReadMapStart() - if yyl3985 == 0 { + yyct3994 := r.ContainerType() + if yyct3994 == codecSelferValueTypeMap1234 { + yyl3994 := r.ReadMapStart() + if yyl3994 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl3985, d) + x.codecDecodeSelfFromMap(yyl3994, d) } - } else if yyct3985 == codecSelferValueTypeArray1234 { - yyl3985 := r.ReadArrayStart() - if yyl3985 == 0 { + } else if yyct3994 == codecSelferValueTypeArray1234 { + yyl3994 := r.ReadArrayStart() + if yyl3994 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl3985, d) + x.codecDecodeSelfFromArray(yyl3994, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -50008,12 +50086,12 @@ func (x *ResourceQuotaList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys3986Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3986Slc - var yyhl3986 bool = l >= 0 - for yyj3986 := 0; ; yyj3986++ { - if yyhl3986 { - if yyj3986 >= l { + var yys3995Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3995Slc + var yyhl3995 bool = l >= 0 + for yyj3995 := 0; ; yyj3995++ { + if yyhl3995 { + if yyj3995 >= l { break } } else { @@ -50022,10 +50100,10 @@ func (x *ResourceQuotaList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3986Slc = r.DecodeBytes(yys3986Slc, true, true) - yys3986 := string(yys3986Slc) + yys3995Slc = r.DecodeBytes(yys3995Slc, true, true) + yys3995 := string(yys3995Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3986 { + switch yys3995 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -50042,31 +50120,31 @@ func (x *ResourceQuotaList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3989 := &x.ListMeta - yym3990 := z.DecBinary() - _ = yym3990 + yyv3998 := &x.ListMeta + yym3999 := z.DecBinary() + _ = yym3999 if false { - } else if z.HasExtensions() && z.DecExt(yyv3989) { + } else if z.HasExtensions() && z.DecExt(yyv3998) { } else { - z.DecFallback(yyv3989, false) + z.DecFallback(yyv3998, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3991 := &x.Items - yym3992 := z.DecBinary() - _ = yym3992 + yyv4000 := &x.Items + yym4001 := z.DecBinary() + _ = yym4001 if false { } else { - h.decSliceResourceQuota((*[]ResourceQuota)(yyv3991), d) + h.decSliceResourceQuota((*[]ResourceQuota)(yyv4000), d) } } default: - z.DecStructFieldNotFound(-1, yys3986) - } // end switch yys3986 - } // end for yyj3986 + z.DecStructFieldNotFound(-1, yys3995) + } // end switch yys3995 + } // end for yyj3995 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -50074,16 +50152,16 @@ func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj3993 int - var yyb3993 bool - var yyhl3993 bool = l >= 0 - yyj3993++ - if yyhl3993 { - yyb3993 = yyj3993 > l + var yyj4002 int + var yyb4002 bool + var yyhl4002 bool = l >= 0 + yyj4002++ + if yyhl4002 { + yyb4002 = yyj4002 > l } else { - yyb3993 = r.CheckBreak() + yyb4002 = r.CheckBreak() } - if yyb3993 { + if yyb4002 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50093,13 +50171,13 @@ func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder } else { x.Kind = string(r.DecodeString()) } - yyj3993++ - if yyhl3993 { - yyb3993 = yyj3993 > l + yyj4002++ + if yyhl4002 { + yyb4002 = yyj4002 > l } else { - yyb3993 = r.CheckBreak() + yyb4002 = r.CheckBreak() } - if yyb3993 { + if yyb4002 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50109,13 +50187,13 @@ func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder } else { x.APIVersion = string(r.DecodeString()) } - yyj3993++ - if yyhl3993 { - yyb3993 = yyj3993 > l + yyj4002++ + if yyhl4002 { + yyb4002 = yyj4002 > l } else { - yyb3993 = r.CheckBreak() + yyb4002 = r.CheckBreak() } - if yyb3993 { + if yyb4002 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50123,22 +50201,22 @@ func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv3996 := &x.ListMeta - yym3997 := z.DecBinary() - _ = yym3997 + yyv4005 := &x.ListMeta + yym4006 := z.DecBinary() + _ = yym4006 if false { - } else if z.HasExtensions() && z.DecExt(yyv3996) { + } else if z.HasExtensions() && z.DecExt(yyv4005) { } else { - z.DecFallback(yyv3996, false) + z.DecFallback(yyv4005, false) } } - yyj3993++ - if yyhl3993 { - yyb3993 = yyj3993 > l + yyj4002++ + if yyhl4002 { + yyb4002 = yyj4002 > l } else { - yyb3993 = r.CheckBreak() + yyb4002 = r.CheckBreak() } - if yyb3993 { + if yyb4002 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50146,26 +50224,26 @@ func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Items = nil } else { - yyv3998 := &x.Items - yym3999 := z.DecBinary() - _ = yym3999 + yyv4007 := &x.Items + yym4008 := z.DecBinary() + _ = yym4008 if false { } else { - h.decSliceResourceQuota((*[]ResourceQuota)(yyv3998), d) + h.decSliceResourceQuota((*[]ResourceQuota)(yyv4007), d) } } for { - yyj3993++ - if yyhl3993 { - yyb3993 = yyj3993 > l + yyj4002++ + if yyhl4002 { + yyb4002 = yyj4002 > l } else { - yyb3993 = r.CheckBreak() + yyb4002 = r.CheckBreak() } - if yyb3993 { + if yyb4002 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj3993-1, "") + z.DecStructFieldNotFound(yyj4002-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -50177,40 +50255,40 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4000 := z.EncBinary() - _ = yym4000 + yym4009 := z.EncBinary() + _ = yym4009 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4001 := !z.EncBinary() - yy2arr4001 := z.EncBasicHandle().StructToArray - var yyq4001 [6]bool - _, _, _ = yysep4001, yyq4001, yy2arr4001 - const yyr4001 bool = false - yyq4001[0] = x.Kind != "" - yyq4001[1] = x.APIVersion != "" - yyq4001[2] = true - yyq4001[3] = len(x.Data) != 0 - yyq4001[4] = len(x.StringData) != 0 - yyq4001[5] = x.Type != "" - var yynn4001 int - if yyr4001 || yy2arr4001 { + yysep4010 := !z.EncBinary() + yy2arr4010 := z.EncBasicHandle().StructToArray + var yyq4010 [6]bool + _, _, _ = yysep4010, yyq4010, yy2arr4010 + const yyr4010 bool = false + yyq4010[0] = x.Kind != "" + yyq4010[1] = x.APIVersion != "" + yyq4010[2] = true + yyq4010[3] = len(x.Data) != 0 + yyq4010[4] = len(x.StringData) != 0 + yyq4010[5] = x.Type != "" + var yynn4010 int + if yyr4010 || yy2arr4010 { r.EncodeArrayStart(6) } else { - yynn4001 = 0 - for _, b := range yyq4001 { + yynn4010 = 0 + for _, b := range yyq4010 { if b { - yynn4001++ + yynn4010++ } } - r.EncodeMapStart(yynn4001) - yynn4001 = 0 + r.EncodeMapStart(yynn4010) + yynn4010 = 0 } - if yyr4001 || yy2arr4001 { + if yyr4010 || yy2arr4010 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4001[0] { - yym4003 := z.EncBinary() - _ = yym4003 + if yyq4010[0] { + yym4012 := z.EncBinary() + _ = yym4012 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -50219,23 +50297,23 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4001[0] { + if yyq4010[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4004 := z.EncBinary() - _ = yym4004 + yym4013 := z.EncBinary() + _ = yym4013 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr4001 || yy2arr4001 { + if yyr4010 || yy2arr4010 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4001[1] { - yym4006 := z.EncBinary() - _ = yym4006 + if yyq4010[1] { + yym4015 := z.EncBinary() + _ = yym4015 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -50244,43 +50322,43 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4001[1] { + if yyq4010[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4007 := z.EncBinary() - _ = yym4007 + yym4016 := z.EncBinary() + _ = yym4016 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr4001 || yy2arr4001 { + if yyr4010 || yy2arr4010 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4001[2] { - yy4009 := &x.ObjectMeta - yy4009.CodecEncodeSelf(e) + if yyq4010[2] { + yy4018 := &x.ObjectMeta + yy4018.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq4001[2] { + if yyq4010[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4010 := &x.ObjectMeta - yy4010.CodecEncodeSelf(e) + yy4019 := &x.ObjectMeta + yy4019.CodecEncodeSelf(e) } } - if yyr4001 || yy2arr4001 { + if yyr4010 || yy2arr4010 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4001[3] { + if yyq4010[3] { if x.Data == nil { r.EncodeNil() } else { - yym4012 := z.EncBinary() - _ = yym4012 + yym4021 := z.EncBinary() + _ = yym4021 if false { } else { h.encMapstringSliceuint8((map[string][]uint8)(x.Data), e) @@ -50290,15 +50368,15 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4001[3] { + if yyq4010[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("data")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Data == nil { r.EncodeNil() } else { - yym4013 := z.EncBinary() - _ = yym4013 + yym4022 := z.EncBinary() + _ = yym4022 if false { } else { h.encMapstringSliceuint8((map[string][]uint8)(x.Data), e) @@ -50306,14 +50384,14 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4001 || yy2arr4001 { + if yyr4010 || yy2arr4010 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4001[4] { + if yyq4010[4] { if x.StringData == nil { r.EncodeNil() } else { - yym4015 := z.EncBinary() - _ = yym4015 + yym4024 := z.EncBinary() + _ = yym4024 if false { } else { z.F.EncMapStringStringV(x.StringData, false, e) @@ -50323,15 +50401,15 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4001[4] { + if yyq4010[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("stringData")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.StringData == nil { r.EncodeNil() } else { - yym4016 := z.EncBinary() - _ = yym4016 + yym4025 := z.EncBinary() + _ = yym4025 if false { } else { z.F.EncMapStringStringV(x.StringData, false, e) @@ -50339,22 +50417,22 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4001 || yy2arr4001 { + if yyr4010 || yy2arr4010 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4001[5] { + if yyq4010[5] { x.Type.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4001[5] { + if yyq4010[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("type")) z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } } - if yyr4001 || yy2arr4001 { + if yyr4010 || yy2arr4010 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -50367,25 +50445,25 @@ func (x *Secret) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4018 := z.DecBinary() - _ = yym4018 + yym4027 := z.DecBinary() + _ = yym4027 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4019 := r.ContainerType() - if yyct4019 == codecSelferValueTypeMap1234 { - yyl4019 := r.ReadMapStart() - if yyl4019 == 0 { + yyct4028 := r.ContainerType() + if yyct4028 == codecSelferValueTypeMap1234 { + yyl4028 := r.ReadMapStart() + if yyl4028 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4019, d) + x.codecDecodeSelfFromMap(yyl4028, d) } - } else if yyct4019 == codecSelferValueTypeArray1234 { - yyl4019 := r.ReadArrayStart() - if yyl4019 == 0 { + } else if yyct4028 == codecSelferValueTypeArray1234 { + yyl4028 := r.ReadArrayStart() + if yyl4028 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4019, d) + x.codecDecodeSelfFromArray(yyl4028, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -50397,12 +50475,12 @@ func (x *Secret) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4020Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4020Slc - var yyhl4020 bool = l >= 0 - for yyj4020 := 0; ; yyj4020++ { - if yyhl4020 { - if yyj4020 >= l { + var yys4029Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys4029Slc + var yyhl4029 bool = l >= 0 + for yyj4029 := 0; ; yyj4029++ { + if yyhl4029 { + if yyj4029 >= l { break } } else { @@ -50411,10 +50489,10 @@ func (x *Secret) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4020Slc = r.DecodeBytes(yys4020Slc, true, true) - yys4020 := string(yys4020Slc) + yys4029Slc = r.DecodeBytes(yys4029Slc, true, true) + yys4029 := string(yys4029Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4020 { + switch yys4029 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -50431,31 +50509,31 @@ func (x *Secret) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv4023 := &x.ObjectMeta - yyv4023.CodecDecodeSelf(d) + yyv4032 := &x.ObjectMeta + yyv4032.CodecDecodeSelf(d) } case "data": if r.TryDecodeAsNil() { x.Data = nil } else { - yyv4024 := &x.Data - yym4025 := z.DecBinary() - _ = yym4025 + yyv4033 := &x.Data + yym4034 := z.DecBinary() + _ = yym4034 if false { } else { - h.decMapstringSliceuint8((*map[string][]uint8)(yyv4024), d) + h.decMapstringSliceuint8((*map[string][]uint8)(yyv4033), d) } } case "stringData": if r.TryDecodeAsNil() { x.StringData = nil } else { - yyv4026 := &x.StringData - yym4027 := z.DecBinary() - _ = yym4027 + yyv4035 := &x.StringData + yym4036 := z.DecBinary() + _ = yym4036 if false { } else { - z.F.DecMapStringStringX(yyv4026, false, d) + z.F.DecMapStringStringX(yyv4035, false, d) } } case "type": @@ -50465,9 +50543,9 @@ func (x *Secret) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Type = SecretType(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys4020) - } // end switch yys4020 - } // end for yyj4020 + z.DecStructFieldNotFound(-1, yys4029) + } // end switch yys4029 + } // end for yyj4029 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -50475,16 +50553,16 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4029 int - var yyb4029 bool - var yyhl4029 bool = l >= 0 - yyj4029++ - if yyhl4029 { - yyb4029 = yyj4029 > l + var yyj4038 int + var yyb4038 bool + var yyhl4038 bool = l >= 0 + yyj4038++ + if yyhl4038 { + yyb4038 = yyj4038 > l } else { - yyb4029 = r.CheckBreak() + yyb4038 = r.CheckBreak() } - if yyb4029 { + if yyb4038 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50494,13 +50572,13 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj4029++ - if yyhl4029 { - yyb4029 = yyj4029 > l + yyj4038++ + if yyhl4038 { + yyb4038 = yyj4038 > l } else { - yyb4029 = r.CheckBreak() + yyb4038 = r.CheckBreak() } - if yyb4029 { + if yyb4038 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50510,13 +50588,13 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj4029++ - if yyhl4029 { - yyb4029 = yyj4029 > l + yyj4038++ + if yyhl4038 { + yyb4038 = yyj4038 > l } else { - yyb4029 = r.CheckBreak() + yyb4038 = r.CheckBreak() } - if yyb4029 { + if yyb4038 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50524,16 +50602,16 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv4032 := &x.ObjectMeta - yyv4032.CodecDecodeSelf(d) + yyv4041 := &x.ObjectMeta + yyv4041.CodecDecodeSelf(d) } - yyj4029++ - if yyhl4029 { - yyb4029 = yyj4029 > l + yyj4038++ + if yyhl4038 { + yyb4038 = yyj4038 > l } else { - yyb4029 = r.CheckBreak() + yyb4038 = r.CheckBreak() } - if yyb4029 { + if yyb4038 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50541,21 +50619,21 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Data = nil } else { - yyv4033 := &x.Data - yym4034 := z.DecBinary() - _ = yym4034 + yyv4042 := &x.Data + yym4043 := z.DecBinary() + _ = yym4043 if false { } else { - h.decMapstringSliceuint8((*map[string][]uint8)(yyv4033), d) + h.decMapstringSliceuint8((*map[string][]uint8)(yyv4042), d) } } - yyj4029++ - if yyhl4029 { - yyb4029 = yyj4029 > l + yyj4038++ + if yyhl4038 { + yyb4038 = yyj4038 > l } else { - yyb4029 = r.CheckBreak() + yyb4038 = r.CheckBreak() } - if yyb4029 { + if yyb4038 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50563,21 +50641,21 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.StringData = nil } else { - yyv4035 := &x.StringData - yym4036 := z.DecBinary() - _ = yym4036 + yyv4044 := &x.StringData + yym4045 := z.DecBinary() + _ = yym4045 if false { } else { - z.F.DecMapStringStringX(yyv4035, false, d) + z.F.DecMapStringStringX(yyv4044, false, d) } } - yyj4029++ - if yyhl4029 { - yyb4029 = yyj4029 > l + yyj4038++ + if yyhl4038 { + yyb4038 = yyj4038 > l } else { - yyb4029 = r.CheckBreak() + yyb4038 = r.CheckBreak() } - if yyb4029 { + if yyb4038 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50588,17 +50666,17 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Type = SecretType(r.DecodeString()) } for { - yyj4029++ - if yyhl4029 { - yyb4029 = yyj4029 > l + yyj4038++ + if yyhl4038 { + yyb4038 = yyj4038 > l } else { - yyb4029 = r.CheckBreak() + yyb4038 = r.CheckBreak() } - if yyb4029 { + if yyb4038 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4029-1, "") + z.DecStructFieldNotFound(yyj4038-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -50607,8 +50685,8 @@ func (x SecretType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym4038 := z.EncBinary() - _ = yym4038 + yym4047 := z.EncBinary() + _ = yym4047 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -50620,8 +50698,8 @@ func (x *SecretType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4039 := z.DecBinary() - _ = yym4039 + yym4048 := z.DecBinary() + _ = yym4048 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -50636,37 +50714,37 @@ func (x *SecretList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4040 := z.EncBinary() - _ = yym4040 + yym4049 := z.EncBinary() + _ = yym4049 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4041 := !z.EncBinary() - yy2arr4041 := z.EncBasicHandle().StructToArray - var yyq4041 [4]bool - _, _, _ = yysep4041, yyq4041, yy2arr4041 - const yyr4041 bool = false - yyq4041[0] = x.Kind != "" - yyq4041[1] = x.APIVersion != "" - yyq4041[2] = true - var yynn4041 int - if yyr4041 || yy2arr4041 { + yysep4050 := !z.EncBinary() + yy2arr4050 := z.EncBasicHandle().StructToArray + var yyq4050 [4]bool + _, _, _ = yysep4050, yyq4050, yy2arr4050 + const yyr4050 bool = false + yyq4050[0] = x.Kind != "" + yyq4050[1] = x.APIVersion != "" + yyq4050[2] = true + var yynn4050 int + if yyr4050 || yy2arr4050 { r.EncodeArrayStart(4) } else { - yynn4041 = 1 - for _, b := range yyq4041 { + yynn4050 = 1 + for _, b := range yyq4050 { if b { - yynn4041++ + yynn4050++ } } - r.EncodeMapStart(yynn4041) - yynn4041 = 0 + r.EncodeMapStart(yynn4050) + yynn4050 = 0 } - if yyr4041 || yy2arr4041 { + if yyr4050 || yy2arr4050 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4041[0] { - yym4043 := z.EncBinary() - _ = yym4043 + if yyq4050[0] { + yym4052 := z.EncBinary() + _ = yym4052 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -50675,23 +50753,23 @@ func (x *SecretList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4041[0] { + if yyq4050[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4044 := z.EncBinary() - _ = yym4044 + yym4053 := z.EncBinary() + _ = yym4053 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr4041 || yy2arr4041 { + if yyr4050 || yy2arr4050 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4041[1] { - yym4046 := z.EncBinary() - _ = yym4046 + if yyq4050[1] { + yym4055 := z.EncBinary() + _ = yym4055 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -50700,54 +50778,54 @@ func (x *SecretList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4041[1] { + if yyq4050[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4047 := z.EncBinary() - _ = yym4047 + yym4056 := z.EncBinary() + _ = yym4056 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr4041 || yy2arr4041 { + if yyr4050 || yy2arr4050 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4041[2] { - yy4049 := &x.ListMeta - yym4050 := z.EncBinary() - _ = yym4050 + if yyq4050[2] { + yy4058 := &x.ListMeta + yym4059 := z.EncBinary() + _ = yym4059 if false { - } else if z.HasExtensions() && z.EncExt(yy4049) { + } else if z.HasExtensions() && z.EncExt(yy4058) { } else { - z.EncFallback(yy4049) + z.EncFallback(yy4058) } } else { r.EncodeNil() } } else { - if yyq4041[2] { + if yyq4050[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4051 := &x.ListMeta - yym4052 := z.EncBinary() - _ = yym4052 + yy4060 := &x.ListMeta + yym4061 := z.EncBinary() + _ = yym4061 if false { - } else if z.HasExtensions() && z.EncExt(yy4051) { + } else if z.HasExtensions() && z.EncExt(yy4060) { } else { - z.EncFallback(yy4051) + z.EncFallback(yy4060) } } } - if yyr4041 || yy2arr4041 { + if yyr4050 || yy2arr4050 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym4054 := z.EncBinary() - _ = yym4054 + yym4063 := z.EncBinary() + _ = yym4063 if false { } else { h.encSliceSecret(([]Secret)(x.Items), e) @@ -50760,15 +50838,15 @@ func (x *SecretList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym4055 := z.EncBinary() - _ = yym4055 + yym4064 := z.EncBinary() + _ = yym4064 if false { } else { h.encSliceSecret(([]Secret)(x.Items), e) } } } - if yyr4041 || yy2arr4041 { + if yyr4050 || yy2arr4050 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -50781,25 +50859,25 @@ func (x *SecretList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4056 := z.DecBinary() - _ = yym4056 + yym4065 := z.DecBinary() + _ = yym4065 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4057 := r.ContainerType() - if yyct4057 == codecSelferValueTypeMap1234 { - yyl4057 := r.ReadMapStart() - if yyl4057 == 0 { + yyct4066 := r.ContainerType() + if yyct4066 == codecSelferValueTypeMap1234 { + yyl4066 := r.ReadMapStart() + if yyl4066 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4057, d) + x.codecDecodeSelfFromMap(yyl4066, d) } - } else if yyct4057 == codecSelferValueTypeArray1234 { - yyl4057 := r.ReadArrayStart() - if yyl4057 == 0 { + } else if yyct4066 == codecSelferValueTypeArray1234 { + yyl4066 := r.ReadArrayStart() + if yyl4066 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4057, d) + x.codecDecodeSelfFromArray(yyl4066, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -50811,12 +50889,12 @@ func (x *SecretList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4058Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4058Slc - var yyhl4058 bool = l >= 0 - for yyj4058 := 0; ; yyj4058++ { - if yyhl4058 { - if yyj4058 >= l { + var yys4067Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys4067Slc + var yyhl4067 bool = l >= 0 + for yyj4067 := 0; ; yyj4067++ { + if yyhl4067 { + if yyj4067 >= l { break } } else { @@ -50825,10 +50903,10 @@ func (x *SecretList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4058Slc = r.DecodeBytes(yys4058Slc, true, true) - yys4058 := string(yys4058Slc) + yys4067Slc = r.DecodeBytes(yys4067Slc, true, true) + yys4067 := string(yys4067Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4058 { + switch yys4067 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -50845,31 +50923,31 @@ func (x *SecretList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv4061 := &x.ListMeta - yym4062 := z.DecBinary() - _ = yym4062 + yyv4070 := &x.ListMeta + yym4071 := z.DecBinary() + _ = yym4071 if false { - } else if z.HasExtensions() && z.DecExt(yyv4061) { + } else if z.HasExtensions() && z.DecExt(yyv4070) { } else { - z.DecFallback(yyv4061, false) + z.DecFallback(yyv4070, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4063 := &x.Items - yym4064 := z.DecBinary() - _ = yym4064 + yyv4072 := &x.Items + yym4073 := z.DecBinary() + _ = yym4073 if false { } else { - h.decSliceSecret((*[]Secret)(yyv4063), d) + h.decSliceSecret((*[]Secret)(yyv4072), d) } } default: - z.DecStructFieldNotFound(-1, yys4058) - } // end switch yys4058 - } // end for yyj4058 + z.DecStructFieldNotFound(-1, yys4067) + } // end switch yys4067 + } // end for yyj4067 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -50877,16 +50955,16 @@ func (x *SecretList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4065 int - var yyb4065 bool - var yyhl4065 bool = l >= 0 - yyj4065++ - if yyhl4065 { - yyb4065 = yyj4065 > l + var yyj4074 int + var yyb4074 bool + var yyhl4074 bool = l >= 0 + yyj4074++ + if yyhl4074 { + yyb4074 = yyj4074 > l } else { - yyb4065 = r.CheckBreak() + yyb4074 = r.CheckBreak() } - if yyb4065 { + if yyb4074 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50896,13 +50974,13 @@ func (x *SecretList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj4065++ - if yyhl4065 { - yyb4065 = yyj4065 > l + yyj4074++ + if yyhl4074 { + yyb4074 = yyj4074 > l } else { - yyb4065 = r.CheckBreak() + yyb4074 = r.CheckBreak() } - if yyb4065 { + if yyb4074 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50912,13 +50990,13 @@ func (x *SecretList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj4065++ - if yyhl4065 { - yyb4065 = yyj4065 > l + yyj4074++ + if yyhl4074 { + yyb4074 = yyj4074 > l } else { - yyb4065 = r.CheckBreak() + yyb4074 = r.CheckBreak() } - if yyb4065 { + if yyb4074 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50926,22 +51004,22 @@ func (x *SecretList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv4068 := &x.ListMeta - yym4069 := z.DecBinary() - _ = yym4069 + yyv4077 := &x.ListMeta + yym4078 := z.DecBinary() + _ = yym4078 if false { - } else if z.HasExtensions() && z.DecExt(yyv4068) { + } else if z.HasExtensions() && z.DecExt(yyv4077) { } else { - z.DecFallback(yyv4068, false) + z.DecFallback(yyv4077, false) } } - yyj4065++ - if yyhl4065 { - yyb4065 = yyj4065 > l + yyj4074++ + if yyhl4074 { + yyb4074 = yyj4074 > l } else { - yyb4065 = r.CheckBreak() + yyb4074 = r.CheckBreak() } - if yyb4065 { + if yyb4074 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -50949,26 +51027,26 @@ func (x *SecretList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4070 := &x.Items - yym4071 := z.DecBinary() - _ = yym4071 + yyv4079 := &x.Items + yym4080 := z.DecBinary() + _ = yym4080 if false { } else { - h.decSliceSecret((*[]Secret)(yyv4070), d) + h.decSliceSecret((*[]Secret)(yyv4079), d) } } for { - yyj4065++ - if yyhl4065 { - yyb4065 = yyj4065 > l + yyj4074++ + if yyhl4074 { + yyb4074 = yyj4074 > l } else { - yyb4065 = r.CheckBreak() + yyb4074 = r.CheckBreak() } - if yyb4065 { + if yyb4074 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4065-1, "") + z.DecStructFieldNotFound(yyj4074-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -50980,38 +51058,38 @@ func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4072 := z.EncBinary() - _ = yym4072 + yym4081 := z.EncBinary() + _ = yym4081 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4073 := !z.EncBinary() - yy2arr4073 := z.EncBasicHandle().StructToArray - var yyq4073 [4]bool - _, _, _ = yysep4073, yyq4073, yy2arr4073 - const yyr4073 bool = false - yyq4073[0] = x.Kind != "" - yyq4073[1] = x.APIVersion != "" - yyq4073[2] = true - yyq4073[3] = len(x.Data) != 0 - var yynn4073 int - if yyr4073 || yy2arr4073 { + yysep4082 := !z.EncBinary() + yy2arr4082 := z.EncBasicHandle().StructToArray + var yyq4082 [4]bool + _, _, _ = yysep4082, yyq4082, yy2arr4082 + const yyr4082 bool = false + yyq4082[0] = x.Kind != "" + yyq4082[1] = x.APIVersion != "" + yyq4082[2] = true + yyq4082[3] = len(x.Data) != 0 + var yynn4082 int + if yyr4082 || yy2arr4082 { r.EncodeArrayStart(4) } else { - yynn4073 = 0 - for _, b := range yyq4073 { + yynn4082 = 0 + for _, b := range yyq4082 { if b { - yynn4073++ + yynn4082++ } } - r.EncodeMapStart(yynn4073) - yynn4073 = 0 + r.EncodeMapStart(yynn4082) + yynn4082 = 0 } - if yyr4073 || yy2arr4073 { + if yyr4082 || yy2arr4082 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4073[0] { - yym4075 := z.EncBinary() - _ = yym4075 + if yyq4082[0] { + yym4084 := z.EncBinary() + _ = yym4084 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -51020,23 +51098,23 @@ func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4073[0] { + if yyq4082[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4076 := z.EncBinary() - _ = yym4076 + yym4085 := z.EncBinary() + _ = yym4085 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr4073 || yy2arr4073 { + if yyr4082 || yy2arr4082 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4073[1] { - yym4078 := z.EncBinary() - _ = yym4078 + if yyq4082[1] { + yym4087 := z.EncBinary() + _ = yym4087 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -51045,43 +51123,43 @@ func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4073[1] { + if yyq4082[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4079 := z.EncBinary() - _ = yym4079 + yym4088 := z.EncBinary() + _ = yym4088 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr4073 || yy2arr4073 { + if yyr4082 || yy2arr4082 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4073[2] { - yy4081 := &x.ObjectMeta - yy4081.CodecEncodeSelf(e) + if yyq4082[2] { + yy4090 := &x.ObjectMeta + yy4090.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq4073[2] { + if yyq4082[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4082 := &x.ObjectMeta - yy4082.CodecEncodeSelf(e) + yy4091 := &x.ObjectMeta + yy4091.CodecEncodeSelf(e) } } - if yyr4073 || yy2arr4073 { + if yyr4082 || yy2arr4082 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4073[3] { + if yyq4082[3] { if x.Data == nil { r.EncodeNil() } else { - yym4084 := z.EncBinary() - _ = yym4084 + yym4093 := z.EncBinary() + _ = yym4093 if false { } else { z.F.EncMapStringStringV(x.Data, false, e) @@ -51091,15 +51169,15 @@ func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4073[3] { + if yyq4082[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("data")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Data == nil { r.EncodeNil() } else { - yym4085 := z.EncBinary() - _ = yym4085 + yym4094 := z.EncBinary() + _ = yym4094 if false { } else { z.F.EncMapStringStringV(x.Data, false, e) @@ -51107,7 +51185,7 @@ func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4073 || yy2arr4073 { + if yyr4082 || yy2arr4082 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -51120,25 +51198,25 @@ func (x *ConfigMap) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4086 := z.DecBinary() - _ = yym4086 + yym4095 := z.DecBinary() + _ = yym4095 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4087 := r.ContainerType() - if yyct4087 == codecSelferValueTypeMap1234 { - yyl4087 := r.ReadMapStart() - if yyl4087 == 0 { + yyct4096 := r.ContainerType() + if yyct4096 == codecSelferValueTypeMap1234 { + yyl4096 := r.ReadMapStart() + if yyl4096 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4087, d) + x.codecDecodeSelfFromMap(yyl4096, d) } - } else if yyct4087 == codecSelferValueTypeArray1234 { - yyl4087 := r.ReadArrayStart() - if yyl4087 == 0 { + } else if yyct4096 == codecSelferValueTypeArray1234 { + yyl4096 := r.ReadArrayStart() + if yyl4096 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4087, d) + x.codecDecodeSelfFromArray(yyl4096, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -51150,12 +51228,12 @@ func (x *ConfigMap) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4088Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4088Slc - var yyhl4088 bool = l >= 0 - for yyj4088 := 0; ; yyj4088++ { - if yyhl4088 { - if yyj4088 >= l { + var yys4097Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys4097Slc + var yyhl4097 bool = l >= 0 + for yyj4097 := 0; ; yyj4097++ { + if yyhl4097 { + if yyj4097 >= l { break } } else { @@ -51164,10 +51242,10 @@ func (x *ConfigMap) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4088Slc = r.DecodeBytes(yys4088Slc, true, true) - yys4088 := string(yys4088Slc) + yys4097Slc = r.DecodeBytes(yys4097Slc, true, true) + yys4097 := string(yys4097Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4088 { + switch yys4097 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -51184,25 +51262,25 @@ func (x *ConfigMap) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv4091 := &x.ObjectMeta - yyv4091.CodecDecodeSelf(d) + yyv4100 := &x.ObjectMeta + yyv4100.CodecDecodeSelf(d) } case "data": if r.TryDecodeAsNil() { x.Data = nil } else { - yyv4092 := &x.Data - yym4093 := z.DecBinary() - _ = yym4093 + yyv4101 := &x.Data + yym4102 := z.DecBinary() + _ = yym4102 if false { } else { - z.F.DecMapStringStringX(yyv4092, false, d) + z.F.DecMapStringStringX(yyv4101, false, d) } } default: - z.DecStructFieldNotFound(-1, yys4088) - } // end switch yys4088 - } // end for yyj4088 + z.DecStructFieldNotFound(-1, yys4097) + } // end switch yys4097 + } // end for yyj4097 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -51210,16 +51288,16 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4094 int - var yyb4094 bool - var yyhl4094 bool = l >= 0 - yyj4094++ - if yyhl4094 { - yyb4094 = yyj4094 > l + var yyj4103 int + var yyb4103 bool + var yyhl4103 bool = l >= 0 + yyj4103++ + if yyhl4103 { + yyb4103 = yyj4103 > l } else { - yyb4094 = r.CheckBreak() + yyb4103 = r.CheckBreak() } - if yyb4094 { + if yyb4103 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51229,13 +51307,13 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj4094++ - if yyhl4094 { - yyb4094 = yyj4094 > l + yyj4103++ + if yyhl4103 { + yyb4103 = yyj4103 > l } else { - yyb4094 = r.CheckBreak() + yyb4103 = r.CheckBreak() } - if yyb4094 { + if yyb4103 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51245,13 +51323,13 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj4094++ - if yyhl4094 { - yyb4094 = yyj4094 > l + yyj4103++ + if yyhl4103 { + yyb4103 = yyj4103 > l } else { - yyb4094 = r.CheckBreak() + yyb4103 = r.CheckBreak() } - if yyb4094 { + if yyb4103 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51259,16 +51337,16 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv4097 := &x.ObjectMeta - yyv4097.CodecDecodeSelf(d) + yyv4106 := &x.ObjectMeta + yyv4106.CodecDecodeSelf(d) } - yyj4094++ - if yyhl4094 { - yyb4094 = yyj4094 > l + yyj4103++ + if yyhl4103 { + yyb4103 = yyj4103 > l } else { - yyb4094 = r.CheckBreak() + yyb4103 = r.CheckBreak() } - if yyb4094 { + if yyb4103 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51276,26 +51354,26 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Data = nil } else { - yyv4098 := &x.Data - yym4099 := z.DecBinary() - _ = yym4099 + yyv4107 := &x.Data + yym4108 := z.DecBinary() + _ = yym4108 if false { } else { - z.F.DecMapStringStringX(yyv4098, false, d) + z.F.DecMapStringStringX(yyv4107, false, d) } } for { - yyj4094++ - if yyhl4094 { - yyb4094 = yyj4094 > l + yyj4103++ + if yyhl4103 { + yyb4103 = yyj4103 > l } else { - yyb4094 = r.CheckBreak() + yyb4103 = r.CheckBreak() } - if yyb4094 { + if yyb4103 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4094-1, "") + z.DecStructFieldNotFound(yyj4103-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -51307,37 +51385,37 @@ func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4100 := z.EncBinary() - _ = yym4100 + yym4109 := z.EncBinary() + _ = yym4109 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4101 := !z.EncBinary() - yy2arr4101 := z.EncBasicHandle().StructToArray - var yyq4101 [4]bool - _, _, _ = yysep4101, yyq4101, yy2arr4101 - const yyr4101 bool = false - yyq4101[0] = x.Kind != "" - yyq4101[1] = x.APIVersion != "" - yyq4101[2] = true - var yynn4101 int - if yyr4101 || yy2arr4101 { + yysep4110 := !z.EncBinary() + yy2arr4110 := z.EncBasicHandle().StructToArray + var yyq4110 [4]bool + _, _, _ = yysep4110, yyq4110, yy2arr4110 + const yyr4110 bool = false + yyq4110[0] = x.Kind != "" + yyq4110[1] = x.APIVersion != "" + yyq4110[2] = true + var yynn4110 int + if yyr4110 || yy2arr4110 { r.EncodeArrayStart(4) } else { - yynn4101 = 1 - for _, b := range yyq4101 { + yynn4110 = 1 + for _, b := range yyq4110 { if b { - yynn4101++ + yynn4110++ } } - r.EncodeMapStart(yynn4101) - yynn4101 = 0 + r.EncodeMapStart(yynn4110) + yynn4110 = 0 } - if yyr4101 || yy2arr4101 { + if yyr4110 || yy2arr4110 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4101[0] { - yym4103 := z.EncBinary() - _ = yym4103 + if yyq4110[0] { + yym4112 := z.EncBinary() + _ = yym4112 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -51346,23 +51424,23 @@ func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4101[0] { + if yyq4110[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4104 := z.EncBinary() - _ = yym4104 + yym4113 := z.EncBinary() + _ = yym4113 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr4101 || yy2arr4101 { + if yyr4110 || yy2arr4110 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4101[1] { - yym4106 := z.EncBinary() - _ = yym4106 + if yyq4110[1] { + yym4115 := z.EncBinary() + _ = yym4115 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -51371,54 +51449,54 @@ func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4101[1] { + if yyq4110[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4107 := z.EncBinary() - _ = yym4107 + yym4116 := z.EncBinary() + _ = yym4116 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr4101 || yy2arr4101 { + if yyr4110 || yy2arr4110 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4101[2] { - yy4109 := &x.ListMeta - yym4110 := z.EncBinary() - _ = yym4110 + if yyq4110[2] { + yy4118 := &x.ListMeta + yym4119 := z.EncBinary() + _ = yym4119 if false { - } else if z.HasExtensions() && z.EncExt(yy4109) { + } else if z.HasExtensions() && z.EncExt(yy4118) { } else { - z.EncFallback(yy4109) + z.EncFallback(yy4118) } } else { r.EncodeNil() } } else { - if yyq4101[2] { + if yyq4110[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4111 := &x.ListMeta - yym4112 := z.EncBinary() - _ = yym4112 + yy4120 := &x.ListMeta + yym4121 := z.EncBinary() + _ = yym4121 if false { - } else if z.HasExtensions() && z.EncExt(yy4111) { + } else if z.HasExtensions() && z.EncExt(yy4120) { } else { - z.EncFallback(yy4111) + z.EncFallback(yy4120) } } } - if yyr4101 || yy2arr4101 { + if yyr4110 || yy2arr4110 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym4114 := z.EncBinary() - _ = yym4114 + yym4123 := z.EncBinary() + _ = yym4123 if false { } else { h.encSliceConfigMap(([]ConfigMap)(x.Items), e) @@ -51431,15 +51509,15 @@ func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym4115 := z.EncBinary() - _ = yym4115 + yym4124 := z.EncBinary() + _ = yym4124 if false { } else { h.encSliceConfigMap(([]ConfigMap)(x.Items), e) } } } - if yyr4101 || yy2arr4101 { + if yyr4110 || yy2arr4110 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -51452,25 +51530,25 @@ func (x *ConfigMapList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4116 := z.DecBinary() - _ = yym4116 + yym4125 := z.DecBinary() + _ = yym4125 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4117 := r.ContainerType() - if yyct4117 == codecSelferValueTypeMap1234 { - yyl4117 := r.ReadMapStart() - if yyl4117 == 0 { + yyct4126 := r.ContainerType() + if yyct4126 == codecSelferValueTypeMap1234 { + yyl4126 := r.ReadMapStart() + if yyl4126 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4117, d) + x.codecDecodeSelfFromMap(yyl4126, d) } - } else if yyct4117 == codecSelferValueTypeArray1234 { - yyl4117 := r.ReadArrayStart() - if yyl4117 == 0 { + } else if yyct4126 == codecSelferValueTypeArray1234 { + yyl4126 := r.ReadArrayStart() + if yyl4126 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4117, d) + x.codecDecodeSelfFromArray(yyl4126, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -51482,12 +51560,12 @@ func (x *ConfigMapList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4118Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4118Slc - var yyhl4118 bool = l >= 0 - for yyj4118 := 0; ; yyj4118++ { - if yyhl4118 { - if yyj4118 >= l { + var yys4127Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys4127Slc + var yyhl4127 bool = l >= 0 + for yyj4127 := 0; ; yyj4127++ { + if yyhl4127 { + if yyj4127 >= l { break } } else { @@ -51496,10 +51574,10 @@ func (x *ConfigMapList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4118Slc = r.DecodeBytes(yys4118Slc, true, true) - yys4118 := string(yys4118Slc) + yys4127Slc = r.DecodeBytes(yys4127Slc, true, true) + yys4127 := string(yys4127Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4118 { + switch yys4127 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -51516,31 +51594,31 @@ func (x *ConfigMapList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv4121 := &x.ListMeta - yym4122 := z.DecBinary() - _ = yym4122 + yyv4130 := &x.ListMeta + yym4131 := z.DecBinary() + _ = yym4131 if false { - } else if z.HasExtensions() && z.DecExt(yyv4121) { + } else if z.HasExtensions() && z.DecExt(yyv4130) { } else { - z.DecFallback(yyv4121, false) + z.DecFallback(yyv4130, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4123 := &x.Items - yym4124 := z.DecBinary() - _ = yym4124 + yyv4132 := &x.Items + yym4133 := z.DecBinary() + _ = yym4133 if false { } else { - h.decSliceConfigMap((*[]ConfigMap)(yyv4123), d) + h.decSliceConfigMap((*[]ConfigMap)(yyv4132), d) } } default: - z.DecStructFieldNotFound(-1, yys4118) - } // end switch yys4118 - } // end for yyj4118 + z.DecStructFieldNotFound(-1, yys4127) + } // end switch yys4127 + } // end for yyj4127 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -51548,16 +51626,16 @@ func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4125 int - var yyb4125 bool - var yyhl4125 bool = l >= 0 - yyj4125++ - if yyhl4125 { - yyb4125 = yyj4125 > l + var yyj4134 int + var yyb4134 bool + var yyhl4134 bool = l >= 0 + yyj4134++ + if yyhl4134 { + yyb4134 = yyj4134 > l } else { - yyb4125 = r.CheckBreak() + yyb4134 = r.CheckBreak() } - if yyb4125 { + if yyb4134 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51567,13 +51645,13 @@ func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj4125++ - if yyhl4125 { - yyb4125 = yyj4125 > l + yyj4134++ + if yyhl4134 { + yyb4134 = yyj4134 > l } else { - yyb4125 = r.CheckBreak() + yyb4134 = r.CheckBreak() } - if yyb4125 { + if yyb4134 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51583,13 +51661,13 @@ func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.APIVersion = string(r.DecodeString()) } - yyj4125++ - if yyhl4125 { - yyb4125 = yyj4125 > l + yyj4134++ + if yyhl4134 { + yyb4134 = yyj4134 > l } else { - yyb4125 = r.CheckBreak() + yyb4134 = r.CheckBreak() } - if yyb4125 { + if yyb4134 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51597,22 +51675,22 @@ func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv4128 := &x.ListMeta - yym4129 := z.DecBinary() - _ = yym4129 + yyv4137 := &x.ListMeta + yym4138 := z.DecBinary() + _ = yym4138 if false { - } else if z.HasExtensions() && z.DecExt(yyv4128) { + } else if z.HasExtensions() && z.DecExt(yyv4137) { } else { - z.DecFallback(yyv4128, false) + z.DecFallback(yyv4137, false) } } - yyj4125++ - if yyhl4125 { - yyb4125 = yyj4125 > l + yyj4134++ + if yyhl4134 { + yyb4134 = yyj4134 > l } else { - yyb4125 = r.CheckBreak() + yyb4134 = r.CheckBreak() } - if yyb4125 { + if yyb4134 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51620,26 +51698,26 @@ func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4130 := &x.Items - yym4131 := z.DecBinary() - _ = yym4131 + yyv4139 := &x.Items + yym4140 := z.DecBinary() + _ = yym4140 if false { } else { - h.decSliceConfigMap((*[]ConfigMap)(yyv4130), d) + h.decSliceConfigMap((*[]ConfigMap)(yyv4139), d) } } for { - yyj4125++ - if yyhl4125 { - yyb4125 = yyj4125 > l + yyj4134++ + if yyhl4134 { + yyb4134 = yyj4134 > l } else { - yyb4125 = r.CheckBreak() + yyb4134 = r.CheckBreak() } - if yyb4125 { + if yyb4134 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4125-1, "") + z.DecStructFieldNotFound(yyj4134-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -51648,8 +51726,8 @@ func (x ComponentConditionType) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r - yym4132 := z.EncBinary() - _ = yym4132 + yym4141 := z.EncBinary() + _ = yym4141 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { @@ -51661,8 +51739,8 @@ func (x *ComponentConditionType) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4133 := z.DecBinary() - _ = yym4133 + yym4142 := z.DecBinary() + _ = yym4142 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { @@ -51677,32 +51755,32 @@ func (x *ComponentCondition) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4134 := z.EncBinary() - _ = yym4134 + yym4143 := z.EncBinary() + _ = yym4143 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4135 := !z.EncBinary() - yy2arr4135 := z.EncBasicHandle().StructToArray - var yyq4135 [4]bool - _, _, _ = yysep4135, yyq4135, yy2arr4135 - const yyr4135 bool = false - yyq4135[2] = x.Message != "" - yyq4135[3] = x.Error != "" - var yynn4135 int - if yyr4135 || yy2arr4135 { + yysep4144 := !z.EncBinary() + yy2arr4144 := z.EncBasicHandle().StructToArray + var yyq4144 [4]bool + _, _, _ = yysep4144, yyq4144, yy2arr4144 + const yyr4144 bool = false + yyq4144[2] = x.Message != "" + yyq4144[3] = x.Error != "" + var yynn4144 int + if yyr4144 || yy2arr4144 { r.EncodeArrayStart(4) } else { - yynn4135 = 2 - for _, b := range yyq4135 { + yynn4144 = 2 + for _, b := range yyq4144 { if b { - yynn4135++ + yynn4144++ } } - r.EncodeMapStart(yynn4135) - yynn4135 = 0 + r.EncodeMapStart(yynn4144) + yynn4144 = 0 } - if yyr4135 || yy2arr4135 { + if yyr4144 || yy2arr4144 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Type.CodecEncodeSelf(e) } else { @@ -51711,7 +51789,7 @@ func (x *ComponentCondition) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Type.CodecEncodeSelf(e) } - if yyr4135 || yy2arr4135 { + if yyr4144 || yy2arr4144 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) x.Status.CodecEncodeSelf(e) } else { @@ -51720,11 +51798,11 @@ func (x *ComponentCondition) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapValue1234) x.Status.CodecEncodeSelf(e) } - if yyr4135 || yy2arr4135 { + if yyr4144 || yy2arr4144 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4135[2] { - yym4139 := z.EncBinary() - _ = yym4139 + if yyq4144[2] { + yym4148 := z.EncBinary() + _ = yym4148 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) @@ -51733,23 +51811,23 @@ func (x *ComponentCondition) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4135[2] { + if yyq4144[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("message")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4140 := z.EncBinary() - _ = yym4140 + yym4149 := z.EncBinary() + _ = yym4149 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Message)) } } } - if yyr4135 || yy2arr4135 { + if yyr4144 || yy2arr4144 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4135[3] { - yym4142 := z.EncBinary() - _ = yym4142 + if yyq4144[3] { + yym4151 := z.EncBinary() + _ = yym4151 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Error)) @@ -51758,19 +51836,19 @@ func (x *ComponentCondition) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4135[3] { + if yyq4144[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("error")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4143 := z.EncBinary() - _ = yym4143 + yym4152 := z.EncBinary() + _ = yym4152 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Error)) } } } - if yyr4135 || yy2arr4135 { + if yyr4144 || yy2arr4144 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -51783,25 +51861,25 @@ func (x *ComponentCondition) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4144 := z.DecBinary() - _ = yym4144 + yym4153 := z.DecBinary() + _ = yym4153 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4145 := r.ContainerType() - if yyct4145 == codecSelferValueTypeMap1234 { - yyl4145 := r.ReadMapStart() - if yyl4145 == 0 { + yyct4154 := r.ContainerType() + if yyct4154 == codecSelferValueTypeMap1234 { + yyl4154 := r.ReadMapStart() + if yyl4154 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4145, d) + x.codecDecodeSelfFromMap(yyl4154, d) } - } else if yyct4145 == codecSelferValueTypeArray1234 { - yyl4145 := r.ReadArrayStart() - if yyl4145 == 0 { + } else if yyct4154 == codecSelferValueTypeArray1234 { + yyl4154 := r.ReadArrayStart() + if yyl4154 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4145, d) + x.codecDecodeSelfFromArray(yyl4154, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -51813,12 +51891,12 @@ func (x *ComponentCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4146Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4146Slc - var yyhl4146 bool = l >= 0 - for yyj4146 := 0; ; yyj4146++ { - if yyhl4146 { - if yyj4146 >= l { + var yys4155Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys4155Slc + var yyhl4155 bool = l >= 0 + for yyj4155 := 0; ; yyj4155++ { + if yyhl4155 { + if yyj4155 >= l { break } } else { @@ -51827,10 +51905,10 @@ func (x *ComponentCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4146Slc = r.DecodeBytes(yys4146Slc, true, true) - yys4146 := string(yys4146Slc) + yys4155Slc = r.DecodeBytes(yys4155Slc, true, true) + yys4155 := string(yys4155Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4146 { + switch yys4155 { case "type": if r.TryDecodeAsNil() { x.Type = "" @@ -51856,9 +51934,9 @@ func (x *ComponentCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) x.Error = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys4146) - } // end switch yys4146 - } // end for yyj4146 + z.DecStructFieldNotFound(-1, yys4155) + } // end switch yys4155 + } // end for yyj4155 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -51866,16 +51944,16 @@ func (x *ComponentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4151 int - var yyb4151 bool - var yyhl4151 bool = l >= 0 - yyj4151++ - if yyhl4151 { - yyb4151 = yyj4151 > l + var yyj4160 int + var yyb4160 bool + var yyhl4160 bool = l >= 0 + yyj4160++ + if yyhl4160 { + yyb4160 = yyj4160 > l } else { - yyb4151 = r.CheckBreak() + yyb4160 = r.CheckBreak() } - if yyb4151 { + if yyb4160 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51885,13 +51963,13 @@ func (x *ComponentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decode } else { x.Type = ComponentConditionType(r.DecodeString()) } - yyj4151++ - if yyhl4151 { - yyb4151 = yyj4151 > l + yyj4160++ + if yyhl4160 { + yyb4160 = yyj4160 > l } else { - yyb4151 = r.CheckBreak() + yyb4160 = r.CheckBreak() } - if yyb4151 { + if yyb4160 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51901,13 +51979,13 @@ func (x *ComponentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decode } else { x.Status = ConditionStatus(r.DecodeString()) } - yyj4151++ - if yyhl4151 { - yyb4151 = yyj4151 > l + yyj4160++ + if yyhl4160 { + yyb4160 = yyj4160 > l } else { - yyb4151 = r.CheckBreak() + yyb4160 = r.CheckBreak() } - if yyb4151 { + if yyb4160 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51917,13 +51995,13 @@ func (x *ComponentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decode } else { x.Message = string(r.DecodeString()) } - yyj4151++ - if yyhl4151 { - yyb4151 = yyj4151 > l + yyj4160++ + if yyhl4160 { + yyb4160 = yyj4160 > l } else { - yyb4151 = r.CheckBreak() + yyb4160 = r.CheckBreak() } - if yyb4151 { + if yyb4160 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -51934,17 +52012,17 @@ func (x *ComponentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decode x.Error = string(r.DecodeString()) } for { - yyj4151++ - if yyhl4151 { - yyb4151 = yyj4151 > l + yyj4160++ + if yyhl4160 { + yyb4160 = yyj4160 > l } else { - yyb4151 = r.CheckBreak() + yyb4160 = r.CheckBreak() } - if yyb4151 { + if yyb4160 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4151-1, "") + z.DecStructFieldNotFound(yyj4160-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -51956,38 +52034,38 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4156 := z.EncBinary() - _ = yym4156 + yym4165 := z.EncBinary() + _ = yym4165 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4157 := !z.EncBinary() - yy2arr4157 := z.EncBasicHandle().StructToArray - var yyq4157 [4]bool - _, _, _ = yysep4157, yyq4157, yy2arr4157 - const yyr4157 bool = false - yyq4157[0] = x.Kind != "" - yyq4157[1] = x.APIVersion != "" - yyq4157[2] = true - yyq4157[3] = len(x.Conditions) != 0 - var yynn4157 int - if yyr4157 || yy2arr4157 { + yysep4166 := !z.EncBinary() + yy2arr4166 := z.EncBasicHandle().StructToArray + var yyq4166 [4]bool + _, _, _ = yysep4166, yyq4166, yy2arr4166 + const yyr4166 bool = false + yyq4166[0] = x.Kind != "" + yyq4166[1] = x.APIVersion != "" + yyq4166[2] = true + yyq4166[3] = len(x.Conditions) != 0 + var yynn4166 int + if yyr4166 || yy2arr4166 { r.EncodeArrayStart(4) } else { - yynn4157 = 0 - for _, b := range yyq4157 { + yynn4166 = 0 + for _, b := range yyq4166 { if b { - yynn4157++ + yynn4166++ } } - r.EncodeMapStart(yynn4157) - yynn4157 = 0 + r.EncodeMapStart(yynn4166) + yynn4166 = 0 } - if yyr4157 || yy2arr4157 { + if yyr4166 || yy2arr4166 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4157[0] { - yym4159 := z.EncBinary() - _ = yym4159 + if yyq4166[0] { + yym4168 := z.EncBinary() + _ = yym4168 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -51996,23 +52074,23 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4157[0] { + if yyq4166[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4160 := z.EncBinary() - _ = yym4160 + yym4169 := z.EncBinary() + _ = yym4169 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr4157 || yy2arr4157 { + if yyr4166 || yy2arr4166 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4157[1] { - yym4162 := z.EncBinary() - _ = yym4162 + if yyq4166[1] { + yym4171 := z.EncBinary() + _ = yym4171 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -52021,43 +52099,43 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4157[1] { + if yyq4166[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4163 := z.EncBinary() - _ = yym4163 + yym4172 := z.EncBinary() + _ = yym4172 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr4157 || yy2arr4157 { + if yyr4166 || yy2arr4166 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4157[2] { - yy4165 := &x.ObjectMeta - yy4165.CodecEncodeSelf(e) + if yyq4166[2] { + yy4174 := &x.ObjectMeta + yy4174.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq4157[2] { + if yyq4166[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4166 := &x.ObjectMeta - yy4166.CodecEncodeSelf(e) + yy4175 := &x.ObjectMeta + yy4175.CodecEncodeSelf(e) } } - if yyr4157 || yy2arr4157 { + if yyr4166 || yy2arr4166 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4157[3] { + if yyq4166[3] { if x.Conditions == nil { r.EncodeNil() } else { - yym4168 := z.EncBinary() - _ = yym4168 + yym4177 := z.EncBinary() + _ = yym4177 if false { } else { h.encSliceComponentCondition(([]ComponentCondition)(x.Conditions), e) @@ -52067,15 +52145,15 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4157[3] { + if yyq4166[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("conditions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Conditions == nil { r.EncodeNil() } else { - yym4169 := z.EncBinary() - _ = yym4169 + yym4178 := z.EncBinary() + _ = yym4178 if false { } else { h.encSliceComponentCondition(([]ComponentCondition)(x.Conditions), e) @@ -52083,7 +52161,7 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4157 || yy2arr4157 { + if yyr4166 || yy2arr4166 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -52096,25 +52174,25 @@ func (x *ComponentStatus) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4170 := z.DecBinary() - _ = yym4170 + yym4179 := z.DecBinary() + _ = yym4179 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4171 := r.ContainerType() - if yyct4171 == codecSelferValueTypeMap1234 { - yyl4171 := r.ReadMapStart() - if yyl4171 == 0 { + yyct4180 := r.ContainerType() + if yyct4180 == codecSelferValueTypeMap1234 { + yyl4180 := r.ReadMapStart() + if yyl4180 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4171, d) + x.codecDecodeSelfFromMap(yyl4180, d) } - } else if yyct4171 == codecSelferValueTypeArray1234 { - yyl4171 := r.ReadArrayStart() - if yyl4171 == 0 { + } else if yyct4180 == codecSelferValueTypeArray1234 { + yyl4180 := r.ReadArrayStart() + if yyl4180 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4171, d) + x.codecDecodeSelfFromArray(yyl4180, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -52126,12 +52204,12 @@ func (x *ComponentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4172Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4172Slc - var yyhl4172 bool = l >= 0 - for yyj4172 := 0; ; yyj4172++ { - if yyhl4172 { - if yyj4172 >= l { + var yys4181Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys4181Slc + var yyhl4181 bool = l >= 0 + for yyj4181 := 0; ; yyj4181++ { + if yyhl4181 { + if yyj4181 >= l { break } } else { @@ -52140,10 +52218,10 @@ func (x *ComponentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4172Slc = r.DecodeBytes(yys4172Slc, true, true) - yys4172 := string(yys4172Slc) + yys4181Slc = r.DecodeBytes(yys4181Slc, true, true) + yys4181 := string(yys4181Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4172 { + switch yys4181 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -52160,25 +52238,25 @@ func (x *ComponentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv4175 := &x.ObjectMeta - yyv4175.CodecDecodeSelf(d) + yyv4184 := &x.ObjectMeta + yyv4184.CodecDecodeSelf(d) } case "conditions": if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv4176 := &x.Conditions - yym4177 := z.DecBinary() - _ = yym4177 + yyv4185 := &x.Conditions + yym4186 := z.DecBinary() + _ = yym4186 if false { } else { - h.decSliceComponentCondition((*[]ComponentCondition)(yyv4176), d) + h.decSliceComponentCondition((*[]ComponentCondition)(yyv4185), d) } } default: - z.DecStructFieldNotFound(-1, yys4172) - } // end switch yys4172 - } // end for yyj4172 + z.DecStructFieldNotFound(-1, yys4181) + } // end switch yys4181 + } // end for yyj4181 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -52186,16 +52264,16 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4178 int - var yyb4178 bool - var yyhl4178 bool = l >= 0 - yyj4178++ - if yyhl4178 { - yyb4178 = yyj4178 > l + var yyj4187 int + var yyb4187 bool + var yyhl4187 bool = l >= 0 + yyj4187++ + if yyhl4187 { + yyb4187 = yyj4187 > l } else { - yyb4178 = r.CheckBreak() + yyb4187 = r.CheckBreak() } - if yyb4178 { + if yyb4187 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52205,13 +52283,13 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj4178++ - if yyhl4178 { - yyb4178 = yyj4178 > l + yyj4187++ + if yyhl4187 { + yyb4187 = yyj4187 > l } else { - yyb4178 = r.CheckBreak() + yyb4187 = r.CheckBreak() } - if yyb4178 { + if yyb4187 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52221,13 +52299,13 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj4178++ - if yyhl4178 { - yyb4178 = yyj4178 > l + yyj4187++ + if yyhl4187 { + yyb4187 = yyj4187 > l } else { - yyb4178 = r.CheckBreak() + yyb4187 = r.CheckBreak() } - if yyb4178 { + if yyb4187 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52235,16 +52313,16 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv4181 := &x.ObjectMeta - yyv4181.CodecDecodeSelf(d) + yyv4190 := &x.ObjectMeta + yyv4190.CodecDecodeSelf(d) } - yyj4178++ - if yyhl4178 { - yyb4178 = yyj4178 > l + yyj4187++ + if yyhl4187 { + yyb4187 = yyj4187 > l } else { - yyb4178 = r.CheckBreak() + yyb4187 = r.CheckBreak() } - if yyb4178 { + if yyb4187 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52252,26 +52330,26 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv4182 := &x.Conditions - yym4183 := z.DecBinary() - _ = yym4183 + yyv4191 := &x.Conditions + yym4192 := z.DecBinary() + _ = yym4192 if false { } else { - h.decSliceComponentCondition((*[]ComponentCondition)(yyv4182), d) + h.decSliceComponentCondition((*[]ComponentCondition)(yyv4191), d) } } for { - yyj4178++ - if yyhl4178 { - yyb4178 = yyj4178 > l + yyj4187++ + if yyhl4187 { + yyb4187 = yyj4187 > l } else { - yyb4178 = r.CheckBreak() + yyb4187 = r.CheckBreak() } - if yyb4178 { + if yyb4187 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4178-1, "") + z.DecStructFieldNotFound(yyj4187-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -52283,37 +52361,37 @@ func (x *ComponentStatusList) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4184 := z.EncBinary() - _ = yym4184 + yym4193 := z.EncBinary() + _ = yym4193 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4185 := !z.EncBinary() - yy2arr4185 := z.EncBasicHandle().StructToArray - var yyq4185 [4]bool - _, _, _ = yysep4185, yyq4185, yy2arr4185 - const yyr4185 bool = false - yyq4185[0] = x.Kind != "" - yyq4185[1] = x.APIVersion != "" - yyq4185[2] = true - var yynn4185 int - if yyr4185 || yy2arr4185 { + yysep4194 := !z.EncBinary() + yy2arr4194 := z.EncBasicHandle().StructToArray + var yyq4194 [4]bool + _, _, _ = yysep4194, yyq4194, yy2arr4194 + const yyr4194 bool = false + yyq4194[0] = x.Kind != "" + yyq4194[1] = x.APIVersion != "" + yyq4194[2] = true + var yynn4194 int + if yyr4194 || yy2arr4194 { r.EncodeArrayStart(4) } else { - yynn4185 = 1 - for _, b := range yyq4185 { + yynn4194 = 1 + for _, b := range yyq4194 { if b { - yynn4185++ + yynn4194++ } } - r.EncodeMapStart(yynn4185) - yynn4185 = 0 + r.EncodeMapStart(yynn4194) + yynn4194 = 0 } - if yyr4185 || yy2arr4185 { + if yyr4194 || yy2arr4194 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4185[0] { - yym4187 := z.EncBinary() - _ = yym4187 + if yyq4194[0] { + yym4196 := z.EncBinary() + _ = yym4196 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -52322,23 +52400,23 @@ func (x *ComponentStatusList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4185[0] { + if yyq4194[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4188 := z.EncBinary() - _ = yym4188 + yym4197 := z.EncBinary() + _ = yym4197 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr4185 || yy2arr4185 { + if yyr4194 || yy2arr4194 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4185[1] { - yym4190 := z.EncBinary() - _ = yym4190 + if yyq4194[1] { + yym4199 := z.EncBinary() + _ = yym4199 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -52347,54 +52425,54 @@ func (x *ComponentStatusList) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4185[1] { + if yyq4194[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4191 := z.EncBinary() - _ = yym4191 + yym4200 := z.EncBinary() + _ = yym4200 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr4185 || yy2arr4185 { + if yyr4194 || yy2arr4194 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4185[2] { - yy4193 := &x.ListMeta - yym4194 := z.EncBinary() - _ = yym4194 + if yyq4194[2] { + yy4202 := &x.ListMeta + yym4203 := z.EncBinary() + _ = yym4203 if false { - } else if z.HasExtensions() && z.EncExt(yy4193) { + } else if z.HasExtensions() && z.EncExt(yy4202) { } else { - z.EncFallback(yy4193) + z.EncFallback(yy4202) } } else { r.EncodeNil() } } else { - if yyq4185[2] { + if yyq4194[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4195 := &x.ListMeta - yym4196 := z.EncBinary() - _ = yym4196 + yy4204 := &x.ListMeta + yym4205 := z.EncBinary() + _ = yym4205 if false { - } else if z.HasExtensions() && z.EncExt(yy4195) { + } else if z.HasExtensions() && z.EncExt(yy4204) { } else { - z.EncFallback(yy4195) + z.EncFallback(yy4204) } } } - if yyr4185 || yy2arr4185 { + if yyr4194 || yy2arr4194 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Items == nil { r.EncodeNil() } else { - yym4198 := z.EncBinary() - _ = yym4198 + yym4207 := z.EncBinary() + _ = yym4207 if false { } else { h.encSliceComponentStatus(([]ComponentStatus)(x.Items), e) @@ -52407,15 +52485,15 @@ func (x *ComponentStatusList) CodecEncodeSelf(e *codec1978.Encoder) { if x.Items == nil { r.EncodeNil() } else { - yym4199 := z.EncBinary() - _ = yym4199 + yym4208 := z.EncBinary() + _ = yym4208 if false { } else { h.encSliceComponentStatus(([]ComponentStatus)(x.Items), e) } } } - if yyr4185 || yy2arr4185 { + if yyr4194 || yy2arr4194 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -52428,25 +52506,25 @@ func (x *ComponentStatusList) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4200 := z.DecBinary() - _ = yym4200 + yym4209 := z.DecBinary() + _ = yym4209 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4201 := r.ContainerType() - if yyct4201 == codecSelferValueTypeMap1234 { - yyl4201 := r.ReadMapStart() - if yyl4201 == 0 { + yyct4210 := r.ContainerType() + if yyct4210 == codecSelferValueTypeMap1234 { + yyl4210 := r.ReadMapStart() + if yyl4210 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4201, d) + x.codecDecodeSelfFromMap(yyl4210, d) } - } else if yyct4201 == codecSelferValueTypeArray1234 { - yyl4201 := r.ReadArrayStart() - if yyl4201 == 0 { + } else if yyct4210 == codecSelferValueTypeArray1234 { + yyl4210 := r.ReadArrayStart() + if yyl4210 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4201, d) + x.codecDecodeSelfFromArray(yyl4210, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -52458,12 +52536,12 @@ func (x *ComponentStatusList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4202Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4202Slc - var yyhl4202 bool = l >= 0 - for yyj4202 := 0; ; yyj4202++ { - if yyhl4202 { - if yyj4202 >= l { + var yys4211Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys4211Slc + var yyhl4211 bool = l >= 0 + for yyj4211 := 0; ; yyj4211++ { + if yyhl4211 { + if yyj4211 >= l { break } } else { @@ -52472,10 +52550,10 @@ func (x *ComponentStatusList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4202Slc = r.DecodeBytes(yys4202Slc, true, true) - yys4202 := string(yys4202Slc) + yys4211Slc = r.DecodeBytes(yys4211Slc, true, true) + yys4211 := string(yys4211Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4202 { + switch yys4211 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -52492,31 +52570,31 @@ func (x *ComponentStatusList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv4205 := &x.ListMeta - yym4206 := z.DecBinary() - _ = yym4206 + yyv4214 := &x.ListMeta + yym4215 := z.DecBinary() + _ = yym4215 if false { - } else if z.HasExtensions() && z.DecExt(yyv4205) { + } else if z.HasExtensions() && z.DecExt(yyv4214) { } else { - z.DecFallback(yyv4205, false) + z.DecFallback(yyv4214, false) } } case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4207 := &x.Items - yym4208 := z.DecBinary() - _ = yym4208 + yyv4216 := &x.Items + yym4217 := z.DecBinary() + _ = yym4217 if false { } else { - h.decSliceComponentStatus((*[]ComponentStatus)(yyv4207), d) + h.decSliceComponentStatus((*[]ComponentStatus)(yyv4216), d) } } default: - z.DecStructFieldNotFound(-1, yys4202) - } // end switch yys4202 - } // end for yyj4202 + z.DecStructFieldNotFound(-1, yys4211) + } // end switch yys4211 + } // end for yyj4211 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -52524,16 +52602,16 @@ func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4209 int - var yyb4209 bool - var yyhl4209 bool = l >= 0 - yyj4209++ - if yyhl4209 { - yyb4209 = yyj4209 > l + var yyj4218 int + var yyb4218 bool + var yyhl4218 bool = l >= 0 + yyj4218++ + if yyhl4218 { + yyb4218 = yyj4218 > l } else { - yyb4209 = r.CheckBreak() + yyb4218 = r.CheckBreak() } - if yyb4209 { + if yyb4218 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52543,13 +52621,13 @@ func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.Kind = string(r.DecodeString()) } - yyj4209++ - if yyhl4209 { - yyb4209 = yyj4209 > l + yyj4218++ + if yyhl4218 { + yyb4218 = yyj4218 > l } else { - yyb4209 = r.CheckBreak() + yyb4218 = r.CheckBreak() } - if yyb4209 { + if yyb4218 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52559,13 +52637,13 @@ func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.APIVersion = string(r.DecodeString()) } - yyj4209++ - if yyhl4209 { - yyb4209 = yyj4209 > l + yyj4218++ + if yyhl4218 { + yyb4218 = yyj4218 > l } else { - yyb4209 = r.CheckBreak() + yyb4218 = r.CheckBreak() } - if yyb4209 { + if yyb4218 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52573,22 +52651,22 @@ func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.ListMeta = pkg2_unversioned.ListMeta{} } else { - yyv4212 := &x.ListMeta - yym4213 := z.DecBinary() - _ = yym4213 + yyv4221 := &x.ListMeta + yym4222 := z.DecBinary() + _ = yym4222 if false { - } else if z.HasExtensions() && z.DecExt(yyv4212) { + } else if z.HasExtensions() && z.DecExt(yyv4221) { } else { - z.DecFallback(yyv4212, false) + z.DecFallback(yyv4221, false) } } - yyj4209++ - if yyhl4209 { - yyb4209 = yyj4209 > l + yyj4218++ + if yyhl4218 { + yyb4218 = yyj4218 > l } else { - yyb4209 = r.CheckBreak() + yyb4218 = r.CheckBreak() } - if yyb4209 { + if yyb4218 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52596,26 +52674,26 @@ func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4214 := &x.Items - yym4215 := z.DecBinary() - _ = yym4215 + yyv4223 := &x.Items + yym4224 := z.DecBinary() + _ = yym4224 if false { } else { - h.decSliceComponentStatus((*[]ComponentStatus)(yyv4214), d) + h.decSliceComponentStatus((*[]ComponentStatus)(yyv4223), d) } } for { - yyj4209++ - if yyhl4209 { - yyb4209 = yyj4209 > l + yyj4218++ + if yyhl4218 { + yyb4218 = yyj4218 > l } else { - yyb4209 = r.CheckBreak() + yyb4218 = r.CheckBreak() } - if yyb4209 { + if yyb4218 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4209-1, "") + z.DecStructFieldNotFound(yyj4218-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -52627,38 +52705,38 @@ func (x *DownwardAPIVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4216 := z.EncBinary() - _ = yym4216 + yym4225 := z.EncBinary() + _ = yym4225 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4217 := !z.EncBinary() - yy2arr4217 := z.EncBasicHandle().StructToArray - var yyq4217 [1]bool - _, _, _ = yysep4217, yyq4217, yy2arr4217 - const yyr4217 bool = false - yyq4217[0] = len(x.Items) != 0 - var yynn4217 int - if yyr4217 || yy2arr4217 { + yysep4226 := !z.EncBinary() + yy2arr4226 := z.EncBasicHandle().StructToArray + var yyq4226 [1]bool + _, _, _ = yysep4226, yyq4226, yy2arr4226 + const yyr4226 bool = false + yyq4226[0] = len(x.Items) != 0 + var yynn4226 int + if yyr4226 || yy2arr4226 { r.EncodeArrayStart(1) } else { - yynn4217 = 0 - for _, b := range yyq4217 { + yynn4226 = 0 + for _, b := range yyq4226 { if b { - yynn4217++ + yynn4226++ } } - r.EncodeMapStart(yynn4217) - yynn4217 = 0 + r.EncodeMapStart(yynn4226) + yynn4226 = 0 } - if yyr4217 || yy2arr4217 { + if yyr4226 || yy2arr4226 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4217[0] { + if yyq4226[0] { if x.Items == nil { r.EncodeNil() } else { - yym4219 := z.EncBinary() - _ = yym4219 + yym4228 := z.EncBinary() + _ = yym4228 if false { } else { h.encSliceDownwardAPIVolumeFile(([]DownwardAPIVolumeFile)(x.Items), e) @@ -52668,15 +52746,15 @@ func (x *DownwardAPIVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4217[0] { + if yyq4226[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("items")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Items == nil { r.EncodeNil() } else { - yym4220 := z.EncBinary() - _ = yym4220 + yym4229 := z.EncBinary() + _ = yym4229 if false { } else { h.encSliceDownwardAPIVolumeFile(([]DownwardAPIVolumeFile)(x.Items), e) @@ -52684,7 +52762,7 @@ func (x *DownwardAPIVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4217 || yy2arr4217 { + if yyr4226 || yy2arr4226 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -52697,25 +52775,25 @@ func (x *DownwardAPIVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4221 := z.DecBinary() - _ = yym4221 + yym4230 := z.DecBinary() + _ = yym4230 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4222 := r.ContainerType() - if yyct4222 == codecSelferValueTypeMap1234 { - yyl4222 := r.ReadMapStart() - if yyl4222 == 0 { + yyct4231 := r.ContainerType() + if yyct4231 == codecSelferValueTypeMap1234 { + yyl4231 := r.ReadMapStart() + if yyl4231 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4222, d) + x.codecDecodeSelfFromMap(yyl4231, d) } - } else if yyct4222 == codecSelferValueTypeArray1234 { - yyl4222 := r.ReadArrayStart() - if yyl4222 == 0 { + } else if yyct4231 == codecSelferValueTypeArray1234 { + yyl4231 := r.ReadArrayStart() + if yyl4231 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4222, d) + x.codecDecodeSelfFromArray(yyl4231, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -52727,12 +52805,12 @@ func (x *DownwardAPIVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4223Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4223Slc - var yyhl4223 bool = l >= 0 - for yyj4223 := 0; ; yyj4223++ { - if yyhl4223 { - if yyj4223 >= l { + var yys4232Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys4232Slc + var yyhl4232 bool = l >= 0 + for yyj4232 := 0; ; yyj4232++ { + if yyhl4232 { + if yyj4232 >= l { break } } else { @@ -52741,26 +52819,26 @@ func (x *DownwardAPIVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Dec } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4223Slc = r.DecodeBytes(yys4223Slc, true, true) - yys4223 := string(yys4223Slc) + yys4232Slc = r.DecodeBytes(yys4232Slc, true, true) + yys4232 := string(yys4232Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4223 { + switch yys4232 { case "items": if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4224 := &x.Items - yym4225 := z.DecBinary() - _ = yym4225 + yyv4233 := &x.Items + yym4234 := z.DecBinary() + _ = yym4234 if false { } else { - h.decSliceDownwardAPIVolumeFile((*[]DownwardAPIVolumeFile)(yyv4224), d) + h.decSliceDownwardAPIVolumeFile((*[]DownwardAPIVolumeFile)(yyv4233), d) } } default: - z.DecStructFieldNotFound(-1, yys4223) - } // end switch yys4223 - } // end for yyj4223 + z.DecStructFieldNotFound(-1, yys4232) + } // end switch yys4232 + } // end for yyj4232 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -52768,16 +52846,16 @@ func (x *DownwardAPIVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4226 int - var yyb4226 bool - var yyhl4226 bool = l >= 0 - yyj4226++ - if yyhl4226 { - yyb4226 = yyj4226 > l + var yyj4235 int + var yyb4235 bool + var yyhl4235 bool = l >= 0 + yyj4235++ + if yyhl4235 { + yyb4235 = yyj4235 > l } else { - yyb4226 = r.CheckBreak() + yyb4235 = r.CheckBreak() } - if yyb4226 { + if yyb4235 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -52785,26 +52863,26 @@ func (x *DownwardAPIVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Items = nil } else { - yyv4227 := &x.Items - yym4228 := z.DecBinary() - _ = yym4228 + yyv4236 := &x.Items + yym4237 := z.DecBinary() + _ = yym4237 if false { } else { - h.decSliceDownwardAPIVolumeFile((*[]DownwardAPIVolumeFile)(yyv4227), d) + h.decSliceDownwardAPIVolumeFile((*[]DownwardAPIVolumeFile)(yyv4236), d) } } for { - yyj4226++ - if yyhl4226 { - yyb4226 = yyj4226 > l + yyj4235++ + if yyhl4235 { + yyb4235 = yyj4235 > l } else { - yyb4226 = r.CheckBreak() + yyb4235 = r.CheckBreak() } - if yyb4226 { + if yyb4235 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4226-1, "") + z.DecStructFieldNotFound(yyj4235-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -52816,35 +52894,35 @@ func (x *DownwardAPIVolumeFile) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4229 := z.EncBinary() - _ = yym4229 + yym4238 := z.EncBinary() + _ = yym4238 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4230 := !z.EncBinary() - yy2arr4230 := z.EncBasicHandle().StructToArray - var yyq4230 [3]bool - _, _, _ = yysep4230, yyq4230, yy2arr4230 - const yyr4230 bool = false - yyq4230[1] = x.FieldRef != nil - yyq4230[2] = x.ResourceFieldRef != nil - var yynn4230 int - if yyr4230 || yy2arr4230 { + yysep4239 := !z.EncBinary() + yy2arr4239 := z.EncBasicHandle().StructToArray + var yyq4239 [3]bool + _, _, _ = yysep4239, yyq4239, yy2arr4239 + const yyr4239 bool = false + yyq4239[1] = x.FieldRef != nil + yyq4239[2] = x.ResourceFieldRef != nil + var yynn4239 int + if yyr4239 || yy2arr4239 { r.EncodeArrayStart(3) } else { - yynn4230 = 1 - for _, b := range yyq4230 { + yynn4239 = 1 + for _, b := range yyq4239 { if b { - yynn4230++ + yynn4239++ } } - r.EncodeMapStart(yynn4230) - yynn4230 = 0 + r.EncodeMapStart(yynn4239) + yynn4239 = 0 } - if yyr4230 || yy2arr4230 { + if yyr4239 || yy2arr4239 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym4232 := z.EncBinary() - _ = yym4232 + yym4241 := z.EncBinary() + _ = yym4241 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) @@ -52853,16 +52931,16 @@ func (x *DownwardAPIVolumeFile) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("path")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4233 := z.EncBinary() - _ = yym4233 + yym4242 := z.EncBinary() + _ = yym4242 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Path)) } } - if yyr4230 || yy2arr4230 { + if yyr4239 || yy2arr4239 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4230[1] { + if yyq4239[1] { if x.FieldRef == nil { r.EncodeNil() } else { @@ -52872,7 +52950,7 @@ func (x *DownwardAPIVolumeFile) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4230[1] { + if yyq4239[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("fieldRef")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -52883,9 +52961,9 @@ func (x *DownwardAPIVolumeFile) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4230 || yy2arr4230 { + if yyr4239 || yy2arr4239 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4230[2] { + if yyq4239[2] { if x.ResourceFieldRef == nil { r.EncodeNil() } else { @@ -52895,7 +52973,7 @@ func (x *DownwardAPIVolumeFile) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4230[2] { + if yyq4239[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("resourceFieldRef")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -52906,7 +52984,7 @@ func (x *DownwardAPIVolumeFile) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4230 || yy2arr4230 { + if yyr4239 || yy2arr4239 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -52919,25 +52997,25 @@ func (x *DownwardAPIVolumeFile) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4236 := z.DecBinary() - _ = yym4236 + yym4245 := z.DecBinary() + _ = yym4245 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4237 := r.ContainerType() - if yyct4237 == codecSelferValueTypeMap1234 { - yyl4237 := r.ReadMapStart() - if yyl4237 == 0 { + yyct4246 := r.ContainerType() + if yyct4246 == codecSelferValueTypeMap1234 { + yyl4246 := r.ReadMapStart() + if yyl4246 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4237, d) + x.codecDecodeSelfFromMap(yyl4246, d) } - } else if yyct4237 == codecSelferValueTypeArray1234 { - yyl4237 := r.ReadArrayStart() - if yyl4237 == 0 { + } else if yyct4246 == codecSelferValueTypeArray1234 { + yyl4246 := r.ReadArrayStart() + if yyl4246 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4237, d) + x.codecDecodeSelfFromArray(yyl4246, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -52949,12 +53027,12 @@ func (x *DownwardAPIVolumeFile) codecDecodeSelfFromMap(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4238Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4238Slc - var yyhl4238 bool = l >= 0 - for yyj4238 := 0; ; yyj4238++ { - if yyhl4238 { - if yyj4238 >= l { + var yys4247Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys4247Slc + var yyhl4247 bool = l >= 0 + for yyj4247 := 0; ; yyj4247++ { + if yyhl4247 { + if yyj4247 >= l { break } } else { @@ -52963,10 +53041,10 @@ func (x *DownwardAPIVolumeFile) codecDecodeSelfFromMap(l int, d *codec1978.Decod } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4238Slc = r.DecodeBytes(yys4238Slc, true, true) - yys4238 := string(yys4238Slc) + yys4247Slc = r.DecodeBytes(yys4247Slc, true, true) + yys4247 := string(yys4247Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4238 { + switch yys4247 { case "path": if r.TryDecodeAsNil() { x.Path = "" @@ -52996,9 +53074,9 @@ func (x *DownwardAPIVolumeFile) codecDecodeSelfFromMap(l int, d *codec1978.Decod x.ResourceFieldRef.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys4238) - } // end switch yys4238 - } // end for yyj4238 + z.DecStructFieldNotFound(-1, yys4247) + } // end switch yys4247 + } // end for yyj4247 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -53006,16 +53084,16 @@ func (x *DownwardAPIVolumeFile) codecDecodeSelfFromArray(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4242 int - var yyb4242 bool - var yyhl4242 bool = l >= 0 - yyj4242++ - if yyhl4242 { - yyb4242 = yyj4242 > l + var yyj4251 int + var yyb4251 bool + var yyhl4251 bool = l >= 0 + yyj4251++ + if yyhl4251 { + yyb4251 = yyj4251 > l } else { - yyb4242 = r.CheckBreak() + yyb4251 = r.CheckBreak() } - if yyb4242 { + if yyb4251 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53025,13 +53103,13 @@ func (x *DownwardAPIVolumeFile) codecDecodeSelfFromArray(l int, d *codec1978.Dec } else { x.Path = string(r.DecodeString()) } - yyj4242++ - if yyhl4242 { - yyb4242 = yyj4242 > l + yyj4251++ + if yyhl4251 { + yyb4251 = yyj4251 > l } else { - yyb4242 = r.CheckBreak() + yyb4251 = r.CheckBreak() } - if yyb4242 { + if yyb4251 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53046,13 +53124,13 @@ func (x *DownwardAPIVolumeFile) codecDecodeSelfFromArray(l int, d *codec1978.Dec } x.FieldRef.CodecDecodeSelf(d) } - yyj4242++ - if yyhl4242 { - yyb4242 = yyj4242 > l + yyj4251++ + if yyhl4251 { + yyb4251 = yyj4251 > l } else { - yyb4242 = r.CheckBreak() + yyb4251 = r.CheckBreak() } - if yyb4242 { + if yyb4251 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53068,17 +53146,17 @@ func (x *DownwardAPIVolumeFile) codecDecodeSelfFromArray(l int, d *codec1978.Dec x.ResourceFieldRef.CodecDecodeSelf(d) } for { - yyj4242++ - if yyhl4242 { - yyb4242 = yyj4242 > l + yyj4251++ + if yyhl4251 { + yyb4251 = yyj4251 > l } else { - yyb4242 = r.CheckBreak() + yyb4251 = r.CheckBreak() } - if yyb4242 { + if yyb4251 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4242-1, "") + z.DecStructFieldNotFound(yyj4251-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -53090,38 +53168,38 @@ func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4246 := z.EncBinary() - _ = yym4246 + yym4255 := z.EncBinary() + _ = yym4255 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4247 := !z.EncBinary() - yy2arr4247 := z.EncBasicHandle().StructToArray - var yyq4247 [6]bool - _, _, _ = yysep4247, yyq4247, yy2arr4247 - const yyr4247 bool = false - yyq4247[0] = x.Capabilities != nil - yyq4247[1] = x.Privileged != nil - yyq4247[2] = x.SELinuxOptions != nil - yyq4247[3] = x.RunAsUser != nil - yyq4247[4] = x.RunAsNonRoot != nil - yyq4247[5] = x.ReadOnlyRootFilesystem != nil - var yynn4247 int - if yyr4247 || yy2arr4247 { + yysep4256 := !z.EncBinary() + yy2arr4256 := z.EncBasicHandle().StructToArray + var yyq4256 [6]bool + _, _, _ = yysep4256, yyq4256, yy2arr4256 + const yyr4256 bool = false + yyq4256[0] = x.Capabilities != nil + yyq4256[1] = x.Privileged != nil + yyq4256[2] = x.SELinuxOptions != nil + yyq4256[3] = x.RunAsUser != nil + yyq4256[4] = x.RunAsNonRoot != nil + yyq4256[5] = x.ReadOnlyRootFilesystem != nil + var yynn4256 int + if yyr4256 || yy2arr4256 { r.EncodeArrayStart(6) } else { - yynn4247 = 0 - for _, b := range yyq4247 { + yynn4256 = 0 + for _, b := range yyq4256 { if b { - yynn4247++ + yynn4256++ } } - r.EncodeMapStart(yynn4247) - yynn4247 = 0 + r.EncodeMapStart(yynn4256) + yynn4256 = 0 } - if yyr4247 || yy2arr4247 { + if yyr4256 || yy2arr4256 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4247[0] { + if yyq4256[0] { if x.Capabilities == nil { r.EncodeNil() } else { @@ -53131,7 +53209,7 @@ func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4247[0] { + if yyq4256[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("capabilities")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -53142,44 +53220,44 @@ func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4247 || yy2arr4247 { + if yyr4256 || yy2arr4256 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4247[1] { + if yyq4256[1] { if x.Privileged == nil { r.EncodeNil() } else { - yy4250 := *x.Privileged - yym4251 := z.EncBinary() - _ = yym4251 + yy4259 := *x.Privileged + yym4260 := z.EncBinary() + _ = yym4260 if false { } else { - r.EncodeBool(bool(yy4250)) + r.EncodeBool(bool(yy4259)) } } } else { r.EncodeNil() } } else { - if yyq4247[1] { + if yyq4256[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("privileged")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Privileged == nil { r.EncodeNil() } else { - yy4252 := *x.Privileged - yym4253 := z.EncBinary() - _ = yym4253 + yy4261 := *x.Privileged + yym4262 := z.EncBinary() + _ = yym4262 if false { } else { - r.EncodeBool(bool(yy4252)) + r.EncodeBool(bool(yy4261)) } } } } - if yyr4247 || yy2arr4247 { + if yyr4256 || yy2arr4256 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4247[2] { + if yyq4256[2] { if x.SELinuxOptions == nil { r.EncodeNil() } else { @@ -53189,7 +53267,7 @@ func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq4247[2] { + if yyq4256[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("seLinuxOptions")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -53200,112 +53278,112 @@ func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr4247 || yy2arr4247 { + if yyr4256 || yy2arr4256 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4247[3] { + if yyq4256[3] { if x.RunAsUser == nil { r.EncodeNil() } else { - yy4256 := *x.RunAsUser - yym4257 := z.EncBinary() - _ = yym4257 + yy4265 := *x.RunAsUser + yym4266 := z.EncBinary() + _ = yym4266 if false { } else { - r.EncodeInt(int64(yy4256)) + r.EncodeInt(int64(yy4265)) } } } else { r.EncodeNil() } } else { - if yyq4247[3] { + if yyq4256[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("runAsUser")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.RunAsUser == nil { r.EncodeNil() } else { - yy4258 := *x.RunAsUser - yym4259 := z.EncBinary() - _ = yym4259 + yy4267 := *x.RunAsUser + yym4268 := z.EncBinary() + _ = yym4268 if false { } else { - r.EncodeInt(int64(yy4258)) + r.EncodeInt(int64(yy4267)) } } } } - if yyr4247 || yy2arr4247 { + if yyr4256 || yy2arr4256 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4247[4] { + if yyq4256[4] { if x.RunAsNonRoot == nil { r.EncodeNil() } else { - yy4261 := *x.RunAsNonRoot - yym4262 := z.EncBinary() - _ = yym4262 + yy4270 := *x.RunAsNonRoot + yym4271 := z.EncBinary() + _ = yym4271 if false { } else { - r.EncodeBool(bool(yy4261)) + r.EncodeBool(bool(yy4270)) } } } else { r.EncodeNil() } } else { - if yyq4247[4] { + if yyq4256[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("runAsNonRoot")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.RunAsNonRoot == nil { r.EncodeNil() } else { - yy4263 := *x.RunAsNonRoot - yym4264 := z.EncBinary() - _ = yym4264 + yy4272 := *x.RunAsNonRoot + yym4273 := z.EncBinary() + _ = yym4273 if false { } else { - r.EncodeBool(bool(yy4263)) + r.EncodeBool(bool(yy4272)) } } } } - if yyr4247 || yy2arr4247 { + if yyr4256 || yy2arr4256 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4247[5] { + if yyq4256[5] { if x.ReadOnlyRootFilesystem == nil { r.EncodeNil() } else { - yy4266 := *x.ReadOnlyRootFilesystem - yym4267 := z.EncBinary() - _ = yym4267 + yy4275 := *x.ReadOnlyRootFilesystem + yym4276 := z.EncBinary() + _ = yym4276 if false { } else { - r.EncodeBool(bool(yy4266)) + r.EncodeBool(bool(yy4275)) } } } else { r.EncodeNil() } } else { - if yyq4247[5] { + if yyq4256[5] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("readOnlyRootFilesystem")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.ReadOnlyRootFilesystem == nil { r.EncodeNil() } else { - yy4268 := *x.ReadOnlyRootFilesystem - yym4269 := z.EncBinary() - _ = yym4269 + yy4277 := *x.ReadOnlyRootFilesystem + yym4278 := z.EncBinary() + _ = yym4278 if false { } else { - r.EncodeBool(bool(yy4268)) + r.EncodeBool(bool(yy4277)) } } } } - if yyr4247 || yy2arr4247 { + if yyr4256 || yy2arr4256 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -53318,25 +53396,25 @@ func (x *SecurityContext) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4270 := z.DecBinary() - _ = yym4270 + yym4279 := z.DecBinary() + _ = yym4279 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4271 := r.ContainerType() - if yyct4271 == codecSelferValueTypeMap1234 { - yyl4271 := r.ReadMapStart() - if yyl4271 == 0 { + yyct4280 := r.ContainerType() + if yyct4280 == codecSelferValueTypeMap1234 { + yyl4280 := r.ReadMapStart() + if yyl4280 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4271, d) + x.codecDecodeSelfFromMap(yyl4280, d) } - } else if yyct4271 == codecSelferValueTypeArray1234 { - yyl4271 := r.ReadArrayStart() - if yyl4271 == 0 { + } else if yyct4280 == codecSelferValueTypeArray1234 { + yyl4280 := r.ReadArrayStart() + if yyl4280 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4271, d) + x.codecDecodeSelfFromArray(yyl4280, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -53348,12 +53426,12 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4272Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4272Slc - var yyhl4272 bool = l >= 0 - for yyj4272 := 0; ; yyj4272++ { - if yyhl4272 { - if yyj4272 >= l { + var yys4281Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys4281Slc + var yyhl4281 bool = l >= 0 + for yyj4281 := 0; ; yyj4281++ { + if yyhl4281 { + if yyj4281 >= l { break } } else { @@ -53362,10 +53440,10 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4272Slc = r.DecodeBytes(yys4272Slc, true, true) - yys4272 := string(yys4272Slc) + yys4281Slc = r.DecodeBytes(yys4281Slc, true, true) + yys4281 := string(yys4281Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4272 { + switch yys4281 { case "capabilities": if r.TryDecodeAsNil() { if x.Capabilities != nil { @@ -53386,8 +53464,8 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.Privileged == nil { x.Privileged = new(bool) } - yym4275 := z.DecBinary() - _ = yym4275 + yym4284 := z.DecBinary() + _ = yym4284 if false { } else { *((*bool)(x.Privileged)) = r.DecodeBool() @@ -53413,8 +53491,8 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.RunAsUser == nil { x.RunAsUser = new(int64) } - yym4278 := z.DecBinary() - _ = yym4278 + yym4287 := z.DecBinary() + _ = yym4287 if false { } else { *((*int64)(x.RunAsUser)) = int64(r.DecodeInt(64)) @@ -53429,8 +53507,8 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.RunAsNonRoot == nil { x.RunAsNonRoot = new(bool) } - yym4280 := z.DecBinary() - _ = yym4280 + yym4289 := z.DecBinary() + _ = yym4289 if false { } else { *((*bool)(x.RunAsNonRoot)) = r.DecodeBool() @@ -53445,17 +53523,17 @@ func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if x.ReadOnlyRootFilesystem == nil { x.ReadOnlyRootFilesystem = new(bool) } - yym4282 := z.DecBinary() - _ = yym4282 + yym4291 := z.DecBinary() + _ = yym4291 if false { } else { *((*bool)(x.ReadOnlyRootFilesystem)) = r.DecodeBool() } } default: - z.DecStructFieldNotFound(-1, yys4272) - } // end switch yys4272 - } // end for yyj4272 + z.DecStructFieldNotFound(-1, yys4281) + } // end switch yys4281 + } // end for yyj4281 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -53463,16 +53541,16 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4283 int - var yyb4283 bool - var yyhl4283 bool = l >= 0 - yyj4283++ - if yyhl4283 { - yyb4283 = yyj4283 > l + var yyj4292 int + var yyb4292 bool + var yyhl4292 bool = l >= 0 + yyj4292++ + if yyhl4292 { + yyb4292 = yyj4292 > l } else { - yyb4283 = r.CheckBreak() + yyb4292 = r.CheckBreak() } - if yyb4283 { + if yyb4292 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53487,13 +53565,13 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } x.Capabilities.CodecDecodeSelf(d) } - yyj4283++ - if yyhl4283 { - yyb4283 = yyj4283 > l + yyj4292++ + if yyhl4292 { + yyb4292 = yyj4292 > l } else { - yyb4283 = r.CheckBreak() + yyb4292 = r.CheckBreak() } - if yyb4283 { + if yyb4292 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53506,20 +53584,20 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if x.Privileged == nil { x.Privileged = new(bool) } - yym4286 := z.DecBinary() - _ = yym4286 + yym4295 := z.DecBinary() + _ = yym4295 if false { } else { *((*bool)(x.Privileged)) = r.DecodeBool() } } - yyj4283++ - if yyhl4283 { - yyb4283 = yyj4283 > l + yyj4292++ + if yyhl4292 { + yyb4292 = yyj4292 > l } else { - yyb4283 = r.CheckBreak() + yyb4292 = r.CheckBreak() } - if yyb4283 { + if yyb4292 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53534,13 +53612,13 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } x.SELinuxOptions.CodecDecodeSelf(d) } - yyj4283++ - if yyhl4283 { - yyb4283 = yyj4283 > l + yyj4292++ + if yyhl4292 { + yyb4292 = yyj4292 > l } else { - yyb4283 = r.CheckBreak() + yyb4292 = r.CheckBreak() } - if yyb4283 { + if yyb4292 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53553,20 +53631,20 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if x.RunAsUser == nil { x.RunAsUser = new(int64) } - yym4289 := z.DecBinary() - _ = yym4289 + yym4298 := z.DecBinary() + _ = yym4298 if false { } else { *((*int64)(x.RunAsUser)) = int64(r.DecodeInt(64)) } } - yyj4283++ - if yyhl4283 { - yyb4283 = yyj4283 > l + yyj4292++ + if yyhl4292 { + yyb4292 = yyj4292 > l } else { - yyb4283 = r.CheckBreak() + yyb4292 = r.CheckBreak() } - if yyb4283 { + if yyb4292 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53579,20 +53657,20 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if x.RunAsNonRoot == nil { x.RunAsNonRoot = new(bool) } - yym4291 := z.DecBinary() - _ = yym4291 + yym4300 := z.DecBinary() + _ = yym4300 if false { } else { *((*bool)(x.RunAsNonRoot)) = r.DecodeBool() } } - yyj4283++ - if yyhl4283 { - yyb4283 = yyj4283 > l + yyj4292++ + if yyhl4292 { + yyb4292 = yyj4292 > l } else { - yyb4283 = r.CheckBreak() + yyb4292 = r.CheckBreak() } - if yyb4283 { + if yyb4292 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53605,25 +53683,25 @@ func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if x.ReadOnlyRootFilesystem == nil { x.ReadOnlyRootFilesystem = new(bool) } - yym4293 := z.DecBinary() - _ = yym4293 + yym4302 := z.DecBinary() + _ = yym4302 if false { } else { *((*bool)(x.ReadOnlyRootFilesystem)) = r.DecodeBool() } } for { - yyj4283++ - if yyhl4283 { - yyb4283 = yyj4283 > l + yyj4292++ + if yyhl4292 { + yyb4292 = yyj4292 > l } else { - yyb4283 = r.CheckBreak() + yyb4292 = r.CheckBreak() } - if yyb4283 { + if yyb4292 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4283-1, "") + z.DecStructFieldNotFound(yyj4292-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -53635,38 +53713,38 @@ func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4294 := z.EncBinary() - _ = yym4294 + yym4303 := z.EncBinary() + _ = yym4303 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4295 := !z.EncBinary() - yy2arr4295 := z.EncBasicHandle().StructToArray - var yyq4295 [4]bool - _, _, _ = yysep4295, yyq4295, yy2arr4295 - const yyr4295 bool = false - yyq4295[0] = x.User != "" - yyq4295[1] = x.Role != "" - yyq4295[2] = x.Type != "" - yyq4295[3] = x.Level != "" - var yynn4295 int - if yyr4295 || yy2arr4295 { + yysep4304 := !z.EncBinary() + yy2arr4304 := z.EncBasicHandle().StructToArray + var yyq4304 [4]bool + _, _, _ = yysep4304, yyq4304, yy2arr4304 + const yyr4304 bool = false + yyq4304[0] = x.User != "" + yyq4304[1] = x.Role != "" + yyq4304[2] = x.Type != "" + yyq4304[3] = x.Level != "" + var yynn4304 int + if yyr4304 || yy2arr4304 { r.EncodeArrayStart(4) } else { - yynn4295 = 0 - for _, b := range yyq4295 { + yynn4304 = 0 + for _, b := range yyq4304 { if b { - yynn4295++ + yynn4304++ } } - r.EncodeMapStart(yynn4295) - yynn4295 = 0 + r.EncodeMapStart(yynn4304) + yynn4304 = 0 } - if yyr4295 || yy2arr4295 { + if yyr4304 || yy2arr4304 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4295[0] { - yym4297 := z.EncBinary() - _ = yym4297 + if yyq4304[0] { + yym4306 := z.EncBinary() + _ = yym4306 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.User)) @@ -53675,23 +53753,23 @@ func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4295[0] { + if yyq4304[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("user")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4298 := z.EncBinary() - _ = yym4298 + yym4307 := z.EncBinary() + _ = yym4307 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.User)) } } } - if yyr4295 || yy2arr4295 { + if yyr4304 || yy2arr4304 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4295[1] { - yym4300 := z.EncBinary() - _ = yym4300 + if yyq4304[1] { + yym4309 := z.EncBinary() + _ = yym4309 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Role)) @@ -53700,23 +53778,23 @@ func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4295[1] { + if yyq4304[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("role")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4301 := z.EncBinary() - _ = yym4301 + yym4310 := z.EncBinary() + _ = yym4310 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Role)) } } } - if yyr4295 || yy2arr4295 { + if yyr4304 || yy2arr4304 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4295[2] { - yym4303 := z.EncBinary() - _ = yym4303 + if yyq4304[2] { + yym4312 := z.EncBinary() + _ = yym4312 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Type)) @@ -53725,23 +53803,23 @@ func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4295[2] { + if yyq4304[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("type")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4304 := z.EncBinary() - _ = yym4304 + yym4313 := z.EncBinary() + _ = yym4313 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Type)) } } } - if yyr4295 || yy2arr4295 { + if yyr4304 || yy2arr4304 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4295[3] { - yym4306 := z.EncBinary() - _ = yym4306 + if yyq4304[3] { + yym4315 := z.EncBinary() + _ = yym4315 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Level)) @@ -53750,19 +53828,19 @@ func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4295[3] { + if yyq4304[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("level")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4307 := z.EncBinary() - _ = yym4307 + yym4316 := z.EncBinary() + _ = yym4316 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Level)) } } } - if yyr4295 || yy2arr4295 { + if yyr4304 || yy2arr4304 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -53775,25 +53853,25 @@ func (x *SELinuxOptions) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4308 := z.DecBinary() - _ = yym4308 + yym4317 := z.DecBinary() + _ = yym4317 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4309 := r.ContainerType() - if yyct4309 == codecSelferValueTypeMap1234 { - yyl4309 := r.ReadMapStart() - if yyl4309 == 0 { + yyct4318 := r.ContainerType() + if yyct4318 == codecSelferValueTypeMap1234 { + yyl4318 := r.ReadMapStart() + if yyl4318 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4309, d) + x.codecDecodeSelfFromMap(yyl4318, d) } - } else if yyct4309 == codecSelferValueTypeArray1234 { - yyl4309 := r.ReadArrayStart() - if yyl4309 == 0 { + } else if yyct4318 == codecSelferValueTypeArray1234 { + yyl4318 := r.ReadArrayStart() + if yyl4318 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4309, d) + x.codecDecodeSelfFromArray(yyl4318, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -53805,12 +53883,12 @@ func (x *SELinuxOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4310Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4310Slc - var yyhl4310 bool = l >= 0 - for yyj4310 := 0; ; yyj4310++ { - if yyhl4310 { - if yyj4310 >= l { + var yys4319Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys4319Slc + var yyhl4319 bool = l >= 0 + for yyj4319 := 0; ; yyj4319++ { + if yyhl4319 { + if yyj4319 >= l { break } } else { @@ -53819,10 +53897,10 @@ func (x *SELinuxOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4310Slc = r.DecodeBytes(yys4310Slc, true, true) - yys4310 := string(yys4310Slc) + yys4319Slc = r.DecodeBytes(yys4319Slc, true, true) + yys4319 := string(yys4319Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4310 { + switch yys4319 { case "user": if r.TryDecodeAsNil() { x.User = "" @@ -53848,9 +53926,9 @@ func (x *SELinuxOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { x.Level = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys4310) - } // end switch yys4310 - } // end for yyj4310 + z.DecStructFieldNotFound(-1, yys4319) + } // end switch yys4319 + } // end for yyj4319 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -53858,16 +53936,16 @@ func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4315 int - var yyb4315 bool - var yyhl4315 bool = l >= 0 - yyj4315++ - if yyhl4315 { - yyb4315 = yyj4315 > l + var yyj4324 int + var yyb4324 bool + var yyhl4324 bool = l >= 0 + yyj4324++ + if yyhl4324 { + yyb4324 = yyj4324 > l } else { - yyb4315 = r.CheckBreak() + yyb4324 = r.CheckBreak() } - if yyb4315 { + if yyb4324 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53877,13 +53955,13 @@ func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.User = string(r.DecodeString()) } - yyj4315++ - if yyhl4315 { - yyb4315 = yyj4315 > l + yyj4324++ + if yyhl4324 { + yyb4324 = yyj4324 > l } else { - yyb4315 = r.CheckBreak() + yyb4324 = r.CheckBreak() } - if yyb4315 { + if yyb4324 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53893,13 +53971,13 @@ func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Role = string(r.DecodeString()) } - yyj4315++ - if yyhl4315 { - yyb4315 = yyj4315 > l + yyj4324++ + if yyhl4324 { + yyb4324 = yyj4324 > l } else { - yyb4315 = r.CheckBreak() + yyb4324 = r.CheckBreak() } - if yyb4315 { + if yyb4324 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53909,13 +53987,13 @@ func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Type = string(r.DecodeString()) } - yyj4315++ - if yyhl4315 { - yyb4315 = yyj4315 > l + yyj4324++ + if yyhl4324 { + yyb4324 = yyj4324 > l } else { - yyb4315 = r.CheckBreak() + yyb4324 = r.CheckBreak() } - if yyb4315 { + if yyb4324 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53926,17 +54004,17 @@ func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.Level = string(r.DecodeString()) } for { - yyj4315++ - if yyhl4315 { - yyb4315 = yyj4315 > l + yyj4324++ + if yyhl4324 { + yyb4324 = yyj4324 > l } else { - yyb4315 = r.CheckBreak() + yyb4324 = r.CheckBreak() } - if yyb4315 { + if yyb4324 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4315-1, "") + z.DecStructFieldNotFound(yyj4324-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -53948,37 +54026,37 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym4320 := z.EncBinary() - _ = yym4320 + yym4329 := z.EncBinary() + _ = yym4329 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep4321 := !z.EncBinary() - yy2arr4321 := z.EncBasicHandle().StructToArray - var yyq4321 [5]bool - _, _, _ = yysep4321, yyq4321, yy2arr4321 - const yyr4321 bool = false - yyq4321[0] = x.Kind != "" - yyq4321[1] = x.APIVersion != "" - yyq4321[2] = true - var yynn4321 int - if yyr4321 || yy2arr4321 { + yysep4330 := !z.EncBinary() + yy2arr4330 := z.EncBasicHandle().StructToArray + var yyq4330 [5]bool + _, _, _ = yysep4330, yyq4330, yy2arr4330 + const yyr4330 bool = false + yyq4330[0] = x.Kind != "" + yyq4330[1] = x.APIVersion != "" + yyq4330[2] = true + var yynn4330 int + if yyr4330 || yy2arr4330 { r.EncodeArrayStart(5) } else { - yynn4321 = 2 - for _, b := range yyq4321 { + yynn4330 = 2 + for _, b := range yyq4330 { if b { - yynn4321++ + yynn4330++ } } - r.EncodeMapStart(yynn4321) - yynn4321 = 0 + r.EncodeMapStart(yynn4330) + yynn4330 = 0 } - if yyr4321 || yy2arr4321 { + if yyr4330 || yy2arr4330 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4321[0] { - yym4323 := z.EncBinary() - _ = yym4323 + if yyq4330[0] { + yym4332 := z.EncBinary() + _ = yym4332 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -53987,23 +54065,23 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4321[0] { + if yyq4330[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4324 := z.EncBinary() - _ = yym4324 + yym4333 := z.EncBinary() + _ = yym4333 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr4321 || yy2arr4321 { + if yyr4330 || yy2arr4330 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4321[1] { - yym4326 := z.EncBinary() - _ = yym4326 + if yyq4330[1] { + yym4335 := z.EncBinary() + _ = yym4335 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -54012,39 +54090,39 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq4321[1] { + if yyq4330[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4327 := z.EncBinary() - _ = yym4327 + yym4336 := z.EncBinary() + _ = yym4336 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr4321 || yy2arr4321 { + if yyr4330 || yy2arr4330 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq4321[2] { - yy4329 := &x.ObjectMeta - yy4329.CodecEncodeSelf(e) + if yyq4330[2] { + yy4338 := &x.ObjectMeta + yy4338.CodecEncodeSelf(e) } else { r.EncodeNil() } } else { - if yyq4321[2] { + if yyq4330[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4330 := &x.ObjectMeta - yy4330.CodecEncodeSelf(e) + yy4339 := &x.ObjectMeta + yy4339.CodecEncodeSelf(e) } } - if yyr4321 || yy2arr4321 { + if yyr4330 || yy2arr4330 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym4332 := z.EncBinary() - _ = yym4332 + yym4341 := z.EncBinary() + _ = yym4341 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Range)) @@ -54053,20 +54131,20 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("range")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym4333 := z.EncBinary() - _ = yym4333 + yym4342 := z.EncBinary() + _ = yym4342 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Range)) } } - if yyr4321 || yy2arr4321 { + if yyr4330 || yy2arr4330 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if x.Data == nil { r.EncodeNil() } else { - yym4335 := z.EncBinary() - _ = yym4335 + yym4344 := z.EncBinary() + _ = yym4344 if false { } else { r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data)) @@ -54079,15 +54157,15 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { if x.Data == nil { r.EncodeNil() } else { - yym4336 := z.EncBinary() - _ = yym4336 + yym4345 := z.EncBinary() + _ = yym4345 if false { } else { r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data)) } } } - if yyr4321 || yy2arr4321 { + if yyr4330 || yy2arr4330 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -54100,25 +54178,25 @@ func (x *RangeAllocation) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym4337 := z.DecBinary() - _ = yym4337 + yym4346 := z.DecBinary() + _ = yym4346 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct4338 := r.ContainerType() - if yyct4338 == codecSelferValueTypeMap1234 { - yyl4338 := r.ReadMapStart() - if yyl4338 == 0 { + yyct4347 := r.ContainerType() + if yyct4347 == codecSelferValueTypeMap1234 { + yyl4347 := r.ReadMapStart() + if yyl4347 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl4338, d) + x.codecDecodeSelfFromMap(yyl4347, d) } - } else if yyct4338 == codecSelferValueTypeArray1234 { - yyl4338 := r.ReadArrayStart() - if yyl4338 == 0 { + } else if yyct4347 == codecSelferValueTypeArray1234 { + yyl4347 := r.ReadArrayStart() + if yyl4347 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl4338, d) + x.codecDecodeSelfFromArray(yyl4347, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -54130,12 +54208,12 @@ func (x *RangeAllocation) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys4339Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys4339Slc - var yyhl4339 bool = l >= 0 - for yyj4339 := 0; ; yyj4339++ { - if yyhl4339 { - if yyj4339 >= l { + var yys4348Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys4348Slc + var yyhl4348 bool = l >= 0 + for yyj4348 := 0; ; yyj4348++ { + if yyhl4348 { + if yyj4348 >= l { break } } else { @@ -54144,10 +54222,10 @@ func (x *RangeAllocation) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys4339Slc = r.DecodeBytes(yys4339Slc, true, true) - yys4339 := string(yys4339Slc) + yys4348Slc = r.DecodeBytes(yys4348Slc, true, true) + yys4348 := string(yys4348Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys4339 { + switch yys4348 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -54164,8 +54242,8 @@ func (x *RangeAllocation) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv4342 := &x.ObjectMeta - yyv4342.CodecDecodeSelf(d) + yyv4351 := &x.ObjectMeta + yyv4351.CodecDecodeSelf(d) } case "range": if r.TryDecodeAsNil() { @@ -54177,18 +54255,18 @@ func (x *RangeAllocation) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Data = nil } else { - yyv4344 := &x.Data - yym4345 := z.DecBinary() - _ = yym4345 + yyv4353 := &x.Data + yym4354 := z.DecBinary() + _ = yym4354 if false { } else { - *yyv4344 = r.DecodeBytes(*(*[]byte)(yyv4344), false, false) + *yyv4353 = r.DecodeBytes(*(*[]byte)(yyv4353), false, false) } } default: - z.DecStructFieldNotFound(-1, yys4339) - } // end switch yys4339 - } // end for yyj4339 + z.DecStructFieldNotFound(-1, yys4348) + } // end switch yys4348 + } // end for yyj4348 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -54196,16 +54274,16 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj4346 int - var yyb4346 bool - var yyhl4346 bool = l >= 0 - yyj4346++ - if yyhl4346 { - yyb4346 = yyj4346 > l + var yyj4355 int + var yyb4355 bool + var yyhl4355 bool = l >= 0 + yyj4355++ + if yyhl4355 { + yyb4355 = yyj4355 > l } else { - yyb4346 = r.CheckBreak() + yyb4355 = r.CheckBreak() } - if yyb4346 { + if yyb4355 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -54215,13 +54293,13 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Kind = string(r.DecodeString()) } - yyj4346++ - if yyhl4346 { - yyb4346 = yyj4346 > l + yyj4355++ + if yyhl4355 { + yyb4355 = yyj4355 > l } else { - yyb4346 = r.CheckBreak() + yyb4355 = r.CheckBreak() } - if yyb4346 { + if yyb4355 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -54231,13 +54309,13 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.APIVersion = string(r.DecodeString()) } - yyj4346++ - if yyhl4346 { - yyb4346 = yyj4346 > l + yyj4355++ + if yyhl4355 { + yyb4355 = yyj4355 > l } else { - yyb4346 = r.CheckBreak() + yyb4355 = r.CheckBreak() } - if yyb4346 { + if yyb4355 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -54245,16 +54323,16 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv4349 := &x.ObjectMeta - yyv4349.CodecDecodeSelf(d) + yyv4358 := &x.ObjectMeta + yyv4358.CodecDecodeSelf(d) } - yyj4346++ - if yyhl4346 { - yyb4346 = yyj4346 > l + yyj4355++ + if yyhl4355 { + yyb4355 = yyj4355 > l } else { - yyb4346 = r.CheckBreak() + yyb4355 = r.CheckBreak() } - if yyb4346 { + if yyb4355 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -54264,13 +54342,13 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } else { x.Range = string(r.DecodeString()) } - yyj4346++ - if yyhl4346 { - yyb4346 = yyj4346 > l + yyj4355++ + if yyhl4355 { + yyb4355 = yyj4355 > l } else { - yyb4346 = r.CheckBreak() + yyb4355 = r.CheckBreak() } - if yyb4346 { + if yyb4355 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -54278,26 +54356,26 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Data = nil } else { - yyv4351 := &x.Data - yym4352 := z.DecBinary() - _ = yym4352 + yyv4360 := &x.Data + yym4361 := z.DecBinary() + _ = yym4361 if false { } else { - *yyv4351 = r.DecodeBytes(*(*[]byte)(yyv4351), false, false) + *yyv4360 = r.DecodeBytes(*(*[]byte)(yyv4360), false, false) } } for { - yyj4346++ - if yyhl4346 { - yyb4346 = yyj4346 > l + yyj4355++ + if yyhl4355 { + yyb4355 = yyj4355 > l } else { - yyb4346 = r.CheckBreak() + yyb4355 = r.CheckBreak() } - if yyb4346 { + if yyb4355 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj4346-1, "") + z.DecStructFieldNotFound(yyj4355-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -54307,10 +54385,10 @@ func (x codecSelfer1234) encSliceOwnerReference(v []OwnerReference, e *codec1978 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4353 := range v { + for _, yyv4362 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4354 := &yyv4353 - yy4354.CodecEncodeSelf(e) + yy4363 := &yyv4362 + yy4363.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -54320,83 +54398,83 @@ func (x codecSelfer1234) decSliceOwnerReference(v *[]OwnerReference, d *codec197 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4355 := *v - yyh4355, yyl4355 := z.DecSliceHelperStart() - var yyc4355 bool - if yyl4355 == 0 { - if yyv4355 == nil { - yyv4355 = []OwnerReference{} - yyc4355 = true - } else if len(yyv4355) != 0 { - yyv4355 = yyv4355[:0] - yyc4355 = true + yyv4364 := *v + yyh4364, yyl4364 := z.DecSliceHelperStart() + var yyc4364 bool + if yyl4364 == 0 { + if yyv4364 == nil { + yyv4364 = []OwnerReference{} + yyc4364 = true + } else if len(yyv4364) != 0 { + yyv4364 = yyv4364[:0] + yyc4364 = true } - } else if yyl4355 > 0 { - var yyrr4355, yyrl4355 int - var yyrt4355 bool - if yyl4355 > cap(yyv4355) { + } else if yyl4364 > 0 { + var yyrr4364, yyrl4364 int + var yyrt4364 bool + if yyl4364 > cap(yyv4364) { - yyrg4355 := len(yyv4355) > 0 - yyv24355 := yyv4355 - yyrl4355, yyrt4355 = z.DecInferLen(yyl4355, z.DecBasicHandle().MaxInitLen, 72) - if yyrt4355 { - if yyrl4355 <= cap(yyv4355) { - yyv4355 = yyv4355[:yyrl4355] + yyrg4364 := len(yyv4364) > 0 + yyv24364 := yyv4364 + yyrl4364, yyrt4364 = z.DecInferLen(yyl4364, z.DecBasicHandle().MaxInitLen, 72) + if yyrt4364 { + if yyrl4364 <= cap(yyv4364) { + yyv4364 = yyv4364[:yyrl4364] } else { - yyv4355 = make([]OwnerReference, yyrl4355) + yyv4364 = make([]OwnerReference, yyrl4364) } } else { - yyv4355 = make([]OwnerReference, yyrl4355) + yyv4364 = make([]OwnerReference, yyrl4364) } - yyc4355 = true - yyrr4355 = len(yyv4355) - if yyrg4355 { - copy(yyv4355, yyv24355) + yyc4364 = true + yyrr4364 = len(yyv4364) + if yyrg4364 { + copy(yyv4364, yyv24364) } - } else if yyl4355 != len(yyv4355) { - yyv4355 = yyv4355[:yyl4355] - yyc4355 = true + } else if yyl4364 != len(yyv4364) { + yyv4364 = yyv4364[:yyl4364] + yyc4364 = true } - yyj4355 := 0 - for ; yyj4355 < yyrr4355; yyj4355++ { - yyh4355.ElemContainerState(yyj4355) + yyj4364 := 0 + for ; yyj4364 < yyrr4364; yyj4364++ { + yyh4364.ElemContainerState(yyj4364) if r.TryDecodeAsNil() { - yyv4355[yyj4355] = OwnerReference{} + yyv4364[yyj4364] = OwnerReference{} } else { - yyv4356 := &yyv4355[yyj4355] - yyv4356.CodecDecodeSelf(d) + yyv4365 := &yyv4364[yyj4364] + yyv4365.CodecDecodeSelf(d) } } - if yyrt4355 { - for ; yyj4355 < yyl4355; yyj4355++ { - yyv4355 = append(yyv4355, OwnerReference{}) - yyh4355.ElemContainerState(yyj4355) + if yyrt4364 { + for ; yyj4364 < yyl4364; yyj4364++ { + yyv4364 = append(yyv4364, OwnerReference{}) + yyh4364.ElemContainerState(yyj4364) if r.TryDecodeAsNil() { - yyv4355[yyj4355] = OwnerReference{} + yyv4364[yyj4364] = OwnerReference{} } else { - yyv4357 := &yyv4355[yyj4355] - yyv4357.CodecDecodeSelf(d) + yyv4366 := &yyv4364[yyj4364] + yyv4366.CodecDecodeSelf(d) } } } } else { - yyj4355 := 0 - for ; !r.CheckBreak(); yyj4355++ { + yyj4364 := 0 + for ; !r.CheckBreak(); yyj4364++ { - if yyj4355 >= len(yyv4355) { - yyv4355 = append(yyv4355, OwnerReference{}) // var yyz4355 OwnerReference - yyc4355 = true + if yyj4364 >= len(yyv4364) { + yyv4364 = append(yyv4364, OwnerReference{}) // var yyz4364 OwnerReference + yyc4364 = true } - yyh4355.ElemContainerState(yyj4355) - if yyj4355 < len(yyv4355) { + yyh4364.ElemContainerState(yyj4364) + if yyj4364 < len(yyv4364) { if r.TryDecodeAsNil() { - yyv4355[yyj4355] = OwnerReference{} + yyv4364[yyj4364] = OwnerReference{} } else { - yyv4358 := &yyv4355[yyj4355] - yyv4358.CodecDecodeSelf(d) + yyv4367 := &yyv4364[yyj4364] + yyv4367.CodecDecodeSelf(d) } } else { @@ -54404,17 +54482,17 @@ func (x codecSelfer1234) decSliceOwnerReference(v *[]OwnerReference, d *codec197 } } - if yyj4355 < len(yyv4355) { - yyv4355 = yyv4355[:yyj4355] - yyc4355 = true - } else if yyj4355 == 0 && yyv4355 == nil { - yyv4355 = []OwnerReference{} - yyc4355 = true + if yyj4364 < len(yyv4364) { + yyv4364 = yyv4364[:yyj4364] + yyc4364 = true + } else if yyj4364 == 0 && yyv4364 == nil { + yyv4364 = []OwnerReference{} + yyc4364 = true } } - yyh4355.End() - if yyc4355 { - *v = yyv4355 + yyh4364.End() + if yyc4364 { + *v = yyv4364 } } @@ -54423,9 +54501,9 @@ func (x codecSelfer1234) encSlicePersistentVolumeAccessMode(v []PersistentVolume z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4359 := range v { + for _, yyv4368 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yyv4359.CodecEncodeSelf(e) + yyv4368.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -54435,75 +54513,75 @@ func (x codecSelfer1234) decSlicePersistentVolumeAccessMode(v *[]PersistentVolum z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4360 := *v - yyh4360, yyl4360 := z.DecSliceHelperStart() - var yyc4360 bool - if yyl4360 == 0 { - if yyv4360 == nil { - yyv4360 = []PersistentVolumeAccessMode{} - yyc4360 = true - } else if len(yyv4360) != 0 { - yyv4360 = yyv4360[:0] - yyc4360 = true + yyv4369 := *v + yyh4369, yyl4369 := z.DecSliceHelperStart() + var yyc4369 bool + if yyl4369 == 0 { + if yyv4369 == nil { + yyv4369 = []PersistentVolumeAccessMode{} + yyc4369 = true + } else if len(yyv4369) != 0 { + yyv4369 = yyv4369[:0] + yyc4369 = true } - } else if yyl4360 > 0 { - var yyrr4360, yyrl4360 int - var yyrt4360 bool - if yyl4360 > cap(yyv4360) { + } else if yyl4369 > 0 { + var yyrr4369, yyrl4369 int + var yyrt4369 bool + if yyl4369 > cap(yyv4369) { - yyrl4360, yyrt4360 = z.DecInferLen(yyl4360, z.DecBasicHandle().MaxInitLen, 16) - if yyrt4360 { - if yyrl4360 <= cap(yyv4360) { - yyv4360 = yyv4360[:yyrl4360] + yyrl4369, yyrt4369 = z.DecInferLen(yyl4369, z.DecBasicHandle().MaxInitLen, 16) + if yyrt4369 { + if yyrl4369 <= cap(yyv4369) { + yyv4369 = yyv4369[:yyrl4369] } else { - yyv4360 = make([]PersistentVolumeAccessMode, yyrl4360) + yyv4369 = make([]PersistentVolumeAccessMode, yyrl4369) } } else { - yyv4360 = make([]PersistentVolumeAccessMode, yyrl4360) + yyv4369 = make([]PersistentVolumeAccessMode, yyrl4369) } - yyc4360 = true - yyrr4360 = len(yyv4360) - } else if yyl4360 != len(yyv4360) { - yyv4360 = yyv4360[:yyl4360] - yyc4360 = true + yyc4369 = true + yyrr4369 = len(yyv4369) + } else if yyl4369 != len(yyv4369) { + yyv4369 = yyv4369[:yyl4369] + yyc4369 = true } - yyj4360 := 0 - for ; yyj4360 < yyrr4360; yyj4360++ { - yyh4360.ElemContainerState(yyj4360) + yyj4369 := 0 + for ; yyj4369 < yyrr4369; yyj4369++ { + yyh4369.ElemContainerState(yyj4369) if r.TryDecodeAsNil() { - yyv4360[yyj4360] = "" + yyv4369[yyj4369] = "" } else { - yyv4360[yyj4360] = PersistentVolumeAccessMode(r.DecodeString()) + yyv4369[yyj4369] = PersistentVolumeAccessMode(r.DecodeString()) } } - if yyrt4360 { - for ; yyj4360 < yyl4360; yyj4360++ { - yyv4360 = append(yyv4360, "") - yyh4360.ElemContainerState(yyj4360) + if yyrt4369 { + for ; yyj4369 < yyl4369; yyj4369++ { + yyv4369 = append(yyv4369, "") + yyh4369.ElemContainerState(yyj4369) if r.TryDecodeAsNil() { - yyv4360[yyj4360] = "" + yyv4369[yyj4369] = "" } else { - yyv4360[yyj4360] = PersistentVolumeAccessMode(r.DecodeString()) + yyv4369[yyj4369] = PersistentVolumeAccessMode(r.DecodeString()) } } } } else { - yyj4360 := 0 - for ; !r.CheckBreak(); yyj4360++ { + yyj4369 := 0 + for ; !r.CheckBreak(); yyj4369++ { - if yyj4360 >= len(yyv4360) { - yyv4360 = append(yyv4360, "") // var yyz4360 PersistentVolumeAccessMode - yyc4360 = true + if yyj4369 >= len(yyv4369) { + yyv4369 = append(yyv4369, "") // var yyz4369 PersistentVolumeAccessMode + yyc4369 = true } - yyh4360.ElemContainerState(yyj4360) - if yyj4360 < len(yyv4360) { + yyh4369.ElemContainerState(yyj4369) + if yyj4369 < len(yyv4369) { if r.TryDecodeAsNil() { - yyv4360[yyj4360] = "" + yyv4369[yyj4369] = "" } else { - yyv4360[yyj4360] = PersistentVolumeAccessMode(r.DecodeString()) + yyv4369[yyj4369] = PersistentVolumeAccessMode(r.DecodeString()) } } else { @@ -54511,17 +54589,17 @@ func (x codecSelfer1234) decSlicePersistentVolumeAccessMode(v *[]PersistentVolum } } - if yyj4360 < len(yyv4360) { - yyv4360 = yyv4360[:yyj4360] - yyc4360 = true - } else if yyj4360 == 0 && yyv4360 == nil { - yyv4360 = []PersistentVolumeAccessMode{} - yyc4360 = true + if yyj4369 < len(yyv4369) { + yyv4369 = yyv4369[:yyj4369] + yyc4369 = true + } else if yyj4369 == 0 && yyv4369 == nil { + yyv4369 = []PersistentVolumeAccessMode{} + yyc4369 = true } } - yyh4360.End() - if yyc4360 { - *v = yyv4360 + yyh4369.End() + if yyc4369 { + *v = yyv4369 } } @@ -54530,10 +54608,10 @@ func (x codecSelfer1234) encSlicePersistentVolume(v []PersistentVolume, e *codec z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4364 := range v { + for _, yyv4373 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4365 := &yyv4364 - yy4365.CodecEncodeSelf(e) + yy4374 := &yyv4373 + yy4374.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -54543,83 +54621,83 @@ func (x codecSelfer1234) decSlicePersistentVolume(v *[]PersistentVolume, d *code z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4366 := *v - yyh4366, yyl4366 := z.DecSliceHelperStart() - var yyc4366 bool - if yyl4366 == 0 { - if yyv4366 == nil { - yyv4366 = []PersistentVolume{} - yyc4366 = true - } else if len(yyv4366) != 0 { - yyv4366 = yyv4366[:0] - yyc4366 = true + yyv4375 := *v + yyh4375, yyl4375 := z.DecSliceHelperStart() + var yyc4375 bool + if yyl4375 == 0 { + if yyv4375 == nil { + yyv4375 = []PersistentVolume{} + yyc4375 = true + } else if len(yyv4375) != 0 { + yyv4375 = yyv4375[:0] + yyc4375 = true } - } else if yyl4366 > 0 { - var yyrr4366, yyrl4366 int - var yyrt4366 bool - if yyl4366 > cap(yyv4366) { + } else if yyl4375 > 0 { + var yyrr4375, yyrl4375 int + var yyrt4375 bool + if yyl4375 > cap(yyv4375) { - yyrg4366 := len(yyv4366) > 0 - yyv24366 := yyv4366 - yyrl4366, yyrt4366 = z.DecInferLen(yyl4366, z.DecBasicHandle().MaxInitLen, 456) - if yyrt4366 { - if yyrl4366 <= cap(yyv4366) { - yyv4366 = yyv4366[:yyrl4366] + yyrg4375 := len(yyv4375) > 0 + yyv24375 := yyv4375 + yyrl4375, yyrt4375 = z.DecInferLen(yyl4375, z.DecBasicHandle().MaxInitLen, 456) + if yyrt4375 { + if yyrl4375 <= cap(yyv4375) { + yyv4375 = yyv4375[:yyrl4375] } else { - yyv4366 = make([]PersistentVolume, yyrl4366) + yyv4375 = make([]PersistentVolume, yyrl4375) } } else { - yyv4366 = make([]PersistentVolume, yyrl4366) + yyv4375 = make([]PersistentVolume, yyrl4375) } - yyc4366 = true - yyrr4366 = len(yyv4366) - if yyrg4366 { - copy(yyv4366, yyv24366) + yyc4375 = true + yyrr4375 = len(yyv4375) + if yyrg4375 { + copy(yyv4375, yyv24375) } - } else if yyl4366 != len(yyv4366) { - yyv4366 = yyv4366[:yyl4366] - yyc4366 = true + } else if yyl4375 != len(yyv4375) { + yyv4375 = yyv4375[:yyl4375] + yyc4375 = true } - yyj4366 := 0 - for ; yyj4366 < yyrr4366; yyj4366++ { - yyh4366.ElemContainerState(yyj4366) + yyj4375 := 0 + for ; yyj4375 < yyrr4375; yyj4375++ { + yyh4375.ElemContainerState(yyj4375) if r.TryDecodeAsNil() { - yyv4366[yyj4366] = PersistentVolume{} + yyv4375[yyj4375] = PersistentVolume{} } else { - yyv4367 := &yyv4366[yyj4366] - yyv4367.CodecDecodeSelf(d) + yyv4376 := &yyv4375[yyj4375] + yyv4376.CodecDecodeSelf(d) } } - if yyrt4366 { - for ; yyj4366 < yyl4366; yyj4366++ { - yyv4366 = append(yyv4366, PersistentVolume{}) - yyh4366.ElemContainerState(yyj4366) + if yyrt4375 { + for ; yyj4375 < yyl4375; yyj4375++ { + yyv4375 = append(yyv4375, PersistentVolume{}) + yyh4375.ElemContainerState(yyj4375) if r.TryDecodeAsNil() { - yyv4366[yyj4366] = PersistentVolume{} + yyv4375[yyj4375] = PersistentVolume{} } else { - yyv4368 := &yyv4366[yyj4366] - yyv4368.CodecDecodeSelf(d) + yyv4377 := &yyv4375[yyj4375] + yyv4377.CodecDecodeSelf(d) } } } } else { - yyj4366 := 0 - for ; !r.CheckBreak(); yyj4366++ { + yyj4375 := 0 + for ; !r.CheckBreak(); yyj4375++ { - if yyj4366 >= len(yyv4366) { - yyv4366 = append(yyv4366, PersistentVolume{}) // var yyz4366 PersistentVolume - yyc4366 = true + if yyj4375 >= len(yyv4375) { + yyv4375 = append(yyv4375, PersistentVolume{}) // var yyz4375 PersistentVolume + yyc4375 = true } - yyh4366.ElemContainerState(yyj4366) - if yyj4366 < len(yyv4366) { + yyh4375.ElemContainerState(yyj4375) + if yyj4375 < len(yyv4375) { if r.TryDecodeAsNil() { - yyv4366[yyj4366] = PersistentVolume{} + yyv4375[yyj4375] = PersistentVolume{} } else { - yyv4369 := &yyv4366[yyj4366] - yyv4369.CodecDecodeSelf(d) + yyv4378 := &yyv4375[yyj4375] + yyv4378.CodecDecodeSelf(d) } } else { @@ -54627,17 +54705,17 @@ func (x codecSelfer1234) decSlicePersistentVolume(v *[]PersistentVolume, d *code } } - if yyj4366 < len(yyv4366) { - yyv4366 = yyv4366[:yyj4366] - yyc4366 = true - } else if yyj4366 == 0 && yyv4366 == nil { - yyv4366 = []PersistentVolume{} - yyc4366 = true + if yyj4375 < len(yyv4375) { + yyv4375 = yyv4375[:yyj4375] + yyc4375 = true + } else if yyj4375 == 0 && yyv4375 == nil { + yyv4375 = []PersistentVolume{} + yyc4375 = true } } - yyh4366.End() - if yyc4366 { - *v = yyv4366 + yyh4375.End() + if yyc4375 { + *v = yyv4375 } } @@ -54646,10 +54724,10 @@ func (x codecSelfer1234) encSlicePersistentVolumeClaim(v []PersistentVolumeClaim z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4370 := range v { + for _, yyv4379 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4371 := &yyv4370 - yy4371.CodecEncodeSelf(e) + yy4380 := &yyv4379 + yy4380.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -54659,83 +54737,83 @@ func (x codecSelfer1234) decSlicePersistentVolumeClaim(v *[]PersistentVolumeClai z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4372 := *v - yyh4372, yyl4372 := z.DecSliceHelperStart() - var yyc4372 bool - if yyl4372 == 0 { - if yyv4372 == nil { - yyv4372 = []PersistentVolumeClaim{} - yyc4372 = true - } else if len(yyv4372) != 0 { - yyv4372 = yyv4372[:0] - yyc4372 = true + yyv4381 := *v + yyh4381, yyl4381 := z.DecSliceHelperStart() + var yyc4381 bool + if yyl4381 == 0 { + if yyv4381 == nil { + yyv4381 = []PersistentVolumeClaim{} + yyc4381 = true + } else if len(yyv4381) != 0 { + yyv4381 = yyv4381[:0] + yyc4381 = true } - } else if yyl4372 > 0 { - var yyrr4372, yyrl4372 int - var yyrt4372 bool - if yyl4372 > cap(yyv4372) { + } else if yyl4381 > 0 { + var yyrr4381, yyrl4381 int + var yyrt4381 bool + if yyl4381 > cap(yyv4381) { - yyrg4372 := len(yyv4372) > 0 - yyv24372 := yyv4372 - yyrl4372, yyrt4372 = z.DecInferLen(yyl4372, z.DecBasicHandle().MaxInitLen, 352) - if yyrt4372 { - if yyrl4372 <= cap(yyv4372) { - yyv4372 = yyv4372[:yyrl4372] + yyrg4381 := len(yyv4381) > 0 + yyv24381 := yyv4381 + yyrl4381, yyrt4381 = z.DecInferLen(yyl4381, z.DecBasicHandle().MaxInitLen, 352) + if yyrt4381 { + if yyrl4381 <= cap(yyv4381) { + yyv4381 = yyv4381[:yyrl4381] } else { - yyv4372 = make([]PersistentVolumeClaim, yyrl4372) + yyv4381 = make([]PersistentVolumeClaim, yyrl4381) } } else { - yyv4372 = make([]PersistentVolumeClaim, yyrl4372) + yyv4381 = make([]PersistentVolumeClaim, yyrl4381) } - yyc4372 = true - yyrr4372 = len(yyv4372) - if yyrg4372 { - copy(yyv4372, yyv24372) + yyc4381 = true + yyrr4381 = len(yyv4381) + if yyrg4381 { + copy(yyv4381, yyv24381) } - } else if yyl4372 != len(yyv4372) { - yyv4372 = yyv4372[:yyl4372] - yyc4372 = true + } else if yyl4381 != len(yyv4381) { + yyv4381 = yyv4381[:yyl4381] + yyc4381 = true } - yyj4372 := 0 - for ; yyj4372 < yyrr4372; yyj4372++ { - yyh4372.ElemContainerState(yyj4372) + yyj4381 := 0 + for ; yyj4381 < yyrr4381; yyj4381++ { + yyh4381.ElemContainerState(yyj4381) if r.TryDecodeAsNil() { - yyv4372[yyj4372] = PersistentVolumeClaim{} + yyv4381[yyj4381] = PersistentVolumeClaim{} } else { - yyv4373 := &yyv4372[yyj4372] - yyv4373.CodecDecodeSelf(d) + yyv4382 := &yyv4381[yyj4381] + yyv4382.CodecDecodeSelf(d) } } - if yyrt4372 { - for ; yyj4372 < yyl4372; yyj4372++ { - yyv4372 = append(yyv4372, PersistentVolumeClaim{}) - yyh4372.ElemContainerState(yyj4372) + if yyrt4381 { + for ; yyj4381 < yyl4381; yyj4381++ { + yyv4381 = append(yyv4381, PersistentVolumeClaim{}) + yyh4381.ElemContainerState(yyj4381) if r.TryDecodeAsNil() { - yyv4372[yyj4372] = PersistentVolumeClaim{} + yyv4381[yyj4381] = PersistentVolumeClaim{} } else { - yyv4374 := &yyv4372[yyj4372] - yyv4374.CodecDecodeSelf(d) + yyv4383 := &yyv4381[yyj4381] + yyv4383.CodecDecodeSelf(d) } } } } else { - yyj4372 := 0 - for ; !r.CheckBreak(); yyj4372++ { + yyj4381 := 0 + for ; !r.CheckBreak(); yyj4381++ { - if yyj4372 >= len(yyv4372) { - yyv4372 = append(yyv4372, PersistentVolumeClaim{}) // var yyz4372 PersistentVolumeClaim - yyc4372 = true + if yyj4381 >= len(yyv4381) { + yyv4381 = append(yyv4381, PersistentVolumeClaim{}) // var yyz4381 PersistentVolumeClaim + yyc4381 = true } - yyh4372.ElemContainerState(yyj4372) - if yyj4372 < len(yyv4372) { + yyh4381.ElemContainerState(yyj4381) + if yyj4381 < len(yyv4381) { if r.TryDecodeAsNil() { - yyv4372[yyj4372] = PersistentVolumeClaim{} + yyv4381[yyj4381] = PersistentVolumeClaim{} } else { - yyv4375 := &yyv4372[yyj4372] - yyv4375.CodecDecodeSelf(d) + yyv4384 := &yyv4381[yyj4381] + yyv4384.CodecDecodeSelf(d) } } else { @@ -54743,17 +54821,17 @@ func (x codecSelfer1234) decSlicePersistentVolumeClaim(v *[]PersistentVolumeClai } } - if yyj4372 < len(yyv4372) { - yyv4372 = yyv4372[:yyj4372] - yyc4372 = true - } else if yyj4372 == 0 && yyv4372 == nil { - yyv4372 = []PersistentVolumeClaim{} - yyc4372 = true + if yyj4381 < len(yyv4381) { + yyv4381 = yyv4381[:yyj4381] + yyc4381 = true + } else if yyj4381 == 0 && yyv4381 == nil { + yyv4381 = []PersistentVolumeClaim{} + yyc4381 = true } } - yyh4372.End() - if yyc4372 { - *v = yyv4372 + yyh4381.End() + if yyc4381 { + *v = yyv4381 } } @@ -54762,10 +54840,10 @@ func (x codecSelfer1234) encSliceKeyToPath(v []KeyToPath, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4376 := range v { + for _, yyv4385 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4377 := &yyv4376 - yy4377.CodecEncodeSelf(e) + yy4386 := &yyv4385 + yy4386.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -54775,83 +54853,83 @@ func (x codecSelfer1234) decSliceKeyToPath(v *[]KeyToPath, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4378 := *v - yyh4378, yyl4378 := z.DecSliceHelperStart() - var yyc4378 bool - if yyl4378 == 0 { - if yyv4378 == nil { - yyv4378 = []KeyToPath{} - yyc4378 = true - } else if len(yyv4378) != 0 { - yyv4378 = yyv4378[:0] - yyc4378 = true + yyv4387 := *v + yyh4387, yyl4387 := z.DecSliceHelperStart() + var yyc4387 bool + if yyl4387 == 0 { + if yyv4387 == nil { + yyv4387 = []KeyToPath{} + yyc4387 = true + } else if len(yyv4387) != 0 { + yyv4387 = yyv4387[:0] + yyc4387 = true } - } else if yyl4378 > 0 { - var yyrr4378, yyrl4378 int - var yyrt4378 bool - if yyl4378 > cap(yyv4378) { + } else if yyl4387 > 0 { + var yyrr4387, yyrl4387 int + var yyrt4387 bool + if yyl4387 > cap(yyv4387) { - yyrg4378 := len(yyv4378) > 0 - yyv24378 := yyv4378 - yyrl4378, yyrt4378 = z.DecInferLen(yyl4378, z.DecBasicHandle().MaxInitLen, 32) - if yyrt4378 { - if yyrl4378 <= cap(yyv4378) { - yyv4378 = yyv4378[:yyrl4378] + yyrg4387 := len(yyv4387) > 0 + yyv24387 := yyv4387 + yyrl4387, yyrt4387 = z.DecInferLen(yyl4387, z.DecBasicHandle().MaxInitLen, 32) + if yyrt4387 { + if yyrl4387 <= cap(yyv4387) { + yyv4387 = yyv4387[:yyrl4387] } else { - yyv4378 = make([]KeyToPath, yyrl4378) + yyv4387 = make([]KeyToPath, yyrl4387) } } else { - yyv4378 = make([]KeyToPath, yyrl4378) + yyv4387 = make([]KeyToPath, yyrl4387) } - yyc4378 = true - yyrr4378 = len(yyv4378) - if yyrg4378 { - copy(yyv4378, yyv24378) + yyc4387 = true + yyrr4387 = len(yyv4387) + if yyrg4387 { + copy(yyv4387, yyv24387) } - } else if yyl4378 != len(yyv4378) { - yyv4378 = yyv4378[:yyl4378] - yyc4378 = true + } else if yyl4387 != len(yyv4387) { + yyv4387 = yyv4387[:yyl4387] + yyc4387 = true } - yyj4378 := 0 - for ; yyj4378 < yyrr4378; yyj4378++ { - yyh4378.ElemContainerState(yyj4378) + yyj4387 := 0 + for ; yyj4387 < yyrr4387; yyj4387++ { + yyh4387.ElemContainerState(yyj4387) if r.TryDecodeAsNil() { - yyv4378[yyj4378] = KeyToPath{} + yyv4387[yyj4387] = KeyToPath{} } else { - yyv4379 := &yyv4378[yyj4378] - yyv4379.CodecDecodeSelf(d) + yyv4388 := &yyv4387[yyj4387] + yyv4388.CodecDecodeSelf(d) } } - if yyrt4378 { - for ; yyj4378 < yyl4378; yyj4378++ { - yyv4378 = append(yyv4378, KeyToPath{}) - yyh4378.ElemContainerState(yyj4378) + if yyrt4387 { + for ; yyj4387 < yyl4387; yyj4387++ { + yyv4387 = append(yyv4387, KeyToPath{}) + yyh4387.ElemContainerState(yyj4387) if r.TryDecodeAsNil() { - yyv4378[yyj4378] = KeyToPath{} + yyv4387[yyj4387] = KeyToPath{} } else { - yyv4380 := &yyv4378[yyj4378] - yyv4380.CodecDecodeSelf(d) + yyv4389 := &yyv4387[yyj4387] + yyv4389.CodecDecodeSelf(d) } } } } else { - yyj4378 := 0 - for ; !r.CheckBreak(); yyj4378++ { + yyj4387 := 0 + for ; !r.CheckBreak(); yyj4387++ { - if yyj4378 >= len(yyv4378) { - yyv4378 = append(yyv4378, KeyToPath{}) // var yyz4378 KeyToPath - yyc4378 = true + if yyj4387 >= len(yyv4387) { + yyv4387 = append(yyv4387, KeyToPath{}) // var yyz4387 KeyToPath + yyc4387 = true } - yyh4378.ElemContainerState(yyj4378) - if yyj4378 < len(yyv4378) { + yyh4387.ElemContainerState(yyj4387) + if yyj4387 < len(yyv4387) { if r.TryDecodeAsNil() { - yyv4378[yyj4378] = KeyToPath{} + yyv4387[yyj4387] = KeyToPath{} } else { - yyv4381 := &yyv4378[yyj4378] - yyv4381.CodecDecodeSelf(d) + yyv4390 := &yyv4387[yyj4387] + yyv4390.CodecDecodeSelf(d) } } else { @@ -54859,17 +54937,17 @@ func (x codecSelfer1234) decSliceKeyToPath(v *[]KeyToPath, d *codec1978.Decoder) } } - if yyj4378 < len(yyv4378) { - yyv4378 = yyv4378[:yyj4378] - yyc4378 = true - } else if yyj4378 == 0 && yyv4378 == nil { - yyv4378 = []KeyToPath{} - yyc4378 = true + if yyj4387 < len(yyv4387) { + yyv4387 = yyv4387[:yyj4387] + yyc4387 = true + } else if yyj4387 == 0 && yyv4387 == nil { + yyv4387 = []KeyToPath{} + yyc4387 = true } } - yyh4378.End() - if yyc4378 { - *v = yyv4378 + yyh4387.End() + if yyc4387 { + *v = yyv4387 } } @@ -54878,10 +54956,10 @@ func (x codecSelfer1234) encSliceHTTPHeader(v []HTTPHeader, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4382 := range v { + for _, yyv4391 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4383 := &yyv4382 - yy4383.CodecEncodeSelf(e) + yy4392 := &yyv4391 + yy4392.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -54891,83 +54969,83 @@ func (x codecSelfer1234) decSliceHTTPHeader(v *[]HTTPHeader, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4384 := *v - yyh4384, yyl4384 := z.DecSliceHelperStart() - var yyc4384 bool - if yyl4384 == 0 { - if yyv4384 == nil { - yyv4384 = []HTTPHeader{} - yyc4384 = true - } else if len(yyv4384) != 0 { - yyv4384 = yyv4384[:0] - yyc4384 = true + yyv4393 := *v + yyh4393, yyl4393 := z.DecSliceHelperStart() + var yyc4393 bool + if yyl4393 == 0 { + if yyv4393 == nil { + yyv4393 = []HTTPHeader{} + yyc4393 = true + } else if len(yyv4393) != 0 { + yyv4393 = yyv4393[:0] + yyc4393 = true } - } else if yyl4384 > 0 { - var yyrr4384, yyrl4384 int - var yyrt4384 bool - if yyl4384 > cap(yyv4384) { + } else if yyl4393 > 0 { + var yyrr4393, yyrl4393 int + var yyrt4393 bool + if yyl4393 > cap(yyv4393) { - yyrg4384 := len(yyv4384) > 0 - yyv24384 := yyv4384 - yyrl4384, yyrt4384 = z.DecInferLen(yyl4384, z.DecBasicHandle().MaxInitLen, 32) - if yyrt4384 { - if yyrl4384 <= cap(yyv4384) { - yyv4384 = yyv4384[:yyrl4384] + yyrg4393 := len(yyv4393) > 0 + yyv24393 := yyv4393 + yyrl4393, yyrt4393 = z.DecInferLen(yyl4393, z.DecBasicHandle().MaxInitLen, 32) + if yyrt4393 { + if yyrl4393 <= cap(yyv4393) { + yyv4393 = yyv4393[:yyrl4393] } else { - yyv4384 = make([]HTTPHeader, yyrl4384) + yyv4393 = make([]HTTPHeader, yyrl4393) } } else { - yyv4384 = make([]HTTPHeader, yyrl4384) + yyv4393 = make([]HTTPHeader, yyrl4393) } - yyc4384 = true - yyrr4384 = len(yyv4384) - if yyrg4384 { - copy(yyv4384, yyv24384) + yyc4393 = true + yyrr4393 = len(yyv4393) + if yyrg4393 { + copy(yyv4393, yyv24393) } - } else if yyl4384 != len(yyv4384) { - yyv4384 = yyv4384[:yyl4384] - yyc4384 = true + } else if yyl4393 != len(yyv4393) { + yyv4393 = yyv4393[:yyl4393] + yyc4393 = true } - yyj4384 := 0 - for ; yyj4384 < yyrr4384; yyj4384++ { - yyh4384.ElemContainerState(yyj4384) + yyj4393 := 0 + for ; yyj4393 < yyrr4393; yyj4393++ { + yyh4393.ElemContainerState(yyj4393) if r.TryDecodeAsNil() { - yyv4384[yyj4384] = HTTPHeader{} + yyv4393[yyj4393] = HTTPHeader{} } else { - yyv4385 := &yyv4384[yyj4384] - yyv4385.CodecDecodeSelf(d) + yyv4394 := &yyv4393[yyj4393] + yyv4394.CodecDecodeSelf(d) } } - if yyrt4384 { - for ; yyj4384 < yyl4384; yyj4384++ { - yyv4384 = append(yyv4384, HTTPHeader{}) - yyh4384.ElemContainerState(yyj4384) + if yyrt4393 { + for ; yyj4393 < yyl4393; yyj4393++ { + yyv4393 = append(yyv4393, HTTPHeader{}) + yyh4393.ElemContainerState(yyj4393) if r.TryDecodeAsNil() { - yyv4384[yyj4384] = HTTPHeader{} + yyv4393[yyj4393] = HTTPHeader{} } else { - yyv4386 := &yyv4384[yyj4384] - yyv4386.CodecDecodeSelf(d) + yyv4395 := &yyv4393[yyj4393] + yyv4395.CodecDecodeSelf(d) } } } } else { - yyj4384 := 0 - for ; !r.CheckBreak(); yyj4384++ { + yyj4393 := 0 + for ; !r.CheckBreak(); yyj4393++ { - if yyj4384 >= len(yyv4384) { - yyv4384 = append(yyv4384, HTTPHeader{}) // var yyz4384 HTTPHeader - yyc4384 = true + if yyj4393 >= len(yyv4393) { + yyv4393 = append(yyv4393, HTTPHeader{}) // var yyz4393 HTTPHeader + yyc4393 = true } - yyh4384.ElemContainerState(yyj4384) - if yyj4384 < len(yyv4384) { + yyh4393.ElemContainerState(yyj4393) + if yyj4393 < len(yyv4393) { if r.TryDecodeAsNil() { - yyv4384[yyj4384] = HTTPHeader{} + yyv4393[yyj4393] = HTTPHeader{} } else { - yyv4387 := &yyv4384[yyj4384] - yyv4387.CodecDecodeSelf(d) + yyv4396 := &yyv4393[yyj4393] + yyv4396.CodecDecodeSelf(d) } } else { @@ -54975,17 +55053,17 @@ func (x codecSelfer1234) decSliceHTTPHeader(v *[]HTTPHeader, d *codec1978.Decode } } - if yyj4384 < len(yyv4384) { - yyv4384 = yyv4384[:yyj4384] - yyc4384 = true - } else if yyj4384 == 0 && yyv4384 == nil { - yyv4384 = []HTTPHeader{} - yyc4384 = true + if yyj4393 < len(yyv4393) { + yyv4393 = yyv4393[:yyj4393] + yyc4393 = true + } else if yyj4393 == 0 && yyv4393 == nil { + yyv4393 = []HTTPHeader{} + yyc4393 = true } } - yyh4384.End() - if yyc4384 { - *v = yyv4384 + yyh4393.End() + if yyc4393 { + *v = yyv4393 } } @@ -54994,9 +55072,9 @@ func (x codecSelfer1234) encSliceCapability(v []Capability, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4388 := range v { + for _, yyv4397 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yyv4388.CodecEncodeSelf(e) + yyv4397.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -55006,75 +55084,75 @@ func (x codecSelfer1234) decSliceCapability(v *[]Capability, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4389 := *v - yyh4389, yyl4389 := z.DecSliceHelperStart() - var yyc4389 bool - if yyl4389 == 0 { - if yyv4389 == nil { - yyv4389 = []Capability{} - yyc4389 = true - } else if len(yyv4389) != 0 { - yyv4389 = yyv4389[:0] - yyc4389 = true + yyv4398 := *v + yyh4398, yyl4398 := z.DecSliceHelperStart() + var yyc4398 bool + if yyl4398 == 0 { + if yyv4398 == nil { + yyv4398 = []Capability{} + yyc4398 = true + } else if len(yyv4398) != 0 { + yyv4398 = yyv4398[:0] + yyc4398 = true } - } else if yyl4389 > 0 { - var yyrr4389, yyrl4389 int - var yyrt4389 bool - if yyl4389 > cap(yyv4389) { + } else if yyl4398 > 0 { + var yyrr4398, yyrl4398 int + var yyrt4398 bool + if yyl4398 > cap(yyv4398) { - yyrl4389, yyrt4389 = z.DecInferLen(yyl4389, z.DecBasicHandle().MaxInitLen, 16) - if yyrt4389 { - if yyrl4389 <= cap(yyv4389) { - yyv4389 = yyv4389[:yyrl4389] + yyrl4398, yyrt4398 = z.DecInferLen(yyl4398, z.DecBasicHandle().MaxInitLen, 16) + if yyrt4398 { + if yyrl4398 <= cap(yyv4398) { + yyv4398 = yyv4398[:yyrl4398] } else { - yyv4389 = make([]Capability, yyrl4389) + yyv4398 = make([]Capability, yyrl4398) } } else { - yyv4389 = make([]Capability, yyrl4389) + yyv4398 = make([]Capability, yyrl4398) } - yyc4389 = true - yyrr4389 = len(yyv4389) - } else if yyl4389 != len(yyv4389) { - yyv4389 = yyv4389[:yyl4389] - yyc4389 = true + yyc4398 = true + yyrr4398 = len(yyv4398) + } else if yyl4398 != len(yyv4398) { + yyv4398 = yyv4398[:yyl4398] + yyc4398 = true } - yyj4389 := 0 - for ; yyj4389 < yyrr4389; yyj4389++ { - yyh4389.ElemContainerState(yyj4389) + yyj4398 := 0 + for ; yyj4398 < yyrr4398; yyj4398++ { + yyh4398.ElemContainerState(yyj4398) if r.TryDecodeAsNil() { - yyv4389[yyj4389] = "" + yyv4398[yyj4398] = "" } else { - yyv4389[yyj4389] = Capability(r.DecodeString()) + yyv4398[yyj4398] = Capability(r.DecodeString()) } } - if yyrt4389 { - for ; yyj4389 < yyl4389; yyj4389++ { - yyv4389 = append(yyv4389, "") - yyh4389.ElemContainerState(yyj4389) + if yyrt4398 { + for ; yyj4398 < yyl4398; yyj4398++ { + yyv4398 = append(yyv4398, "") + yyh4398.ElemContainerState(yyj4398) if r.TryDecodeAsNil() { - yyv4389[yyj4389] = "" + yyv4398[yyj4398] = "" } else { - yyv4389[yyj4389] = Capability(r.DecodeString()) + yyv4398[yyj4398] = Capability(r.DecodeString()) } } } } else { - yyj4389 := 0 - for ; !r.CheckBreak(); yyj4389++ { + yyj4398 := 0 + for ; !r.CheckBreak(); yyj4398++ { - if yyj4389 >= len(yyv4389) { - yyv4389 = append(yyv4389, "") // var yyz4389 Capability - yyc4389 = true + if yyj4398 >= len(yyv4398) { + yyv4398 = append(yyv4398, "") // var yyz4398 Capability + yyc4398 = true } - yyh4389.ElemContainerState(yyj4389) - if yyj4389 < len(yyv4389) { + yyh4398.ElemContainerState(yyj4398) + if yyj4398 < len(yyv4398) { if r.TryDecodeAsNil() { - yyv4389[yyj4389] = "" + yyv4398[yyj4398] = "" } else { - yyv4389[yyj4389] = Capability(r.DecodeString()) + yyv4398[yyj4398] = Capability(r.DecodeString()) } } else { @@ -55082,17 +55160,17 @@ func (x codecSelfer1234) decSliceCapability(v *[]Capability, d *codec1978.Decode } } - if yyj4389 < len(yyv4389) { - yyv4389 = yyv4389[:yyj4389] - yyc4389 = true - } else if yyj4389 == 0 && yyv4389 == nil { - yyv4389 = []Capability{} - yyc4389 = true + if yyj4398 < len(yyv4398) { + yyv4398 = yyv4398[:yyj4398] + yyc4398 = true + } else if yyj4398 == 0 && yyv4398 == nil { + yyv4398 = []Capability{} + yyc4398 = true } } - yyh4389.End() - if yyc4389 { - *v = yyv4389 + yyh4398.End() + if yyc4398 { + *v = yyv4398 } } @@ -55101,10 +55179,10 @@ func (x codecSelfer1234) encSliceContainerPort(v []ContainerPort, e *codec1978.E z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4393 := range v { + for _, yyv4402 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4394 := &yyv4393 - yy4394.CodecEncodeSelf(e) + yy4403 := &yyv4402 + yy4403.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -55114,83 +55192,83 @@ func (x codecSelfer1234) decSliceContainerPort(v *[]ContainerPort, d *codec1978. z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4395 := *v - yyh4395, yyl4395 := z.DecSliceHelperStart() - var yyc4395 bool - if yyl4395 == 0 { - if yyv4395 == nil { - yyv4395 = []ContainerPort{} - yyc4395 = true - } else if len(yyv4395) != 0 { - yyv4395 = yyv4395[:0] - yyc4395 = true + yyv4404 := *v + yyh4404, yyl4404 := z.DecSliceHelperStart() + var yyc4404 bool + if yyl4404 == 0 { + if yyv4404 == nil { + yyv4404 = []ContainerPort{} + yyc4404 = true + } else if len(yyv4404) != 0 { + yyv4404 = yyv4404[:0] + yyc4404 = true } - } else if yyl4395 > 0 { - var yyrr4395, yyrl4395 int - var yyrt4395 bool - if yyl4395 > cap(yyv4395) { + } else if yyl4404 > 0 { + var yyrr4404, yyrl4404 int + var yyrt4404 bool + if yyl4404 > cap(yyv4404) { - yyrg4395 := len(yyv4395) > 0 - yyv24395 := yyv4395 - yyrl4395, yyrt4395 = z.DecInferLen(yyl4395, z.DecBasicHandle().MaxInitLen, 56) - if yyrt4395 { - if yyrl4395 <= cap(yyv4395) { - yyv4395 = yyv4395[:yyrl4395] + yyrg4404 := len(yyv4404) > 0 + yyv24404 := yyv4404 + yyrl4404, yyrt4404 = z.DecInferLen(yyl4404, z.DecBasicHandle().MaxInitLen, 56) + if yyrt4404 { + if yyrl4404 <= cap(yyv4404) { + yyv4404 = yyv4404[:yyrl4404] } else { - yyv4395 = make([]ContainerPort, yyrl4395) + yyv4404 = make([]ContainerPort, yyrl4404) } } else { - yyv4395 = make([]ContainerPort, yyrl4395) + yyv4404 = make([]ContainerPort, yyrl4404) } - yyc4395 = true - yyrr4395 = len(yyv4395) - if yyrg4395 { - copy(yyv4395, yyv24395) + yyc4404 = true + yyrr4404 = len(yyv4404) + if yyrg4404 { + copy(yyv4404, yyv24404) } - } else if yyl4395 != len(yyv4395) { - yyv4395 = yyv4395[:yyl4395] - yyc4395 = true + } else if yyl4404 != len(yyv4404) { + yyv4404 = yyv4404[:yyl4404] + yyc4404 = true } - yyj4395 := 0 - for ; yyj4395 < yyrr4395; yyj4395++ { - yyh4395.ElemContainerState(yyj4395) + yyj4404 := 0 + for ; yyj4404 < yyrr4404; yyj4404++ { + yyh4404.ElemContainerState(yyj4404) if r.TryDecodeAsNil() { - yyv4395[yyj4395] = ContainerPort{} + yyv4404[yyj4404] = ContainerPort{} } else { - yyv4396 := &yyv4395[yyj4395] - yyv4396.CodecDecodeSelf(d) + yyv4405 := &yyv4404[yyj4404] + yyv4405.CodecDecodeSelf(d) } } - if yyrt4395 { - for ; yyj4395 < yyl4395; yyj4395++ { - yyv4395 = append(yyv4395, ContainerPort{}) - yyh4395.ElemContainerState(yyj4395) + if yyrt4404 { + for ; yyj4404 < yyl4404; yyj4404++ { + yyv4404 = append(yyv4404, ContainerPort{}) + yyh4404.ElemContainerState(yyj4404) if r.TryDecodeAsNil() { - yyv4395[yyj4395] = ContainerPort{} + yyv4404[yyj4404] = ContainerPort{} } else { - yyv4397 := &yyv4395[yyj4395] - yyv4397.CodecDecodeSelf(d) + yyv4406 := &yyv4404[yyj4404] + yyv4406.CodecDecodeSelf(d) } } } } else { - yyj4395 := 0 - for ; !r.CheckBreak(); yyj4395++ { + yyj4404 := 0 + for ; !r.CheckBreak(); yyj4404++ { - if yyj4395 >= len(yyv4395) { - yyv4395 = append(yyv4395, ContainerPort{}) // var yyz4395 ContainerPort - yyc4395 = true + if yyj4404 >= len(yyv4404) { + yyv4404 = append(yyv4404, ContainerPort{}) // var yyz4404 ContainerPort + yyc4404 = true } - yyh4395.ElemContainerState(yyj4395) - if yyj4395 < len(yyv4395) { + yyh4404.ElemContainerState(yyj4404) + if yyj4404 < len(yyv4404) { if r.TryDecodeAsNil() { - yyv4395[yyj4395] = ContainerPort{} + yyv4404[yyj4404] = ContainerPort{} } else { - yyv4398 := &yyv4395[yyj4395] - yyv4398.CodecDecodeSelf(d) + yyv4407 := &yyv4404[yyj4404] + yyv4407.CodecDecodeSelf(d) } } else { @@ -55198,17 +55276,17 @@ func (x codecSelfer1234) decSliceContainerPort(v *[]ContainerPort, d *codec1978. } } - if yyj4395 < len(yyv4395) { - yyv4395 = yyv4395[:yyj4395] - yyc4395 = true - } else if yyj4395 == 0 && yyv4395 == nil { - yyv4395 = []ContainerPort{} - yyc4395 = true + if yyj4404 < len(yyv4404) { + yyv4404 = yyv4404[:yyj4404] + yyc4404 = true + } else if yyj4404 == 0 && yyv4404 == nil { + yyv4404 = []ContainerPort{} + yyc4404 = true } } - yyh4395.End() - if yyc4395 { - *v = yyv4395 + yyh4404.End() + if yyc4404 { + *v = yyv4404 } } @@ -55217,10 +55295,10 @@ func (x codecSelfer1234) encSliceEnvVar(v []EnvVar, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4399 := range v { + for _, yyv4408 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4400 := &yyv4399 - yy4400.CodecEncodeSelf(e) + yy4409 := &yyv4408 + yy4409.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -55230,83 +55308,83 @@ func (x codecSelfer1234) decSliceEnvVar(v *[]EnvVar, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4401 := *v - yyh4401, yyl4401 := z.DecSliceHelperStart() - var yyc4401 bool - if yyl4401 == 0 { - if yyv4401 == nil { - yyv4401 = []EnvVar{} - yyc4401 = true - } else if len(yyv4401) != 0 { - yyv4401 = yyv4401[:0] - yyc4401 = true + yyv4410 := *v + yyh4410, yyl4410 := z.DecSliceHelperStart() + var yyc4410 bool + if yyl4410 == 0 { + if yyv4410 == nil { + yyv4410 = []EnvVar{} + yyc4410 = true + } else if len(yyv4410) != 0 { + yyv4410 = yyv4410[:0] + yyc4410 = true } - } else if yyl4401 > 0 { - var yyrr4401, yyrl4401 int - var yyrt4401 bool - if yyl4401 > cap(yyv4401) { + } else if yyl4410 > 0 { + var yyrr4410, yyrl4410 int + var yyrt4410 bool + if yyl4410 > cap(yyv4410) { - yyrg4401 := len(yyv4401) > 0 - yyv24401 := yyv4401 - yyrl4401, yyrt4401 = z.DecInferLen(yyl4401, z.DecBasicHandle().MaxInitLen, 40) - if yyrt4401 { - if yyrl4401 <= cap(yyv4401) { - yyv4401 = yyv4401[:yyrl4401] + yyrg4410 := len(yyv4410) > 0 + yyv24410 := yyv4410 + yyrl4410, yyrt4410 = z.DecInferLen(yyl4410, z.DecBasicHandle().MaxInitLen, 40) + if yyrt4410 { + if yyrl4410 <= cap(yyv4410) { + yyv4410 = yyv4410[:yyrl4410] } else { - yyv4401 = make([]EnvVar, yyrl4401) + yyv4410 = make([]EnvVar, yyrl4410) } } else { - yyv4401 = make([]EnvVar, yyrl4401) + yyv4410 = make([]EnvVar, yyrl4410) } - yyc4401 = true - yyrr4401 = len(yyv4401) - if yyrg4401 { - copy(yyv4401, yyv24401) + yyc4410 = true + yyrr4410 = len(yyv4410) + if yyrg4410 { + copy(yyv4410, yyv24410) } - } else if yyl4401 != len(yyv4401) { - yyv4401 = yyv4401[:yyl4401] - yyc4401 = true + } else if yyl4410 != len(yyv4410) { + yyv4410 = yyv4410[:yyl4410] + yyc4410 = true } - yyj4401 := 0 - for ; yyj4401 < yyrr4401; yyj4401++ { - yyh4401.ElemContainerState(yyj4401) + yyj4410 := 0 + for ; yyj4410 < yyrr4410; yyj4410++ { + yyh4410.ElemContainerState(yyj4410) if r.TryDecodeAsNil() { - yyv4401[yyj4401] = EnvVar{} + yyv4410[yyj4410] = EnvVar{} } else { - yyv4402 := &yyv4401[yyj4401] - yyv4402.CodecDecodeSelf(d) + yyv4411 := &yyv4410[yyj4410] + yyv4411.CodecDecodeSelf(d) } } - if yyrt4401 { - for ; yyj4401 < yyl4401; yyj4401++ { - yyv4401 = append(yyv4401, EnvVar{}) - yyh4401.ElemContainerState(yyj4401) + if yyrt4410 { + for ; yyj4410 < yyl4410; yyj4410++ { + yyv4410 = append(yyv4410, EnvVar{}) + yyh4410.ElemContainerState(yyj4410) if r.TryDecodeAsNil() { - yyv4401[yyj4401] = EnvVar{} + yyv4410[yyj4410] = EnvVar{} } else { - yyv4403 := &yyv4401[yyj4401] - yyv4403.CodecDecodeSelf(d) + yyv4412 := &yyv4410[yyj4410] + yyv4412.CodecDecodeSelf(d) } } } } else { - yyj4401 := 0 - for ; !r.CheckBreak(); yyj4401++ { + yyj4410 := 0 + for ; !r.CheckBreak(); yyj4410++ { - if yyj4401 >= len(yyv4401) { - yyv4401 = append(yyv4401, EnvVar{}) // var yyz4401 EnvVar - yyc4401 = true + if yyj4410 >= len(yyv4410) { + yyv4410 = append(yyv4410, EnvVar{}) // var yyz4410 EnvVar + yyc4410 = true } - yyh4401.ElemContainerState(yyj4401) - if yyj4401 < len(yyv4401) { + yyh4410.ElemContainerState(yyj4410) + if yyj4410 < len(yyv4410) { if r.TryDecodeAsNil() { - yyv4401[yyj4401] = EnvVar{} + yyv4410[yyj4410] = EnvVar{} } else { - yyv4404 := &yyv4401[yyj4401] - yyv4404.CodecDecodeSelf(d) + yyv4413 := &yyv4410[yyj4410] + yyv4413.CodecDecodeSelf(d) } } else { @@ -55314,17 +55392,17 @@ func (x codecSelfer1234) decSliceEnvVar(v *[]EnvVar, d *codec1978.Decoder) { } } - if yyj4401 < len(yyv4401) { - yyv4401 = yyv4401[:yyj4401] - yyc4401 = true - } else if yyj4401 == 0 && yyv4401 == nil { - yyv4401 = []EnvVar{} - yyc4401 = true + if yyj4410 < len(yyv4410) { + yyv4410 = yyv4410[:yyj4410] + yyc4410 = true + } else if yyj4410 == 0 && yyv4410 == nil { + yyv4410 = []EnvVar{} + yyc4410 = true } } - yyh4401.End() - if yyc4401 { - *v = yyv4401 + yyh4410.End() + if yyc4410 { + *v = yyv4410 } } @@ -55333,10 +55411,10 @@ func (x codecSelfer1234) encSliceVolumeMount(v []VolumeMount, e *codec1978.Encod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4405 := range v { + for _, yyv4414 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4406 := &yyv4405 - yy4406.CodecEncodeSelf(e) + yy4415 := &yyv4414 + yy4415.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -55346,83 +55424,83 @@ func (x codecSelfer1234) decSliceVolumeMount(v *[]VolumeMount, d *codec1978.Deco z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4407 := *v - yyh4407, yyl4407 := z.DecSliceHelperStart() - var yyc4407 bool - if yyl4407 == 0 { - if yyv4407 == nil { - yyv4407 = []VolumeMount{} - yyc4407 = true - } else if len(yyv4407) != 0 { - yyv4407 = yyv4407[:0] - yyc4407 = true + yyv4416 := *v + yyh4416, yyl4416 := z.DecSliceHelperStart() + var yyc4416 bool + if yyl4416 == 0 { + if yyv4416 == nil { + yyv4416 = []VolumeMount{} + yyc4416 = true + } else if len(yyv4416) != 0 { + yyv4416 = yyv4416[:0] + yyc4416 = true } - } else if yyl4407 > 0 { - var yyrr4407, yyrl4407 int - var yyrt4407 bool - if yyl4407 > cap(yyv4407) { + } else if yyl4416 > 0 { + var yyrr4416, yyrl4416 int + var yyrt4416 bool + if yyl4416 > cap(yyv4416) { - yyrg4407 := len(yyv4407) > 0 - yyv24407 := yyv4407 - yyrl4407, yyrt4407 = z.DecInferLen(yyl4407, z.DecBasicHandle().MaxInitLen, 56) - if yyrt4407 { - if yyrl4407 <= cap(yyv4407) { - yyv4407 = yyv4407[:yyrl4407] + yyrg4416 := len(yyv4416) > 0 + yyv24416 := yyv4416 + yyrl4416, yyrt4416 = z.DecInferLen(yyl4416, z.DecBasicHandle().MaxInitLen, 56) + if yyrt4416 { + if yyrl4416 <= cap(yyv4416) { + yyv4416 = yyv4416[:yyrl4416] } else { - yyv4407 = make([]VolumeMount, yyrl4407) + yyv4416 = make([]VolumeMount, yyrl4416) } } else { - yyv4407 = make([]VolumeMount, yyrl4407) + yyv4416 = make([]VolumeMount, yyrl4416) } - yyc4407 = true - yyrr4407 = len(yyv4407) - if yyrg4407 { - copy(yyv4407, yyv24407) + yyc4416 = true + yyrr4416 = len(yyv4416) + if yyrg4416 { + copy(yyv4416, yyv24416) } - } else if yyl4407 != len(yyv4407) { - yyv4407 = yyv4407[:yyl4407] - yyc4407 = true + } else if yyl4416 != len(yyv4416) { + yyv4416 = yyv4416[:yyl4416] + yyc4416 = true } - yyj4407 := 0 - for ; yyj4407 < yyrr4407; yyj4407++ { - yyh4407.ElemContainerState(yyj4407) + yyj4416 := 0 + for ; yyj4416 < yyrr4416; yyj4416++ { + yyh4416.ElemContainerState(yyj4416) if r.TryDecodeAsNil() { - yyv4407[yyj4407] = VolumeMount{} + yyv4416[yyj4416] = VolumeMount{} } else { - yyv4408 := &yyv4407[yyj4407] - yyv4408.CodecDecodeSelf(d) + yyv4417 := &yyv4416[yyj4416] + yyv4417.CodecDecodeSelf(d) } } - if yyrt4407 { - for ; yyj4407 < yyl4407; yyj4407++ { - yyv4407 = append(yyv4407, VolumeMount{}) - yyh4407.ElemContainerState(yyj4407) + if yyrt4416 { + for ; yyj4416 < yyl4416; yyj4416++ { + yyv4416 = append(yyv4416, VolumeMount{}) + yyh4416.ElemContainerState(yyj4416) if r.TryDecodeAsNil() { - yyv4407[yyj4407] = VolumeMount{} + yyv4416[yyj4416] = VolumeMount{} } else { - yyv4409 := &yyv4407[yyj4407] - yyv4409.CodecDecodeSelf(d) + yyv4418 := &yyv4416[yyj4416] + yyv4418.CodecDecodeSelf(d) } } } } else { - yyj4407 := 0 - for ; !r.CheckBreak(); yyj4407++ { + yyj4416 := 0 + for ; !r.CheckBreak(); yyj4416++ { - if yyj4407 >= len(yyv4407) { - yyv4407 = append(yyv4407, VolumeMount{}) // var yyz4407 VolumeMount - yyc4407 = true + if yyj4416 >= len(yyv4416) { + yyv4416 = append(yyv4416, VolumeMount{}) // var yyz4416 VolumeMount + yyc4416 = true } - yyh4407.ElemContainerState(yyj4407) - if yyj4407 < len(yyv4407) { + yyh4416.ElemContainerState(yyj4416) + if yyj4416 < len(yyv4416) { if r.TryDecodeAsNil() { - yyv4407[yyj4407] = VolumeMount{} + yyv4416[yyj4416] = VolumeMount{} } else { - yyv4410 := &yyv4407[yyj4407] - yyv4410.CodecDecodeSelf(d) + yyv4419 := &yyv4416[yyj4416] + yyv4419.CodecDecodeSelf(d) } } else { @@ -55430,17 +55508,17 @@ func (x codecSelfer1234) decSliceVolumeMount(v *[]VolumeMount, d *codec1978.Deco } } - if yyj4407 < len(yyv4407) { - yyv4407 = yyv4407[:yyj4407] - yyc4407 = true - } else if yyj4407 == 0 && yyv4407 == nil { - yyv4407 = []VolumeMount{} - yyc4407 = true + if yyj4416 < len(yyv4416) { + yyv4416 = yyv4416[:yyj4416] + yyc4416 = true + } else if yyj4416 == 0 && yyv4416 == nil { + yyv4416 = []VolumeMount{} + yyc4416 = true } } - yyh4407.End() - if yyc4407 { - *v = yyv4407 + yyh4416.End() + if yyc4416 { + *v = yyv4416 } } @@ -55449,10 +55527,10 @@ func (x codecSelfer1234) encSliceNodeSelectorTerm(v []NodeSelectorTerm, e *codec z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4411 := range v { + for _, yyv4420 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4412 := &yyv4411 - yy4412.CodecEncodeSelf(e) + yy4421 := &yyv4420 + yy4421.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -55462,83 +55540,83 @@ func (x codecSelfer1234) decSliceNodeSelectorTerm(v *[]NodeSelectorTerm, d *code z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4413 := *v - yyh4413, yyl4413 := z.DecSliceHelperStart() - var yyc4413 bool - if yyl4413 == 0 { - if yyv4413 == nil { - yyv4413 = []NodeSelectorTerm{} - yyc4413 = true - } else if len(yyv4413) != 0 { - yyv4413 = yyv4413[:0] - yyc4413 = true + yyv4422 := *v + yyh4422, yyl4422 := z.DecSliceHelperStart() + var yyc4422 bool + if yyl4422 == 0 { + if yyv4422 == nil { + yyv4422 = []NodeSelectorTerm{} + yyc4422 = true + } else if len(yyv4422) != 0 { + yyv4422 = yyv4422[:0] + yyc4422 = true } - } else if yyl4413 > 0 { - var yyrr4413, yyrl4413 int - var yyrt4413 bool - if yyl4413 > cap(yyv4413) { + } else if yyl4422 > 0 { + var yyrr4422, yyrl4422 int + var yyrt4422 bool + if yyl4422 > cap(yyv4422) { - yyrg4413 := len(yyv4413) > 0 - yyv24413 := yyv4413 - yyrl4413, yyrt4413 = z.DecInferLen(yyl4413, z.DecBasicHandle().MaxInitLen, 24) - if yyrt4413 { - if yyrl4413 <= cap(yyv4413) { - yyv4413 = yyv4413[:yyrl4413] + yyrg4422 := len(yyv4422) > 0 + yyv24422 := yyv4422 + yyrl4422, yyrt4422 = z.DecInferLen(yyl4422, z.DecBasicHandle().MaxInitLen, 24) + if yyrt4422 { + if yyrl4422 <= cap(yyv4422) { + yyv4422 = yyv4422[:yyrl4422] } else { - yyv4413 = make([]NodeSelectorTerm, yyrl4413) + yyv4422 = make([]NodeSelectorTerm, yyrl4422) } } else { - yyv4413 = make([]NodeSelectorTerm, yyrl4413) + yyv4422 = make([]NodeSelectorTerm, yyrl4422) } - yyc4413 = true - yyrr4413 = len(yyv4413) - if yyrg4413 { - copy(yyv4413, yyv24413) + yyc4422 = true + yyrr4422 = len(yyv4422) + if yyrg4422 { + copy(yyv4422, yyv24422) } - } else if yyl4413 != len(yyv4413) { - yyv4413 = yyv4413[:yyl4413] - yyc4413 = true + } else if yyl4422 != len(yyv4422) { + yyv4422 = yyv4422[:yyl4422] + yyc4422 = true } - yyj4413 := 0 - for ; yyj4413 < yyrr4413; yyj4413++ { - yyh4413.ElemContainerState(yyj4413) + yyj4422 := 0 + for ; yyj4422 < yyrr4422; yyj4422++ { + yyh4422.ElemContainerState(yyj4422) if r.TryDecodeAsNil() { - yyv4413[yyj4413] = NodeSelectorTerm{} + yyv4422[yyj4422] = NodeSelectorTerm{} } else { - yyv4414 := &yyv4413[yyj4413] - yyv4414.CodecDecodeSelf(d) + yyv4423 := &yyv4422[yyj4422] + yyv4423.CodecDecodeSelf(d) } } - if yyrt4413 { - for ; yyj4413 < yyl4413; yyj4413++ { - yyv4413 = append(yyv4413, NodeSelectorTerm{}) - yyh4413.ElemContainerState(yyj4413) + if yyrt4422 { + for ; yyj4422 < yyl4422; yyj4422++ { + yyv4422 = append(yyv4422, NodeSelectorTerm{}) + yyh4422.ElemContainerState(yyj4422) if r.TryDecodeAsNil() { - yyv4413[yyj4413] = NodeSelectorTerm{} + yyv4422[yyj4422] = NodeSelectorTerm{} } else { - yyv4415 := &yyv4413[yyj4413] - yyv4415.CodecDecodeSelf(d) + yyv4424 := &yyv4422[yyj4422] + yyv4424.CodecDecodeSelf(d) } } } } else { - yyj4413 := 0 - for ; !r.CheckBreak(); yyj4413++ { + yyj4422 := 0 + for ; !r.CheckBreak(); yyj4422++ { - if yyj4413 >= len(yyv4413) { - yyv4413 = append(yyv4413, NodeSelectorTerm{}) // var yyz4413 NodeSelectorTerm - yyc4413 = true + if yyj4422 >= len(yyv4422) { + yyv4422 = append(yyv4422, NodeSelectorTerm{}) // var yyz4422 NodeSelectorTerm + yyc4422 = true } - yyh4413.ElemContainerState(yyj4413) - if yyj4413 < len(yyv4413) { + yyh4422.ElemContainerState(yyj4422) + if yyj4422 < len(yyv4422) { if r.TryDecodeAsNil() { - yyv4413[yyj4413] = NodeSelectorTerm{} + yyv4422[yyj4422] = NodeSelectorTerm{} } else { - yyv4416 := &yyv4413[yyj4413] - yyv4416.CodecDecodeSelf(d) + yyv4425 := &yyv4422[yyj4422] + yyv4425.CodecDecodeSelf(d) } } else { @@ -55546,17 +55624,17 @@ func (x codecSelfer1234) decSliceNodeSelectorTerm(v *[]NodeSelectorTerm, d *code } } - if yyj4413 < len(yyv4413) { - yyv4413 = yyv4413[:yyj4413] - yyc4413 = true - } else if yyj4413 == 0 && yyv4413 == nil { - yyv4413 = []NodeSelectorTerm{} - yyc4413 = true + if yyj4422 < len(yyv4422) { + yyv4422 = yyv4422[:yyj4422] + yyc4422 = true + } else if yyj4422 == 0 && yyv4422 == nil { + yyv4422 = []NodeSelectorTerm{} + yyc4422 = true } } - yyh4413.End() - if yyc4413 { - *v = yyv4413 + yyh4422.End() + if yyc4422 { + *v = yyv4422 } } @@ -55565,10 +55643,10 @@ func (x codecSelfer1234) encSliceNodeSelectorRequirement(v []NodeSelectorRequire z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4417 := range v { + for _, yyv4426 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4418 := &yyv4417 - yy4418.CodecEncodeSelf(e) + yy4427 := &yyv4426 + yy4427.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -55578,83 +55656,83 @@ func (x codecSelfer1234) decSliceNodeSelectorRequirement(v *[]NodeSelectorRequir z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4419 := *v - yyh4419, yyl4419 := z.DecSliceHelperStart() - var yyc4419 bool - if yyl4419 == 0 { - if yyv4419 == nil { - yyv4419 = []NodeSelectorRequirement{} - yyc4419 = true - } else if len(yyv4419) != 0 { - yyv4419 = yyv4419[:0] - yyc4419 = true + yyv4428 := *v + yyh4428, yyl4428 := z.DecSliceHelperStart() + var yyc4428 bool + if yyl4428 == 0 { + if yyv4428 == nil { + yyv4428 = []NodeSelectorRequirement{} + yyc4428 = true + } else if len(yyv4428) != 0 { + yyv4428 = yyv4428[:0] + yyc4428 = true } - } else if yyl4419 > 0 { - var yyrr4419, yyrl4419 int - var yyrt4419 bool - if yyl4419 > cap(yyv4419) { + } else if yyl4428 > 0 { + var yyrr4428, yyrl4428 int + var yyrt4428 bool + if yyl4428 > cap(yyv4428) { - yyrg4419 := len(yyv4419) > 0 - yyv24419 := yyv4419 - yyrl4419, yyrt4419 = z.DecInferLen(yyl4419, z.DecBasicHandle().MaxInitLen, 56) - if yyrt4419 { - if yyrl4419 <= cap(yyv4419) { - yyv4419 = yyv4419[:yyrl4419] + yyrg4428 := len(yyv4428) > 0 + yyv24428 := yyv4428 + yyrl4428, yyrt4428 = z.DecInferLen(yyl4428, z.DecBasicHandle().MaxInitLen, 56) + if yyrt4428 { + if yyrl4428 <= cap(yyv4428) { + yyv4428 = yyv4428[:yyrl4428] } else { - yyv4419 = make([]NodeSelectorRequirement, yyrl4419) + yyv4428 = make([]NodeSelectorRequirement, yyrl4428) } } else { - yyv4419 = make([]NodeSelectorRequirement, yyrl4419) + yyv4428 = make([]NodeSelectorRequirement, yyrl4428) } - yyc4419 = true - yyrr4419 = len(yyv4419) - if yyrg4419 { - copy(yyv4419, yyv24419) + yyc4428 = true + yyrr4428 = len(yyv4428) + if yyrg4428 { + copy(yyv4428, yyv24428) } - } else if yyl4419 != len(yyv4419) { - yyv4419 = yyv4419[:yyl4419] - yyc4419 = true + } else if yyl4428 != len(yyv4428) { + yyv4428 = yyv4428[:yyl4428] + yyc4428 = true } - yyj4419 := 0 - for ; yyj4419 < yyrr4419; yyj4419++ { - yyh4419.ElemContainerState(yyj4419) + yyj4428 := 0 + for ; yyj4428 < yyrr4428; yyj4428++ { + yyh4428.ElemContainerState(yyj4428) if r.TryDecodeAsNil() { - yyv4419[yyj4419] = NodeSelectorRequirement{} + yyv4428[yyj4428] = NodeSelectorRequirement{} } else { - yyv4420 := &yyv4419[yyj4419] - yyv4420.CodecDecodeSelf(d) + yyv4429 := &yyv4428[yyj4428] + yyv4429.CodecDecodeSelf(d) } } - if yyrt4419 { - for ; yyj4419 < yyl4419; yyj4419++ { - yyv4419 = append(yyv4419, NodeSelectorRequirement{}) - yyh4419.ElemContainerState(yyj4419) + if yyrt4428 { + for ; yyj4428 < yyl4428; yyj4428++ { + yyv4428 = append(yyv4428, NodeSelectorRequirement{}) + yyh4428.ElemContainerState(yyj4428) if r.TryDecodeAsNil() { - yyv4419[yyj4419] = NodeSelectorRequirement{} + yyv4428[yyj4428] = NodeSelectorRequirement{} } else { - yyv4421 := &yyv4419[yyj4419] - yyv4421.CodecDecodeSelf(d) + yyv4430 := &yyv4428[yyj4428] + yyv4430.CodecDecodeSelf(d) } } } } else { - yyj4419 := 0 - for ; !r.CheckBreak(); yyj4419++ { + yyj4428 := 0 + for ; !r.CheckBreak(); yyj4428++ { - if yyj4419 >= len(yyv4419) { - yyv4419 = append(yyv4419, NodeSelectorRequirement{}) // var yyz4419 NodeSelectorRequirement - yyc4419 = true + if yyj4428 >= len(yyv4428) { + yyv4428 = append(yyv4428, NodeSelectorRequirement{}) // var yyz4428 NodeSelectorRequirement + yyc4428 = true } - yyh4419.ElemContainerState(yyj4419) - if yyj4419 < len(yyv4419) { + yyh4428.ElemContainerState(yyj4428) + if yyj4428 < len(yyv4428) { if r.TryDecodeAsNil() { - yyv4419[yyj4419] = NodeSelectorRequirement{} + yyv4428[yyj4428] = NodeSelectorRequirement{} } else { - yyv4422 := &yyv4419[yyj4419] - yyv4422.CodecDecodeSelf(d) + yyv4431 := &yyv4428[yyj4428] + yyv4431.CodecDecodeSelf(d) } } else { @@ -55662,17 +55740,17 @@ func (x codecSelfer1234) decSliceNodeSelectorRequirement(v *[]NodeSelectorRequir } } - if yyj4419 < len(yyv4419) { - yyv4419 = yyv4419[:yyj4419] - yyc4419 = true - } else if yyj4419 == 0 && yyv4419 == nil { - yyv4419 = []NodeSelectorRequirement{} - yyc4419 = true + if yyj4428 < len(yyv4428) { + yyv4428 = yyv4428[:yyj4428] + yyc4428 = true + } else if yyj4428 == 0 && yyv4428 == nil { + yyv4428 = []NodeSelectorRequirement{} + yyc4428 = true } } - yyh4419.End() - if yyc4419 { - *v = yyv4419 + yyh4428.End() + if yyc4428 { + *v = yyv4428 } } @@ -55681,10 +55759,10 @@ func (x codecSelfer1234) encSlicePodAffinityTerm(v []PodAffinityTerm, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4423 := range v { + for _, yyv4432 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4424 := &yyv4423 - yy4424.CodecEncodeSelf(e) + yy4433 := &yyv4432 + yy4433.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -55694,83 +55772,83 @@ func (x codecSelfer1234) decSlicePodAffinityTerm(v *[]PodAffinityTerm, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4425 := *v - yyh4425, yyl4425 := z.DecSliceHelperStart() - var yyc4425 bool - if yyl4425 == 0 { - if yyv4425 == nil { - yyv4425 = []PodAffinityTerm{} - yyc4425 = true - } else if len(yyv4425) != 0 { - yyv4425 = yyv4425[:0] - yyc4425 = true + yyv4434 := *v + yyh4434, yyl4434 := z.DecSliceHelperStart() + var yyc4434 bool + if yyl4434 == 0 { + if yyv4434 == nil { + yyv4434 = []PodAffinityTerm{} + yyc4434 = true + } else if len(yyv4434) != 0 { + yyv4434 = yyv4434[:0] + yyc4434 = true } - } else if yyl4425 > 0 { - var yyrr4425, yyrl4425 int - var yyrt4425 bool - if yyl4425 > cap(yyv4425) { + } else if yyl4434 > 0 { + var yyrr4434, yyrl4434 int + var yyrt4434 bool + if yyl4434 > cap(yyv4434) { - yyrg4425 := len(yyv4425) > 0 - yyv24425 := yyv4425 - yyrl4425, yyrt4425 = z.DecInferLen(yyl4425, z.DecBasicHandle().MaxInitLen, 48) - if yyrt4425 { - if yyrl4425 <= cap(yyv4425) { - yyv4425 = yyv4425[:yyrl4425] + yyrg4434 := len(yyv4434) > 0 + yyv24434 := yyv4434 + yyrl4434, yyrt4434 = z.DecInferLen(yyl4434, z.DecBasicHandle().MaxInitLen, 48) + if yyrt4434 { + if yyrl4434 <= cap(yyv4434) { + yyv4434 = yyv4434[:yyrl4434] } else { - yyv4425 = make([]PodAffinityTerm, yyrl4425) + yyv4434 = make([]PodAffinityTerm, yyrl4434) } } else { - yyv4425 = make([]PodAffinityTerm, yyrl4425) + yyv4434 = make([]PodAffinityTerm, yyrl4434) } - yyc4425 = true - yyrr4425 = len(yyv4425) - if yyrg4425 { - copy(yyv4425, yyv24425) + yyc4434 = true + yyrr4434 = len(yyv4434) + if yyrg4434 { + copy(yyv4434, yyv24434) } - } else if yyl4425 != len(yyv4425) { - yyv4425 = yyv4425[:yyl4425] - yyc4425 = true + } else if yyl4434 != len(yyv4434) { + yyv4434 = yyv4434[:yyl4434] + yyc4434 = true } - yyj4425 := 0 - for ; yyj4425 < yyrr4425; yyj4425++ { - yyh4425.ElemContainerState(yyj4425) + yyj4434 := 0 + for ; yyj4434 < yyrr4434; yyj4434++ { + yyh4434.ElemContainerState(yyj4434) if r.TryDecodeAsNil() { - yyv4425[yyj4425] = PodAffinityTerm{} + yyv4434[yyj4434] = PodAffinityTerm{} } else { - yyv4426 := &yyv4425[yyj4425] - yyv4426.CodecDecodeSelf(d) + yyv4435 := &yyv4434[yyj4434] + yyv4435.CodecDecodeSelf(d) } } - if yyrt4425 { - for ; yyj4425 < yyl4425; yyj4425++ { - yyv4425 = append(yyv4425, PodAffinityTerm{}) - yyh4425.ElemContainerState(yyj4425) + if yyrt4434 { + for ; yyj4434 < yyl4434; yyj4434++ { + yyv4434 = append(yyv4434, PodAffinityTerm{}) + yyh4434.ElemContainerState(yyj4434) if r.TryDecodeAsNil() { - yyv4425[yyj4425] = PodAffinityTerm{} + yyv4434[yyj4434] = PodAffinityTerm{} } else { - yyv4427 := &yyv4425[yyj4425] - yyv4427.CodecDecodeSelf(d) + yyv4436 := &yyv4434[yyj4434] + yyv4436.CodecDecodeSelf(d) } } } } else { - yyj4425 := 0 - for ; !r.CheckBreak(); yyj4425++ { + yyj4434 := 0 + for ; !r.CheckBreak(); yyj4434++ { - if yyj4425 >= len(yyv4425) { - yyv4425 = append(yyv4425, PodAffinityTerm{}) // var yyz4425 PodAffinityTerm - yyc4425 = true + if yyj4434 >= len(yyv4434) { + yyv4434 = append(yyv4434, PodAffinityTerm{}) // var yyz4434 PodAffinityTerm + yyc4434 = true } - yyh4425.ElemContainerState(yyj4425) - if yyj4425 < len(yyv4425) { + yyh4434.ElemContainerState(yyj4434) + if yyj4434 < len(yyv4434) { if r.TryDecodeAsNil() { - yyv4425[yyj4425] = PodAffinityTerm{} + yyv4434[yyj4434] = PodAffinityTerm{} } else { - yyv4428 := &yyv4425[yyj4425] - yyv4428.CodecDecodeSelf(d) + yyv4437 := &yyv4434[yyj4434] + yyv4437.CodecDecodeSelf(d) } } else { @@ -55778,17 +55856,17 @@ func (x codecSelfer1234) decSlicePodAffinityTerm(v *[]PodAffinityTerm, d *codec1 } } - if yyj4425 < len(yyv4425) { - yyv4425 = yyv4425[:yyj4425] - yyc4425 = true - } else if yyj4425 == 0 && yyv4425 == nil { - yyv4425 = []PodAffinityTerm{} - yyc4425 = true + if yyj4434 < len(yyv4434) { + yyv4434 = yyv4434[:yyj4434] + yyc4434 = true + } else if yyj4434 == 0 && yyv4434 == nil { + yyv4434 = []PodAffinityTerm{} + yyc4434 = true } } - yyh4425.End() - if yyc4425 { - *v = yyv4425 + yyh4434.End() + if yyc4434 { + *v = yyv4434 } } @@ -55797,10 +55875,10 @@ func (x codecSelfer1234) encSliceWeightedPodAffinityTerm(v []WeightedPodAffinity z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4429 := range v { + for _, yyv4438 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4430 := &yyv4429 - yy4430.CodecEncodeSelf(e) + yy4439 := &yyv4438 + yy4439.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -55810,83 +55888,83 @@ func (x codecSelfer1234) decSliceWeightedPodAffinityTerm(v *[]WeightedPodAffinit z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4431 := *v - yyh4431, yyl4431 := z.DecSliceHelperStart() - var yyc4431 bool - if yyl4431 == 0 { - if yyv4431 == nil { - yyv4431 = []WeightedPodAffinityTerm{} - yyc4431 = true - } else if len(yyv4431) != 0 { - yyv4431 = yyv4431[:0] - yyc4431 = true + yyv4440 := *v + yyh4440, yyl4440 := z.DecSliceHelperStart() + var yyc4440 bool + if yyl4440 == 0 { + if yyv4440 == nil { + yyv4440 = []WeightedPodAffinityTerm{} + yyc4440 = true + } else if len(yyv4440) != 0 { + yyv4440 = yyv4440[:0] + yyc4440 = true } - } else if yyl4431 > 0 { - var yyrr4431, yyrl4431 int - var yyrt4431 bool - if yyl4431 > cap(yyv4431) { + } else if yyl4440 > 0 { + var yyrr4440, yyrl4440 int + var yyrt4440 bool + if yyl4440 > cap(yyv4440) { - yyrg4431 := len(yyv4431) > 0 - yyv24431 := yyv4431 - yyrl4431, yyrt4431 = z.DecInferLen(yyl4431, z.DecBasicHandle().MaxInitLen, 56) - if yyrt4431 { - if yyrl4431 <= cap(yyv4431) { - yyv4431 = yyv4431[:yyrl4431] + yyrg4440 := len(yyv4440) > 0 + yyv24440 := yyv4440 + yyrl4440, yyrt4440 = z.DecInferLen(yyl4440, z.DecBasicHandle().MaxInitLen, 56) + if yyrt4440 { + if yyrl4440 <= cap(yyv4440) { + yyv4440 = yyv4440[:yyrl4440] } else { - yyv4431 = make([]WeightedPodAffinityTerm, yyrl4431) + yyv4440 = make([]WeightedPodAffinityTerm, yyrl4440) } } else { - yyv4431 = make([]WeightedPodAffinityTerm, yyrl4431) + yyv4440 = make([]WeightedPodAffinityTerm, yyrl4440) } - yyc4431 = true - yyrr4431 = len(yyv4431) - if yyrg4431 { - copy(yyv4431, yyv24431) + yyc4440 = true + yyrr4440 = len(yyv4440) + if yyrg4440 { + copy(yyv4440, yyv24440) } - } else if yyl4431 != len(yyv4431) { - yyv4431 = yyv4431[:yyl4431] - yyc4431 = true + } else if yyl4440 != len(yyv4440) { + yyv4440 = yyv4440[:yyl4440] + yyc4440 = true } - yyj4431 := 0 - for ; yyj4431 < yyrr4431; yyj4431++ { - yyh4431.ElemContainerState(yyj4431) + yyj4440 := 0 + for ; yyj4440 < yyrr4440; yyj4440++ { + yyh4440.ElemContainerState(yyj4440) if r.TryDecodeAsNil() { - yyv4431[yyj4431] = WeightedPodAffinityTerm{} + yyv4440[yyj4440] = WeightedPodAffinityTerm{} } else { - yyv4432 := &yyv4431[yyj4431] - yyv4432.CodecDecodeSelf(d) + yyv4441 := &yyv4440[yyj4440] + yyv4441.CodecDecodeSelf(d) } } - if yyrt4431 { - for ; yyj4431 < yyl4431; yyj4431++ { - yyv4431 = append(yyv4431, WeightedPodAffinityTerm{}) - yyh4431.ElemContainerState(yyj4431) + if yyrt4440 { + for ; yyj4440 < yyl4440; yyj4440++ { + yyv4440 = append(yyv4440, WeightedPodAffinityTerm{}) + yyh4440.ElemContainerState(yyj4440) if r.TryDecodeAsNil() { - yyv4431[yyj4431] = WeightedPodAffinityTerm{} + yyv4440[yyj4440] = WeightedPodAffinityTerm{} } else { - yyv4433 := &yyv4431[yyj4431] - yyv4433.CodecDecodeSelf(d) + yyv4442 := &yyv4440[yyj4440] + yyv4442.CodecDecodeSelf(d) } } } } else { - yyj4431 := 0 - for ; !r.CheckBreak(); yyj4431++ { + yyj4440 := 0 + for ; !r.CheckBreak(); yyj4440++ { - if yyj4431 >= len(yyv4431) { - yyv4431 = append(yyv4431, WeightedPodAffinityTerm{}) // var yyz4431 WeightedPodAffinityTerm - yyc4431 = true + if yyj4440 >= len(yyv4440) { + yyv4440 = append(yyv4440, WeightedPodAffinityTerm{}) // var yyz4440 WeightedPodAffinityTerm + yyc4440 = true } - yyh4431.ElemContainerState(yyj4431) - if yyj4431 < len(yyv4431) { + yyh4440.ElemContainerState(yyj4440) + if yyj4440 < len(yyv4440) { if r.TryDecodeAsNil() { - yyv4431[yyj4431] = WeightedPodAffinityTerm{} + yyv4440[yyj4440] = WeightedPodAffinityTerm{} } else { - yyv4434 := &yyv4431[yyj4431] - yyv4434.CodecDecodeSelf(d) + yyv4443 := &yyv4440[yyj4440] + yyv4443.CodecDecodeSelf(d) } } else { @@ -55894,17 +55972,17 @@ func (x codecSelfer1234) decSliceWeightedPodAffinityTerm(v *[]WeightedPodAffinit } } - if yyj4431 < len(yyv4431) { - yyv4431 = yyv4431[:yyj4431] - yyc4431 = true - } else if yyj4431 == 0 && yyv4431 == nil { - yyv4431 = []WeightedPodAffinityTerm{} - yyc4431 = true + if yyj4440 < len(yyv4440) { + yyv4440 = yyv4440[:yyj4440] + yyc4440 = true + } else if yyj4440 == 0 && yyv4440 == nil { + yyv4440 = []WeightedPodAffinityTerm{} + yyc4440 = true } } - yyh4431.End() - if yyc4431 { - *v = yyv4431 + yyh4440.End() + if yyc4440 { + *v = yyv4440 } } @@ -55913,10 +55991,10 @@ func (x codecSelfer1234) encSlicePreferredSchedulingTerm(v []PreferredScheduling z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4435 := range v { + for _, yyv4444 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4436 := &yyv4435 - yy4436.CodecEncodeSelf(e) + yy4445 := &yyv4444 + yy4445.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -55926,83 +56004,83 @@ func (x codecSelfer1234) decSlicePreferredSchedulingTerm(v *[]PreferredSchedulin z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4437 := *v - yyh4437, yyl4437 := z.DecSliceHelperStart() - var yyc4437 bool - if yyl4437 == 0 { - if yyv4437 == nil { - yyv4437 = []PreferredSchedulingTerm{} - yyc4437 = true - } else if len(yyv4437) != 0 { - yyv4437 = yyv4437[:0] - yyc4437 = true + yyv4446 := *v + yyh4446, yyl4446 := z.DecSliceHelperStart() + var yyc4446 bool + if yyl4446 == 0 { + if yyv4446 == nil { + yyv4446 = []PreferredSchedulingTerm{} + yyc4446 = true + } else if len(yyv4446) != 0 { + yyv4446 = yyv4446[:0] + yyc4446 = true } - } else if yyl4437 > 0 { - var yyrr4437, yyrl4437 int - var yyrt4437 bool - if yyl4437 > cap(yyv4437) { + } else if yyl4446 > 0 { + var yyrr4446, yyrl4446 int + var yyrt4446 bool + if yyl4446 > cap(yyv4446) { - yyrg4437 := len(yyv4437) > 0 - yyv24437 := yyv4437 - yyrl4437, yyrt4437 = z.DecInferLen(yyl4437, z.DecBasicHandle().MaxInitLen, 32) - if yyrt4437 { - if yyrl4437 <= cap(yyv4437) { - yyv4437 = yyv4437[:yyrl4437] + yyrg4446 := len(yyv4446) > 0 + yyv24446 := yyv4446 + yyrl4446, yyrt4446 = z.DecInferLen(yyl4446, z.DecBasicHandle().MaxInitLen, 32) + if yyrt4446 { + if yyrl4446 <= cap(yyv4446) { + yyv4446 = yyv4446[:yyrl4446] } else { - yyv4437 = make([]PreferredSchedulingTerm, yyrl4437) + yyv4446 = make([]PreferredSchedulingTerm, yyrl4446) } } else { - yyv4437 = make([]PreferredSchedulingTerm, yyrl4437) + yyv4446 = make([]PreferredSchedulingTerm, yyrl4446) } - yyc4437 = true - yyrr4437 = len(yyv4437) - if yyrg4437 { - copy(yyv4437, yyv24437) + yyc4446 = true + yyrr4446 = len(yyv4446) + if yyrg4446 { + copy(yyv4446, yyv24446) } - } else if yyl4437 != len(yyv4437) { - yyv4437 = yyv4437[:yyl4437] - yyc4437 = true + } else if yyl4446 != len(yyv4446) { + yyv4446 = yyv4446[:yyl4446] + yyc4446 = true } - yyj4437 := 0 - for ; yyj4437 < yyrr4437; yyj4437++ { - yyh4437.ElemContainerState(yyj4437) + yyj4446 := 0 + for ; yyj4446 < yyrr4446; yyj4446++ { + yyh4446.ElemContainerState(yyj4446) if r.TryDecodeAsNil() { - yyv4437[yyj4437] = PreferredSchedulingTerm{} + yyv4446[yyj4446] = PreferredSchedulingTerm{} } else { - yyv4438 := &yyv4437[yyj4437] - yyv4438.CodecDecodeSelf(d) + yyv4447 := &yyv4446[yyj4446] + yyv4447.CodecDecodeSelf(d) } } - if yyrt4437 { - for ; yyj4437 < yyl4437; yyj4437++ { - yyv4437 = append(yyv4437, PreferredSchedulingTerm{}) - yyh4437.ElemContainerState(yyj4437) + if yyrt4446 { + for ; yyj4446 < yyl4446; yyj4446++ { + yyv4446 = append(yyv4446, PreferredSchedulingTerm{}) + yyh4446.ElemContainerState(yyj4446) if r.TryDecodeAsNil() { - yyv4437[yyj4437] = PreferredSchedulingTerm{} + yyv4446[yyj4446] = PreferredSchedulingTerm{} } else { - yyv4439 := &yyv4437[yyj4437] - yyv4439.CodecDecodeSelf(d) + yyv4448 := &yyv4446[yyj4446] + yyv4448.CodecDecodeSelf(d) } } } } else { - yyj4437 := 0 - for ; !r.CheckBreak(); yyj4437++ { + yyj4446 := 0 + for ; !r.CheckBreak(); yyj4446++ { - if yyj4437 >= len(yyv4437) { - yyv4437 = append(yyv4437, PreferredSchedulingTerm{}) // var yyz4437 PreferredSchedulingTerm - yyc4437 = true + if yyj4446 >= len(yyv4446) { + yyv4446 = append(yyv4446, PreferredSchedulingTerm{}) // var yyz4446 PreferredSchedulingTerm + yyc4446 = true } - yyh4437.ElemContainerState(yyj4437) - if yyj4437 < len(yyv4437) { + yyh4446.ElemContainerState(yyj4446) + if yyj4446 < len(yyv4446) { if r.TryDecodeAsNil() { - yyv4437[yyj4437] = PreferredSchedulingTerm{} + yyv4446[yyj4446] = PreferredSchedulingTerm{} } else { - yyv4440 := &yyv4437[yyj4437] - yyv4440.CodecDecodeSelf(d) + yyv4449 := &yyv4446[yyj4446] + yyv4449.CodecDecodeSelf(d) } } else { @@ -56010,17 +56088,17 @@ func (x codecSelfer1234) decSlicePreferredSchedulingTerm(v *[]PreferredSchedulin } } - if yyj4437 < len(yyv4437) { - yyv4437 = yyv4437[:yyj4437] - yyc4437 = true - } else if yyj4437 == 0 && yyv4437 == nil { - yyv4437 = []PreferredSchedulingTerm{} - yyc4437 = true + if yyj4446 < len(yyv4446) { + yyv4446 = yyv4446[:yyj4446] + yyc4446 = true + } else if yyj4446 == 0 && yyv4446 == nil { + yyv4446 = []PreferredSchedulingTerm{} + yyc4446 = true } } - yyh4437.End() - if yyc4437 { - *v = yyv4437 + yyh4446.End() + if yyc4446 { + *v = yyv4446 } } @@ -56029,10 +56107,10 @@ func (x codecSelfer1234) encSliceVolume(v []Volume, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4441 := range v { + for _, yyv4450 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4442 := &yyv4441 - yy4442.CodecEncodeSelf(e) + yy4451 := &yyv4450 + yy4451.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56042,83 +56120,83 @@ func (x codecSelfer1234) decSliceVolume(v *[]Volume, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4443 := *v - yyh4443, yyl4443 := z.DecSliceHelperStart() - var yyc4443 bool - if yyl4443 == 0 { - if yyv4443 == nil { - yyv4443 = []Volume{} - yyc4443 = true - } else if len(yyv4443) != 0 { - yyv4443 = yyv4443[:0] - yyc4443 = true + yyv4452 := *v + yyh4452, yyl4452 := z.DecSliceHelperStart() + var yyc4452 bool + if yyl4452 == 0 { + if yyv4452 == nil { + yyv4452 = []Volume{} + yyc4452 = true + } else if len(yyv4452) != 0 { + yyv4452 = yyv4452[:0] + yyc4452 = true } - } else if yyl4443 > 0 { - var yyrr4443, yyrl4443 int - var yyrt4443 bool - if yyl4443 > cap(yyv4443) { + } else if yyl4452 > 0 { + var yyrr4452, yyrl4452 int + var yyrt4452 bool + if yyl4452 > cap(yyv4452) { - yyrg4443 := len(yyv4443) > 0 - yyv24443 := yyv4443 - yyrl4443, yyrt4443 = z.DecInferLen(yyl4443, z.DecBasicHandle().MaxInitLen, 176) - if yyrt4443 { - if yyrl4443 <= cap(yyv4443) { - yyv4443 = yyv4443[:yyrl4443] + yyrg4452 := len(yyv4452) > 0 + yyv24452 := yyv4452 + yyrl4452, yyrt4452 = z.DecInferLen(yyl4452, z.DecBasicHandle().MaxInitLen, 176) + if yyrt4452 { + if yyrl4452 <= cap(yyv4452) { + yyv4452 = yyv4452[:yyrl4452] } else { - yyv4443 = make([]Volume, yyrl4443) + yyv4452 = make([]Volume, yyrl4452) } } else { - yyv4443 = make([]Volume, yyrl4443) + yyv4452 = make([]Volume, yyrl4452) } - yyc4443 = true - yyrr4443 = len(yyv4443) - if yyrg4443 { - copy(yyv4443, yyv24443) + yyc4452 = true + yyrr4452 = len(yyv4452) + if yyrg4452 { + copy(yyv4452, yyv24452) } - } else if yyl4443 != len(yyv4443) { - yyv4443 = yyv4443[:yyl4443] - yyc4443 = true + } else if yyl4452 != len(yyv4452) { + yyv4452 = yyv4452[:yyl4452] + yyc4452 = true } - yyj4443 := 0 - for ; yyj4443 < yyrr4443; yyj4443++ { - yyh4443.ElemContainerState(yyj4443) + yyj4452 := 0 + for ; yyj4452 < yyrr4452; yyj4452++ { + yyh4452.ElemContainerState(yyj4452) if r.TryDecodeAsNil() { - yyv4443[yyj4443] = Volume{} + yyv4452[yyj4452] = Volume{} } else { - yyv4444 := &yyv4443[yyj4443] - yyv4444.CodecDecodeSelf(d) + yyv4453 := &yyv4452[yyj4452] + yyv4453.CodecDecodeSelf(d) } } - if yyrt4443 { - for ; yyj4443 < yyl4443; yyj4443++ { - yyv4443 = append(yyv4443, Volume{}) - yyh4443.ElemContainerState(yyj4443) + if yyrt4452 { + for ; yyj4452 < yyl4452; yyj4452++ { + yyv4452 = append(yyv4452, Volume{}) + yyh4452.ElemContainerState(yyj4452) if r.TryDecodeAsNil() { - yyv4443[yyj4443] = Volume{} + yyv4452[yyj4452] = Volume{} } else { - yyv4445 := &yyv4443[yyj4443] - yyv4445.CodecDecodeSelf(d) + yyv4454 := &yyv4452[yyj4452] + yyv4454.CodecDecodeSelf(d) } } } } else { - yyj4443 := 0 - for ; !r.CheckBreak(); yyj4443++ { + yyj4452 := 0 + for ; !r.CheckBreak(); yyj4452++ { - if yyj4443 >= len(yyv4443) { - yyv4443 = append(yyv4443, Volume{}) // var yyz4443 Volume - yyc4443 = true + if yyj4452 >= len(yyv4452) { + yyv4452 = append(yyv4452, Volume{}) // var yyz4452 Volume + yyc4452 = true } - yyh4443.ElemContainerState(yyj4443) - if yyj4443 < len(yyv4443) { + yyh4452.ElemContainerState(yyj4452) + if yyj4452 < len(yyv4452) { if r.TryDecodeAsNil() { - yyv4443[yyj4443] = Volume{} + yyv4452[yyj4452] = Volume{} } else { - yyv4446 := &yyv4443[yyj4443] - yyv4446.CodecDecodeSelf(d) + yyv4455 := &yyv4452[yyj4452] + yyv4455.CodecDecodeSelf(d) } } else { @@ -56126,17 +56204,17 @@ func (x codecSelfer1234) decSliceVolume(v *[]Volume, d *codec1978.Decoder) { } } - if yyj4443 < len(yyv4443) { - yyv4443 = yyv4443[:yyj4443] - yyc4443 = true - } else if yyj4443 == 0 && yyv4443 == nil { - yyv4443 = []Volume{} - yyc4443 = true + if yyj4452 < len(yyv4452) { + yyv4452 = yyv4452[:yyj4452] + yyc4452 = true + } else if yyj4452 == 0 && yyv4452 == nil { + yyv4452 = []Volume{} + yyc4452 = true } } - yyh4443.End() - if yyc4443 { - *v = yyv4443 + yyh4452.End() + if yyc4452 { + *v = yyv4452 } } @@ -56145,10 +56223,10 @@ func (x codecSelfer1234) encSliceContainer(v []Container, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4447 := range v { + for _, yyv4456 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4448 := &yyv4447 - yy4448.CodecEncodeSelf(e) + yy4457 := &yyv4456 + yy4457.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56158,83 +56236,83 @@ func (x codecSelfer1234) decSliceContainer(v *[]Container, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4449 := *v - yyh4449, yyl4449 := z.DecSliceHelperStart() - var yyc4449 bool - if yyl4449 == 0 { - if yyv4449 == nil { - yyv4449 = []Container{} - yyc4449 = true - } else if len(yyv4449) != 0 { - yyv4449 = yyv4449[:0] - yyc4449 = true + yyv4458 := *v + yyh4458, yyl4458 := z.DecSliceHelperStart() + var yyc4458 bool + if yyl4458 == 0 { + if yyv4458 == nil { + yyv4458 = []Container{} + yyc4458 = true + } else if len(yyv4458) != 0 { + yyv4458 = yyv4458[:0] + yyc4458 = true } - } else if yyl4449 > 0 { - var yyrr4449, yyrl4449 int - var yyrt4449 bool - if yyl4449 > cap(yyv4449) { + } else if yyl4458 > 0 { + var yyrr4458, yyrl4458 int + var yyrt4458 bool + if yyl4458 > cap(yyv4458) { - yyrg4449 := len(yyv4449) > 0 - yyv24449 := yyv4449 - yyrl4449, yyrt4449 = z.DecInferLen(yyl4449, z.DecBasicHandle().MaxInitLen, 256) - if yyrt4449 { - if yyrl4449 <= cap(yyv4449) { - yyv4449 = yyv4449[:yyrl4449] + yyrg4458 := len(yyv4458) > 0 + yyv24458 := yyv4458 + yyrl4458, yyrt4458 = z.DecInferLen(yyl4458, z.DecBasicHandle().MaxInitLen, 256) + if yyrt4458 { + if yyrl4458 <= cap(yyv4458) { + yyv4458 = yyv4458[:yyrl4458] } else { - yyv4449 = make([]Container, yyrl4449) + yyv4458 = make([]Container, yyrl4458) } } else { - yyv4449 = make([]Container, yyrl4449) + yyv4458 = make([]Container, yyrl4458) } - yyc4449 = true - yyrr4449 = len(yyv4449) - if yyrg4449 { - copy(yyv4449, yyv24449) + yyc4458 = true + yyrr4458 = len(yyv4458) + if yyrg4458 { + copy(yyv4458, yyv24458) } - } else if yyl4449 != len(yyv4449) { - yyv4449 = yyv4449[:yyl4449] - yyc4449 = true + } else if yyl4458 != len(yyv4458) { + yyv4458 = yyv4458[:yyl4458] + yyc4458 = true } - yyj4449 := 0 - for ; yyj4449 < yyrr4449; yyj4449++ { - yyh4449.ElemContainerState(yyj4449) + yyj4458 := 0 + for ; yyj4458 < yyrr4458; yyj4458++ { + yyh4458.ElemContainerState(yyj4458) if r.TryDecodeAsNil() { - yyv4449[yyj4449] = Container{} + yyv4458[yyj4458] = Container{} } else { - yyv4450 := &yyv4449[yyj4449] - yyv4450.CodecDecodeSelf(d) + yyv4459 := &yyv4458[yyj4458] + yyv4459.CodecDecodeSelf(d) } } - if yyrt4449 { - for ; yyj4449 < yyl4449; yyj4449++ { - yyv4449 = append(yyv4449, Container{}) - yyh4449.ElemContainerState(yyj4449) + if yyrt4458 { + for ; yyj4458 < yyl4458; yyj4458++ { + yyv4458 = append(yyv4458, Container{}) + yyh4458.ElemContainerState(yyj4458) if r.TryDecodeAsNil() { - yyv4449[yyj4449] = Container{} + yyv4458[yyj4458] = Container{} } else { - yyv4451 := &yyv4449[yyj4449] - yyv4451.CodecDecodeSelf(d) + yyv4460 := &yyv4458[yyj4458] + yyv4460.CodecDecodeSelf(d) } } } } else { - yyj4449 := 0 - for ; !r.CheckBreak(); yyj4449++ { + yyj4458 := 0 + for ; !r.CheckBreak(); yyj4458++ { - if yyj4449 >= len(yyv4449) { - yyv4449 = append(yyv4449, Container{}) // var yyz4449 Container - yyc4449 = true + if yyj4458 >= len(yyv4458) { + yyv4458 = append(yyv4458, Container{}) // var yyz4458 Container + yyc4458 = true } - yyh4449.ElemContainerState(yyj4449) - if yyj4449 < len(yyv4449) { + yyh4458.ElemContainerState(yyj4458) + if yyj4458 < len(yyv4458) { if r.TryDecodeAsNil() { - yyv4449[yyj4449] = Container{} + yyv4458[yyj4458] = Container{} } else { - yyv4452 := &yyv4449[yyj4449] - yyv4452.CodecDecodeSelf(d) + yyv4461 := &yyv4458[yyj4458] + yyv4461.CodecDecodeSelf(d) } } else { @@ -56242,17 +56320,17 @@ func (x codecSelfer1234) decSliceContainer(v *[]Container, d *codec1978.Decoder) } } - if yyj4449 < len(yyv4449) { - yyv4449 = yyv4449[:yyj4449] - yyc4449 = true - } else if yyj4449 == 0 && yyv4449 == nil { - yyv4449 = []Container{} - yyc4449 = true + if yyj4458 < len(yyv4458) { + yyv4458 = yyv4458[:yyj4458] + yyc4458 = true + } else if yyj4458 == 0 && yyv4458 == nil { + yyv4458 = []Container{} + yyc4458 = true } } - yyh4449.End() - if yyc4449 { - *v = yyv4449 + yyh4458.End() + if yyc4458 { + *v = yyv4458 } } @@ -56261,10 +56339,10 @@ func (x codecSelfer1234) encSliceLocalObjectReference(v []LocalObjectReference, z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4453 := range v { + for _, yyv4462 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4454 := &yyv4453 - yy4454.CodecEncodeSelf(e) + yy4463 := &yyv4462 + yy4463.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56274,83 +56352,83 @@ func (x codecSelfer1234) decSliceLocalObjectReference(v *[]LocalObjectReference, z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4455 := *v - yyh4455, yyl4455 := z.DecSliceHelperStart() - var yyc4455 bool - if yyl4455 == 0 { - if yyv4455 == nil { - yyv4455 = []LocalObjectReference{} - yyc4455 = true - } else if len(yyv4455) != 0 { - yyv4455 = yyv4455[:0] - yyc4455 = true + yyv4464 := *v + yyh4464, yyl4464 := z.DecSliceHelperStart() + var yyc4464 bool + if yyl4464 == 0 { + if yyv4464 == nil { + yyv4464 = []LocalObjectReference{} + yyc4464 = true + } else if len(yyv4464) != 0 { + yyv4464 = yyv4464[:0] + yyc4464 = true } - } else if yyl4455 > 0 { - var yyrr4455, yyrl4455 int - var yyrt4455 bool - if yyl4455 > cap(yyv4455) { + } else if yyl4464 > 0 { + var yyrr4464, yyrl4464 int + var yyrt4464 bool + if yyl4464 > cap(yyv4464) { - yyrg4455 := len(yyv4455) > 0 - yyv24455 := yyv4455 - yyrl4455, yyrt4455 = z.DecInferLen(yyl4455, z.DecBasicHandle().MaxInitLen, 16) - if yyrt4455 { - if yyrl4455 <= cap(yyv4455) { - yyv4455 = yyv4455[:yyrl4455] + yyrg4464 := len(yyv4464) > 0 + yyv24464 := yyv4464 + yyrl4464, yyrt4464 = z.DecInferLen(yyl4464, z.DecBasicHandle().MaxInitLen, 16) + if yyrt4464 { + if yyrl4464 <= cap(yyv4464) { + yyv4464 = yyv4464[:yyrl4464] } else { - yyv4455 = make([]LocalObjectReference, yyrl4455) + yyv4464 = make([]LocalObjectReference, yyrl4464) } } else { - yyv4455 = make([]LocalObjectReference, yyrl4455) + yyv4464 = make([]LocalObjectReference, yyrl4464) } - yyc4455 = true - yyrr4455 = len(yyv4455) - if yyrg4455 { - copy(yyv4455, yyv24455) + yyc4464 = true + yyrr4464 = len(yyv4464) + if yyrg4464 { + copy(yyv4464, yyv24464) } - } else if yyl4455 != len(yyv4455) { - yyv4455 = yyv4455[:yyl4455] - yyc4455 = true + } else if yyl4464 != len(yyv4464) { + yyv4464 = yyv4464[:yyl4464] + yyc4464 = true } - yyj4455 := 0 - for ; yyj4455 < yyrr4455; yyj4455++ { - yyh4455.ElemContainerState(yyj4455) + yyj4464 := 0 + for ; yyj4464 < yyrr4464; yyj4464++ { + yyh4464.ElemContainerState(yyj4464) if r.TryDecodeAsNil() { - yyv4455[yyj4455] = LocalObjectReference{} + yyv4464[yyj4464] = LocalObjectReference{} } else { - yyv4456 := &yyv4455[yyj4455] - yyv4456.CodecDecodeSelf(d) + yyv4465 := &yyv4464[yyj4464] + yyv4465.CodecDecodeSelf(d) } } - if yyrt4455 { - for ; yyj4455 < yyl4455; yyj4455++ { - yyv4455 = append(yyv4455, LocalObjectReference{}) - yyh4455.ElemContainerState(yyj4455) + if yyrt4464 { + for ; yyj4464 < yyl4464; yyj4464++ { + yyv4464 = append(yyv4464, LocalObjectReference{}) + yyh4464.ElemContainerState(yyj4464) if r.TryDecodeAsNil() { - yyv4455[yyj4455] = LocalObjectReference{} + yyv4464[yyj4464] = LocalObjectReference{} } else { - yyv4457 := &yyv4455[yyj4455] - yyv4457.CodecDecodeSelf(d) + yyv4466 := &yyv4464[yyj4464] + yyv4466.CodecDecodeSelf(d) } } } } else { - yyj4455 := 0 - for ; !r.CheckBreak(); yyj4455++ { + yyj4464 := 0 + for ; !r.CheckBreak(); yyj4464++ { - if yyj4455 >= len(yyv4455) { - yyv4455 = append(yyv4455, LocalObjectReference{}) // var yyz4455 LocalObjectReference - yyc4455 = true + if yyj4464 >= len(yyv4464) { + yyv4464 = append(yyv4464, LocalObjectReference{}) // var yyz4464 LocalObjectReference + yyc4464 = true } - yyh4455.ElemContainerState(yyj4455) - if yyj4455 < len(yyv4455) { + yyh4464.ElemContainerState(yyj4464) + if yyj4464 < len(yyv4464) { if r.TryDecodeAsNil() { - yyv4455[yyj4455] = LocalObjectReference{} + yyv4464[yyj4464] = LocalObjectReference{} } else { - yyv4458 := &yyv4455[yyj4455] - yyv4458.CodecDecodeSelf(d) + yyv4467 := &yyv4464[yyj4464] + yyv4467.CodecDecodeSelf(d) } } else { @@ -56358,17 +56436,17 @@ func (x codecSelfer1234) decSliceLocalObjectReference(v *[]LocalObjectReference, } } - if yyj4455 < len(yyv4455) { - yyv4455 = yyv4455[:yyj4455] - yyc4455 = true - } else if yyj4455 == 0 && yyv4455 == nil { - yyv4455 = []LocalObjectReference{} - yyc4455 = true + if yyj4464 < len(yyv4464) { + yyv4464 = yyv4464[:yyj4464] + yyc4464 = true + } else if yyj4464 == 0 && yyv4464 == nil { + yyv4464 = []LocalObjectReference{} + yyc4464 = true } } - yyh4455.End() - if yyc4455 { - *v = yyv4455 + yyh4464.End() + if yyc4464 { + *v = yyv4464 } } @@ -56377,10 +56455,10 @@ func (x codecSelfer1234) encSlicePodCondition(v []PodCondition, e *codec1978.Enc z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4459 := range v { + for _, yyv4468 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4460 := &yyv4459 - yy4460.CodecEncodeSelf(e) + yy4469 := &yyv4468 + yy4469.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56390,83 +56468,83 @@ func (x codecSelfer1234) decSlicePodCondition(v *[]PodCondition, d *codec1978.De z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4461 := *v - yyh4461, yyl4461 := z.DecSliceHelperStart() - var yyc4461 bool - if yyl4461 == 0 { - if yyv4461 == nil { - yyv4461 = []PodCondition{} - yyc4461 = true - } else if len(yyv4461) != 0 { - yyv4461 = yyv4461[:0] - yyc4461 = true + yyv4470 := *v + yyh4470, yyl4470 := z.DecSliceHelperStart() + var yyc4470 bool + if yyl4470 == 0 { + if yyv4470 == nil { + yyv4470 = []PodCondition{} + yyc4470 = true + } else if len(yyv4470) != 0 { + yyv4470 = yyv4470[:0] + yyc4470 = true } - } else if yyl4461 > 0 { - var yyrr4461, yyrl4461 int - var yyrt4461 bool - if yyl4461 > cap(yyv4461) { + } else if yyl4470 > 0 { + var yyrr4470, yyrl4470 int + var yyrt4470 bool + if yyl4470 > cap(yyv4470) { - yyrg4461 := len(yyv4461) > 0 - yyv24461 := yyv4461 - yyrl4461, yyrt4461 = z.DecInferLen(yyl4461, z.DecBasicHandle().MaxInitLen, 112) - if yyrt4461 { - if yyrl4461 <= cap(yyv4461) { - yyv4461 = yyv4461[:yyrl4461] + yyrg4470 := len(yyv4470) > 0 + yyv24470 := yyv4470 + yyrl4470, yyrt4470 = z.DecInferLen(yyl4470, z.DecBasicHandle().MaxInitLen, 112) + if yyrt4470 { + if yyrl4470 <= cap(yyv4470) { + yyv4470 = yyv4470[:yyrl4470] } else { - yyv4461 = make([]PodCondition, yyrl4461) + yyv4470 = make([]PodCondition, yyrl4470) } } else { - yyv4461 = make([]PodCondition, yyrl4461) + yyv4470 = make([]PodCondition, yyrl4470) } - yyc4461 = true - yyrr4461 = len(yyv4461) - if yyrg4461 { - copy(yyv4461, yyv24461) + yyc4470 = true + yyrr4470 = len(yyv4470) + if yyrg4470 { + copy(yyv4470, yyv24470) } - } else if yyl4461 != len(yyv4461) { - yyv4461 = yyv4461[:yyl4461] - yyc4461 = true + } else if yyl4470 != len(yyv4470) { + yyv4470 = yyv4470[:yyl4470] + yyc4470 = true } - yyj4461 := 0 - for ; yyj4461 < yyrr4461; yyj4461++ { - yyh4461.ElemContainerState(yyj4461) + yyj4470 := 0 + for ; yyj4470 < yyrr4470; yyj4470++ { + yyh4470.ElemContainerState(yyj4470) if r.TryDecodeAsNil() { - yyv4461[yyj4461] = PodCondition{} + yyv4470[yyj4470] = PodCondition{} } else { - yyv4462 := &yyv4461[yyj4461] - yyv4462.CodecDecodeSelf(d) + yyv4471 := &yyv4470[yyj4470] + yyv4471.CodecDecodeSelf(d) } } - if yyrt4461 { - for ; yyj4461 < yyl4461; yyj4461++ { - yyv4461 = append(yyv4461, PodCondition{}) - yyh4461.ElemContainerState(yyj4461) + if yyrt4470 { + for ; yyj4470 < yyl4470; yyj4470++ { + yyv4470 = append(yyv4470, PodCondition{}) + yyh4470.ElemContainerState(yyj4470) if r.TryDecodeAsNil() { - yyv4461[yyj4461] = PodCondition{} + yyv4470[yyj4470] = PodCondition{} } else { - yyv4463 := &yyv4461[yyj4461] - yyv4463.CodecDecodeSelf(d) + yyv4472 := &yyv4470[yyj4470] + yyv4472.CodecDecodeSelf(d) } } } } else { - yyj4461 := 0 - for ; !r.CheckBreak(); yyj4461++ { + yyj4470 := 0 + for ; !r.CheckBreak(); yyj4470++ { - if yyj4461 >= len(yyv4461) { - yyv4461 = append(yyv4461, PodCondition{}) // var yyz4461 PodCondition - yyc4461 = true + if yyj4470 >= len(yyv4470) { + yyv4470 = append(yyv4470, PodCondition{}) // var yyz4470 PodCondition + yyc4470 = true } - yyh4461.ElemContainerState(yyj4461) - if yyj4461 < len(yyv4461) { + yyh4470.ElemContainerState(yyj4470) + if yyj4470 < len(yyv4470) { if r.TryDecodeAsNil() { - yyv4461[yyj4461] = PodCondition{} + yyv4470[yyj4470] = PodCondition{} } else { - yyv4464 := &yyv4461[yyj4461] - yyv4464.CodecDecodeSelf(d) + yyv4473 := &yyv4470[yyj4470] + yyv4473.CodecDecodeSelf(d) } } else { @@ -56474,17 +56552,17 @@ func (x codecSelfer1234) decSlicePodCondition(v *[]PodCondition, d *codec1978.De } } - if yyj4461 < len(yyv4461) { - yyv4461 = yyv4461[:yyj4461] - yyc4461 = true - } else if yyj4461 == 0 && yyv4461 == nil { - yyv4461 = []PodCondition{} - yyc4461 = true + if yyj4470 < len(yyv4470) { + yyv4470 = yyv4470[:yyj4470] + yyc4470 = true + } else if yyj4470 == 0 && yyv4470 == nil { + yyv4470 = []PodCondition{} + yyc4470 = true } } - yyh4461.End() - if yyc4461 { - *v = yyv4461 + yyh4470.End() + if yyc4470 { + *v = yyv4470 } } @@ -56493,10 +56571,10 @@ func (x codecSelfer1234) encSliceContainerStatus(v []ContainerStatus, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4465 := range v { + for _, yyv4474 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4466 := &yyv4465 - yy4466.CodecEncodeSelf(e) + yy4475 := &yyv4474 + yy4475.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56506,83 +56584,83 @@ func (x codecSelfer1234) decSliceContainerStatus(v *[]ContainerStatus, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4467 := *v - yyh4467, yyl4467 := z.DecSliceHelperStart() - var yyc4467 bool - if yyl4467 == 0 { - if yyv4467 == nil { - yyv4467 = []ContainerStatus{} - yyc4467 = true - } else if len(yyv4467) != 0 { - yyv4467 = yyv4467[:0] - yyc4467 = true + yyv4476 := *v + yyh4476, yyl4476 := z.DecSliceHelperStart() + var yyc4476 bool + if yyl4476 == 0 { + if yyv4476 == nil { + yyv4476 = []ContainerStatus{} + yyc4476 = true + } else if len(yyv4476) != 0 { + yyv4476 = yyv4476[:0] + yyc4476 = true } - } else if yyl4467 > 0 { - var yyrr4467, yyrl4467 int - var yyrt4467 bool - if yyl4467 > cap(yyv4467) { + } else if yyl4476 > 0 { + var yyrr4476, yyrl4476 int + var yyrt4476 bool + if yyl4476 > cap(yyv4476) { - yyrg4467 := len(yyv4467) > 0 - yyv24467 := yyv4467 - yyrl4467, yyrt4467 = z.DecInferLen(yyl4467, z.DecBasicHandle().MaxInitLen, 120) - if yyrt4467 { - if yyrl4467 <= cap(yyv4467) { - yyv4467 = yyv4467[:yyrl4467] + yyrg4476 := len(yyv4476) > 0 + yyv24476 := yyv4476 + yyrl4476, yyrt4476 = z.DecInferLen(yyl4476, z.DecBasicHandle().MaxInitLen, 120) + if yyrt4476 { + if yyrl4476 <= cap(yyv4476) { + yyv4476 = yyv4476[:yyrl4476] } else { - yyv4467 = make([]ContainerStatus, yyrl4467) + yyv4476 = make([]ContainerStatus, yyrl4476) } } else { - yyv4467 = make([]ContainerStatus, yyrl4467) + yyv4476 = make([]ContainerStatus, yyrl4476) } - yyc4467 = true - yyrr4467 = len(yyv4467) - if yyrg4467 { - copy(yyv4467, yyv24467) + yyc4476 = true + yyrr4476 = len(yyv4476) + if yyrg4476 { + copy(yyv4476, yyv24476) } - } else if yyl4467 != len(yyv4467) { - yyv4467 = yyv4467[:yyl4467] - yyc4467 = true + } else if yyl4476 != len(yyv4476) { + yyv4476 = yyv4476[:yyl4476] + yyc4476 = true } - yyj4467 := 0 - for ; yyj4467 < yyrr4467; yyj4467++ { - yyh4467.ElemContainerState(yyj4467) + yyj4476 := 0 + for ; yyj4476 < yyrr4476; yyj4476++ { + yyh4476.ElemContainerState(yyj4476) if r.TryDecodeAsNil() { - yyv4467[yyj4467] = ContainerStatus{} + yyv4476[yyj4476] = ContainerStatus{} } else { - yyv4468 := &yyv4467[yyj4467] - yyv4468.CodecDecodeSelf(d) + yyv4477 := &yyv4476[yyj4476] + yyv4477.CodecDecodeSelf(d) } } - if yyrt4467 { - for ; yyj4467 < yyl4467; yyj4467++ { - yyv4467 = append(yyv4467, ContainerStatus{}) - yyh4467.ElemContainerState(yyj4467) + if yyrt4476 { + for ; yyj4476 < yyl4476; yyj4476++ { + yyv4476 = append(yyv4476, ContainerStatus{}) + yyh4476.ElemContainerState(yyj4476) if r.TryDecodeAsNil() { - yyv4467[yyj4467] = ContainerStatus{} + yyv4476[yyj4476] = ContainerStatus{} } else { - yyv4469 := &yyv4467[yyj4467] - yyv4469.CodecDecodeSelf(d) + yyv4478 := &yyv4476[yyj4476] + yyv4478.CodecDecodeSelf(d) } } } } else { - yyj4467 := 0 - for ; !r.CheckBreak(); yyj4467++ { + yyj4476 := 0 + for ; !r.CheckBreak(); yyj4476++ { - if yyj4467 >= len(yyv4467) { - yyv4467 = append(yyv4467, ContainerStatus{}) // var yyz4467 ContainerStatus - yyc4467 = true + if yyj4476 >= len(yyv4476) { + yyv4476 = append(yyv4476, ContainerStatus{}) // var yyz4476 ContainerStatus + yyc4476 = true } - yyh4467.ElemContainerState(yyj4467) - if yyj4467 < len(yyv4467) { + yyh4476.ElemContainerState(yyj4476) + if yyj4476 < len(yyv4476) { if r.TryDecodeAsNil() { - yyv4467[yyj4467] = ContainerStatus{} + yyv4476[yyj4476] = ContainerStatus{} } else { - yyv4470 := &yyv4467[yyj4467] - yyv4470.CodecDecodeSelf(d) + yyv4479 := &yyv4476[yyj4476] + yyv4479.CodecDecodeSelf(d) } } else { @@ -56590,17 +56668,17 @@ func (x codecSelfer1234) decSliceContainerStatus(v *[]ContainerStatus, d *codec1 } } - if yyj4467 < len(yyv4467) { - yyv4467 = yyv4467[:yyj4467] - yyc4467 = true - } else if yyj4467 == 0 && yyv4467 == nil { - yyv4467 = []ContainerStatus{} - yyc4467 = true + if yyj4476 < len(yyv4476) { + yyv4476 = yyv4476[:yyj4476] + yyc4476 = true + } else if yyj4476 == 0 && yyv4476 == nil { + yyv4476 = []ContainerStatus{} + yyc4476 = true } } - yyh4467.End() - if yyc4467 { - *v = yyv4467 + yyh4476.End() + if yyc4476 { + *v = yyv4476 } } @@ -56609,10 +56687,10 @@ func (x codecSelfer1234) encSlicePod(v []Pod, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4471 := range v { + for _, yyv4480 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4472 := &yyv4471 - yy4472.CodecEncodeSelf(e) + yy4481 := &yyv4480 + yy4481.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56622,83 +56700,83 @@ func (x codecSelfer1234) decSlicePod(v *[]Pod, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4473 := *v - yyh4473, yyl4473 := z.DecSliceHelperStart() - var yyc4473 bool - if yyl4473 == 0 { - if yyv4473 == nil { - yyv4473 = []Pod{} - yyc4473 = true - } else if len(yyv4473) != 0 { - yyv4473 = yyv4473[:0] - yyc4473 = true + yyv4482 := *v + yyh4482, yyl4482 := z.DecSliceHelperStart() + var yyc4482 bool + if yyl4482 == 0 { + if yyv4482 == nil { + yyv4482 = []Pod{} + yyc4482 = true + } else if len(yyv4482) != 0 { + yyv4482 = yyv4482[:0] + yyc4482 = true } - } else if yyl4473 > 0 { - var yyrr4473, yyrl4473 int - var yyrt4473 bool - if yyl4473 > cap(yyv4473) { + } else if yyl4482 > 0 { + var yyrr4482, yyrl4482 int + var yyrt4482 bool + if yyl4482 > cap(yyv4482) { - yyrg4473 := len(yyv4473) > 0 - yyv24473 := yyv4473 - yyrl4473, yyrt4473 = z.DecInferLen(yyl4473, z.DecBasicHandle().MaxInitLen, 648) - if yyrt4473 { - if yyrl4473 <= cap(yyv4473) { - yyv4473 = yyv4473[:yyrl4473] + yyrg4482 := len(yyv4482) > 0 + yyv24482 := yyv4482 + yyrl4482, yyrt4482 = z.DecInferLen(yyl4482, z.DecBasicHandle().MaxInitLen, 648) + if yyrt4482 { + if yyrl4482 <= cap(yyv4482) { + yyv4482 = yyv4482[:yyrl4482] } else { - yyv4473 = make([]Pod, yyrl4473) + yyv4482 = make([]Pod, yyrl4482) } } else { - yyv4473 = make([]Pod, yyrl4473) + yyv4482 = make([]Pod, yyrl4482) } - yyc4473 = true - yyrr4473 = len(yyv4473) - if yyrg4473 { - copy(yyv4473, yyv24473) + yyc4482 = true + yyrr4482 = len(yyv4482) + if yyrg4482 { + copy(yyv4482, yyv24482) } - } else if yyl4473 != len(yyv4473) { - yyv4473 = yyv4473[:yyl4473] - yyc4473 = true + } else if yyl4482 != len(yyv4482) { + yyv4482 = yyv4482[:yyl4482] + yyc4482 = true } - yyj4473 := 0 - for ; yyj4473 < yyrr4473; yyj4473++ { - yyh4473.ElemContainerState(yyj4473) + yyj4482 := 0 + for ; yyj4482 < yyrr4482; yyj4482++ { + yyh4482.ElemContainerState(yyj4482) if r.TryDecodeAsNil() { - yyv4473[yyj4473] = Pod{} + yyv4482[yyj4482] = Pod{} } else { - yyv4474 := &yyv4473[yyj4473] - yyv4474.CodecDecodeSelf(d) + yyv4483 := &yyv4482[yyj4482] + yyv4483.CodecDecodeSelf(d) } } - if yyrt4473 { - for ; yyj4473 < yyl4473; yyj4473++ { - yyv4473 = append(yyv4473, Pod{}) - yyh4473.ElemContainerState(yyj4473) + if yyrt4482 { + for ; yyj4482 < yyl4482; yyj4482++ { + yyv4482 = append(yyv4482, Pod{}) + yyh4482.ElemContainerState(yyj4482) if r.TryDecodeAsNil() { - yyv4473[yyj4473] = Pod{} + yyv4482[yyj4482] = Pod{} } else { - yyv4475 := &yyv4473[yyj4473] - yyv4475.CodecDecodeSelf(d) + yyv4484 := &yyv4482[yyj4482] + yyv4484.CodecDecodeSelf(d) } } } } else { - yyj4473 := 0 - for ; !r.CheckBreak(); yyj4473++ { + yyj4482 := 0 + for ; !r.CheckBreak(); yyj4482++ { - if yyj4473 >= len(yyv4473) { - yyv4473 = append(yyv4473, Pod{}) // var yyz4473 Pod - yyc4473 = true + if yyj4482 >= len(yyv4482) { + yyv4482 = append(yyv4482, Pod{}) // var yyz4482 Pod + yyc4482 = true } - yyh4473.ElemContainerState(yyj4473) - if yyj4473 < len(yyv4473) { + yyh4482.ElemContainerState(yyj4482) + if yyj4482 < len(yyv4482) { if r.TryDecodeAsNil() { - yyv4473[yyj4473] = Pod{} + yyv4482[yyj4482] = Pod{} } else { - yyv4476 := &yyv4473[yyj4473] - yyv4476.CodecDecodeSelf(d) + yyv4485 := &yyv4482[yyj4482] + yyv4485.CodecDecodeSelf(d) } } else { @@ -56706,17 +56784,17 @@ func (x codecSelfer1234) decSlicePod(v *[]Pod, d *codec1978.Decoder) { } } - if yyj4473 < len(yyv4473) { - yyv4473 = yyv4473[:yyj4473] - yyc4473 = true - } else if yyj4473 == 0 && yyv4473 == nil { - yyv4473 = []Pod{} - yyc4473 = true + if yyj4482 < len(yyv4482) { + yyv4482 = yyv4482[:yyj4482] + yyc4482 = true + } else if yyj4482 == 0 && yyv4482 == nil { + yyv4482 = []Pod{} + yyc4482 = true } } - yyh4473.End() - if yyc4473 { - *v = yyv4473 + yyh4482.End() + if yyc4482 { + *v = yyv4482 } } @@ -56725,10 +56803,10 @@ func (x codecSelfer1234) encSlicePodTemplate(v []PodTemplate, e *codec1978.Encod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4477 := range v { + for _, yyv4486 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4478 := &yyv4477 - yy4478.CodecEncodeSelf(e) + yy4487 := &yyv4486 + yy4487.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56738,83 +56816,83 @@ func (x codecSelfer1234) decSlicePodTemplate(v *[]PodTemplate, d *codec1978.Deco z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4479 := *v - yyh4479, yyl4479 := z.DecSliceHelperStart() - var yyc4479 bool - if yyl4479 == 0 { - if yyv4479 == nil { - yyv4479 = []PodTemplate{} - yyc4479 = true - } else if len(yyv4479) != 0 { - yyv4479 = yyv4479[:0] - yyc4479 = true + yyv4488 := *v + yyh4488, yyl4488 := z.DecSliceHelperStart() + var yyc4488 bool + if yyl4488 == 0 { + if yyv4488 == nil { + yyv4488 = []PodTemplate{} + yyc4488 = true + } else if len(yyv4488) != 0 { + yyv4488 = yyv4488[:0] + yyc4488 = true } - } else if yyl4479 > 0 { - var yyrr4479, yyrl4479 int - var yyrt4479 bool - if yyl4479 > cap(yyv4479) { + } else if yyl4488 > 0 { + var yyrr4488, yyrl4488 int + var yyrt4488 bool + if yyl4488 > cap(yyv4488) { - yyrg4479 := len(yyv4479) > 0 - yyv24479 := yyv4479 - yyrl4479, yyrt4479 = z.DecInferLen(yyl4479, z.DecBasicHandle().MaxInitLen, 696) - if yyrt4479 { - if yyrl4479 <= cap(yyv4479) { - yyv4479 = yyv4479[:yyrl4479] + yyrg4488 := len(yyv4488) > 0 + yyv24488 := yyv4488 + yyrl4488, yyrt4488 = z.DecInferLen(yyl4488, z.DecBasicHandle().MaxInitLen, 696) + if yyrt4488 { + if yyrl4488 <= cap(yyv4488) { + yyv4488 = yyv4488[:yyrl4488] } else { - yyv4479 = make([]PodTemplate, yyrl4479) + yyv4488 = make([]PodTemplate, yyrl4488) } } else { - yyv4479 = make([]PodTemplate, yyrl4479) + yyv4488 = make([]PodTemplate, yyrl4488) } - yyc4479 = true - yyrr4479 = len(yyv4479) - if yyrg4479 { - copy(yyv4479, yyv24479) + yyc4488 = true + yyrr4488 = len(yyv4488) + if yyrg4488 { + copy(yyv4488, yyv24488) } - } else if yyl4479 != len(yyv4479) { - yyv4479 = yyv4479[:yyl4479] - yyc4479 = true + } else if yyl4488 != len(yyv4488) { + yyv4488 = yyv4488[:yyl4488] + yyc4488 = true } - yyj4479 := 0 - for ; yyj4479 < yyrr4479; yyj4479++ { - yyh4479.ElemContainerState(yyj4479) + yyj4488 := 0 + for ; yyj4488 < yyrr4488; yyj4488++ { + yyh4488.ElemContainerState(yyj4488) if r.TryDecodeAsNil() { - yyv4479[yyj4479] = PodTemplate{} + yyv4488[yyj4488] = PodTemplate{} } else { - yyv4480 := &yyv4479[yyj4479] - yyv4480.CodecDecodeSelf(d) + yyv4489 := &yyv4488[yyj4488] + yyv4489.CodecDecodeSelf(d) } } - if yyrt4479 { - for ; yyj4479 < yyl4479; yyj4479++ { - yyv4479 = append(yyv4479, PodTemplate{}) - yyh4479.ElemContainerState(yyj4479) + if yyrt4488 { + for ; yyj4488 < yyl4488; yyj4488++ { + yyv4488 = append(yyv4488, PodTemplate{}) + yyh4488.ElemContainerState(yyj4488) if r.TryDecodeAsNil() { - yyv4479[yyj4479] = PodTemplate{} + yyv4488[yyj4488] = PodTemplate{} } else { - yyv4481 := &yyv4479[yyj4479] - yyv4481.CodecDecodeSelf(d) + yyv4490 := &yyv4488[yyj4488] + yyv4490.CodecDecodeSelf(d) } } } } else { - yyj4479 := 0 - for ; !r.CheckBreak(); yyj4479++ { + yyj4488 := 0 + for ; !r.CheckBreak(); yyj4488++ { - if yyj4479 >= len(yyv4479) { - yyv4479 = append(yyv4479, PodTemplate{}) // var yyz4479 PodTemplate - yyc4479 = true + if yyj4488 >= len(yyv4488) { + yyv4488 = append(yyv4488, PodTemplate{}) // var yyz4488 PodTemplate + yyc4488 = true } - yyh4479.ElemContainerState(yyj4479) - if yyj4479 < len(yyv4479) { + yyh4488.ElemContainerState(yyj4488) + if yyj4488 < len(yyv4488) { if r.TryDecodeAsNil() { - yyv4479[yyj4479] = PodTemplate{} + yyv4488[yyj4488] = PodTemplate{} } else { - yyv4482 := &yyv4479[yyj4479] - yyv4482.CodecDecodeSelf(d) + yyv4491 := &yyv4488[yyj4488] + yyv4491.CodecDecodeSelf(d) } } else { @@ -56822,17 +56900,17 @@ func (x codecSelfer1234) decSlicePodTemplate(v *[]PodTemplate, d *codec1978.Deco } } - if yyj4479 < len(yyv4479) { - yyv4479 = yyv4479[:yyj4479] - yyc4479 = true - } else if yyj4479 == 0 && yyv4479 == nil { - yyv4479 = []PodTemplate{} - yyc4479 = true + if yyj4488 < len(yyv4488) { + yyv4488 = yyv4488[:yyj4488] + yyc4488 = true + } else if yyj4488 == 0 && yyv4488 == nil { + yyv4488 = []PodTemplate{} + yyc4488 = true } } - yyh4479.End() - if yyc4479 { - *v = yyv4479 + yyh4488.End() + if yyc4488 { + *v = yyv4488 } } @@ -56841,10 +56919,10 @@ func (x codecSelfer1234) encSliceReplicationController(v []ReplicationController z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4483 := range v { + for _, yyv4492 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4484 := &yyv4483 - yy4484.CodecEncodeSelf(e) + yy4493 := &yyv4492 + yy4493.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56854,83 +56932,83 @@ func (x codecSelfer1234) decSliceReplicationController(v *[]ReplicationControlle z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4485 := *v - yyh4485, yyl4485 := z.DecSliceHelperStart() - var yyc4485 bool - if yyl4485 == 0 { - if yyv4485 == nil { - yyv4485 = []ReplicationController{} - yyc4485 = true - } else if len(yyv4485) != 0 { - yyv4485 = yyv4485[:0] - yyc4485 = true + yyv4494 := *v + yyh4494, yyl4494 := z.DecSliceHelperStart() + var yyc4494 bool + if yyl4494 == 0 { + if yyv4494 == nil { + yyv4494 = []ReplicationController{} + yyc4494 = true + } else if len(yyv4494) != 0 { + yyv4494 = yyv4494[:0] + yyc4494 = true } - } else if yyl4485 > 0 { - var yyrr4485, yyrl4485 int - var yyrt4485 bool - if yyl4485 > cap(yyv4485) { + } else if yyl4494 > 0 { + var yyrr4494, yyrl4494 int + var yyrt4494 bool + if yyl4494 > cap(yyv4494) { - yyrg4485 := len(yyv4485) > 0 - yyv24485 := yyv4485 - yyrl4485, yyrt4485 = z.DecInferLen(yyl4485, z.DecBasicHandle().MaxInitLen, 280) - if yyrt4485 { - if yyrl4485 <= cap(yyv4485) { - yyv4485 = yyv4485[:yyrl4485] + yyrg4494 := len(yyv4494) > 0 + yyv24494 := yyv4494 + yyrl4494, yyrt4494 = z.DecInferLen(yyl4494, z.DecBasicHandle().MaxInitLen, 280) + if yyrt4494 { + if yyrl4494 <= cap(yyv4494) { + yyv4494 = yyv4494[:yyrl4494] } else { - yyv4485 = make([]ReplicationController, yyrl4485) + yyv4494 = make([]ReplicationController, yyrl4494) } } else { - yyv4485 = make([]ReplicationController, yyrl4485) + yyv4494 = make([]ReplicationController, yyrl4494) } - yyc4485 = true - yyrr4485 = len(yyv4485) - if yyrg4485 { - copy(yyv4485, yyv24485) + yyc4494 = true + yyrr4494 = len(yyv4494) + if yyrg4494 { + copy(yyv4494, yyv24494) } - } else if yyl4485 != len(yyv4485) { - yyv4485 = yyv4485[:yyl4485] - yyc4485 = true + } else if yyl4494 != len(yyv4494) { + yyv4494 = yyv4494[:yyl4494] + yyc4494 = true } - yyj4485 := 0 - for ; yyj4485 < yyrr4485; yyj4485++ { - yyh4485.ElemContainerState(yyj4485) + yyj4494 := 0 + for ; yyj4494 < yyrr4494; yyj4494++ { + yyh4494.ElemContainerState(yyj4494) if r.TryDecodeAsNil() { - yyv4485[yyj4485] = ReplicationController{} + yyv4494[yyj4494] = ReplicationController{} } else { - yyv4486 := &yyv4485[yyj4485] - yyv4486.CodecDecodeSelf(d) + yyv4495 := &yyv4494[yyj4494] + yyv4495.CodecDecodeSelf(d) } } - if yyrt4485 { - for ; yyj4485 < yyl4485; yyj4485++ { - yyv4485 = append(yyv4485, ReplicationController{}) - yyh4485.ElemContainerState(yyj4485) + if yyrt4494 { + for ; yyj4494 < yyl4494; yyj4494++ { + yyv4494 = append(yyv4494, ReplicationController{}) + yyh4494.ElemContainerState(yyj4494) if r.TryDecodeAsNil() { - yyv4485[yyj4485] = ReplicationController{} + yyv4494[yyj4494] = ReplicationController{} } else { - yyv4487 := &yyv4485[yyj4485] - yyv4487.CodecDecodeSelf(d) + yyv4496 := &yyv4494[yyj4494] + yyv4496.CodecDecodeSelf(d) } } } } else { - yyj4485 := 0 - for ; !r.CheckBreak(); yyj4485++ { + yyj4494 := 0 + for ; !r.CheckBreak(); yyj4494++ { - if yyj4485 >= len(yyv4485) { - yyv4485 = append(yyv4485, ReplicationController{}) // var yyz4485 ReplicationController - yyc4485 = true + if yyj4494 >= len(yyv4494) { + yyv4494 = append(yyv4494, ReplicationController{}) // var yyz4494 ReplicationController + yyc4494 = true } - yyh4485.ElemContainerState(yyj4485) - if yyj4485 < len(yyv4485) { + yyh4494.ElemContainerState(yyj4494) + if yyj4494 < len(yyv4494) { if r.TryDecodeAsNil() { - yyv4485[yyj4485] = ReplicationController{} + yyv4494[yyj4494] = ReplicationController{} } else { - yyv4488 := &yyv4485[yyj4485] - yyv4488.CodecDecodeSelf(d) + yyv4497 := &yyv4494[yyj4494] + yyv4497.CodecDecodeSelf(d) } } else { @@ -56938,17 +57016,17 @@ func (x codecSelfer1234) decSliceReplicationController(v *[]ReplicationControlle } } - if yyj4485 < len(yyv4485) { - yyv4485 = yyv4485[:yyj4485] - yyc4485 = true - } else if yyj4485 == 0 && yyv4485 == nil { - yyv4485 = []ReplicationController{} - yyc4485 = true + if yyj4494 < len(yyv4494) { + yyv4494 = yyv4494[:yyj4494] + yyc4494 = true + } else if yyj4494 == 0 && yyv4494 == nil { + yyv4494 = []ReplicationController{} + yyc4494 = true } } - yyh4485.End() - if yyc4485 { - *v = yyv4485 + yyh4494.End() + if yyc4494 { + *v = yyv4494 } } @@ -56957,10 +57035,10 @@ func (x codecSelfer1234) encSliceLoadBalancerIngress(v []LoadBalancerIngress, e z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4489 := range v { + for _, yyv4498 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4490 := &yyv4489 - yy4490.CodecEncodeSelf(e) + yy4499 := &yyv4498 + yy4499.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56970,83 +57048,83 @@ func (x codecSelfer1234) decSliceLoadBalancerIngress(v *[]LoadBalancerIngress, d z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4491 := *v - yyh4491, yyl4491 := z.DecSliceHelperStart() - var yyc4491 bool - if yyl4491 == 0 { - if yyv4491 == nil { - yyv4491 = []LoadBalancerIngress{} - yyc4491 = true - } else if len(yyv4491) != 0 { - yyv4491 = yyv4491[:0] - yyc4491 = true + yyv4500 := *v + yyh4500, yyl4500 := z.DecSliceHelperStart() + var yyc4500 bool + if yyl4500 == 0 { + if yyv4500 == nil { + yyv4500 = []LoadBalancerIngress{} + yyc4500 = true + } else if len(yyv4500) != 0 { + yyv4500 = yyv4500[:0] + yyc4500 = true } - } else if yyl4491 > 0 { - var yyrr4491, yyrl4491 int - var yyrt4491 bool - if yyl4491 > cap(yyv4491) { + } else if yyl4500 > 0 { + var yyrr4500, yyrl4500 int + var yyrt4500 bool + if yyl4500 > cap(yyv4500) { - yyrg4491 := len(yyv4491) > 0 - yyv24491 := yyv4491 - yyrl4491, yyrt4491 = z.DecInferLen(yyl4491, z.DecBasicHandle().MaxInitLen, 32) - if yyrt4491 { - if yyrl4491 <= cap(yyv4491) { - yyv4491 = yyv4491[:yyrl4491] + yyrg4500 := len(yyv4500) > 0 + yyv24500 := yyv4500 + yyrl4500, yyrt4500 = z.DecInferLen(yyl4500, z.DecBasicHandle().MaxInitLen, 32) + if yyrt4500 { + if yyrl4500 <= cap(yyv4500) { + yyv4500 = yyv4500[:yyrl4500] } else { - yyv4491 = make([]LoadBalancerIngress, yyrl4491) + yyv4500 = make([]LoadBalancerIngress, yyrl4500) } } else { - yyv4491 = make([]LoadBalancerIngress, yyrl4491) + yyv4500 = make([]LoadBalancerIngress, yyrl4500) } - yyc4491 = true - yyrr4491 = len(yyv4491) - if yyrg4491 { - copy(yyv4491, yyv24491) + yyc4500 = true + yyrr4500 = len(yyv4500) + if yyrg4500 { + copy(yyv4500, yyv24500) } - } else if yyl4491 != len(yyv4491) { - yyv4491 = yyv4491[:yyl4491] - yyc4491 = true + } else if yyl4500 != len(yyv4500) { + yyv4500 = yyv4500[:yyl4500] + yyc4500 = true } - yyj4491 := 0 - for ; yyj4491 < yyrr4491; yyj4491++ { - yyh4491.ElemContainerState(yyj4491) + yyj4500 := 0 + for ; yyj4500 < yyrr4500; yyj4500++ { + yyh4500.ElemContainerState(yyj4500) if r.TryDecodeAsNil() { - yyv4491[yyj4491] = LoadBalancerIngress{} + yyv4500[yyj4500] = LoadBalancerIngress{} } else { - yyv4492 := &yyv4491[yyj4491] - yyv4492.CodecDecodeSelf(d) + yyv4501 := &yyv4500[yyj4500] + yyv4501.CodecDecodeSelf(d) } } - if yyrt4491 { - for ; yyj4491 < yyl4491; yyj4491++ { - yyv4491 = append(yyv4491, LoadBalancerIngress{}) - yyh4491.ElemContainerState(yyj4491) + if yyrt4500 { + for ; yyj4500 < yyl4500; yyj4500++ { + yyv4500 = append(yyv4500, LoadBalancerIngress{}) + yyh4500.ElemContainerState(yyj4500) if r.TryDecodeAsNil() { - yyv4491[yyj4491] = LoadBalancerIngress{} + yyv4500[yyj4500] = LoadBalancerIngress{} } else { - yyv4493 := &yyv4491[yyj4491] - yyv4493.CodecDecodeSelf(d) + yyv4502 := &yyv4500[yyj4500] + yyv4502.CodecDecodeSelf(d) } } } } else { - yyj4491 := 0 - for ; !r.CheckBreak(); yyj4491++ { + yyj4500 := 0 + for ; !r.CheckBreak(); yyj4500++ { - if yyj4491 >= len(yyv4491) { - yyv4491 = append(yyv4491, LoadBalancerIngress{}) // var yyz4491 LoadBalancerIngress - yyc4491 = true + if yyj4500 >= len(yyv4500) { + yyv4500 = append(yyv4500, LoadBalancerIngress{}) // var yyz4500 LoadBalancerIngress + yyc4500 = true } - yyh4491.ElemContainerState(yyj4491) - if yyj4491 < len(yyv4491) { + yyh4500.ElemContainerState(yyj4500) + if yyj4500 < len(yyv4500) { if r.TryDecodeAsNil() { - yyv4491[yyj4491] = LoadBalancerIngress{} + yyv4500[yyj4500] = LoadBalancerIngress{} } else { - yyv4494 := &yyv4491[yyj4491] - yyv4494.CodecDecodeSelf(d) + yyv4503 := &yyv4500[yyj4500] + yyv4503.CodecDecodeSelf(d) } } else { @@ -57054,17 +57132,17 @@ func (x codecSelfer1234) decSliceLoadBalancerIngress(v *[]LoadBalancerIngress, d } } - if yyj4491 < len(yyv4491) { - yyv4491 = yyv4491[:yyj4491] - yyc4491 = true - } else if yyj4491 == 0 && yyv4491 == nil { - yyv4491 = []LoadBalancerIngress{} - yyc4491 = true + if yyj4500 < len(yyv4500) { + yyv4500 = yyv4500[:yyj4500] + yyc4500 = true + } else if yyj4500 == 0 && yyv4500 == nil { + yyv4500 = []LoadBalancerIngress{} + yyc4500 = true } } - yyh4491.End() - if yyc4491 { - *v = yyv4491 + yyh4500.End() + if yyc4500 { + *v = yyv4500 } } @@ -57073,10 +57151,10 @@ func (x codecSelfer1234) encSliceServicePort(v []ServicePort, e *codec1978.Encod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4495 := range v { + for _, yyv4504 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4496 := &yyv4495 - yy4496.CodecEncodeSelf(e) + yy4505 := &yyv4504 + yy4505.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57086,83 +57164,83 @@ func (x codecSelfer1234) decSliceServicePort(v *[]ServicePort, d *codec1978.Deco z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4497 := *v - yyh4497, yyl4497 := z.DecSliceHelperStart() - var yyc4497 bool - if yyl4497 == 0 { - if yyv4497 == nil { - yyv4497 = []ServicePort{} - yyc4497 = true - } else if len(yyv4497) != 0 { - yyv4497 = yyv4497[:0] - yyc4497 = true + yyv4506 := *v + yyh4506, yyl4506 := z.DecSliceHelperStart() + var yyc4506 bool + if yyl4506 == 0 { + if yyv4506 == nil { + yyv4506 = []ServicePort{} + yyc4506 = true + } else if len(yyv4506) != 0 { + yyv4506 = yyv4506[:0] + yyc4506 = true } - } else if yyl4497 > 0 { - var yyrr4497, yyrl4497 int - var yyrt4497 bool - if yyl4497 > cap(yyv4497) { + } else if yyl4506 > 0 { + var yyrr4506, yyrl4506 int + var yyrt4506 bool + if yyl4506 > cap(yyv4506) { - yyrg4497 := len(yyv4497) > 0 - yyv24497 := yyv4497 - yyrl4497, yyrt4497 = z.DecInferLen(yyl4497, z.DecBasicHandle().MaxInitLen, 80) - if yyrt4497 { - if yyrl4497 <= cap(yyv4497) { - yyv4497 = yyv4497[:yyrl4497] + yyrg4506 := len(yyv4506) > 0 + yyv24506 := yyv4506 + yyrl4506, yyrt4506 = z.DecInferLen(yyl4506, z.DecBasicHandle().MaxInitLen, 80) + if yyrt4506 { + if yyrl4506 <= cap(yyv4506) { + yyv4506 = yyv4506[:yyrl4506] } else { - yyv4497 = make([]ServicePort, yyrl4497) + yyv4506 = make([]ServicePort, yyrl4506) } } else { - yyv4497 = make([]ServicePort, yyrl4497) + yyv4506 = make([]ServicePort, yyrl4506) } - yyc4497 = true - yyrr4497 = len(yyv4497) - if yyrg4497 { - copy(yyv4497, yyv24497) + yyc4506 = true + yyrr4506 = len(yyv4506) + if yyrg4506 { + copy(yyv4506, yyv24506) } - } else if yyl4497 != len(yyv4497) { - yyv4497 = yyv4497[:yyl4497] - yyc4497 = true + } else if yyl4506 != len(yyv4506) { + yyv4506 = yyv4506[:yyl4506] + yyc4506 = true } - yyj4497 := 0 - for ; yyj4497 < yyrr4497; yyj4497++ { - yyh4497.ElemContainerState(yyj4497) + yyj4506 := 0 + for ; yyj4506 < yyrr4506; yyj4506++ { + yyh4506.ElemContainerState(yyj4506) if r.TryDecodeAsNil() { - yyv4497[yyj4497] = ServicePort{} + yyv4506[yyj4506] = ServicePort{} } else { - yyv4498 := &yyv4497[yyj4497] - yyv4498.CodecDecodeSelf(d) + yyv4507 := &yyv4506[yyj4506] + yyv4507.CodecDecodeSelf(d) } } - if yyrt4497 { - for ; yyj4497 < yyl4497; yyj4497++ { - yyv4497 = append(yyv4497, ServicePort{}) - yyh4497.ElemContainerState(yyj4497) + if yyrt4506 { + for ; yyj4506 < yyl4506; yyj4506++ { + yyv4506 = append(yyv4506, ServicePort{}) + yyh4506.ElemContainerState(yyj4506) if r.TryDecodeAsNil() { - yyv4497[yyj4497] = ServicePort{} + yyv4506[yyj4506] = ServicePort{} } else { - yyv4499 := &yyv4497[yyj4497] - yyv4499.CodecDecodeSelf(d) + yyv4508 := &yyv4506[yyj4506] + yyv4508.CodecDecodeSelf(d) } } } } else { - yyj4497 := 0 - for ; !r.CheckBreak(); yyj4497++ { + yyj4506 := 0 + for ; !r.CheckBreak(); yyj4506++ { - if yyj4497 >= len(yyv4497) { - yyv4497 = append(yyv4497, ServicePort{}) // var yyz4497 ServicePort - yyc4497 = true + if yyj4506 >= len(yyv4506) { + yyv4506 = append(yyv4506, ServicePort{}) // var yyz4506 ServicePort + yyc4506 = true } - yyh4497.ElemContainerState(yyj4497) - if yyj4497 < len(yyv4497) { + yyh4506.ElemContainerState(yyj4506) + if yyj4506 < len(yyv4506) { if r.TryDecodeAsNil() { - yyv4497[yyj4497] = ServicePort{} + yyv4506[yyj4506] = ServicePort{} } else { - yyv4500 := &yyv4497[yyj4497] - yyv4500.CodecDecodeSelf(d) + yyv4509 := &yyv4506[yyj4506] + yyv4509.CodecDecodeSelf(d) } } else { @@ -57170,17 +57248,17 @@ func (x codecSelfer1234) decSliceServicePort(v *[]ServicePort, d *codec1978.Deco } } - if yyj4497 < len(yyv4497) { - yyv4497 = yyv4497[:yyj4497] - yyc4497 = true - } else if yyj4497 == 0 && yyv4497 == nil { - yyv4497 = []ServicePort{} - yyc4497 = true + if yyj4506 < len(yyv4506) { + yyv4506 = yyv4506[:yyj4506] + yyc4506 = true + } else if yyj4506 == 0 && yyv4506 == nil { + yyv4506 = []ServicePort{} + yyc4506 = true } } - yyh4497.End() - if yyc4497 { - *v = yyv4497 + yyh4506.End() + if yyc4506 { + *v = yyv4506 } } @@ -57189,10 +57267,10 @@ func (x codecSelfer1234) encSliceService(v []Service, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4501 := range v { + for _, yyv4510 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4502 := &yyv4501 - yy4502.CodecEncodeSelf(e) + yy4511 := &yyv4510 + yy4511.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57202,83 +57280,83 @@ func (x codecSelfer1234) decSliceService(v *[]Service, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4503 := *v - yyh4503, yyl4503 := z.DecSliceHelperStart() - var yyc4503 bool - if yyl4503 == 0 { - if yyv4503 == nil { - yyv4503 = []Service{} - yyc4503 = true - } else if len(yyv4503) != 0 { - yyv4503 = yyv4503[:0] - yyc4503 = true + yyv4512 := *v + yyh4512, yyl4512 := z.DecSliceHelperStart() + var yyc4512 bool + if yyl4512 == 0 { + if yyv4512 == nil { + yyv4512 = []Service{} + yyc4512 = true + } else if len(yyv4512) != 0 { + yyv4512 = yyv4512[:0] + yyc4512 = true } - } else if yyl4503 > 0 { - var yyrr4503, yyrl4503 int - var yyrt4503 bool - if yyl4503 > cap(yyv4503) { + } else if yyl4512 > 0 { + var yyrr4512, yyrl4512 int + var yyrt4512 bool + if yyl4512 > cap(yyv4512) { - yyrg4503 := len(yyv4503) > 0 - yyv24503 := yyv4503 - yyrl4503, yyrt4503 = z.DecInferLen(yyl4503, z.DecBasicHandle().MaxInitLen, 432) - if yyrt4503 { - if yyrl4503 <= cap(yyv4503) { - yyv4503 = yyv4503[:yyrl4503] + yyrg4512 := len(yyv4512) > 0 + yyv24512 := yyv4512 + yyrl4512, yyrt4512 = z.DecInferLen(yyl4512, z.DecBasicHandle().MaxInitLen, 432) + if yyrt4512 { + if yyrl4512 <= cap(yyv4512) { + yyv4512 = yyv4512[:yyrl4512] } else { - yyv4503 = make([]Service, yyrl4503) + yyv4512 = make([]Service, yyrl4512) } } else { - yyv4503 = make([]Service, yyrl4503) + yyv4512 = make([]Service, yyrl4512) } - yyc4503 = true - yyrr4503 = len(yyv4503) - if yyrg4503 { - copy(yyv4503, yyv24503) + yyc4512 = true + yyrr4512 = len(yyv4512) + if yyrg4512 { + copy(yyv4512, yyv24512) } - } else if yyl4503 != len(yyv4503) { - yyv4503 = yyv4503[:yyl4503] - yyc4503 = true + } else if yyl4512 != len(yyv4512) { + yyv4512 = yyv4512[:yyl4512] + yyc4512 = true } - yyj4503 := 0 - for ; yyj4503 < yyrr4503; yyj4503++ { - yyh4503.ElemContainerState(yyj4503) + yyj4512 := 0 + for ; yyj4512 < yyrr4512; yyj4512++ { + yyh4512.ElemContainerState(yyj4512) if r.TryDecodeAsNil() { - yyv4503[yyj4503] = Service{} + yyv4512[yyj4512] = Service{} } else { - yyv4504 := &yyv4503[yyj4503] - yyv4504.CodecDecodeSelf(d) + yyv4513 := &yyv4512[yyj4512] + yyv4513.CodecDecodeSelf(d) } } - if yyrt4503 { - for ; yyj4503 < yyl4503; yyj4503++ { - yyv4503 = append(yyv4503, Service{}) - yyh4503.ElemContainerState(yyj4503) + if yyrt4512 { + for ; yyj4512 < yyl4512; yyj4512++ { + yyv4512 = append(yyv4512, Service{}) + yyh4512.ElemContainerState(yyj4512) if r.TryDecodeAsNil() { - yyv4503[yyj4503] = Service{} + yyv4512[yyj4512] = Service{} } else { - yyv4505 := &yyv4503[yyj4503] - yyv4505.CodecDecodeSelf(d) + yyv4514 := &yyv4512[yyj4512] + yyv4514.CodecDecodeSelf(d) } } } } else { - yyj4503 := 0 - for ; !r.CheckBreak(); yyj4503++ { + yyj4512 := 0 + for ; !r.CheckBreak(); yyj4512++ { - if yyj4503 >= len(yyv4503) { - yyv4503 = append(yyv4503, Service{}) // var yyz4503 Service - yyc4503 = true + if yyj4512 >= len(yyv4512) { + yyv4512 = append(yyv4512, Service{}) // var yyz4512 Service + yyc4512 = true } - yyh4503.ElemContainerState(yyj4503) - if yyj4503 < len(yyv4503) { + yyh4512.ElemContainerState(yyj4512) + if yyj4512 < len(yyv4512) { if r.TryDecodeAsNil() { - yyv4503[yyj4503] = Service{} + yyv4512[yyj4512] = Service{} } else { - yyv4506 := &yyv4503[yyj4503] - yyv4506.CodecDecodeSelf(d) + yyv4515 := &yyv4512[yyj4512] + yyv4515.CodecDecodeSelf(d) } } else { @@ -57286,17 +57364,17 @@ func (x codecSelfer1234) decSliceService(v *[]Service, d *codec1978.Decoder) { } } - if yyj4503 < len(yyv4503) { - yyv4503 = yyv4503[:yyj4503] - yyc4503 = true - } else if yyj4503 == 0 && yyv4503 == nil { - yyv4503 = []Service{} - yyc4503 = true + if yyj4512 < len(yyv4512) { + yyv4512 = yyv4512[:yyj4512] + yyc4512 = true + } else if yyj4512 == 0 && yyv4512 == nil { + yyv4512 = []Service{} + yyc4512 = true } } - yyh4503.End() - if yyc4503 { - *v = yyv4503 + yyh4512.End() + if yyc4512 { + *v = yyv4512 } } @@ -57305,10 +57383,10 @@ func (x codecSelfer1234) encSliceObjectReference(v []ObjectReference, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4507 := range v { + for _, yyv4516 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4508 := &yyv4507 - yy4508.CodecEncodeSelf(e) + yy4517 := &yyv4516 + yy4517.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57318,83 +57396,83 @@ func (x codecSelfer1234) decSliceObjectReference(v *[]ObjectReference, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4509 := *v - yyh4509, yyl4509 := z.DecSliceHelperStart() - var yyc4509 bool - if yyl4509 == 0 { - if yyv4509 == nil { - yyv4509 = []ObjectReference{} - yyc4509 = true - } else if len(yyv4509) != 0 { - yyv4509 = yyv4509[:0] - yyc4509 = true + yyv4518 := *v + yyh4518, yyl4518 := z.DecSliceHelperStart() + var yyc4518 bool + if yyl4518 == 0 { + if yyv4518 == nil { + yyv4518 = []ObjectReference{} + yyc4518 = true + } else if len(yyv4518) != 0 { + yyv4518 = yyv4518[:0] + yyc4518 = true } - } else if yyl4509 > 0 { - var yyrr4509, yyrl4509 int - var yyrt4509 bool - if yyl4509 > cap(yyv4509) { + } else if yyl4518 > 0 { + var yyrr4518, yyrl4518 int + var yyrt4518 bool + if yyl4518 > cap(yyv4518) { - yyrg4509 := len(yyv4509) > 0 - yyv24509 := yyv4509 - yyrl4509, yyrt4509 = z.DecInferLen(yyl4509, z.DecBasicHandle().MaxInitLen, 112) - if yyrt4509 { - if yyrl4509 <= cap(yyv4509) { - yyv4509 = yyv4509[:yyrl4509] + yyrg4518 := len(yyv4518) > 0 + yyv24518 := yyv4518 + yyrl4518, yyrt4518 = z.DecInferLen(yyl4518, z.DecBasicHandle().MaxInitLen, 112) + if yyrt4518 { + if yyrl4518 <= cap(yyv4518) { + yyv4518 = yyv4518[:yyrl4518] } else { - yyv4509 = make([]ObjectReference, yyrl4509) + yyv4518 = make([]ObjectReference, yyrl4518) } } else { - yyv4509 = make([]ObjectReference, yyrl4509) + yyv4518 = make([]ObjectReference, yyrl4518) } - yyc4509 = true - yyrr4509 = len(yyv4509) - if yyrg4509 { - copy(yyv4509, yyv24509) + yyc4518 = true + yyrr4518 = len(yyv4518) + if yyrg4518 { + copy(yyv4518, yyv24518) } - } else if yyl4509 != len(yyv4509) { - yyv4509 = yyv4509[:yyl4509] - yyc4509 = true + } else if yyl4518 != len(yyv4518) { + yyv4518 = yyv4518[:yyl4518] + yyc4518 = true } - yyj4509 := 0 - for ; yyj4509 < yyrr4509; yyj4509++ { - yyh4509.ElemContainerState(yyj4509) + yyj4518 := 0 + for ; yyj4518 < yyrr4518; yyj4518++ { + yyh4518.ElemContainerState(yyj4518) if r.TryDecodeAsNil() { - yyv4509[yyj4509] = ObjectReference{} + yyv4518[yyj4518] = ObjectReference{} } else { - yyv4510 := &yyv4509[yyj4509] - yyv4510.CodecDecodeSelf(d) + yyv4519 := &yyv4518[yyj4518] + yyv4519.CodecDecodeSelf(d) } } - if yyrt4509 { - for ; yyj4509 < yyl4509; yyj4509++ { - yyv4509 = append(yyv4509, ObjectReference{}) - yyh4509.ElemContainerState(yyj4509) + if yyrt4518 { + for ; yyj4518 < yyl4518; yyj4518++ { + yyv4518 = append(yyv4518, ObjectReference{}) + yyh4518.ElemContainerState(yyj4518) if r.TryDecodeAsNil() { - yyv4509[yyj4509] = ObjectReference{} + yyv4518[yyj4518] = ObjectReference{} } else { - yyv4511 := &yyv4509[yyj4509] - yyv4511.CodecDecodeSelf(d) + yyv4520 := &yyv4518[yyj4518] + yyv4520.CodecDecodeSelf(d) } } } } else { - yyj4509 := 0 - for ; !r.CheckBreak(); yyj4509++ { + yyj4518 := 0 + for ; !r.CheckBreak(); yyj4518++ { - if yyj4509 >= len(yyv4509) { - yyv4509 = append(yyv4509, ObjectReference{}) // var yyz4509 ObjectReference - yyc4509 = true + if yyj4518 >= len(yyv4518) { + yyv4518 = append(yyv4518, ObjectReference{}) // var yyz4518 ObjectReference + yyc4518 = true } - yyh4509.ElemContainerState(yyj4509) - if yyj4509 < len(yyv4509) { + yyh4518.ElemContainerState(yyj4518) + if yyj4518 < len(yyv4518) { if r.TryDecodeAsNil() { - yyv4509[yyj4509] = ObjectReference{} + yyv4518[yyj4518] = ObjectReference{} } else { - yyv4512 := &yyv4509[yyj4509] - yyv4512.CodecDecodeSelf(d) + yyv4521 := &yyv4518[yyj4518] + yyv4521.CodecDecodeSelf(d) } } else { @@ -57402,17 +57480,17 @@ func (x codecSelfer1234) decSliceObjectReference(v *[]ObjectReference, d *codec1 } } - if yyj4509 < len(yyv4509) { - yyv4509 = yyv4509[:yyj4509] - yyc4509 = true - } else if yyj4509 == 0 && yyv4509 == nil { - yyv4509 = []ObjectReference{} - yyc4509 = true + if yyj4518 < len(yyv4518) { + yyv4518 = yyv4518[:yyj4518] + yyc4518 = true + } else if yyj4518 == 0 && yyv4518 == nil { + yyv4518 = []ObjectReference{} + yyc4518 = true } } - yyh4509.End() - if yyc4509 { - *v = yyv4509 + yyh4518.End() + if yyc4518 { + *v = yyv4518 } } @@ -57421,10 +57499,10 @@ func (x codecSelfer1234) encSliceServiceAccount(v []ServiceAccount, e *codec1978 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4513 := range v { + for _, yyv4522 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4514 := &yyv4513 - yy4514.CodecEncodeSelf(e) + yy4523 := &yyv4522 + yy4523.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57434,83 +57512,83 @@ func (x codecSelfer1234) decSliceServiceAccount(v *[]ServiceAccount, d *codec197 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4515 := *v - yyh4515, yyl4515 := z.DecSliceHelperStart() - var yyc4515 bool - if yyl4515 == 0 { - if yyv4515 == nil { - yyv4515 = []ServiceAccount{} - yyc4515 = true - } else if len(yyv4515) != 0 { - yyv4515 = yyv4515[:0] - yyc4515 = true + yyv4524 := *v + yyh4524, yyl4524 := z.DecSliceHelperStart() + var yyc4524 bool + if yyl4524 == 0 { + if yyv4524 == nil { + yyv4524 = []ServiceAccount{} + yyc4524 = true + } else if len(yyv4524) != 0 { + yyv4524 = yyv4524[:0] + yyc4524 = true } - } else if yyl4515 > 0 { - var yyrr4515, yyrl4515 int - var yyrt4515 bool - if yyl4515 > cap(yyv4515) { + } else if yyl4524 > 0 { + var yyrr4524, yyrl4524 int + var yyrt4524 bool + if yyl4524 > cap(yyv4524) { - yyrg4515 := len(yyv4515) > 0 - yyv24515 := yyv4515 - yyrl4515, yyrt4515 = z.DecInferLen(yyl4515, z.DecBasicHandle().MaxInitLen, 288) - if yyrt4515 { - if yyrl4515 <= cap(yyv4515) { - yyv4515 = yyv4515[:yyrl4515] + yyrg4524 := len(yyv4524) > 0 + yyv24524 := yyv4524 + yyrl4524, yyrt4524 = z.DecInferLen(yyl4524, z.DecBasicHandle().MaxInitLen, 288) + if yyrt4524 { + if yyrl4524 <= cap(yyv4524) { + yyv4524 = yyv4524[:yyrl4524] } else { - yyv4515 = make([]ServiceAccount, yyrl4515) + yyv4524 = make([]ServiceAccount, yyrl4524) } } else { - yyv4515 = make([]ServiceAccount, yyrl4515) + yyv4524 = make([]ServiceAccount, yyrl4524) } - yyc4515 = true - yyrr4515 = len(yyv4515) - if yyrg4515 { - copy(yyv4515, yyv24515) + yyc4524 = true + yyrr4524 = len(yyv4524) + if yyrg4524 { + copy(yyv4524, yyv24524) } - } else if yyl4515 != len(yyv4515) { - yyv4515 = yyv4515[:yyl4515] - yyc4515 = true + } else if yyl4524 != len(yyv4524) { + yyv4524 = yyv4524[:yyl4524] + yyc4524 = true } - yyj4515 := 0 - for ; yyj4515 < yyrr4515; yyj4515++ { - yyh4515.ElemContainerState(yyj4515) + yyj4524 := 0 + for ; yyj4524 < yyrr4524; yyj4524++ { + yyh4524.ElemContainerState(yyj4524) if r.TryDecodeAsNil() { - yyv4515[yyj4515] = ServiceAccount{} + yyv4524[yyj4524] = ServiceAccount{} } else { - yyv4516 := &yyv4515[yyj4515] - yyv4516.CodecDecodeSelf(d) + yyv4525 := &yyv4524[yyj4524] + yyv4525.CodecDecodeSelf(d) } } - if yyrt4515 { - for ; yyj4515 < yyl4515; yyj4515++ { - yyv4515 = append(yyv4515, ServiceAccount{}) - yyh4515.ElemContainerState(yyj4515) + if yyrt4524 { + for ; yyj4524 < yyl4524; yyj4524++ { + yyv4524 = append(yyv4524, ServiceAccount{}) + yyh4524.ElemContainerState(yyj4524) if r.TryDecodeAsNil() { - yyv4515[yyj4515] = ServiceAccount{} + yyv4524[yyj4524] = ServiceAccount{} } else { - yyv4517 := &yyv4515[yyj4515] - yyv4517.CodecDecodeSelf(d) + yyv4526 := &yyv4524[yyj4524] + yyv4526.CodecDecodeSelf(d) } } } } else { - yyj4515 := 0 - for ; !r.CheckBreak(); yyj4515++ { + yyj4524 := 0 + for ; !r.CheckBreak(); yyj4524++ { - if yyj4515 >= len(yyv4515) { - yyv4515 = append(yyv4515, ServiceAccount{}) // var yyz4515 ServiceAccount - yyc4515 = true + if yyj4524 >= len(yyv4524) { + yyv4524 = append(yyv4524, ServiceAccount{}) // var yyz4524 ServiceAccount + yyc4524 = true } - yyh4515.ElemContainerState(yyj4515) - if yyj4515 < len(yyv4515) { + yyh4524.ElemContainerState(yyj4524) + if yyj4524 < len(yyv4524) { if r.TryDecodeAsNil() { - yyv4515[yyj4515] = ServiceAccount{} + yyv4524[yyj4524] = ServiceAccount{} } else { - yyv4518 := &yyv4515[yyj4515] - yyv4518.CodecDecodeSelf(d) + yyv4527 := &yyv4524[yyj4524] + yyv4527.CodecDecodeSelf(d) } } else { @@ -57518,17 +57596,17 @@ func (x codecSelfer1234) decSliceServiceAccount(v *[]ServiceAccount, d *codec197 } } - if yyj4515 < len(yyv4515) { - yyv4515 = yyv4515[:yyj4515] - yyc4515 = true - } else if yyj4515 == 0 && yyv4515 == nil { - yyv4515 = []ServiceAccount{} - yyc4515 = true + if yyj4524 < len(yyv4524) { + yyv4524 = yyv4524[:yyj4524] + yyc4524 = true + } else if yyj4524 == 0 && yyv4524 == nil { + yyv4524 = []ServiceAccount{} + yyc4524 = true } } - yyh4515.End() - if yyc4515 { - *v = yyv4515 + yyh4524.End() + if yyc4524 { + *v = yyv4524 } } @@ -57537,10 +57615,10 @@ func (x codecSelfer1234) encSliceEndpointSubset(v []EndpointSubset, e *codec1978 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4519 := range v { + for _, yyv4528 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4520 := &yyv4519 - yy4520.CodecEncodeSelf(e) + yy4529 := &yyv4528 + yy4529.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57550,83 +57628,83 @@ func (x codecSelfer1234) decSliceEndpointSubset(v *[]EndpointSubset, d *codec197 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4521 := *v - yyh4521, yyl4521 := z.DecSliceHelperStart() - var yyc4521 bool - if yyl4521 == 0 { - if yyv4521 == nil { - yyv4521 = []EndpointSubset{} - yyc4521 = true - } else if len(yyv4521) != 0 { - yyv4521 = yyv4521[:0] - yyc4521 = true + yyv4530 := *v + yyh4530, yyl4530 := z.DecSliceHelperStart() + var yyc4530 bool + if yyl4530 == 0 { + if yyv4530 == nil { + yyv4530 = []EndpointSubset{} + yyc4530 = true + } else if len(yyv4530) != 0 { + yyv4530 = yyv4530[:0] + yyc4530 = true } - } else if yyl4521 > 0 { - var yyrr4521, yyrl4521 int - var yyrt4521 bool - if yyl4521 > cap(yyv4521) { + } else if yyl4530 > 0 { + var yyrr4530, yyrl4530 int + var yyrt4530 bool + if yyl4530 > cap(yyv4530) { - yyrg4521 := len(yyv4521) > 0 - yyv24521 := yyv4521 - yyrl4521, yyrt4521 = z.DecInferLen(yyl4521, z.DecBasicHandle().MaxInitLen, 72) - if yyrt4521 { - if yyrl4521 <= cap(yyv4521) { - yyv4521 = yyv4521[:yyrl4521] + yyrg4530 := len(yyv4530) > 0 + yyv24530 := yyv4530 + yyrl4530, yyrt4530 = z.DecInferLen(yyl4530, z.DecBasicHandle().MaxInitLen, 72) + if yyrt4530 { + if yyrl4530 <= cap(yyv4530) { + yyv4530 = yyv4530[:yyrl4530] } else { - yyv4521 = make([]EndpointSubset, yyrl4521) + yyv4530 = make([]EndpointSubset, yyrl4530) } } else { - yyv4521 = make([]EndpointSubset, yyrl4521) + yyv4530 = make([]EndpointSubset, yyrl4530) } - yyc4521 = true - yyrr4521 = len(yyv4521) - if yyrg4521 { - copy(yyv4521, yyv24521) + yyc4530 = true + yyrr4530 = len(yyv4530) + if yyrg4530 { + copy(yyv4530, yyv24530) } - } else if yyl4521 != len(yyv4521) { - yyv4521 = yyv4521[:yyl4521] - yyc4521 = true + } else if yyl4530 != len(yyv4530) { + yyv4530 = yyv4530[:yyl4530] + yyc4530 = true } - yyj4521 := 0 - for ; yyj4521 < yyrr4521; yyj4521++ { - yyh4521.ElemContainerState(yyj4521) + yyj4530 := 0 + for ; yyj4530 < yyrr4530; yyj4530++ { + yyh4530.ElemContainerState(yyj4530) if r.TryDecodeAsNil() { - yyv4521[yyj4521] = EndpointSubset{} + yyv4530[yyj4530] = EndpointSubset{} } else { - yyv4522 := &yyv4521[yyj4521] - yyv4522.CodecDecodeSelf(d) + yyv4531 := &yyv4530[yyj4530] + yyv4531.CodecDecodeSelf(d) } } - if yyrt4521 { - for ; yyj4521 < yyl4521; yyj4521++ { - yyv4521 = append(yyv4521, EndpointSubset{}) - yyh4521.ElemContainerState(yyj4521) + if yyrt4530 { + for ; yyj4530 < yyl4530; yyj4530++ { + yyv4530 = append(yyv4530, EndpointSubset{}) + yyh4530.ElemContainerState(yyj4530) if r.TryDecodeAsNil() { - yyv4521[yyj4521] = EndpointSubset{} + yyv4530[yyj4530] = EndpointSubset{} } else { - yyv4523 := &yyv4521[yyj4521] - yyv4523.CodecDecodeSelf(d) + yyv4532 := &yyv4530[yyj4530] + yyv4532.CodecDecodeSelf(d) } } } } else { - yyj4521 := 0 - for ; !r.CheckBreak(); yyj4521++ { + yyj4530 := 0 + for ; !r.CheckBreak(); yyj4530++ { - if yyj4521 >= len(yyv4521) { - yyv4521 = append(yyv4521, EndpointSubset{}) // var yyz4521 EndpointSubset - yyc4521 = true + if yyj4530 >= len(yyv4530) { + yyv4530 = append(yyv4530, EndpointSubset{}) // var yyz4530 EndpointSubset + yyc4530 = true } - yyh4521.ElemContainerState(yyj4521) - if yyj4521 < len(yyv4521) { + yyh4530.ElemContainerState(yyj4530) + if yyj4530 < len(yyv4530) { if r.TryDecodeAsNil() { - yyv4521[yyj4521] = EndpointSubset{} + yyv4530[yyj4530] = EndpointSubset{} } else { - yyv4524 := &yyv4521[yyj4521] - yyv4524.CodecDecodeSelf(d) + yyv4533 := &yyv4530[yyj4530] + yyv4533.CodecDecodeSelf(d) } } else { @@ -57634,17 +57712,17 @@ func (x codecSelfer1234) decSliceEndpointSubset(v *[]EndpointSubset, d *codec197 } } - if yyj4521 < len(yyv4521) { - yyv4521 = yyv4521[:yyj4521] - yyc4521 = true - } else if yyj4521 == 0 && yyv4521 == nil { - yyv4521 = []EndpointSubset{} - yyc4521 = true + if yyj4530 < len(yyv4530) { + yyv4530 = yyv4530[:yyj4530] + yyc4530 = true + } else if yyj4530 == 0 && yyv4530 == nil { + yyv4530 = []EndpointSubset{} + yyc4530 = true } } - yyh4521.End() - if yyc4521 { - *v = yyv4521 + yyh4530.End() + if yyc4530 { + *v = yyv4530 } } @@ -57653,10 +57731,10 @@ func (x codecSelfer1234) encSliceEndpointAddress(v []EndpointAddress, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4525 := range v { + for _, yyv4534 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4526 := &yyv4525 - yy4526.CodecEncodeSelf(e) + yy4535 := &yyv4534 + yy4535.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57666,83 +57744,83 @@ func (x codecSelfer1234) decSliceEndpointAddress(v *[]EndpointAddress, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4527 := *v - yyh4527, yyl4527 := z.DecSliceHelperStart() - var yyc4527 bool - if yyl4527 == 0 { - if yyv4527 == nil { - yyv4527 = []EndpointAddress{} - yyc4527 = true - } else if len(yyv4527) != 0 { - yyv4527 = yyv4527[:0] - yyc4527 = true + yyv4536 := *v + yyh4536, yyl4536 := z.DecSliceHelperStart() + var yyc4536 bool + if yyl4536 == 0 { + if yyv4536 == nil { + yyv4536 = []EndpointAddress{} + yyc4536 = true + } else if len(yyv4536) != 0 { + yyv4536 = yyv4536[:0] + yyc4536 = true } - } else if yyl4527 > 0 { - var yyrr4527, yyrl4527 int - var yyrt4527 bool - if yyl4527 > cap(yyv4527) { + } else if yyl4536 > 0 { + var yyrr4536, yyrl4536 int + var yyrt4536 bool + if yyl4536 > cap(yyv4536) { - yyrg4527 := len(yyv4527) > 0 - yyv24527 := yyv4527 - yyrl4527, yyrt4527 = z.DecInferLen(yyl4527, z.DecBasicHandle().MaxInitLen, 40) - if yyrt4527 { - if yyrl4527 <= cap(yyv4527) { - yyv4527 = yyv4527[:yyrl4527] + yyrg4536 := len(yyv4536) > 0 + yyv24536 := yyv4536 + yyrl4536, yyrt4536 = z.DecInferLen(yyl4536, z.DecBasicHandle().MaxInitLen, 48) + if yyrt4536 { + if yyrl4536 <= cap(yyv4536) { + yyv4536 = yyv4536[:yyrl4536] } else { - yyv4527 = make([]EndpointAddress, yyrl4527) + yyv4536 = make([]EndpointAddress, yyrl4536) } } else { - yyv4527 = make([]EndpointAddress, yyrl4527) + yyv4536 = make([]EndpointAddress, yyrl4536) } - yyc4527 = true - yyrr4527 = len(yyv4527) - if yyrg4527 { - copy(yyv4527, yyv24527) + yyc4536 = true + yyrr4536 = len(yyv4536) + if yyrg4536 { + copy(yyv4536, yyv24536) } - } else if yyl4527 != len(yyv4527) { - yyv4527 = yyv4527[:yyl4527] - yyc4527 = true + } else if yyl4536 != len(yyv4536) { + yyv4536 = yyv4536[:yyl4536] + yyc4536 = true } - yyj4527 := 0 - for ; yyj4527 < yyrr4527; yyj4527++ { - yyh4527.ElemContainerState(yyj4527) + yyj4536 := 0 + for ; yyj4536 < yyrr4536; yyj4536++ { + yyh4536.ElemContainerState(yyj4536) if r.TryDecodeAsNil() { - yyv4527[yyj4527] = EndpointAddress{} + yyv4536[yyj4536] = EndpointAddress{} } else { - yyv4528 := &yyv4527[yyj4527] - yyv4528.CodecDecodeSelf(d) + yyv4537 := &yyv4536[yyj4536] + yyv4537.CodecDecodeSelf(d) } } - if yyrt4527 { - for ; yyj4527 < yyl4527; yyj4527++ { - yyv4527 = append(yyv4527, EndpointAddress{}) - yyh4527.ElemContainerState(yyj4527) + if yyrt4536 { + for ; yyj4536 < yyl4536; yyj4536++ { + yyv4536 = append(yyv4536, EndpointAddress{}) + yyh4536.ElemContainerState(yyj4536) if r.TryDecodeAsNil() { - yyv4527[yyj4527] = EndpointAddress{} + yyv4536[yyj4536] = EndpointAddress{} } else { - yyv4529 := &yyv4527[yyj4527] - yyv4529.CodecDecodeSelf(d) + yyv4538 := &yyv4536[yyj4536] + yyv4538.CodecDecodeSelf(d) } } } } else { - yyj4527 := 0 - for ; !r.CheckBreak(); yyj4527++ { + yyj4536 := 0 + for ; !r.CheckBreak(); yyj4536++ { - if yyj4527 >= len(yyv4527) { - yyv4527 = append(yyv4527, EndpointAddress{}) // var yyz4527 EndpointAddress - yyc4527 = true + if yyj4536 >= len(yyv4536) { + yyv4536 = append(yyv4536, EndpointAddress{}) // var yyz4536 EndpointAddress + yyc4536 = true } - yyh4527.ElemContainerState(yyj4527) - if yyj4527 < len(yyv4527) { + yyh4536.ElemContainerState(yyj4536) + if yyj4536 < len(yyv4536) { if r.TryDecodeAsNil() { - yyv4527[yyj4527] = EndpointAddress{} + yyv4536[yyj4536] = EndpointAddress{} } else { - yyv4530 := &yyv4527[yyj4527] - yyv4530.CodecDecodeSelf(d) + yyv4539 := &yyv4536[yyj4536] + yyv4539.CodecDecodeSelf(d) } } else { @@ -57750,17 +57828,17 @@ func (x codecSelfer1234) decSliceEndpointAddress(v *[]EndpointAddress, d *codec1 } } - if yyj4527 < len(yyv4527) { - yyv4527 = yyv4527[:yyj4527] - yyc4527 = true - } else if yyj4527 == 0 && yyv4527 == nil { - yyv4527 = []EndpointAddress{} - yyc4527 = true + if yyj4536 < len(yyv4536) { + yyv4536 = yyv4536[:yyj4536] + yyc4536 = true + } else if yyj4536 == 0 && yyv4536 == nil { + yyv4536 = []EndpointAddress{} + yyc4536 = true } } - yyh4527.End() - if yyc4527 { - *v = yyv4527 + yyh4536.End() + if yyc4536 { + *v = yyv4536 } } @@ -57769,10 +57847,10 @@ func (x codecSelfer1234) encSliceEndpointPort(v []EndpointPort, e *codec1978.Enc z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4531 := range v { + for _, yyv4540 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4532 := &yyv4531 - yy4532.CodecEncodeSelf(e) + yy4541 := &yyv4540 + yy4541.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57782,83 +57860,83 @@ func (x codecSelfer1234) decSliceEndpointPort(v *[]EndpointPort, d *codec1978.De z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4533 := *v - yyh4533, yyl4533 := z.DecSliceHelperStart() - var yyc4533 bool - if yyl4533 == 0 { - if yyv4533 == nil { - yyv4533 = []EndpointPort{} - yyc4533 = true - } else if len(yyv4533) != 0 { - yyv4533 = yyv4533[:0] - yyc4533 = true + yyv4542 := *v + yyh4542, yyl4542 := z.DecSliceHelperStart() + var yyc4542 bool + if yyl4542 == 0 { + if yyv4542 == nil { + yyv4542 = []EndpointPort{} + yyc4542 = true + } else if len(yyv4542) != 0 { + yyv4542 = yyv4542[:0] + yyc4542 = true } - } else if yyl4533 > 0 { - var yyrr4533, yyrl4533 int - var yyrt4533 bool - if yyl4533 > cap(yyv4533) { + } else if yyl4542 > 0 { + var yyrr4542, yyrl4542 int + var yyrt4542 bool + if yyl4542 > cap(yyv4542) { - yyrg4533 := len(yyv4533) > 0 - yyv24533 := yyv4533 - yyrl4533, yyrt4533 = z.DecInferLen(yyl4533, z.DecBasicHandle().MaxInitLen, 40) - if yyrt4533 { - if yyrl4533 <= cap(yyv4533) { - yyv4533 = yyv4533[:yyrl4533] + yyrg4542 := len(yyv4542) > 0 + yyv24542 := yyv4542 + yyrl4542, yyrt4542 = z.DecInferLen(yyl4542, z.DecBasicHandle().MaxInitLen, 40) + if yyrt4542 { + if yyrl4542 <= cap(yyv4542) { + yyv4542 = yyv4542[:yyrl4542] } else { - yyv4533 = make([]EndpointPort, yyrl4533) + yyv4542 = make([]EndpointPort, yyrl4542) } } else { - yyv4533 = make([]EndpointPort, yyrl4533) + yyv4542 = make([]EndpointPort, yyrl4542) } - yyc4533 = true - yyrr4533 = len(yyv4533) - if yyrg4533 { - copy(yyv4533, yyv24533) + yyc4542 = true + yyrr4542 = len(yyv4542) + if yyrg4542 { + copy(yyv4542, yyv24542) } - } else if yyl4533 != len(yyv4533) { - yyv4533 = yyv4533[:yyl4533] - yyc4533 = true + } else if yyl4542 != len(yyv4542) { + yyv4542 = yyv4542[:yyl4542] + yyc4542 = true } - yyj4533 := 0 - for ; yyj4533 < yyrr4533; yyj4533++ { - yyh4533.ElemContainerState(yyj4533) + yyj4542 := 0 + for ; yyj4542 < yyrr4542; yyj4542++ { + yyh4542.ElemContainerState(yyj4542) if r.TryDecodeAsNil() { - yyv4533[yyj4533] = EndpointPort{} + yyv4542[yyj4542] = EndpointPort{} } else { - yyv4534 := &yyv4533[yyj4533] - yyv4534.CodecDecodeSelf(d) + yyv4543 := &yyv4542[yyj4542] + yyv4543.CodecDecodeSelf(d) } } - if yyrt4533 { - for ; yyj4533 < yyl4533; yyj4533++ { - yyv4533 = append(yyv4533, EndpointPort{}) - yyh4533.ElemContainerState(yyj4533) + if yyrt4542 { + for ; yyj4542 < yyl4542; yyj4542++ { + yyv4542 = append(yyv4542, EndpointPort{}) + yyh4542.ElemContainerState(yyj4542) if r.TryDecodeAsNil() { - yyv4533[yyj4533] = EndpointPort{} + yyv4542[yyj4542] = EndpointPort{} } else { - yyv4535 := &yyv4533[yyj4533] - yyv4535.CodecDecodeSelf(d) + yyv4544 := &yyv4542[yyj4542] + yyv4544.CodecDecodeSelf(d) } } } } else { - yyj4533 := 0 - for ; !r.CheckBreak(); yyj4533++ { + yyj4542 := 0 + for ; !r.CheckBreak(); yyj4542++ { - if yyj4533 >= len(yyv4533) { - yyv4533 = append(yyv4533, EndpointPort{}) // var yyz4533 EndpointPort - yyc4533 = true + if yyj4542 >= len(yyv4542) { + yyv4542 = append(yyv4542, EndpointPort{}) // var yyz4542 EndpointPort + yyc4542 = true } - yyh4533.ElemContainerState(yyj4533) - if yyj4533 < len(yyv4533) { + yyh4542.ElemContainerState(yyj4542) + if yyj4542 < len(yyv4542) { if r.TryDecodeAsNil() { - yyv4533[yyj4533] = EndpointPort{} + yyv4542[yyj4542] = EndpointPort{} } else { - yyv4536 := &yyv4533[yyj4533] - yyv4536.CodecDecodeSelf(d) + yyv4545 := &yyv4542[yyj4542] + yyv4545.CodecDecodeSelf(d) } } else { @@ -57866,17 +57944,17 @@ func (x codecSelfer1234) decSliceEndpointPort(v *[]EndpointPort, d *codec1978.De } } - if yyj4533 < len(yyv4533) { - yyv4533 = yyv4533[:yyj4533] - yyc4533 = true - } else if yyj4533 == 0 && yyv4533 == nil { - yyv4533 = []EndpointPort{} - yyc4533 = true + if yyj4542 < len(yyv4542) { + yyv4542 = yyv4542[:yyj4542] + yyc4542 = true + } else if yyj4542 == 0 && yyv4542 == nil { + yyv4542 = []EndpointPort{} + yyc4542 = true } } - yyh4533.End() - if yyc4533 { - *v = yyv4533 + yyh4542.End() + if yyc4542 { + *v = yyv4542 } } @@ -57885,10 +57963,10 @@ func (x codecSelfer1234) encSliceEndpoints(v []Endpoints, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4537 := range v { + for _, yyv4546 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4538 := &yyv4537 - yy4538.CodecEncodeSelf(e) + yy4547 := &yyv4546 + yy4547.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57898,83 +57976,83 @@ func (x codecSelfer1234) decSliceEndpoints(v *[]Endpoints, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4539 := *v - yyh4539, yyl4539 := z.DecSliceHelperStart() - var yyc4539 bool - if yyl4539 == 0 { - if yyv4539 == nil { - yyv4539 = []Endpoints{} - yyc4539 = true - } else if len(yyv4539) != 0 { - yyv4539 = yyv4539[:0] - yyc4539 = true + yyv4548 := *v + yyh4548, yyl4548 := z.DecSliceHelperStart() + var yyc4548 bool + if yyl4548 == 0 { + if yyv4548 == nil { + yyv4548 = []Endpoints{} + yyc4548 = true + } else if len(yyv4548) != 0 { + yyv4548 = yyv4548[:0] + yyc4548 = true } - } else if yyl4539 > 0 { - var yyrr4539, yyrl4539 int - var yyrt4539 bool - if yyl4539 > cap(yyv4539) { + } else if yyl4548 > 0 { + var yyrr4548, yyrl4548 int + var yyrt4548 bool + if yyl4548 > cap(yyv4548) { - yyrg4539 := len(yyv4539) > 0 - yyv24539 := yyv4539 - yyrl4539, yyrt4539 = z.DecInferLen(yyl4539, z.DecBasicHandle().MaxInitLen, 264) - if yyrt4539 { - if yyrl4539 <= cap(yyv4539) { - yyv4539 = yyv4539[:yyrl4539] + yyrg4548 := len(yyv4548) > 0 + yyv24548 := yyv4548 + yyrl4548, yyrt4548 = z.DecInferLen(yyl4548, z.DecBasicHandle().MaxInitLen, 264) + if yyrt4548 { + if yyrl4548 <= cap(yyv4548) { + yyv4548 = yyv4548[:yyrl4548] } else { - yyv4539 = make([]Endpoints, yyrl4539) + yyv4548 = make([]Endpoints, yyrl4548) } } else { - yyv4539 = make([]Endpoints, yyrl4539) + yyv4548 = make([]Endpoints, yyrl4548) } - yyc4539 = true - yyrr4539 = len(yyv4539) - if yyrg4539 { - copy(yyv4539, yyv24539) + yyc4548 = true + yyrr4548 = len(yyv4548) + if yyrg4548 { + copy(yyv4548, yyv24548) } - } else if yyl4539 != len(yyv4539) { - yyv4539 = yyv4539[:yyl4539] - yyc4539 = true + } else if yyl4548 != len(yyv4548) { + yyv4548 = yyv4548[:yyl4548] + yyc4548 = true } - yyj4539 := 0 - for ; yyj4539 < yyrr4539; yyj4539++ { - yyh4539.ElemContainerState(yyj4539) + yyj4548 := 0 + for ; yyj4548 < yyrr4548; yyj4548++ { + yyh4548.ElemContainerState(yyj4548) if r.TryDecodeAsNil() { - yyv4539[yyj4539] = Endpoints{} + yyv4548[yyj4548] = Endpoints{} } else { - yyv4540 := &yyv4539[yyj4539] - yyv4540.CodecDecodeSelf(d) + yyv4549 := &yyv4548[yyj4548] + yyv4549.CodecDecodeSelf(d) } } - if yyrt4539 { - for ; yyj4539 < yyl4539; yyj4539++ { - yyv4539 = append(yyv4539, Endpoints{}) - yyh4539.ElemContainerState(yyj4539) + if yyrt4548 { + for ; yyj4548 < yyl4548; yyj4548++ { + yyv4548 = append(yyv4548, Endpoints{}) + yyh4548.ElemContainerState(yyj4548) if r.TryDecodeAsNil() { - yyv4539[yyj4539] = Endpoints{} + yyv4548[yyj4548] = Endpoints{} } else { - yyv4541 := &yyv4539[yyj4539] - yyv4541.CodecDecodeSelf(d) + yyv4550 := &yyv4548[yyj4548] + yyv4550.CodecDecodeSelf(d) } } } } else { - yyj4539 := 0 - for ; !r.CheckBreak(); yyj4539++ { + yyj4548 := 0 + for ; !r.CheckBreak(); yyj4548++ { - if yyj4539 >= len(yyv4539) { - yyv4539 = append(yyv4539, Endpoints{}) // var yyz4539 Endpoints - yyc4539 = true + if yyj4548 >= len(yyv4548) { + yyv4548 = append(yyv4548, Endpoints{}) // var yyz4548 Endpoints + yyc4548 = true } - yyh4539.ElemContainerState(yyj4539) - if yyj4539 < len(yyv4539) { + yyh4548.ElemContainerState(yyj4548) + if yyj4548 < len(yyv4548) { if r.TryDecodeAsNil() { - yyv4539[yyj4539] = Endpoints{} + yyv4548[yyj4548] = Endpoints{} } else { - yyv4542 := &yyv4539[yyj4539] - yyv4542.CodecDecodeSelf(d) + yyv4551 := &yyv4548[yyj4548] + yyv4551.CodecDecodeSelf(d) } } else { @@ -57982,17 +58060,17 @@ func (x codecSelfer1234) decSliceEndpoints(v *[]Endpoints, d *codec1978.Decoder) } } - if yyj4539 < len(yyv4539) { - yyv4539 = yyv4539[:yyj4539] - yyc4539 = true - } else if yyj4539 == 0 && yyv4539 == nil { - yyv4539 = []Endpoints{} - yyc4539 = true + if yyj4548 < len(yyv4548) { + yyv4548 = yyv4548[:yyj4548] + yyc4548 = true + } else if yyj4548 == 0 && yyv4548 == nil { + yyv4548 = []Endpoints{} + yyc4548 = true } } - yyh4539.End() - if yyc4539 { - *v = yyv4539 + yyh4548.End() + if yyc4548 { + *v = yyv4548 } } @@ -58001,10 +58079,10 @@ func (x codecSelfer1234) encSliceNodeCondition(v []NodeCondition, e *codec1978.E z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4543 := range v { + for _, yyv4552 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4544 := &yyv4543 - yy4544.CodecEncodeSelf(e) + yy4553 := &yyv4552 + yy4553.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58014,83 +58092,83 @@ func (x codecSelfer1234) decSliceNodeCondition(v *[]NodeCondition, d *codec1978. z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4545 := *v - yyh4545, yyl4545 := z.DecSliceHelperStart() - var yyc4545 bool - if yyl4545 == 0 { - if yyv4545 == nil { - yyv4545 = []NodeCondition{} - yyc4545 = true - } else if len(yyv4545) != 0 { - yyv4545 = yyv4545[:0] - yyc4545 = true + yyv4554 := *v + yyh4554, yyl4554 := z.DecSliceHelperStart() + var yyc4554 bool + if yyl4554 == 0 { + if yyv4554 == nil { + yyv4554 = []NodeCondition{} + yyc4554 = true + } else if len(yyv4554) != 0 { + yyv4554 = yyv4554[:0] + yyc4554 = true } - } else if yyl4545 > 0 { - var yyrr4545, yyrl4545 int - var yyrt4545 bool - if yyl4545 > cap(yyv4545) { + } else if yyl4554 > 0 { + var yyrr4554, yyrl4554 int + var yyrt4554 bool + if yyl4554 > cap(yyv4554) { - yyrg4545 := len(yyv4545) > 0 - yyv24545 := yyv4545 - yyrl4545, yyrt4545 = z.DecInferLen(yyl4545, z.DecBasicHandle().MaxInitLen, 112) - if yyrt4545 { - if yyrl4545 <= cap(yyv4545) { - yyv4545 = yyv4545[:yyrl4545] + yyrg4554 := len(yyv4554) > 0 + yyv24554 := yyv4554 + yyrl4554, yyrt4554 = z.DecInferLen(yyl4554, z.DecBasicHandle().MaxInitLen, 112) + if yyrt4554 { + if yyrl4554 <= cap(yyv4554) { + yyv4554 = yyv4554[:yyrl4554] } else { - yyv4545 = make([]NodeCondition, yyrl4545) + yyv4554 = make([]NodeCondition, yyrl4554) } } else { - yyv4545 = make([]NodeCondition, yyrl4545) + yyv4554 = make([]NodeCondition, yyrl4554) } - yyc4545 = true - yyrr4545 = len(yyv4545) - if yyrg4545 { - copy(yyv4545, yyv24545) + yyc4554 = true + yyrr4554 = len(yyv4554) + if yyrg4554 { + copy(yyv4554, yyv24554) } - } else if yyl4545 != len(yyv4545) { - yyv4545 = yyv4545[:yyl4545] - yyc4545 = true + } else if yyl4554 != len(yyv4554) { + yyv4554 = yyv4554[:yyl4554] + yyc4554 = true } - yyj4545 := 0 - for ; yyj4545 < yyrr4545; yyj4545++ { - yyh4545.ElemContainerState(yyj4545) + yyj4554 := 0 + for ; yyj4554 < yyrr4554; yyj4554++ { + yyh4554.ElemContainerState(yyj4554) if r.TryDecodeAsNil() { - yyv4545[yyj4545] = NodeCondition{} + yyv4554[yyj4554] = NodeCondition{} } else { - yyv4546 := &yyv4545[yyj4545] - yyv4546.CodecDecodeSelf(d) + yyv4555 := &yyv4554[yyj4554] + yyv4555.CodecDecodeSelf(d) } } - if yyrt4545 { - for ; yyj4545 < yyl4545; yyj4545++ { - yyv4545 = append(yyv4545, NodeCondition{}) - yyh4545.ElemContainerState(yyj4545) + if yyrt4554 { + for ; yyj4554 < yyl4554; yyj4554++ { + yyv4554 = append(yyv4554, NodeCondition{}) + yyh4554.ElemContainerState(yyj4554) if r.TryDecodeAsNil() { - yyv4545[yyj4545] = NodeCondition{} + yyv4554[yyj4554] = NodeCondition{} } else { - yyv4547 := &yyv4545[yyj4545] - yyv4547.CodecDecodeSelf(d) + yyv4556 := &yyv4554[yyj4554] + yyv4556.CodecDecodeSelf(d) } } } } else { - yyj4545 := 0 - for ; !r.CheckBreak(); yyj4545++ { + yyj4554 := 0 + for ; !r.CheckBreak(); yyj4554++ { - if yyj4545 >= len(yyv4545) { - yyv4545 = append(yyv4545, NodeCondition{}) // var yyz4545 NodeCondition - yyc4545 = true + if yyj4554 >= len(yyv4554) { + yyv4554 = append(yyv4554, NodeCondition{}) // var yyz4554 NodeCondition + yyc4554 = true } - yyh4545.ElemContainerState(yyj4545) - if yyj4545 < len(yyv4545) { + yyh4554.ElemContainerState(yyj4554) + if yyj4554 < len(yyv4554) { if r.TryDecodeAsNil() { - yyv4545[yyj4545] = NodeCondition{} + yyv4554[yyj4554] = NodeCondition{} } else { - yyv4548 := &yyv4545[yyj4545] - yyv4548.CodecDecodeSelf(d) + yyv4557 := &yyv4554[yyj4554] + yyv4557.CodecDecodeSelf(d) } } else { @@ -58098,17 +58176,17 @@ func (x codecSelfer1234) decSliceNodeCondition(v *[]NodeCondition, d *codec1978. } } - if yyj4545 < len(yyv4545) { - yyv4545 = yyv4545[:yyj4545] - yyc4545 = true - } else if yyj4545 == 0 && yyv4545 == nil { - yyv4545 = []NodeCondition{} - yyc4545 = true + if yyj4554 < len(yyv4554) { + yyv4554 = yyv4554[:yyj4554] + yyc4554 = true + } else if yyj4554 == 0 && yyv4554 == nil { + yyv4554 = []NodeCondition{} + yyc4554 = true } } - yyh4545.End() - if yyc4545 { - *v = yyv4545 + yyh4554.End() + if yyc4554 { + *v = yyv4554 } } @@ -58117,10 +58195,10 @@ func (x codecSelfer1234) encSliceNodeAddress(v []NodeAddress, e *codec1978.Encod z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4549 := range v { + for _, yyv4558 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4550 := &yyv4549 - yy4550.CodecEncodeSelf(e) + yy4559 := &yyv4558 + yy4559.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58130,83 +58208,83 @@ func (x codecSelfer1234) decSliceNodeAddress(v *[]NodeAddress, d *codec1978.Deco z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4551 := *v - yyh4551, yyl4551 := z.DecSliceHelperStart() - var yyc4551 bool - if yyl4551 == 0 { - if yyv4551 == nil { - yyv4551 = []NodeAddress{} - yyc4551 = true - } else if len(yyv4551) != 0 { - yyv4551 = yyv4551[:0] - yyc4551 = true + yyv4560 := *v + yyh4560, yyl4560 := z.DecSliceHelperStart() + var yyc4560 bool + if yyl4560 == 0 { + if yyv4560 == nil { + yyv4560 = []NodeAddress{} + yyc4560 = true + } else if len(yyv4560) != 0 { + yyv4560 = yyv4560[:0] + yyc4560 = true } - } else if yyl4551 > 0 { - var yyrr4551, yyrl4551 int - var yyrt4551 bool - if yyl4551 > cap(yyv4551) { + } else if yyl4560 > 0 { + var yyrr4560, yyrl4560 int + var yyrt4560 bool + if yyl4560 > cap(yyv4560) { - yyrg4551 := len(yyv4551) > 0 - yyv24551 := yyv4551 - yyrl4551, yyrt4551 = z.DecInferLen(yyl4551, z.DecBasicHandle().MaxInitLen, 32) - if yyrt4551 { - if yyrl4551 <= cap(yyv4551) { - yyv4551 = yyv4551[:yyrl4551] + yyrg4560 := len(yyv4560) > 0 + yyv24560 := yyv4560 + yyrl4560, yyrt4560 = z.DecInferLen(yyl4560, z.DecBasicHandle().MaxInitLen, 32) + if yyrt4560 { + if yyrl4560 <= cap(yyv4560) { + yyv4560 = yyv4560[:yyrl4560] } else { - yyv4551 = make([]NodeAddress, yyrl4551) + yyv4560 = make([]NodeAddress, yyrl4560) } } else { - yyv4551 = make([]NodeAddress, yyrl4551) + yyv4560 = make([]NodeAddress, yyrl4560) } - yyc4551 = true - yyrr4551 = len(yyv4551) - if yyrg4551 { - copy(yyv4551, yyv24551) + yyc4560 = true + yyrr4560 = len(yyv4560) + if yyrg4560 { + copy(yyv4560, yyv24560) } - } else if yyl4551 != len(yyv4551) { - yyv4551 = yyv4551[:yyl4551] - yyc4551 = true + } else if yyl4560 != len(yyv4560) { + yyv4560 = yyv4560[:yyl4560] + yyc4560 = true } - yyj4551 := 0 - for ; yyj4551 < yyrr4551; yyj4551++ { - yyh4551.ElemContainerState(yyj4551) + yyj4560 := 0 + for ; yyj4560 < yyrr4560; yyj4560++ { + yyh4560.ElemContainerState(yyj4560) if r.TryDecodeAsNil() { - yyv4551[yyj4551] = NodeAddress{} + yyv4560[yyj4560] = NodeAddress{} } else { - yyv4552 := &yyv4551[yyj4551] - yyv4552.CodecDecodeSelf(d) + yyv4561 := &yyv4560[yyj4560] + yyv4561.CodecDecodeSelf(d) } } - if yyrt4551 { - for ; yyj4551 < yyl4551; yyj4551++ { - yyv4551 = append(yyv4551, NodeAddress{}) - yyh4551.ElemContainerState(yyj4551) + if yyrt4560 { + for ; yyj4560 < yyl4560; yyj4560++ { + yyv4560 = append(yyv4560, NodeAddress{}) + yyh4560.ElemContainerState(yyj4560) if r.TryDecodeAsNil() { - yyv4551[yyj4551] = NodeAddress{} + yyv4560[yyj4560] = NodeAddress{} } else { - yyv4553 := &yyv4551[yyj4551] - yyv4553.CodecDecodeSelf(d) + yyv4562 := &yyv4560[yyj4560] + yyv4562.CodecDecodeSelf(d) } } } } else { - yyj4551 := 0 - for ; !r.CheckBreak(); yyj4551++ { + yyj4560 := 0 + for ; !r.CheckBreak(); yyj4560++ { - if yyj4551 >= len(yyv4551) { - yyv4551 = append(yyv4551, NodeAddress{}) // var yyz4551 NodeAddress - yyc4551 = true + if yyj4560 >= len(yyv4560) { + yyv4560 = append(yyv4560, NodeAddress{}) // var yyz4560 NodeAddress + yyc4560 = true } - yyh4551.ElemContainerState(yyj4551) - if yyj4551 < len(yyv4551) { + yyh4560.ElemContainerState(yyj4560) + if yyj4560 < len(yyv4560) { if r.TryDecodeAsNil() { - yyv4551[yyj4551] = NodeAddress{} + yyv4560[yyj4560] = NodeAddress{} } else { - yyv4554 := &yyv4551[yyj4551] - yyv4554.CodecDecodeSelf(d) + yyv4563 := &yyv4560[yyj4560] + yyv4563.CodecDecodeSelf(d) } } else { @@ -58214,17 +58292,17 @@ func (x codecSelfer1234) decSliceNodeAddress(v *[]NodeAddress, d *codec1978.Deco } } - if yyj4551 < len(yyv4551) { - yyv4551 = yyv4551[:yyj4551] - yyc4551 = true - } else if yyj4551 == 0 && yyv4551 == nil { - yyv4551 = []NodeAddress{} - yyc4551 = true + if yyj4560 < len(yyv4560) { + yyv4560 = yyv4560[:yyj4560] + yyc4560 = true + } else if yyj4560 == 0 && yyv4560 == nil { + yyv4560 = []NodeAddress{} + yyc4560 = true } } - yyh4551.End() - if yyc4551 { - *v = yyv4551 + yyh4560.End() + if yyc4560 { + *v = yyv4560 } } @@ -58233,10 +58311,10 @@ func (x codecSelfer1234) encSliceContainerImage(v []ContainerImage, e *codec1978 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4555 := range v { + for _, yyv4564 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4556 := &yyv4555 - yy4556.CodecEncodeSelf(e) + yy4565 := &yyv4564 + yy4565.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58246,83 +58324,83 @@ func (x codecSelfer1234) decSliceContainerImage(v *[]ContainerImage, d *codec197 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4557 := *v - yyh4557, yyl4557 := z.DecSliceHelperStart() - var yyc4557 bool - if yyl4557 == 0 { - if yyv4557 == nil { - yyv4557 = []ContainerImage{} - yyc4557 = true - } else if len(yyv4557) != 0 { - yyv4557 = yyv4557[:0] - yyc4557 = true + yyv4566 := *v + yyh4566, yyl4566 := z.DecSliceHelperStart() + var yyc4566 bool + if yyl4566 == 0 { + if yyv4566 == nil { + yyv4566 = []ContainerImage{} + yyc4566 = true + } else if len(yyv4566) != 0 { + yyv4566 = yyv4566[:0] + yyc4566 = true } - } else if yyl4557 > 0 { - var yyrr4557, yyrl4557 int - var yyrt4557 bool - if yyl4557 > cap(yyv4557) { + } else if yyl4566 > 0 { + var yyrr4566, yyrl4566 int + var yyrt4566 bool + if yyl4566 > cap(yyv4566) { - yyrg4557 := len(yyv4557) > 0 - yyv24557 := yyv4557 - yyrl4557, yyrt4557 = z.DecInferLen(yyl4557, z.DecBasicHandle().MaxInitLen, 32) - if yyrt4557 { - if yyrl4557 <= cap(yyv4557) { - yyv4557 = yyv4557[:yyrl4557] + yyrg4566 := len(yyv4566) > 0 + yyv24566 := yyv4566 + yyrl4566, yyrt4566 = z.DecInferLen(yyl4566, z.DecBasicHandle().MaxInitLen, 32) + if yyrt4566 { + if yyrl4566 <= cap(yyv4566) { + yyv4566 = yyv4566[:yyrl4566] } else { - yyv4557 = make([]ContainerImage, yyrl4557) + yyv4566 = make([]ContainerImage, yyrl4566) } } else { - yyv4557 = make([]ContainerImage, yyrl4557) + yyv4566 = make([]ContainerImage, yyrl4566) } - yyc4557 = true - yyrr4557 = len(yyv4557) - if yyrg4557 { - copy(yyv4557, yyv24557) + yyc4566 = true + yyrr4566 = len(yyv4566) + if yyrg4566 { + copy(yyv4566, yyv24566) } - } else if yyl4557 != len(yyv4557) { - yyv4557 = yyv4557[:yyl4557] - yyc4557 = true + } else if yyl4566 != len(yyv4566) { + yyv4566 = yyv4566[:yyl4566] + yyc4566 = true } - yyj4557 := 0 - for ; yyj4557 < yyrr4557; yyj4557++ { - yyh4557.ElemContainerState(yyj4557) + yyj4566 := 0 + for ; yyj4566 < yyrr4566; yyj4566++ { + yyh4566.ElemContainerState(yyj4566) if r.TryDecodeAsNil() { - yyv4557[yyj4557] = ContainerImage{} + yyv4566[yyj4566] = ContainerImage{} } else { - yyv4558 := &yyv4557[yyj4557] - yyv4558.CodecDecodeSelf(d) + yyv4567 := &yyv4566[yyj4566] + yyv4567.CodecDecodeSelf(d) } } - if yyrt4557 { - for ; yyj4557 < yyl4557; yyj4557++ { - yyv4557 = append(yyv4557, ContainerImage{}) - yyh4557.ElemContainerState(yyj4557) + if yyrt4566 { + for ; yyj4566 < yyl4566; yyj4566++ { + yyv4566 = append(yyv4566, ContainerImage{}) + yyh4566.ElemContainerState(yyj4566) if r.TryDecodeAsNil() { - yyv4557[yyj4557] = ContainerImage{} + yyv4566[yyj4566] = ContainerImage{} } else { - yyv4559 := &yyv4557[yyj4557] - yyv4559.CodecDecodeSelf(d) + yyv4568 := &yyv4566[yyj4566] + yyv4568.CodecDecodeSelf(d) } } } } else { - yyj4557 := 0 - for ; !r.CheckBreak(); yyj4557++ { + yyj4566 := 0 + for ; !r.CheckBreak(); yyj4566++ { - if yyj4557 >= len(yyv4557) { - yyv4557 = append(yyv4557, ContainerImage{}) // var yyz4557 ContainerImage - yyc4557 = true + if yyj4566 >= len(yyv4566) { + yyv4566 = append(yyv4566, ContainerImage{}) // var yyz4566 ContainerImage + yyc4566 = true } - yyh4557.ElemContainerState(yyj4557) - if yyj4557 < len(yyv4557) { + yyh4566.ElemContainerState(yyj4566) + if yyj4566 < len(yyv4566) { if r.TryDecodeAsNil() { - yyv4557[yyj4557] = ContainerImage{} + yyv4566[yyj4566] = ContainerImage{} } else { - yyv4560 := &yyv4557[yyj4557] - yyv4560.CodecDecodeSelf(d) + yyv4569 := &yyv4566[yyj4566] + yyv4569.CodecDecodeSelf(d) } } else { @@ -58330,17 +58408,17 @@ func (x codecSelfer1234) decSliceContainerImage(v *[]ContainerImage, d *codec197 } } - if yyj4557 < len(yyv4557) { - yyv4557 = yyv4557[:yyj4557] - yyc4557 = true - } else if yyj4557 == 0 && yyv4557 == nil { - yyv4557 = []ContainerImage{} - yyc4557 = true + if yyj4566 < len(yyv4566) { + yyv4566 = yyv4566[:yyj4566] + yyc4566 = true + } else if yyj4566 == 0 && yyv4566 == nil { + yyv4566 = []ContainerImage{} + yyc4566 = true } } - yyh4557.End() - if yyc4557 { - *v = yyv4557 + yyh4566.End() + if yyc4566 { + *v = yyv4566 } } @@ -58349,9 +58427,9 @@ func (x codecSelfer1234) encSliceUniqueVolumeName(v []UniqueVolumeName, e *codec z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4561 := range v { + for _, yyv4570 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yyv4561.CodecEncodeSelf(e) + yyv4570.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58361,75 +58439,75 @@ func (x codecSelfer1234) decSliceUniqueVolumeName(v *[]UniqueVolumeName, d *code z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4562 := *v - yyh4562, yyl4562 := z.DecSliceHelperStart() - var yyc4562 bool - if yyl4562 == 0 { - if yyv4562 == nil { - yyv4562 = []UniqueVolumeName{} - yyc4562 = true - } else if len(yyv4562) != 0 { - yyv4562 = yyv4562[:0] - yyc4562 = true + yyv4571 := *v + yyh4571, yyl4571 := z.DecSliceHelperStart() + var yyc4571 bool + if yyl4571 == 0 { + if yyv4571 == nil { + yyv4571 = []UniqueVolumeName{} + yyc4571 = true + } else if len(yyv4571) != 0 { + yyv4571 = yyv4571[:0] + yyc4571 = true } - } else if yyl4562 > 0 { - var yyrr4562, yyrl4562 int - var yyrt4562 bool - if yyl4562 > cap(yyv4562) { + } else if yyl4571 > 0 { + var yyrr4571, yyrl4571 int + var yyrt4571 bool + if yyl4571 > cap(yyv4571) { - yyrl4562, yyrt4562 = z.DecInferLen(yyl4562, z.DecBasicHandle().MaxInitLen, 16) - if yyrt4562 { - if yyrl4562 <= cap(yyv4562) { - yyv4562 = yyv4562[:yyrl4562] + yyrl4571, yyrt4571 = z.DecInferLen(yyl4571, z.DecBasicHandle().MaxInitLen, 16) + if yyrt4571 { + if yyrl4571 <= cap(yyv4571) { + yyv4571 = yyv4571[:yyrl4571] } else { - yyv4562 = make([]UniqueVolumeName, yyrl4562) + yyv4571 = make([]UniqueVolumeName, yyrl4571) } } else { - yyv4562 = make([]UniqueVolumeName, yyrl4562) + yyv4571 = make([]UniqueVolumeName, yyrl4571) } - yyc4562 = true - yyrr4562 = len(yyv4562) - } else if yyl4562 != len(yyv4562) { - yyv4562 = yyv4562[:yyl4562] - yyc4562 = true + yyc4571 = true + yyrr4571 = len(yyv4571) + } else if yyl4571 != len(yyv4571) { + yyv4571 = yyv4571[:yyl4571] + yyc4571 = true } - yyj4562 := 0 - for ; yyj4562 < yyrr4562; yyj4562++ { - yyh4562.ElemContainerState(yyj4562) + yyj4571 := 0 + for ; yyj4571 < yyrr4571; yyj4571++ { + yyh4571.ElemContainerState(yyj4571) if r.TryDecodeAsNil() { - yyv4562[yyj4562] = "" + yyv4571[yyj4571] = "" } else { - yyv4562[yyj4562] = UniqueVolumeName(r.DecodeString()) + yyv4571[yyj4571] = UniqueVolumeName(r.DecodeString()) } } - if yyrt4562 { - for ; yyj4562 < yyl4562; yyj4562++ { - yyv4562 = append(yyv4562, "") - yyh4562.ElemContainerState(yyj4562) + if yyrt4571 { + for ; yyj4571 < yyl4571; yyj4571++ { + yyv4571 = append(yyv4571, "") + yyh4571.ElemContainerState(yyj4571) if r.TryDecodeAsNil() { - yyv4562[yyj4562] = "" + yyv4571[yyj4571] = "" } else { - yyv4562[yyj4562] = UniqueVolumeName(r.DecodeString()) + yyv4571[yyj4571] = UniqueVolumeName(r.DecodeString()) } } } } else { - yyj4562 := 0 - for ; !r.CheckBreak(); yyj4562++ { + yyj4571 := 0 + for ; !r.CheckBreak(); yyj4571++ { - if yyj4562 >= len(yyv4562) { - yyv4562 = append(yyv4562, "") // var yyz4562 UniqueVolumeName - yyc4562 = true + if yyj4571 >= len(yyv4571) { + yyv4571 = append(yyv4571, "") // var yyz4571 UniqueVolumeName + yyc4571 = true } - yyh4562.ElemContainerState(yyj4562) - if yyj4562 < len(yyv4562) { + yyh4571.ElemContainerState(yyj4571) + if yyj4571 < len(yyv4571) { if r.TryDecodeAsNil() { - yyv4562[yyj4562] = "" + yyv4571[yyj4571] = "" } else { - yyv4562[yyj4562] = UniqueVolumeName(r.DecodeString()) + yyv4571[yyj4571] = UniqueVolumeName(r.DecodeString()) } } else { @@ -58437,17 +58515,17 @@ func (x codecSelfer1234) decSliceUniqueVolumeName(v *[]UniqueVolumeName, d *code } } - if yyj4562 < len(yyv4562) { - yyv4562 = yyv4562[:yyj4562] - yyc4562 = true - } else if yyj4562 == 0 && yyv4562 == nil { - yyv4562 = []UniqueVolumeName{} - yyc4562 = true + if yyj4571 < len(yyv4571) { + yyv4571 = yyv4571[:yyj4571] + yyc4571 = true + } else if yyj4571 == 0 && yyv4571 == nil { + yyv4571 = []UniqueVolumeName{} + yyc4571 = true } } - yyh4562.End() - if yyc4562 { - *v = yyv4562 + yyh4571.End() + if yyc4571 { + *v = yyv4571 } } @@ -58456,10 +58534,10 @@ func (x codecSelfer1234) encSliceAttachedVolume(v []AttachedVolume, e *codec1978 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4566 := range v { + for _, yyv4575 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4567 := &yyv4566 - yy4567.CodecEncodeSelf(e) + yy4576 := &yyv4575 + yy4576.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58469,83 +58547,83 @@ func (x codecSelfer1234) decSliceAttachedVolume(v *[]AttachedVolume, d *codec197 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4568 := *v - yyh4568, yyl4568 := z.DecSliceHelperStart() - var yyc4568 bool - if yyl4568 == 0 { - if yyv4568 == nil { - yyv4568 = []AttachedVolume{} - yyc4568 = true - } else if len(yyv4568) != 0 { - yyv4568 = yyv4568[:0] - yyc4568 = true + yyv4577 := *v + yyh4577, yyl4577 := z.DecSliceHelperStart() + var yyc4577 bool + if yyl4577 == 0 { + if yyv4577 == nil { + yyv4577 = []AttachedVolume{} + yyc4577 = true + } else if len(yyv4577) != 0 { + yyv4577 = yyv4577[:0] + yyc4577 = true } - } else if yyl4568 > 0 { - var yyrr4568, yyrl4568 int - var yyrt4568 bool - if yyl4568 > cap(yyv4568) { + } else if yyl4577 > 0 { + var yyrr4577, yyrl4577 int + var yyrt4577 bool + if yyl4577 > cap(yyv4577) { - yyrg4568 := len(yyv4568) > 0 - yyv24568 := yyv4568 - yyrl4568, yyrt4568 = z.DecInferLen(yyl4568, z.DecBasicHandle().MaxInitLen, 32) - if yyrt4568 { - if yyrl4568 <= cap(yyv4568) { - yyv4568 = yyv4568[:yyrl4568] + yyrg4577 := len(yyv4577) > 0 + yyv24577 := yyv4577 + yyrl4577, yyrt4577 = z.DecInferLen(yyl4577, z.DecBasicHandle().MaxInitLen, 32) + if yyrt4577 { + if yyrl4577 <= cap(yyv4577) { + yyv4577 = yyv4577[:yyrl4577] } else { - yyv4568 = make([]AttachedVolume, yyrl4568) + yyv4577 = make([]AttachedVolume, yyrl4577) } } else { - yyv4568 = make([]AttachedVolume, yyrl4568) + yyv4577 = make([]AttachedVolume, yyrl4577) } - yyc4568 = true - yyrr4568 = len(yyv4568) - if yyrg4568 { - copy(yyv4568, yyv24568) + yyc4577 = true + yyrr4577 = len(yyv4577) + if yyrg4577 { + copy(yyv4577, yyv24577) } - } else if yyl4568 != len(yyv4568) { - yyv4568 = yyv4568[:yyl4568] - yyc4568 = true + } else if yyl4577 != len(yyv4577) { + yyv4577 = yyv4577[:yyl4577] + yyc4577 = true } - yyj4568 := 0 - for ; yyj4568 < yyrr4568; yyj4568++ { - yyh4568.ElemContainerState(yyj4568) + yyj4577 := 0 + for ; yyj4577 < yyrr4577; yyj4577++ { + yyh4577.ElemContainerState(yyj4577) if r.TryDecodeAsNil() { - yyv4568[yyj4568] = AttachedVolume{} + yyv4577[yyj4577] = AttachedVolume{} } else { - yyv4569 := &yyv4568[yyj4568] - yyv4569.CodecDecodeSelf(d) + yyv4578 := &yyv4577[yyj4577] + yyv4578.CodecDecodeSelf(d) } } - if yyrt4568 { - for ; yyj4568 < yyl4568; yyj4568++ { - yyv4568 = append(yyv4568, AttachedVolume{}) - yyh4568.ElemContainerState(yyj4568) + if yyrt4577 { + for ; yyj4577 < yyl4577; yyj4577++ { + yyv4577 = append(yyv4577, AttachedVolume{}) + yyh4577.ElemContainerState(yyj4577) if r.TryDecodeAsNil() { - yyv4568[yyj4568] = AttachedVolume{} + yyv4577[yyj4577] = AttachedVolume{} } else { - yyv4570 := &yyv4568[yyj4568] - yyv4570.CodecDecodeSelf(d) + yyv4579 := &yyv4577[yyj4577] + yyv4579.CodecDecodeSelf(d) } } } } else { - yyj4568 := 0 - for ; !r.CheckBreak(); yyj4568++ { + yyj4577 := 0 + for ; !r.CheckBreak(); yyj4577++ { - if yyj4568 >= len(yyv4568) { - yyv4568 = append(yyv4568, AttachedVolume{}) // var yyz4568 AttachedVolume - yyc4568 = true + if yyj4577 >= len(yyv4577) { + yyv4577 = append(yyv4577, AttachedVolume{}) // var yyz4577 AttachedVolume + yyc4577 = true } - yyh4568.ElemContainerState(yyj4568) - if yyj4568 < len(yyv4568) { + yyh4577.ElemContainerState(yyj4577) + if yyj4577 < len(yyv4577) { if r.TryDecodeAsNil() { - yyv4568[yyj4568] = AttachedVolume{} + yyv4577[yyj4577] = AttachedVolume{} } else { - yyv4571 := &yyv4568[yyj4568] - yyv4571.CodecDecodeSelf(d) + yyv4580 := &yyv4577[yyj4577] + yyv4580.CodecDecodeSelf(d) } } else { @@ -58553,17 +58631,17 @@ func (x codecSelfer1234) decSliceAttachedVolume(v *[]AttachedVolume, d *codec197 } } - if yyj4568 < len(yyv4568) { - yyv4568 = yyv4568[:yyj4568] - yyc4568 = true - } else if yyj4568 == 0 && yyv4568 == nil { - yyv4568 = []AttachedVolume{} - yyc4568 = true + if yyj4577 < len(yyv4577) { + yyv4577 = yyv4577[:yyj4577] + yyc4577 = true + } else if yyj4577 == 0 && yyv4577 == nil { + yyv4577 = []AttachedVolume{} + yyc4577 = true } } - yyh4568.End() - if yyc4568 { - *v = yyv4568 + yyh4577.End() + if yyc4577 { + *v = yyv4577 } } @@ -58572,10 +58650,10 @@ func (x codecSelfer1234) encSlicePreferAvoidPodsEntry(v []PreferAvoidPodsEntry, z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4572 := range v { + for _, yyv4581 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4573 := &yyv4572 - yy4573.CodecEncodeSelf(e) + yy4582 := &yyv4581 + yy4582.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58585,83 +58663,83 @@ func (x codecSelfer1234) decSlicePreferAvoidPodsEntry(v *[]PreferAvoidPodsEntry, z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4574 := *v - yyh4574, yyl4574 := z.DecSliceHelperStart() - var yyc4574 bool - if yyl4574 == 0 { - if yyv4574 == nil { - yyv4574 = []PreferAvoidPodsEntry{} - yyc4574 = true - } else if len(yyv4574) != 0 { - yyv4574 = yyv4574[:0] - yyc4574 = true + yyv4583 := *v + yyh4583, yyl4583 := z.DecSliceHelperStart() + var yyc4583 bool + if yyl4583 == 0 { + if yyv4583 == nil { + yyv4583 = []PreferAvoidPodsEntry{} + yyc4583 = true + } else if len(yyv4583) != 0 { + yyv4583 = yyv4583[:0] + yyc4583 = true } - } else if yyl4574 > 0 { - var yyrr4574, yyrl4574 int - var yyrt4574 bool - if yyl4574 > cap(yyv4574) { + } else if yyl4583 > 0 { + var yyrr4583, yyrl4583 int + var yyrt4583 bool + if yyl4583 > cap(yyv4583) { - yyrg4574 := len(yyv4574) > 0 - yyv24574 := yyv4574 - yyrl4574, yyrt4574 = z.DecInferLen(yyl4574, z.DecBasicHandle().MaxInitLen, 64) - if yyrt4574 { - if yyrl4574 <= cap(yyv4574) { - yyv4574 = yyv4574[:yyrl4574] + yyrg4583 := len(yyv4583) > 0 + yyv24583 := yyv4583 + yyrl4583, yyrt4583 = z.DecInferLen(yyl4583, z.DecBasicHandle().MaxInitLen, 64) + if yyrt4583 { + if yyrl4583 <= cap(yyv4583) { + yyv4583 = yyv4583[:yyrl4583] } else { - yyv4574 = make([]PreferAvoidPodsEntry, yyrl4574) + yyv4583 = make([]PreferAvoidPodsEntry, yyrl4583) } } else { - yyv4574 = make([]PreferAvoidPodsEntry, yyrl4574) + yyv4583 = make([]PreferAvoidPodsEntry, yyrl4583) } - yyc4574 = true - yyrr4574 = len(yyv4574) - if yyrg4574 { - copy(yyv4574, yyv24574) + yyc4583 = true + yyrr4583 = len(yyv4583) + if yyrg4583 { + copy(yyv4583, yyv24583) } - } else if yyl4574 != len(yyv4574) { - yyv4574 = yyv4574[:yyl4574] - yyc4574 = true + } else if yyl4583 != len(yyv4583) { + yyv4583 = yyv4583[:yyl4583] + yyc4583 = true } - yyj4574 := 0 - for ; yyj4574 < yyrr4574; yyj4574++ { - yyh4574.ElemContainerState(yyj4574) + yyj4583 := 0 + for ; yyj4583 < yyrr4583; yyj4583++ { + yyh4583.ElemContainerState(yyj4583) if r.TryDecodeAsNil() { - yyv4574[yyj4574] = PreferAvoidPodsEntry{} + yyv4583[yyj4583] = PreferAvoidPodsEntry{} } else { - yyv4575 := &yyv4574[yyj4574] - yyv4575.CodecDecodeSelf(d) + yyv4584 := &yyv4583[yyj4583] + yyv4584.CodecDecodeSelf(d) } } - if yyrt4574 { - for ; yyj4574 < yyl4574; yyj4574++ { - yyv4574 = append(yyv4574, PreferAvoidPodsEntry{}) - yyh4574.ElemContainerState(yyj4574) + if yyrt4583 { + for ; yyj4583 < yyl4583; yyj4583++ { + yyv4583 = append(yyv4583, PreferAvoidPodsEntry{}) + yyh4583.ElemContainerState(yyj4583) if r.TryDecodeAsNil() { - yyv4574[yyj4574] = PreferAvoidPodsEntry{} + yyv4583[yyj4583] = PreferAvoidPodsEntry{} } else { - yyv4576 := &yyv4574[yyj4574] - yyv4576.CodecDecodeSelf(d) + yyv4585 := &yyv4583[yyj4583] + yyv4585.CodecDecodeSelf(d) } } } } else { - yyj4574 := 0 - for ; !r.CheckBreak(); yyj4574++ { + yyj4583 := 0 + for ; !r.CheckBreak(); yyj4583++ { - if yyj4574 >= len(yyv4574) { - yyv4574 = append(yyv4574, PreferAvoidPodsEntry{}) // var yyz4574 PreferAvoidPodsEntry - yyc4574 = true + if yyj4583 >= len(yyv4583) { + yyv4583 = append(yyv4583, PreferAvoidPodsEntry{}) // var yyz4583 PreferAvoidPodsEntry + yyc4583 = true } - yyh4574.ElemContainerState(yyj4574) - if yyj4574 < len(yyv4574) { + yyh4583.ElemContainerState(yyj4583) + if yyj4583 < len(yyv4583) { if r.TryDecodeAsNil() { - yyv4574[yyj4574] = PreferAvoidPodsEntry{} + yyv4583[yyj4583] = PreferAvoidPodsEntry{} } else { - yyv4577 := &yyv4574[yyj4574] - yyv4577.CodecDecodeSelf(d) + yyv4586 := &yyv4583[yyj4583] + yyv4586.CodecDecodeSelf(d) } } else { @@ -58669,17 +58747,17 @@ func (x codecSelfer1234) decSlicePreferAvoidPodsEntry(v *[]PreferAvoidPodsEntry, } } - if yyj4574 < len(yyv4574) { - yyv4574 = yyv4574[:yyj4574] - yyc4574 = true - } else if yyj4574 == 0 && yyv4574 == nil { - yyv4574 = []PreferAvoidPodsEntry{} - yyc4574 = true + if yyj4583 < len(yyv4583) { + yyv4583 = yyv4583[:yyj4583] + yyc4583 = true + } else if yyj4583 == 0 && yyv4583 == nil { + yyv4583 = []PreferAvoidPodsEntry{} + yyc4583 = true } } - yyh4574.End() - if yyc4574 { - *v = yyv4574 + yyh4583.End() + if yyc4583 { + *v = yyv4583 } } @@ -58688,19 +58766,19 @@ func (x codecSelfer1234) encResourceList(v ResourceList, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeMapStart(len(v)) - for yyk4578, yyv4578 := range v { + for yyk4587, yyv4587 := range v { z.EncSendContainerState(codecSelfer_containerMapKey1234) - yyk4578.CodecEncodeSelf(e) + yyk4587.CodecEncodeSelf(e) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy4579 := &yyv4578 - yym4580 := z.EncBinary() - _ = yym4580 + yy4588 := &yyv4587 + yym4589 := z.EncBinary() + _ = yym4589 if false { - } else if z.HasExtensions() && z.EncExt(yy4579) { - } else if !yym4580 && z.IsJSONHandle() { - z.EncJSONMarshal(yy4579) + } else if z.HasExtensions() && z.EncExt(yy4588) { + } else if !yym4589 && z.IsJSONHandle() { + z.EncJSONMarshal(yy4588) } else { - z.EncFallback(yy4579) + z.EncFallback(yy4588) } } z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -58711,86 +58789,86 @@ func (x codecSelfer1234) decResourceList(v *ResourceList, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4581 := *v - yyl4581 := r.ReadMapStart() - yybh4581 := z.DecBasicHandle() - if yyv4581 == nil { - yyrl4581, _ := z.DecInferLen(yyl4581, yybh4581.MaxInitLen, 72) - yyv4581 = make(map[ResourceName]pkg3_resource.Quantity, yyrl4581) - *v = yyv4581 + yyv4590 := *v + yyl4590 := r.ReadMapStart() + yybh4590 := z.DecBasicHandle() + if yyv4590 == nil { + yyrl4590, _ := z.DecInferLen(yyl4590, yybh4590.MaxInitLen, 72) + yyv4590 = make(map[ResourceName]pkg3_resource.Quantity, yyrl4590) + *v = yyv4590 } - var yymk4581 ResourceName - var yymv4581 pkg3_resource.Quantity - var yymg4581 bool - if yybh4581.MapValueReset { - yymg4581 = true + var yymk4590 ResourceName + var yymv4590 pkg3_resource.Quantity + var yymg4590 bool + if yybh4590.MapValueReset { + yymg4590 = true } - if yyl4581 > 0 { - for yyj4581 := 0; yyj4581 < yyl4581; yyj4581++ { + if yyl4590 > 0 { + for yyj4590 := 0; yyj4590 < yyl4590; yyj4590++ { z.DecSendContainerState(codecSelfer_containerMapKey1234) if r.TryDecodeAsNil() { - yymk4581 = "" + yymk4590 = "" } else { - yymk4581 = ResourceName(r.DecodeString()) + yymk4590 = ResourceName(r.DecodeString()) } - if yymg4581 { - yymv4581 = yyv4581[yymk4581] + if yymg4590 { + yymv4590 = yyv4590[yymk4590] } else { - yymv4581 = pkg3_resource.Quantity{} + yymv4590 = pkg3_resource.Quantity{} } z.DecSendContainerState(codecSelfer_containerMapValue1234) if r.TryDecodeAsNil() { - yymv4581 = pkg3_resource.Quantity{} + yymv4590 = pkg3_resource.Quantity{} } else { - yyv4583 := &yymv4581 - yym4584 := z.DecBinary() - _ = yym4584 + yyv4592 := &yymv4590 + yym4593 := z.DecBinary() + _ = yym4593 if false { - } else if z.HasExtensions() && z.DecExt(yyv4583) { - } else if !yym4584 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv4583) + } else if z.HasExtensions() && z.DecExt(yyv4592) { + } else if !yym4593 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv4592) } else { - z.DecFallback(yyv4583, false) + z.DecFallback(yyv4592, false) } } - if yyv4581 != nil { - yyv4581[yymk4581] = yymv4581 + if yyv4590 != nil { + yyv4590[yymk4590] = yymv4590 } } - } else if yyl4581 < 0 { - for yyj4581 := 0; !r.CheckBreak(); yyj4581++ { + } else if yyl4590 < 0 { + for yyj4590 := 0; !r.CheckBreak(); yyj4590++ { z.DecSendContainerState(codecSelfer_containerMapKey1234) if r.TryDecodeAsNil() { - yymk4581 = "" + yymk4590 = "" } else { - yymk4581 = ResourceName(r.DecodeString()) + yymk4590 = ResourceName(r.DecodeString()) } - if yymg4581 { - yymv4581 = yyv4581[yymk4581] + if yymg4590 { + yymv4590 = yyv4590[yymk4590] } else { - yymv4581 = pkg3_resource.Quantity{} + yymv4590 = pkg3_resource.Quantity{} } z.DecSendContainerState(codecSelfer_containerMapValue1234) if r.TryDecodeAsNil() { - yymv4581 = pkg3_resource.Quantity{} + yymv4590 = pkg3_resource.Quantity{} } else { - yyv4586 := &yymv4581 - yym4587 := z.DecBinary() - _ = yym4587 + yyv4595 := &yymv4590 + yym4596 := z.DecBinary() + _ = yym4596 if false { - } else if z.HasExtensions() && z.DecExt(yyv4586) { - } else if !yym4587 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv4586) + } else if z.HasExtensions() && z.DecExt(yyv4595) { + } else if !yym4596 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv4595) } else { - z.DecFallback(yyv4586, false) + z.DecFallback(yyv4595, false) } } - if yyv4581 != nil { - yyv4581[yymk4581] = yymv4581 + if yyv4590 != nil { + yyv4590[yymk4590] = yymv4590 } } } // else len==0: TODO: Should we clear map entries? @@ -58802,10 +58880,10 @@ func (x codecSelfer1234) encSliceNode(v []Node, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4588 := range v { + for _, yyv4597 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4589 := &yyv4588 - yy4589.CodecEncodeSelf(e) + yy4598 := &yyv4597 + yy4598.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58815,83 +58893,83 @@ func (x codecSelfer1234) decSliceNode(v *[]Node, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4590 := *v - yyh4590, yyl4590 := z.DecSliceHelperStart() - var yyc4590 bool - if yyl4590 == 0 { - if yyv4590 == nil { - yyv4590 = []Node{} - yyc4590 = true - } else if len(yyv4590) != 0 { - yyv4590 = yyv4590[:0] - yyc4590 = true + yyv4599 := *v + yyh4599, yyl4599 := z.DecSliceHelperStart() + var yyc4599 bool + if yyl4599 == 0 { + if yyv4599 == nil { + yyv4599 = []Node{} + yyc4599 = true + } else if len(yyv4599) != 0 { + yyv4599 = yyv4599[:0] + yyc4599 = true } - } else if yyl4590 > 0 { - var yyrr4590, yyrl4590 int - var yyrt4590 bool - if yyl4590 > cap(yyv4590) { + } else if yyl4599 > 0 { + var yyrr4599, yyrl4599 int + var yyrt4599 bool + if yyl4599 > cap(yyv4599) { - yyrg4590 := len(yyv4590) > 0 - yyv24590 := yyv4590 - yyrl4590, yyrt4590 = z.DecInferLen(yyl4590, z.DecBasicHandle().MaxInitLen, 616) - if yyrt4590 { - if yyrl4590 <= cap(yyv4590) { - yyv4590 = yyv4590[:yyrl4590] + yyrg4599 := len(yyv4599) > 0 + yyv24599 := yyv4599 + yyrl4599, yyrt4599 = z.DecInferLen(yyl4599, z.DecBasicHandle().MaxInitLen, 616) + if yyrt4599 { + if yyrl4599 <= cap(yyv4599) { + yyv4599 = yyv4599[:yyrl4599] } else { - yyv4590 = make([]Node, yyrl4590) + yyv4599 = make([]Node, yyrl4599) } } else { - yyv4590 = make([]Node, yyrl4590) + yyv4599 = make([]Node, yyrl4599) } - yyc4590 = true - yyrr4590 = len(yyv4590) - if yyrg4590 { - copy(yyv4590, yyv24590) + yyc4599 = true + yyrr4599 = len(yyv4599) + if yyrg4599 { + copy(yyv4599, yyv24599) } - } else if yyl4590 != len(yyv4590) { - yyv4590 = yyv4590[:yyl4590] - yyc4590 = true + } else if yyl4599 != len(yyv4599) { + yyv4599 = yyv4599[:yyl4599] + yyc4599 = true } - yyj4590 := 0 - for ; yyj4590 < yyrr4590; yyj4590++ { - yyh4590.ElemContainerState(yyj4590) + yyj4599 := 0 + for ; yyj4599 < yyrr4599; yyj4599++ { + yyh4599.ElemContainerState(yyj4599) if r.TryDecodeAsNil() { - yyv4590[yyj4590] = Node{} + yyv4599[yyj4599] = Node{} } else { - yyv4591 := &yyv4590[yyj4590] - yyv4591.CodecDecodeSelf(d) + yyv4600 := &yyv4599[yyj4599] + yyv4600.CodecDecodeSelf(d) } } - if yyrt4590 { - for ; yyj4590 < yyl4590; yyj4590++ { - yyv4590 = append(yyv4590, Node{}) - yyh4590.ElemContainerState(yyj4590) + if yyrt4599 { + for ; yyj4599 < yyl4599; yyj4599++ { + yyv4599 = append(yyv4599, Node{}) + yyh4599.ElemContainerState(yyj4599) if r.TryDecodeAsNil() { - yyv4590[yyj4590] = Node{} + yyv4599[yyj4599] = Node{} } else { - yyv4592 := &yyv4590[yyj4590] - yyv4592.CodecDecodeSelf(d) + yyv4601 := &yyv4599[yyj4599] + yyv4601.CodecDecodeSelf(d) } } } } else { - yyj4590 := 0 - for ; !r.CheckBreak(); yyj4590++ { + yyj4599 := 0 + for ; !r.CheckBreak(); yyj4599++ { - if yyj4590 >= len(yyv4590) { - yyv4590 = append(yyv4590, Node{}) // var yyz4590 Node - yyc4590 = true + if yyj4599 >= len(yyv4599) { + yyv4599 = append(yyv4599, Node{}) // var yyz4599 Node + yyc4599 = true } - yyh4590.ElemContainerState(yyj4590) - if yyj4590 < len(yyv4590) { + yyh4599.ElemContainerState(yyj4599) + if yyj4599 < len(yyv4599) { if r.TryDecodeAsNil() { - yyv4590[yyj4590] = Node{} + yyv4599[yyj4599] = Node{} } else { - yyv4593 := &yyv4590[yyj4590] - yyv4593.CodecDecodeSelf(d) + yyv4602 := &yyv4599[yyj4599] + yyv4602.CodecDecodeSelf(d) } } else { @@ -58899,17 +58977,17 @@ func (x codecSelfer1234) decSliceNode(v *[]Node, d *codec1978.Decoder) { } } - if yyj4590 < len(yyv4590) { - yyv4590 = yyv4590[:yyj4590] - yyc4590 = true - } else if yyj4590 == 0 && yyv4590 == nil { - yyv4590 = []Node{} - yyc4590 = true + if yyj4599 < len(yyv4599) { + yyv4599 = yyv4599[:yyj4599] + yyc4599 = true + } else if yyj4599 == 0 && yyv4599 == nil { + yyv4599 = []Node{} + yyc4599 = true } } - yyh4590.End() - if yyc4590 { - *v = yyv4590 + yyh4599.End() + if yyc4599 { + *v = yyv4599 } } @@ -58918,9 +58996,9 @@ func (x codecSelfer1234) encSliceFinalizerName(v []FinalizerName, e *codec1978.E z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4594 := range v { + for _, yyv4603 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yyv4594.CodecEncodeSelf(e) + yyv4603.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58930,75 +59008,75 @@ func (x codecSelfer1234) decSliceFinalizerName(v *[]FinalizerName, d *codec1978. z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4595 := *v - yyh4595, yyl4595 := z.DecSliceHelperStart() - var yyc4595 bool - if yyl4595 == 0 { - if yyv4595 == nil { - yyv4595 = []FinalizerName{} - yyc4595 = true - } else if len(yyv4595) != 0 { - yyv4595 = yyv4595[:0] - yyc4595 = true + yyv4604 := *v + yyh4604, yyl4604 := z.DecSliceHelperStart() + var yyc4604 bool + if yyl4604 == 0 { + if yyv4604 == nil { + yyv4604 = []FinalizerName{} + yyc4604 = true + } else if len(yyv4604) != 0 { + yyv4604 = yyv4604[:0] + yyc4604 = true } - } else if yyl4595 > 0 { - var yyrr4595, yyrl4595 int - var yyrt4595 bool - if yyl4595 > cap(yyv4595) { + } else if yyl4604 > 0 { + var yyrr4604, yyrl4604 int + var yyrt4604 bool + if yyl4604 > cap(yyv4604) { - yyrl4595, yyrt4595 = z.DecInferLen(yyl4595, z.DecBasicHandle().MaxInitLen, 16) - if yyrt4595 { - if yyrl4595 <= cap(yyv4595) { - yyv4595 = yyv4595[:yyrl4595] + yyrl4604, yyrt4604 = z.DecInferLen(yyl4604, z.DecBasicHandle().MaxInitLen, 16) + if yyrt4604 { + if yyrl4604 <= cap(yyv4604) { + yyv4604 = yyv4604[:yyrl4604] } else { - yyv4595 = make([]FinalizerName, yyrl4595) + yyv4604 = make([]FinalizerName, yyrl4604) } } else { - yyv4595 = make([]FinalizerName, yyrl4595) + yyv4604 = make([]FinalizerName, yyrl4604) } - yyc4595 = true - yyrr4595 = len(yyv4595) - } else if yyl4595 != len(yyv4595) { - yyv4595 = yyv4595[:yyl4595] - yyc4595 = true + yyc4604 = true + yyrr4604 = len(yyv4604) + } else if yyl4604 != len(yyv4604) { + yyv4604 = yyv4604[:yyl4604] + yyc4604 = true } - yyj4595 := 0 - for ; yyj4595 < yyrr4595; yyj4595++ { - yyh4595.ElemContainerState(yyj4595) + yyj4604 := 0 + for ; yyj4604 < yyrr4604; yyj4604++ { + yyh4604.ElemContainerState(yyj4604) if r.TryDecodeAsNil() { - yyv4595[yyj4595] = "" + yyv4604[yyj4604] = "" } else { - yyv4595[yyj4595] = FinalizerName(r.DecodeString()) + yyv4604[yyj4604] = FinalizerName(r.DecodeString()) } } - if yyrt4595 { - for ; yyj4595 < yyl4595; yyj4595++ { - yyv4595 = append(yyv4595, "") - yyh4595.ElemContainerState(yyj4595) + if yyrt4604 { + for ; yyj4604 < yyl4604; yyj4604++ { + yyv4604 = append(yyv4604, "") + yyh4604.ElemContainerState(yyj4604) if r.TryDecodeAsNil() { - yyv4595[yyj4595] = "" + yyv4604[yyj4604] = "" } else { - yyv4595[yyj4595] = FinalizerName(r.DecodeString()) + yyv4604[yyj4604] = FinalizerName(r.DecodeString()) } } } } else { - yyj4595 := 0 - for ; !r.CheckBreak(); yyj4595++ { + yyj4604 := 0 + for ; !r.CheckBreak(); yyj4604++ { - if yyj4595 >= len(yyv4595) { - yyv4595 = append(yyv4595, "") // var yyz4595 FinalizerName - yyc4595 = true + if yyj4604 >= len(yyv4604) { + yyv4604 = append(yyv4604, "") // var yyz4604 FinalizerName + yyc4604 = true } - yyh4595.ElemContainerState(yyj4595) - if yyj4595 < len(yyv4595) { + yyh4604.ElemContainerState(yyj4604) + if yyj4604 < len(yyv4604) { if r.TryDecodeAsNil() { - yyv4595[yyj4595] = "" + yyv4604[yyj4604] = "" } else { - yyv4595[yyj4595] = FinalizerName(r.DecodeString()) + yyv4604[yyj4604] = FinalizerName(r.DecodeString()) } } else { @@ -59006,17 +59084,17 @@ func (x codecSelfer1234) decSliceFinalizerName(v *[]FinalizerName, d *codec1978. } } - if yyj4595 < len(yyv4595) { - yyv4595 = yyv4595[:yyj4595] - yyc4595 = true - } else if yyj4595 == 0 && yyv4595 == nil { - yyv4595 = []FinalizerName{} - yyc4595 = true + if yyj4604 < len(yyv4604) { + yyv4604 = yyv4604[:yyj4604] + yyc4604 = true + } else if yyj4604 == 0 && yyv4604 == nil { + yyv4604 = []FinalizerName{} + yyc4604 = true } } - yyh4595.End() - if yyc4595 { - *v = yyv4595 + yyh4604.End() + if yyc4604 { + *v = yyv4604 } } @@ -59025,10 +59103,10 @@ func (x codecSelfer1234) encSliceNamespace(v []Namespace, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4599 := range v { + for _, yyv4608 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4600 := &yyv4599 - yy4600.CodecEncodeSelf(e) + yy4609 := &yyv4608 + yy4609.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -59038,83 +59116,83 @@ func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4601 := *v - yyh4601, yyl4601 := z.DecSliceHelperStart() - var yyc4601 bool - if yyl4601 == 0 { - if yyv4601 == nil { - yyv4601 = []Namespace{} - yyc4601 = true - } else if len(yyv4601) != 0 { - yyv4601 = yyv4601[:0] - yyc4601 = true + yyv4610 := *v + yyh4610, yyl4610 := z.DecSliceHelperStart() + var yyc4610 bool + if yyl4610 == 0 { + if yyv4610 == nil { + yyv4610 = []Namespace{} + yyc4610 = true + } else if len(yyv4610) != 0 { + yyv4610 = yyv4610[:0] + yyc4610 = true } - } else if yyl4601 > 0 { - var yyrr4601, yyrl4601 int - var yyrt4601 bool - if yyl4601 > cap(yyv4601) { + } else if yyl4610 > 0 { + var yyrr4610, yyrl4610 int + var yyrt4610 bool + if yyl4610 > cap(yyv4610) { - yyrg4601 := len(yyv4601) > 0 - yyv24601 := yyv4601 - yyrl4601, yyrt4601 = z.DecInferLen(yyl4601, z.DecBasicHandle().MaxInitLen, 280) - if yyrt4601 { - if yyrl4601 <= cap(yyv4601) { - yyv4601 = yyv4601[:yyrl4601] + yyrg4610 := len(yyv4610) > 0 + yyv24610 := yyv4610 + yyrl4610, yyrt4610 = z.DecInferLen(yyl4610, z.DecBasicHandle().MaxInitLen, 280) + if yyrt4610 { + if yyrl4610 <= cap(yyv4610) { + yyv4610 = yyv4610[:yyrl4610] } else { - yyv4601 = make([]Namespace, yyrl4601) + yyv4610 = make([]Namespace, yyrl4610) } } else { - yyv4601 = make([]Namespace, yyrl4601) + yyv4610 = make([]Namespace, yyrl4610) } - yyc4601 = true - yyrr4601 = len(yyv4601) - if yyrg4601 { - copy(yyv4601, yyv24601) + yyc4610 = true + yyrr4610 = len(yyv4610) + if yyrg4610 { + copy(yyv4610, yyv24610) } - } else if yyl4601 != len(yyv4601) { - yyv4601 = yyv4601[:yyl4601] - yyc4601 = true + } else if yyl4610 != len(yyv4610) { + yyv4610 = yyv4610[:yyl4610] + yyc4610 = true } - yyj4601 := 0 - for ; yyj4601 < yyrr4601; yyj4601++ { - yyh4601.ElemContainerState(yyj4601) + yyj4610 := 0 + for ; yyj4610 < yyrr4610; yyj4610++ { + yyh4610.ElemContainerState(yyj4610) if r.TryDecodeAsNil() { - yyv4601[yyj4601] = Namespace{} + yyv4610[yyj4610] = Namespace{} } else { - yyv4602 := &yyv4601[yyj4601] - yyv4602.CodecDecodeSelf(d) + yyv4611 := &yyv4610[yyj4610] + yyv4611.CodecDecodeSelf(d) } } - if yyrt4601 { - for ; yyj4601 < yyl4601; yyj4601++ { - yyv4601 = append(yyv4601, Namespace{}) - yyh4601.ElemContainerState(yyj4601) + if yyrt4610 { + for ; yyj4610 < yyl4610; yyj4610++ { + yyv4610 = append(yyv4610, Namespace{}) + yyh4610.ElemContainerState(yyj4610) if r.TryDecodeAsNil() { - yyv4601[yyj4601] = Namespace{} + yyv4610[yyj4610] = Namespace{} } else { - yyv4603 := &yyv4601[yyj4601] - yyv4603.CodecDecodeSelf(d) + yyv4612 := &yyv4610[yyj4610] + yyv4612.CodecDecodeSelf(d) } } } } else { - yyj4601 := 0 - for ; !r.CheckBreak(); yyj4601++ { + yyj4610 := 0 + for ; !r.CheckBreak(); yyj4610++ { - if yyj4601 >= len(yyv4601) { - yyv4601 = append(yyv4601, Namespace{}) // var yyz4601 Namespace - yyc4601 = true + if yyj4610 >= len(yyv4610) { + yyv4610 = append(yyv4610, Namespace{}) // var yyz4610 Namespace + yyc4610 = true } - yyh4601.ElemContainerState(yyj4601) - if yyj4601 < len(yyv4601) { + yyh4610.ElemContainerState(yyj4610) + if yyj4610 < len(yyv4610) { if r.TryDecodeAsNil() { - yyv4601[yyj4601] = Namespace{} + yyv4610[yyj4610] = Namespace{} } else { - yyv4604 := &yyv4601[yyj4601] - yyv4604.CodecDecodeSelf(d) + yyv4613 := &yyv4610[yyj4610] + yyv4613.CodecDecodeSelf(d) } } else { @@ -59122,17 +59200,17 @@ func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) } } - if yyj4601 < len(yyv4601) { - yyv4601 = yyv4601[:yyj4601] - yyc4601 = true - } else if yyj4601 == 0 && yyv4601 == nil { - yyv4601 = []Namespace{} - yyc4601 = true + if yyj4610 < len(yyv4610) { + yyv4610 = yyv4610[:yyj4610] + yyc4610 = true + } else if yyj4610 == 0 && yyv4610 == nil { + yyv4610 = []Namespace{} + yyc4610 = true } } - yyh4601.End() - if yyc4601 { - *v = yyv4601 + yyh4610.End() + if yyc4610 { + *v = yyv4610 } } @@ -59141,10 +59219,10 @@ func (x codecSelfer1234) encSliceEvent(v []Event, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4605 := range v { + for _, yyv4614 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4606 := &yyv4605 - yy4606.CodecEncodeSelf(e) + yy4615 := &yyv4614 + yy4615.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -59154,83 +59232,83 @@ func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4607 := *v - yyh4607, yyl4607 := z.DecSliceHelperStart() - var yyc4607 bool - if yyl4607 == 0 { - if yyv4607 == nil { - yyv4607 = []Event{} - yyc4607 = true - } else if len(yyv4607) != 0 { - yyv4607 = yyv4607[:0] - yyc4607 = true + yyv4616 := *v + yyh4616, yyl4616 := z.DecSliceHelperStart() + var yyc4616 bool + if yyl4616 == 0 { + if yyv4616 == nil { + yyv4616 = []Event{} + yyc4616 = true + } else if len(yyv4616) != 0 { + yyv4616 = yyv4616[:0] + yyc4616 = true } - } else if yyl4607 > 0 { - var yyrr4607, yyrl4607 int - var yyrt4607 bool - if yyl4607 > cap(yyv4607) { + } else if yyl4616 > 0 { + var yyrr4616, yyrl4616 int + var yyrt4616 bool + if yyl4616 > cap(yyv4616) { - yyrg4607 := len(yyv4607) > 0 - yyv24607 := yyv4607 - yyrl4607, yyrt4607 = z.DecInferLen(yyl4607, z.DecBasicHandle().MaxInitLen, 488) - if yyrt4607 { - if yyrl4607 <= cap(yyv4607) { - yyv4607 = yyv4607[:yyrl4607] + yyrg4616 := len(yyv4616) > 0 + yyv24616 := yyv4616 + yyrl4616, yyrt4616 = z.DecInferLen(yyl4616, z.DecBasicHandle().MaxInitLen, 488) + if yyrt4616 { + if yyrl4616 <= cap(yyv4616) { + yyv4616 = yyv4616[:yyrl4616] } else { - yyv4607 = make([]Event, yyrl4607) + yyv4616 = make([]Event, yyrl4616) } } else { - yyv4607 = make([]Event, yyrl4607) + yyv4616 = make([]Event, yyrl4616) } - yyc4607 = true - yyrr4607 = len(yyv4607) - if yyrg4607 { - copy(yyv4607, yyv24607) + yyc4616 = true + yyrr4616 = len(yyv4616) + if yyrg4616 { + copy(yyv4616, yyv24616) } - } else if yyl4607 != len(yyv4607) { - yyv4607 = yyv4607[:yyl4607] - yyc4607 = true + } else if yyl4616 != len(yyv4616) { + yyv4616 = yyv4616[:yyl4616] + yyc4616 = true } - yyj4607 := 0 - for ; yyj4607 < yyrr4607; yyj4607++ { - yyh4607.ElemContainerState(yyj4607) + yyj4616 := 0 + for ; yyj4616 < yyrr4616; yyj4616++ { + yyh4616.ElemContainerState(yyj4616) if r.TryDecodeAsNil() { - yyv4607[yyj4607] = Event{} + yyv4616[yyj4616] = Event{} } else { - yyv4608 := &yyv4607[yyj4607] - yyv4608.CodecDecodeSelf(d) + yyv4617 := &yyv4616[yyj4616] + yyv4617.CodecDecodeSelf(d) } } - if yyrt4607 { - for ; yyj4607 < yyl4607; yyj4607++ { - yyv4607 = append(yyv4607, Event{}) - yyh4607.ElemContainerState(yyj4607) + if yyrt4616 { + for ; yyj4616 < yyl4616; yyj4616++ { + yyv4616 = append(yyv4616, Event{}) + yyh4616.ElemContainerState(yyj4616) if r.TryDecodeAsNil() { - yyv4607[yyj4607] = Event{} + yyv4616[yyj4616] = Event{} } else { - yyv4609 := &yyv4607[yyj4607] - yyv4609.CodecDecodeSelf(d) + yyv4618 := &yyv4616[yyj4616] + yyv4618.CodecDecodeSelf(d) } } } } else { - yyj4607 := 0 - for ; !r.CheckBreak(); yyj4607++ { + yyj4616 := 0 + for ; !r.CheckBreak(); yyj4616++ { - if yyj4607 >= len(yyv4607) { - yyv4607 = append(yyv4607, Event{}) // var yyz4607 Event - yyc4607 = true + if yyj4616 >= len(yyv4616) { + yyv4616 = append(yyv4616, Event{}) // var yyz4616 Event + yyc4616 = true } - yyh4607.ElemContainerState(yyj4607) - if yyj4607 < len(yyv4607) { + yyh4616.ElemContainerState(yyj4616) + if yyj4616 < len(yyv4616) { if r.TryDecodeAsNil() { - yyv4607[yyj4607] = Event{} + yyv4616[yyj4616] = Event{} } else { - yyv4610 := &yyv4607[yyj4607] - yyv4610.CodecDecodeSelf(d) + yyv4619 := &yyv4616[yyj4616] + yyv4619.CodecDecodeSelf(d) } } else { @@ -59238,17 +59316,17 @@ func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) { } } - if yyj4607 < len(yyv4607) { - yyv4607 = yyv4607[:yyj4607] - yyc4607 = true - } else if yyj4607 == 0 && yyv4607 == nil { - yyv4607 = []Event{} - yyc4607 = true + if yyj4616 < len(yyv4616) { + yyv4616 = yyv4616[:yyj4616] + yyc4616 = true + } else if yyj4616 == 0 && yyv4616 == nil { + yyv4616 = []Event{} + yyc4616 = true } } - yyh4607.End() - if yyc4607 { - *v = yyv4607 + yyh4616.End() + if yyc4616 { + *v = yyv4616 } } @@ -59257,17 +59335,17 @@ func (x codecSelfer1234) encSliceruntime_RawExtension(v []pkg5_runtime.RawExtens z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4611 := range v { + for _, yyv4620 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4612 := &yyv4611 - yym4613 := z.EncBinary() - _ = yym4613 + yy4621 := &yyv4620 + yym4622 := z.EncBinary() + _ = yym4622 if false { - } else if z.HasExtensions() && z.EncExt(yy4612) { - } else if !yym4613 && z.IsJSONHandle() { - z.EncJSONMarshal(yy4612) + } else if z.HasExtensions() && z.EncExt(yy4621) { + } else if !yym4622 && z.IsJSONHandle() { + z.EncJSONMarshal(yy4621) } else { - z.EncFallback(yy4612) + z.EncFallback(yy4621) } } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) @@ -59278,78 +59356,78 @@ func (x codecSelfer1234) decSliceruntime_RawExtension(v *[]pkg5_runtime.RawExten z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4614 := *v - yyh4614, yyl4614 := z.DecSliceHelperStart() - var yyc4614 bool - if yyl4614 == 0 { - if yyv4614 == nil { - yyv4614 = []pkg5_runtime.RawExtension{} - yyc4614 = true - } else if len(yyv4614) != 0 { - yyv4614 = yyv4614[:0] - yyc4614 = true + yyv4623 := *v + yyh4623, yyl4623 := z.DecSliceHelperStart() + var yyc4623 bool + if yyl4623 == 0 { + if yyv4623 == nil { + yyv4623 = []pkg5_runtime.RawExtension{} + yyc4623 = true + } else if len(yyv4623) != 0 { + yyv4623 = yyv4623[:0] + yyc4623 = true } - } else if yyl4614 > 0 { - var yyrr4614, yyrl4614 int - var yyrt4614 bool - if yyl4614 > cap(yyv4614) { + } else if yyl4623 > 0 { + var yyrr4623, yyrl4623 int + var yyrt4623 bool + if yyl4623 > cap(yyv4623) { - yyrg4614 := len(yyv4614) > 0 - yyv24614 := yyv4614 - yyrl4614, yyrt4614 = z.DecInferLen(yyl4614, z.DecBasicHandle().MaxInitLen, 40) - if yyrt4614 { - if yyrl4614 <= cap(yyv4614) { - yyv4614 = yyv4614[:yyrl4614] + yyrg4623 := len(yyv4623) > 0 + yyv24623 := yyv4623 + yyrl4623, yyrt4623 = z.DecInferLen(yyl4623, z.DecBasicHandle().MaxInitLen, 40) + if yyrt4623 { + if yyrl4623 <= cap(yyv4623) { + yyv4623 = yyv4623[:yyrl4623] } else { - yyv4614 = make([]pkg5_runtime.RawExtension, yyrl4614) + yyv4623 = make([]pkg5_runtime.RawExtension, yyrl4623) } } else { - yyv4614 = make([]pkg5_runtime.RawExtension, yyrl4614) + yyv4623 = make([]pkg5_runtime.RawExtension, yyrl4623) } - yyc4614 = true - yyrr4614 = len(yyv4614) - if yyrg4614 { - copy(yyv4614, yyv24614) + yyc4623 = true + yyrr4623 = len(yyv4623) + if yyrg4623 { + copy(yyv4623, yyv24623) } - } else if yyl4614 != len(yyv4614) { - yyv4614 = yyv4614[:yyl4614] - yyc4614 = true + } else if yyl4623 != len(yyv4623) { + yyv4623 = yyv4623[:yyl4623] + yyc4623 = true } - yyj4614 := 0 - for ; yyj4614 < yyrr4614; yyj4614++ { - yyh4614.ElemContainerState(yyj4614) + yyj4623 := 0 + for ; yyj4623 < yyrr4623; yyj4623++ { + yyh4623.ElemContainerState(yyj4623) if r.TryDecodeAsNil() { - yyv4614[yyj4614] = pkg5_runtime.RawExtension{} + yyv4623[yyj4623] = pkg5_runtime.RawExtension{} } else { - yyv4615 := &yyv4614[yyj4614] - yym4616 := z.DecBinary() - _ = yym4616 + yyv4624 := &yyv4623[yyj4623] + yym4625 := z.DecBinary() + _ = yym4625 if false { - } else if z.HasExtensions() && z.DecExt(yyv4615) { - } else if !yym4616 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv4615) + } else if z.HasExtensions() && z.DecExt(yyv4624) { + } else if !yym4625 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv4624) } else { - z.DecFallback(yyv4615, false) + z.DecFallback(yyv4624, false) } } } - if yyrt4614 { - for ; yyj4614 < yyl4614; yyj4614++ { - yyv4614 = append(yyv4614, pkg5_runtime.RawExtension{}) - yyh4614.ElemContainerState(yyj4614) + if yyrt4623 { + for ; yyj4623 < yyl4623; yyj4623++ { + yyv4623 = append(yyv4623, pkg5_runtime.RawExtension{}) + yyh4623.ElemContainerState(yyj4623) if r.TryDecodeAsNil() { - yyv4614[yyj4614] = pkg5_runtime.RawExtension{} + yyv4623[yyj4623] = pkg5_runtime.RawExtension{} } else { - yyv4617 := &yyv4614[yyj4614] - yym4618 := z.DecBinary() - _ = yym4618 + yyv4626 := &yyv4623[yyj4623] + yym4627 := z.DecBinary() + _ = yym4627 if false { - } else if z.HasExtensions() && z.DecExt(yyv4617) { - } else if !yym4618 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv4617) + } else if z.HasExtensions() && z.DecExt(yyv4626) { + } else if !yym4627 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv4626) } else { - z.DecFallback(yyv4617, false) + z.DecFallback(yyv4626, false) } } @@ -59357,27 +59435,27 @@ func (x codecSelfer1234) decSliceruntime_RawExtension(v *[]pkg5_runtime.RawExten } } else { - yyj4614 := 0 - for ; !r.CheckBreak(); yyj4614++ { + yyj4623 := 0 + for ; !r.CheckBreak(); yyj4623++ { - if yyj4614 >= len(yyv4614) { - yyv4614 = append(yyv4614, pkg5_runtime.RawExtension{}) // var yyz4614 pkg5_runtime.RawExtension - yyc4614 = true + if yyj4623 >= len(yyv4623) { + yyv4623 = append(yyv4623, pkg5_runtime.RawExtension{}) // var yyz4623 pkg5_runtime.RawExtension + yyc4623 = true } - yyh4614.ElemContainerState(yyj4614) - if yyj4614 < len(yyv4614) { + yyh4623.ElemContainerState(yyj4623) + if yyj4623 < len(yyv4623) { if r.TryDecodeAsNil() { - yyv4614[yyj4614] = pkg5_runtime.RawExtension{} + yyv4623[yyj4623] = pkg5_runtime.RawExtension{} } else { - yyv4619 := &yyv4614[yyj4614] - yym4620 := z.DecBinary() - _ = yym4620 + yyv4628 := &yyv4623[yyj4623] + yym4629 := z.DecBinary() + _ = yym4629 if false { - } else if z.HasExtensions() && z.DecExt(yyv4619) { - } else if !yym4620 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv4619) + } else if z.HasExtensions() && z.DecExt(yyv4628) { + } else if !yym4629 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv4628) } else { - z.DecFallback(yyv4619, false) + z.DecFallback(yyv4628, false) } } @@ -59386,17 +59464,17 @@ func (x codecSelfer1234) decSliceruntime_RawExtension(v *[]pkg5_runtime.RawExten } } - if yyj4614 < len(yyv4614) { - yyv4614 = yyv4614[:yyj4614] - yyc4614 = true - } else if yyj4614 == 0 && yyv4614 == nil { - yyv4614 = []pkg5_runtime.RawExtension{} - yyc4614 = true + if yyj4623 < len(yyv4623) { + yyv4623 = yyv4623[:yyj4623] + yyc4623 = true + } else if yyj4623 == 0 && yyv4623 == nil { + yyv4623 = []pkg5_runtime.RawExtension{} + yyc4623 = true } } - yyh4614.End() - if yyc4614 { - *v = yyv4614 + yyh4623.End() + if yyc4623 { + *v = yyv4623 } } @@ -59405,10 +59483,10 @@ func (x codecSelfer1234) encSliceLimitRangeItem(v []LimitRangeItem, e *codec1978 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4621 := range v { + for _, yyv4630 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4622 := &yyv4621 - yy4622.CodecEncodeSelf(e) + yy4631 := &yyv4630 + yy4631.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -59418,83 +59496,83 @@ func (x codecSelfer1234) decSliceLimitRangeItem(v *[]LimitRangeItem, d *codec197 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4623 := *v - yyh4623, yyl4623 := z.DecSliceHelperStart() - var yyc4623 bool - if yyl4623 == 0 { - if yyv4623 == nil { - yyv4623 = []LimitRangeItem{} - yyc4623 = true - } else if len(yyv4623) != 0 { - yyv4623 = yyv4623[:0] - yyc4623 = true + yyv4632 := *v + yyh4632, yyl4632 := z.DecSliceHelperStart() + var yyc4632 bool + if yyl4632 == 0 { + if yyv4632 == nil { + yyv4632 = []LimitRangeItem{} + yyc4632 = true + } else if len(yyv4632) != 0 { + yyv4632 = yyv4632[:0] + yyc4632 = true } - } else if yyl4623 > 0 { - var yyrr4623, yyrl4623 int - var yyrt4623 bool - if yyl4623 > cap(yyv4623) { + } else if yyl4632 > 0 { + var yyrr4632, yyrl4632 int + var yyrt4632 bool + if yyl4632 > cap(yyv4632) { - yyrg4623 := len(yyv4623) > 0 - yyv24623 := yyv4623 - yyrl4623, yyrt4623 = z.DecInferLen(yyl4623, z.DecBasicHandle().MaxInitLen, 56) - if yyrt4623 { - if yyrl4623 <= cap(yyv4623) { - yyv4623 = yyv4623[:yyrl4623] + yyrg4632 := len(yyv4632) > 0 + yyv24632 := yyv4632 + yyrl4632, yyrt4632 = z.DecInferLen(yyl4632, z.DecBasicHandle().MaxInitLen, 56) + if yyrt4632 { + if yyrl4632 <= cap(yyv4632) { + yyv4632 = yyv4632[:yyrl4632] } else { - yyv4623 = make([]LimitRangeItem, yyrl4623) + yyv4632 = make([]LimitRangeItem, yyrl4632) } } else { - yyv4623 = make([]LimitRangeItem, yyrl4623) + yyv4632 = make([]LimitRangeItem, yyrl4632) } - yyc4623 = true - yyrr4623 = len(yyv4623) - if yyrg4623 { - copy(yyv4623, yyv24623) + yyc4632 = true + yyrr4632 = len(yyv4632) + if yyrg4632 { + copy(yyv4632, yyv24632) } - } else if yyl4623 != len(yyv4623) { - yyv4623 = yyv4623[:yyl4623] - yyc4623 = true + } else if yyl4632 != len(yyv4632) { + yyv4632 = yyv4632[:yyl4632] + yyc4632 = true } - yyj4623 := 0 - for ; yyj4623 < yyrr4623; yyj4623++ { - yyh4623.ElemContainerState(yyj4623) + yyj4632 := 0 + for ; yyj4632 < yyrr4632; yyj4632++ { + yyh4632.ElemContainerState(yyj4632) if r.TryDecodeAsNil() { - yyv4623[yyj4623] = LimitRangeItem{} + yyv4632[yyj4632] = LimitRangeItem{} } else { - yyv4624 := &yyv4623[yyj4623] - yyv4624.CodecDecodeSelf(d) + yyv4633 := &yyv4632[yyj4632] + yyv4633.CodecDecodeSelf(d) } } - if yyrt4623 { - for ; yyj4623 < yyl4623; yyj4623++ { - yyv4623 = append(yyv4623, LimitRangeItem{}) - yyh4623.ElemContainerState(yyj4623) + if yyrt4632 { + for ; yyj4632 < yyl4632; yyj4632++ { + yyv4632 = append(yyv4632, LimitRangeItem{}) + yyh4632.ElemContainerState(yyj4632) if r.TryDecodeAsNil() { - yyv4623[yyj4623] = LimitRangeItem{} + yyv4632[yyj4632] = LimitRangeItem{} } else { - yyv4625 := &yyv4623[yyj4623] - yyv4625.CodecDecodeSelf(d) + yyv4634 := &yyv4632[yyj4632] + yyv4634.CodecDecodeSelf(d) } } } } else { - yyj4623 := 0 - for ; !r.CheckBreak(); yyj4623++ { + yyj4632 := 0 + for ; !r.CheckBreak(); yyj4632++ { - if yyj4623 >= len(yyv4623) { - yyv4623 = append(yyv4623, LimitRangeItem{}) // var yyz4623 LimitRangeItem - yyc4623 = true + if yyj4632 >= len(yyv4632) { + yyv4632 = append(yyv4632, LimitRangeItem{}) // var yyz4632 LimitRangeItem + yyc4632 = true } - yyh4623.ElemContainerState(yyj4623) - if yyj4623 < len(yyv4623) { + yyh4632.ElemContainerState(yyj4632) + if yyj4632 < len(yyv4632) { if r.TryDecodeAsNil() { - yyv4623[yyj4623] = LimitRangeItem{} + yyv4632[yyj4632] = LimitRangeItem{} } else { - yyv4626 := &yyv4623[yyj4623] - yyv4626.CodecDecodeSelf(d) + yyv4635 := &yyv4632[yyj4632] + yyv4635.CodecDecodeSelf(d) } } else { @@ -59502,17 +59580,17 @@ func (x codecSelfer1234) decSliceLimitRangeItem(v *[]LimitRangeItem, d *codec197 } } - if yyj4623 < len(yyv4623) { - yyv4623 = yyv4623[:yyj4623] - yyc4623 = true - } else if yyj4623 == 0 && yyv4623 == nil { - yyv4623 = []LimitRangeItem{} - yyc4623 = true + if yyj4632 < len(yyv4632) { + yyv4632 = yyv4632[:yyj4632] + yyc4632 = true + } else if yyj4632 == 0 && yyv4632 == nil { + yyv4632 = []LimitRangeItem{} + yyc4632 = true } } - yyh4623.End() - if yyc4623 { - *v = yyv4623 + yyh4632.End() + if yyc4632 { + *v = yyv4632 } } @@ -59521,10 +59599,10 @@ func (x codecSelfer1234) encSliceLimitRange(v []LimitRange, e *codec1978.Encoder z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4627 := range v { + for _, yyv4636 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4628 := &yyv4627 - yy4628.CodecEncodeSelf(e) + yy4637 := &yyv4636 + yy4637.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -59534,83 +59612,83 @@ func (x codecSelfer1234) decSliceLimitRange(v *[]LimitRange, d *codec1978.Decode z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4629 := *v - yyh4629, yyl4629 := z.DecSliceHelperStart() - var yyc4629 bool - if yyl4629 == 0 { - if yyv4629 == nil { - yyv4629 = []LimitRange{} - yyc4629 = true - } else if len(yyv4629) != 0 { - yyv4629 = yyv4629[:0] - yyc4629 = true + yyv4638 := *v + yyh4638, yyl4638 := z.DecSliceHelperStart() + var yyc4638 bool + if yyl4638 == 0 { + if yyv4638 == nil { + yyv4638 = []LimitRange{} + yyc4638 = true + } else if len(yyv4638) != 0 { + yyv4638 = yyv4638[:0] + yyc4638 = true } - } else if yyl4629 > 0 { - var yyrr4629, yyrl4629 int - var yyrt4629 bool - if yyl4629 > cap(yyv4629) { + } else if yyl4638 > 0 { + var yyrr4638, yyrl4638 int + var yyrt4638 bool + if yyl4638 > cap(yyv4638) { - yyrg4629 := len(yyv4629) > 0 - yyv24629 := yyv4629 - yyrl4629, yyrt4629 = z.DecInferLen(yyl4629, z.DecBasicHandle().MaxInitLen, 264) - if yyrt4629 { - if yyrl4629 <= cap(yyv4629) { - yyv4629 = yyv4629[:yyrl4629] + yyrg4638 := len(yyv4638) > 0 + yyv24638 := yyv4638 + yyrl4638, yyrt4638 = z.DecInferLen(yyl4638, z.DecBasicHandle().MaxInitLen, 264) + if yyrt4638 { + if yyrl4638 <= cap(yyv4638) { + yyv4638 = yyv4638[:yyrl4638] } else { - yyv4629 = make([]LimitRange, yyrl4629) + yyv4638 = make([]LimitRange, yyrl4638) } } else { - yyv4629 = make([]LimitRange, yyrl4629) + yyv4638 = make([]LimitRange, yyrl4638) } - yyc4629 = true - yyrr4629 = len(yyv4629) - if yyrg4629 { - copy(yyv4629, yyv24629) + yyc4638 = true + yyrr4638 = len(yyv4638) + if yyrg4638 { + copy(yyv4638, yyv24638) } - } else if yyl4629 != len(yyv4629) { - yyv4629 = yyv4629[:yyl4629] - yyc4629 = true + } else if yyl4638 != len(yyv4638) { + yyv4638 = yyv4638[:yyl4638] + yyc4638 = true } - yyj4629 := 0 - for ; yyj4629 < yyrr4629; yyj4629++ { - yyh4629.ElemContainerState(yyj4629) + yyj4638 := 0 + for ; yyj4638 < yyrr4638; yyj4638++ { + yyh4638.ElemContainerState(yyj4638) if r.TryDecodeAsNil() { - yyv4629[yyj4629] = LimitRange{} + yyv4638[yyj4638] = LimitRange{} } else { - yyv4630 := &yyv4629[yyj4629] - yyv4630.CodecDecodeSelf(d) + yyv4639 := &yyv4638[yyj4638] + yyv4639.CodecDecodeSelf(d) } } - if yyrt4629 { - for ; yyj4629 < yyl4629; yyj4629++ { - yyv4629 = append(yyv4629, LimitRange{}) - yyh4629.ElemContainerState(yyj4629) + if yyrt4638 { + for ; yyj4638 < yyl4638; yyj4638++ { + yyv4638 = append(yyv4638, LimitRange{}) + yyh4638.ElemContainerState(yyj4638) if r.TryDecodeAsNil() { - yyv4629[yyj4629] = LimitRange{} + yyv4638[yyj4638] = LimitRange{} } else { - yyv4631 := &yyv4629[yyj4629] - yyv4631.CodecDecodeSelf(d) + yyv4640 := &yyv4638[yyj4638] + yyv4640.CodecDecodeSelf(d) } } } } else { - yyj4629 := 0 - for ; !r.CheckBreak(); yyj4629++ { + yyj4638 := 0 + for ; !r.CheckBreak(); yyj4638++ { - if yyj4629 >= len(yyv4629) { - yyv4629 = append(yyv4629, LimitRange{}) // var yyz4629 LimitRange - yyc4629 = true + if yyj4638 >= len(yyv4638) { + yyv4638 = append(yyv4638, LimitRange{}) // var yyz4638 LimitRange + yyc4638 = true } - yyh4629.ElemContainerState(yyj4629) - if yyj4629 < len(yyv4629) { + yyh4638.ElemContainerState(yyj4638) + if yyj4638 < len(yyv4638) { if r.TryDecodeAsNil() { - yyv4629[yyj4629] = LimitRange{} + yyv4638[yyj4638] = LimitRange{} } else { - yyv4632 := &yyv4629[yyj4629] - yyv4632.CodecDecodeSelf(d) + yyv4641 := &yyv4638[yyj4638] + yyv4641.CodecDecodeSelf(d) } } else { @@ -59618,17 +59696,17 @@ func (x codecSelfer1234) decSliceLimitRange(v *[]LimitRange, d *codec1978.Decode } } - if yyj4629 < len(yyv4629) { - yyv4629 = yyv4629[:yyj4629] - yyc4629 = true - } else if yyj4629 == 0 && yyv4629 == nil { - yyv4629 = []LimitRange{} - yyc4629 = true + if yyj4638 < len(yyv4638) { + yyv4638 = yyv4638[:yyj4638] + yyc4638 = true + } else if yyj4638 == 0 && yyv4638 == nil { + yyv4638 = []LimitRange{} + yyc4638 = true } } - yyh4629.End() - if yyc4629 { - *v = yyv4629 + yyh4638.End() + if yyc4638 { + *v = yyv4638 } } @@ -59637,9 +59715,9 @@ func (x codecSelfer1234) encSliceResourceQuotaScope(v []ResourceQuotaScope, e *c z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4633 := range v { + for _, yyv4642 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yyv4633.CodecEncodeSelf(e) + yyv4642.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -59649,75 +59727,75 @@ func (x codecSelfer1234) decSliceResourceQuotaScope(v *[]ResourceQuotaScope, d * z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4634 := *v - yyh4634, yyl4634 := z.DecSliceHelperStart() - var yyc4634 bool - if yyl4634 == 0 { - if yyv4634 == nil { - yyv4634 = []ResourceQuotaScope{} - yyc4634 = true - } else if len(yyv4634) != 0 { - yyv4634 = yyv4634[:0] - yyc4634 = true + yyv4643 := *v + yyh4643, yyl4643 := z.DecSliceHelperStart() + var yyc4643 bool + if yyl4643 == 0 { + if yyv4643 == nil { + yyv4643 = []ResourceQuotaScope{} + yyc4643 = true + } else if len(yyv4643) != 0 { + yyv4643 = yyv4643[:0] + yyc4643 = true } - } else if yyl4634 > 0 { - var yyrr4634, yyrl4634 int - var yyrt4634 bool - if yyl4634 > cap(yyv4634) { + } else if yyl4643 > 0 { + var yyrr4643, yyrl4643 int + var yyrt4643 bool + if yyl4643 > cap(yyv4643) { - yyrl4634, yyrt4634 = z.DecInferLen(yyl4634, z.DecBasicHandle().MaxInitLen, 16) - if yyrt4634 { - if yyrl4634 <= cap(yyv4634) { - yyv4634 = yyv4634[:yyrl4634] + yyrl4643, yyrt4643 = z.DecInferLen(yyl4643, z.DecBasicHandle().MaxInitLen, 16) + if yyrt4643 { + if yyrl4643 <= cap(yyv4643) { + yyv4643 = yyv4643[:yyrl4643] } else { - yyv4634 = make([]ResourceQuotaScope, yyrl4634) + yyv4643 = make([]ResourceQuotaScope, yyrl4643) } } else { - yyv4634 = make([]ResourceQuotaScope, yyrl4634) + yyv4643 = make([]ResourceQuotaScope, yyrl4643) } - yyc4634 = true - yyrr4634 = len(yyv4634) - } else if yyl4634 != len(yyv4634) { - yyv4634 = yyv4634[:yyl4634] - yyc4634 = true + yyc4643 = true + yyrr4643 = len(yyv4643) + } else if yyl4643 != len(yyv4643) { + yyv4643 = yyv4643[:yyl4643] + yyc4643 = true } - yyj4634 := 0 - for ; yyj4634 < yyrr4634; yyj4634++ { - yyh4634.ElemContainerState(yyj4634) + yyj4643 := 0 + for ; yyj4643 < yyrr4643; yyj4643++ { + yyh4643.ElemContainerState(yyj4643) if r.TryDecodeAsNil() { - yyv4634[yyj4634] = "" + yyv4643[yyj4643] = "" } else { - yyv4634[yyj4634] = ResourceQuotaScope(r.DecodeString()) + yyv4643[yyj4643] = ResourceQuotaScope(r.DecodeString()) } } - if yyrt4634 { - for ; yyj4634 < yyl4634; yyj4634++ { - yyv4634 = append(yyv4634, "") - yyh4634.ElemContainerState(yyj4634) + if yyrt4643 { + for ; yyj4643 < yyl4643; yyj4643++ { + yyv4643 = append(yyv4643, "") + yyh4643.ElemContainerState(yyj4643) if r.TryDecodeAsNil() { - yyv4634[yyj4634] = "" + yyv4643[yyj4643] = "" } else { - yyv4634[yyj4634] = ResourceQuotaScope(r.DecodeString()) + yyv4643[yyj4643] = ResourceQuotaScope(r.DecodeString()) } } } } else { - yyj4634 := 0 - for ; !r.CheckBreak(); yyj4634++ { + yyj4643 := 0 + for ; !r.CheckBreak(); yyj4643++ { - if yyj4634 >= len(yyv4634) { - yyv4634 = append(yyv4634, "") // var yyz4634 ResourceQuotaScope - yyc4634 = true + if yyj4643 >= len(yyv4643) { + yyv4643 = append(yyv4643, "") // var yyz4643 ResourceQuotaScope + yyc4643 = true } - yyh4634.ElemContainerState(yyj4634) - if yyj4634 < len(yyv4634) { + yyh4643.ElemContainerState(yyj4643) + if yyj4643 < len(yyv4643) { if r.TryDecodeAsNil() { - yyv4634[yyj4634] = "" + yyv4643[yyj4643] = "" } else { - yyv4634[yyj4634] = ResourceQuotaScope(r.DecodeString()) + yyv4643[yyj4643] = ResourceQuotaScope(r.DecodeString()) } } else { @@ -59725,17 +59803,17 @@ func (x codecSelfer1234) decSliceResourceQuotaScope(v *[]ResourceQuotaScope, d * } } - if yyj4634 < len(yyv4634) { - yyv4634 = yyv4634[:yyj4634] - yyc4634 = true - } else if yyj4634 == 0 && yyv4634 == nil { - yyv4634 = []ResourceQuotaScope{} - yyc4634 = true + if yyj4643 < len(yyv4643) { + yyv4643 = yyv4643[:yyj4643] + yyc4643 = true + } else if yyj4643 == 0 && yyv4643 == nil { + yyv4643 = []ResourceQuotaScope{} + yyc4643 = true } } - yyh4634.End() - if yyc4634 { - *v = yyv4634 + yyh4643.End() + if yyc4643 { + *v = yyv4643 } } @@ -59744,10 +59822,10 @@ func (x codecSelfer1234) encSliceResourceQuota(v []ResourceQuota, e *codec1978.E z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4638 := range v { + for _, yyv4647 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4639 := &yyv4638 - yy4639.CodecEncodeSelf(e) + yy4648 := &yyv4647 + yy4648.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -59757,83 +59835,83 @@ func (x codecSelfer1234) decSliceResourceQuota(v *[]ResourceQuota, d *codec1978. z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4640 := *v - yyh4640, yyl4640 := z.DecSliceHelperStart() - var yyc4640 bool - if yyl4640 == 0 { - if yyv4640 == nil { - yyv4640 = []ResourceQuota{} - yyc4640 = true - } else if len(yyv4640) != 0 { - yyv4640 = yyv4640[:0] - yyc4640 = true + yyv4649 := *v + yyh4649, yyl4649 := z.DecSliceHelperStart() + var yyc4649 bool + if yyl4649 == 0 { + if yyv4649 == nil { + yyv4649 = []ResourceQuota{} + yyc4649 = true + } else if len(yyv4649) != 0 { + yyv4649 = yyv4649[:0] + yyc4649 = true } - } else if yyl4640 > 0 { - var yyrr4640, yyrl4640 int - var yyrt4640 bool - if yyl4640 > cap(yyv4640) { + } else if yyl4649 > 0 { + var yyrr4649, yyrl4649 int + var yyrt4649 bool + if yyl4649 > cap(yyv4649) { - yyrg4640 := len(yyv4640) > 0 - yyv24640 := yyv4640 - yyrl4640, yyrt4640 = z.DecInferLen(yyl4640, z.DecBasicHandle().MaxInitLen, 288) - if yyrt4640 { - if yyrl4640 <= cap(yyv4640) { - yyv4640 = yyv4640[:yyrl4640] + yyrg4649 := len(yyv4649) > 0 + yyv24649 := yyv4649 + yyrl4649, yyrt4649 = z.DecInferLen(yyl4649, z.DecBasicHandle().MaxInitLen, 288) + if yyrt4649 { + if yyrl4649 <= cap(yyv4649) { + yyv4649 = yyv4649[:yyrl4649] } else { - yyv4640 = make([]ResourceQuota, yyrl4640) + yyv4649 = make([]ResourceQuota, yyrl4649) } } else { - yyv4640 = make([]ResourceQuota, yyrl4640) + yyv4649 = make([]ResourceQuota, yyrl4649) } - yyc4640 = true - yyrr4640 = len(yyv4640) - if yyrg4640 { - copy(yyv4640, yyv24640) + yyc4649 = true + yyrr4649 = len(yyv4649) + if yyrg4649 { + copy(yyv4649, yyv24649) } - } else if yyl4640 != len(yyv4640) { - yyv4640 = yyv4640[:yyl4640] - yyc4640 = true + } else if yyl4649 != len(yyv4649) { + yyv4649 = yyv4649[:yyl4649] + yyc4649 = true } - yyj4640 := 0 - for ; yyj4640 < yyrr4640; yyj4640++ { - yyh4640.ElemContainerState(yyj4640) + yyj4649 := 0 + for ; yyj4649 < yyrr4649; yyj4649++ { + yyh4649.ElemContainerState(yyj4649) if r.TryDecodeAsNil() { - yyv4640[yyj4640] = ResourceQuota{} + yyv4649[yyj4649] = ResourceQuota{} } else { - yyv4641 := &yyv4640[yyj4640] - yyv4641.CodecDecodeSelf(d) + yyv4650 := &yyv4649[yyj4649] + yyv4650.CodecDecodeSelf(d) } } - if yyrt4640 { - for ; yyj4640 < yyl4640; yyj4640++ { - yyv4640 = append(yyv4640, ResourceQuota{}) - yyh4640.ElemContainerState(yyj4640) + if yyrt4649 { + for ; yyj4649 < yyl4649; yyj4649++ { + yyv4649 = append(yyv4649, ResourceQuota{}) + yyh4649.ElemContainerState(yyj4649) if r.TryDecodeAsNil() { - yyv4640[yyj4640] = ResourceQuota{} + yyv4649[yyj4649] = ResourceQuota{} } else { - yyv4642 := &yyv4640[yyj4640] - yyv4642.CodecDecodeSelf(d) + yyv4651 := &yyv4649[yyj4649] + yyv4651.CodecDecodeSelf(d) } } } } else { - yyj4640 := 0 - for ; !r.CheckBreak(); yyj4640++ { + yyj4649 := 0 + for ; !r.CheckBreak(); yyj4649++ { - if yyj4640 >= len(yyv4640) { - yyv4640 = append(yyv4640, ResourceQuota{}) // var yyz4640 ResourceQuota - yyc4640 = true + if yyj4649 >= len(yyv4649) { + yyv4649 = append(yyv4649, ResourceQuota{}) // var yyz4649 ResourceQuota + yyc4649 = true } - yyh4640.ElemContainerState(yyj4640) - if yyj4640 < len(yyv4640) { + yyh4649.ElemContainerState(yyj4649) + if yyj4649 < len(yyv4649) { if r.TryDecodeAsNil() { - yyv4640[yyj4640] = ResourceQuota{} + yyv4649[yyj4649] = ResourceQuota{} } else { - yyv4643 := &yyv4640[yyj4640] - yyv4643.CodecDecodeSelf(d) + yyv4652 := &yyv4649[yyj4649] + yyv4652.CodecDecodeSelf(d) } } else { @@ -59841,17 +59919,17 @@ func (x codecSelfer1234) decSliceResourceQuota(v *[]ResourceQuota, d *codec1978. } } - if yyj4640 < len(yyv4640) { - yyv4640 = yyv4640[:yyj4640] - yyc4640 = true - } else if yyj4640 == 0 && yyv4640 == nil { - yyv4640 = []ResourceQuota{} - yyc4640 = true + if yyj4649 < len(yyv4649) { + yyv4649 = yyv4649[:yyj4649] + yyc4649 = true + } else if yyj4649 == 0 && yyv4649 == nil { + yyv4649 = []ResourceQuota{} + yyc4649 = true } } - yyh4640.End() - if yyc4640 { - *v = yyv4640 + yyh4649.End() + if yyc4649 { + *v = yyv4649 } } @@ -59860,23 +59938,23 @@ func (x codecSelfer1234) encMapstringSliceuint8(v map[string][]uint8, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeMapStart(len(v)) - for yyk4644, yyv4644 := range v { + for yyk4653, yyv4653 := range v { z.EncSendContainerState(codecSelfer_containerMapKey1234) - yym4645 := z.EncBinary() - _ = yym4645 + yym4654 := z.EncBinary() + _ = yym4654 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(yyk4644)) + r.EncodeString(codecSelferC_UTF81234, string(yyk4653)) } z.EncSendContainerState(codecSelfer_containerMapValue1234) - if yyv4644 == nil { + if yyv4653 == nil { r.EncodeNil() } else { - yym4646 := z.EncBinary() - _ = yym4646 + yym4655 := z.EncBinary() + _ = yym4655 if false { } else { - r.EncodeStringBytes(codecSelferC_RAW1234, []byte(yyv4644)) + r.EncodeStringBytes(codecSelferC_RAW1234, []byte(yyv4653)) } } } @@ -59888,80 +59966,80 @@ func (x codecSelfer1234) decMapstringSliceuint8(v *map[string][]uint8, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4647 := *v - yyl4647 := r.ReadMapStart() - yybh4647 := z.DecBasicHandle() - if yyv4647 == nil { - yyrl4647, _ := z.DecInferLen(yyl4647, yybh4647.MaxInitLen, 40) - yyv4647 = make(map[string][]uint8, yyrl4647) - *v = yyv4647 + yyv4656 := *v + yyl4656 := r.ReadMapStart() + yybh4656 := z.DecBasicHandle() + if yyv4656 == nil { + yyrl4656, _ := z.DecInferLen(yyl4656, yybh4656.MaxInitLen, 40) + yyv4656 = make(map[string][]uint8, yyrl4656) + *v = yyv4656 } - var yymk4647 string - var yymv4647 []uint8 - var yymg4647 bool - if yybh4647.MapValueReset { - yymg4647 = true + var yymk4656 string + var yymv4656 []uint8 + var yymg4656 bool + if yybh4656.MapValueReset { + yymg4656 = true } - if yyl4647 > 0 { - for yyj4647 := 0; yyj4647 < yyl4647; yyj4647++ { + if yyl4656 > 0 { + for yyj4656 := 0; yyj4656 < yyl4656; yyj4656++ { z.DecSendContainerState(codecSelfer_containerMapKey1234) if r.TryDecodeAsNil() { - yymk4647 = "" + yymk4656 = "" } else { - yymk4647 = string(r.DecodeString()) + yymk4656 = string(r.DecodeString()) } - if yymg4647 { - yymv4647 = yyv4647[yymk4647] + if yymg4656 { + yymv4656 = yyv4656[yymk4656] } else { - yymv4647 = nil + yymv4656 = nil } z.DecSendContainerState(codecSelfer_containerMapValue1234) if r.TryDecodeAsNil() { - yymv4647 = nil + yymv4656 = nil } else { - yyv4649 := &yymv4647 - yym4650 := z.DecBinary() - _ = yym4650 + yyv4658 := &yymv4656 + yym4659 := z.DecBinary() + _ = yym4659 if false { } else { - *yyv4649 = r.DecodeBytes(*(*[]byte)(yyv4649), false, false) + *yyv4658 = r.DecodeBytes(*(*[]byte)(yyv4658), false, false) } } - if yyv4647 != nil { - yyv4647[yymk4647] = yymv4647 + if yyv4656 != nil { + yyv4656[yymk4656] = yymv4656 } } - } else if yyl4647 < 0 { - for yyj4647 := 0; !r.CheckBreak(); yyj4647++ { + } else if yyl4656 < 0 { + for yyj4656 := 0; !r.CheckBreak(); yyj4656++ { z.DecSendContainerState(codecSelfer_containerMapKey1234) if r.TryDecodeAsNil() { - yymk4647 = "" + yymk4656 = "" } else { - yymk4647 = string(r.DecodeString()) + yymk4656 = string(r.DecodeString()) } - if yymg4647 { - yymv4647 = yyv4647[yymk4647] + if yymg4656 { + yymv4656 = yyv4656[yymk4656] } else { - yymv4647 = nil + yymv4656 = nil } z.DecSendContainerState(codecSelfer_containerMapValue1234) if r.TryDecodeAsNil() { - yymv4647 = nil + yymv4656 = nil } else { - yyv4652 := &yymv4647 - yym4653 := z.DecBinary() - _ = yym4653 + yyv4661 := &yymv4656 + yym4662 := z.DecBinary() + _ = yym4662 if false { } else { - *yyv4652 = r.DecodeBytes(*(*[]byte)(yyv4652), false, false) + *yyv4661 = r.DecodeBytes(*(*[]byte)(yyv4661), false, false) } } - if yyv4647 != nil { - yyv4647[yymk4647] = yymv4647 + if yyv4656 != nil { + yyv4656[yymk4656] = yymv4656 } } } // else len==0: TODO: Should we clear map entries? @@ -59973,10 +60051,10 @@ func (x codecSelfer1234) encSliceSecret(v []Secret, e *codec1978.Encoder) { z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4654 := range v { + for _, yyv4663 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4655 := &yyv4654 - yy4655.CodecEncodeSelf(e) + yy4664 := &yyv4663 + yy4664.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -59986,83 +60064,83 @@ func (x codecSelfer1234) decSliceSecret(v *[]Secret, d *codec1978.Decoder) { z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4656 := *v - yyh4656, yyl4656 := z.DecSliceHelperStart() - var yyc4656 bool - if yyl4656 == 0 { - if yyv4656 == nil { - yyv4656 = []Secret{} - yyc4656 = true - } else if len(yyv4656) != 0 { - yyv4656 = yyv4656[:0] - yyc4656 = true + yyv4665 := *v + yyh4665, yyl4665 := z.DecSliceHelperStart() + var yyc4665 bool + if yyl4665 == 0 { + if yyv4665 == nil { + yyv4665 = []Secret{} + yyc4665 = true + } else if len(yyv4665) != 0 { + yyv4665 = yyv4665[:0] + yyc4665 = true } - } else if yyl4656 > 0 { - var yyrr4656, yyrl4656 int - var yyrt4656 bool - if yyl4656 > cap(yyv4656) { + } else if yyl4665 > 0 { + var yyrr4665, yyrl4665 int + var yyrt4665 bool + if yyl4665 > cap(yyv4665) { - yyrg4656 := len(yyv4656) > 0 - yyv24656 := yyv4656 - yyrl4656, yyrt4656 = z.DecInferLen(yyl4656, z.DecBasicHandle().MaxInitLen, 272) - if yyrt4656 { - if yyrl4656 <= cap(yyv4656) { - yyv4656 = yyv4656[:yyrl4656] + yyrg4665 := len(yyv4665) > 0 + yyv24665 := yyv4665 + yyrl4665, yyrt4665 = z.DecInferLen(yyl4665, z.DecBasicHandle().MaxInitLen, 272) + if yyrt4665 { + if yyrl4665 <= cap(yyv4665) { + yyv4665 = yyv4665[:yyrl4665] } else { - yyv4656 = make([]Secret, yyrl4656) + yyv4665 = make([]Secret, yyrl4665) } } else { - yyv4656 = make([]Secret, yyrl4656) + yyv4665 = make([]Secret, yyrl4665) } - yyc4656 = true - yyrr4656 = len(yyv4656) - if yyrg4656 { - copy(yyv4656, yyv24656) + yyc4665 = true + yyrr4665 = len(yyv4665) + if yyrg4665 { + copy(yyv4665, yyv24665) } - } else if yyl4656 != len(yyv4656) { - yyv4656 = yyv4656[:yyl4656] - yyc4656 = true + } else if yyl4665 != len(yyv4665) { + yyv4665 = yyv4665[:yyl4665] + yyc4665 = true } - yyj4656 := 0 - for ; yyj4656 < yyrr4656; yyj4656++ { - yyh4656.ElemContainerState(yyj4656) + yyj4665 := 0 + for ; yyj4665 < yyrr4665; yyj4665++ { + yyh4665.ElemContainerState(yyj4665) if r.TryDecodeAsNil() { - yyv4656[yyj4656] = Secret{} + yyv4665[yyj4665] = Secret{} } else { - yyv4657 := &yyv4656[yyj4656] - yyv4657.CodecDecodeSelf(d) + yyv4666 := &yyv4665[yyj4665] + yyv4666.CodecDecodeSelf(d) } } - if yyrt4656 { - for ; yyj4656 < yyl4656; yyj4656++ { - yyv4656 = append(yyv4656, Secret{}) - yyh4656.ElemContainerState(yyj4656) + if yyrt4665 { + for ; yyj4665 < yyl4665; yyj4665++ { + yyv4665 = append(yyv4665, Secret{}) + yyh4665.ElemContainerState(yyj4665) if r.TryDecodeAsNil() { - yyv4656[yyj4656] = Secret{} + yyv4665[yyj4665] = Secret{} } else { - yyv4658 := &yyv4656[yyj4656] - yyv4658.CodecDecodeSelf(d) + yyv4667 := &yyv4665[yyj4665] + yyv4667.CodecDecodeSelf(d) } } } } else { - yyj4656 := 0 - for ; !r.CheckBreak(); yyj4656++ { + yyj4665 := 0 + for ; !r.CheckBreak(); yyj4665++ { - if yyj4656 >= len(yyv4656) { - yyv4656 = append(yyv4656, Secret{}) // var yyz4656 Secret - yyc4656 = true + if yyj4665 >= len(yyv4665) { + yyv4665 = append(yyv4665, Secret{}) // var yyz4665 Secret + yyc4665 = true } - yyh4656.ElemContainerState(yyj4656) - if yyj4656 < len(yyv4656) { + yyh4665.ElemContainerState(yyj4665) + if yyj4665 < len(yyv4665) { if r.TryDecodeAsNil() { - yyv4656[yyj4656] = Secret{} + yyv4665[yyj4665] = Secret{} } else { - yyv4659 := &yyv4656[yyj4656] - yyv4659.CodecDecodeSelf(d) + yyv4668 := &yyv4665[yyj4665] + yyv4668.CodecDecodeSelf(d) } } else { @@ -60070,17 +60148,17 @@ func (x codecSelfer1234) decSliceSecret(v *[]Secret, d *codec1978.Decoder) { } } - if yyj4656 < len(yyv4656) { - yyv4656 = yyv4656[:yyj4656] - yyc4656 = true - } else if yyj4656 == 0 && yyv4656 == nil { - yyv4656 = []Secret{} - yyc4656 = true + if yyj4665 < len(yyv4665) { + yyv4665 = yyv4665[:yyj4665] + yyc4665 = true + } else if yyj4665 == 0 && yyv4665 == nil { + yyv4665 = []Secret{} + yyc4665 = true } } - yyh4656.End() - if yyc4656 { - *v = yyv4656 + yyh4665.End() + if yyc4665 { + *v = yyv4665 } } @@ -60089,10 +60167,10 @@ func (x codecSelfer1234) encSliceConfigMap(v []ConfigMap, e *codec1978.Encoder) z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4660 := range v { + for _, yyv4669 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4661 := &yyv4660 - yy4661.CodecEncodeSelf(e) + yy4670 := &yyv4669 + yy4670.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -60102,83 +60180,83 @@ func (x codecSelfer1234) decSliceConfigMap(v *[]ConfigMap, d *codec1978.Decoder) z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4662 := *v - yyh4662, yyl4662 := z.DecSliceHelperStart() - var yyc4662 bool - if yyl4662 == 0 { - if yyv4662 == nil { - yyv4662 = []ConfigMap{} - yyc4662 = true - } else if len(yyv4662) != 0 { - yyv4662 = yyv4662[:0] - yyc4662 = true + yyv4671 := *v + yyh4671, yyl4671 := z.DecSliceHelperStart() + var yyc4671 bool + if yyl4671 == 0 { + if yyv4671 == nil { + yyv4671 = []ConfigMap{} + yyc4671 = true + } else if len(yyv4671) != 0 { + yyv4671 = yyv4671[:0] + yyc4671 = true } - } else if yyl4662 > 0 { - var yyrr4662, yyrl4662 int - var yyrt4662 bool - if yyl4662 > cap(yyv4662) { + } else if yyl4671 > 0 { + var yyrr4671, yyrl4671 int + var yyrt4671 bool + if yyl4671 > cap(yyv4671) { - yyrg4662 := len(yyv4662) > 0 - yyv24662 := yyv4662 - yyrl4662, yyrt4662 = z.DecInferLen(yyl4662, z.DecBasicHandle().MaxInitLen, 248) - if yyrt4662 { - if yyrl4662 <= cap(yyv4662) { - yyv4662 = yyv4662[:yyrl4662] + yyrg4671 := len(yyv4671) > 0 + yyv24671 := yyv4671 + yyrl4671, yyrt4671 = z.DecInferLen(yyl4671, z.DecBasicHandle().MaxInitLen, 248) + if yyrt4671 { + if yyrl4671 <= cap(yyv4671) { + yyv4671 = yyv4671[:yyrl4671] } else { - yyv4662 = make([]ConfigMap, yyrl4662) + yyv4671 = make([]ConfigMap, yyrl4671) } } else { - yyv4662 = make([]ConfigMap, yyrl4662) + yyv4671 = make([]ConfigMap, yyrl4671) } - yyc4662 = true - yyrr4662 = len(yyv4662) - if yyrg4662 { - copy(yyv4662, yyv24662) + yyc4671 = true + yyrr4671 = len(yyv4671) + if yyrg4671 { + copy(yyv4671, yyv24671) } - } else if yyl4662 != len(yyv4662) { - yyv4662 = yyv4662[:yyl4662] - yyc4662 = true + } else if yyl4671 != len(yyv4671) { + yyv4671 = yyv4671[:yyl4671] + yyc4671 = true } - yyj4662 := 0 - for ; yyj4662 < yyrr4662; yyj4662++ { - yyh4662.ElemContainerState(yyj4662) + yyj4671 := 0 + for ; yyj4671 < yyrr4671; yyj4671++ { + yyh4671.ElemContainerState(yyj4671) if r.TryDecodeAsNil() { - yyv4662[yyj4662] = ConfigMap{} + yyv4671[yyj4671] = ConfigMap{} } else { - yyv4663 := &yyv4662[yyj4662] - yyv4663.CodecDecodeSelf(d) + yyv4672 := &yyv4671[yyj4671] + yyv4672.CodecDecodeSelf(d) } } - if yyrt4662 { - for ; yyj4662 < yyl4662; yyj4662++ { - yyv4662 = append(yyv4662, ConfigMap{}) - yyh4662.ElemContainerState(yyj4662) + if yyrt4671 { + for ; yyj4671 < yyl4671; yyj4671++ { + yyv4671 = append(yyv4671, ConfigMap{}) + yyh4671.ElemContainerState(yyj4671) if r.TryDecodeAsNil() { - yyv4662[yyj4662] = ConfigMap{} + yyv4671[yyj4671] = ConfigMap{} } else { - yyv4664 := &yyv4662[yyj4662] - yyv4664.CodecDecodeSelf(d) + yyv4673 := &yyv4671[yyj4671] + yyv4673.CodecDecodeSelf(d) } } } } else { - yyj4662 := 0 - for ; !r.CheckBreak(); yyj4662++ { + yyj4671 := 0 + for ; !r.CheckBreak(); yyj4671++ { - if yyj4662 >= len(yyv4662) { - yyv4662 = append(yyv4662, ConfigMap{}) // var yyz4662 ConfigMap - yyc4662 = true + if yyj4671 >= len(yyv4671) { + yyv4671 = append(yyv4671, ConfigMap{}) // var yyz4671 ConfigMap + yyc4671 = true } - yyh4662.ElemContainerState(yyj4662) - if yyj4662 < len(yyv4662) { + yyh4671.ElemContainerState(yyj4671) + if yyj4671 < len(yyv4671) { if r.TryDecodeAsNil() { - yyv4662[yyj4662] = ConfigMap{} + yyv4671[yyj4671] = ConfigMap{} } else { - yyv4665 := &yyv4662[yyj4662] - yyv4665.CodecDecodeSelf(d) + yyv4674 := &yyv4671[yyj4671] + yyv4674.CodecDecodeSelf(d) } } else { @@ -60186,17 +60264,17 @@ func (x codecSelfer1234) decSliceConfigMap(v *[]ConfigMap, d *codec1978.Decoder) } } - if yyj4662 < len(yyv4662) { - yyv4662 = yyv4662[:yyj4662] - yyc4662 = true - } else if yyj4662 == 0 && yyv4662 == nil { - yyv4662 = []ConfigMap{} - yyc4662 = true + if yyj4671 < len(yyv4671) { + yyv4671 = yyv4671[:yyj4671] + yyc4671 = true + } else if yyj4671 == 0 && yyv4671 == nil { + yyv4671 = []ConfigMap{} + yyc4671 = true } } - yyh4662.End() - if yyc4662 { - *v = yyv4662 + yyh4671.End() + if yyc4671 { + *v = yyv4671 } } @@ -60205,10 +60283,10 @@ func (x codecSelfer1234) encSliceComponentCondition(v []ComponentCondition, e *c z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4666 := range v { + for _, yyv4675 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4667 := &yyv4666 - yy4667.CodecEncodeSelf(e) + yy4676 := &yyv4675 + yy4676.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -60218,83 +60296,83 @@ func (x codecSelfer1234) decSliceComponentCondition(v *[]ComponentCondition, d * z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4668 := *v - yyh4668, yyl4668 := z.DecSliceHelperStart() - var yyc4668 bool - if yyl4668 == 0 { - if yyv4668 == nil { - yyv4668 = []ComponentCondition{} - yyc4668 = true - } else if len(yyv4668) != 0 { - yyv4668 = yyv4668[:0] - yyc4668 = true + yyv4677 := *v + yyh4677, yyl4677 := z.DecSliceHelperStart() + var yyc4677 bool + if yyl4677 == 0 { + if yyv4677 == nil { + yyv4677 = []ComponentCondition{} + yyc4677 = true + } else if len(yyv4677) != 0 { + yyv4677 = yyv4677[:0] + yyc4677 = true } - } else if yyl4668 > 0 { - var yyrr4668, yyrl4668 int - var yyrt4668 bool - if yyl4668 > cap(yyv4668) { + } else if yyl4677 > 0 { + var yyrr4677, yyrl4677 int + var yyrt4677 bool + if yyl4677 > cap(yyv4677) { - yyrg4668 := len(yyv4668) > 0 - yyv24668 := yyv4668 - yyrl4668, yyrt4668 = z.DecInferLen(yyl4668, z.DecBasicHandle().MaxInitLen, 64) - if yyrt4668 { - if yyrl4668 <= cap(yyv4668) { - yyv4668 = yyv4668[:yyrl4668] + yyrg4677 := len(yyv4677) > 0 + yyv24677 := yyv4677 + yyrl4677, yyrt4677 = z.DecInferLen(yyl4677, z.DecBasicHandle().MaxInitLen, 64) + if yyrt4677 { + if yyrl4677 <= cap(yyv4677) { + yyv4677 = yyv4677[:yyrl4677] } else { - yyv4668 = make([]ComponentCondition, yyrl4668) + yyv4677 = make([]ComponentCondition, yyrl4677) } } else { - yyv4668 = make([]ComponentCondition, yyrl4668) + yyv4677 = make([]ComponentCondition, yyrl4677) } - yyc4668 = true - yyrr4668 = len(yyv4668) - if yyrg4668 { - copy(yyv4668, yyv24668) + yyc4677 = true + yyrr4677 = len(yyv4677) + if yyrg4677 { + copy(yyv4677, yyv24677) } - } else if yyl4668 != len(yyv4668) { - yyv4668 = yyv4668[:yyl4668] - yyc4668 = true + } else if yyl4677 != len(yyv4677) { + yyv4677 = yyv4677[:yyl4677] + yyc4677 = true } - yyj4668 := 0 - for ; yyj4668 < yyrr4668; yyj4668++ { - yyh4668.ElemContainerState(yyj4668) + yyj4677 := 0 + for ; yyj4677 < yyrr4677; yyj4677++ { + yyh4677.ElemContainerState(yyj4677) if r.TryDecodeAsNil() { - yyv4668[yyj4668] = ComponentCondition{} + yyv4677[yyj4677] = ComponentCondition{} } else { - yyv4669 := &yyv4668[yyj4668] - yyv4669.CodecDecodeSelf(d) + yyv4678 := &yyv4677[yyj4677] + yyv4678.CodecDecodeSelf(d) } } - if yyrt4668 { - for ; yyj4668 < yyl4668; yyj4668++ { - yyv4668 = append(yyv4668, ComponentCondition{}) - yyh4668.ElemContainerState(yyj4668) + if yyrt4677 { + for ; yyj4677 < yyl4677; yyj4677++ { + yyv4677 = append(yyv4677, ComponentCondition{}) + yyh4677.ElemContainerState(yyj4677) if r.TryDecodeAsNil() { - yyv4668[yyj4668] = ComponentCondition{} + yyv4677[yyj4677] = ComponentCondition{} } else { - yyv4670 := &yyv4668[yyj4668] - yyv4670.CodecDecodeSelf(d) + yyv4679 := &yyv4677[yyj4677] + yyv4679.CodecDecodeSelf(d) } } } } else { - yyj4668 := 0 - for ; !r.CheckBreak(); yyj4668++ { + yyj4677 := 0 + for ; !r.CheckBreak(); yyj4677++ { - if yyj4668 >= len(yyv4668) { - yyv4668 = append(yyv4668, ComponentCondition{}) // var yyz4668 ComponentCondition - yyc4668 = true + if yyj4677 >= len(yyv4677) { + yyv4677 = append(yyv4677, ComponentCondition{}) // var yyz4677 ComponentCondition + yyc4677 = true } - yyh4668.ElemContainerState(yyj4668) - if yyj4668 < len(yyv4668) { + yyh4677.ElemContainerState(yyj4677) + if yyj4677 < len(yyv4677) { if r.TryDecodeAsNil() { - yyv4668[yyj4668] = ComponentCondition{} + yyv4677[yyj4677] = ComponentCondition{} } else { - yyv4671 := &yyv4668[yyj4668] - yyv4671.CodecDecodeSelf(d) + yyv4680 := &yyv4677[yyj4677] + yyv4680.CodecDecodeSelf(d) } } else { @@ -60302,17 +60380,17 @@ func (x codecSelfer1234) decSliceComponentCondition(v *[]ComponentCondition, d * } } - if yyj4668 < len(yyv4668) { - yyv4668 = yyv4668[:yyj4668] - yyc4668 = true - } else if yyj4668 == 0 && yyv4668 == nil { - yyv4668 = []ComponentCondition{} - yyc4668 = true + if yyj4677 < len(yyv4677) { + yyv4677 = yyv4677[:yyj4677] + yyc4677 = true + } else if yyj4677 == 0 && yyv4677 == nil { + yyv4677 = []ComponentCondition{} + yyc4677 = true } } - yyh4668.End() - if yyc4668 { - *v = yyv4668 + yyh4677.End() + if yyc4677 { + *v = yyv4677 } } @@ -60321,10 +60399,10 @@ func (x codecSelfer1234) encSliceComponentStatus(v []ComponentStatus, e *codec19 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4672 := range v { + for _, yyv4681 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4673 := &yyv4672 - yy4673.CodecEncodeSelf(e) + yy4682 := &yyv4681 + yy4682.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -60334,83 +60412,83 @@ func (x codecSelfer1234) decSliceComponentStatus(v *[]ComponentStatus, d *codec1 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4674 := *v - yyh4674, yyl4674 := z.DecSliceHelperStart() - var yyc4674 bool - if yyl4674 == 0 { - if yyv4674 == nil { - yyv4674 = []ComponentStatus{} - yyc4674 = true - } else if len(yyv4674) != 0 { - yyv4674 = yyv4674[:0] - yyc4674 = true + yyv4683 := *v + yyh4683, yyl4683 := z.DecSliceHelperStart() + var yyc4683 bool + if yyl4683 == 0 { + if yyv4683 == nil { + yyv4683 = []ComponentStatus{} + yyc4683 = true + } else if len(yyv4683) != 0 { + yyv4683 = yyv4683[:0] + yyc4683 = true } - } else if yyl4674 > 0 { - var yyrr4674, yyrl4674 int - var yyrt4674 bool - if yyl4674 > cap(yyv4674) { + } else if yyl4683 > 0 { + var yyrr4683, yyrl4683 int + var yyrt4683 bool + if yyl4683 > cap(yyv4683) { - yyrg4674 := len(yyv4674) > 0 - yyv24674 := yyv4674 - yyrl4674, yyrt4674 = z.DecInferLen(yyl4674, z.DecBasicHandle().MaxInitLen, 264) - if yyrt4674 { - if yyrl4674 <= cap(yyv4674) { - yyv4674 = yyv4674[:yyrl4674] + yyrg4683 := len(yyv4683) > 0 + yyv24683 := yyv4683 + yyrl4683, yyrt4683 = z.DecInferLen(yyl4683, z.DecBasicHandle().MaxInitLen, 264) + if yyrt4683 { + if yyrl4683 <= cap(yyv4683) { + yyv4683 = yyv4683[:yyrl4683] } else { - yyv4674 = make([]ComponentStatus, yyrl4674) + yyv4683 = make([]ComponentStatus, yyrl4683) } } else { - yyv4674 = make([]ComponentStatus, yyrl4674) + yyv4683 = make([]ComponentStatus, yyrl4683) } - yyc4674 = true - yyrr4674 = len(yyv4674) - if yyrg4674 { - copy(yyv4674, yyv24674) + yyc4683 = true + yyrr4683 = len(yyv4683) + if yyrg4683 { + copy(yyv4683, yyv24683) } - } else if yyl4674 != len(yyv4674) { - yyv4674 = yyv4674[:yyl4674] - yyc4674 = true + } else if yyl4683 != len(yyv4683) { + yyv4683 = yyv4683[:yyl4683] + yyc4683 = true } - yyj4674 := 0 - for ; yyj4674 < yyrr4674; yyj4674++ { - yyh4674.ElemContainerState(yyj4674) + yyj4683 := 0 + for ; yyj4683 < yyrr4683; yyj4683++ { + yyh4683.ElemContainerState(yyj4683) if r.TryDecodeAsNil() { - yyv4674[yyj4674] = ComponentStatus{} + yyv4683[yyj4683] = ComponentStatus{} } else { - yyv4675 := &yyv4674[yyj4674] - yyv4675.CodecDecodeSelf(d) + yyv4684 := &yyv4683[yyj4683] + yyv4684.CodecDecodeSelf(d) } } - if yyrt4674 { - for ; yyj4674 < yyl4674; yyj4674++ { - yyv4674 = append(yyv4674, ComponentStatus{}) - yyh4674.ElemContainerState(yyj4674) + if yyrt4683 { + for ; yyj4683 < yyl4683; yyj4683++ { + yyv4683 = append(yyv4683, ComponentStatus{}) + yyh4683.ElemContainerState(yyj4683) if r.TryDecodeAsNil() { - yyv4674[yyj4674] = ComponentStatus{} + yyv4683[yyj4683] = ComponentStatus{} } else { - yyv4676 := &yyv4674[yyj4674] - yyv4676.CodecDecodeSelf(d) + yyv4685 := &yyv4683[yyj4683] + yyv4685.CodecDecodeSelf(d) } } } } else { - yyj4674 := 0 - for ; !r.CheckBreak(); yyj4674++ { + yyj4683 := 0 + for ; !r.CheckBreak(); yyj4683++ { - if yyj4674 >= len(yyv4674) { - yyv4674 = append(yyv4674, ComponentStatus{}) // var yyz4674 ComponentStatus - yyc4674 = true + if yyj4683 >= len(yyv4683) { + yyv4683 = append(yyv4683, ComponentStatus{}) // var yyz4683 ComponentStatus + yyc4683 = true } - yyh4674.ElemContainerState(yyj4674) - if yyj4674 < len(yyv4674) { + yyh4683.ElemContainerState(yyj4683) + if yyj4683 < len(yyv4683) { if r.TryDecodeAsNil() { - yyv4674[yyj4674] = ComponentStatus{} + yyv4683[yyj4683] = ComponentStatus{} } else { - yyv4677 := &yyv4674[yyj4674] - yyv4677.CodecDecodeSelf(d) + yyv4686 := &yyv4683[yyj4683] + yyv4686.CodecDecodeSelf(d) } } else { @@ -60418,17 +60496,17 @@ func (x codecSelfer1234) decSliceComponentStatus(v *[]ComponentStatus, d *codec1 } } - if yyj4674 < len(yyv4674) { - yyv4674 = yyv4674[:yyj4674] - yyc4674 = true - } else if yyj4674 == 0 && yyv4674 == nil { - yyv4674 = []ComponentStatus{} - yyc4674 = true + if yyj4683 < len(yyv4683) { + yyv4683 = yyv4683[:yyj4683] + yyc4683 = true + } else if yyj4683 == 0 && yyv4683 == nil { + yyv4683 = []ComponentStatus{} + yyc4683 = true } } - yyh4674.End() - if yyc4674 { - *v = yyv4674 + yyh4683.End() + if yyc4683 { + *v = yyv4683 } } @@ -60437,10 +60515,10 @@ func (x codecSelfer1234) encSliceDownwardAPIVolumeFile(v []DownwardAPIVolumeFile z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeArrayStart(len(v)) - for _, yyv4678 := range v { + for _, yyv4687 := range v { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy4679 := &yyv4678 - yy4679.CodecEncodeSelf(e) + yy4688 := &yyv4687 + yy4688.CodecEncodeSelf(e) } z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -60450,83 +60528,83 @@ func (x codecSelfer1234) decSliceDownwardAPIVolumeFile(v *[]DownwardAPIVolumeFil z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv4680 := *v - yyh4680, yyl4680 := z.DecSliceHelperStart() - var yyc4680 bool - if yyl4680 == 0 { - if yyv4680 == nil { - yyv4680 = []DownwardAPIVolumeFile{} - yyc4680 = true - } else if len(yyv4680) != 0 { - yyv4680 = yyv4680[:0] - yyc4680 = true + yyv4689 := *v + yyh4689, yyl4689 := z.DecSliceHelperStart() + var yyc4689 bool + if yyl4689 == 0 { + if yyv4689 == nil { + yyv4689 = []DownwardAPIVolumeFile{} + yyc4689 = true + } else if len(yyv4689) != 0 { + yyv4689 = yyv4689[:0] + yyc4689 = true } - } else if yyl4680 > 0 { - var yyrr4680, yyrl4680 int - var yyrt4680 bool - if yyl4680 > cap(yyv4680) { + } else if yyl4689 > 0 { + var yyrr4689, yyrl4689 int + var yyrt4689 bool + if yyl4689 > cap(yyv4689) { - yyrg4680 := len(yyv4680) > 0 - yyv24680 := yyv4680 - yyrl4680, yyrt4680 = z.DecInferLen(yyl4680, z.DecBasicHandle().MaxInitLen, 32) - if yyrt4680 { - if yyrl4680 <= cap(yyv4680) { - yyv4680 = yyv4680[:yyrl4680] + yyrg4689 := len(yyv4689) > 0 + yyv24689 := yyv4689 + yyrl4689, yyrt4689 = z.DecInferLen(yyl4689, z.DecBasicHandle().MaxInitLen, 32) + if yyrt4689 { + if yyrl4689 <= cap(yyv4689) { + yyv4689 = yyv4689[:yyrl4689] } else { - yyv4680 = make([]DownwardAPIVolumeFile, yyrl4680) + yyv4689 = make([]DownwardAPIVolumeFile, yyrl4689) } } else { - yyv4680 = make([]DownwardAPIVolumeFile, yyrl4680) + yyv4689 = make([]DownwardAPIVolumeFile, yyrl4689) } - yyc4680 = true - yyrr4680 = len(yyv4680) - if yyrg4680 { - copy(yyv4680, yyv24680) + yyc4689 = true + yyrr4689 = len(yyv4689) + if yyrg4689 { + copy(yyv4689, yyv24689) } - } else if yyl4680 != len(yyv4680) { - yyv4680 = yyv4680[:yyl4680] - yyc4680 = true + } else if yyl4689 != len(yyv4689) { + yyv4689 = yyv4689[:yyl4689] + yyc4689 = true } - yyj4680 := 0 - for ; yyj4680 < yyrr4680; yyj4680++ { - yyh4680.ElemContainerState(yyj4680) + yyj4689 := 0 + for ; yyj4689 < yyrr4689; yyj4689++ { + yyh4689.ElemContainerState(yyj4689) if r.TryDecodeAsNil() { - yyv4680[yyj4680] = DownwardAPIVolumeFile{} + yyv4689[yyj4689] = DownwardAPIVolumeFile{} } else { - yyv4681 := &yyv4680[yyj4680] - yyv4681.CodecDecodeSelf(d) + yyv4690 := &yyv4689[yyj4689] + yyv4690.CodecDecodeSelf(d) } } - if yyrt4680 { - for ; yyj4680 < yyl4680; yyj4680++ { - yyv4680 = append(yyv4680, DownwardAPIVolumeFile{}) - yyh4680.ElemContainerState(yyj4680) + if yyrt4689 { + for ; yyj4689 < yyl4689; yyj4689++ { + yyv4689 = append(yyv4689, DownwardAPIVolumeFile{}) + yyh4689.ElemContainerState(yyj4689) if r.TryDecodeAsNil() { - yyv4680[yyj4680] = DownwardAPIVolumeFile{} + yyv4689[yyj4689] = DownwardAPIVolumeFile{} } else { - yyv4682 := &yyv4680[yyj4680] - yyv4682.CodecDecodeSelf(d) + yyv4691 := &yyv4689[yyj4689] + yyv4691.CodecDecodeSelf(d) } } } } else { - yyj4680 := 0 - for ; !r.CheckBreak(); yyj4680++ { + yyj4689 := 0 + for ; !r.CheckBreak(); yyj4689++ { - if yyj4680 >= len(yyv4680) { - yyv4680 = append(yyv4680, DownwardAPIVolumeFile{}) // var yyz4680 DownwardAPIVolumeFile - yyc4680 = true + if yyj4689 >= len(yyv4689) { + yyv4689 = append(yyv4689, DownwardAPIVolumeFile{}) // var yyz4689 DownwardAPIVolumeFile + yyc4689 = true } - yyh4680.ElemContainerState(yyj4680) - if yyj4680 < len(yyv4680) { + yyh4689.ElemContainerState(yyj4689) + if yyj4689 < len(yyv4689) { if r.TryDecodeAsNil() { - yyv4680[yyj4680] = DownwardAPIVolumeFile{} + yyv4689[yyj4689] = DownwardAPIVolumeFile{} } else { - yyv4683 := &yyv4680[yyj4680] - yyv4683.CodecDecodeSelf(d) + yyv4692 := &yyv4689[yyj4689] + yyv4692.CodecDecodeSelf(d) } } else { @@ -60534,16 +60612,16 @@ func (x codecSelfer1234) decSliceDownwardAPIVolumeFile(v *[]DownwardAPIVolumeFil } } - if yyj4680 < len(yyv4680) { - yyv4680 = yyv4680[:yyj4680] - yyc4680 = true - } else if yyj4680 == 0 && yyv4680 == nil { - yyv4680 = []DownwardAPIVolumeFile{} - yyc4680 = true + if yyj4689 < len(yyv4689) { + yyv4689 = yyv4689[:yyj4689] + yyc4689 = true + } else if yyj4689 == 0 && yyv4689 == nil { + yyv4689 = []DownwardAPIVolumeFile{} + yyc4689 = true } } - yyh4680.End() - if yyc4680 { - *v = yyv4680 + yyh4689.End() + if yyc4689 { + *v = yyv4689 } } diff --git a/staging/src/k8s.io/client-go/1.4/pkg/api/v1/types.go b/staging/src/k8s.io/client-go/1.4/pkg/api/v1/types.go index a2deb383a086c..2ac637976c294 100644 --- a/staging/src/k8s.io/client-go/1.4/pkg/api/v1/types.go +++ b/staging/src/k8s.io/client-go/1.4/pkg/api/v1/types.go @@ -2279,6 +2279,8 @@ type EndpointAddress struct { IP string `json:"ip" protobuf:"bytes,1,opt,name=ip"` // The Hostname of this endpoint Hostname string `json:"hostname,omitempty" protobuf:"bytes,3,opt,name=hostname"` + // Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node. + NodeName *string `json:"nodeName,omitempty" protobuf:"bytes,4,opt,name=nodeName"` // Reference to object providing the endpoint. TargetRef *ObjectReference `json:"targetRef,omitempty" protobuf:"bytes,2,opt,name=targetRef"` } @@ -2376,6 +2378,7 @@ type NodeStatus struct { Allocatable ResourceList `json:"allocatable,omitempty" protobuf:"bytes,2,rep,name=allocatable,casttype=ResourceList,castkey=ResourceName"` // NodePhase is the recently observed lifecycle phase of the node. // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-phase + // The field is never populated, and now is deprecated. Phase NodePhase `json:"phase,omitempty" protobuf:"bytes,3,opt,name=phase,casttype=NodePhase"` // Conditions is an array of current observed node conditions. // More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-condition diff --git a/staging/src/k8s.io/client-go/1.4/pkg/api/v1/types_swagger_doc_generated.go b/staging/src/k8s.io/client-go/1.4/pkg/api/v1/types_swagger_doc_generated.go index 21e6b82c743fd..d41c5865d78df 100644 --- a/staging/src/k8s.io/client-go/1.4/pkg/api/v1/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/client-go/1.4/pkg/api/v1/types_swagger_doc_generated.go @@ -358,6 +358,7 @@ var map_EndpointAddress = map[string]string{ "": "EndpointAddress is a tuple that describes single IP address.", "ip": "The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready.", "hostname": "The Hostname of this endpoint", + "nodeName": "Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.", "targetRef": "Reference to object providing the endpoint.", } @@ -893,7 +894,7 @@ var map_NodeStatus = map[string]string{ "": "NodeStatus is information about the current status of a node.", "capacity": "Capacity represents the total resources of a node. More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#capacity for more details.", "allocatable": "Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity.", - "phase": "NodePhase is the recently observed lifecycle phase of the node. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-phase", + "phase": "NodePhase is the recently observed lifecycle phase of the node. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-phase The field is never populated, and now is deprecated.", "conditions": "Conditions is an array of current observed node conditions. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-condition", "addresses": "List of addresses reachable to the node. Queried from cloud provider, if available. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-addresses", "daemonEndpoints": "Endpoints of daemons running on the Node.", diff --git a/staging/src/k8s.io/client-go/1.4/pkg/api/v1/zz_generated.conversion.go b/staging/src/k8s.io/client-go/1.4/pkg/api/v1/zz_generated.conversion.go index 4303982f2fa5d..9a37280467f13 100644 --- a/staging/src/k8s.io/client-go/1.4/pkg/api/v1/zz_generated.conversion.go +++ b/staging/src/k8s.io/client-go/1.4/pkg/api/v1/zz_generated.conversion.go @@ -1535,6 +1535,7 @@ func Convert_api_EmptyDirVolumeSource_To_v1_EmptyDirVolumeSource(in *api.EmptyDi func autoConvert_v1_EndpointAddress_To_api_EndpointAddress(in *EndpointAddress, out *api.EndpointAddress, s conversion.Scope) error { out.IP = in.IP out.Hostname = in.Hostname + out.NodeName = in.NodeName if in.TargetRef != nil { in, out := &in.TargetRef, &out.TargetRef *out = new(api.ObjectReference) @@ -1554,6 +1555,7 @@ func Convert_v1_EndpointAddress_To_api_EndpointAddress(in *EndpointAddress, out func autoConvert_api_EndpointAddress_To_v1_EndpointAddress(in *api.EndpointAddress, out *EndpointAddress, s conversion.Scope) error { out.IP = in.IP out.Hostname = in.Hostname + out.NodeName = in.NodeName if in.TargetRef != nil { in, out := &in.TargetRef, &out.TargetRef *out = new(ObjectReference) diff --git a/staging/src/k8s.io/client-go/1.4/pkg/api/v1/zz_generated.deepcopy.go b/staging/src/k8s.io/client-go/1.4/pkg/api/v1/zz_generated.deepcopy.go index 5f5c1471884b8..04fb0fbb7dbbc 100644 --- a/staging/src/k8s.io/client-go/1.4/pkg/api/v1/zz_generated.deepcopy.go +++ b/staging/src/k8s.io/client-go/1.4/pkg/api/v1/zz_generated.deepcopy.go @@ -792,6 +792,13 @@ func DeepCopy_v1_EndpointAddress(in interface{}, out interface{}, c *conversion. out := out.(*EndpointAddress) out.IP = in.IP out.Hostname = in.Hostname + if in.NodeName != nil { + in, out := &in.NodeName, &out.NodeName + *out = new(string) + **out = **in + } else { + out.NodeName = nil + } if in.TargetRef != nil { in, out := &in.TargetRef, &out.TargetRef *out = new(ObjectReference) diff --git a/staging/src/k8s.io/client-go/1.4/pkg/api/zz_generated.deepcopy.go b/staging/src/k8s.io/client-go/1.4/pkg/api/zz_generated.deepcopy.go index a9c4823bd22a7..8591bb2eb0519 100644 --- a/staging/src/k8s.io/client-go/1.4/pkg/api/zz_generated.deepcopy.go +++ b/staging/src/k8s.io/client-go/1.4/pkg/api/zz_generated.deepcopy.go @@ -819,6 +819,13 @@ func DeepCopy_api_EndpointAddress(in interface{}, out interface{}, c *conversion out := out.(*EndpointAddress) out.IP = in.IP out.Hostname = in.Hostname + if in.NodeName != nil { + in, out := &in.NodeName, &out.NodeName + *out = new(string) + **out = **in + } else { + out.NodeName = nil + } if in.TargetRef != nil { in, out := &in.TargetRef, &out.TargetRef *out = new(ObjectReference) diff --git a/staging/src/k8s.io/client-go/1.4/pkg/apis/componentconfig/types.generated.go b/staging/src/k8s.io/client-go/1.4/pkg/apis/componentconfig/types.generated.go index 5e5eba651a73b..bc3391dc4252c 100644 --- a/staging/src/k8s.io/client-go/1.4/pkg/apis/componentconfig/types.generated.go +++ b/staging/src/k8s.io/client-go/1.4/pkg/apis/componentconfig/types.generated.go @@ -1218,7 +1218,7 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep130 := !z.EncBinary() yy2arr130 := z.EncBasicHandle().StructToArray - var yyq130 [97]bool + var yyq130 [98]bool _, _, _ = yysep130, yyq130, yy2arr130 const yyr130 bool = false yyq130[0] = x.Kind != "" @@ -1244,9 +1244,9 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { yyq130[92] = x.EvictionMinimumReclaim != "" var yynn130 int if yyr130 || yy2arr130 { - r.EncodeArrayStart(97) + r.EncodeArrayStart(98) } else { - yynn130 = 76 + yynn130 = 77 for _, b := range yyq130 { if b { yynn130++ @@ -3364,6 +3364,25 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } } } + if yyr130 || yy2arr130 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym445 := z.EncBinary() + _ = yym445 + if false { + } else { + r.EncodeBool(bool(x.ProtectKernelDefaults)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("protectKernelDefaults")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym446 := z.EncBinary() + _ = yym446 + if false { + } else { + r.EncodeBool(bool(x.ProtectKernelDefaults)) + } + } if yyr130 || yy2arr130 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { @@ -3377,25 +3396,25 @@ func (x *KubeletConfiguration) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym444 := z.DecBinary() - _ = yym444 + yym447 := z.DecBinary() + _ = yym447 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct445 := r.ContainerType() - if yyct445 == codecSelferValueTypeMap1234 { - yyl445 := r.ReadMapStart() - if yyl445 == 0 { + yyct448 := r.ContainerType() + if yyct448 == codecSelferValueTypeMap1234 { + yyl448 := r.ReadMapStart() + if yyl448 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl445, d) + x.codecDecodeSelfFromMap(yyl448, d) } - } else if yyct445 == codecSelferValueTypeArray1234 { - yyl445 := r.ReadArrayStart() - if yyl445 == 0 { + } else if yyct448 == codecSelferValueTypeArray1234 { + yyl448 := r.ReadArrayStart() + if yyl448 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl445, d) + x.codecDecodeSelfFromArray(yyl448, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -3407,12 +3426,12 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys446Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys446Slc - var yyhl446 bool = l >= 0 - for yyj446 := 0; ; yyj446++ { - if yyhl446 { - if yyj446 >= l { + var yys449Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys449Slc + var yyhl449 bool = l >= 0 + for yyj449 := 0; ; yyj449++ { + if yyhl449 { + if yyj449 >= l { break } } else { @@ -3421,10 +3440,10 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys446Slc = r.DecodeBytes(yys446Slc, true, true) - yys446 := string(yys446Slc) + yys449Slc = r.DecodeBytes(yys449Slc, true, true) + yys449 := string(yys449Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys446 { + switch yys449 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -3447,45 +3466,45 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.SyncFrequency = pkg1_unversioned.Duration{} } else { - yyv450 := &x.SyncFrequency - yym451 := z.DecBinary() - _ = yym451 + yyv453 := &x.SyncFrequency + yym454 := z.DecBinary() + _ = yym454 if false { - } else if z.HasExtensions() && z.DecExt(yyv450) { - } else if !yym451 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv450) + } else if z.HasExtensions() && z.DecExt(yyv453) { + } else if !yym454 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv453) } else { - z.DecFallback(yyv450, false) + z.DecFallback(yyv453, false) } } case "fileCheckFrequency": if r.TryDecodeAsNil() { x.FileCheckFrequency = pkg1_unversioned.Duration{} } else { - yyv452 := &x.FileCheckFrequency - yym453 := z.DecBinary() - _ = yym453 + yyv455 := &x.FileCheckFrequency + yym456 := z.DecBinary() + _ = yym456 if false { - } else if z.HasExtensions() && z.DecExt(yyv452) { - } else if !yym453 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv452) + } else if z.HasExtensions() && z.DecExt(yyv455) { + } else if !yym456 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv455) } else { - z.DecFallback(yyv452, false) + z.DecFallback(yyv455, false) } } case "httpCheckFrequency": if r.TryDecodeAsNil() { x.HTTPCheckFrequency = pkg1_unversioned.Duration{} } else { - yyv454 := &x.HTTPCheckFrequency - yym455 := z.DecBinary() - _ = yym455 + yyv457 := &x.HTTPCheckFrequency + yym458 := z.DecBinary() + _ = yym458 if false { - } else if z.HasExtensions() && z.DecExt(yyv454) { - } else if !yym455 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv454) + } else if z.HasExtensions() && z.DecExt(yyv457) { + } else if !yym458 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv457) } else { - z.DecFallback(yyv454, false) + z.DecFallback(yyv457, false) } } case "manifestURL": @@ -3582,36 +3601,36 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.HostNetworkSources = nil } else { - yyv471 := &x.HostNetworkSources - yym472 := z.DecBinary() - _ = yym472 + yyv474 := &x.HostNetworkSources + yym475 := z.DecBinary() + _ = yym475 if false { } else { - z.F.DecSliceStringX(yyv471, false, d) + z.F.DecSliceStringX(yyv474, false, d) } } case "hostPIDSources": if r.TryDecodeAsNil() { x.HostPIDSources = nil } else { - yyv473 := &x.HostPIDSources - yym474 := z.DecBinary() - _ = yym474 + yyv476 := &x.HostPIDSources + yym477 := z.DecBinary() + _ = yym477 if false { } else { - z.F.DecSliceStringX(yyv473, false, d) + z.F.DecSliceStringX(yyv476, false, d) } } case "hostIPCSources": if r.TryDecodeAsNil() { x.HostIPCSources = nil } else { - yyv475 := &x.HostIPCSources - yym476 := z.DecBinary() - _ = yym476 + yyv478 := &x.HostIPCSources + yym479 := z.DecBinary() + _ = yym479 if false { } else { - z.F.DecSliceStringX(yyv475, false, d) + z.F.DecSliceStringX(yyv478, false, d) } } case "registryPullQPS": @@ -3648,15 +3667,15 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.MinimumGCAge = pkg1_unversioned.Duration{} } else { - yyv482 := &x.MinimumGCAge - yym483 := z.DecBinary() - _ = yym483 + yyv485 := &x.MinimumGCAge + yym486 := z.DecBinary() + _ = yym486 if false { - } else if z.HasExtensions() && z.DecExt(yyv482) { - } else if !yym483 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv482) + } else if z.HasExtensions() && z.DecExt(yyv485) { + } else if !yym486 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv485) } else { - z.DecFallback(yyv482, false) + z.DecFallback(yyv485, false) } } case "maxPerPodContainerCount": @@ -3723,45 +3742,45 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.StreamingConnectionIdleTimeout = pkg1_unversioned.Duration{} } else { - yyv494 := &x.StreamingConnectionIdleTimeout - yym495 := z.DecBinary() - _ = yym495 + yyv497 := &x.StreamingConnectionIdleTimeout + yym498 := z.DecBinary() + _ = yym498 if false { - } else if z.HasExtensions() && z.DecExt(yyv494) { - } else if !yym495 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv494) + } else if z.HasExtensions() && z.DecExt(yyv497) { + } else if !yym498 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv497) } else { - z.DecFallback(yyv494, false) + z.DecFallback(yyv497, false) } } case "nodeStatusUpdateFrequency": if r.TryDecodeAsNil() { x.NodeStatusUpdateFrequency = pkg1_unversioned.Duration{} } else { - yyv496 := &x.NodeStatusUpdateFrequency - yym497 := z.DecBinary() - _ = yym497 + yyv499 := &x.NodeStatusUpdateFrequency + yym500 := z.DecBinary() + _ = yym500 if false { - } else if z.HasExtensions() && z.DecExt(yyv496) { - } else if !yym497 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv496) + } else if z.HasExtensions() && z.DecExt(yyv499) { + } else if !yym500 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv499) } else { - z.DecFallback(yyv496, false) + z.DecFallback(yyv499, false) } } case "imageMinimumGCAge": if r.TryDecodeAsNil() { x.ImageMinimumGCAge = pkg1_unversioned.Duration{} } else { - yyv498 := &x.ImageMinimumGCAge - yym499 := z.DecBinary() - _ = yym499 + yyv501 := &x.ImageMinimumGCAge + yym502 := z.DecBinary() + _ = yym502 if false { - } else if z.HasExtensions() && z.DecExt(yyv498) { - } else if !yym499 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv498) + } else if z.HasExtensions() && z.DecExt(yyv501) { + } else if !yym502 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv501) } else { - z.DecFallback(yyv498, false) + z.DecFallback(yyv501, false) } } case "imageGCHighThresholdPercent": @@ -3786,15 +3805,15 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.VolumeStatsAggPeriod = pkg1_unversioned.Duration{} } else { - yyv503 := &x.VolumeStatsAggPeriod - yym504 := z.DecBinary() - _ = yym504 + yyv506 := &x.VolumeStatsAggPeriod + yym507 := z.DecBinary() + _ = yym507 if false { - } else if z.HasExtensions() && z.DecExt(yyv503) { - } else if !yym504 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv503) + } else if z.HasExtensions() && z.DecExt(yyv506) { + } else if !yym507 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv506) } else { - z.DecFallback(yyv503, false) + z.DecFallback(yyv506, false) } } case "networkPluginName": @@ -3867,15 +3886,15 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.RuntimeRequestTimeout = pkg1_unversioned.Duration{} } else { - yyv516 := &x.RuntimeRequestTimeout - yym517 := z.DecBinary() - _ = yym517 + yyv519 := &x.RuntimeRequestTimeout + yym520 := z.DecBinary() + _ = yym520 if false { - } else if z.HasExtensions() && z.DecExt(yyv516) { - } else if !yym517 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv516) + } else if z.HasExtensions() && z.DecExt(yyv519) { + } else if !yym520 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv519) } else { - z.DecFallback(yyv516, false) + z.DecFallback(yyv519, false) } } case "rktPath": @@ -4020,15 +4039,15 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.OutOfDiskTransitionFrequency = pkg1_unversioned.Duration{} } else { - yyv541 := &x.OutOfDiskTransitionFrequency - yym542 := z.DecBinary() - _ = yym542 + yyv544 := &x.OutOfDiskTransitionFrequency + yym545 := z.DecBinary() + _ = yym545 if false { - } else if z.HasExtensions() && z.DecExt(yyv541) { - } else if !yym542 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv541) + } else if z.HasExtensions() && z.DecExt(yyv544) { + } else if !yym545 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv544) } else { - z.DecFallback(yyv541, false) + z.DecFallback(yyv544, false) } } case "nodeIP": @@ -4041,12 +4060,12 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.NodeLabels = nil } else { - yyv544 := &x.NodeLabels - yym545 := z.DecBinary() - _ = yym545 + yyv547 := &x.NodeLabels + yym548 := z.DecBinary() + _ = yym548 if false { } else { - z.F.DecMapStringStringX(yyv544, false, d) + z.F.DecMapStringStringX(yyv547, false, d) } } case "nonMasqueradeCIDR": @@ -4083,15 +4102,15 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.EvictionPressureTransitionPeriod = pkg1_unversioned.Duration{} } else { - yyv551 := &x.EvictionPressureTransitionPeriod - yym552 := z.DecBinary() - _ = yym552 + yyv554 := &x.EvictionPressureTransitionPeriod + yym555 := z.DecBinary() + _ = yym555 if false { - } else if z.HasExtensions() && z.DecExt(yyv551) { - } else if !yym552 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv551) + } else if z.HasExtensions() && z.DecExt(yyv554) { + } else if !yym555 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv554) } else { - z.DecFallback(yyv551, false) + z.DecFallback(yyv554, false) } } case "evictionMaxPodGracePeriod": @@ -4122,32 +4141,38 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.SystemReserved = nil } else { - yyv557 := &x.SystemReserved - yym558 := z.DecBinary() - _ = yym558 + yyv560 := &x.SystemReserved + yym561 := z.DecBinary() + _ = yym561 if false { - } else if z.HasExtensions() && z.DecExt(yyv557) { + } else if z.HasExtensions() && z.DecExt(yyv560) { } else { - h.decconfig_ConfigurationMap((*pkg2_config.ConfigurationMap)(yyv557), d) + h.decconfig_ConfigurationMap((*pkg2_config.ConfigurationMap)(yyv560), d) } } case "kubeReserved": if r.TryDecodeAsNil() { x.KubeReserved = nil } else { - yyv559 := &x.KubeReserved - yym560 := z.DecBinary() - _ = yym560 + yyv562 := &x.KubeReserved + yym563 := z.DecBinary() + _ = yym563 if false { - } else if z.HasExtensions() && z.DecExt(yyv559) { + } else if z.HasExtensions() && z.DecExt(yyv562) { } else { - h.decconfig_ConfigurationMap((*pkg2_config.ConfigurationMap)(yyv559), d) + h.decconfig_ConfigurationMap((*pkg2_config.ConfigurationMap)(yyv562), d) } } + case "protectKernelDefaults": + if r.TryDecodeAsNil() { + x.ProtectKernelDefaults = false + } else { + x.ProtectKernelDefaults = bool(r.DecodeBool()) + } default: - z.DecStructFieldNotFound(-1, yys446) - } // end switch yys446 - } // end for yyj446 + z.DecStructFieldNotFound(-1, yys449) + } // end switch yys449 + } // end for yyj449 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -4155,16 +4180,16 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj561 int - var yyb561 bool - var yyhl561 bool = l >= 0 - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + var yyj565 int + var yyb565 bool + var yyhl565 bool = l >= 0 + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4174,13 +4199,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.Kind = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4190,13 +4215,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.APIVersion = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4206,13 +4231,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.PodManifestPath = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4220,24 +4245,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.SyncFrequency = pkg1_unversioned.Duration{} } else { - yyv565 := &x.SyncFrequency - yym566 := z.DecBinary() - _ = yym566 + yyv569 := &x.SyncFrequency + yym570 := z.DecBinary() + _ = yym570 if false { - } else if z.HasExtensions() && z.DecExt(yyv565) { - } else if !yym566 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv565) + } else if z.HasExtensions() && z.DecExt(yyv569) { + } else if !yym570 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv569) } else { - z.DecFallback(yyv565, false) + z.DecFallback(yyv569, false) } } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4245,24 +4270,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.FileCheckFrequency = pkg1_unversioned.Duration{} } else { - yyv567 := &x.FileCheckFrequency - yym568 := z.DecBinary() - _ = yym568 + yyv571 := &x.FileCheckFrequency + yym572 := z.DecBinary() + _ = yym572 if false { - } else if z.HasExtensions() && z.DecExt(yyv567) { - } else if !yym568 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv567) + } else if z.HasExtensions() && z.DecExt(yyv571) { + } else if !yym572 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv571) } else { - z.DecFallback(yyv567, false) + z.DecFallback(yyv571, false) } } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4270,24 +4295,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.HTTPCheckFrequency = pkg1_unversioned.Duration{} } else { - yyv569 := &x.HTTPCheckFrequency - yym570 := z.DecBinary() - _ = yym570 + yyv573 := &x.HTTPCheckFrequency + yym574 := z.DecBinary() + _ = yym574 if false { - } else if z.HasExtensions() && z.DecExt(yyv569) { - } else if !yym570 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv569) + } else if z.HasExtensions() && z.DecExt(yyv573) { + } else if !yym574 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv573) } else { - z.DecFallback(yyv569, false) + z.DecFallback(yyv573, false) } } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4297,13 +4322,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ManifestURL = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4313,13 +4338,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ManifestURLHeader = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4329,13 +4354,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EnableServer = bool(r.DecodeBool()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4345,13 +4370,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.Address = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4361,13 +4386,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.Port = int32(r.DecodeInt(32)) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4377,13 +4402,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ReadOnlyPort = int32(r.DecodeInt(32)) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4393,13 +4418,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.TLSCertFile = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4409,13 +4434,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.TLSPrivateKeyFile = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4425,13 +4450,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CertDirectory = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4441,13 +4466,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.HostnameOverride = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4457,13 +4482,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.PodInfraContainerImage = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4473,13 +4498,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.DockerEndpoint = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4489,13 +4514,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RootDirectory = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4505,13 +4530,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.SeccompProfileRoot = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4521,13 +4546,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.AllowPrivileged = bool(r.DecodeBool()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4535,21 +4560,21 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.HostNetworkSources = nil } else { - yyv586 := &x.HostNetworkSources - yym587 := z.DecBinary() - _ = yym587 + yyv590 := &x.HostNetworkSources + yym591 := z.DecBinary() + _ = yym591 if false { } else { - z.F.DecSliceStringX(yyv586, false, d) + z.F.DecSliceStringX(yyv590, false, d) } } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4557,21 +4582,21 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.HostPIDSources = nil } else { - yyv588 := &x.HostPIDSources - yym589 := z.DecBinary() - _ = yym589 + yyv592 := &x.HostPIDSources + yym593 := z.DecBinary() + _ = yym593 if false { } else { - z.F.DecSliceStringX(yyv588, false, d) + z.F.DecSliceStringX(yyv592, false, d) } } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4579,21 +4604,21 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.HostIPCSources = nil } else { - yyv590 := &x.HostIPCSources - yym591 := z.DecBinary() - _ = yym591 + yyv594 := &x.HostIPCSources + yym595 := z.DecBinary() + _ = yym595 if false { } else { - z.F.DecSliceStringX(yyv590, false, d) + z.F.DecSliceStringX(yyv594, false, d) } } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4603,13 +4628,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RegistryPullQPS = int32(r.DecodeInt(32)) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4619,13 +4644,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RegistryBurst = int32(r.DecodeInt(32)) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4635,13 +4660,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EventRecordQPS = int32(r.DecodeInt(32)) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4651,13 +4676,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EventBurst = int32(r.DecodeInt(32)) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4667,13 +4692,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EnableDebuggingHandlers = bool(r.DecodeBool()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4681,24 +4706,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.MinimumGCAge = pkg1_unversioned.Duration{} } else { - yyv597 := &x.MinimumGCAge - yym598 := z.DecBinary() - _ = yym598 + yyv601 := &x.MinimumGCAge + yym602 := z.DecBinary() + _ = yym602 if false { - } else if z.HasExtensions() && z.DecExt(yyv597) { - } else if !yym598 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv597) + } else if z.HasExtensions() && z.DecExt(yyv601) { + } else if !yym602 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv601) } else { - z.DecFallback(yyv597, false) + z.DecFallback(yyv601, false) } } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4708,13 +4733,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MaxPerPodContainerCount = int32(r.DecodeInt(32)) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4724,13 +4749,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MaxContainerCount = int32(r.DecodeInt(32)) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4740,13 +4765,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CAdvisorPort = int32(r.DecodeInt(32)) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4756,13 +4781,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.HealthzPort = int32(r.DecodeInt(32)) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4772,13 +4797,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.HealthzBindAddress = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4788,13 +4813,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.OOMScoreAdj = int32(r.DecodeInt(32)) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4804,13 +4829,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RegisterNode = bool(r.DecodeBool()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4820,13 +4845,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ClusterDomain = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4836,13 +4861,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MasterServiceNamespace = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4852,13 +4877,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ClusterDNS = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4866,24 +4891,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.StreamingConnectionIdleTimeout = pkg1_unversioned.Duration{} } else { - yyv609 := &x.StreamingConnectionIdleTimeout - yym610 := z.DecBinary() - _ = yym610 + yyv613 := &x.StreamingConnectionIdleTimeout + yym614 := z.DecBinary() + _ = yym614 if false { - } else if z.HasExtensions() && z.DecExt(yyv609) { - } else if !yym610 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv609) + } else if z.HasExtensions() && z.DecExt(yyv613) { + } else if !yym614 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv613) } else { - z.DecFallback(yyv609, false) + z.DecFallback(yyv613, false) } } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4891,24 +4916,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.NodeStatusUpdateFrequency = pkg1_unversioned.Duration{} } else { - yyv611 := &x.NodeStatusUpdateFrequency - yym612 := z.DecBinary() - _ = yym612 + yyv615 := &x.NodeStatusUpdateFrequency + yym616 := z.DecBinary() + _ = yym616 if false { - } else if z.HasExtensions() && z.DecExt(yyv611) { - } else if !yym612 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv611) + } else if z.HasExtensions() && z.DecExt(yyv615) { + } else if !yym616 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv615) } else { - z.DecFallback(yyv611, false) + z.DecFallback(yyv615, false) } } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4916,24 +4941,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.ImageMinimumGCAge = pkg1_unversioned.Duration{} } else { - yyv613 := &x.ImageMinimumGCAge - yym614 := z.DecBinary() - _ = yym614 + yyv617 := &x.ImageMinimumGCAge + yym618 := z.DecBinary() + _ = yym618 if false { - } else if z.HasExtensions() && z.DecExt(yyv613) { - } else if !yym614 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv613) + } else if z.HasExtensions() && z.DecExt(yyv617) { + } else if !yym618 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv617) } else { - z.DecFallback(yyv613, false) + z.DecFallback(yyv617, false) } } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4943,13 +4968,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ImageGCHighThresholdPercent = int32(r.DecodeInt(32)) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4959,13 +4984,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ImageGCLowThresholdPercent = int32(r.DecodeInt(32)) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4975,13 +5000,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.LowDiskSpaceThresholdMB = int32(r.DecodeInt(32)) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4989,24 +5014,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.VolumeStatsAggPeriod = pkg1_unversioned.Duration{} } else { - yyv618 := &x.VolumeStatsAggPeriod - yym619 := z.DecBinary() - _ = yym619 + yyv622 := &x.VolumeStatsAggPeriod + yym623 := z.DecBinary() + _ = yym623 if false { - } else if z.HasExtensions() && z.DecExt(yyv618) { - } else if !yym619 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv618) + } else if z.HasExtensions() && z.DecExt(yyv622) { + } else if !yym623 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv622) } else { - z.DecFallback(yyv618, false) + z.DecFallback(yyv622, false) } } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5016,13 +5041,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.NetworkPluginName = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5032,13 +5057,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.NetworkPluginDir = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5048,13 +5073,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.VolumePluginDir = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5064,13 +5089,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CloudProvider = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5080,13 +5105,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CloudConfigFile = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5096,13 +5121,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.KubeletCgroups = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5112,13 +5137,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CgroupsPerQOS = bool(r.DecodeBool()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5128,13 +5153,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RuntimeCgroups = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5144,13 +5169,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.SystemCgroups = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5160,13 +5185,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CgroupRoot = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5176,13 +5201,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ContainerRuntime = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5190,24 +5215,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.RuntimeRequestTimeout = pkg1_unversioned.Duration{} } else { - yyv631 := &x.RuntimeRequestTimeout - yym632 := z.DecBinary() - _ = yym632 + yyv635 := &x.RuntimeRequestTimeout + yym636 := z.DecBinary() + _ = yym636 if false { - } else if z.HasExtensions() && z.DecExt(yyv631) { - } else if !yym632 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv631) + } else if z.HasExtensions() && z.DecExt(yyv635) { + } else if !yym636 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv635) } else { - z.DecFallback(yyv631, false) + z.DecFallback(yyv635, false) } } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5217,13 +5242,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RktPath = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5233,13 +5258,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RktAPIEndpoint = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5249,13 +5274,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RktStage1Image = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5265,13 +5290,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.LockFilePath = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5281,13 +5306,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ExitOnLockContention = bool(r.DecodeBool()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5297,13 +5322,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ConfigureCBR0 = bool(r.DecodeBool()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5313,13 +5338,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.HairpinMode = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5329,13 +5354,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.BabysitDaemons = bool(r.DecodeBool()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5345,13 +5370,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MaxPods = int32(r.DecodeInt(32)) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5361,13 +5386,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.NvidiaGPUs = int32(r.DecodeInt(32)) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5377,13 +5402,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.DockerExecHandlerName = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5393,13 +5418,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.PodCIDR = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5409,13 +5434,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ResolverConfig = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5425,13 +5450,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.CPUCFSQuota = bool(r.DecodeBool()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5441,13 +5466,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.Containerized = bool(r.DecodeBool()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5457,13 +5482,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.MaxOpenFiles = int64(r.DecodeInt(64)) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5473,13 +5498,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ReconcileCIDR = bool(r.DecodeBool()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5489,13 +5514,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.RegisterSchedulable = bool(r.DecodeBool()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5505,13 +5530,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ContentType = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5521,13 +5546,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.KubeAPIQPS = int32(r.DecodeInt(32)) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5537,13 +5562,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.KubeAPIBurst = int32(r.DecodeInt(32)) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5553,13 +5578,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.SerializeImagePulls = bool(r.DecodeBool()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5569,13 +5594,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.ExperimentalFlannelOverlay = bool(r.DecodeBool()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5583,24 +5608,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.OutOfDiskTransitionFrequency = pkg1_unversioned.Duration{} } else { - yyv656 := &x.OutOfDiskTransitionFrequency - yym657 := z.DecBinary() - _ = yym657 + yyv660 := &x.OutOfDiskTransitionFrequency + yym661 := z.DecBinary() + _ = yym661 if false { - } else if z.HasExtensions() && z.DecExt(yyv656) { - } else if !yym657 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv656) + } else if z.HasExtensions() && z.DecExt(yyv660) { + } else if !yym661 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv660) } else { - z.DecFallback(yyv656, false) + z.DecFallback(yyv660, false) } } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5610,13 +5635,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.NodeIP = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5624,21 +5649,21 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.NodeLabels = nil } else { - yyv659 := &x.NodeLabels - yym660 := z.DecBinary() - _ = yym660 + yyv663 := &x.NodeLabels + yym664 := z.DecBinary() + _ = yym664 if false { } else { - z.F.DecMapStringStringX(yyv659, false, d) + z.F.DecMapStringStringX(yyv663, false, d) } } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5648,13 +5673,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.NonMasqueradeCIDR = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5664,13 +5689,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EnableCustomMetrics = bool(r.DecodeBool()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5680,13 +5705,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EvictionHard = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5696,13 +5721,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EvictionSoft = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5712,13 +5737,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EvictionSoftGracePeriod = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5726,24 +5751,24 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.EvictionPressureTransitionPeriod = pkg1_unversioned.Duration{} } else { - yyv666 := &x.EvictionPressureTransitionPeriod - yym667 := z.DecBinary() - _ = yym667 + yyv670 := &x.EvictionPressureTransitionPeriod + yym671 := z.DecBinary() + _ = yym671 if false { - } else if z.HasExtensions() && z.DecExt(yyv666) { - } else if !yym667 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv666) + } else if z.HasExtensions() && z.DecExt(yyv670) { + } else if !yym671 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv670) } else { - z.DecFallback(yyv666, false) + z.DecFallback(yyv670, false) } } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5753,13 +5778,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EvictionMaxPodGracePeriod = int32(r.DecodeInt(32)) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5769,13 +5794,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EvictionMinimumReclaim = string(r.DecodeString()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5785,13 +5810,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.PodsPerCore = int32(r.DecodeInt(32)) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5801,13 +5826,13 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco } else { x.EnableControllerAttachDetach = bool(r.DecodeBool()) } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5815,22 +5840,22 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.SystemReserved = nil } else { - yyv672 := &x.SystemReserved - yym673 := z.DecBinary() - _ = yym673 + yyv676 := &x.SystemReserved + yym677 := z.DecBinary() + _ = yym677 if false { - } else if z.HasExtensions() && z.DecExt(yyv672) { + } else if z.HasExtensions() && z.DecExt(yyv676) { } else { - h.decconfig_ConfigurationMap((*pkg2_config.ConfigurationMap)(yyv672), d) + h.decconfig_ConfigurationMap((*pkg2_config.ConfigurationMap)(yyv676), d) } } - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5838,27 +5863,43 @@ func (x *KubeletConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.KubeReserved = nil } else { - yyv674 := &x.KubeReserved - yym675 := z.DecBinary() - _ = yym675 + yyv678 := &x.KubeReserved + yym679 := z.DecBinary() + _ = yym679 if false { - } else if z.HasExtensions() && z.DecExt(yyv674) { + } else if z.HasExtensions() && z.DecExt(yyv678) { } else { - h.decconfig_ConfigurationMap((*pkg2_config.ConfigurationMap)(yyv674), d) + h.decconfig_ConfigurationMap((*pkg2_config.ConfigurationMap)(yyv678), d) } } + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l + } else { + yyb565 = r.CheckBreak() + } + if yyb565 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ProtectKernelDefaults = false + } else { + x.ProtectKernelDefaults = bool(r.DecodeBool()) + } for { - yyj561++ - if yyhl561 { - yyb561 = yyj561 > l + yyj565++ + if yyhl565 { + yyb565 = yyj565 > l } else { - yyb561 = r.CheckBreak() + yyb565 = r.CheckBreak() } - if yyb561 { + if yyb565 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj561-1, "") + z.DecStructFieldNotFound(yyj565-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -5870,36 +5911,36 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym676 := z.EncBinary() - _ = yym676 + yym681 := z.EncBinary() + _ = yym681 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep677 := !z.EncBinary() - yy2arr677 := z.EncBasicHandle().StructToArray - var yyq677 [14]bool - _, _, _ = yysep677, yyq677, yy2arr677 - const yyr677 bool = false - yyq677[0] = x.Kind != "" - yyq677[1] = x.APIVersion != "" - var yynn677 int - if yyr677 || yy2arr677 { + yysep682 := !z.EncBinary() + yy2arr682 := z.EncBasicHandle().StructToArray + var yyq682 [14]bool + _, _, _ = yysep682, yyq682, yy2arr682 + const yyr682 bool = false + yyq682[0] = x.Kind != "" + yyq682[1] = x.APIVersion != "" + var yynn682 int + if yyr682 || yy2arr682 { r.EncodeArrayStart(14) } else { - yynn677 = 12 - for _, b := range yyq677 { + yynn682 = 12 + for _, b := range yyq682 { if b { - yynn677++ + yynn682++ } } - r.EncodeMapStart(yynn677) - yynn677 = 0 + r.EncodeMapStart(yynn682) + yynn682 = 0 } - if yyr677 || yy2arr677 { + if yyr682 || yy2arr682 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq677[0] { - yym679 := z.EncBinary() - _ = yym679 + if yyq682[0] { + yym684 := z.EncBinary() + _ = yym684 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -5908,23 +5949,23 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq677[0] { + if yyq682[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym680 := z.EncBinary() - _ = yym680 + yym685 := z.EncBinary() + _ = yym685 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr677 || yy2arr677 { + if yyr682 || yy2arr682 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq677[1] { - yym682 := z.EncBinary() - _ = yym682 + if yyq682[1] { + yym687 := z.EncBinary() + _ = yym687 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -5933,22 +5974,22 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq677[1] { + if yyq682[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym683 := z.EncBinary() - _ = yym683 + yym688 := z.EncBinary() + _ = yym688 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr677 || yy2arr677 { + if yyr682 || yy2arr682 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym685 := z.EncBinary() - _ = yym685 + yym690 := z.EncBinary() + _ = yym690 if false { } else { r.EncodeInt(int64(x.Port)) @@ -5957,17 +5998,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("port")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym686 := z.EncBinary() - _ = yym686 + yym691 := z.EncBinary() + _ = yym691 if false { } else { r.EncodeInt(int64(x.Port)) } } - if yyr677 || yy2arr677 { + if yyr682 || yy2arr682 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym688 := z.EncBinary() - _ = yym688 + yym693 := z.EncBinary() + _ = yym693 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Address)) @@ -5976,17 +6017,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("address")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym689 := z.EncBinary() - _ = yym689 + yym694 := z.EncBinary() + _ = yym694 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Address)) } } - if yyr677 || yy2arr677 { + if yyr682 || yy2arr682 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym691 := z.EncBinary() - _ = yym691 + yym696 := z.EncBinary() + _ = yym696 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.AlgorithmProvider)) @@ -5995,17 +6036,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("algorithmProvider")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym692 := z.EncBinary() - _ = yym692 + yym697 := z.EncBinary() + _ = yym697 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.AlgorithmProvider)) } } - if yyr677 || yy2arr677 { + if yyr682 || yy2arr682 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym694 := z.EncBinary() - _ = yym694 + yym699 := z.EncBinary() + _ = yym699 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PolicyConfigFile)) @@ -6014,17 +6055,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("policyConfigFile")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym695 := z.EncBinary() - _ = yym695 + yym700 := z.EncBinary() + _ = yym700 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PolicyConfigFile)) } } - if yyr677 || yy2arr677 { + if yyr682 || yy2arr682 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym697 := z.EncBinary() - _ = yym697 + yym702 := z.EncBinary() + _ = yym702 if false { } else { r.EncodeBool(bool(x.EnableProfiling)) @@ -6033,17 +6074,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("enableProfiling")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym698 := z.EncBinary() - _ = yym698 + yym703 := z.EncBinary() + _ = yym703 if false { } else { r.EncodeBool(bool(x.EnableProfiling)) } } - if yyr677 || yy2arr677 { + if yyr682 || yy2arr682 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym700 := z.EncBinary() - _ = yym700 + yym705 := z.EncBinary() + _ = yym705 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContentType)) @@ -6052,17 +6093,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("contentType")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym701 := z.EncBinary() - _ = yym701 + yym706 := z.EncBinary() + _ = yym706 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContentType)) } } - if yyr677 || yy2arr677 { + if yyr682 || yy2arr682 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym703 := z.EncBinary() - _ = yym703 + yym708 := z.EncBinary() + _ = yym708 if false { } else { r.EncodeFloat32(float32(x.KubeAPIQPS)) @@ -6071,17 +6112,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeAPIQPS")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym704 := z.EncBinary() - _ = yym704 + yym709 := z.EncBinary() + _ = yym709 if false { } else { r.EncodeFloat32(float32(x.KubeAPIQPS)) } } - if yyr677 || yy2arr677 { + if yyr682 || yy2arr682 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym706 := z.EncBinary() - _ = yym706 + yym711 := z.EncBinary() + _ = yym711 if false { } else { r.EncodeInt(int64(x.KubeAPIBurst)) @@ -6090,17 +6131,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeAPIBurst")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym707 := z.EncBinary() - _ = yym707 + yym712 := z.EncBinary() + _ = yym712 if false { } else { r.EncodeInt(int64(x.KubeAPIBurst)) } } - if yyr677 || yy2arr677 { + if yyr682 || yy2arr682 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym709 := z.EncBinary() - _ = yym709 + yym714 := z.EncBinary() + _ = yym714 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName)) @@ -6109,17 +6150,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("schedulerName")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym710 := z.EncBinary() - _ = yym710 + yym715 := z.EncBinary() + _ = yym715 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName)) } } - if yyr677 || yy2arr677 { + if yyr682 || yy2arr682 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym712 := z.EncBinary() - _ = yym712 + yym717 := z.EncBinary() + _ = yym717 if false { } else { r.EncodeInt(int64(x.HardPodAffinitySymmetricWeight)) @@ -6128,17 +6169,17 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("hardPodAffinitySymmetricWeight")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym713 := z.EncBinary() - _ = yym713 + yym718 := z.EncBinary() + _ = yym718 if false { } else { r.EncodeInt(int64(x.HardPodAffinitySymmetricWeight)) } } - if yyr677 || yy2arr677 { + if yyr682 || yy2arr682 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym715 := z.EncBinary() - _ = yym715 + yym720 := z.EncBinary() + _ = yym720 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FailureDomains)) @@ -6147,25 +6188,25 @@ func (x *KubeSchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("failureDomains")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym716 := z.EncBinary() - _ = yym716 + yym721 := z.EncBinary() + _ = yym721 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FailureDomains)) } } - if yyr677 || yy2arr677 { + if yyr682 || yy2arr682 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy718 := &x.LeaderElection - yy718.CodecEncodeSelf(e) + yy723 := &x.LeaderElection + yy723.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("leaderElection")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy719 := &x.LeaderElection - yy719.CodecEncodeSelf(e) + yy724 := &x.LeaderElection + yy724.CodecEncodeSelf(e) } - if yyr677 || yy2arr677 { + if yyr682 || yy2arr682 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -6178,25 +6219,25 @@ func (x *KubeSchedulerConfiguration) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym720 := z.DecBinary() - _ = yym720 + yym725 := z.DecBinary() + _ = yym725 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct721 := r.ContainerType() - if yyct721 == codecSelferValueTypeMap1234 { - yyl721 := r.ReadMapStart() - if yyl721 == 0 { + yyct726 := r.ContainerType() + if yyct726 == codecSelferValueTypeMap1234 { + yyl726 := r.ReadMapStart() + if yyl726 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl721, d) + x.codecDecodeSelfFromMap(yyl726, d) } - } else if yyct721 == codecSelferValueTypeArray1234 { - yyl721 := r.ReadArrayStart() - if yyl721 == 0 { + } else if yyct726 == codecSelferValueTypeArray1234 { + yyl726 := r.ReadArrayStart() + if yyl726 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl721, d) + x.codecDecodeSelfFromArray(yyl726, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -6208,12 +6249,12 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromMap(l int, d *codec1978. var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys722Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys722Slc - var yyhl722 bool = l >= 0 - for yyj722 := 0; ; yyj722++ { - if yyhl722 { - if yyj722 >= l { + var yys727Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys727Slc + var yyhl727 bool = l >= 0 + for yyj727 := 0; ; yyj727++ { + if yyhl727 { + if yyj727 >= l { break } } else { @@ -6222,10 +6263,10 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromMap(l int, d *codec1978. } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys722Slc = r.DecodeBytes(yys722Slc, true, true) - yys722 := string(yys722Slc) + yys727Slc = r.DecodeBytes(yys727Slc, true, true) + yys727 := string(yys727Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys722 { + switch yys727 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -6308,13 +6349,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromMap(l int, d *codec1978. if r.TryDecodeAsNil() { x.LeaderElection = LeaderElectionConfiguration{} } else { - yyv736 := &x.LeaderElection - yyv736.CodecDecodeSelf(d) + yyv741 := &x.LeaderElection + yyv741.CodecDecodeSelf(d) } default: - z.DecStructFieldNotFound(-1, yys722) - } // end switch yys722 - } // end for yyj722 + z.DecStructFieldNotFound(-1, yys727) + } // end switch yys727 + } // end for yyj727 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -6322,16 +6363,16 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj737 int - var yyb737 bool - var yyhl737 bool = l >= 0 - yyj737++ - if yyhl737 { - yyb737 = yyj737 > l + var yyj742 int + var yyb742 bool + var yyhl742 bool = l >= 0 + yyj742++ + if yyhl742 { + yyb742 = yyj742 > l } else { - yyb737 = r.CheckBreak() + yyb742 = r.CheckBreak() } - if yyb737 { + if yyb742 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6341,13 +6382,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.Kind = string(r.DecodeString()) } - yyj737++ - if yyhl737 { - yyb737 = yyj737 > l + yyj742++ + if yyhl742 { + yyb742 = yyj742 > l } else { - yyb737 = r.CheckBreak() + yyb742 = r.CheckBreak() } - if yyb737 { + if yyb742 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6357,13 +6398,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.APIVersion = string(r.DecodeString()) } - yyj737++ - if yyhl737 { - yyb737 = yyj737 > l + yyj742++ + if yyhl742 { + yyb742 = yyj742 > l } else { - yyb737 = r.CheckBreak() + yyb742 = r.CheckBreak() } - if yyb737 { + if yyb742 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6373,13 +6414,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.Port = int32(r.DecodeInt(32)) } - yyj737++ - if yyhl737 { - yyb737 = yyj737 > l + yyj742++ + if yyhl742 { + yyb742 = yyj742 > l } else { - yyb737 = r.CheckBreak() + yyb742 = r.CheckBreak() } - if yyb737 { + if yyb742 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6389,13 +6430,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.Address = string(r.DecodeString()) } - yyj737++ - if yyhl737 { - yyb737 = yyj737 > l + yyj742++ + if yyhl742 { + yyb742 = yyj742 > l } else { - yyb737 = r.CheckBreak() + yyb742 = r.CheckBreak() } - if yyb737 { + if yyb742 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6405,13 +6446,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.AlgorithmProvider = string(r.DecodeString()) } - yyj737++ - if yyhl737 { - yyb737 = yyj737 > l + yyj742++ + if yyhl742 { + yyb742 = yyj742 > l } else { - yyb737 = r.CheckBreak() + yyb742 = r.CheckBreak() } - if yyb737 { + if yyb742 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6421,13 +6462,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.PolicyConfigFile = string(r.DecodeString()) } - yyj737++ - if yyhl737 { - yyb737 = yyj737 > l + yyj742++ + if yyhl742 { + yyb742 = yyj742 > l } else { - yyb737 = r.CheckBreak() + yyb742 = r.CheckBreak() } - if yyb737 { + if yyb742 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6437,13 +6478,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.EnableProfiling = bool(r.DecodeBool()) } - yyj737++ - if yyhl737 { - yyb737 = yyj737 > l + yyj742++ + if yyhl742 { + yyb742 = yyj742 > l } else { - yyb737 = r.CheckBreak() + yyb742 = r.CheckBreak() } - if yyb737 { + if yyb742 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6453,13 +6494,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.ContentType = string(r.DecodeString()) } - yyj737++ - if yyhl737 { - yyb737 = yyj737 > l + yyj742++ + if yyhl742 { + yyb742 = yyj742 > l } else { - yyb737 = r.CheckBreak() + yyb742 = r.CheckBreak() } - if yyb737 { + if yyb742 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6469,13 +6510,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.KubeAPIQPS = float32(r.DecodeFloat(true)) } - yyj737++ - if yyhl737 { - yyb737 = yyj737 > l + yyj742++ + if yyhl742 { + yyb742 = yyj742 > l } else { - yyb737 = r.CheckBreak() + yyb742 = r.CheckBreak() } - if yyb737 { + if yyb742 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6485,13 +6526,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.KubeAPIBurst = int32(r.DecodeInt(32)) } - yyj737++ - if yyhl737 { - yyb737 = yyj737 > l + yyj742++ + if yyhl742 { + yyb742 = yyj742 > l } else { - yyb737 = r.CheckBreak() + yyb742 = r.CheckBreak() } - if yyb737 { + if yyb742 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6501,13 +6542,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.SchedulerName = string(r.DecodeString()) } - yyj737++ - if yyhl737 { - yyb737 = yyj737 > l + yyj742++ + if yyhl742 { + yyb742 = yyj742 > l } else { - yyb737 = r.CheckBreak() + yyb742 = r.CheckBreak() } - if yyb737 { + if yyb742 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6517,13 +6558,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.HardPodAffinitySymmetricWeight = int(r.DecodeInt(codecSelferBitsize1234)) } - yyj737++ - if yyhl737 { - yyb737 = yyj737 > l + yyj742++ + if yyhl742 { + yyb742 = yyj742 > l } else { - yyb737 = r.CheckBreak() + yyb742 = r.CheckBreak() } - if yyb737 { + if yyb742 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6533,13 +6574,13 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 } else { x.FailureDomains = string(r.DecodeString()) } - yyj737++ - if yyhl737 { - yyb737 = yyj737 > l + yyj742++ + if yyhl742 { + yyb742 = yyj742 > l } else { - yyb737 = r.CheckBreak() + yyb742 = r.CheckBreak() } - if yyb737 { + if yyb742 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6547,21 +6588,21 @@ func (x *KubeSchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec197 if r.TryDecodeAsNil() { x.LeaderElection = LeaderElectionConfiguration{} } else { - yyv751 := &x.LeaderElection - yyv751.CodecDecodeSelf(d) + yyv756 := &x.LeaderElection + yyv756.CodecDecodeSelf(d) } for { - yyj737++ - if yyhl737 { - yyb737 = yyj737 > l + yyj742++ + if yyhl742 { + yyb742 = yyj742 > l } else { - yyb737 = r.CheckBreak() + yyb742 = r.CheckBreak() } - if yyb737 { + if yyb742 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj737-1, "") + z.DecStructFieldNotFound(yyj742-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -6573,33 +6614,33 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym752 := z.EncBinary() - _ = yym752 + yym757 := z.EncBinary() + _ = yym757 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep753 := !z.EncBinary() - yy2arr753 := z.EncBasicHandle().StructToArray - var yyq753 [4]bool - _, _, _ = yysep753, yyq753, yy2arr753 - const yyr753 bool = false - var yynn753 int - if yyr753 || yy2arr753 { + yysep758 := !z.EncBinary() + yy2arr758 := z.EncBasicHandle().StructToArray + var yyq758 [4]bool + _, _, _ = yysep758, yyq758, yy2arr758 + const yyr758 bool = false + var yynn758 int + if yyr758 || yy2arr758 { r.EncodeArrayStart(4) } else { - yynn753 = 4 - for _, b := range yyq753 { + yynn758 = 4 + for _, b := range yyq758 { if b { - yynn753++ + yynn758++ } } - r.EncodeMapStart(yynn753) - yynn753 = 0 + r.EncodeMapStart(yynn758) + yynn758 = 0 } - if yyr753 || yy2arr753 { + if yyr758 || yy2arr758 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym755 := z.EncBinary() - _ = yym755 + yym760 := z.EncBinary() + _ = yym760 if false { } else { r.EncodeBool(bool(x.LeaderElect)) @@ -6608,43 +6649,16 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("leaderElect")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym756 := z.EncBinary() - _ = yym756 - if false { - } else { - r.EncodeBool(bool(x.LeaderElect)) - } - } - if yyr753 || yy2arr753 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy758 := &x.LeaseDuration - yym759 := z.EncBinary() - _ = yym759 - if false { - } else if z.HasExtensions() && z.EncExt(yy758) { - } else if !yym759 && z.IsJSONHandle() { - z.EncJSONMarshal(yy758) - } else { - z.EncFallback(yy758) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("leaseDuration")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy760 := &x.LeaseDuration yym761 := z.EncBinary() _ = yym761 if false { - } else if z.HasExtensions() && z.EncExt(yy760) { - } else if !yym761 && z.IsJSONHandle() { - z.EncJSONMarshal(yy760) } else { - z.EncFallback(yy760) + r.EncodeBool(bool(x.LeaderElect)) } } - if yyr753 || yy2arr753 { + if yyr758 || yy2arr758 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy763 := &x.RenewDeadline + yy763 := &x.LeaseDuration yym764 := z.EncBinary() _ = yym764 if false { @@ -6656,9 +6670,9 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("renewDeadline")) + r.EncodeString(codecSelferC_UTF81234, string("leaseDuration")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy765 := &x.RenewDeadline + yy765 := &x.LeaseDuration yym766 := z.EncBinary() _ = yym766 if false { @@ -6669,9 +6683,9 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncFallback(yy765) } } - if yyr753 || yy2arr753 { + if yyr758 || yy2arr758 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy768 := &x.RetryPeriod + yy768 := &x.RenewDeadline yym769 := z.EncBinary() _ = yym769 if false { @@ -6683,9 +6697,9 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("retryPeriod")) + r.EncodeString(codecSelferC_UTF81234, string("renewDeadline")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy770 := &x.RetryPeriod + yy770 := &x.RenewDeadline yym771 := z.EncBinary() _ = yym771 if false { @@ -6696,7 +6710,34 @@ func (x *LeaderElectionConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncFallback(yy770) } } - if yyr753 || yy2arr753 { + if yyr758 || yy2arr758 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy773 := &x.RetryPeriod + yym774 := z.EncBinary() + _ = yym774 + if false { + } else if z.HasExtensions() && z.EncExt(yy773) { + } else if !yym774 && z.IsJSONHandle() { + z.EncJSONMarshal(yy773) + } else { + z.EncFallback(yy773) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("retryPeriod")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy775 := &x.RetryPeriod + yym776 := z.EncBinary() + _ = yym776 + if false { + } else if z.HasExtensions() && z.EncExt(yy775) { + } else if !yym776 && z.IsJSONHandle() { + z.EncJSONMarshal(yy775) + } else { + z.EncFallback(yy775) + } + } + if yyr758 || yy2arr758 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -6709,25 +6750,25 @@ func (x *LeaderElectionConfiguration) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym772 := z.DecBinary() - _ = yym772 + yym777 := z.DecBinary() + _ = yym777 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct773 := r.ContainerType() - if yyct773 == codecSelferValueTypeMap1234 { - yyl773 := r.ReadMapStart() - if yyl773 == 0 { + yyct778 := r.ContainerType() + if yyct778 == codecSelferValueTypeMap1234 { + yyl778 := r.ReadMapStart() + if yyl778 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl773, d) + x.codecDecodeSelfFromMap(yyl778, d) } - } else if yyct773 == codecSelferValueTypeArray1234 { - yyl773 := r.ReadArrayStart() - if yyl773 == 0 { + } else if yyct778 == codecSelferValueTypeArray1234 { + yyl778 := r.ReadArrayStart() + if yyl778 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl773, d) + x.codecDecodeSelfFromArray(yyl778, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -6739,12 +6780,12 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromMap(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys774Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys774Slc - var yyhl774 bool = l >= 0 - for yyj774 := 0; ; yyj774++ { - if yyhl774 { - if yyj774 >= l { + var yys779Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys779Slc + var yyhl779 bool = l >= 0 + for yyj779 := 0; ; yyj779++ { + if yyhl779 { + if yyj779 >= l { break } } else { @@ -6753,10 +6794,10 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromMap(l int, d *codec1978 } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys774Slc = r.DecodeBytes(yys774Slc, true, true) - yys774 := string(yys774Slc) + yys779Slc = r.DecodeBytes(yys779Slc, true, true) + yys779 := string(yys779Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys774 { + switch yys779 { case "leaderElect": if r.TryDecodeAsNil() { x.LeaderElect = false @@ -6767,51 +6808,51 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromMap(l int, d *codec1978 if r.TryDecodeAsNil() { x.LeaseDuration = pkg1_unversioned.Duration{} } else { - yyv776 := &x.LeaseDuration - yym777 := z.DecBinary() - _ = yym777 + yyv781 := &x.LeaseDuration + yym782 := z.DecBinary() + _ = yym782 if false { - } else if z.HasExtensions() && z.DecExt(yyv776) { - } else if !yym777 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv776) + } else if z.HasExtensions() && z.DecExt(yyv781) { + } else if !yym782 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv781) } else { - z.DecFallback(yyv776, false) + z.DecFallback(yyv781, false) } } case "renewDeadline": if r.TryDecodeAsNil() { x.RenewDeadline = pkg1_unversioned.Duration{} } else { - yyv778 := &x.RenewDeadline - yym779 := z.DecBinary() - _ = yym779 + yyv783 := &x.RenewDeadline + yym784 := z.DecBinary() + _ = yym784 if false { - } else if z.HasExtensions() && z.DecExt(yyv778) { - } else if !yym779 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv778) + } else if z.HasExtensions() && z.DecExt(yyv783) { + } else if !yym784 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv783) } else { - z.DecFallback(yyv778, false) + z.DecFallback(yyv783, false) } } case "retryPeriod": if r.TryDecodeAsNil() { x.RetryPeriod = pkg1_unversioned.Duration{} } else { - yyv780 := &x.RetryPeriod - yym781 := z.DecBinary() - _ = yym781 + yyv785 := &x.RetryPeriod + yym786 := z.DecBinary() + _ = yym786 if false { - } else if z.HasExtensions() && z.DecExt(yyv780) { - } else if !yym781 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv780) + } else if z.HasExtensions() && z.DecExt(yyv785) { + } else if !yym786 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv785) } else { - z.DecFallback(yyv780, false) + z.DecFallback(yyv785, false) } } default: - z.DecStructFieldNotFound(-1, yys774) - } // end switch yys774 - } // end for yyj774 + z.DecStructFieldNotFound(-1, yys779) + } // end switch yys779 + } // end for yyj779 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -6819,16 +6860,16 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj782 int - var yyb782 bool - var yyhl782 bool = l >= 0 - yyj782++ - if yyhl782 { - yyb782 = yyj782 > l + var yyj787 int + var yyb787 bool + var yyhl787 bool = l >= 0 + yyj787++ + if yyhl787 { + yyb787 = yyj787 > l } else { - yyb782 = r.CheckBreak() + yyb787 = r.CheckBreak() } - if yyb782 { + if yyb787 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6838,13 +6879,13 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19 } else { x.LeaderElect = bool(r.DecodeBool()) } - yyj782++ - if yyhl782 { - yyb782 = yyj782 > l + yyj787++ + if yyhl787 { + yyb787 = yyj787 > l } else { - yyb782 = r.CheckBreak() + yyb787 = r.CheckBreak() } - if yyb782 { + if yyb787 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6852,24 +6893,24 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19 if r.TryDecodeAsNil() { x.LeaseDuration = pkg1_unversioned.Duration{} } else { - yyv784 := &x.LeaseDuration - yym785 := z.DecBinary() - _ = yym785 + yyv789 := &x.LeaseDuration + yym790 := z.DecBinary() + _ = yym790 if false { - } else if z.HasExtensions() && z.DecExt(yyv784) { - } else if !yym785 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv784) + } else if z.HasExtensions() && z.DecExt(yyv789) { + } else if !yym790 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv789) } else { - z.DecFallback(yyv784, false) + z.DecFallback(yyv789, false) } } - yyj782++ - if yyhl782 { - yyb782 = yyj782 > l + yyj787++ + if yyhl787 { + yyb787 = yyj787 > l } else { - yyb782 = r.CheckBreak() + yyb787 = r.CheckBreak() } - if yyb782 { + if yyb787 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6877,24 +6918,24 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19 if r.TryDecodeAsNil() { x.RenewDeadline = pkg1_unversioned.Duration{} } else { - yyv786 := &x.RenewDeadline - yym787 := z.DecBinary() - _ = yym787 + yyv791 := &x.RenewDeadline + yym792 := z.DecBinary() + _ = yym792 if false { - } else if z.HasExtensions() && z.DecExt(yyv786) { - } else if !yym787 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv786) + } else if z.HasExtensions() && z.DecExt(yyv791) { + } else if !yym792 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv791) } else { - z.DecFallback(yyv786, false) + z.DecFallback(yyv791, false) } } - yyj782++ - if yyhl782 { - yyb782 = yyj782 > l + yyj787++ + if yyhl787 { + yyb787 = yyj787 > l } else { - yyb782 = r.CheckBreak() + yyb787 = r.CheckBreak() } - if yyb782 { + if yyb787 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6902,29 +6943,29 @@ func (x *LeaderElectionConfiguration) codecDecodeSelfFromArray(l int, d *codec19 if r.TryDecodeAsNil() { x.RetryPeriod = pkg1_unversioned.Duration{} } else { - yyv788 := &x.RetryPeriod - yym789 := z.DecBinary() - _ = yym789 + yyv793 := &x.RetryPeriod + yym794 := z.DecBinary() + _ = yym794 if false { - } else if z.HasExtensions() && z.DecExt(yyv788) { - } else if !yym789 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv788) + } else if z.HasExtensions() && z.DecExt(yyv793) { + } else if !yym794 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv793) } else { - z.DecFallback(yyv788, false) + z.DecFallback(yyv793, false) } } for { - yyj782++ - if yyhl782 { - yyb782 = yyj782 > l + yyj787++ + if yyhl787 { + yyb787 = yyj787 > l } else { - yyb782 = r.CheckBreak() + yyb787 = r.CheckBreak() } - if yyb782 { + if yyb787 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj782-1, "") + z.DecStructFieldNotFound(yyj787-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -6936,36 +6977,36 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode if x == nil { r.EncodeNil() } else { - yym790 := z.EncBinary() - _ = yym790 + yym795 := z.EncBinary() + _ = yym795 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep791 := !z.EncBinary() - yy2arr791 := z.EncBasicHandle().StructToArray - var yyq791 [54]bool - _, _, _ = yysep791, yyq791, yy2arr791 - const yyr791 bool = false - yyq791[0] = x.Kind != "" - yyq791[1] = x.APIVersion != "" - var yynn791 int - if yyr791 || yy2arr791 { + yysep796 := !z.EncBinary() + yy2arr796 := z.EncBasicHandle().StructToArray + var yyq796 [54]bool + _, _, _ = yysep796, yyq796, yy2arr796 + const yyr796 bool = false + yyq796[0] = x.Kind != "" + yyq796[1] = x.APIVersion != "" + var yynn796 int + if yyr796 || yy2arr796 { r.EncodeArrayStart(54) } else { - yynn791 = 52 - for _, b := range yyq791 { + yynn796 = 52 + for _, b := range yyq796 { if b { - yynn791++ + yynn796++ } } - r.EncodeMapStart(yynn791) - yynn791 = 0 + r.EncodeMapStart(yynn796) + yynn796 = 0 } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq791[0] { - yym793 := z.EncBinary() - _ = yym793 + if yyq796[0] { + yym798 := z.EncBinary() + _ = yym798 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) @@ -6974,23 +7015,23 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq791[0] { + if yyq796[0] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym794 := z.EncBinary() - _ = yym794 + yym799 := z.EncBinary() + _ = yym799 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq791[1] { - yym796 := z.EncBinary() - _ = yym796 + if yyq796[1] { + yym801 := z.EncBinary() + _ = yym801 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) @@ -6999,22 +7040,22 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq791[1] { + if yyq796[1] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym797 := z.EncBinary() - _ = yym797 + yym802 := z.EncBinary() + _ = yym802 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym799 := z.EncBinary() - _ = yym799 + yym804 := z.EncBinary() + _ = yym804 if false { } else { r.EncodeInt(int64(x.Port)) @@ -7023,17 +7064,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("port")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym800 := z.EncBinary() - _ = yym800 + yym805 := z.EncBinary() + _ = yym805 if false { } else { r.EncodeInt(int64(x.Port)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym802 := z.EncBinary() - _ = yym802 + yym807 := z.EncBinary() + _ = yym807 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Address)) @@ -7042,17 +7083,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("address")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym803 := z.EncBinary() - _ = yym803 + yym808 := z.EncBinary() + _ = yym808 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Address)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym805 := z.EncBinary() - _ = yym805 + yym810 := z.EncBinary() + _ = yym810 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.CloudProvider)) @@ -7061,17 +7102,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("cloudProvider")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym806 := z.EncBinary() - _ = yym806 + yym811 := z.EncBinary() + _ = yym811 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.CloudProvider)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym808 := z.EncBinary() - _ = yym808 + yym813 := z.EncBinary() + _ = yym813 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.CloudConfigFile)) @@ -7080,17 +7121,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("cloudConfigFile")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym809 := z.EncBinary() - _ = yym809 + yym814 := z.EncBinary() + _ = yym814 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.CloudConfigFile)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym811 := z.EncBinary() - _ = yym811 + yym816 := z.EncBinary() + _ = yym816 if false { } else { r.EncodeInt(int64(x.ConcurrentEndpointSyncs)) @@ -7099,17 +7140,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("concurrentEndpointSyncs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym812 := z.EncBinary() - _ = yym812 + yym817 := z.EncBinary() + _ = yym817 if false { } else { r.EncodeInt(int64(x.ConcurrentEndpointSyncs)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym814 := z.EncBinary() - _ = yym814 + yym819 := z.EncBinary() + _ = yym819 if false { } else { r.EncodeInt(int64(x.ConcurrentRSSyncs)) @@ -7118,17 +7159,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("concurrentRSSyncs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym815 := z.EncBinary() - _ = yym815 + yym820 := z.EncBinary() + _ = yym820 if false { } else { r.EncodeInt(int64(x.ConcurrentRSSyncs)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym817 := z.EncBinary() - _ = yym817 + yym822 := z.EncBinary() + _ = yym822 if false { } else { r.EncodeInt(int64(x.ConcurrentRCSyncs)) @@ -7137,17 +7178,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("concurrentRCSyncs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym818 := z.EncBinary() - _ = yym818 + yym823 := z.EncBinary() + _ = yym823 if false { } else { r.EncodeInt(int64(x.ConcurrentRCSyncs)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym820 := z.EncBinary() - _ = yym820 + yym825 := z.EncBinary() + _ = yym825 if false { } else { r.EncodeInt(int64(x.ConcurrentServiceSyncs)) @@ -7156,17 +7197,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("concurrentServiceSyncs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym821 := z.EncBinary() - _ = yym821 + yym826 := z.EncBinary() + _ = yym826 if false { } else { r.EncodeInt(int64(x.ConcurrentServiceSyncs)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym823 := z.EncBinary() - _ = yym823 + yym828 := z.EncBinary() + _ = yym828 if false { } else { r.EncodeInt(int64(x.ConcurrentResourceQuotaSyncs)) @@ -7175,17 +7216,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("concurrentResourceQuotaSyncs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym824 := z.EncBinary() - _ = yym824 + yym829 := z.EncBinary() + _ = yym829 if false { } else { r.EncodeInt(int64(x.ConcurrentResourceQuotaSyncs)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym826 := z.EncBinary() - _ = yym826 + yym831 := z.EncBinary() + _ = yym831 if false { } else { r.EncodeInt(int64(x.ConcurrentDeploymentSyncs)) @@ -7194,17 +7235,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("concurrentDeploymentSyncs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym827 := z.EncBinary() - _ = yym827 + yym832 := z.EncBinary() + _ = yym832 if false { } else { r.EncodeInt(int64(x.ConcurrentDeploymentSyncs)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym829 := z.EncBinary() - _ = yym829 + yym834 := z.EncBinary() + _ = yym834 if false { } else { r.EncodeInt(int64(x.ConcurrentDaemonSetSyncs)) @@ -7213,17 +7254,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("concurrentDaemonSetSyncs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym830 := z.EncBinary() - _ = yym830 + yym835 := z.EncBinary() + _ = yym835 if false { } else { r.EncodeInt(int64(x.ConcurrentDaemonSetSyncs)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym832 := z.EncBinary() - _ = yym832 + yym837 := z.EncBinary() + _ = yym837 if false { } else { r.EncodeInt(int64(x.ConcurrentJobSyncs)) @@ -7232,17 +7273,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("concurrentJobSyncs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym833 := z.EncBinary() - _ = yym833 + yym838 := z.EncBinary() + _ = yym838 if false { } else { r.EncodeInt(int64(x.ConcurrentJobSyncs)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym835 := z.EncBinary() - _ = yym835 + yym840 := z.EncBinary() + _ = yym840 if false { } else { r.EncodeInt(int64(x.ConcurrentNamespaceSyncs)) @@ -7251,17 +7292,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("concurrentNamespaceSyncs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym836 := z.EncBinary() - _ = yym836 + yym841 := z.EncBinary() + _ = yym841 if false { } else { r.EncodeInt(int64(x.ConcurrentNamespaceSyncs)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym838 := z.EncBinary() - _ = yym838 + yym843 := z.EncBinary() + _ = yym843 if false { } else { r.EncodeInt(int64(x.ConcurrentSATokenSyncs)) @@ -7270,17 +7311,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("concurrentSATokenSyncs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym839 := z.EncBinary() - _ = yym839 + yym844 := z.EncBinary() + _ = yym844 if false { } else { r.EncodeInt(int64(x.ConcurrentSATokenSyncs)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym841 := z.EncBinary() - _ = yym841 + yym846 := z.EncBinary() + _ = yym846 if false { } else { r.EncodeInt(int64(x.LookupCacheSizeForRC)) @@ -7289,17 +7330,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("lookupCacheSizeForRC")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym842 := z.EncBinary() - _ = yym842 + yym847 := z.EncBinary() + _ = yym847 if false { } else { r.EncodeInt(int64(x.LookupCacheSizeForRC)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym844 := z.EncBinary() - _ = yym844 + yym849 := z.EncBinary() + _ = yym849 if false { } else { r.EncodeInt(int64(x.LookupCacheSizeForRS)) @@ -7308,17 +7349,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("lookupCacheSizeForRS")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym845 := z.EncBinary() - _ = yym845 + yym850 := z.EncBinary() + _ = yym850 if false { } else { r.EncodeInt(int64(x.LookupCacheSizeForRS)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym847 := z.EncBinary() - _ = yym847 + yym852 := z.EncBinary() + _ = yym852 if false { } else { r.EncodeInt(int64(x.LookupCacheSizeForDaemonSet)) @@ -7327,43 +7368,16 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("lookupCacheSizeForDaemonSet")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym848 := z.EncBinary() - _ = yym848 - if false { - } else { - r.EncodeInt(int64(x.LookupCacheSizeForDaemonSet)) - } - } - if yyr791 || yy2arr791 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy850 := &x.ServiceSyncPeriod - yym851 := z.EncBinary() - _ = yym851 - if false { - } else if z.HasExtensions() && z.EncExt(yy850) { - } else if !yym851 && z.IsJSONHandle() { - z.EncJSONMarshal(yy850) - } else { - z.EncFallback(yy850) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("serviceSyncPeriod")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy852 := &x.ServiceSyncPeriod yym853 := z.EncBinary() _ = yym853 if false { - } else if z.HasExtensions() && z.EncExt(yy852) { - } else if !yym853 && z.IsJSONHandle() { - z.EncJSONMarshal(yy852) } else { - z.EncFallback(yy852) + r.EncodeInt(int64(x.LookupCacheSizeForDaemonSet)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy855 := &x.NodeSyncPeriod + yy855 := &x.ServiceSyncPeriod yym856 := z.EncBinary() _ = yym856 if false { @@ -7375,9 +7389,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("nodeSyncPeriod")) + r.EncodeString(codecSelferC_UTF81234, string("serviceSyncPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy857 := &x.NodeSyncPeriod + yy857 := &x.ServiceSyncPeriod yym858 := z.EncBinary() _ = yym858 if false { @@ -7388,9 +7402,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncFallback(yy857) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy860 := &x.ResourceQuotaSyncPeriod + yy860 := &x.NodeSyncPeriod yym861 := z.EncBinary() _ = yym861 if false { @@ -7402,9 +7416,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("resourceQuotaSyncPeriod")) + r.EncodeString(codecSelferC_UTF81234, string("nodeSyncPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy862 := &x.ResourceQuotaSyncPeriod + yy862 := &x.NodeSyncPeriod yym863 := z.EncBinary() _ = yym863 if false { @@ -7415,9 +7429,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncFallback(yy862) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy865 := &x.NamespaceSyncPeriod + yy865 := &x.ResourceQuotaSyncPeriod yym866 := z.EncBinary() _ = yym866 if false { @@ -7429,9 +7443,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("namespaceSyncPeriod")) + r.EncodeString(codecSelferC_UTF81234, string("resourceQuotaSyncPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy867 := &x.NamespaceSyncPeriod + yy867 := &x.ResourceQuotaSyncPeriod yym868 := z.EncBinary() _ = yym868 if false { @@ -7442,9 +7456,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncFallback(yy867) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy870 := &x.PVClaimBinderSyncPeriod + yy870 := &x.NamespaceSyncPeriod yym871 := z.EncBinary() _ = yym871 if false { @@ -7456,9 +7470,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("pvClaimBinderSyncPeriod")) + r.EncodeString(codecSelferC_UTF81234, string("namespaceSyncPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy872 := &x.PVClaimBinderSyncPeriod + yy872 := &x.NamespaceSyncPeriod yym873 := z.EncBinary() _ = yym873 if false { @@ -7469,9 +7483,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncFallback(yy872) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy875 := &x.MinResyncPeriod + yy875 := &x.PVClaimBinderSyncPeriod yym876 := z.EncBinary() _ = yym876 if false { @@ -7483,9 +7497,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("minResyncPeriod")) + r.EncodeString(codecSelferC_UTF81234, string("pvClaimBinderSyncPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy877 := &x.MinResyncPeriod + yy877 := &x.PVClaimBinderSyncPeriod yym878 := z.EncBinary() _ = yym878 if false { @@ -7496,55 +7510,55 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncFallback(yy877) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym880 := z.EncBinary() - _ = yym880 + yy880 := &x.MinResyncPeriod + yym881 := z.EncBinary() + _ = yym881 if false { + } else if z.HasExtensions() && z.EncExt(yy880) { + } else if !yym881 && z.IsJSONHandle() { + z.EncJSONMarshal(yy880) } else { - r.EncodeInt(int64(x.TerminatedPodGCThreshold)) + z.EncFallback(yy880) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("terminatedPodGCThreshold")) + r.EncodeString(codecSelferC_UTF81234, string("minResyncPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym881 := z.EncBinary() - _ = yym881 + yy882 := &x.MinResyncPeriod + yym883 := z.EncBinary() + _ = yym883 if false { + } else if z.HasExtensions() && z.EncExt(yy882) { + } else if !yym883 && z.IsJSONHandle() { + z.EncJSONMarshal(yy882) } else { - r.EncodeInt(int64(x.TerminatedPodGCThreshold)) + z.EncFallback(yy882) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy883 := &x.HorizontalPodAutoscalerSyncPeriod - yym884 := z.EncBinary() - _ = yym884 + yym885 := z.EncBinary() + _ = yym885 if false { - } else if z.HasExtensions() && z.EncExt(yy883) { - } else if !yym884 && z.IsJSONHandle() { - z.EncJSONMarshal(yy883) } else { - z.EncFallback(yy883) + r.EncodeInt(int64(x.TerminatedPodGCThreshold)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("horizontalPodAutoscalerSyncPeriod")) + r.EncodeString(codecSelferC_UTF81234, string("terminatedPodGCThreshold")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy885 := &x.HorizontalPodAutoscalerSyncPeriod yym886 := z.EncBinary() _ = yym886 if false { - } else if z.HasExtensions() && z.EncExt(yy885) { - } else if !yym886 && z.IsJSONHandle() { - z.EncJSONMarshal(yy885) } else { - z.EncFallback(yy885) + r.EncodeInt(int64(x.TerminatedPodGCThreshold)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy888 := &x.DeploymentControllerSyncPeriod + yy888 := &x.HorizontalPodAutoscalerSyncPeriod yym889 := z.EncBinary() _ = yym889 if false { @@ -7556,9 +7570,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("deploymentControllerSyncPeriod")) + r.EncodeString(codecSelferC_UTF81234, string("horizontalPodAutoscalerSyncPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy890 := &x.DeploymentControllerSyncPeriod + yy890 := &x.HorizontalPodAutoscalerSyncPeriod yym891 := z.EncBinary() _ = yym891 if false { @@ -7569,9 +7583,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncFallback(yy890) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy893 := &x.PodEvictionTimeout + yy893 := &x.DeploymentControllerSyncPeriod yym894 := z.EncBinary() _ = yym894 if false { @@ -7583,9 +7597,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("podEvictionTimeout")) + r.EncodeString(codecSelferC_UTF81234, string("deploymentControllerSyncPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy895 := &x.PodEvictionTimeout + yy895 := &x.DeploymentControllerSyncPeriod yym896 := z.EncBinary() _ = yym896 if false { @@ -7596,120 +7610,120 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncFallback(yy895) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym898 := z.EncBinary() - _ = yym898 + yy898 := &x.PodEvictionTimeout + yym899 := z.EncBinary() + _ = yym899 if false { + } else if z.HasExtensions() && z.EncExt(yy898) { + } else if !yym899 && z.IsJSONHandle() { + z.EncJSONMarshal(yy898) } else { - r.EncodeFloat32(float32(x.DeletingPodsQps)) + z.EncFallback(yy898) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("deletingPodsQps")) + r.EncodeString(codecSelferC_UTF81234, string("podEvictionTimeout")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym899 := z.EncBinary() - _ = yym899 + yy900 := &x.PodEvictionTimeout + yym901 := z.EncBinary() + _ = yym901 if false { + } else if z.HasExtensions() && z.EncExt(yy900) { + } else if !yym901 && z.IsJSONHandle() { + z.EncJSONMarshal(yy900) } else { - r.EncodeFloat32(float32(x.DeletingPodsQps)) + z.EncFallback(yy900) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym901 := z.EncBinary() - _ = yym901 + yym903 := z.EncBinary() + _ = yym903 if false { } else { - r.EncodeInt(int64(x.DeletingPodsBurst)) + r.EncodeFloat32(float32(x.DeletingPodsQps)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("deletingPodsBurst")) + r.EncodeString(codecSelferC_UTF81234, string("deletingPodsQps")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym902 := z.EncBinary() - _ = yym902 + yym904 := z.EncBinary() + _ = yym904 if false { } else { - r.EncodeInt(int64(x.DeletingPodsBurst)) + r.EncodeFloat32(float32(x.DeletingPodsQps)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy904 := &x.NodeMonitorGracePeriod - yym905 := z.EncBinary() - _ = yym905 + yym906 := z.EncBinary() + _ = yym906 if false { - } else if z.HasExtensions() && z.EncExt(yy904) { - } else if !yym905 && z.IsJSONHandle() { - z.EncJSONMarshal(yy904) } else { - z.EncFallback(yy904) + r.EncodeInt(int64(x.DeletingPodsBurst)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("nodeMonitorGracePeriod")) + r.EncodeString(codecSelferC_UTF81234, string("deletingPodsBurst")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy906 := &x.NodeMonitorGracePeriod yym907 := z.EncBinary() _ = yym907 if false { - } else if z.HasExtensions() && z.EncExt(yy906) { - } else if !yym907 && z.IsJSONHandle() { - z.EncJSONMarshal(yy906) } else { - z.EncFallback(yy906) + r.EncodeInt(int64(x.DeletingPodsBurst)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym909 := z.EncBinary() - _ = yym909 + yy909 := &x.NodeMonitorGracePeriod + yym910 := z.EncBinary() + _ = yym910 if false { + } else if z.HasExtensions() && z.EncExt(yy909) { + } else if !yym910 && z.IsJSONHandle() { + z.EncJSONMarshal(yy909) } else { - r.EncodeInt(int64(x.RegisterRetryCount)) + z.EncFallback(yy909) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("registerRetryCount")) + r.EncodeString(codecSelferC_UTF81234, string("nodeMonitorGracePeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym910 := z.EncBinary() - _ = yym910 + yy911 := &x.NodeMonitorGracePeriod + yym912 := z.EncBinary() + _ = yym912 if false { + } else if z.HasExtensions() && z.EncExt(yy911) { + } else if !yym912 && z.IsJSONHandle() { + z.EncJSONMarshal(yy911) } else { - r.EncodeInt(int64(x.RegisterRetryCount)) + z.EncFallback(yy911) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy912 := &x.NodeStartupGracePeriod - yym913 := z.EncBinary() - _ = yym913 + yym914 := z.EncBinary() + _ = yym914 if false { - } else if z.HasExtensions() && z.EncExt(yy912) { - } else if !yym913 && z.IsJSONHandle() { - z.EncJSONMarshal(yy912) } else { - z.EncFallback(yy912) + r.EncodeInt(int64(x.RegisterRetryCount)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("nodeStartupGracePeriod")) + r.EncodeString(codecSelferC_UTF81234, string("registerRetryCount")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy914 := &x.NodeStartupGracePeriod yym915 := z.EncBinary() _ = yym915 if false { - } else if z.HasExtensions() && z.EncExt(yy914) { - } else if !yym915 && z.IsJSONHandle() { - z.EncJSONMarshal(yy914) } else { - z.EncFallback(yy914) + r.EncodeInt(int64(x.RegisterRetryCount)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy917 := &x.NodeMonitorPeriod + yy917 := &x.NodeStartupGracePeriod yym918 := z.EncBinary() _ = yym918 if false { @@ -7721,9 +7735,9 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("nodeMonitorPeriod")) + r.EncodeString(codecSelferC_UTF81234, string("nodeStartupGracePeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy919 := &x.NodeMonitorPeriod + yy919 := &x.NodeStartupGracePeriod yym920 := z.EncBinary() _ = yym920 if false { @@ -7734,10 +7748,37 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncFallback(yy919) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy922 := &x.NodeMonitorPeriod + yym923 := z.EncBinary() + _ = yym923 + if false { + } else if z.HasExtensions() && z.EncExt(yy922) { + } else if !yym923 && z.IsJSONHandle() { + z.EncJSONMarshal(yy922) + } else { + z.EncFallback(yy922) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("nodeMonitorPeriod")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy924 := &x.NodeMonitorPeriod + yym925 := z.EncBinary() + _ = yym925 + if false { + } else if z.HasExtensions() && z.EncExt(yy924) { + } else if !yym925 && z.IsJSONHandle() { + z.EncJSONMarshal(yy924) + } else { + z.EncFallback(yy924) + } + } + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym922 := z.EncBinary() - _ = yym922 + yym927 := z.EncBinary() + _ = yym927 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountKeyFile)) @@ -7746,17 +7787,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("serviceAccountKeyFile")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym923 := z.EncBinary() - _ = yym923 + yym928 := z.EncBinary() + _ = yym928 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountKeyFile)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym925 := z.EncBinary() - _ = yym925 + yym930 := z.EncBinary() + _ = yym930 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ClusterSigningCertFile)) @@ -7765,17 +7806,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("clusterSigningCertFile")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym926 := z.EncBinary() - _ = yym926 + yym931 := z.EncBinary() + _ = yym931 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ClusterSigningCertFile)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym928 := z.EncBinary() - _ = yym928 + yym933 := z.EncBinary() + _ = yym933 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ClusterSigningKeyFile)) @@ -7784,17 +7825,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("clusterSigningKeyFile")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym929 := z.EncBinary() - _ = yym929 + yym934 := z.EncBinary() + _ = yym934 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ClusterSigningKeyFile)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym931 := z.EncBinary() - _ = yym931 + yym936 := z.EncBinary() + _ = yym936 if false { } else { r.EncodeBool(bool(x.EnableProfiling)) @@ -7803,17 +7844,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("enableProfiling")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym932 := z.EncBinary() - _ = yym932 + yym937 := z.EncBinary() + _ = yym937 if false { } else { r.EncodeBool(bool(x.EnableProfiling)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym934 := z.EncBinary() - _ = yym934 + yym939 := z.EncBinary() + _ = yym939 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName)) @@ -7822,17 +7863,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("clusterName")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym935 := z.EncBinary() - _ = yym935 + yym940 := z.EncBinary() + _ = yym940 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym937 := z.EncBinary() - _ = yym937 + yym942 := z.EncBinary() + _ = yym942 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ClusterCIDR)) @@ -7841,17 +7882,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("clusterCIDR")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym938 := z.EncBinary() - _ = yym938 + yym943 := z.EncBinary() + _ = yym943 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ClusterCIDR)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym940 := z.EncBinary() - _ = yym940 + yym945 := z.EncBinary() + _ = yym945 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ServiceCIDR)) @@ -7860,17 +7901,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("serviceCIDR")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym941 := z.EncBinary() - _ = yym941 + yym946 := z.EncBinary() + _ = yym946 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ServiceCIDR)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym943 := z.EncBinary() - _ = yym943 + yym948 := z.EncBinary() + _ = yym948 if false { } else { r.EncodeInt(int64(x.NodeCIDRMaskSize)) @@ -7879,17 +7920,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nodeCIDRMaskSize")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym944 := z.EncBinary() - _ = yym944 + yym949 := z.EncBinary() + _ = yym949 if false { } else { r.EncodeInt(int64(x.NodeCIDRMaskSize)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym946 := z.EncBinary() - _ = yym946 + yym951 := z.EncBinary() + _ = yym951 if false { } else { r.EncodeBool(bool(x.AllocateNodeCIDRs)) @@ -7898,17 +7939,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("allocateNodeCIDRs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym947 := z.EncBinary() - _ = yym947 + yym952 := z.EncBinary() + _ = yym952 if false { } else { r.EncodeBool(bool(x.AllocateNodeCIDRs)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym949 := z.EncBinary() - _ = yym949 + yym954 := z.EncBinary() + _ = yym954 if false { } else { r.EncodeBool(bool(x.ConfigureCloudRoutes)) @@ -7917,17 +7958,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("configureCloudRoutes")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym950 := z.EncBinary() - _ = yym950 + yym955 := z.EncBinary() + _ = yym955 if false { } else { r.EncodeBool(bool(x.ConfigureCloudRoutes)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym952 := z.EncBinary() - _ = yym952 + yym957 := z.EncBinary() + _ = yym957 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.RootCAFile)) @@ -7936,17 +7977,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("rootCAFile")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym953 := z.EncBinary() - _ = yym953 + yym958 := z.EncBinary() + _ = yym958 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.RootCAFile)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym955 := z.EncBinary() - _ = yym955 + yym960 := z.EncBinary() + _ = yym960 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContentType)) @@ -7955,17 +7996,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("contentType")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym956 := z.EncBinary() - _ = yym956 + yym961 := z.EncBinary() + _ = yym961 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.ContentType)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym958 := z.EncBinary() - _ = yym958 + yym963 := z.EncBinary() + _ = yym963 if false { } else { r.EncodeFloat32(float32(x.KubeAPIQPS)) @@ -7974,17 +8015,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeAPIQPS")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym959 := z.EncBinary() - _ = yym959 + yym964 := z.EncBinary() + _ = yym964 if false { } else { r.EncodeFloat32(float32(x.KubeAPIQPS)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym961 := z.EncBinary() - _ = yym961 + yym966 := z.EncBinary() + _ = yym966 if false { } else { r.EncodeInt(int64(x.KubeAPIBurst)) @@ -7993,66 +8034,66 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeAPIBurst")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym962 := z.EncBinary() - _ = yym962 + yym967 := z.EncBinary() + _ = yym967 if false { } else { r.EncodeInt(int64(x.KubeAPIBurst)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy964 := &x.LeaderElection - yy964.CodecEncodeSelf(e) + yy969 := &x.LeaderElection + yy969.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("leaderElection")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy965 := &x.LeaderElection - yy965.CodecEncodeSelf(e) + yy970 := &x.LeaderElection + yy970.CodecEncodeSelf(e) } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy967 := &x.VolumeConfiguration - yy967.CodecEncodeSelf(e) + yy972 := &x.VolumeConfiguration + yy972.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("volumeConfiguration")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy968 := &x.VolumeConfiguration - yy968.CodecEncodeSelf(e) + yy973 := &x.VolumeConfiguration + yy973.CodecEncodeSelf(e) } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy970 := &x.ControllerStartInterval - yym971 := z.EncBinary() - _ = yym971 + yy975 := &x.ControllerStartInterval + yym976 := z.EncBinary() + _ = yym976 if false { - } else if z.HasExtensions() && z.EncExt(yy970) { - } else if !yym971 && z.IsJSONHandle() { - z.EncJSONMarshal(yy970) + } else if z.HasExtensions() && z.EncExt(yy975) { + } else if !yym976 && z.IsJSONHandle() { + z.EncJSONMarshal(yy975) } else { - z.EncFallback(yy970) + z.EncFallback(yy975) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("controllerStartInterval")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy972 := &x.ControllerStartInterval - yym973 := z.EncBinary() - _ = yym973 + yy977 := &x.ControllerStartInterval + yym978 := z.EncBinary() + _ = yym978 if false { - } else if z.HasExtensions() && z.EncExt(yy972) { - } else if !yym973 && z.IsJSONHandle() { - z.EncJSONMarshal(yy972) + } else if z.HasExtensions() && z.EncExt(yy977) { + } else if !yym978 && z.IsJSONHandle() { + z.EncJSONMarshal(yy977) } else { - z.EncFallback(yy972) + z.EncFallback(yy977) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym975 := z.EncBinary() - _ = yym975 + yym980 := z.EncBinary() + _ = yym980 if false { } else { r.EncodeBool(bool(x.EnableGarbageCollector)) @@ -8061,17 +8102,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("enableGarbageCollector")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym976 := z.EncBinary() - _ = yym976 + yym981 := z.EncBinary() + _ = yym981 if false { } else { r.EncodeBool(bool(x.EnableGarbageCollector)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym978 := z.EncBinary() - _ = yym978 + yym983 := z.EncBinary() + _ = yym983 if false { } else { r.EncodeInt(int64(x.ConcurrentGCSyncs)) @@ -8080,14 +8121,14 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("concurrentGCSyncs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym979 := z.EncBinary() - _ = yym979 + yym984 := z.EncBinary() + _ = yym984 if false { } else { r.EncodeInt(int64(x.ConcurrentGCSyncs)) } } - if yyr791 || yy2arr791 { + if yyr796 || yy2arr796 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -8100,25 +8141,25 @@ func (x *KubeControllerManagerConfiguration) CodecDecodeSelf(d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym980 := z.DecBinary() - _ = yym980 + yym985 := z.DecBinary() + _ = yym985 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct981 := r.ContainerType() - if yyct981 == codecSelferValueTypeMap1234 { - yyl981 := r.ReadMapStart() - if yyl981 == 0 { + yyct986 := r.ContainerType() + if yyct986 == codecSelferValueTypeMap1234 { + yyl986 := r.ReadMapStart() + if yyl986 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl981, d) + x.codecDecodeSelfFromMap(yyl986, d) } - } else if yyct981 == codecSelferValueTypeArray1234 { - yyl981 := r.ReadArrayStart() - if yyl981 == 0 { + } else if yyct986 == codecSelferValueTypeArray1234 { + yyl986 := r.ReadArrayStart() + if yyl986 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl981, d) + x.codecDecodeSelfFromArray(yyl986, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -8130,12 +8171,12 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *co var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys982Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys982Slc - var yyhl982 bool = l >= 0 - for yyj982 := 0; ; yyj982++ { - if yyhl982 { - if yyj982 >= l { + var yys987Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys987Slc + var yyhl987 bool = l >= 0 + for yyj987 := 0; ; yyj987++ { + if yyhl987 { + if yyj987 >= l { break } } else { @@ -8144,10 +8185,10 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *co } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys982Slc = r.DecodeBytes(yys982Slc, true, true) - yys982 := string(yys982Slc) + yys987Slc = r.DecodeBytes(yys987Slc, true, true) + yys987 := string(yys987Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys982 { + switch yys987 { case "kind": if r.TryDecodeAsNil() { x.Kind = "" @@ -8266,90 +8307,90 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *co if r.TryDecodeAsNil() { x.ServiceSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1002 := &x.ServiceSyncPeriod - yym1003 := z.DecBinary() - _ = yym1003 + yyv1007 := &x.ServiceSyncPeriod + yym1008 := z.DecBinary() + _ = yym1008 if false { - } else if z.HasExtensions() && z.DecExt(yyv1002) { - } else if !yym1003 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1002) + } else if z.HasExtensions() && z.DecExt(yyv1007) { + } else if !yym1008 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1007) } else { - z.DecFallback(yyv1002, false) + z.DecFallback(yyv1007, false) } } case "nodeSyncPeriod": if r.TryDecodeAsNil() { x.NodeSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1004 := &x.NodeSyncPeriod - yym1005 := z.DecBinary() - _ = yym1005 + yyv1009 := &x.NodeSyncPeriod + yym1010 := z.DecBinary() + _ = yym1010 if false { - } else if z.HasExtensions() && z.DecExt(yyv1004) { - } else if !yym1005 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1004) + } else if z.HasExtensions() && z.DecExt(yyv1009) { + } else if !yym1010 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1009) } else { - z.DecFallback(yyv1004, false) + z.DecFallback(yyv1009, false) } } case "resourceQuotaSyncPeriod": if r.TryDecodeAsNil() { x.ResourceQuotaSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1006 := &x.ResourceQuotaSyncPeriod - yym1007 := z.DecBinary() - _ = yym1007 + yyv1011 := &x.ResourceQuotaSyncPeriod + yym1012 := z.DecBinary() + _ = yym1012 if false { - } else if z.HasExtensions() && z.DecExt(yyv1006) { - } else if !yym1007 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1006) + } else if z.HasExtensions() && z.DecExt(yyv1011) { + } else if !yym1012 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1011) } else { - z.DecFallback(yyv1006, false) + z.DecFallback(yyv1011, false) } } case "namespaceSyncPeriod": if r.TryDecodeAsNil() { x.NamespaceSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1008 := &x.NamespaceSyncPeriod - yym1009 := z.DecBinary() - _ = yym1009 + yyv1013 := &x.NamespaceSyncPeriod + yym1014 := z.DecBinary() + _ = yym1014 if false { - } else if z.HasExtensions() && z.DecExt(yyv1008) { - } else if !yym1009 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1008) + } else if z.HasExtensions() && z.DecExt(yyv1013) { + } else if !yym1014 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1013) } else { - z.DecFallback(yyv1008, false) + z.DecFallback(yyv1013, false) } } case "pvClaimBinderSyncPeriod": if r.TryDecodeAsNil() { x.PVClaimBinderSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1010 := &x.PVClaimBinderSyncPeriod - yym1011 := z.DecBinary() - _ = yym1011 + yyv1015 := &x.PVClaimBinderSyncPeriod + yym1016 := z.DecBinary() + _ = yym1016 if false { - } else if z.HasExtensions() && z.DecExt(yyv1010) { - } else if !yym1011 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1010) + } else if z.HasExtensions() && z.DecExt(yyv1015) { + } else if !yym1016 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1015) } else { - z.DecFallback(yyv1010, false) + z.DecFallback(yyv1015, false) } } case "minResyncPeriod": if r.TryDecodeAsNil() { x.MinResyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1012 := &x.MinResyncPeriod - yym1013 := z.DecBinary() - _ = yym1013 + yyv1017 := &x.MinResyncPeriod + yym1018 := z.DecBinary() + _ = yym1018 if false { - } else if z.HasExtensions() && z.DecExt(yyv1012) { - } else if !yym1013 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1012) + } else if z.HasExtensions() && z.DecExt(yyv1017) { + } else if !yym1018 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1017) } else { - z.DecFallback(yyv1012, false) + z.DecFallback(yyv1017, false) } } case "terminatedPodGCThreshold": @@ -8362,45 +8403,45 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *co if r.TryDecodeAsNil() { x.HorizontalPodAutoscalerSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1015 := &x.HorizontalPodAutoscalerSyncPeriod - yym1016 := z.DecBinary() - _ = yym1016 + yyv1020 := &x.HorizontalPodAutoscalerSyncPeriod + yym1021 := z.DecBinary() + _ = yym1021 if false { - } else if z.HasExtensions() && z.DecExt(yyv1015) { - } else if !yym1016 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1015) + } else if z.HasExtensions() && z.DecExt(yyv1020) { + } else if !yym1021 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1020) } else { - z.DecFallback(yyv1015, false) + z.DecFallback(yyv1020, false) } } case "deploymentControllerSyncPeriod": if r.TryDecodeAsNil() { x.DeploymentControllerSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1017 := &x.DeploymentControllerSyncPeriod - yym1018 := z.DecBinary() - _ = yym1018 + yyv1022 := &x.DeploymentControllerSyncPeriod + yym1023 := z.DecBinary() + _ = yym1023 if false { - } else if z.HasExtensions() && z.DecExt(yyv1017) { - } else if !yym1018 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1017) + } else if z.HasExtensions() && z.DecExt(yyv1022) { + } else if !yym1023 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1022) } else { - z.DecFallback(yyv1017, false) + z.DecFallback(yyv1022, false) } } case "podEvictionTimeout": if r.TryDecodeAsNil() { x.PodEvictionTimeout = pkg1_unversioned.Duration{} } else { - yyv1019 := &x.PodEvictionTimeout - yym1020 := z.DecBinary() - _ = yym1020 + yyv1024 := &x.PodEvictionTimeout + yym1025 := z.DecBinary() + _ = yym1025 if false { - } else if z.HasExtensions() && z.DecExt(yyv1019) { - } else if !yym1020 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1019) + } else if z.HasExtensions() && z.DecExt(yyv1024) { + } else if !yym1025 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1024) } else { - z.DecFallback(yyv1019, false) + z.DecFallback(yyv1024, false) } } case "deletingPodsQps": @@ -8419,15 +8460,15 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *co if r.TryDecodeAsNil() { x.NodeMonitorGracePeriod = pkg1_unversioned.Duration{} } else { - yyv1023 := &x.NodeMonitorGracePeriod - yym1024 := z.DecBinary() - _ = yym1024 + yyv1028 := &x.NodeMonitorGracePeriod + yym1029 := z.DecBinary() + _ = yym1029 if false { - } else if z.HasExtensions() && z.DecExt(yyv1023) { - } else if !yym1024 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1023) + } else if z.HasExtensions() && z.DecExt(yyv1028) { + } else if !yym1029 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1028) } else { - z.DecFallback(yyv1023, false) + z.DecFallback(yyv1028, false) } } case "registerRetryCount": @@ -8440,30 +8481,30 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *co if r.TryDecodeAsNil() { x.NodeStartupGracePeriod = pkg1_unversioned.Duration{} } else { - yyv1026 := &x.NodeStartupGracePeriod - yym1027 := z.DecBinary() - _ = yym1027 + yyv1031 := &x.NodeStartupGracePeriod + yym1032 := z.DecBinary() + _ = yym1032 if false { - } else if z.HasExtensions() && z.DecExt(yyv1026) { - } else if !yym1027 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1026) + } else if z.HasExtensions() && z.DecExt(yyv1031) { + } else if !yym1032 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1031) } else { - z.DecFallback(yyv1026, false) + z.DecFallback(yyv1031, false) } } case "nodeMonitorPeriod": if r.TryDecodeAsNil() { x.NodeMonitorPeriod = pkg1_unversioned.Duration{} } else { - yyv1028 := &x.NodeMonitorPeriod - yym1029 := z.DecBinary() - _ = yym1029 + yyv1033 := &x.NodeMonitorPeriod + yym1034 := z.DecBinary() + _ = yym1034 if false { - } else if z.HasExtensions() && z.DecExt(yyv1028) { - } else if !yym1029 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1028) + } else if z.HasExtensions() && z.DecExt(yyv1033) { + } else if !yym1034 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1033) } else { - z.DecFallback(yyv1028, false) + z.DecFallback(yyv1033, false) } } case "serviceAccountKeyFile": @@ -8554,29 +8595,29 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *co if r.TryDecodeAsNil() { x.LeaderElection = LeaderElectionConfiguration{} } else { - yyv1044 := &x.LeaderElection - yyv1044.CodecDecodeSelf(d) + yyv1049 := &x.LeaderElection + yyv1049.CodecDecodeSelf(d) } case "volumeConfiguration": if r.TryDecodeAsNil() { x.VolumeConfiguration = VolumeConfiguration{} } else { - yyv1045 := &x.VolumeConfiguration - yyv1045.CodecDecodeSelf(d) + yyv1050 := &x.VolumeConfiguration + yyv1050.CodecDecodeSelf(d) } case "controllerStartInterval": if r.TryDecodeAsNil() { x.ControllerStartInterval = pkg1_unversioned.Duration{} } else { - yyv1046 := &x.ControllerStartInterval - yym1047 := z.DecBinary() - _ = yym1047 + yyv1051 := &x.ControllerStartInterval + yym1052 := z.DecBinary() + _ = yym1052 if false { - } else if z.HasExtensions() && z.DecExt(yyv1046) { - } else if !yym1047 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1046) + } else if z.HasExtensions() && z.DecExt(yyv1051) { + } else if !yym1052 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1051) } else { - z.DecFallback(yyv1046, false) + z.DecFallback(yyv1051, false) } } case "enableGarbageCollector": @@ -8592,9 +8633,9 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *co x.ConcurrentGCSyncs = int32(r.DecodeInt(32)) } default: - z.DecStructFieldNotFound(-1, yys982) - } // end switch yys982 - } // end for yyj982 + z.DecStructFieldNotFound(-1, yys987) + } // end switch yys987 + } // end for yyj987 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -8602,16 +8643,16 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1050 int - var yyb1050 bool - var yyhl1050 bool = l >= 0 - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + var yyj1055 int + var yyb1055 bool + var yyhl1055 bool = l >= 0 + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8621,13 +8662,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.Kind = string(r.DecodeString()) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8637,13 +8678,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.APIVersion = string(r.DecodeString()) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8653,13 +8694,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.Port = int32(r.DecodeInt(32)) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8669,13 +8710,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.Address = string(r.DecodeString()) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8685,13 +8726,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.CloudProvider = string(r.DecodeString()) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8701,13 +8742,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.CloudConfigFile = string(r.DecodeString()) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8717,13 +8758,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentEndpointSyncs = int32(r.DecodeInt(32)) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8733,13 +8774,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentRSSyncs = int32(r.DecodeInt(32)) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8749,13 +8790,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentRCSyncs = int32(r.DecodeInt(32)) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8765,13 +8806,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentServiceSyncs = int32(r.DecodeInt(32)) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8781,13 +8822,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentResourceQuotaSyncs = int32(r.DecodeInt(32)) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8797,13 +8838,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentDeploymentSyncs = int32(r.DecodeInt(32)) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8813,13 +8854,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentDaemonSetSyncs = int32(r.DecodeInt(32)) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8829,13 +8870,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentJobSyncs = int32(r.DecodeInt(32)) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8845,13 +8886,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentNamespaceSyncs = int32(r.DecodeInt(32)) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8861,13 +8902,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentSATokenSyncs = int32(r.DecodeInt(32)) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8877,13 +8918,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.LookupCacheSizeForRC = int32(r.DecodeInt(32)) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8893,13 +8934,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.LookupCacheSizeForRS = int32(r.DecodeInt(32)) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8909,13 +8950,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.LookupCacheSizeForDaemonSet = int32(r.DecodeInt(32)) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8923,24 +8964,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.ServiceSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1070 := &x.ServiceSyncPeriod - yym1071 := z.DecBinary() - _ = yym1071 + yyv1075 := &x.ServiceSyncPeriod + yym1076 := z.DecBinary() + _ = yym1076 if false { - } else if z.HasExtensions() && z.DecExt(yyv1070) { - } else if !yym1071 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1070) + } else if z.HasExtensions() && z.DecExt(yyv1075) { + } else if !yym1076 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1075) } else { - z.DecFallback(yyv1070, false) + z.DecFallback(yyv1075, false) } } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8948,24 +8989,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.NodeSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1072 := &x.NodeSyncPeriod - yym1073 := z.DecBinary() - _ = yym1073 + yyv1077 := &x.NodeSyncPeriod + yym1078 := z.DecBinary() + _ = yym1078 if false { - } else if z.HasExtensions() && z.DecExt(yyv1072) { - } else if !yym1073 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1072) + } else if z.HasExtensions() && z.DecExt(yyv1077) { + } else if !yym1078 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1077) } else { - z.DecFallback(yyv1072, false) + z.DecFallback(yyv1077, false) } } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8973,24 +9014,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.ResourceQuotaSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1074 := &x.ResourceQuotaSyncPeriod - yym1075 := z.DecBinary() - _ = yym1075 + yyv1079 := &x.ResourceQuotaSyncPeriod + yym1080 := z.DecBinary() + _ = yym1080 if false { - } else if z.HasExtensions() && z.DecExt(yyv1074) { - } else if !yym1075 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1074) + } else if z.HasExtensions() && z.DecExt(yyv1079) { + } else if !yym1080 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1079) } else { - z.DecFallback(yyv1074, false) + z.DecFallback(yyv1079, false) } } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8998,24 +9039,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.NamespaceSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1076 := &x.NamespaceSyncPeriod - yym1077 := z.DecBinary() - _ = yym1077 + yyv1081 := &x.NamespaceSyncPeriod + yym1082 := z.DecBinary() + _ = yym1082 if false { - } else if z.HasExtensions() && z.DecExt(yyv1076) { - } else if !yym1077 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1076) + } else if z.HasExtensions() && z.DecExt(yyv1081) { + } else if !yym1082 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1081) } else { - z.DecFallback(yyv1076, false) + z.DecFallback(yyv1081, false) } } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9023,24 +9064,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.PVClaimBinderSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1078 := &x.PVClaimBinderSyncPeriod - yym1079 := z.DecBinary() - _ = yym1079 + yyv1083 := &x.PVClaimBinderSyncPeriod + yym1084 := z.DecBinary() + _ = yym1084 if false { - } else if z.HasExtensions() && z.DecExt(yyv1078) { - } else if !yym1079 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1078) + } else if z.HasExtensions() && z.DecExt(yyv1083) { + } else if !yym1084 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1083) } else { - z.DecFallback(yyv1078, false) + z.DecFallback(yyv1083, false) } } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9048,24 +9089,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.MinResyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1080 := &x.MinResyncPeriod - yym1081 := z.DecBinary() - _ = yym1081 + yyv1085 := &x.MinResyncPeriod + yym1086 := z.DecBinary() + _ = yym1086 if false { - } else if z.HasExtensions() && z.DecExt(yyv1080) { - } else if !yym1081 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1080) + } else if z.HasExtensions() && z.DecExt(yyv1085) { + } else if !yym1086 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1085) } else { - z.DecFallback(yyv1080, false) + z.DecFallback(yyv1085, false) } } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9075,13 +9116,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.TerminatedPodGCThreshold = int32(r.DecodeInt(32)) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9089,24 +9130,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.HorizontalPodAutoscalerSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1083 := &x.HorizontalPodAutoscalerSyncPeriod - yym1084 := z.DecBinary() - _ = yym1084 + yyv1088 := &x.HorizontalPodAutoscalerSyncPeriod + yym1089 := z.DecBinary() + _ = yym1089 if false { - } else if z.HasExtensions() && z.DecExt(yyv1083) { - } else if !yym1084 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1083) + } else if z.HasExtensions() && z.DecExt(yyv1088) { + } else if !yym1089 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1088) } else { - z.DecFallback(yyv1083, false) + z.DecFallback(yyv1088, false) } } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9114,24 +9155,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.DeploymentControllerSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv1085 := &x.DeploymentControllerSyncPeriod - yym1086 := z.DecBinary() - _ = yym1086 + yyv1090 := &x.DeploymentControllerSyncPeriod + yym1091 := z.DecBinary() + _ = yym1091 if false { - } else if z.HasExtensions() && z.DecExt(yyv1085) { - } else if !yym1086 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1085) + } else if z.HasExtensions() && z.DecExt(yyv1090) { + } else if !yym1091 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1090) } else { - z.DecFallback(yyv1085, false) + z.DecFallback(yyv1090, false) } } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9139,24 +9180,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.PodEvictionTimeout = pkg1_unversioned.Duration{} } else { - yyv1087 := &x.PodEvictionTimeout - yym1088 := z.DecBinary() - _ = yym1088 + yyv1092 := &x.PodEvictionTimeout + yym1093 := z.DecBinary() + _ = yym1093 if false { - } else if z.HasExtensions() && z.DecExt(yyv1087) { - } else if !yym1088 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1087) + } else if z.HasExtensions() && z.DecExt(yyv1092) { + } else if !yym1093 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1092) } else { - z.DecFallback(yyv1087, false) + z.DecFallback(yyv1092, false) } } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9166,13 +9207,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.DeletingPodsQps = float32(r.DecodeFloat(true)) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9182,13 +9223,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.DeletingPodsBurst = int32(r.DecodeInt(32)) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9196,24 +9237,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.NodeMonitorGracePeriod = pkg1_unversioned.Duration{} } else { - yyv1091 := &x.NodeMonitorGracePeriod - yym1092 := z.DecBinary() - _ = yym1092 + yyv1096 := &x.NodeMonitorGracePeriod + yym1097 := z.DecBinary() + _ = yym1097 if false { - } else if z.HasExtensions() && z.DecExt(yyv1091) { - } else if !yym1092 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1091) + } else if z.HasExtensions() && z.DecExt(yyv1096) { + } else if !yym1097 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1096) } else { - z.DecFallback(yyv1091, false) + z.DecFallback(yyv1096, false) } } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9223,13 +9264,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.RegisterRetryCount = int32(r.DecodeInt(32)) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9237,24 +9278,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.NodeStartupGracePeriod = pkg1_unversioned.Duration{} } else { - yyv1094 := &x.NodeStartupGracePeriod - yym1095 := z.DecBinary() - _ = yym1095 + yyv1099 := &x.NodeStartupGracePeriod + yym1100 := z.DecBinary() + _ = yym1100 if false { - } else if z.HasExtensions() && z.DecExt(yyv1094) { - } else if !yym1095 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1094) + } else if z.HasExtensions() && z.DecExt(yyv1099) { + } else if !yym1100 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1099) } else { - z.DecFallback(yyv1094, false) + z.DecFallback(yyv1099, false) } } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9262,24 +9303,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.NodeMonitorPeriod = pkg1_unversioned.Duration{} } else { - yyv1096 := &x.NodeMonitorPeriod - yym1097 := z.DecBinary() - _ = yym1097 + yyv1101 := &x.NodeMonitorPeriod + yym1102 := z.DecBinary() + _ = yym1102 if false { - } else if z.HasExtensions() && z.DecExt(yyv1096) { - } else if !yym1097 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1096) + } else if z.HasExtensions() && z.DecExt(yyv1101) { + } else if !yym1102 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1101) } else { - z.DecFallback(yyv1096, false) + z.DecFallback(yyv1101, false) } } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9289,13 +9330,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ServiceAccountKeyFile = string(r.DecodeString()) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9305,13 +9346,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ClusterSigningCertFile = string(r.DecodeString()) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9321,13 +9362,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ClusterSigningKeyFile = string(r.DecodeString()) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9337,13 +9378,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.EnableProfiling = bool(r.DecodeBool()) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9353,13 +9394,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ClusterName = string(r.DecodeString()) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9369,13 +9410,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ClusterCIDR = string(r.DecodeString()) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9385,13 +9426,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ServiceCIDR = string(r.DecodeString()) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9401,13 +9442,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.NodeCIDRMaskSize = int32(r.DecodeInt(32)) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9417,13 +9458,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.AllocateNodeCIDRs = bool(r.DecodeBool()) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9433,13 +9474,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConfigureCloudRoutes = bool(r.DecodeBool()) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9449,13 +9490,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.RootCAFile = string(r.DecodeString()) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9465,13 +9506,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ContentType = string(r.DecodeString()) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9481,13 +9522,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.KubeAPIQPS = float32(r.DecodeFloat(true)) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9497,13 +9538,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.KubeAPIBurst = int32(r.DecodeInt(32)) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9511,16 +9552,16 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.LeaderElection = LeaderElectionConfiguration{} } else { - yyv1112 := &x.LeaderElection - yyv1112.CodecDecodeSelf(d) + yyv1117 := &x.LeaderElection + yyv1117.CodecDecodeSelf(d) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9528,16 +9569,16 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.VolumeConfiguration = VolumeConfiguration{} } else { - yyv1113 := &x.VolumeConfiguration - yyv1113.CodecDecodeSelf(d) + yyv1118 := &x.VolumeConfiguration + yyv1118.CodecDecodeSelf(d) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9545,24 +9586,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.ControllerStartInterval = pkg1_unversioned.Duration{} } else { - yyv1114 := &x.ControllerStartInterval - yym1115 := z.DecBinary() - _ = yym1115 + yyv1119 := &x.ControllerStartInterval + yym1120 := z.DecBinary() + _ = yym1120 if false { - } else if z.HasExtensions() && z.DecExt(yyv1114) { - } else if !yym1115 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv1114) + } else if z.HasExtensions() && z.DecExt(yyv1119) { + } else if !yym1120 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv1119) } else { - z.DecFallback(yyv1114, false) + z.DecFallback(yyv1119, false) } } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9572,13 +9613,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.EnableGarbageCollector = bool(r.DecodeBool()) } - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9589,17 +9630,17 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * x.ConcurrentGCSyncs = int32(r.DecodeInt(32)) } for { - yyj1050++ - if yyhl1050 { - yyb1050 = yyj1050 > l + yyj1055++ + if yyhl1055 { + yyb1055 = yyj1055 > l } else { - yyb1050 = r.CheckBreak() + yyb1055 = r.CheckBreak() } - if yyb1050 { + if yyb1055 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1050-1, "") + z.DecStructFieldNotFound(yyj1055-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -9611,33 +9652,33 @@ func (x *VolumeConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { if x == nil { r.EncodeNil() } else { - yym1118 := z.EncBinary() - _ = yym1118 + yym1123 := z.EncBinary() + _ = yym1123 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1119 := !z.EncBinary() - yy2arr1119 := z.EncBasicHandle().StructToArray - var yyq1119 [4]bool - _, _, _ = yysep1119, yyq1119, yy2arr1119 - const yyr1119 bool = false - var yynn1119 int - if yyr1119 || yy2arr1119 { + yysep1124 := !z.EncBinary() + yy2arr1124 := z.EncBasicHandle().StructToArray + var yyq1124 [4]bool + _, _, _ = yysep1124, yyq1124, yy2arr1124 + const yyr1124 bool = false + var yynn1124 int + if yyr1124 || yy2arr1124 { r.EncodeArrayStart(4) } else { - yynn1119 = 4 - for _, b := range yyq1119 { + yynn1124 = 4 + for _, b := range yyq1124 { if b { - yynn1119++ + yynn1124++ } } - r.EncodeMapStart(yynn1119) - yynn1119 = 0 + r.EncodeMapStart(yynn1124) + yynn1124 = 0 } - if yyr1119 || yy2arr1119 { + if yyr1124 || yy2arr1124 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1121 := z.EncBinary() - _ = yym1121 + yym1126 := z.EncBinary() + _ = yym1126 if false { } else { r.EncodeBool(bool(x.EnableHostPathProvisioning)) @@ -9646,17 +9687,17 @@ func (x *VolumeConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("enableHostPathProvisioning")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1122 := z.EncBinary() - _ = yym1122 + yym1127 := z.EncBinary() + _ = yym1127 if false { } else { r.EncodeBool(bool(x.EnableHostPathProvisioning)) } } - if yyr1119 || yy2arr1119 { + if yyr1124 || yy2arr1124 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1124 := z.EncBinary() - _ = yym1124 + yym1129 := z.EncBinary() + _ = yym1129 if false { } else { r.EncodeBool(bool(x.EnableDynamicProvisioning)) @@ -9665,28 +9706,28 @@ func (x *VolumeConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("enableDynamicProvisioning")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1125 := z.EncBinary() - _ = yym1125 + yym1130 := z.EncBinary() + _ = yym1130 if false { } else { r.EncodeBool(bool(x.EnableDynamicProvisioning)) } } - if yyr1119 || yy2arr1119 { + if yyr1124 || yy2arr1124 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy1127 := &x.PersistentVolumeRecyclerConfiguration - yy1127.CodecEncodeSelf(e) + yy1132 := &x.PersistentVolumeRecyclerConfiguration + yy1132.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("persitentVolumeRecyclerConfiguration")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy1128 := &x.PersistentVolumeRecyclerConfiguration - yy1128.CodecEncodeSelf(e) + yy1133 := &x.PersistentVolumeRecyclerConfiguration + yy1133.CodecEncodeSelf(e) } - if yyr1119 || yy2arr1119 { + if yyr1124 || yy2arr1124 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1130 := z.EncBinary() - _ = yym1130 + yym1135 := z.EncBinary() + _ = yym1135 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FlexVolumePluginDir)) @@ -9695,14 +9736,14 @@ func (x *VolumeConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("flexVolumePluginDir")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1131 := z.EncBinary() - _ = yym1131 + yym1136 := z.EncBinary() + _ = yym1136 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.FlexVolumePluginDir)) } } - if yyr1119 || yy2arr1119 { + if yyr1124 || yy2arr1124 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -9715,25 +9756,25 @@ func (x *VolumeConfiguration) CodecDecodeSelf(d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1132 := z.DecBinary() - _ = yym1132 + yym1137 := z.DecBinary() + _ = yym1137 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1133 := r.ContainerType() - if yyct1133 == codecSelferValueTypeMap1234 { - yyl1133 := r.ReadMapStart() - if yyl1133 == 0 { + yyct1138 := r.ContainerType() + if yyct1138 == codecSelferValueTypeMap1234 { + yyl1138 := r.ReadMapStart() + if yyl1138 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1133, d) + x.codecDecodeSelfFromMap(yyl1138, d) } - } else if yyct1133 == codecSelferValueTypeArray1234 { - yyl1133 := r.ReadArrayStart() - if yyl1133 == 0 { + } else if yyct1138 == codecSelferValueTypeArray1234 { + yyl1138 := r.ReadArrayStart() + if yyl1138 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1133, d) + x.codecDecodeSelfFromArray(yyl1138, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -9745,12 +9786,12 @@ func (x *VolumeConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1134Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1134Slc - var yyhl1134 bool = l >= 0 - for yyj1134 := 0; ; yyj1134++ { - if yyhl1134 { - if yyj1134 >= l { + var yys1139Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1139Slc + var yyhl1139 bool = l >= 0 + for yyj1139 := 0; ; yyj1139++ { + if yyhl1139 { + if yyj1139 >= l { break } } else { @@ -9759,10 +9800,10 @@ func (x *VolumeConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1134Slc = r.DecodeBytes(yys1134Slc, true, true) - yys1134 := string(yys1134Slc) + yys1139Slc = r.DecodeBytes(yys1139Slc, true, true) + yys1139 := string(yys1139Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1134 { + switch yys1139 { case "enableHostPathProvisioning": if r.TryDecodeAsNil() { x.EnableHostPathProvisioning = false @@ -9779,8 +9820,8 @@ func (x *VolumeConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.PersistentVolumeRecyclerConfiguration = PersistentVolumeRecyclerConfiguration{} } else { - yyv1137 := &x.PersistentVolumeRecyclerConfiguration - yyv1137.CodecDecodeSelf(d) + yyv1142 := &x.PersistentVolumeRecyclerConfiguration + yyv1142.CodecDecodeSelf(d) } case "flexVolumePluginDir": if r.TryDecodeAsNil() { @@ -9789,9 +9830,9 @@ func (x *VolumeConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder x.FlexVolumePluginDir = string(r.DecodeString()) } default: - z.DecStructFieldNotFound(-1, yys1134) - } // end switch yys1134 - } // end for yyj1134 + z.DecStructFieldNotFound(-1, yys1139) + } // end switch yys1139 + } // end for yyj1139 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -9799,16 +9840,16 @@ func (x *VolumeConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1139 int - var yyb1139 bool - var yyhl1139 bool = l >= 0 - yyj1139++ - if yyhl1139 { - yyb1139 = yyj1139 > l + var yyj1144 int + var yyb1144 bool + var yyhl1144 bool = l >= 0 + yyj1144++ + if yyhl1144 { + yyb1144 = yyj1144 > l } else { - yyb1139 = r.CheckBreak() + yyb1144 = r.CheckBreak() } - if yyb1139 { + if yyb1144 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9818,13 +9859,13 @@ func (x *VolumeConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.EnableHostPathProvisioning = bool(r.DecodeBool()) } - yyj1139++ - if yyhl1139 { - yyb1139 = yyj1139 > l + yyj1144++ + if yyhl1144 { + yyb1144 = yyj1144 > l } else { - yyb1139 = r.CheckBreak() + yyb1144 = r.CheckBreak() } - if yyb1139 { + if yyb1144 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9834,13 +9875,13 @@ func (x *VolumeConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decod } else { x.EnableDynamicProvisioning = bool(r.DecodeBool()) } - yyj1139++ - if yyhl1139 { - yyb1139 = yyj1139 > l + yyj1144++ + if yyhl1144 { + yyb1144 = yyj1144 > l } else { - yyb1139 = r.CheckBreak() + yyb1144 = r.CheckBreak() } - if yyb1139 { + if yyb1144 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9848,16 +9889,16 @@ func (x *VolumeConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.PersistentVolumeRecyclerConfiguration = PersistentVolumeRecyclerConfiguration{} } else { - yyv1142 := &x.PersistentVolumeRecyclerConfiguration - yyv1142.CodecDecodeSelf(d) + yyv1147 := &x.PersistentVolumeRecyclerConfiguration + yyv1147.CodecDecodeSelf(d) } - yyj1139++ - if yyhl1139 { - yyb1139 = yyj1139 > l + yyj1144++ + if yyhl1144 { + yyb1144 = yyj1144 > l } else { - yyb1139 = r.CheckBreak() + yyb1144 = r.CheckBreak() } - if yyb1139 { + if yyb1144 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9868,17 +9909,17 @@ func (x *VolumeConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decod x.FlexVolumePluginDir = string(r.DecodeString()) } for { - yyj1139++ - if yyhl1139 { - yyb1139 = yyj1139 > l + yyj1144++ + if yyhl1144 { + yyb1144 = yyj1144 > l } else { - yyb1139 = r.CheckBreak() + yyb1144 = r.CheckBreak() } - if yyb1139 { + if yyb1144 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1139-1, "") + z.DecStructFieldNotFound(yyj1144-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -9890,33 +9931,33 @@ func (x *PersistentVolumeRecyclerConfiguration) CodecEncodeSelf(e *codec1978.Enc if x == nil { r.EncodeNil() } else { - yym1144 := z.EncBinary() - _ = yym1144 + yym1149 := z.EncBinary() + _ = yym1149 if false { } else if z.HasExtensions() && z.EncExt(x) { } else { - yysep1145 := !z.EncBinary() - yy2arr1145 := z.EncBasicHandle().StructToArray - var yyq1145 [7]bool - _, _, _ = yysep1145, yyq1145, yy2arr1145 - const yyr1145 bool = false - var yynn1145 int - if yyr1145 || yy2arr1145 { + yysep1150 := !z.EncBinary() + yy2arr1150 := z.EncBasicHandle().StructToArray + var yyq1150 [7]bool + _, _, _ = yysep1150, yyq1150, yy2arr1150 + const yyr1150 bool = false + var yynn1150 int + if yyr1150 || yy2arr1150 { r.EncodeArrayStart(7) } else { - yynn1145 = 7 - for _, b := range yyq1145 { + yynn1150 = 7 + for _, b := range yyq1150 { if b { - yynn1145++ + yynn1150++ } } - r.EncodeMapStart(yynn1145) - yynn1145 = 0 + r.EncodeMapStart(yynn1150) + yynn1150 = 0 } - if yyr1145 || yy2arr1145 { + if yyr1150 || yy2arr1150 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1147 := z.EncBinary() - _ = yym1147 + yym1152 := z.EncBinary() + _ = yym1152 if false { } else { r.EncodeInt(int64(x.MaximumRetry)) @@ -9925,17 +9966,17 @@ func (x *PersistentVolumeRecyclerConfiguration) CodecEncodeSelf(e *codec1978.Enc z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("maximumRetry")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1148 := z.EncBinary() - _ = yym1148 + yym1153 := z.EncBinary() + _ = yym1153 if false { } else { r.EncodeInt(int64(x.MaximumRetry)) } } - if yyr1145 || yy2arr1145 { + if yyr1150 || yy2arr1150 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1150 := z.EncBinary() - _ = yym1150 + yym1155 := z.EncBinary() + _ = yym1155 if false { } else { r.EncodeInt(int64(x.MinimumTimeoutNFS)) @@ -9944,17 +9985,17 @@ func (x *PersistentVolumeRecyclerConfiguration) CodecEncodeSelf(e *codec1978.Enc z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("minimumTimeoutNFS")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1151 := z.EncBinary() - _ = yym1151 + yym1156 := z.EncBinary() + _ = yym1156 if false { } else { r.EncodeInt(int64(x.MinimumTimeoutNFS)) } } - if yyr1145 || yy2arr1145 { + if yyr1150 || yy2arr1150 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1153 := z.EncBinary() - _ = yym1153 + yym1158 := z.EncBinary() + _ = yym1158 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodTemplateFilePathNFS)) @@ -9963,17 +10004,17 @@ func (x *PersistentVolumeRecyclerConfiguration) CodecEncodeSelf(e *codec1978.Enc z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podTemplateFilePathNFS")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1154 := z.EncBinary() - _ = yym1154 + yym1159 := z.EncBinary() + _ = yym1159 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodTemplateFilePathNFS)) } } - if yyr1145 || yy2arr1145 { + if yyr1150 || yy2arr1150 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1156 := z.EncBinary() - _ = yym1156 + yym1161 := z.EncBinary() + _ = yym1161 if false { } else { r.EncodeInt(int64(x.IncrementTimeoutNFS)) @@ -9982,17 +10023,17 @@ func (x *PersistentVolumeRecyclerConfiguration) CodecEncodeSelf(e *codec1978.Enc z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("incrementTimeoutNFS")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1157 := z.EncBinary() - _ = yym1157 + yym1162 := z.EncBinary() + _ = yym1162 if false { } else { r.EncodeInt(int64(x.IncrementTimeoutNFS)) } } - if yyr1145 || yy2arr1145 { + if yyr1150 || yy2arr1150 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1159 := z.EncBinary() - _ = yym1159 + yym1164 := z.EncBinary() + _ = yym1164 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodTemplateFilePathHostPath)) @@ -10001,17 +10042,17 @@ func (x *PersistentVolumeRecyclerConfiguration) CodecEncodeSelf(e *codec1978.Enc z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podTemplateFilePathHostPath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1160 := z.EncBinary() - _ = yym1160 + yym1165 := z.EncBinary() + _ = yym1165 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.PodTemplateFilePathHostPath)) } } - if yyr1145 || yy2arr1145 { + if yyr1150 || yy2arr1150 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1162 := z.EncBinary() - _ = yym1162 + yym1167 := z.EncBinary() + _ = yym1167 if false { } else { r.EncodeInt(int64(x.MinimumTimeoutHostPath)) @@ -10020,17 +10061,17 @@ func (x *PersistentVolumeRecyclerConfiguration) CodecEncodeSelf(e *codec1978.Enc z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("minimumTimeoutHostPath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1163 := z.EncBinary() - _ = yym1163 + yym1168 := z.EncBinary() + _ = yym1168 if false { } else { r.EncodeInt(int64(x.MinimumTimeoutHostPath)) } } - if yyr1145 || yy2arr1145 { + if yyr1150 || yy2arr1150 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym1165 := z.EncBinary() - _ = yym1165 + yym1170 := z.EncBinary() + _ = yym1170 if false { } else { r.EncodeInt(int64(x.IncrementTimeoutHostPath)) @@ -10039,14 +10080,14 @@ func (x *PersistentVolumeRecyclerConfiguration) CodecEncodeSelf(e *codec1978.Enc z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("incrementTimeoutHostPath")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1166 := z.EncBinary() - _ = yym1166 + yym1171 := z.EncBinary() + _ = yym1171 if false { } else { r.EncodeInt(int64(x.IncrementTimeoutHostPath)) } } - if yyr1145 || yy2arr1145 { + if yyr1150 || yy2arr1150 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -10059,25 +10100,25 @@ func (x *PersistentVolumeRecyclerConfiguration) CodecDecodeSelf(d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yym1167 := z.DecBinary() - _ = yym1167 + yym1172 := z.DecBinary() + _ = yym1172 if false { } else if z.HasExtensions() && z.DecExt(x) { } else { - yyct1168 := r.ContainerType() - if yyct1168 == codecSelferValueTypeMap1234 { - yyl1168 := r.ReadMapStart() - if yyl1168 == 0 { + yyct1173 := r.ContainerType() + if yyct1173 == codecSelferValueTypeMap1234 { + yyl1173 := r.ReadMapStart() + if yyl1173 == 0 { z.DecSendContainerState(codecSelfer_containerMapEnd1234) } else { - x.codecDecodeSelfFromMap(yyl1168, d) + x.codecDecodeSelfFromMap(yyl1173, d) } - } else if yyct1168 == codecSelferValueTypeArray1234 { - yyl1168 := r.ReadArrayStart() - if yyl1168 == 0 { + } else if yyct1173 == codecSelferValueTypeArray1234 { + yyl1173 := r.ReadArrayStart() + if yyl1173 == 0 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } else { - x.codecDecodeSelfFromArray(yyl1168, d) + x.codecDecodeSelfFromArray(yyl1173, d) } } else { panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) @@ -10089,12 +10130,12 @@ func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromMap(l int, d var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yys1169Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys1169Slc - var yyhl1169 bool = l >= 0 - for yyj1169 := 0; ; yyj1169++ { - if yyhl1169 { - if yyj1169 >= l { + var yys1174Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys1174Slc + var yyhl1174 bool = l >= 0 + for yyj1174 := 0; ; yyj1174++ { + if yyhl1174 { + if yyj1174 >= l { break } } else { @@ -10103,10 +10144,10 @@ func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromMap(l int, d } } z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys1169Slc = r.DecodeBytes(yys1169Slc, true, true) - yys1169 := string(yys1169Slc) + yys1174Slc = r.DecodeBytes(yys1174Slc, true, true) + yys1174 := string(yys1174Slc) z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys1169 { + switch yys1174 { case "maximumRetry": if r.TryDecodeAsNil() { x.MaximumRetry = 0 @@ -10150,9 +10191,9 @@ func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromMap(l int, d x.IncrementTimeoutHostPath = int32(r.DecodeInt(32)) } default: - z.DecStructFieldNotFound(-1, yys1169) - } // end switch yys1169 - } // end for yyj1169 + z.DecStructFieldNotFound(-1, yys1174) + } // end switch yys1174 + } // end for yyj1174 z.DecSendContainerState(codecSelfer_containerMapEnd1234) } @@ -10160,16 +10201,16 @@ func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromArray(l int, var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1177 int - var yyb1177 bool - var yyhl1177 bool = l >= 0 - yyj1177++ - if yyhl1177 { - yyb1177 = yyj1177 > l + var yyj1182 int + var yyb1182 bool + var yyhl1182 bool = l >= 0 + yyj1182++ + if yyhl1182 { + yyb1182 = yyj1182 > l } else { - yyb1177 = r.CheckBreak() + yyb1182 = r.CheckBreak() } - if yyb1177 { + if yyb1182 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10179,13 +10220,13 @@ func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromArray(l int, } else { x.MaximumRetry = int32(r.DecodeInt(32)) } - yyj1177++ - if yyhl1177 { - yyb1177 = yyj1177 > l + yyj1182++ + if yyhl1182 { + yyb1182 = yyj1182 > l } else { - yyb1177 = r.CheckBreak() + yyb1182 = r.CheckBreak() } - if yyb1177 { + if yyb1182 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10195,13 +10236,13 @@ func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromArray(l int, } else { x.MinimumTimeoutNFS = int32(r.DecodeInt(32)) } - yyj1177++ - if yyhl1177 { - yyb1177 = yyj1177 > l + yyj1182++ + if yyhl1182 { + yyb1182 = yyj1182 > l } else { - yyb1177 = r.CheckBreak() + yyb1182 = r.CheckBreak() } - if yyb1177 { + if yyb1182 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10211,13 +10252,13 @@ func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromArray(l int, } else { x.PodTemplateFilePathNFS = string(r.DecodeString()) } - yyj1177++ - if yyhl1177 { - yyb1177 = yyj1177 > l + yyj1182++ + if yyhl1182 { + yyb1182 = yyj1182 > l } else { - yyb1177 = r.CheckBreak() + yyb1182 = r.CheckBreak() } - if yyb1177 { + if yyb1182 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10227,13 +10268,13 @@ func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromArray(l int, } else { x.IncrementTimeoutNFS = int32(r.DecodeInt(32)) } - yyj1177++ - if yyhl1177 { - yyb1177 = yyj1177 > l + yyj1182++ + if yyhl1182 { + yyb1182 = yyj1182 > l } else { - yyb1177 = r.CheckBreak() + yyb1182 = r.CheckBreak() } - if yyb1177 { + if yyb1182 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10243,13 +10284,13 @@ func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromArray(l int, } else { x.PodTemplateFilePathHostPath = string(r.DecodeString()) } - yyj1177++ - if yyhl1177 { - yyb1177 = yyj1177 > l + yyj1182++ + if yyhl1182 { + yyb1182 = yyj1182 > l } else { - yyb1177 = r.CheckBreak() + yyb1182 = r.CheckBreak() } - if yyb1177 { + if yyb1182 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10259,13 +10300,13 @@ func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromArray(l int, } else { x.MinimumTimeoutHostPath = int32(r.DecodeInt(32)) } - yyj1177++ - if yyhl1177 { - yyb1177 = yyj1177 > l + yyj1182++ + if yyhl1182 { + yyb1182 = yyj1182 > l } else { - yyb1177 = r.CheckBreak() + yyb1182 = r.CheckBreak() } - if yyb1177 { + if yyb1182 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -10276,17 +10317,17 @@ func (x *PersistentVolumeRecyclerConfiguration) codecDecodeSelfFromArray(l int, x.IncrementTimeoutHostPath = int32(r.DecodeInt(32)) } for { - yyj1177++ - if yyhl1177 { - yyb1177 = yyj1177 > l + yyj1182++ + if yyhl1182 { + yyb1182 = yyj1182 > l } else { - yyb1177 = r.CheckBreak() + yyb1182 = r.CheckBreak() } - if yyb1177 { + if yyb1182 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj1177-1, "") + z.DecStructFieldNotFound(yyj1182-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -10296,20 +10337,20 @@ func (x codecSelfer1234) encconfig_ConfigurationMap(v pkg2_config.ConfigurationM z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r r.EncodeMapStart(len(v)) - for yyk1185, yyv1185 := range v { + for yyk1190, yyv1190 := range v { z.EncSendContainerState(codecSelfer_containerMapKey1234) - yym1186 := z.EncBinary() - _ = yym1186 + yym1191 := z.EncBinary() + _ = yym1191 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(yyk1185)) + r.EncodeString(codecSelferC_UTF81234, string(yyk1190)) } z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym1187 := z.EncBinary() - _ = yym1187 + yym1192 := z.EncBinary() + _ = yym1192 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(yyv1185)) + r.EncodeString(codecSelferC_UTF81234, string(yyv1190)) } } z.EncSendContainerState(codecSelfer_containerMapEnd1234) @@ -10320,63 +10361,63 @@ func (x codecSelfer1234) decconfig_ConfigurationMap(v *pkg2_config.Configuration z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - yyv1188 := *v - yyl1188 := r.ReadMapStart() - yybh1188 := z.DecBasicHandle() - if yyv1188 == nil { - yyrl1188, _ := z.DecInferLen(yyl1188, yybh1188.MaxInitLen, 32) - yyv1188 = make(map[string]string, yyrl1188) - *v = yyv1188 - } - var yymk1188 string - var yymv1188 string - var yymg1188 bool - if yybh1188.MapValueReset { - } - if yyl1188 > 0 { - for yyj1188 := 0; yyj1188 < yyl1188; yyj1188++ { + yyv1193 := *v + yyl1193 := r.ReadMapStart() + yybh1193 := z.DecBasicHandle() + if yyv1193 == nil { + yyrl1193, _ := z.DecInferLen(yyl1193, yybh1193.MaxInitLen, 32) + yyv1193 = make(map[string]string, yyrl1193) + *v = yyv1193 + } + var yymk1193 string + var yymv1193 string + var yymg1193 bool + if yybh1193.MapValueReset { + } + if yyl1193 > 0 { + for yyj1193 := 0; yyj1193 < yyl1193; yyj1193++ { z.DecSendContainerState(codecSelfer_containerMapKey1234) if r.TryDecodeAsNil() { - yymk1188 = "" + yymk1193 = "" } else { - yymk1188 = string(r.DecodeString()) + yymk1193 = string(r.DecodeString()) } - if yymg1188 { - yymv1188 = yyv1188[yymk1188] + if yymg1193 { + yymv1193 = yyv1193[yymk1193] } z.DecSendContainerState(codecSelfer_containerMapValue1234) if r.TryDecodeAsNil() { - yymv1188 = "" + yymv1193 = "" } else { - yymv1188 = string(r.DecodeString()) + yymv1193 = string(r.DecodeString()) } - if yyv1188 != nil { - yyv1188[yymk1188] = yymv1188 + if yyv1193 != nil { + yyv1193[yymk1193] = yymv1193 } } - } else if yyl1188 < 0 { - for yyj1188 := 0; !r.CheckBreak(); yyj1188++ { + } else if yyl1193 < 0 { + for yyj1193 := 0; !r.CheckBreak(); yyj1193++ { z.DecSendContainerState(codecSelfer_containerMapKey1234) if r.TryDecodeAsNil() { - yymk1188 = "" + yymk1193 = "" } else { - yymk1188 = string(r.DecodeString()) + yymk1193 = string(r.DecodeString()) } - if yymg1188 { - yymv1188 = yyv1188[yymk1188] + if yymg1193 { + yymv1193 = yyv1193[yymk1193] } z.DecSendContainerState(codecSelfer_containerMapValue1234) if r.TryDecodeAsNil() { - yymv1188 = "" + yymv1193 = "" } else { - yymv1188 = string(r.DecodeString()) + yymv1193 = string(r.DecodeString()) } - if yyv1188 != nil { - yyv1188[yymk1188] = yymv1188 + if yyv1193 != nil { + yyv1193[yymk1193] = yymv1193 } } } // else len==0: TODO: Should we clear map entries? diff --git a/staging/src/k8s.io/client-go/1.4/pkg/apis/componentconfig/types.go b/staging/src/k8s.io/client-go/1.4/pkg/apis/componentconfig/types.go index da38ac382fa30..a71ff1e77a79f 100644 --- a/staging/src/k8s.io/client-go/1.4/pkg/apis/componentconfig/types.go +++ b/staging/src/k8s.io/client-go/1.4/pkg/apis/componentconfig/types.go @@ -397,6 +397,8 @@ type KubeletConfiguration struct { // Currently only cpu and memory are supported. [default=none] // See http://releases.k8s.io/HEAD/docs/user-guide/compute-resources.md for more detail. KubeReserved utilconfig.ConfigurationMap `json:"kubeReserved"` + // Default behaviour for kernel tuning + ProtectKernelDefaults bool `json:"protectKernelDefaults"` } type KubeSchedulerConfiguration struct { diff --git a/staging/src/k8s.io/client-go/1.4/pkg/apis/componentconfig/v1alpha1/types.go b/staging/src/k8s.io/client-go/1.4/pkg/apis/componentconfig/v1alpha1/types.go index 05b56e7ac8451..59ad2af60ac53 100644 --- a/staging/src/k8s.io/client-go/1.4/pkg/apis/componentconfig/v1alpha1/types.go +++ b/staging/src/k8s.io/client-go/1.4/pkg/apis/componentconfig/v1alpha1/types.go @@ -452,4 +452,6 @@ type KubeletConfiguration struct { // Currently only cpu and memory are supported. [default=none] // See http://releases.k8s.io/HEAD/docs/user-guide/compute-resources.md for more detail. KubeReserved map[string]string `json:"kubeReserved"` + // Default behaviour for kernel tuning + ProtectKernelDefaults bool `json:"protectKernelDefaults"` } diff --git a/staging/src/k8s.io/client-go/1.4/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go b/staging/src/k8s.io/client-go/1.4/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go index 757ae7d3d567b..8f8bf59a0c446 100644 --- a/staging/src/k8s.io/client-go/1.4/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go +++ b/staging/src/k8s.io/client-go/1.4/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go @@ -319,6 +319,7 @@ func autoConvert_v1alpha1_KubeletConfiguration_To_componentconfig_KubeletConfigu } else { out.KubeReserved = nil } + out.ProtectKernelDefaults = in.ProtectKernelDefaults return nil } @@ -483,6 +484,7 @@ func autoConvert_componentconfig_KubeletConfiguration_To_v1alpha1_KubeletConfigu } else { out.KubeReserved = nil } + out.ProtectKernelDefaults = in.ProtectKernelDefaults return nil } diff --git a/staging/src/k8s.io/client-go/1.4/pkg/apis/componentconfig/v1alpha1/zz_generated.deepcopy.go b/staging/src/k8s.io/client-go/1.4/pkg/apis/componentconfig/v1alpha1/zz_generated.deepcopy.go index 2fedb5e6a755f..560737052f282 100644 --- a/staging/src/k8s.io/client-go/1.4/pkg/apis/componentconfig/v1alpha1/zz_generated.deepcopy.go +++ b/staging/src/k8s.io/client-go/1.4/pkg/apis/componentconfig/v1alpha1/zz_generated.deepcopy.go @@ -377,6 +377,7 @@ func DeepCopy_v1alpha1_KubeletConfiguration(in interface{}, out interface{}, c * } else { out.KubeReserved = nil } + out.ProtectKernelDefaults = in.ProtectKernelDefaults return nil } } diff --git a/staging/src/k8s.io/client-go/1.4/pkg/apis/componentconfig/zz_generated.deepcopy.go b/staging/src/k8s.io/client-go/1.4/pkg/apis/componentconfig/zz_generated.deepcopy.go index d4b654f78e724..79748f8783f0a 100644 --- a/staging/src/k8s.io/client-go/1.4/pkg/apis/componentconfig/zz_generated.deepcopy.go +++ b/staging/src/k8s.io/client-go/1.4/pkg/apis/componentconfig/zz_generated.deepcopy.go @@ -325,6 +325,7 @@ func DeepCopy_componentconfig_KubeletConfiguration(in interface{}, out interface } else { out.KubeReserved = nil } + out.ProtectKernelDefaults = in.ProtectKernelDefaults return nil } } diff --git a/staging/src/k8s.io/client-go/1.4/pkg/util/flowcontrol/throttle.go b/staging/src/k8s.io/client-go/1.4/pkg/util/flowcontrol/throttle.go index 232ef6e58c6a7..881a2f57d7d73 100644 --- a/staging/src/k8s.io/client-go/1.4/pkg/util/flowcontrol/throttle.go +++ b/staging/src/k8s.io/client-go/1.4/pkg/util/flowcontrol/throttle.go @@ -106,11 +106,9 @@ type fakeNeverRateLimiter struct { } func NewFakeNeverRateLimiter() RateLimiter { - wg := sync.WaitGroup{} - wg.Add(1) - return &fakeNeverRateLimiter{ - wg: wg, - } + rl := fakeNeverRateLimiter{} + rl.wg.Add(1) + return &rl } func (t *fakeNeverRateLimiter) TryAccept() bool { diff --git a/staging/src/k8s.io/client-go/1.4/tools/cache/reflector.go b/staging/src/k8s.io/client-go/1.4/tools/cache/reflector.go index aa17f3c6e8faf..22a7400ce3bbb 100644 --- a/staging/src/k8s.io/client-go/1.4/tools/cache/reflector.go +++ b/staging/src/k8s.io/client-go/1.4/tools/cache/reflector.go @@ -69,8 +69,6 @@ type Reflector struct { resyncPeriod time.Duration // now() returns current time - exposed for testing purposes now func() time.Time - // nextResync is approximate time of next resync (0 if not scheduled) - nextResync time.Time // lastSyncResourceVersion is the resource version token last // observed when doing a sync with the underlying store // it is thread safe, but not synchronized with the underlying store @@ -234,14 +232,12 @@ var ( // required, and a cleanup function. func (r *Reflector) resyncChan() (<-chan time.Time, func() bool) { if r.resyncPeriod == 0 { - r.nextResync = time.Time{} return neverExitWatch, func() bool { return false } } // The cleanup function is required: imagine the scenario where watches // always fail so we end up listing frequently. Then, if we don't // manually stop the timer, we could end up with many timers active // concurrently. - r.nextResync = r.now().Add(r.resyncPeriod) t := time.NewTimer(r.resyncPeriod) return t.C, t.Stop } @@ -285,7 +281,7 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { case <-stopCh: return } - glog.V(4).Infof("%s: next resync planned for %#v, forcing now", r.name, r.nextResync) + glog.V(4).Infof("%s: forcing resync", r.name) if err := r.store.Resync(); err != nil { resyncerrc <- err return diff --git a/staging/src/k8s.io/client-go/1.4/tools/cache/reflector_test.go b/staging/src/k8s.io/client-go/1.4/tools/cache/reflector_test.go index 12e23a15d7bd8..567ee84efe08d 100644 --- a/staging/src/k8s.io/client-go/1.4/tools/cache/reflector_test.go +++ b/staging/src/k8s.io/client-go/1.4/tools/cache/reflector_test.go @@ -286,14 +286,14 @@ func TestReflectorListAndWatchWithErrors(t *testing.T) { { list: mkList("1"), events: []watch.Event{ - {watch.Added, mkPod("foo", "2")}, - {watch.Added, mkPod("bar", "3")}, + {Type: watch.Added, Object: mkPod("foo", "2")}, + {Type: watch.Added, Object: mkPod("bar", "3")}, }, }, { list: mkList("3", mkPod("foo", "2"), mkPod("bar", "3")), events: []watch.Event{ - {watch.Deleted, mkPod("foo", "4")}, - {watch.Added, mkPod("qux", "5")}, + {Type: watch.Deleted, Object: mkPod("foo", "4")}, + {Type: watch.Added, Object: mkPod("qux", "5")}, }, }, { listErr: fmt.Errorf("a list error"), @@ -303,7 +303,7 @@ func TestReflectorListAndWatchWithErrors(t *testing.T) { }, { list: mkList("5", mkPod("bar", "3"), mkPod("qux", "5")), events: []watch.Event{ - {watch.Added, mkPod("baz", "6")}, + {Type: watch.Added, Object: mkPod("baz", "6")}, }, }, { list: mkList("6", mkPod("bar", "3"), mkPod("qux", "5"), mkPod("baz", "6")), diff --git a/staging/src/k8s.io/client-go/1.4/tools/portforward/portforward.go b/staging/src/k8s.io/client-go/1.4/tools/portforward/portforward.go index df37ab942c738..db8fba09404f6 100644 --- a/staging/src/k8s.io/client-go/1.4/tools/portforward/portforward.go +++ b/staging/src/k8s.io/client-go/1.4/tools/portforward/portforward.go @@ -108,7 +108,7 @@ func parsePorts(ports []string) ([]ForwardedPort, error) { } // New creates a new PortForwarder. -func New(dialer httpstream.Dialer, ports []string, stopChan <-chan struct{}, out, errOut io.Writer) (*PortForwarder, error) { +func New(dialer httpstream.Dialer, ports []string, stopChan <-chan struct{}, readyChan chan struct{}, out, errOut io.Writer) (*PortForwarder, error) { if len(ports) == 0 { return nil, errors.New("You must specify at least 1 port") } @@ -120,7 +120,7 @@ func New(dialer httpstream.Dialer, ports []string, stopChan <-chan struct{}, out dialer: dialer, ports: parsedPorts, stopChan: stopChan, - Ready: make(chan struct{}), + Ready: readyChan, out: out, errOut: errOut, }, nil @@ -164,7 +164,9 @@ func (pf *PortForwarder) forward() error { return fmt.Errorf("Unable to listen on any of the requested ports: %v", pf.ports) } - close(pf.Ready) + if pf.Ready != nil { + close(pf.Ready) + } // wait for interrupt or conn closure select { diff --git a/staging/src/k8s.io/client-go/README.md b/staging/src/k8s.io/client-go/README.md index 1947eafd9c14a..d3749dade8a7f 100644 --- a/staging/src/k8s.io/client-go/README.md +++ b/staging/src/k8s.io/client-go/README.md @@ -1,9 +1,28 @@ -This _staging/src/k8s.io/client-go directory is the staging area of the client repo. It contains a versioned client, tools built around the client like the reflector, and all the client dependencies. The content will be periodically published to k8s.io/client-go repo. -The staged content is copied from the main repo, i.e., k8s.io/kubernetes, with directory rearrangement and necessary rewritings. To sync the content with the latest code in your local k8s.io/kubernetes, you need to run `godep restore` in k8s root directory, then run _staging/src/k8s.io/client-go/copy.sh. -vendor/k8s.io/client-go is a symlink pointing to this staging area, so to use the packages in the staging area, you can import it as "vendor/client-go/", as if the client were vendored. The client will be vendored from k8s.io/client-go for real after the test matrix is converted to vendor k8s components. +# client-go +Go clients for talking to a [kubernetes](http://kubernetes.io/) cluster. -[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/_staging/src/k8s.io/client-go/README.md?pixel)]() +### What's included +* The `kubernetes` package contains the clientset to access Kubernetes API. +* The `discovery` package is used to discover APIs supported by a Kubernetes API server. +* The `dynamic` package contains a dynamic client that can perform generic operations on arbitrary Kubernetes API objects. +* The `transport` package is used to set up auth and start a connection. +* The `tools/cache` package is useful for writing controllers. -[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/staging/src/k8s.io/client-go/README.md?pixel)]() +### Releases + +Each top-level folder (e.g., 1.4) contains a release of clients and their dependencies. + +client-go has the same release cycle as the Kubernetes main repository. For example, in the 1.4 release cycle, the contents in `1.4/` folder are subjected to changes. Once 1.4 is released, new changes will go into the `1.5/` folder. We will make great efforts to not change the public interface of a version of the client once that version has been released. We may change the interface between versions. Old versions of the client will be retained for two release cycles. + +### How to get it + +You can `go get` a release of client-go, e.g., `go get k8s.io/client-go/1.4`. + +### Reporting bugs + +Please report bugs to the main Kubernetes [repository](https://github.com/kubernetes/kubernetes/issues/new). + +### Contributing code +Please send pull requests against the client packages in the Kubernetes main [repository](https://github.com/kubernetes/kubernetes), and run the `/staging/src/k8s.io/client-go/copy.sh` script to update the staging area in the main repository. Changes in the staging area will be published to this repository every day. diff --git a/staging/src/k8s.io/client-go/copy.sh b/staging/src/k8s.io/client-go/copy.sh index 2e5027b3717eb..f94629b496f71 100755 --- a/staging/src/k8s.io/client-go/copy.sh +++ b/staging/src/k8s.io/client-go/copy.sh @@ -65,13 +65,13 @@ echo "move to the client repo" ls "${CLIENT_REPO}" | grep -v '_tmp' | xargs rm -r mv "${CLIENT_REPO_TEMP}"/* "${CLIENT_REPO}" rm -r "${CLIENT_REPO_TEMP}" -rm -r "${CLIENT_REPO}"/Godeps echo "moving vendor/k8s.io/kuberentes" cp -rn "${CLIENT_REPO}"/vendor/k8s.io/kubernetes/. "${CLIENT_REPO}"/ +rm -rf "${CLIENT_REPO}"/vendor/k8s.io/kubernetes # client-go will share the vendor of the main repo for now. When client-go # becomes a standalone repo, it will have its own vendor -rm -r "${CLIENT_REPO}"/vendor +mv "${CLIENT_REPO}"/vendor "${CLIENT_REPO}"/_vendor # remove the pkg/util/net/sets/README.md to silent hack/verify-munge-docs.sh # TODO: probably we should convert the README.md a doc.go find ./ -name "README.md" -delete